浏览代码

首页下拉刷新新增

tags/安徽版C.4.1.6最终版
刘晖 6 年前
父节点
当前提交
56055cdbd2
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. +9
    -0
      pages/main/index.js

+ 9
- 0
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();


正在加载...
取消
保存