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