forked from natuka/web.puabadge.com
修改:场景手办bug处理
This commit is contained in:
1 parent
7ba46aed34
commit
898c159ab8
1 file changed
+18
-26
+18
-26
@@ -100,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div v-if="typeId == 11 && count_prop > 0">
|
||||||
<div :style="`font-size: 16px; color: ${config.styles.colors.textPrimary}; font-weight: bold; margin-top: ${config.styles.spacing.sectionMargin};padding: 0 ${config.styles.spacing.pagePadding};`">
|
<div :style="`font-size: 16px; color: ${config.styles.colors.textPrimary}; font-weight: bold; margin-top: ${config.styles.spacing.sectionMargin};padding: 0 ${config.styles.spacing.pagePadding};`">
|
||||||
{{ toValueWithout("相框标题") }}
|
{{ toValueWithout("相框标题") }}
|
||||||
</div>
|
</div>
|
||||||
@@ -160,15 +160,17 @@
|
|||||||
{{ toValueWithout("场景道具") }}
|
{{ toValueWithout("场景道具") }}
|
||||||
</div>
|
</div>
|
||||||
<div :style="`padding: 10px ${config.styles.spacing.pagePadding};`">
|
<div :style="`padding: 10px ${config.styles.spacing.pagePadding};`">
|
||||||
<div v-if="method == 2" :style="`margin-top: 16px;`">
|
<div :style="`margin-top: 16px;`">
|
||||||
<div
|
<div
|
||||||
|
v-for="(_, index) in 4"
|
||||||
|
:key="index"
|
||||||
:style="`display: flex; align-items: center; margin-bottom: 12px;`"
|
:style="`display: flex; align-items: center; margin-bottom: 12px;`"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="scene_prop"
|
v-model="scenePropsInputs[index]"
|
||||||
:placeholder="toValueWithout('请输入场景道具')"
|
:placeholder="toValueWithout('请输入场景道具')"
|
||||||
:style="`flex: 1; margin-right: 8px;`"
|
:style="`flex: 1; margin-right: 8px;`"
|
||||||
@input="updateSceneProp"
|
@input="updateScenePropFromInputs"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -299,8 +301,7 @@ const getOrderStat = () => {
|
|||||||
mountsId.value = 0
|
mountsId.value = 0
|
||||||
getmountsList()
|
getmountsList()
|
||||||
} else if (res.type_id === 9) {
|
} else if (res.type_id === 9) {
|
||||||
method.value = 1
|
scenePropsInputs.value = ['', '', '', '']
|
||||||
scenePropsInputs.value = ['']
|
|
||||||
scene_prop.value = ''
|
scene_prop.value = ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -323,6 +324,7 @@ const getKindList = () => {
|
|||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
kindList.value = res.list
|
kindList.value = res.list
|
||||||
kindId.value = res.list && res.list[0]?.id
|
kindId.value = res.list && res.list[0]?.id
|
||||||
|
count_prop.value = res.list && res.list[0]?.count_prop
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,11 +400,17 @@ const rideChange = (item: any) => {
|
|||||||
mountsId.value = item.id
|
mountsId.value = item.id
|
||||||
}
|
}
|
||||||
|
|
||||||
const scene_prop = ref('') // 最终存储的字符串,用逗号连接
|
const scene_prop = ref('') // 四个输入框的值用;拼接后提交接口
|
||||||
|
|
||||||
// 更新场景道具字符串
|
// 场景道具四个输入框
|
||||||
const updateSceneProp = (value: string) => {
|
const scenePropsInputs = ref<string[]>(['', '', '', ''])
|
||||||
scene_prop.value = value
|
|
||||||
|
// 四个输入框有值时,用;拼接更新到 scene_prop
|
||||||
|
const updateScenePropFromInputs = () => {
|
||||||
|
scene_prop.value = scenePropsInputs.value
|
||||||
|
.map(v => (v || '').trim())
|
||||||
|
.filter(v => v)
|
||||||
|
.join(';')
|
||||||
}
|
}
|
||||||
|
|
||||||
const isLoading = ref(false)
|
const isLoading = ref(false)
|
||||||
@@ -634,21 +642,6 @@ const sendToOss = async (src: string | Blob | File, url: string) => {
|
|||||||
if (--pendingUploads.value === 0 && !isAnotherAPICalled.value) {
|
if (--pendingUploads.value === 0 && !isAnotherAPICalled.value) {
|
||||||
isAnotherAPICalled.value = true
|
isAnotherAPICalled.value = true
|
||||||
createLog()
|
createLog()
|
||||||
// const params = {
|
|
||||||
// pid: pid.value,
|
|
||||||
// group: 1,
|
|
||||||
// prod_id: prodId.value,
|
|
||||||
// extend_value: -1,
|
|
||||||
// type_id: typeId.value,
|
|
||||||
// kind_id: kindId.value
|
|
||||||
// }
|
|
||||||
// badgeApi.putModeling(params).then(() => {
|
|
||||||
// createLog()
|
|
||||||
// }).catch((err) => {
|
|
||||||
// console.log('putModeling', err)
|
|
||||||
// }).finally(() => {
|
|
||||||
// closeToast()
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
@@ -672,7 +665,6 @@ const createLog = () => {
|
|||||||
subject_id: subjectId.value,
|
subject_id: subjectId.value,
|
||||||
scene_prop: scene_prop.value ? scene_prop.value : undefined,
|
scene_prop: scene_prop.value ? scene_prop.value : undefined,
|
||||||
mounts_id: mountsId.value || undefined,
|
mounts_id: mountsId.value || undefined,
|
||||||
method: method.value
|
|
||||||
}
|
}
|
||||||
badgeApi.createLog(params).then(() => {
|
badgeApi.createLog(params).then(() => {
|
||||||
closeToast()
|
closeToast()
|
||||||
|
|||||||
Reference in new issue
Block a user