Commit 629dd4fd by 李伟康

feat(chat): 添加企业ID参数支持

- 在设置点击事件中获取corpId参数
- 将corpId参数添加到设置URL中传递
- 保持原有的sessionId参数功能不变
1 parent caf13950
...@@ -5,7 +5,8 @@ import { AI_DATA_SETTING ,GET_PARAMS} from '@/app/components/base/chat/constants ...@@ -5,7 +5,8 @@ import { AI_DATA_SETTING ,GET_PARAMS} from '@/app/components/base/chat/constants
const Setting: FC = () => { const Setting: FC = () => {
const handleSettingClick = () => { const handleSettingClick = () => {
const sessionId = GET_PARAMS.get('sessionId') const sessionId = GET_PARAMS.get('sessionId'),
corpId = GET_PARAMS.get('corpId')
const { globalConfig } = useStore.getState() const { globalConfig } = useStore.getState()
if (!globalConfig) { if (!globalConfig) {
...@@ -15,7 +16,7 @@ const Setting: FC = () => { ...@@ -15,7 +16,7 @@ const Setting: FC = () => {
const { settingUrl } = globalConfig const { settingUrl } = globalConfig
if (settingUrl) { if (settingUrl) {
window.open(`${settingUrl}?sessionId=${sessionId}`) window.open(`${settingUrl}?sessionId=${sessionId}&corpId=${corpId}`)
} else { } else {
console.warn('配置中未设置 settingUrl') console.warn('配置中未设置 settingUrl')
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!