forked from natuka/web.puabadge.com
代码提交
This commit is contained in:
1 parent
19826cd8f6
commit
88d9740d87
1 file changed
+18
-2
@@ -232,9 +232,11 @@ function sureReload() {
|
||||
}
|
||||
|
||||
const imgKey = ref(101)
|
||||
const frameUrl = ref('')
|
||||
const changeImage = (item: any) => {
|
||||
imgKey.value = item.key
|
||||
imageUrl.value = item.origin_url
|
||||
frameUrl.value = item.frame_url
|
||||
imageWater.value = item.url
|
||||
}
|
||||
|
||||
@@ -462,6 +464,7 @@ const getPosition = () => {
|
||||
}
|
||||
|
||||
const imageUrl = ref('')
|
||||
const originUrl = ref('')
|
||||
const group = ref(1);
|
||||
// 轮询获取图片
|
||||
const flag = ref(1)
|
||||
@@ -517,7 +520,9 @@ const getImageList = () => {
|
||||
|
||||
// 如果有已生成的图片且还未设置预览图,则显示第一个生成的图片
|
||||
if (firstGeneratedImage && !isPreview.value) {
|
||||
originUrl.value = firstGeneratedImage.origin_url
|
||||
imageUrl.value = firstGeneratedImage.origin_url
|
||||
frameUrl.value = firstGeneratedImage.frame_url
|
||||
imageWater.value = firstGeneratedImage.url
|
||||
imgKey.value = firstGeneratedImage.key
|
||||
isPreview.value = true
|
||||
@@ -545,11 +550,15 @@ const getImageList = () => {
|
||||
const currentImage = mergedList.filter((item: any) => item.key === imgKey.value)[0]
|
||||
console.log('currentImage', currentImage)
|
||||
if (currentImage && currentImage.status === 1) {
|
||||
originUrl.value = currentImage.origin_url
|
||||
imageUrl.value = currentImage.origin_url
|
||||
frameUrl.value = currentImage.frame_url
|
||||
imageWater.value = currentImage.url
|
||||
isPreview.value = true
|
||||
} else {
|
||||
originUrl.value = currentImage.origin_url
|
||||
imageUrl.value = currentImage.origin_url
|
||||
frameUrl.value = currentImage.frame_url
|
||||
imageWater.value = currentImage.url
|
||||
isPreview.value = true
|
||||
}
|
||||
@@ -568,10 +577,14 @@ const getImageList = () => {
|
||||
// 显示图片
|
||||
imageList.value = data.list
|
||||
if (imgKey.value) {
|
||||
originUrl.value = data.list.filter((item: any) => item.key == imgKey.value)[0].origin_url
|
||||
imageUrl.value = data.list.filter((item: any) => item.key == imgKey.value)[0].origin_url
|
||||
frameUrl.value = data.list.filter((item: any) => item.key == imgKey.value)[0].frame_url
|
||||
imageWater.value = data.list.filter((item: any) => item.key == imgKey.value)[0].url
|
||||
} else {
|
||||
originUrl.value = data.list[0].origin_url
|
||||
imageUrl.value = data.list[0].origin_url
|
||||
frameUrl.value = data.list[0].frame_url
|
||||
imageWater.value = data.list[0].url
|
||||
imgKey.value = data.list[0].key
|
||||
}
|
||||
@@ -605,12 +618,12 @@ const getImageList = () => {
|
||||
|
||||
// })
|
||||
// }
|
||||
const shapeId = ref(1)
|
||||
const shapeId = ref(0)
|
||||
const shapeImage = ref('')
|
||||
|
||||
const shapeList = ref([])
|
||||
const custom_switch = ref(0)
|
||||
const limitCount = ref(10)
|
||||
const limitCount = ref(0)
|
||||
const getShapeList = () => {
|
||||
badgeApi.getShapeList({
|
||||
prod_id: prodId.value,
|
||||
@@ -729,6 +742,9 @@ const shapeChange = (item: any) => {
|
||||
shapeImage.value = item.frame_path
|
||||
custom_switch.value = item.custom_switch
|
||||
limitCount.value = item.text_limit_max
|
||||
if (typeId.value == 3) {
|
||||
imageUrl.value = item.name == '无边框' ? originUrl.value : frameUrl.value
|
||||
}
|
||||
ImageShow(item)
|
||||
if (custom_switch.value == 1) {
|
||||
textShow(item)
|
||||
|
||||
Reference in new issue
Block a user