diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue index 52ea81d..eb90d62 100644 --- a/pages/order_food/order_food.vue +++ b/pages/order_food/order_food.vue @@ -276,6 +276,7 @@ placeholder="商品备注(选填)" border="none" v-model="item.note" + @blur="productBlur(item)" > @@ -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, diff --git a/pagesOrder/orderAMeal/index.vue b/pagesOrder/orderAMeal/index.vue index a34a9c8..2605a07 100644 --- a/pagesOrder/orderAMeal/index.vue +++ b/pagesOrder/orderAMeal/index.vue @@ -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, + }) + } + } }