diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index d7a2d0c7..0729c32b 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -32,6 +32,36 @@ export const useUserStore = defineStore( return cookie.value[key] || ""; } + function getCookieGroup1 (): TGApp.BBS.Constant.CookieGroup1 { + return { + login_ticket: getCookieItem("login_ticket"), + login_uid: getCookieItem("login_uid"), + }; + } + + function getCookieGroup2 (): TGApp.BBS.Constant.CookieGroup2 { + return { + account_id: getCookieItem("account_id"), + cookie_token: getCookieItem("cookie_token"), + }; + } + + function getCookieGroup3 (): TGApp.BBS.Constant.CookieGroup3 { + return { + ltoken: getCookieItem("ltoken"), + ltuid: getCookieItem("ltuid"), + }; + } + + function getCookieGroup4 (): TGApp.BBS.Constant.CookieGroup4 { + return { + account_id: getCookieItem("account_id"), + cookie_token: getCookieItem("cookie_token"), + ltoken: getCookieItem("ltoken"), + ltuid: getCookieItem("ltuid"), + }; + } + function initCookie (ck: Record): void { if (cookie.value !== ck) { cookie.value = ck; @@ -43,6 +73,10 @@ export const useUserStore = defineStore( getBriefInfo, setBriefInfo, getCookieItem, + getCookieGroup1, + getCookieGroup2, + getCookieGroup3, + getCookieGroup4, initCookie, }; },