38 lines
852 B
TypeScript
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;
|
|
}
|
|
|
|
} |