...
|
...
|
@@ -41,15 +41,15 @@ Page({ |
|
|
clock: '../../static/images/limit/clock_left.png'
|
|
|
}
|
|
|
},
|
|
|
onLoad: function() {
|
|
|
onLoad: function () {
|
|
|
yas = new Yas(app);
|
|
|
|
|
|
this.getList(0, 1, 20, false);
|
|
|
},
|
|
|
onShow: function() {
|
|
|
onShow: function () {
|
|
|
yas.pageOpenReport();
|
|
|
},
|
|
|
onPullDownRefresh: function() {
|
|
|
onPullDownRefresh: function () {
|
|
|
this.setData({
|
|
|
refreshText: '加载中...'
|
|
|
});
|
...
|
...
|
@@ -62,7 +62,7 @@ Page({ |
|
|
});
|
|
|
|
|
|
},
|
|
|
onReachBottom: function() {
|
|
|
onReachBottom: function () {
|
|
|
let page = this.data.listData[this.data.tabSelected].page;
|
|
|
let page_total = this.data.listData[this.data.tabSelected].page_total;
|
|
|
|
...
|
...
|
@@ -71,7 +71,7 @@ Page({ |
|
|
this.getList(this.data.tabSelected, page, 20, true);
|
|
|
}
|
|
|
},
|
|
|
getUserInfo: function(e) {
|
|
|
getUserInfo: function (e) {
|
|
|
console.log(e);
|
|
|
if (e.detail.errMsg === 'getUserInfo:ok') {
|
|
|
// AccountModel.decodeUserInfo();
|
...
|
...
|
@@ -82,7 +82,7 @@ Page({ |
|
|
hasUserInfo: true
|
|
|
});
|
|
|
},
|
|
|
tabChange: function(e) { // 切换TAB
|
|
|
tabChange: function (e) { // 切换TAB
|
|
|
let index = e.currentTarget.dataset.index;
|
|
|
|
|
|
if (index !== this.data.tabSelected) {
|
...
|
...
|
@@ -104,7 +104,7 @@ Page({ |
|
|
* limit: 每页数量,
|
|
|
* isBottom:是否是到达底部后触发
|
|
|
*/
|
|
|
getList: function(index, page, limit, isBottom) {
|
|
|
getList: function (index, page, limit, isBottom) {
|
|
|
let method = this.data.tabBarArr[index].method;
|
|
|
let that = this;
|
|
|
|
...
|
...
|
@@ -136,20 +136,21 @@ Page({ |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
navigateToDetail: function(e) { // 跳转到详情页
|
|
|
navigateToDetail: function (e) { // 跳转到详情页
|
|
|
console.log(e);
|
|
|
let id = e.currentTarget.dataset.id;
|
|
|
let limitProductCode = e.currentTarget.dataset.code;
|
|
|
|
|
|
if (app.getUid() && app.getUserInfo().wechat) {
|
|
|
router.go('productDetail', { limitProductCode });
|
|
|
router.go('productDetail', {limitProductCode});
|
|
|
} else {
|
|
|
let referer = getCurrentPages()[0].route;
|
|
|
let pages = getCurrentPages();
|
|
|
let referer = pages[pages.length - 1].route;
|
|
|
|
|
|
router.go('userCenter', { referer });
|
|
|
router.go('userCenter', {referer});
|
|
|
}
|
|
|
},
|
|
|
navigateToHome: function(e) { // 跳转到我的限购码
|
|
|
navigateToHome: function (e) { // 跳转到我的限购码
|
|
|
router.go('userCenter');
|
|
|
}
|
|
|
}); |
...
|
...
|
|