帮助中心详情添加判断
This commit is contained in:
@ -12,12 +12,13 @@ const HelpInfoPage: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const [helpDetail, setHelpDetail] = useState<API.HelpCenterDetailResponse | null>(null);
|
||||
const [loading, setLoading] = useState<boolean>(true);
|
||||
let tabActiveKey = 'helpCenter';
|
||||
|
||||
useEffect(() => {
|
||||
// 获取URL中的id参数
|
||||
const query = new URLSearchParams(window.location.search);
|
||||
const id = query.get('id');
|
||||
const tabActiveKey = query.get('tabActiveKey') || 'helpCenter';
|
||||
tabActiveKey = query.get('tabActiveKey') || 'helpCenter';
|
||||
|
||||
if (!id) {
|
||||
message.error(intl.formatMessage({ id: 'help.message.idNotFound' }));
|
||||
@ -97,7 +98,11 @@ const HelpInfoPage: React.FC = () => {
|
||||
{/* <QuestionCircleOutlined /> */}
|
||||
<CommentOutlined />
|
||||
<span style={{ margin: '0 15px' }}>{helpDetail.title}</span>
|
||||
{tabActiveKey == 'helpCenter' ? (
|
||||
''
|
||||
) : (
|
||||
<Tag color="success">{helpDetail.isAnswer == '1' ? '已回答' : '未回答'}</Tag>
|
||||
)}
|
||||
</Title>
|
||||
<div dangerouslySetInnerHTML={{ __html: helpDetail.content || '' }} />
|
||||
|
||||
|
Reference in New Issue
Block a user