From 77ec3738632bb0b6708b7eb86776dd27852f17f4 Mon Sep 17 00:00:00 2001 From: ronger Date: Wed, 17 Aug 2022 09:49:12 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login.vue | 12 ++++++------ store/comment.js | 2 +- store/open-data.js | 2 -- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pages/login.vue b/pages/login.vue index e2937c7..76d2073 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -101,15 +101,15 @@ export default { return false; } let auth = { - accessToken: res.user.token, - idUser: res.user.idUser, - role: res.user.weights + accessToken: res.token, + idUser: res.idUser, + role: res.weights } let user = { - nickname: res.user.nickname, - avatarURL: res.user.avatarUrl, - account: res.user.account + nickname: res.nickname, + avatarURL: res.avatarUrl || 'https://static.rymcu.com/article/1578475481946.png', + account: res.account } _ts.$store.commit('setAuth', auth) // mutating to store for client rendering localStorage.setItem('user', JSON.stringify(user)) diff --git a/store/comment.js b/store/comment.js index 74f935d..8474c2c 100644 --- a/store/comment.js +++ b/store/comment.js @@ -76,7 +76,7 @@ export const actions = { // 清空数据 // isRestart && commit('updateListData', getDefaultListData()) - commit('updateListData', getDefaultListData()) + // commit('updateListData', getDefaultListData()) commit('updateListFetching', true) return this.$axios diff --git a/store/open-data.js b/store/open-data.js index ecdeb9a..2d168f2 100644 --- a/store/open-data.js +++ b/store/open-data.js @@ -1,5 +1,3 @@ -import {DASHBOARD_API_PATH} from "@/store/dashboard"; - /** * Created on 2022/3/14 13:54. * @author ronger