# Conflicts:
#	.env
This commit is contained in:
dzc committed 2025-02-19 15:20:08 +08:00
commit 2ed84d9c09
2 files changed
+7 -4

No files matched your search

+6 -4
View File
@@ -2,9 +2,7 @@
import { reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import { filePath } from "@@/utils/file"
import { hooks, router, constant } from "@@/index"
import { merchantApi, userApi, walletApi } from "@@/api"
import isDevEnv from "@/sheep/utils/isDevEnv"
@@ -25,7 +23,6 @@ const DEFAULT_SERVICES: ServiceItem[] = [
{ text: "人脸管理", icon: "/static/icon/service_5.png", router: "/pages/human-face/list" },
]
// 状态管理
const state = reactive<any>({
wallet: [],
userInfo: {},
@@ -66,8 +63,13 @@ const checkAppInfo = async () => {
const zhengdingResult = await loginMethods.zhengdingLogin()
if (zhengdingResult) return
const tokenKey = constant.storageConstant.TOKEN
const userInfoKey = constant.storageConstant.USERINFO
const tokenStorage = uni.getStorageSync(tokenKey)
const userStorage = uni.getStorageSync(userInfoKey)
// 开发环境下跳转到测试登录页
if (isDevEnv()) {
if ((isDevEnv() && isEmpty(tokenStorage)) || isEmpty(userStorage)) {
router.jump("/pages/test/login")
}
} catch (error) {
+1
View File
@@ -1 +1,2 @@
export default () => import.meta.env.VITE_DEV_ENV === "dev"
// export default () => process.env.NODE_ENV === "development"