解决打包问题

This commit is contained in:
gyq
2024-03-06 10:49:45 +08:00
parent 48d6583a03
commit 91ce993270
11 changed files with 119 additions and 118 deletions

View File

@@ -142,6 +142,8 @@ const createOrderLoading = ref(false)
// 取餐码
const masterId = ref('')
const uuid = ref('')
// 挂单量
const pendingCartNum = ref(0)
@@ -197,7 +199,7 @@ async function pendingCart(params, status = true) {
status: status,
uuid: params.uuid
})
if (status && !cartList.value.length) createCodeAjax()
if (status && cartList.value.length) createCodeAjax()
} catch (error) {
console.log(error)
}
@@ -255,7 +257,8 @@ async function addCart(params, type = 'add') {
number: params.number || 1,
isPack: params.isPack || false,
isGift: params.isGift || false,
cartId: type == 'add' ? '' : params.id
cartId: type == 'add' ? '' : params.id,
uuid: params.uuid || store.userInfo.uuid
})
masterId.value = res
goodsRef.value.updateData()
@@ -281,10 +284,12 @@ async function queryCartAjax() {
}
}
// 获取取
// 获取取
async function createCodeAjax() {
try {
const res = await createCode({ shopId: store.userInfo.shopId })
const res = await createCode({
shopId: store.userInfo.shopId
})
masterId.value = res.code
// masterId.value = '#13'
queryCartAjax()