Commit 7221b3620daa652468b86a7a5bccf850d64ad7e2

Authored by iceling
1 parent cf97cfb6

1

pages/user/Change_phone/Change_phone.js
@@ -106,21 +106,23 @@ Page({ @@ -106,21 +106,23 @@ Page({
106 if (change_phone.length > 1) { 106 if (change_phone.length > 1) {
107 mobile = change_phone 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 ver_code: function(e) { 128 ver_code: function(e) {
pages/user/Change_phone/Change_phone.wxml
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <view class="inphone">{{mobile}}</view> 12 <view class="inphone">{{mobile}}</view>
13 </block> 13 </block>
14 <block wx:else> 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 </block> 16 </block>
17 </view> 17 </view>
18 18
@@ -51,10 +51,9 @@ @@ -51,10 +51,9 @@
51 <block wx:else> 51 <block wx:else>
52 <navigator url="{{url}}" class="flex-center lower" bindtap="change_phone"> 52 <navigator url="{{url}}" class="flex-center lower" bindtap="change_phone">
53 <view>确定更换</view> 53 <view>确定更换</view>
54 - </navigator> 54 + </navigator>
55 </block> 55 </block>
56 </view> 56 </view>
57 57
58 -  
59 </view> 58 </view>
60 <warn id="warn"></warn> 59 <warn id="warn"></warn>
61 \ No newline at end of file 60 \ No newline at end of file