联调
This commit is contained in:
@@ -39,7 +39,8 @@ export const formatToken = (token: string): string => {
|
||||
const LoginFormKey = 'LOGINFORM'
|
||||
|
||||
export type LoginFormType = {
|
||||
tenantName: string
|
||||
tenantId: number
|
||||
appId: number
|
||||
username: string
|
||||
password: string
|
||||
rememberMe: boolean
|
||||
@@ -90,3 +91,30 @@ export const setTenantId = (username: string) => {
|
||||
export const removeTenantId = () => {
|
||||
wsCache.delete(TenantIdKey)
|
||||
}
|
||||
|
||||
const AppIdKey = 'App_ID'
|
||||
const AppNameKey = 'App_NAME'
|
||||
|
||||
export const getAPPName = () => {
|
||||
return wsCache.get(AppNameKey)
|
||||
}
|
||||
|
||||
export const setAppName = (name: string) => {
|
||||
wsCache.set(AppNameKey, name, { exp: 30 * 24 * 60 * 60 })
|
||||
}
|
||||
|
||||
export const removeAppName = () => {
|
||||
wsCache.delete(AppNameKey)
|
||||
}
|
||||
|
||||
export const getAppId = () => {
|
||||
return wsCache.get(AppIdKey)
|
||||
}
|
||||
|
||||
export const setAppId = (id: number) => {
|
||||
wsCache.set(AppIdKey, id)
|
||||
}
|
||||
|
||||
export const removeAppId = () => {
|
||||
wsCache.delete(AppIdKey)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user