解决打包问题
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user