فهرست منبع

优化AI销售参谋跳转高销额页面

zhujindu 1 سال پیش
والد
کامیت
51a607fee6
1فایلهای تغییر یافته به همراه20 افزوده شده و 15 حذف شده
  1. 20 15
      src/views/intelligence/index.vue

+ 20 - 15
src/views/intelligence/index.vue

@@ -615,27 +615,32 @@ export default {
       }
       let loading1 = this.$toast.loading({
         duration: 0,
-        message: '发送中...',
+        message: '加载中',
         forbidClick: true,
+        loadingType: 'spinner',
       });
       this.btnclik = false;
-      // 发送的文本内容添加到对象,减少重新获取接口
+      let submitContent = this.content;
+      this.content = '';
+      // 发送的文本内容添加到对象
       this.Ggreet.push({
-        chatRecordText: this.content,
+        chatRecordText: submitContent,
         chatRecordFrom: 1,
       });
-      aiDialogue({ type: 1, content: this.content }).then((response) => {
-        loading1.clear();
-        this.btnclik = true;
-        if (response.code == 200) {
-          this.content = '';
-          // this.pageNum = 1;
-          // this.Ggreet = [];
-          this.Ggreet.push(...response.rows);
-          // this.aiDialogueGgreet();
-          this.garbageManager();
-        }
-      });
+      aiDialogue({ type: 1, content: submitContent })
+        .then((response) => {
+          loading1.clear();
+          this.btnclik = true;
+          if (response.code == 200) {
+            this.Ggreet.push(...response.rows);
+            this.garbageManager();
+          } else {
+            this.$toast(response.msg);
+          }
+        })
+        .catch((err) => {
+          this.$toast(response.msg);
+        });
     },
     touchstart() {
       // 按下录音震动效果,iOS 不支持