|
@@ -8,6 +8,7 @@ const user = {
|
|
token: '',
|
|
token: '',
|
|
name: '',
|
|
name: '',
|
|
salesChannelName: '',
|
|
salesChannelName: '',
|
|
|
|
+ mustChangePwd: null,
|
|
welcome: '',
|
|
welcome: '',
|
|
avatar: '',
|
|
avatar: '',
|
|
roles: { permissionList: [] },
|
|
roles: { permissionList: [] },
|
|
@@ -27,6 +28,9 @@ const user = {
|
|
SET_CHANNELNAME: (state, name) => {
|
|
SET_CHANNELNAME: (state, name) => {
|
|
state.salesChannelName = name
|
|
state.salesChannelName = name
|
|
},
|
|
},
|
|
|
|
+ SET_MUSTCHANGEPWD: (state, status) => {
|
|
|
|
+ state.mustChangePwd = status
|
|
|
|
+ },
|
|
SET_AVATAR: (state, avatar) => {
|
|
SET_AVATAR: (state, avatar) => {
|
|
state.avatar = avatar
|
|
state.avatar = avatar
|
|
},
|
|
},
|
|
@@ -53,6 +57,7 @@ const user = {
|
|
commit('SET_TOKEN', res.access_token)
|
|
commit('SET_TOKEN', res.access_token)
|
|
commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
|
|
commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
|
|
commit('SET_CHANNELNAME', users.extInfo.channel.salesChannelName)
|
|
commit('SET_CHANNELNAME', users.extInfo.channel.salesChannelName)
|
|
|
|
+ commit('SET_MUSTCHANGEPWD', users.mustChangePwd)
|
|
Vue.ls.set('rolesAccess', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
|
|
Vue.ls.set('rolesAccess', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
|
|
commit('SET_AVATAR', res.avatar ? res.avatar : '')
|
|
commit('SET_AVATAR', res.avatar ? res.avatar : '')
|
|
// 记住密码
|
|
// 记住密码
|
|
@@ -94,6 +99,7 @@ const user = {
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
commit('SET_NAME', { name: '', welcome: '' })
|
|
commit('SET_NAME', { name: '', welcome: '' })
|
|
commit('SET_CHANNELNAME', '')
|
|
commit('SET_CHANNELNAME', '')
|
|
|
|
+ commit('SET_MUSTCHANGEPWD', '')
|
|
commit('SET_AVATAR', '')
|
|
commit('SET_AVATAR', '')
|
|
commit('SET_TOKEN', '')
|
|
commit('SET_TOKEN', '')
|
|
commit('SET_ROLES', { permissionList: [] })
|
|
commit('SET_ROLES', { permissionList: [] })
|