From 6f0813b27ada71cf968c35ea290013feed11bd23 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Fri, 26 May 2023 22:39:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E5=B8=B8=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E7=BB=99=E5=B0=81=E8=A3=85=E4=BA=86=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.ts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) 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, }; },