From b44c7ce33597eba31ead0ab6d805fcad8e8c23c6 Mon Sep 17 00:00:00 2001 From: Zeeland <287017217@qq.com> Date: Tue, 1 Nov 2022 03:23:13 +0800 Subject: [PATCH] :fix: can not render avatar normally. --- pages/user/settings/avatar.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/user/settings/avatar.vue b/pages/user/settings/avatar.vue index cc39215..41a6d64 100644 --- a/pages/user/settings/avatar.vue +++ b/pages/user/settings/avatar.vue @@ -158,9 +158,9 @@ export default { if (res.message) { _ts.$message.error(res.message); } else { - _ts.$set(_ts, 'user', res.user); - _ts.$set(_ts, 'avatarUrl', res.user.avatarUrl); - _ts.$refs.cropper.replace(res.user.avatarUrl); + _ts.$set(_ts, 'user', res); + _ts.$set(_ts, 'avatarUrl', res.avatarUrl); + _ts.$refs.cropper.replace(res.avatarUrl); // _ts.webImageToBase64(res.user.avatarUrl); } } @@ -192,9 +192,9 @@ export default { if (res.message) { _ts.$message.error(res.message); } else { - _ts.$set(_ts, 'user', res.user); - _ts.$set(_ts, 'avatarUrl', res.user.avatarUrl); - _ts.$store.commit('setUserInfo', res.user); + _ts.$set(_ts, 'user', res); + _ts.$set(_ts, 'avatarUrl', res.avatarUrl); + _ts.$store.commit('setUserInfo', res); _ts.$message.success('更新成功 !'); } }