From d88bafdded92f41caa5ecfa4053e71008f84ce1a Mon Sep 17 00:00:00 2001 From: ZLY Date: Tue, 4 Nov 2025 15:33:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(env):=20=E6=B7=BB=E5=8A=A0code-server?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=9C=B0=E5=9D=80=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 3 +++ src/pages/componentDevelopment/componentCoding/index.tsx | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 9522659..41e7780 100644 --- a/.env +++ b/.env @@ -1,6 +1,9 @@ # API基础URL NEXT_PUBLIC_API_BASE_URL=/ +# code-server服务地址 +NEXT_PUBLIC_DEV_CODE_SERVER_HOST='http://192.168.5.119:8443' + # 开发服务器主机地址 129穿透 #NEXT_PUBLIC_DEV_SERVER_HOST=https://p29.ngsk.tech:7001 diff --git a/src/pages/componentDevelopment/componentCoding/index.tsx b/src/pages/componentDevelopment/componentCoding/index.tsx index e501927..7309ad9 100644 --- a/src/pages/componentDevelopment/componentCoding/index.tsx +++ b/src/pages/componentDevelopment/componentCoding/index.tsx @@ -10,12 +10,10 @@ const ComponentCoding = () => { useEffect(() => { - const uri = process.env.NEXT_PUBLIC_DEV_SERVER_HOST; - // const uri = 'http://api.myserver.com:4121'; - const codeServerPrefix = '/code-server'; + const uri = process.env.NEXT_PUBLIC_DEV_CODE_SERVER_HOST; const codeServerFolderPre = '/app/data'; const tempData = '/000000/admin_testcode1/master'; - setServerUrl(`${uri}${codeServerPrefix}?folder=${codeServerFolderPre}${tempData}`); + setServerUrl(`${uri}?folder=${codeServerFolderPre}${tempData}`); });