This commit is contained in:
liuyalei 2024-03-06 15:33:32 +08:00
parent 668b7a835f
commit 1f3619e5be
2 changed files with 4 additions and 4 deletions

View File

@ -300,7 +300,7 @@ const sendMessage = () => {
let messageValue = inputText.value.trim() let messageValue = inputText.value.trim()
if (inputText.value.trim()) { if (inputText.value.trim()) {
messages.push({ id: Date.now(), text: inputText.value, isMe: true, type: 'txt' }); messages.push({ id: Date.now(), text: inputText.value, isMe: true, type: 'txt' });
http.post('/test', { "text": messageValue }).then((res) => { http.post('/generate', { "text": messageValue }).then((res) => {
console.log("res", res); console.log("res", res);
// var msg = JSON.parse(res.name) // var msg = JSON.parse(res.name)
var msg = res.response var msg = res.response

View File

@ -10,11 +10,11 @@ export default defineConfig({
host: "0.0.0.0", // ← 新增内容 ← host: "0.0.0.0", // ← 新增内容 ←
hmr: true, // 自动热更新 hmr: true, // 自动热更新
proxy: { proxy: {
"/test": { "/generate": {
// target: "http://192.168.2.86:8003", // target: "http://192.168.2.86:8003",
target: "http://aiai.cityme.com.cn/generate", target: "https://aiai.cityme.com.cn",
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/\/test/, ""), //重写真实路径,替换/api // rewrite: (path) => path.replace(/\/test/, ""), //重写真实路径,替换/api
}, },
'/srv': { '/srv': {
target: 'http://36.140.118.172:88',//沈涛 target: 'http://36.140.118.172:88',//沈涛