From 2ed66d8500208dcfce5f436c22166cbcb980341f Mon Sep 17 00:00:00 2001 From: Peanut Date: Wed, 29 Apr 2026 19:55:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(mini-program):=20=E4=BF=AE=E5=A4=8D=20WebSo?= =?UTF-8?q?cket=20URL=20=E9=85=8D=E7=BD=AE=EF=BC=8C=E9=80=9A=E8=BF=87=20Ng?= =?UTF-8?q?inx=20=E4=BB=A3=E7=90=86=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将开发环境 WebSocket URL 从直接连接后端端口 19089 改为通过 Nginx 代理的 wss://lifescript.happylifeos.com/ws 路径。 原因:后端 19089 端口是 HTTP,不支持 WSS 连接。小程序通过 Nginx 的 /ws 代理路径访问,由 Nginx 处理 SSL 终止和 WebSocket 升级,再转发到后端 19089 端口。 Co-Authored-By: Claude Opus 4.7 --- mini-program/.env.development | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mini-program/.env.development b/mini-program/.env.development index 309f951..568c201 100644 --- a/mini-program/.env.development +++ b/mini-program/.env.development @@ -1,5 +1,5 @@ # 开发环境配置(本地开发调试) VITE_APP_ENV=dev -VITE_API_BASE_URL=http://101.200.208.45:19089/api -VITE_WS_URL=ws://101.200.208.45:19089 +VITE_API_BASE_URL=https://lifescript.happylifeos.com/api +VITE_WS_URL=wss://lifescript.happylifeos.com/ws VITE_DEBUG=true