Auto Commit

上级 96273188
...@@ -107,6 +107,13 @@ export default { ...@@ -107,6 +107,13 @@ export default {
onmessage: (msg) => { onmessage: (msg) => {
if (msg.data === '[DONE]') { if (msg.data === '[DONE]') {
this.loading = false; this.loading = false;
axios({
method: "post",
url: "https://flask-wujiaping.inscode.cc/addhistory",
data: dialog.text,
}).then((res) => {
console.log(res.data)
});
return; return;
}; };
const data = JSON.parse(msg.data); const data = JSON.parse(msg.data);
...@@ -116,13 +123,6 @@ export default { ...@@ -116,13 +123,6 @@ export default {
if (finish) { if (finish) {
this.loading = false; this.loading = false;
axios({
method: "post",
url: "https://flask-wujiaping.inscode.cc/addhistory",
data: dialog.text,
}).then((res) => {
console.log(res.data)
});
} else if (content) { } else if (content) {
const text = content; const text = content;
dialog.text += text; dialog.text += text;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册