mirror of https://github.com/halo-dev/halo-admin
remove useless code.
parent
ec1a661177
commit
586d3cf318
|
@ -4,8 +4,6 @@ const getters = {
|
|||
color: state => state.app.color,
|
||||
token: state => state.user.token,
|
||||
user: state => state.user.user,
|
||||
avatar: state => state.user.avatar,
|
||||
nickname: state => state.user.name,
|
||||
addRouters: state => state.permission.addRouters,
|
||||
apiUrl: state => {
|
||||
if (state.app.apiUrl) {
|
||||
|
|
|
@ -9,9 +9,6 @@ import userApi from '@/api/user'
|
|||
const user = {
|
||||
state: {
|
||||
token: null,
|
||||
name: '',
|
||||
avatar: '',
|
||||
info: {},
|
||||
user: {}
|
||||
},
|
||||
mutations: {
|
||||
|
@ -19,17 +16,6 @@ const user = {
|
|||
Vue.ls.set(ACCESS_TOKEN, token)
|
||||
state.token = token
|
||||
},
|
||||
SET_NAME: (state, {
|
||||
name
|
||||
}) => {
|
||||
state.name = name
|
||||
},
|
||||
SET_AVATAR: (state, avatar) => {
|
||||
state.avatar = avatar
|
||||
},
|
||||
SET_INFO: (state, info) => {
|
||||
state.info = info
|
||||
},
|
||||
CLEAR_TOKEN: state => {
|
||||
Vue.ls.remove(ACCESS_TOKEN)
|
||||
state.token = null
|
||||
|
|
Loading…
Reference in New Issue