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

View File

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