remove useless code.

pull/40/head
ruibaby 2019-09-03 17:20:50 +08:00
parent ec1a661177
commit 586d3cf318
2 changed files with 0 additions and 16 deletions

View File

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

View File

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