服务器地址修改 #175

Merged
hnu202326010221 merged 1 commits from develop into main 2 months ago

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

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

@ -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) => {

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

Loading…
Cancel
Save