🎨 接口数据结构变更
This commit is contained in:
parent
0773daca0b
commit
77ec373863
@ -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))
|
||||
|
@ -76,7 +76,7 @@ export const actions = {
|
||||
|
||||
// 清空数据
|
||||
// isRestart && commit('updateListData', getDefaultListData())
|
||||
commit('updateListData', getDefaultListData())
|
||||
// commit('updateListData', getDefaultListData())
|
||||
commit('updateListFetching', true)
|
||||
|
||||
return this.$axios
|
||||
|
@ -1,5 +1,3 @@
|
||||
import {DASHBOARD_API_PATH} from "@/store/dashboard";
|
||||
|
||||
/**
|
||||
* Created on 2022/3/14 13:54.
|
||||
* @author ronger
|
||||
|
Loading…
Reference in New Issue
Block a user