shaogen1995 1 年之前
父节点
当前提交
59bbcde6a4
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      code/src/utils/history.ts

+ 4 - 3
code/src/utils/history.ts

@@ -28,8 +28,9 @@ export const isMobileFu = () => {
 };
 
 // 当前环境是测试环境还是生产环境
-export const isEnvUrl =
-  process.env.NODE_ENV === "development" ? "https://sit-kpbwg.4dage.com" : "";
+const isProduction = process.env.NODE_ENV === "development";
+
+export const isEnvUrl = isProduction ? "https://sit-kpbwg.4dage.com" : "";
 
 // 模型加载的地址
-export const modelUrl = process.env.NODE_ENV === "development" ? "/" : "/web/";
+export const modelUrl = isProduction ? "/" : "/web/";