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,
|
color: state => state.app.color,
|
||||||
token: state => state.user.token,
|
token: state => state.user.token,
|
||||||
user: state => state.user.user,
|
user: state => state.user.user,
|
||||||
avatar: state => state.user.avatar,
|
|
||||||
nickname: state => state.user.name,
|
|
||||||
addRouters: state => state.permission.addRouters,
|
addRouters: state => state.permission.addRouters,
|
||||||
apiUrl: state => {
|
apiUrl: state => {
|
||||||
if (state.app.apiUrl) {
|
if (state.app.apiUrl) {
|
||||||
|
|
|
@ -9,9 +9,6 @@ import userApi from '@/api/user'
|
||||||
const user = {
|
const user = {
|
||||||
state: {
|
state: {
|
||||||
token: null,
|
token: null,
|
||||||
name: '',
|
|
||||||
avatar: '',
|
|
||||||
info: {},
|
|
||||||
user: {}
|
user: {}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
@ -19,17 +16,6 @@ const user = {
|
||||||
Vue.ls.set(ACCESS_TOKEN, token)
|
Vue.ls.set(ACCESS_TOKEN, token)
|
||||||
state.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 => {
|
CLEAR_TOKEN: state => {
|
||||||
Vue.ls.remove(ACCESS_TOKEN)
|
Vue.ls.remove(ACCESS_TOKEN)
|
||||||
state.token = null
|
state.token = null
|
||||||
|
|
Loading…
Reference in New Issue