diff --git a/web/src/components/table/channels/modals/EditChannelModal.jsx b/web/src/components/table/channels/modals/EditChannelModal.jsx index 92c26540..6613dddc 100644 --- a/web/src/components/table/channels/modals/EditChannelModal.jsx +++ b/web/src/components/table/channels/modals/EditChannelModal.jsx @@ -142,6 +142,7 @@ const EditChannelModal = (props) => { const [isMultiKeyChannel, setIsMultiKeyChannel] = useState(false); const [channelSearchValue, setChannelSearchValue] = useState(''); const [useManualInput, setUseManualInput] = useState(false); // 是否使用手动输入模式 + const showApiConfigCard = inputs.type !== 45; // 控制是否显示 API 配置卡片(仅当渠道类型不是 豆包 时显示) const getInitValues = () => ({ ...originInputs }); const handleInputChange = (name, value) => { if (formApiRef.current) { @@ -1108,130 +1109,132 @@ const EditChannelModal = (props) => { {/* API Configuration Card */} - - {/* Header: API Config */} -
- - - -
- {t('API 配置')} -
{t('API 地址和相关配置')}
+ {showApiConfigCard && ( + + {/* Header: API Config */} +
+ + + +
+ {t('API 配置')} +
{t('API 地址和相关配置')}
+
-
- {inputs.type === 40 && ( - + {t('邀请链接')}: + window.open('https://cloud.siliconflow.cn/i/hij0YNTZ')} + > + https://cloud.siliconflow.cn/i/hij0YNTZ + +
+ } + className='!rounded-lg' + /> + )} + + {inputs.type === 3 && ( + <> +
- {t('邀请链接')}: - window.open('https://cloud.siliconflow.cn/i/hij0YNTZ')} - > - https://cloud.siliconflow.cn/i/hij0YNTZ - + handleInputChange('base_url', value)} + showClear + />
- } - className='!rounded-lg' - /> - )} +
+ handleInputChange('other', value)} + showClear + /> +
+ + )} - {inputs.type === 3 && ( - <> + {inputs.type === 8 && ( + <> + +
+ handleInputChange('base_url', value)} + showClear + /> +
+ + )} + + {inputs.type === 37 && ( + )} + + {inputs.type !== 3 && inputs.type !== 8 && inputs.type !== 22 && inputs.type !== 36 && inputs.type !== 45 && (
handleInputChange('base_url', value)} + showClear + extraText={t('对于官方渠道,new-api已经内置地址,除非是第三方代理站点或者Azure的特殊接入地址,否则不需要填写')} + /> +
+ )} + + {inputs.type === 22 && ( +
+ handleInputChange('base_url', value)} showClear />
-
- handleInputChange('other', value)} - showClear - /> -
- - )} + )} - {inputs.type === 8 && ( - <> - + {inputs.type === 36 && (
handleInputChange('base_url', value)} showClear />
- - )} - - {inputs.type === 37 && ( - - )} - - {inputs.type !== 3 && inputs.type !== 8 && inputs.type !== 22 && inputs.type !== 36 && inputs.type !== 45 && ( -
- handleInputChange('base_url', value)} - showClear - extraText={t('对于官方渠道,new-api已经内置地址,除非是第三方代理站点或者Azure的特殊接入地址,否则不需要填写')} - /> -
- )} - - {inputs.type === 22 && ( -
- handleInputChange('base_url', value)} - showClear - /> -
- )} - - {inputs.type === 36 && ( -
- handleInputChange('base_url', value)} - showClear - /> -
- )} -
+ )} + + )} {/* Model Configuration Card */}