diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js index bf39a1a..6d92c9b 100644 --- a/pages/user/order_list/order_list.js +++ b/pages/user/order_list/order_list.js @@ -76,43 +76,54 @@ Page({ // 搜索内容 searchContent: '', }, - onLoad: function(t) { - self = this; - // 设置日期选择器的结束时间为当前日期 - var now=new Date(); - var nowDate = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate(); - var date = new Date(now.getTime() - 7 * 24 * 3600 * 1000); - var startDate=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); - - - if(t.index && t.tabindex) { - this.setData({ - currentIndex: t.index, - tabIndex: t.tabindex, - }); - this.clickTab(); - }; - - this.setData({ - currentDate: this.currentDate(), - startDate:startDate, - endDate:nowDate, - }); - - - var th = this; - if (t.type != undefined) this.setData({ - activeCategoryId: t.type - }); - s.init(this, "", "orderList"); + onLoad: function (t) { + self = this; + // 设置日期选择器的结束时间为当前日期 + var now = new Date(); + var nowDate = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate(); + var date = new Date(now.getTime() - 7 * 24 * 3600 * 1000); + var startDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); + + + if (t.index && t.tabindex) { + this.setData({ + currentIndex: t.index, + tabIndex: t.tabindex, + }); + this.clickTab(); + } + + this.setData({ + currentDate: this.currentDate(), + startDate: startDate, + endDate: nowDate, + }); + + var th = this; + if (t.type != undefined) this.setData({ + activeCategoryId: t.type + }); + + s.init(this, "", "orderList"); + + if(!getApp().globalData.user_id){ + getApp().goto('/packageE/pages/togoin/togoin'); + } + + }, - onShow: function() { + + onShow: function() { + + if(!getApp().globalData.user_id){ + return false; + } + + var th=this; //---查看会员的等级价--- getApp().getConfig2(function(e) { - - th.setData({conf: e,sales_rules:e.sales_rules }); //--- 看后台是不是有开通等级卡 --- if(e.switch_list){