diff --git a/pages/takeaway/index.vue b/pages/takeaway/index.vue index 7d8af7a..e1547fb 100644 --- a/pages/takeaway/index.vue +++ b/pages/takeaway/index.vue @@ -9,9 +9,8 @@ - + + + 加载更多 + + @@ -100,7 +104,7 @@ + style="background: #A16222;color: #FFF;padding: 0 30rpx;line-height: 70rpx;border-radius: 35rpx;font-size: 32rpx;"> 去下单 @@ -124,7 +128,8 @@ style="flex: 1;padding: 10rpx 14rpx;display: flex;flex-direction: column;justify-content: space-between;"> - {{ item.goods.name }} + {{ item.goods.name }} + @@ -165,14 +170,15 @@ - - + - + @@ -210,7 +216,7 @@ animation: null, cartData: null, is_cont: 0, - + show_goods_id: 0 } }, @@ -240,7 +246,7 @@ }, onShow() { - + }, onReady() { setTimeout(() => { @@ -287,13 +293,14 @@ content: res.msg, showCancel: false, success() { - + } }) } else { if (res.data.is_more && res.data.is_more > 0 && this.is_cont == 0) { uni.reLaunch({ - url: '/pages/takeaway/orderAndSettlement/edit?n_id=' + query.n_id + '&mch_id=' + query.mch_id + '&store_id=' + query.store_id + url: '/pages/takeaway/orderAndSettlement/edit?n_id=' + query.n_id + '&mch_id=' + + query.mch_id + '&store_id=' + query.store_id }) } this.cat_list = res.data.cat_list @@ -344,12 +351,14 @@ }, 0) }, async skuPopData(e) { - const goods = this.goodsArr.find(item => item.goods_sku_id === e.goods_sku_id && item.small_goods_json === + const goods = this.goodsArr.find(item => item.goods_sku_id === e.goods_sku_id && item + .small_goods_json === e.small_goods_json) if (goods) { let goodsArr = this.goodsArr this.goodsArr.forEach((item, index) => { - if (item.goods_sku_id === e.goods_sku_id && item.small_goods_json === e.small_goods_json) { + if (item.goods_sku_id === e.goods_sku_id && item.small_goods_json === e + .small_goods_json) { this.goodsArr[index].num = (this.goodsArr[index].num - 0) + 1 } }) @@ -388,8 +397,8 @@ toSubmit() { let goodsArr = this.goodsArr.filter(item => item.num > 0) if (!goodsArr.length) { - uni.$u.toast("请选择点餐商品") - return + uni.$u.toast("请选择点餐商品") + return } let that = this uni.setStorage({ @@ -397,7 +406,8 @@ data: goodsArr, success() { uni.navigateTo({ - url: "/pages/takeaway/orderAndSettlement/index?" + "n_id=" + that.n_id + "&mch_id=" + that.mch_id + "&store_id=" + that.store_id, + url: "/pages/takeaway/orderAndSettlement/index?" + "n_id=" + that.n_id + + "&mch_id=" + that.mch_id + "&store_id=" + that.store_id, }); } })