Commit 6d1bb26e by Liu

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

parent ecc76730
......@@ -246,6 +246,8 @@ export const Home: React.FC = () => {
window.dispatchEvent(new CustomEvent('forceResetToGeneralMode'))
initConversation()
dispatch(fetchConversations())
// 2. 拉取常见问题等业务数据
_handleToolClick(false, '', true)
}
}
else {
......@@ -280,6 +282,8 @@ export const Home: React.FC = () => {
window.dispatchEvent(new CustomEvent('forceResetToGeneralMode'))
initConversation()
dispatch(fetchConversations())
// 2. 拉取常见问题等业务数据
_handleToolClick(false, '', true)
}
}
}, [setToken, dispatch])
......@@ -300,8 +304,6 @@ export const Home: React.FC = () => {
// 首页首次挂载时重置为通用模式:
// 1. 清除 Redux 中的 currentToolId
dispatch(clearCurrentToolId())
// 2. 拉取常见问题等业务数据
_handleToolClick(false, '', true)
}, [token, dispatch, _handleToolClick])
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