Browse Source

根据type_id判断prod_id

main
Linzm 2 months ago
parent
commit
bff6520a18
  1. 14
      src/views/badge/index.vue

14
src/views/badge/index.vue

@ -359,7 +359,7 @@ const typeId = ref(0) @@ -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 = () => { @@ -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({

Loading…
Cancel
Save