Commit dcd7c347ae6465c30acd869822e605d136e363af
1 parent
e12c56a3
判断手机号是否有绑定,否则要先绑定会员!
Showing
3 changed files
with
23 additions
and
11 deletions
pages/user/cardinfo/cardinfo.js
@@ -40,18 +40,22 @@ Page({ | @@ -40,18 +40,22 @@ Page({ | ||
40 | user_card: null,//会员买的卡 | 40 | user_card: null,//会员买的卡 |
41 | free:null,//分佣的数据 | 41 | free:null,//分佣的数据 |
42 | expiryDate:"",//卡到期时间 | 42 | expiryDate:"",//卡到期时间 |
43 | - is_guoqi:0, //卡是不是过期 | 43 | + is_guoqi:0, //卡是不是过期 |
44 | 44 | ||
45 | - yu_e_show:0,//装入余额的弹窗 | 45 | + yu_e_show:0,//装入余额的弹窗 |
46 | }, | 46 | }, |
47 | 47 | ||
48 | - | ||
49 | - | ||
50 | - | ||
51 | /** | 48 | /** |
52 | * 生命周期函数--监听页面加载 | 49 | * 生命周期函数--监听页面加载 |
53 | */ | 50 | */ |
54 | onLoad: function (options) { | 51 | onLoad: function (options) { |
52 | + //--先判断会员状态-- | ||
53 | + var user_info = getApp().globalData.userInfo; | ||
54 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
55 | + wx.navigateTo({ url: '/pages/getphone/getphone' }) | ||
56 | + return false; | ||
57 | + } | ||
58 | + | ||
55 | var that = this,ee=this; | 59 | var that = this,ee=this; |
56 | var th=this; | 60 | var th=this; |
57 | //-----------等级卡说明------------------- | 61 | //-----------等级卡说明------------------- |
pages/user/index/index.js
@@ -38,8 +38,14 @@ Page({ | @@ -38,8 +38,14 @@ Page({ | ||
38 | * 生命周期函数--监听页面加载 | 38 | * 生命周期函数--监听页面加载 |
39 | */ | 39 | */ |
40 | onLoad: function (options) { | 40 | onLoad: function (options) { |
41 | - | 41 | + //--先判断会员状态-- |
42 | + var user_info = getApp().globalData.userInfo; | ||
43 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
44 | + wx.navigateTo({ url: '/pages/getphone/getphone'}) | ||
45 | + return false; | ||
46 | + } | ||
42 | }, | 47 | }, |
48 | + | ||
43 | /** | 49 | /** |
44 | * 生命周期函数--监听页面显示 | 50 | * 生命周期函数--监听页面显示 |
45 | */ | 51 | */ |
@@ -140,7 +146,6 @@ Page({ | @@ -140,7 +146,6 @@ Page({ | ||
140 | } | 146 | } |
141 | }) | 147 | }) |
142 | 148 | ||
143 | - | ||
144 | //--会员权益中心页的修改-- | 149 | //--会员权益中心页的修改-- |
145 | for(var i in backClass){ | 150 | for(var i in backClass){ |
146 | var im=backClass[i]; | 151 | var im=backClass[i]; |
pages/user/plus/plus.js
@@ -58,7 +58,7 @@ Page({ | @@ -58,7 +58,7 @@ Page({ | ||
58 | } | 58 | } |
59 | }) | 59 | }) |
60 | var fir_leader = options.scene; | 60 | var fir_leader = options.scene; |
61 | - that.setData({fir_leader:fir_leader}) | 61 | + if (fir_leader) that.setData({fir_leader:fir_leader}) |
62 | //--先判断会员状态-- | 62 | //--先判断会员状态-- |
63 | var user_info = getApp().globalData.userInfo; | 63 | var user_info = getApp().globalData.userInfo; |
64 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | 64 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
@@ -199,9 +199,12 @@ Page({ | @@ -199,9 +199,12 @@ Page({ | ||
199 | th.setData({ | 199 | th.setData({ |
200 | is_plusCard: plusCard, is_show: 1 | 200 | is_plusCard: plusCard, is_show: 1 |
201 | }) | 201 | }) |
202 | - var goods_list = th.selectComponent("#goods_list"); //组件的id | ||
203 | - goods_list.init(); | ||
204 | - goods_list.get_list(); | 202 | + |
203 | + setTimeout(function(){ | ||
204 | + var goods_list = th.selectComponent("#goods_list"); //组件的id | ||
205 | + goods_list.init(); | ||
206 | + goods_list.get_list(); | ||
207 | + },1000) | ||
205 | 208 | ||
206 | }) | 209 | }) |
207 | }, | 210 | }, |