Files
Kg.SeaTime/Web/src/composables/StateHelper.ts
Putoo 2037d1e577 11
2026-05-18 18:12:21 +08:00

38 lines
852 B
TypeScript

export class StateHelper {
private static get userStore() {
return useUserStore()
}
static get Sid() {
const userStoret = useUserStore();
return userStoret.sid;
}
static get Token() {
return this.userStore.token;
}
static get refToken() {
return this.userStore.refToken;
}
static get userId() {
return this.userStore.userId;
}
static SetToken(userId: string, token: string, refToken: string) {
this.userStore.setToken(userId, token, refToken);
}
static SetSid(sid: string) {
this.userStore.setSid(sid);
}
static OffOnline() {
this.userStore.offOnline();
}
static get IsAccLogin() {
return this.userStore.isLoginAccount;
}
static get IsLogin() {
return this.userStore.isLogin;
}
}