mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
优化 Cookie 存储类型;更新登录状态判断逻辑;添加 Tauri 环境判断以支持版本更新处理
This commit is contained in:
@@ -13,7 +13,7 @@ export const isLoggedIn = computed<boolean>(() => {
|
||||
});
|
||||
|
||||
const { message } = createDiscreteApi(['message']);
|
||||
export const cookie = useLocalStorage('Cookie', {cookie: '', refreshDate: 0}, { serializer: StorageSerializers.object });
|
||||
export const cookie = useLocalStorage<{ cookie: string; refreshDate: number }>('Cookie', {cookie: '', refreshDate: 0}, { serializer: StorageSerializers.object });
|
||||
|
||||
export async function GetSelfAccount(token?: string) {
|
||||
if (cookie.value.cookie || token) {
|
||||
|
||||
Reference in New Issue
Block a user