mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 20:06:47 +08:00
--fix bug
This commit is contained in:
@@ -243,7 +243,8 @@ const setCookie = (name, value, perpetual) => {
|
|||||||
//获取cookie数据
|
//获取cookie数据
|
||||||
//先写一个方法
|
//先写一个方法
|
||||||
export function getCookieForName(name) {
|
export function getCookieForName(name) {
|
||||||
return document.cookie?.split(";").find(e => e.includes(name))?.replace(`${name}=`, '') || ''
|
const cookie = document.cookie?.split(";").find(e => e.includes(name))?.replace(`${name}=`, '') || '';
|
||||||
|
return decodeURIComponent(cookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCookie(name) {
|
function getCookie(name) {
|
||||||
|
|||||||
Reference in New Issue
Block a user