🎨 接口数据结构变更

This commit is contained in:
ronger 2022-08-17 09:49:12 +08:00
parent 0773daca0b
commit 77ec373863
3 changed files with 7 additions and 9 deletions

View File

@ -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))

View File

@ -76,7 +76,7 @@ export const actions = {
// 清空数据
// isRestart && commit('updateListData', getDefaultListData())
commit('updateListData', getDefaultListData())
// commit('updateListData', getDefaultListData())
commit('updateListFetching', true)
return this.$axios

View File

@ -1,5 +1,3 @@
import {DASHBOARD_API_PATH} from "@/store/dashboard";
/**
* Created on 2022/3/14 13:54.
* @author ronger