登录token存储修改

This commit is contained in:
fan 2019-10-25 18:30:23 +08:00
parent 73e9c995c2
commit 78f9d58321
2 changed files with 8 additions and 3 deletions

View File

@ -98,7 +98,7 @@ import QrcodeVue from 'qrcode.vue';
import { getLoginWmurl, checkLoginStatus } from '@/api/login';
import { LoginParams } from '@/utils/login';
import bgImg from '@/assets/bg1.jpg';
import { setToken } from '@/utils/auth';
import { setToken, setDesignToken } from '@/utils/auth';
import { loginTitle } from '@/scripts/ConstDic';
import { removeToken, removeDesignToken} from '@/utils/auth';
import LangStorage from '@/utils/lang';
@ -238,7 +238,12 @@ export default {
this.clearTimer(this.checkLogin);
this.checkLogin = setTimeout(() => {
checkLoginStatus(self.sessionId).then(response => {
setToken(response.data.token);
if (this.project === 'design') {
setDesignToken(response.data.token);
} else {
setToken(response.data.token);
}
//
self.$store.dispatch('QrLoginSetting', { key: 'SET_TOKEN', value: response.data.token }).then(() => {
//

View File

@ -136,7 +136,7 @@ export default {
},
data() {
return {
isNotUser:true,
isNotUser: true,
classA: -1,
classB: -1,
tempClassA: -1,