提交 0b469180 编写于 作者: ibizdev's avatar ibizdev

chitanda 发布系统代码 [TrainSys,网页端]

上级 bd13fb45
......@@ -64,6 +64,7 @@ window.onload = function () {
};
var load = function () {
var token = getQueryVariable('token');
var expirein = getQueryVariable('expirein');
if (!token) {
showError('「token」信息获取失败,请稍后重试!');
return;
......@@ -74,6 +75,9 @@ window.onload = function () {
}
clearCookie('access_token', true);
setCookie('access_token', token, 0, true);
const expiredDate =
new Date().getTime() + (expirein || 7199) * 1000;
setCookie('access_token_expires', `${expiredDate}`, 0, true);
window.location.href = ru;
};
var redirectInfoActionEl = document.getElementById('redirect-info-action');
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册