mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
-- bug
This commit is contained in:
@@ -236,7 +236,7 @@ const setCookie = (name, value, perpetual) => {
|
||||
console.log('存储token到cookie')
|
||||
let exdate = new Date()
|
||||
exdate.setDate(perpetual * 24 * 60 * 60 * 1000) //exdate.setDate(exdate.getDate() + 365)
|
||||
document.cookie = name + '=' + value + ';expires=' + exdate.toGMTString()
|
||||
document.cookie = `${name}=${value};expires=${exdate.toGMTString()};path=/`
|
||||
//永久有效
|
||||
//document.cookie = name + '=' + value + ';expires=' + 'Fri, 31 Dec 9999 23:59:59 GMT'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user