From cea34c2e9d434a692424b10f919606dcc9f46638 Mon Sep 17 00:00:00 2001 From: ko1234 Date: Wed, 3 Sep 2025 14:48:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=92=B0=E5=A2=83=E8=AE=8A?= =?UTF-8?q?=E6=95=B8=E8=A8=AD=E5=AE=9A=E4=BB=A5=E6=94=AF=E6=8F=B4=E7=94=9F?= =?UTF-8?q?=E7=94=A2=E6=A8=A1=E5=BC=8F=E7=9A=84API=E7=AB=AF=E9=BB=9E=20|?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E7=A9=BA=E7=9A=84GLSL=E8=91=97=E8=89=B2?= =?UTF-8?q?=E5=99=A8=E6=AA=94=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 1 + public/autodesk/res/shaders/fragment_ubo_decl.glsl | 0 public/autodesk/res/shaders/vertex_ubo_decl.glsl | 0 src/util/request.js | 7 ++++++- 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 public/autodesk/res/shaders/fragment_ubo_decl.glsl create mode 100644 public/autodesk/res/shaders/vertex_ubo_decl.glsl diff --git a/.env.production b/.env.production index 77301b6..329565b 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,4 @@ VITE_API_BASEURL = "http://192.168.1.10:8010" +VITE_API_PORT = "8010" VITE_FILE_API_BASEURL = ".." VITE_FORGE_BASEURL = "http://202.39.218.221:8080/file/netzero" \ No newline at end of file diff --git a/public/autodesk/res/shaders/fragment_ubo_decl.glsl b/public/autodesk/res/shaders/fragment_ubo_decl.glsl new file mode 100644 index 0000000..e69de29 diff --git a/public/autodesk/res/shaders/vertex_ubo_decl.glsl b/public/autodesk/res/shaders/vertex_ubo_decl.glsl new file mode 100644 index 0000000..e69de29 diff --git a/src/util/request.js b/src/util/request.js index 5c8e314..ebe482d 100644 --- a/src/util/request.js +++ b/src/util/request.js @@ -1,6 +1,11 @@ import useGetCookie from "@/hooks/useGetCookie"; import axios from "axios"; -const BASEURL = import.meta.env.VITE_API_BASEURL; +const BASEURL = + import.meta.env.MODE === "production" + ? `${window.location.protocol}//${window.location.hostname}:${ + import.meta.env.VITE_API_PORT + }` + : import.meta.env.VITE_API_BASEURL; const instance = axios.create({ baseURL: BASEURL,