From eea49b42d681dd255b134b16769812ac5d961134 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Tue, 29 Nov 2022 14:20:58 +0800 Subject: [PATCH] 获取头像昵称的由阿胡 --- packageE/pages/user/nick_avatar/nick_avatar.js | 29 ++++++++++++++++++----------- packageE/pages/user/nick_avatar/nick_avatar.wxss | 2 +- 2 files changed, 19 insertions(+), 12 deletions(-) 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 -- libgit2 0.21.4