Browse Source

代码提交

lzm_web
Linzm 8 months ago
parent
commit
416b85e11a
  1. 37
      src/views/badge/preview.vue

37
src/views/badge/preview.vue

@ -172,7 +172,11 @@ const showBgCompare = ref(false) @@ -172,7 +172,11 @@ const showBgCompare = ref(false)
const currentIndex = ref(0)
const imageList = ref([])
function compare() {
getCompareImage()
if (extend_value == -1) {
showCompare.value = true
} else {
showBgCompare.value = true
}
}
const kindList = ref([])
const checkId = ref(0)
@ -195,6 +199,25 @@ function sureReload() { @@ -195,6 +199,25 @@ function sureReload() {
console.log('sureReload')
imageUrl.value = '';
group.value = newGroup.value
const params = {
pid: pid.value,
kind_id: checkId.value,
extend_value: extend_value.value,
group: group.value,
}
badgeApi.putMOdeling(params).then((res: any) => {
console.log('putModeling', res)
createLog()
}).catch((err) => {
console.log('putModeling', err)
showReload.value = false
}).finally(() => {
showReload.value = false
})
}
const createLog = () => {
badgeApi.createLog({
pid: pid.value,
kind_id: checkId.value,
@ -214,6 +237,7 @@ function sureReload() { @@ -214,6 +237,7 @@ function sureReload() {
showReload.value = false
})
}
function save() {
//
const downloadImage = (url: string) => {
@ -232,19 +256,15 @@ function save() { @@ -232,19 +256,15 @@ function save() {
}
}
const compareList = ref({})
const extend_value = ref(0)
function getCompareImage() {
badgeApi.getCompareImage({
pid: pid.value,
group: group.value,
}).then((res: any) => {
console.log('getCompareImage', res)
if (res.extend_value == -1) {
showCompare.value = true
compareList.value = res
} else {
showBgCompare.value = true
compareList.value = res
}
extend_value.value = res.extend_value
compareList.value = res
}).catch((err) => {
console.log('getCompareImage', err)
}).finally((err) => {
@ -353,6 +373,7 @@ onMounted(() => { @@ -353,6 +373,7 @@ onMounted(() => {
getImageList()
progressList()
getSizeList()
getCompareImage()
timer.value = setInterval(() => {
getImageList()
}, 10000)

Loading…
Cancel
Save