From 56055cdbd2e12c02a52a7c879a312bc007bca530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=96?= Date: Wed, 20 Mar 2019 15:28:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=B8=8B=E6=8B=89=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/main/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pages/main/index.js b/pages/main/index.js index ad6aad2..1b175af 100644 --- a/pages/main/index.js +++ b/pages/main/index.js @@ -35,6 +35,7 @@ Page({ showPages: false, display: 'none', display1:'none', + optionsData:null, page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 }, close:function(){ @@ -209,6 +210,9 @@ Page({ }) } if (optionss.couponChannelId|| optionss.orderId) { + that.setData({ + optionsData: optionss + }) that.userLogin(optionss.couponChannelId, optionss.orderId); } else { that.userLogin() @@ -487,6 +491,11 @@ Page({ that.setData({ page: 1 }) + if (this.data.optionsData != null && (this.data.optionsData.couponChannelId || this.data.optionsData.orderId)) { + this.userLogin(this.data.optionsData.couponChannelId, this.data.optionsData.orderId); + } else { + this.userLogin() + } if (that.data.code == 0 || that.data.code == undefined) { that.selectComponent("#lists").getList(0, 1, "refresh"); wx.stopPullDownRefresh();