Refactor API requests and update component imports
This commit is contained in:
@ -1,7 +1,4 @@
|
||||
import type { AppMemberUserInfoRespVO } from "@/api/common/types";
|
||||
export type onRefreshTokenResponse = (
|
||||
data: AxiosResponse | boolean
|
||||
) => { token: string; refreshToken: string } | false;
|
||||
import type { AppMemberUserInfoRespVO } from "~/api/common/types";
|
||||
|
||||
class RefreshToken {
|
||||
static instance: RefreshToken;
|
||||
@ -10,10 +7,10 @@ class RefreshToken {
|
||||
static SOTRAGE_USERID = "kl-userId";
|
||||
static SOTRAGE_USERNAME = "kl-userName";
|
||||
static SOTRAGE_USERINFO = "kl-userInfo";
|
||||
public pending = false;
|
||||
public callbacks: any[] = [];
|
||||
static pending = false;
|
||||
static callbacks: any[] = [];
|
||||
|
||||
protected constructor(config: TRefreshTokenConstructorConfig) {
|
||||
protected constructor(config: any) {
|
||||
RefreshToken.SOTRAGE_REFRESH_TOKEN_KEY = config?.refreshTokenKey || "kl-tk";
|
||||
RefreshToken.SOTRAGE_TOKENKEY = config?.refreshTokenKey || "kl-rfk";
|
||||
RefreshToken.SOTRAGE_USERID = config?.refreshTokenKey || "kl-userId";
|
||||
@ -72,4 +69,5 @@ class RefreshToken {
|
||||
}
|
||||
}
|
||||
|
||||
export default RefreshToken;
|
||||
const REFRESHTOKEN = RefreshToken;
|
||||
export default REFRESHTOKEN;
|
||||
|
||||
Reference in New Issue
Block a user