diff --git a/pages/index/index.js b/pages/index/index.js index 6971623..2ff1d82 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -99,8 +99,8 @@ Page({ this.setData({ landInfo: {otherType: 10, picUrl: '/assets/popup/send-member.png'} }) } else { hasGetMemberInfo().then(result => { - if (!result.data && !this.data.landInfo) { - if(app.globalData.userInfo.isVIP){ + if (!result.data && !result.data.hasGetMember &&!this.data.landInfo) { + if(result.data.type === 1){ this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/eighty-member.png'} }) } else { this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/serve-member.png'} }) diff --git a/pages/mall/search-list/index.js b/pages/mall/search-list/index.js index b3852e7..a0c29aa 100644 --- a/pages/mall/search-list/index.js +++ b/pages/mall/search-list/index.js @@ -21,7 +21,7 @@ Page({ pageSize: 10, pageNum: 1 }, - loading: true, + loading: false, requesting: false, finished: false, taskList: [] @@ -30,10 +30,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - var searchString = storage.get('mall-search') - if(!util.isEmpty(searchString)){ - this.setData({rearchStringList: searchString.split(',').slice(0, 24)}) - } if(options.tab) { this.data.tabIndex = Number(options.tab) } @@ -41,6 +37,10 @@ Page({ min.setHours(0, 0, 0) this.data.form.date = util.formatDate(min, 'Y-M-D') this.setData({height: app.globalData.fragmentHeight - 100, tabIndex: this.data.tabIndex}) + var searchString = storage.get('mall-search') + if(!util.isEmpty(searchString)){ + this.setData({rearchStringList: searchString.split(',').slice(0, 24)}) + } }, clearHistory: function(){ var that = this @@ -93,13 +93,13 @@ Page({ return } if (this.data.loading) { - this.data.requesting = true + this.setData({ loading: true }) } else { this.setData({ requesting: true }) } if(this.data.tabIndex == 0){ getFactoryPrice(this.data.form).then(result => { - if (result.data.records.length) { + if (result.data && result.data.records.length) { this.handRespList(result.data) } else { this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) @@ -110,7 +110,7 @@ Page({ }) } else if(this.data.tabIndex == 1){ getInformationList(this.data.form).then(result => { - if (result.data.records.length) { + if (result.data && result.data.records.length) { this.handRespList(result.data) } else { this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) @@ -121,7 +121,7 @@ Page({ }) } else if(this.data.tabIndex == 2){ getProxyOrderList(this.data.form).then(result => { - if (result.data.records.length) { + if (result.data && result.data.records.length) { this.handRespList(result.data) } else { this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) @@ -132,7 +132,7 @@ Page({ }) } else if(this.data.tabIndex == 3){ getPreferList(this.data.form).then(result => { - if (result.data.records.length) { + if (result.data && result.data.records.length) { this.handRespList(result.data) } else { this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex })