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',