|
@@ -1,5 +1,5 @@
|
|
|
import { login, loginUp, getInfo } from '@/api/login'
|
|
|
-import { getToken, setToken, removeToken, setUserId, TokenKey, setLogId, removeLogId } from '@/utils/auth'
|
|
|
+import { getToken, setToken, removeToken, setUserId, TokenKey, setLogId, removeLogId, setUserName } from '@/utils/auth'
|
|
|
import { resetRouter } from '@/router'
|
|
|
import { wsSocketClose } from '@/utils/socket'
|
|
|
const getDefaultState = () => {
|
|
@@ -65,6 +65,7 @@ const actions = {
|
|
|
setToken('FirstLogin', returnData.FirstLogin);
|
|
|
setLogId(returnData.LogId)
|
|
|
setUserId(returnData.UserId)
|
|
|
+ setUserName(returnData.UserName)
|
|
|
let nowDate = new Date();
|
|
|
let oldDate = new Date(returnData.ValidTime);
|
|
|
let diffTime = oldDate - nowDate;
|