Auto Commit

上级 2db8e1e5
...@@ -106,7 +106,6 @@ export default { ...@@ -106,7 +106,6 @@ export default {
}, },
onmessage: (msg) => { onmessage: (msg) => {
if (msg.data === '[DONE]') { if (msg.data === '[DONE]') {
this.loading = false;
axios({ axios({
method: "post", method: "post",
url: "https://flask-wujiaping.inscode.cc/addhistory", url: "https://flask-wujiaping.inscode.cc/addhistory",
...@@ -114,6 +113,7 @@ export default { ...@@ -114,6 +113,7 @@ export default {
}).then((res) => { }).then((res) => {
console.log(res.data) console.log(res.data)
}); });
this.loading = false;
return; return;
}; };
const data = JSON.parse(msg.data); const data = JSON.parse(msg.data);
...@@ -129,18 +129,8 @@ export default { ...@@ -129,18 +129,8 @@ export default {
} }
}, },
onclose() { onclose() {
axios({
method: "post",
url: "https://flask-wujiaping.inscode.cc/addhistory",
data: dialog.text,
}).then((res) => {
console.log(res.data)
});
console.log("close"); console.log("close");
that.sendLoading = false; },
abortController.abort();
eventSource.close();
},
onerror: (err) => { onerror: (err) => {
console.log("error", err); console.log("error", err);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册