Commit 04f7321d authored by 邓晓峰's avatar 邓晓峰

修复token存储问题

parent fb5a4a41
Pipeline #33978 skipped with stages
...@@ -506,9 +506,9 @@ class Login { ...@@ -506,9 +506,9 @@ class Login {
cacheBust: true, cacheBust: true,
}) })
.then(response => { .then(response => {
console.log('sceen wx', response);
if (response.token) { if (response.token) {
self.globalConfig.token = response.token; self.globalConfig.token = response.token;
Cookies.set('token', response.token);
self.updateConfig && self.updateConfig(this.globalConfig); self.updateConfig && self.updateConfig(this.globalConfig);
self.isSignIn = true; self.isSignIn = true;
self.getUserInfoAndConfig(); self.getUserInfoAndConfig();
...@@ -595,8 +595,8 @@ class Login { ...@@ -595,8 +595,8 @@ class Login {
} }
getUserInfoAndConfig(failCallback, flag, industry) { getUserInfoAndConfig(failCallback, flag, industry) {
// const { token } = this.globalConfig; const { token: tk } = this.globalConfig;
const token = Cookies.get('token'); const token = tk || Cookies.get('token')
const site = Cookies.get('site'); const site = Cookies.get('site');
const self = this; const self = this;
/* eslint-disable */ /* eslint-disable */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment