修复微信小程序上空值是undefined导致的台桌接口报错和确认订单商品不展示的问题
This commit is contained in:
parent
1791d5f3d8
commit
1f099e2174
|
|
@ -166,7 +166,7 @@
|
|||
async function getTable() {
|
||||
// let state=status.list[status.active].key
|
||||
// state=state?(state=='all'?'':state):''
|
||||
const areaId=area.list[area.defaultCateIndex].id
|
||||
const areaId=area.list[area.defaultCateIndex].id||''
|
||||
let {
|
||||
content,total
|
||||
} = await $table.get({...query,areaId,name:searchValue.value,state:'idle'})
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@
|
|||
//不免餐位费
|
||||
const res = await Api.$choseCount({
|
||||
masterId: option.masterId,
|
||||
tableId: table.value.tableId,
|
||||
tableId: table.value.tableId||'',
|
||||
num: userNumbers.defaultCateIndex+1,
|
||||
})
|
||||
Object.assign($seatFee, res)
|
||||
|
|
@ -369,7 +369,7 @@
|
|||
isPack,
|
||||
isGift,
|
||||
masterId: option.masterId,
|
||||
tableId: table.value.tableId,
|
||||
tableId: table.value.tableId||'',
|
||||
productId,
|
||||
num: number,
|
||||
skuId
|
||||
|
|
@ -427,7 +427,7 @@
|
|||
console.log(option);
|
||||
const submitPar = {
|
||||
masterId: option.masterId,
|
||||
tableId: table.value.tableId,
|
||||
tableId: table.value.tableId||"",
|
||||
vipUserId: user.value.id ? user.value.id : '',
|
||||
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
||||
}
|
||||
|
|
@ -510,7 +510,7 @@
|
|||
page: 0,
|
||||
size: 300,
|
||||
masterId: option.masterId,
|
||||
tableId: table.value.tableId
|
||||
tableId: table.value.tableId||''
|
||||
}) {
|
||||
const {
|
||||
records,
|
||||
|
|
@ -550,13 +550,13 @@
|
|||
note: note.value,
|
||||
postPay: true,
|
||||
orderId: '',
|
||||
tableId: table.value.tableId
|
||||
tableId: table.value.tableId||''
|
||||
}) {
|
||||
if (!$shop.value.isTableFee) {
|
||||
//不免餐位费
|
||||
await Api.$choseCount({
|
||||
masterId: option.masterId,
|
||||
tableId: table.value.tableId,
|
||||
tableId: table.value.tableId||"",
|
||||
num: userNumbers.defaultCateIndex+1,
|
||||
})
|
||||
}
|
||||
|
|
@ -616,7 +616,7 @@
|
|||
cartId: cart.id,
|
||||
productId: cart.productId,
|
||||
skuId: cart.skuId,
|
||||
tableId: option.tableId,
|
||||
tableId: option.tableId||"",
|
||||
note: e.remark,
|
||||
num: cart.number // 0会删除此商品
|
||||
})
|
||||
|
|
@ -637,7 +637,7 @@
|
|||
console.log(option,);
|
||||
if (opt) {
|
||||
table.value = {
|
||||
tableId: opt.tableId,
|
||||
tableId: opt.tableId||'',
|
||||
name: opt.name
|
||||
}
|
||||
}
|
||||
|
|
@ -673,7 +673,7 @@
|
|||
}
|
||||
const res = await Api.$changeUseType({
|
||||
useType,
|
||||
tableId,
|
||||
tableId:tableId||'',
|
||||
cartIds: goods.list.map((v) => v.id),
|
||||
})
|
||||
getCart()
|
||||
|
|
|
|||
Loading…
Reference in New Issue