diff --git a/src/views/App.vue b/src/views/App.vue index fbe2f4262f4d9faa9b858777da328ee880e8753a..37ec5017273317928fff80095281238257865076 100644 --- a/src/views/App.vue +++ b/src/views/App.vue @@ -125,14 +125,13 @@ export default { console.log("error", err); } }); - - axios({ - method: "post", - url: "https://flask-wujiaping.inscode.cc/addhistory", - data: this.dialogs, - }).then((res) => { - console.log(res.data) - }); + fetch("https://flask-wujiaping.inscode.cc/addhistory", { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(data) + }).then((res) => console.log(res.data) ) }, handleNewChat() { this.dialogs = [];