feat: 服务接口地址动态获取

This commit is contained in:
duanshuwen
2025-11-13 19:43:03 +08:00
parent 48932e3851
commit 1028e20d42
14 changed files with 44 additions and 55 deletions

View File

@@ -1,5 +1,5 @@
import { BASE_URL } from "@/request/base/baseUrl";
import { goLogin } from "@/hooks/useGoLogin";
import { useAppStore } from "@/store";
/// 请求流式数据的API
const API = "/agent/assistant/chat";
@@ -93,8 +93,9 @@ const agentChatStream = (params, onChunk) => {
};
// #ifdef MP-WEIXIN
const { serverConfig } = useAppStore();
requestTask = uni.request({
url: BASE_URL + API, // 替换为你的接口地址
url: serverConfig.baseUrl + API, // 替换为你的接口地址
method: "POST",
data: params,
enableChunked: true,