This commit is contained in:
jiangyinzhi
2025-01-16 16:21:23 +08:00
parent 7f7ff91a5e
commit 561624a90c
17 changed files with 54 additions and 368 deletions
+7 -4
View File
@@ -6,7 +6,9 @@ const tokenKey = 'stk',
uidKey = 'suid',
userTypeKey = 'sut',
duidKey = 'sduid',
sak = 'saikey'
sak = 'saikey',
useridKey= 'userId',
username= 'username'
const getValueByKey = key => {
return sessionStorage.getItem(key) ? sessionStorage.getItem(key) : ''
}
@@ -15,8 +17,8 @@ const getDefaultState = () => ({
token: getValueByKey(tokenKey),
ai: getValueByKey(sak),
platform: getValueByKey(platformKey),
userid: '',
username: '',
userid: getValueByKey(useridKey),
username: getValueByKey(username),
realname: '',
mobile: '',
uno: '', //0500024691
@@ -85,6 +87,7 @@ const mutations = {
},
SET_USER_NAME: (state, username) => {
state.username = username
sessionStorage.setItem('username', username)
},
SET_REALNAME: (state, realname) => {
state.realname = realname
@@ -152,7 +155,7 @@ const actions = {
getUserInfo({ commit }) {
console.log(this);
return new Promise((resolve) => {
getUserInfo().then(res => {
getUserInfo({t: new Date().getTime()}).then(res => {
// if (res.code == vm.$StatusCode.SUCCESS) {
if(res.code == 0) {
console.log(res);