From 56bc35a1beaec5b34fcd7c4d526a2fa4d788154c Mon Sep 17 00:00:00 2001 From: wenghaocan Date: Sat, 29 Sep 2018 11:51:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83=E9=A6=96=E9=A1=B5=E3=80=81?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/goods-classify.vue | 25 +++++++++++++++---------- src/view/home.vue | 11 ++++++----- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/view/goods-classify.vue b/src/view/goods-classify.vue index a13ed03..1dc2f6d 100644 --- a/src/view/goods-classify.vue +++ b/src/view/goods-classify.vue @@ -105,6 +105,14 @@ that.showLoading = false if ( res.code == 0 ){ this.goodsList = res.data || [] + this.$nextTick(function(){ + //调用scroll函数,实现滚动 + this._initScroll() + //拿到数据以后计算高度 + this._calculateHeight(); + // 自动选中 + this.autoSelect() + }) } else { this.$vux.toast.text(res.msg,"middle"); } @@ -139,7 +147,7 @@ let item = foodList[i]; height += item.clientHeight; this.listHeight.push(height); - } + } }, selectMenu(index, event) { if(event && !event._constructed) { @@ -155,18 +163,15 @@ this.selectMenu(i) } } - } + }, + ShareWenXin (){ + var merchantNo = this.no + this.wxShare({"merchantNo":merchantNo,"source":0,"url":encodeURIComponent(location.href)}) + } }, mounted() { this.getParams() - window.onload = () =>{ - //调用scroll函数,实现滚动 - this._initScroll() - //拿到数据以后计算高度 - this._calculateHeight(); - // 自动选中 - this.autoSelect() - } + this.ShareWenXin() }, } diff --git a/src/view/home.vue b/src/view/home.vue index 2a8aece..eee542e 100644 --- a/src/view/home.vue +++ b/src/view/home.vue @@ -20,7 +20,7 @@
- + @@ -57,10 +57,10 @@