From 794dc3cdf483a7ace3c3004ef96f29231f6b9f40 Mon Sep 17 00:00:00 2001 From: x ronger Date: Sun, 2 Aug 2020 19:40:28 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E8=AE=BE=E7=BD=AE->=E8=B5=84?= =?UTF-8?q?=E6=96=99=E4=B8=8E=E8=B4=A6=E5=8F=B7=E5=8A=9F=E8=83=BD=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/user/settings/account.vue | 2 +- store/index.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/user/settings/account.vue b/pages/user/settings/account.vue index ca5868c..07a34d4 100644 --- a/pages/user/settings/account.vue +++ b/pages/user/settings/account.vue @@ -195,7 +195,7 @@ _ts.$set(_ts, 'user', res.user); _ts.$set(_ts, 'avatarUrl', res.user.avatarUrl); _ts.$set(_ts, 'svgShow', false); - // _ts.$store.commit('setUserInfo', res.user); + _ts.$store.commit('setUserInfo', res.user); _ts.$message.success('更新成功 !'); } } diff --git a/store/index.js b/store/index.js index bb1dc4a..09886e5 100644 --- a/store/index.js +++ b/store/index.js @@ -18,6 +18,10 @@ export const mutations = { }, setUploadHeaders(state, data){ state.uploadHeaders = data + }, + setUserInfo(state, data) { + state.oauth.avatarURL = data.avatarUrl; + state.oauth.nickname = data.nickname; } }