|
@@ -1,6 +1,6 @@
|
|
|
import { login, loginUp, getInfo } from '@/api/login'
|
|
|
-import { getToken, setToken, removeToken, setUserId } from '@/utils/auth'
|
|
|
-
|
|
|
+import { getToken, setToken, removeToken, setUserId, TokenKey } from '@/utils/auth'
|
|
|
+import { resetRouter } from '@/router'
|
|
|
const getDefaultState = () => {
|
|
|
return {
|
|
|
token: getToken(),
|
|
@@ -53,7 +53,7 @@ const actions = {
|
|
|
commit('SET_UserType', returnData.UserType)
|
|
|
commit('SET_UserId', returnData.UserId)
|
|
|
sessionStorage.setItem("userName", userInfo.LoginName);
|
|
|
- setToken(returnData.Token)
|
|
|
+ setToken(TokenKey, returnData.Token)
|
|
|
setUserId(returnData.UserId)
|
|
|
let nowDate = new Date();
|
|
|
let oldDate = new Date(returnData.ValidTime);
|
|
@@ -73,7 +73,7 @@ const actions = {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
|
let data = {
|
|
|
- roles: state.UserType,
|
|
|
+ roles: state.userPoewrList,
|
|
|
introduction: '',
|
|
|
avatar: '',
|
|
|
name: sessionStorage.getItem("userName"),
|