根据type_id判断prod_id

This commit is contained in:
Linzm committed 2025-11-28 09:38:02 +08:00
1 parent 1c89f495a7
commit bff6520a18
1 file changed
+13 -1
+13 -1
View File
@@ -359,7 +359,7 @@ const typeId = ref(0)
const getOrderStat = () => {
badgeApi.getOrderStat({}).then((res: any) => {
orderStat.value = res
prodId.value = res.prod_id
prodId.value = getDefaultProdId(res)
if (res.type_id == 4) {
getKindList()
}
@@ -369,6 +369,18 @@ const getOrderStat = () => {
})
}
const getDefaultProdId = (res: any) => {
if (res.type_id == 4) {
return res.prod_id == 7 || res.prod_id == 1 ? 1 : 19
} else if (res.type_id == 6) {
return res.prod_id == 7 || res.prod_id == 25 ? 25 : 24
} else if (res.type_id == 3) {
return res.prod_id == 7 ? 7 : 8
} else {
return res.prod_id == 7 ? 7 : 8
}
}
const kindList = ref([])
const getKindList = () => {
badgeApi.getKindList({