From bc4ab46fb5c4cb4435efabfe4b316be4ace5b026 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期一, 22 七月 2024 15:31:04 +0800
Subject: [PATCH] 修改 customDrawer

---
 src/views/project/ch/home/component/waterRight/top.vue |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/views/project/ch/home/component/waterRight/top.vue b/src/views/project/ch/home/component/waterRight/top.vue
index 298e64f..e2b3583 100644
--- a/src/views/project/ch/home/component/waterRight/top.vue
+++ b/src/views/project/ch/home/component/waterRight/top.vue
@@ -17,7 +17,7 @@
 			</div>
 		</div> -->
 	</div>
-	<PlayBar v-model="inputValue" @send-click="sendClick" />
+	<PlayBar v-model="inputValue" @send-click="sendClick" :is-home="true"/>
 </template>
 
 <script setup lang="ts">
@@ -28,13 +28,17 @@
 import router from '/@/router';
 import { activeChatRoom, activeLLMId, activeSectionAId } from '/@/stores/chatRoom';
 import emitter from '/@/utils/mitt';
+import { handleNormalAuth } from '/@/utils/request';
 const emits = defineEmits(['sendClick']);
 const inputValue = ref('浣犳槸璋侊紵');
 
-const sendClick = async () => {
+const sendClick = async (cb) => {
 	if (!inputValue.value) return;
 	if (!activeSectionAId.value) {
 		ElMessage.warning('璇烽�夋嫨搴旂敤鍦烘櫙');
+		return;
+	}
+	if (!handleNormalAuth()) {
 		return;
 	}
 
@@ -90,12 +94,16 @@
 	setLLm(item.logicId);
 };
 
-onMounted(() => {
-	// getLLMList();
-	emitter.on('updateChatInput', (value) => {
-		inputValue.value = value;
-	});
-});
+const updateChatInput = (val)=>{
+	inputValue.value = val;
+
+}
+
+defineExpose({
+	updateChatInput
+})
+
+
 </script>
 <style scoped lang="scss">
 .set-waterTitle {

--
Gitblit v1.9.3