gemercheung 9 月之前
父節點
當前提交
b1b5f66436
共有 3 個文件被更改,包括 6 次插入6 次删除
  1. 3 3
      .env.production
  2. 1 1
      src/request/state.ts
  3. 2 2
      vite.config.ts

+ 3 - 3
.env.production

@@ -1,4 +1,4 @@
 VITE_QJ_URL=https://4dkankan.com/panorama
-VITE_LASER_URL=https://laser.4dkankan.com/4pc
-VITE_API=https://sp.4dkankan.com/
-VITE_4DKK_URL=https://www.4dkankan.com/
+VITE_LASER_URL=http://192.168.9.27/laser
+VITE_API=http://192.168.9.27/
+VITE_4DKK_URL=http://192.168.9.27/swkk

+ 1 - 1
src/request/state.ts

@@ -8,4 +8,4 @@ export const gParams: Param = {};
 
 export const errorHook: ((code: number, msg: string) => void)[] = [];
 export const lifeHook: { start: () => void; end: () => void }[] = [];
-export const basePath = "/api";
+export const basePath = "";

+ 2 - 2
vite.config.ts

@@ -39,11 +39,11 @@ export default ({ mode }: any) =>
           changeOrigin: true,
           rewrite: (path) => path.replace(/^\/gear1/, "/gear1"),
         },
-        "/api": {
+        "/relics": {
           target: loadEnv(mode, process.cwd()).VITE_API,
           // target: `http://192.168.0.11:8324/relics/`,
           changeOrigin: true,
-          rewrite: (path) => path.replace(/^\/api/, ""),
+          rewrite: (path) => path.replace(/^\/relics/, "/relics"),
         },
         // "/api": {
         //   target: `https://uat-sp.4dkankan.com/`,