diff --git a/packageE/pages/user/nick_avatar/nick_avatar.js b/packageE/pages/user/nick_avatar/nick_avatar.js index 0c9d9da..21d314b 100644 --- a/packageE/pages/user/nick_avatar/nick_avatar.js +++ b/packageE/pages/user/nick_avatar/nick_avatar.js @@ -55,6 +55,8 @@ Page({ save_data() { + var that=this; + if (!this.data.ob.head_pic) { wx.showToast({ title: '请选择头像', @@ -87,17 +89,22 @@ Page({ }, success: function (su) { - wx.hideLoading(); - if (su.data.code == 0) { - wx.navigateBack({delta: 1}) - }else{ - this.setData({load: 0}) - wx.showToast({ - title: su.data.msg, - icon: 'none', - duration: 2000 - }); - } + + setTimeout(()=>{ + wx.hideLoading(); + if (su.data.code == 0) { + wx.navigateBack({delta: 1}) + }else{ + that.setData({load: 0}) + wx.showToast({ + title: su.data.msg, + icon: 'none', + duration: 2000 + }); + } + },1000) + + } }); } diff --git a/packageE/pages/user/nick_avatar/nick_avatar.wxss b/packageE/pages/user/nick_avatar/nick_avatar.wxss index 7808fc6..9c614b1 100644 --- a/packageE/pages/user/nick_avatar/nick_avatar.wxss +++ b/packageE/pages/user/nick_avatar/nick_avatar.wxss @@ -26,5 +26,5 @@ } .load{ - background-color:#ea3993 !important; + background-color:#eee !important; } \ No newline at end of file