Authored by htoooth

Merge branch 'develop' of http://git.yoho.cn/fe/yoho-limited-sell-miniapp into develop

... ... @@ -19,19 +19,22 @@ Page({
icon: '../../static/images/limit/icon_rmfs_n@3x.png',
iconSelected: '../../static/images/limit/icon_rmfs_p@3x.png',
name: '热门发售',
method: 'app.limitProduct.hotLimitProduct'
method: 'app.limitProduct.hotLimitProduct',
reportName: 'home_hot'
},
{
icon: '../../static/images/limit/icon_jjfs_n@3x.png',
iconSelected: '../../static/images/limit/icon_jjfs_p@3x.png',
name: '即将发售',
method: 'app.limitProduct.soonToSaleLimitProduct'
method: 'app.limitProduct.soonToSaleLimitProduct',
reportName: 'home_soon'
},
{
icon: '../../static/images/limit/icon_yjfs_n@3x.png',
iconSelected: '../../static/images/limit/icon_yjfs_p@3x.png',
name: '已经发售',
method: 'app.limitProduct.alreadySaleLimitProduct'
method: 'app.limitProduct.alreadySaleLimitProduct',
reportName: 'home_already'
}
],
listData: [
... ... @@ -53,13 +56,19 @@ Page({
// this.getList(0, 1, 20, false);
},
onShow: function() {
yas.pageOpenReport();
let pageName = this.data.tabBarArr[this.data.tabSelected].reportName;
yas.pageOpenReport('', { PAGE_NAME: pageName });
},
onPullDownRefresh: function() {
this.setData({
refreshText: '加载中...'
});
let pageName = this.data.tabBarArr[this.data.tabSelected].reportName;
yas.pageOpenReport('', { PAGE_NAME: pageName });
this.getList(this.data.tabSelected, 1, 20, false).then(() => {
wx.stopPullDownRefresh();
this.setData({
... ... @@ -83,6 +92,9 @@ Page({
this.setData({
tabSelected: index
});
let pageName = this.data.tabBarArr[this.data.tabSelected].reportName;
yas.pageOpenReport('', { PAGE_NAME: pageName });
// 如果listData没有数据,或者数据为空,则调用接口
if (!this.data.listData[index].limitProductVoList || this.data.listData[index].limitProductVoList.length === 0) {
... ...
... ... @@ -38,8 +38,7 @@
{
"id": 0,
"name": "首页入口",
"pathName": "pages/index/index",
"query": "from=开发调试"
"pathName": "pages/index/index"
},
{
"id": -1,
... ...