zhongrj
2025-11-25 b0e015d4fbae51c63e975f79ff9b8472f3ef0f10
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();
}