diff --git a/packageC/pages/group_list/group_list.js b/packageC/pages/group_list/group_list.js index 358019d..d2738a0 100644 --- a/packageC/pages/group_list/group_list.js +++ b/packageC/pages/group_list/group_list.js @@ -64,47 +64,44 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - getApp().check_can_share(); - if(app.globalData.userInfo) { - if(!this.data.isLogin) { - this.setData({ - userInfo: app.globalData.userInfo, - imghost: app.globalData.setting.imghost, - isLogin: true, - }); - - let typeVal = this.data.type; - let url = '/api/weshop/goods/groupBuy/page'; - let data = { - store_id: app.globalData.setting.stoid, - is_show: 1, - is_end: 0, - timetype: typeVal - }; - - this.setData({ - list: [], - pageNum: 1, - noMore: false, - }); - - this.getData(true, url, data).then(function() { - self.setData({ - currentData: data, - }); - }); - - this.data.is_timer = 1; + getApp().check_can_share(this); + + var user=app.globalData.userInfo; + this.setData({ + userInfo: user, + imghost: app.globalData.setting.imghost, + isLogin: true, + }); + let typeVal = this.data.type; + let url = '/api/weshop/goods/groupBuy/page'; + let data = { + store_id: app.globalData.setting.stoid, + is_show: 1, + is_end: 0, + timetype: typeVal }; - + + this.setData({ + list: [], + pageNum: 1, + noMore: false, + }); + + this.getData(true, url, data).then(function() { + self.setData({ + currentData: data, + }); + }); + this.data.is_timer = 1; + //设置全局定时器 clearInterval(this.data.timer); this.data.timer = setInterval(function () { self.countDown(); }, 1000); - }; + }, diff --git a/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js b/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js index c90b7be..b554f17 100644 --- a/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js +++ b/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js @@ -31,19 +31,21 @@ Page({ }) }; - app.isLogin().then(function(data) { - self.setData({ - userInfo: data, - }); - }); + // app.isLogin().then(function(data) { + // self.setData({ + // userInfo: data, + // }); + // }); }, onShow: function() { getApp().check_can_share(); - if(app.globalData.userInfo) { - if(!this.data.isLogin) { + // if(app.globalData.userInfo) { + // if(!this.data.isLogin) { + + var user=app.globalData.userInfo; this.setData({ - userInfo: app.globalData.userInfo, + userInfo:user , imghost: app.globalData.setting.imghost, isLogin: true, }); @@ -71,8 +73,8 @@ Page({ }); - }; - }; + // }; + // }; }, diff --git a/packageC/pages/presell/list/list.js b/packageC/pages/presell/list/list.js index fb80789..e3caccd 100644 --- a/packageC/pages/presell/list/list.js +++ b/packageC/pages/presell/list/list.js @@ -82,16 +82,19 @@ Page({ }, onShow: function (t) { - var userInfo=getApp().globalData.userInfo; - if(userInfo && this.data.goodlist.length==0){ - //调用列表 - this.get_list(); - }else{ - if(getApp().globalData.pre_back==1){ - getApp().globalData.pre_back=0; - getApp().goto("/pages/index/index/index"); - } - } + // var userInfo=getApp().globalData.userInfo; + // if(userInfo && this.data.goodlist.length==0){ + // //调用列表 + // this.get_list(); + // }else{ + // if(getApp().globalData.pre_back==1){ + // getApp().globalData.pre_back=0; + // getApp().goto("/pages/index/index/index"); + // } + // } + + this.get_list(); + }, //---小于10的格式化函数---- timeFormat(param) {