🎨 接口数据结构变更
This commit is contained in:
parent
0773daca0b
commit
77ec373863
@ -101,15 +101,15 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let auth = {
|
let auth = {
|
||||||
accessToken: res.user.token,
|
accessToken: res.token,
|
||||||
idUser: res.user.idUser,
|
idUser: res.idUser,
|
||||||
role: res.user.weights
|
role: res.weights
|
||||||
}
|
}
|
||||||
|
|
||||||
let user = {
|
let user = {
|
||||||
nickname: res.user.nickname,
|
nickname: res.nickname,
|
||||||
avatarURL: res.user.avatarUrl,
|
avatarURL: res.avatarUrl || 'https://static.rymcu.com/article/1578475481946.png',
|
||||||
account: res.user.account
|
account: res.account
|
||||||
}
|
}
|
||||||
_ts.$store.commit('setAuth', auth) // mutating to store for client rendering
|
_ts.$store.commit('setAuth', auth) // mutating to store for client rendering
|
||||||
localStorage.setItem('user', JSON.stringify(user))
|
localStorage.setItem('user', JSON.stringify(user))
|
||||||
|
@ -76,7 +76,7 @@ export const actions = {
|
|||||||
|
|
||||||
// 清空数据
|
// 清空数据
|
||||||
// isRestart && commit('updateListData', getDefaultListData())
|
// isRestart && commit('updateListData', getDefaultListData())
|
||||||
commit('updateListData', getDefaultListData())
|
// commit('updateListData', getDefaultListData())
|
||||||
commit('updateListFetching', true)
|
commit('updateListFetching', true)
|
||||||
|
|
||||||
return this.$axios
|
return this.$axios
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import {DASHBOARD_API_PATH} from "@/store/dashboard";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created on 2022/3/14 13:54.
|
* Created on 2022/3/14 13:54.
|
||||||
* @author ronger
|
* @author ronger
|
||||||
|
Loading…
Reference in New Issue
Block a user