소스 검색

预设问题修复

李富豪 6 달 전
부모
커밋
6146e14f34
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      app/components/chat.tsx

+ 10 - 0
app/components/chat.tsx

@@ -1076,6 +1076,16 @@ function _Chat() {
     await fetchApplicationList();
   }
 
+  useEffect(() => {
+    const search = location.search;
+    const params = new URLSearchParams(search);
+    const chatMode = params.get('chatMode');
+
+    if (chatMode) {
+      setSelectedFruit(chatMode as "ONLINE" | "LOCAL");
+    }
+  }, [])
+
   useEffect(() => {
     if (appValue) {
       fetchDefaultQuestion(appValue);