Commit aab01810ea74d3006c063f7cde4d69c7957e4188
1 parent
bf7e7cdc
订单列表
Showing
1 changed file
with
43 additions
and
32 deletions
pages/user/order_list/order_list.js
| ... | ... | @@ -76,43 +76,54 @@ Page({ |
| 76 | 76 | // 搜索内容 |
| 77 | 77 | searchContent: '', |
| 78 | 78 | }, |
| 79 | - onLoad: function(t) { | |
| 80 | - self = this; | |
| 81 | - // 设置日期选择器的结束时间为当前日期 | |
| 82 | - var now=new Date(); | |
| 83 | - var nowDate = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate(); | |
| 84 | - var date = new Date(now.getTime() - 7 * 24 * 3600 * 1000); | |
| 85 | - var startDate=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); | |
| 86 | - | |
| 87 | - | |
| 88 | - if(t.index && t.tabindex) { | |
| 89 | - this.setData({ | |
| 90 | - currentIndex: t.index, | |
| 91 | - tabIndex: t.tabindex, | |
| 92 | - }); | |
| 93 | - this.clickTab(); | |
| 94 | - }; | |
| 95 | - | |
| 96 | - this.setData({ | |
| 97 | - currentDate: this.currentDate(), | |
| 98 | - startDate:startDate, | |
| 99 | - endDate:nowDate, | |
| 100 | - }); | |
| 101 | - | |
| 102 | - | |
| 103 | - var th = this; | |
| 104 | - if (t.type != undefined) this.setData({ | |
| 105 | - activeCategoryId: t.type | |
| 106 | - }); | |
| 107 | - s.init(this, "", "orderList"); | |
| 79 | + onLoad: function (t) { | |
| 80 | + self = this; | |
| 81 | + // 设置日期选择器的结束时间为当前日期 | |
| 82 | + var now = new Date(); | |
| 83 | + var nowDate = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate(); | |
| 84 | + var date = new Date(now.getTime() - 7 * 24 * 3600 * 1000); | |
| 85 | + var startDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); | |
| 86 | + | |
| 87 | + | |
| 88 | + if (t.index && t.tabindex) { | |
| 89 | + this.setData({ | |
| 90 | + currentIndex: t.index, | |
| 91 | + tabIndex: t.tabindex, | |
| 92 | + }); | |
| 93 | + this.clickTab(); | |
| 94 | + } | |
| 95 | + | |
| 96 | + this.setData({ | |
| 97 | + currentDate: this.currentDate(), | |
| 98 | + startDate: startDate, | |
| 99 | + endDate: nowDate, | |
| 100 | + }); | |
| 101 | + | |
| 102 | + var th = this; | |
| 103 | + if (t.type != undefined) this.setData({ | |
| 104 | + activeCategoryId: t.type | |
| 105 | + }); | |
| 106 | + | |
| 107 | + s.init(this, "", "orderList"); | |
| 108 | + | |
| 109 | + if(!getApp().globalData.user_id){ | |
| 110 | + getApp().goto('/packageE/pages/togoin/togoin'); | |
| 111 | + } | |
| 112 | + | |
| 113 | + | |
| 108 | 114 | }, |
| 109 | - onShow: function() { | |
| 115 | + | |
| 116 | + onShow: function() { | |
| 117 | + | |
| 118 | + if(!getApp().globalData.user_id){ | |
| 119 | + return false; | |
| 120 | + } | |
| 121 | + | |
| 122 | + | |
| 110 | 123 | var th=this; |
| 111 | 124 | //---查看会员的等级价--- |
| 112 | 125 | getApp().getConfig2(function(e) { |
| 113 | 126 | |
| 114 | - | |
| 115 | - | |
| 116 | 127 | th.setData({conf: e,sales_rules:e.sales_rules }); |
| 117 | 128 | //--- 看后台是不是有开通等级卡 --- |
| 118 | 129 | if(e.switch_list){ | ... | ... |