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();