下单相关修改
This commit is contained in:
@@ -276,6 +276,7 @@
|
||||
placeholder="商品备注(选填)"
|
||||
border="none"
|
||||
v-model="item.note"
|
||||
@blur="productBlur(item)"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
@@ -754,6 +755,7 @@
|
||||
"isVip": item.isVip,
|
||||
"productId": item.id, //商品id
|
||||
"shopId": this.shopId,
|
||||
"note": item.note,
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
"tableId": this.tableCode,
|
||||
}
|
||||
@@ -777,6 +779,7 @@
|
||||
"type": c == '+' ? 1 : 0,
|
||||
"isVip": item.isVip,
|
||||
"productId": item.productId, //商品id
|
||||
"note": item.note,
|
||||
"shopId": this.shopId,
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
"tableId": this.tableCode,
|
||||
@@ -786,7 +789,24 @@
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 菜品备注修改
|
||||
*/
|
||||
productBlur ( item ) {
|
||||
let params = {
|
||||
"skuId": item.skuId,
|
||||
"num": item.number, //数量
|
||||
"type": item.type,
|
||||
"isVip": item.isVip,
|
||||
"productId": item.productId, //商品id
|
||||
"note": item.note,
|
||||
"shopId": this.shopId,
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
"tableId": this.tableCode,
|
||||
}
|
||||
this.addCart(params);
|
||||
},
|
||||
|
||||
/**
|
||||
* 添加到购物车
|
||||
@@ -1040,6 +1060,7 @@
|
||||
"type": c == '+' ? 1 : 0,
|
||||
"productId": item.id, //商品id
|
||||
"isVip": item.isVip,
|
||||
"note": item.note,
|
||||
"shopId": this.shopId,
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
"tableId": this.tableCode,
|
||||
|
||||
@@ -84,14 +84,17 @@
|
||||
}
|
||||
|
||||
let res = await this.api.productChoseCount({
|
||||
orderId: this.orderId,
|
||||
dinersNum: this.dinersNum,
|
||||
tableId: this.tableCode,
|
||||
num: this.dinersNum,
|
||||
shopId: this.shopId,
|
||||
}) //判断是否支付成功
|
||||
uni.pro.navigateTo('order_food/order_food', {
|
||||
tableCode: this.tableCode,
|
||||
dinersNum: this.dinersNum,
|
||||
})
|
||||
if ( res.code == 0) {
|
||||
uni.pro.navigateTo('order_food/order_food', {
|
||||
tableCode: this.tableCode,
|
||||
dinersNum: this.dinersNum,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user