From bdd5a6a32528c31a17d214c8fa55d6fd188a7c77 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Tue, 4 Jun 2024 15:45:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- pages/index/drinks.vue | 20 ++++++++++++++++---- pages/member/list.vue | 5 +++++ pages/order_food/order_food.vue | 13 +++++++------ 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/manifest.json b/manifest.json index 036b818..64b255c 100644 --- a/manifest.json +++ b/manifest.json @@ -56,7 +56,7 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "wxc2bb94c0ddda1032", + "appid" : "wxd88fffa983758a30", "setting" : { "urlCheck" : false, "minified" : true, diff --git a/pages/index/drinks.vue b/pages/index/drinks.vue index 5be53c1..3b6e2a9 100644 --- a/pages/index/drinks.vue +++ b/pages/index/drinks.vue @@ -155,12 +155,12 @@ uni.getStorage({ key: 'itemData', success: function(res) { - console.log(res.data,'数据'); _this.type = res.data.value _this.distiricttopCommon() - setTimeout(() => { + // setTimeout(() => { _this.GetTop() - }, 1000) + // _this.init_fn() + // }, 1000) } }); // this.type = e.value @@ -170,7 +170,19 @@ // }, 1000) }, onShow() { - this.init_fn() + let _this = this + uni.getStorage({ + key: 'itemData', + success: function(res) { + _this.type = res.data.value + _this.distiricttopCommon() + // setTimeout(() => { + // _this.GetTop() + _this.init_fn() + // }, 1000) + } + }); + // this.init_fn() }, computed: { HeighT() { //手机类型的尺寸 diff --git a/pages/member/list.vue b/pages/member/list.vue index 3238807..0985707 100644 --- a/pages/member/list.vue +++ b/pages/member/list.vue @@ -40,8 +40,13 @@ size: 10, //页容量 status: 'loadmore', }, + userId:null } }, + onLoad() { + this.userId = uni.cache.get('userInfo').id + // this.paygetShopByMember() + }, onShow() { this.paygetShopByMember() }, diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue index 3efa3f3..6b09492 100644 --- a/pages/order_food/order_food.vue +++ b/pages/order_food/order_food.vue @@ -388,15 +388,16 @@ case 'addcart': this.cartLists = msg if (msg.data.length != 0) { + let nums = 0 msg.data.forEach((item, index, arr) => { //初始化skuidname的数据 选择第一个 - console.log(this.skuidsearch,'调试1') - console.log(item.skuId,'调试2') if (item.skuId == this.skuidsearch) { - this.$set(this, 'amountcartNumber', item.number) - } else { - this.$set(this, 'amountcartNumber', 0) - } + nums = item.number + } + // else { + // this.$set(this, 'amountcartNumber', 0) + // } }) + this.$set(this, 'amountcartNumber', nums) } else { this.$set(this, 'amountcartNumber', 0) }