Commit 6d1bb26e by Liu

fix:调用推荐问题接口时机

parent ecc76730
...@@ -246,6 +246,8 @@ export const Home: React.FC = () => { ...@@ -246,6 +246,8 @@ export const Home: React.FC = () => {
window.dispatchEvent(new CustomEvent('forceResetToGeneralMode')) window.dispatchEvent(new CustomEvent('forceResetToGeneralMode'))
initConversation() initConversation()
dispatch(fetchConversations()) dispatch(fetchConversations())
// 2. 拉取常见问题等业务数据
_handleToolClick(false, '', true)
} }
} }
else { else {
...@@ -280,6 +282,8 @@ export const Home: React.FC = () => { ...@@ -280,6 +282,8 @@ export const Home: React.FC = () => {
window.dispatchEvent(new CustomEvent('forceResetToGeneralMode')) window.dispatchEvent(new CustomEvent('forceResetToGeneralMode'))
initConversation() initConversation()
dispatch(fetchConversations()) dispatch(fetchConversations())
// 2. 拉取常见问题等业务数据
_handleToolClick(false, '', true)
} }
} }
}, [setToken, dispatch]) }, [setToken, dispatch])
...@@ -300,8 +304,6 @@ export const Home: React.FC = () => { ...@@ -300,8 +304,6 @@ export const Home: React.FC = () => {
// 首页首次挂载时重置为通用模式: // 首页首次挂载时重置为通用模式:
// 1. 清除 Redux 中的 currentToolId // 1. 清除 Redux 中的 currentToolId
dispatch(clearCurrentToolId()) dispatch(clearCurrentToolId())
// 2. 拉取常见问题等业务数据
_handleToolClick(false, '', true)
}, [token, dispatch, _handleToolClick]) }, [token, dispatch, _handleToolClick])
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment