Commit da358af7 authored by 杨思琦's avatar 杨思琦

切换站点保存密码修改

parent f5f49ce9
Pipeline #88545 passed with stages
...@@ -292,10 +292,10 @@ class Site { ...@@ -292,10 +292,10 @@ class Site {
const date = new Date(); const date = new Date();
date.setTime(date.getTime() + 24 * 60 * 60 * 1000); date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
// date = date.toGMTString(); // date = date.toGMTString();
Cookies.set('token', token, { // Cookies.set('token', token, {
expires: date, // expires: date,
path: '/', // path: '/',
}); // });
localStorage.setItem('access_token', accessToken); localStorage.setItem('access_token', accessToken);
......
...@@ -196,7 +196,12 @@ class Login { ...@@ -196,7 +196,12 @@ class Login {
this.loginFailed = false; this.loginFailed = false;
this.guid = Math.round(Math.random() * 10000 + Date.now()).toString(16); this.guid = Math.round(Math.random() * 10000 + Date.now()).toString(16);
this.redirect_state = Cookies.get('redirect_state'); this.redirect_state = Cookies.get('redirect_state');
const token = this.globalConfig.initToken || Cookies.get('token') || params.getParams('token'); const token =
this.globalConfig.initToken ||
Cookies.get('token') ||
params.getParams('token') ||
this.globalConfig.token ||
null;
const noTokenSite = site ?? null; const noTokenSite = site ?? null;
let { ddCode } = this.globalConfig; let { ddCode } = this.globalConfig;
let { loginName } = this.globalConfig; let { loginName } = this.globalConfig;
......
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