From fb08c18524c50c4f94462eda262bd45fac52820c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=80=9D=E6=85=A7?= <2768350566@qq.com> Date: Mon, 5 Jan 2026 10:47:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wx_app/pages/chat/chat.js | 8 ++++---- src/wx_app/pages/family/family.js | 4 ++-- src/wx_app/pages/family/invite/invite.js | 2 +- src/wx_app/pages/history/family-members.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wx_app/pages/chat/chat.js b/src/wx_app/pages/chat/chat.js index 7e9c18c..f8de8a3 100644 --- a/src/wx_app/pages/chat/chat.js +++ b/src/wx_app/pages/chat/chat.js @@ -134,7 +134,7 @@ Page({ // 从后端加载历史对话记录 wx.request({ - url: 'http://localhost:8080/api/chat/history/' + userId, + url: 'http://1.92.111.107/api/chat/history/' + userId, method: 'GET', header: { 'content-type': 'application/json' @@ -419,7 +419,7 @@ Page({ const userId = userInfo.id || 1; wx.request({ - url: 'http://localhost:8080/api/chat/ask', + url: 'http://1.92.111.107/api/chat/ask', method: 'POST', timeout: 30000, // 设置30秒超时 header: { @@ -712,7 +712,7 @@ Page({ const userId = userInfo.id || 1; wx.request({ - url: `http://localhost:8080/api/chat/search/${userId}?keyword=${encodeURIComponent(keyword)}`, + url: `http://1.92.111.107/api/chat/search/${userId}?keyword=${encodeURIComponent(keyword)}`, method: 'GET', header: { 'content-type': 'application/json' @@ -778,7 +778,7 @@ Page({ const userId = userInfo.id || 1; wx.request({ - url: `http://localhost:8080/api/chat/history/${userId}`, + url: `http://1.92.111.107/api/chat/history/${userId}`, method: 'DELETE', header: { 'content-type': 'application/json' diff --git a/src/wx_app/pages/family/family.js b/src/wx_app/pages/family/family.js index 9e7f579..6aaec2b 100755 --- a/src/wx_app/pages/family/family.js +++ b/src/wx_app/pages/family/family.js @@ -1,5 +1,5 @@ // ==================== API 请求方法 ==================== -const BASE_URL = 'http://localhost:8080'; +const BASE_URL = 'http://1.92.111.107'; const request = (options) => { return new Promise((resolve, reject) => { @@ -702,7 +702,7 @@ Page({ const message = `您已被移出家庭:${familyName}`; wx.request({ - url: 'http://localhost:8080/api/messages/send-text', + url: 'http://1.92.111.107/api/messages/send-text', method: 'POST', header: { 'Content-Type': 'application/json', diff --git a/src/wx_app/pages/family/invite/invite.js b/src/wx_app/pages/family/invite/invite.js index ed2705e..270a4ca 100644 --- a/src/wx_app/pages/family/invite/invite.js +++ b/src/wx_app/pages/family/invite/invite.js @@ -1,5 +1,5 @@ // ==================== API 请求方法 ==================== -const BASE_URL = 'http://localhost:8080'; +const BASE_URL = 'http://1.92.111.107'; const request = (options) => { return new Promise((resolve, reject) => { diff --git a/src/wx_app/pages/history/family-members.js b/src/wx_app/pages/history/family-members.js index 1eacb1b..cb2ff5a 100644 --- a/src/wx_app/pages/history/family-members.js +++ b/src/wx_app/pages/history/family-members.js @@ -22,7 +22,7 @@ Page({ if (userInfo && userInfo.avatar_url) { let avatar = userInfo.avatar_url; if (avatar.startsWith('/uploads/')) { - avatar = 'http://localhost:8080' + avatar; + avatar = 'http://1.92.111.107' + avatar; } this.setData({currentUserAvatar: avatar}); } @@ -55,7 +55,7 @@ Page({ return new Promise((resolve, reject) => { wx.request({ - url: `http://localhost:8080/api/family/user/list?userId=${userId}`, + url: `http://1.92.111.107/api/family/user/list?userId=${userId}`, method: 'GET', header: { 'Content-Type': 'application/json', -- 2.34.1