mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-06 09:51:00 +00:00
Password message (#2702)
* [Update] 密码信封 * [Update] 查看密码 * [Update] 支持查看密码 * [Update] 修改语言翻译 * [Update] 迁移ansible到2.8版本 * [Update] 修改auth book的可连接性 * [Update] 删除不使用的方法
This commit is contained in:
@@ -715,9 +715,12 @@ String.prototype.format = function(args) {
|
||||
return result;
|
||||
};
|
||||
|
||||
function setCookie(key, value) {
|
||||
function setCookie(key, value, time) {
|
||||
var expires = new Date();
|
||||
expires.setTime(expires.getTime() + (24 * 60 * 60 * 1000));
|
||||
if (!time) {
|
||||
time = expires.getTime() + (24 * 60 * 60 * 1000);
|
||||
}
|
||||
expires.setTime(time);
|
||||
document.cookie = key + '=' + value + ';expires=' + expires.toUTCString() + ';path=/';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user