From ff25271eba1f7f957cf41dd5bb750643ee93e001 Mon Sep 17 00:00:00 2001
From: hailu <962012470@qq.com>
Date: 星期五, 08 十一月 2024 10:35:08 +0800
Subject: [PATCH] 备份

---
 src/view/largeModel/gpt.vue |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/view/largeModel/gpt.vue b/src/view/largeModel/gpt.vue
index 7477b82..463110a 100644
--- a/src/view/largeModel/gpt.vue
+++ b/src/view/largeModel/gpt.vue
@@ -5,8 +5,6 @@
                 <Option v-for="item in GPTLIst" :value="item.value" :key="item.value">{{ item.label }}</Option>
             </Select>
         </div>
-
-
         <!-- <img src="" alt=""> -->
         <!-- <div style="border-top: 1px solid #ececec;padding-top: 10px;"> -->
         <!-- <div class="clearfix">
@@ -258,7 +256,7 @@
 
         },
         clearAll() {
-            let that = thisng
+            let that = this
             that.$Modal.confirm({
                 title: "纭娓呯┖",
                 content: "纭娓呯┖鍚楋紵姝ゆ搷浣滀笉鍙仮澶嶏紒",
@@ -321,7 +319,6 @@
             }).catch(err => {
 
             })
-
         },
         /**
          * 鎻愪氦
@@ -329,18 +326,20 @@
         submit() {
             this.loading = true
             if (this.inputText) {
-                this.messages.push({ sender: 'user', text: this.inputText, avatar: require('../../assets/images/gptUser.png'), timestamp: this.getNowTime() });
+                let inputText = this.inputText
+                this.inputText = ''
+                this.messages.push({ sender: 'user', text: inputText, avatar: require('../../assets/images/gptUser.png'), timestamp: this.getNowTime() });
                 axios.request({
                     url: '/EventKg/GetChatGPT',
                     method: 'post',
                     data: {
-                        keyword: this.inputText
+                        keyword: inputText
                     },
                 }).then(res => {
                     if (res.data.Check == true) {
                         let text = JSON.parse(res.data.Data.Info).choices[0].message.content
                         text = text.replace(/\n/g, '<br>');
-                        this.inputText = ''
+                        inputText = ''
                         this.messages.push({ sender: 'ai', text: text, avatar: require('../../assets/images/rrlogo.png'), timestamp: this.getNowTime() });
                         this.getChat()
                         this.loading = false

--
Gitblit v1.8.0