Commit eea49b42d681dd255b134b16769812ac5d961134
1 parent
37300d8d
获取头像昵称的由阿胡
Showing
2 changed files
with
19 additions
and
12 deletions
packageE/pages/user/nick_avatar/nick_avatar.js
... | ... | @@ -55,6 +55,8 @@ Page({ |
55 | 55 | |
56 | 56 | save_data() { |
57 | 57 | |
58 | + var that=this; | |
59 | + | |
58 | 60 | if (!this.data.ob.head_pic) { |
59 | 61 | wx.showToast({ |
60 | 62 | title: '请选择头像', |
... | ... | @@ -87,17 +89,22 @@ Page({ |
87 | 89 | |
88 | 90 | }, |
89 | 91 | success: function (su) { |
90 | - wx.hideLoading(); | |
91 | - if (su.data.code == 0) { | |
92 | - wx.navigateBack({delta: 1}) | |
93 | - }else{ | |
94 | - this.setData({load: 0}) | |
95 | - wx.showToast({ | |
96 | - title: su.data.msg, | |
97 | - icon: 'none', | |
98 | - duration: 2000 | |
99 | - }); | |
100 | - } | |
92 | + | |
93 | + setTimeout(()=>{ | |
94 | + wx.hideLoading(); | |
95 | + if (su.data.code == 0) { | |
96 | + wx.navigateBack({delta: 1}) | |
97 | + }else{ | |
98 | + that.setData({load: 0}) | |
99 | + wx.showToast({ | |
100 | + title: su.data.msg, | |
101 | + icon: 'none', | |
102 | + duration: 2000 | |
103 | + }); | |
104 | + } | |
105 | + },1000) | |
106 | + | |
107 | + | |
101 | 108 | } |
102 | 109 | }); |
103 | 110 | } | ... | ... |