Commit b92961efb993f939b64be5a41813714249e8690e
1 parent
2fabb17e
绑定会员的bug修复
Showing
4 changed files
with
19 additions
and
10 deletions
pages/getphone/getphone.js
| @@ -121,7 +121,11 @@ Page({ | @@ -121,7 +121,11 @@ Page({ | ||
| 121 | return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; | 121 | return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; | 
| 122 | } | 122 | } | 
| 123 | }); | 123 | }); | 
| 124 | - } | 124 | + }, | 
| 125 | + | ||
| 126 | + cancle_bind: function () { | ||
| 127 | + getApp().goto('/pages/user/index/index'); | ||
| 128 | + } | ||
| 125 | 129 | ||
| 126 | 130 | ||
| 127 | 131 | 
pages/getphone/getphone.wxml
| @@ -4,5 +4,6 @@ | @@ -4,5 +4,6 @@ | ||
| 4 | <view class="title">{{store.store_name}}</view> | 4 | <view class="title">{{store.store_name}}</view> | 
| 5 | <view>{{store.store_desc}}</view> | 5 | <view>{{store.store_desc}}</view> | 
| 6 | <button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getphone">绑定会员</button> | 6 | <button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getphone">绑定会员</button> | 
| 7 | + <text class="btn2" bindtap="cancle_bind">暂不绑定</text> | ||
| 7 | </view> | 8 | </view> | 
| 8 | </view> | 9 | </view> | 
| 9 | \ No newline at end of file | 10 | \ No newline at end of file | 
pages/getphone/getphone.wxss
| @@ -26,6 +26,15 @@ | @@ -26,6 +26,15 @@ | ||
| 26 | background: #fc661f; | 26 | background: #fc661f; | 
| 27 | color:#fff; | 27 | color:#fff; | 
| 28 | font-size: 32rpx; | 28 | font-size: 32rpx; | 
| 29 | - margin-top: 300rpx; | 29 | + margin-top: 100rpx; | 
| 30 | border-radius: 5rpx; | 30 | border-radius: 5rpx; | 
| 31 | +} | ||
| 32 | +.all_page .btn2{ | ||
| 33 | + height: 80rpx; | ||
| 34 | + line-height: 80rpx; | ||
| 35 | + width: 580rpx; | ||
| 36 | + color:#999; | ||
| 37 | + font-size: 32rpx; | ||
| 38 | + border-radius: 5rpx; | ||
| 39 | + margin-top: 10rpx; | ||
| 31 | } | 40 | } | 
| 32 | \ No newline at end of file | 41 | \ No newline at end of file | 
pages/user/index/index.js
| @@ -38,26 +38,21 @@ Page({ | @@ -38,26 +38,21 @@ Page({ | ||
| 38 | * 生命周期函数--监听页面加载 | 38 | * 生命周期函数--监听页面加载 | 
| 39 | */ | 39 | */ | 
| 40 | onLoad: function (options) { | 40 | onLoad: function (options) { | 
| 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 | - getApp().globalData.use_id=0; | ||
| 45 | - //wx.navigateTo({ url: '/pages/getphone/getphone'}) | ||
| 46 | - //return false; | ||
| 47 | - } | 41 | + | 
| 48 | }, | 42 | }, | 
| 49 | 43 | ||
| 50 | /** | 44 | /** | 
| 51 | * 生命周期函数--监听页面显示 | 45 | * 生命周期函数--监听页面显示 | 
| 52 | */ | 46 | */ | 
| 53 | onShow: function () { | 47 | onShow: function () { | 
| 48 | + | ||
| 54 | var stoid = app_d.setting.stoid; | 49 | var stoid = app_d.setting.stoid; | 
| 55 | var s = this,th=s,need_money=0,cur_g_num=0; | 50 | var s = this,th=s,need_money=0,cur_g_num=0; | 
| 56 | getApp().get_isbuy(th.setappdata); | 51 | getApp().get_isbuy(th.setappdata); | 
| 57 | if(getApp().globalData.user_id) getApp().requestCardNum(); | 52 | if(getApp().globalData.user_id) getApp().requestCardNum(); | 
| 58 | /*------会员登录------*/ | 53 | /*------会员登录------*/ | 
| 59 | app.getUserFir(async function(e){ | 54 | app.getUserFir(async function(e){ | 
| 60 | - if(e!=undefined && e!=null){ | 55 | + if(e!=undefined && e!=null && e.mobile){ | 
| 61 | s.setData({ | 56 | s.setData({ | 
| 62 | userInfo: e | 57 | userInfo: e | 
| 63 | }); | 58 | }); | 
