更换 接口域名
This commit is contained in:
parent
2140d2b26f
commit
97a86609ff
|
@ -300,10 +300,10 @@ const sendMessage = () => {
|
|||
let messageValue = inputText.value.trim()
|
||||
if (inputText.value.trim()) {
|
||||
messages.push({ id: Date.now(), text: inputText.value, isMe: true, type: 'txt' });
|
||||
http.post('/test/main_serve/', { "text": messageValue }).then((res) => {
|
||||
http.post('/test', { "text": messageValue }).then((res) => {
|
||||
console.log("res", res);
|
||||
// var msg = JSON.parse(res.name)
|
||||
var msg = res.name
|
||||
var msg = res.response
|
||||
messages.push({ id: Date.now() + 1, text: msg, isMe: false, type: 'txt' });
|
||||
scollToButtom()
|
||||
}).catch(error => {
|
||||
|
|
|
@ -11,8 +11,10 @@ export default defineConfig({
|
|||
hmr: true, // 自动热更新
|
||||
proxy: {
|
||||
"/test": {
|
||||
target: "http://192.168.2.86:8003",
|
||||
// target: "http://192.168.2.86:8003",
|
||||
target: "http://aiai.cityme.com.cn/generate",
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/\/test/, ""), //重写真实路径,替换/api
|
||||
},
|
||||
'/srv': {
|
||||
target: 'http://36.140.118.172:88',//沈涛
|
||||
|
|
Loading…
Reference in New Issue