tmp save
This commit is contained in:
parent
6778c5e8de
commit
b610456879
|
@ -318,7 +318,7 @@ let modelnum = ref('')
|
|||
const changetype = (num) => {
|
||||
modelnum.value = num
|
||||
if (num == 1) {
|
||||
pathname.value = '/test'
|
||||
pathname.value = '/main_serve'
|
||||
} else {
|
||||
pathname.value = '/generate'
|
||||
}
|
||||
|
@ -338,6 +338,13 @@ const sendMessage = () => {
|
|||
console.log("模型", pathname.value);
|
||||
http.post(pathname.value, { "text": messageValue }).then((res) => {
|
||||
// var msg = JSON.parse(res.name)
|
||||
// let evsrc = new EventSource("https://aiai.cityme.com.cn/main_serve");
|
||||
// let eventSource = new EventSource("/main_serve", { contentType: "application/json;charset=utf-8" });
|
||||
// let eventSource = new EventSource("/main_serve" );
|
||||
// console.log("Event", eventSource);
|
||||
// eventSource.onmessage = function (event) {
|
||||
// console.log("Received event: " + event.data);
|
||||
// };
|
||||
var msg = res.response
|
||||
messages.push({ id: Date.now() + 1, text: msg, isMe: false, type: 'txt' });
|
||||
messages.map((vv, ii) => {
|
||||
|
|
|
@ -19,11 +19,11 @@ export default defineConfig({
|
|||
changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/\/test/, ""), //重写真实路径,替换/api
|
||||
},
|
||||
"^/test": {
|
||||
// target: "http://192.168.2.86:8003/",
|
||||
target: "https://yx.cityme.com.cn/",
|
||||
"^/main_serve": {
|
||||
target: "https://aiai.cityme.com.cn/",
|
||||
// target: "https://yx.cityme.com.cn/",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/test/, '/test/main_serve/')
|
||||
// rewrite: path => path.replace(/^\/main_serve/, '/main_serve/')
|
||||
},
|
||||
|
||||
'/srv': {
|
||||
|
|
Loading…
Reference in New Issue