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