|
|
@@ -27,7 +27,7 @@ Page({ |
|
|
|
page: 1, |
|
|
|
allow_load: true, |
|
|
|
loading: true, //"上拉加载"的变量,默认false,隐藏 |
|
|
|
content:"", |
|
|
|
content: "" |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
this.getList(0, 0); |
|
|
@@ -40,17 +40,7 @@ Page({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: `/pages/couponorder/detail/index?quancode=${ |
|
|
|
e.currentTarget.dataset.quancode |
|
|
|
}`, |
|
|
|
success: function(res) { |
|
|
|
// success |
|
|
|
console.log("点击跳转到券详情页面"); |
|
|
|
}, |
|
|
|
fail: function() { |
|
|
|
// fail |
|
|
|
}, |
|
|
|
complete: function() { |
|
|
|
// complete |
|
|
|
} |
|
|
|
}` |
|
|
|
}); |
|
|
|
}, |
|
|
|
getList(key, pageNum) { |
|
|
@@ -59,14 +49,14 @@ Page({ |
|
|
|
console.log(pageNum); |
|
|
|
if (that.data.allow_load) { |
|
|
|
that.setData({ |
|
|
|
loading:true, |
|
|
|
content:'小主,我在玩命加载中...' |
|
|
|
}) |
|
|
|
loading: true, |
|
|
|
content: "小主,我在玩命加载中..." |
|
|
|
}); |
|
|
|
Http.get({ |
|
|
|
url: config.api.couponOrderList, |
|
|
|
data: { |
|
|
|
pageNum: pageNum, |
|
|
|
pageSize: 8, |
|
|
|
pageSize: 6, |
|
|
|
couponOrderStatus: key |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
@@ -76,8 +66,8 @@ Page({ |
|
|
|
}); |
|
|
|
setTimeout(function() { |
|
|
|
that.setData({ |
|
|
|
loading:false, |
|
|
|
}) |
|
|
|
loading: false |
|
|
|
}); |
|
|
|
}, 1400); |
|
|
|
if (pageNum >= res.data.pages) { |
|
|
|
that.setData({ |
|
|
@@ -85,8 +75,8 @@ Page({ |
|
|
|
}); |
|
|
|
setTimeout(function() { |
|
|
|
that.setData({ |
|
|
|
loading:false, |
|
|
|
}) |
|
|
|
loading: false |
|
|
|
}); |
|
|
|
}, 1400); |
|
|
|
} |
|
|
|
/** |
|
|
@@ -102,14 +92,14 @@ Page({ |
|
|
|
} else { |
|
|
|
console.log("加载完成allow_load设置成false"); |
|
|
|
that.setData({ |
|
|
|
loading:true, |
|
|
|
content:"^_^再拉裤子就掉啦ʅ(´◔౪◔)ʃ" |
|
|
|
}) |
|
|
|
setTimeout(function(){ |
|
|
|
loading: true, |
|
|
|
content: "^_^再拉裤子就掉啦ʅ(´◔౪◔)ʃ" |
|
|
|
}); |
|
|
|
setTimeout(function() { |
|
|
|
that.setData({ |
|
|
|
loading:false, |
|
|
|
}) |
|
|
|
},1400) |
|
|
|
loading: false |
|
|
|
}); |
|
|
|
}, 1400); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleChange({ detail }) { |
|
|
|