zhongrj
2025-11-24 663ecfd0e9e22d51bc1c77d9aacb36c46d0b88ff
1
2
3
4
5
6
7
8
9
export default function getCookie(name) {
    const value = `; ${document.cookie}`;
    const parts = value.split(`; ${name}=`);
    if (parts.length == 2)
        return parts
            .pop()
            .split(";")
            .shift();
}