diff --git a/package.json b/package.json index 0d3b325..b59bc8d 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "core-js": "^3.8.3", "dayjs": "^1.9.5", "dvcp-wui": "^1.0.1", + "echarts": "^5.5.0", "flyio": "^0.6.2", "query-string": "^7.1.1", "regenerator-runtime": "^0.12.1", diff --git a/src/project/baiduAI/AppDialogue/AppDialogue.vue b/src/project/baiduAI/AppDialogue/AppDialogue.vue index 3f2d475..a8f948b 100644 --- a/src/project/baiduAI/AppDialogue/AppDialogue.vue +++ b/src/project/baiduAI/AppDialogue/AppDialogue.vue @@ -103,9 +103,7 @@ export default { ...mapState(['user', 'token']), }, onLoad() { - if(this.token) { - this.getHistoryList() - } + this.getHistoryList() recorderManager.onStop((res)=> { this.upLoad(res.tempFilePath) }); @@ -187,6 +185,9 @@ export default { }) }, sendMsg() { + if(!this.token) { + return this.$u.toast("请在'个人中心'登录") + } this.$loading() this.$instance.post("/app/appaicopilotinfo/add", {content: this.content, appType: 0, areaId: this.areaId}).then(res => { if(res.code == 0) { @@ -204,6 +205,9 @@ export default { }) }, sendVoice() { + if(!this.token) { + return this.$u.toast("请在'个人中心'登录") + } this.$loading() this.$instance.post("/app/appaicopilotinfo/add", {sdkFileUrl: this.voiceUrl, fileId: this.voiceId, appType: 0}).then(res => { if(res.code == 0) { @@ -225,6 +229,9 @@ export default { }) }, getHistoryList() { + if(!this.token) { + return this.$u.toast("请在'个人中心'登录") + } this.$loading() this.$instance.post(`/app/appaicopilotinfo/list?current=${this.current}&size=10`).then(res => { if(res.code == 0 && res.data.records.length) {