chore:提取公共常量
This commit is contained in:
1 parent
97eb387436
commit
88e5660b29
8 files changed
+41
-19
No files matched your search
@@ -4,6 +4,7 @@ import { isEmpty } from "radash"
|
||||
import { getAppInfo, isDevEnv } from "@@/utils/app"
|
||||
import { userApi } from "../api"
|
||||
import showVerifyDeviceImpModel from "../components/verifyDeviceImpModel/verifyDeviceImpModel"
|
||||
import { APPENV } from "../constant"
|
||||
|
||||
const TOKEN_KEY = constant.storageConstant.TOKEN
|
||||
const USER_INFO_KEY = constant.storageConstant.USERINFO
|
||||
@@ -210,9 +211,9 @@ async function refreshToken(): Promise<any> {
|
||||
const autoLogin = async (): Promise<boolean> => {
|
||||
const appInfo = await getAppInfo()
|
||||
// 浙政钉环境
|
||||
if (appInfo == "zzd") return await loginByZzd()
|
||||
if (appInfo == APPENV.ZZD) return await loginByZzd()
|
||||
// 诗画环境
|
||||
if (appInfo == "sh") return await loginBySh()
|
||||
if (appInfo == APPENV.SH) return await loginBySh()
|
||||
|
||||
uni.showToast({ title: "app环境错误", icon: "none" })
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user