Commit 7221b3620daa652468b86a7a5bccf850d64ad7e2
1 parent
cf97cfb6
1
Showing
2 changed files
with
17 additions
and
16 deletions
pages/user/Change_phone/Change_phone.js
| ... | ... | @@ -106,21 +106,23 @@ Page({ |
| 106 | 106 | if (change_phone.length > 1) { |
| 107 | 107 | mobile = change_phone |
| 108 | 108 | } |
| 109 | - getApp().request.put("/api/weshop/users/updateMobile/" + r.stoid + '/' + o.user_id + '/' + code + '/' + mobile, { | |
| 110 | - success: function(res) { | |
| 111 | - if (res.data.code == 0) { | |
| 112 | - getApp().my_warnning("更换成功", 0, th); | |
| 113 | - th.setData({ | |
| 114 | - url: "/pages/user/userinfo/userinfo?change_phone" + change_phone | |
| 115 | - }) | |
| 116 | - } else { | |
| 117 | - getApp().my_warnning(res.data.msg, 0, th); | |
| 118 | - return false; | |
| 119 | - } | |
| 109 | + getApp().request.put("/api/weshop/users/updateMobile/" + r.stoid + '/' + o.user_id + '/' + code + '/' + mobile, { | |
| 110 | + success: function(res) { | |
| 111 | + if (res.data.code == 0) { | |
| 112 | + | |
| 113 | + var url="/pages/user/userinfo/userinfo?change_phone" + change_phone | |
| 114 | + console.log("uuuuuuuu",url); | |
| 115 | + getApp().my_warnning("更换成功", 0, th); | |
| 116 | + getApp().goto(url); | |
| 120 | 117 | |
| 118 | + } else { | |
| 119 | + getApp().my_warnning(res.data.msg, 0, th); | |
| 120 | + return false; | |
| 121 | 121 | } |
| 122 | - }) | |
| 123 | - | |
| 122 | + | |
| 123 | + } | |
| 124 | + }) | |
| 125 | + | |
| 124 | 126 | }, |
| 125 | 127 | //判断验证码是否正确 |
| 126 | 128 | ver_code: function(e) { | ... | ... |
pages/user/Change_phone/Change_phone.wxml
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | <view class="inphone">{{mobile}}</view> |
| 13 | 13 | </block> |
| 14 | 14 | <block wx:else> |
| 15 | - <input bindblur="getphoneValue" class="inphone" placeholder="输入新手机号" type="number" maxlength="11" value="{{change_phone}}"/> | |
| 15 | + <input bindblur="getphoneValue" class="inphone" placeholder="输入新手机号" type="number" maxlength="11" value="{{change_phone}}" /> | |
| 16 | 16 | </block> |
| 17 | 17 | </view> |
| 18 | 18 | |
| ... | ... | @@ -51,10 +51,9 @@ |
| 51 | 51 | <block wx:else> |
| 52 | 52 | <navigator url="{{url}}" class="flex-center lower" bindtap="change_phone"> |
| 53 | 53 | <view>确定更换</view> |
| 54 | - </navigator> | |
| 54 | + </navigator> | |
| 55 | 55 | </block> |
| 56 | 56 | </view> |
| 57 | 57 | |
| 58 | - | |
| 59 | 58 | </view> |
| 60 | 59 | <warn id="warn"></warn> |
| 61 | 60 | \ No newline at end of file | ... | ... |