Browse Source

修复id匹配不上问题

李富豪 6 tháng trước cách đây
mục cha
commit
6b6b604ee8
1 tập tin đã thay đổi với 6 bổ sung10 xóa
  1. 6 10
      app/components/chat.tsx

+ 6 - 10
app/components/chat.tsx

@@ -1076,6 +1076,12 @@ function _Chat() {
     await fetchApplicationList();
   }
 
+  useEffect(() => {
+    if (appValue) {
+      fetchDefaultQuestion(appValue);
+    }
+  }, [appValue, chatStore.chatMode])
+
   useEffect(() => {
     if (!location.search.includes('showMenu=false')) {
       init();
@@ -1090,16 +1096,6 @@ function _Chat() {
         session.appId = appId;
       });
     }
-  }, [])
-
-  useEffect(() => {
-    if (appValue) {
-      fetchDefaultQuestion(appValue);
-    }
-  }, [appValue, chatStore.chatMode])
-
-  useEffect(() => {
-    fetchApplicationList();
   }, [chatStore.chatMode])
 
   const [inputRows, setInputRows] = useState(2);