竞赛相关

This commit is contained in:
caishi 2024-11-27 15:45:34 +08:00
parent 9bf6c1fd67
commit c32a1d9485
12 changed files with 12 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 KiB

After

Width:  |  Height:  |  Size: 492 KiB

View File

@ -26,6 +26,7 @@ interface IProps {
style?: React.CSSProperties;
showLines?: number;
showTextOnly?: boolean;
linkReplace?:boolean
}
export default ({
@ -34,14 +35,17 @@ export default ({
showTextOnly,
showLines,
style = {},
linkReplace = true
}: IProps) => {
let str = String(value);
const [data, setData] = useState("")
const html = useMemo(() => {
try {
str = str.replaceAll("/api/attachments", "https://data.educoder.net/api/attachments")
if(linkReplace){
str = str.replaceAll("/api/attachments", "https://data.educoder.net/api/attachments")
.replace(/\r\n/g,"\n")
}
str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
} catch (e) { };
let rs = marked(str)

View File

@ -500,7 +500,7 @@ const WorkSubmit: FC<PageProps> = ({
</Row>
{identity && <Row align="middle">
{modelType == 1 && <Button style={{ lineHeight: "32px" }} target="_blank"
href={`/api/competitions/${identifier}/results.xlsx?identifier=${identifier}&stage_id=${gameItem?.id || ""}&module_type=worksubmit`}
href={`https://www.educoder.net/api/competitions/${identifier}/results.xlsx?identifier=${identifier}&stage_id=${gameItem?.id || ""}&module_type=worksubmit`}
icon={<i className='iconfont icon-lianjie3' style={{ fontSize: "16px", color: "#44D7B6" }} />}
className={styles.downBut}></Button>}
<AsyncButton icon={<i className='iconfont icon-wenjian4' style={{ fontSize: "16px", color: "#F6C555" }} />} className={styles.downBut} style={{ marginLeft: "20px" }} onClick={handleAllDownload}></AsyncButton>

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 731 B

View File

@ -7,7 +7,8 @@ import views from '../img/views.png'
import { useEffect } from 'react';
import { getDocDetail } from '../api'
import { useState } from 'react';
import { defaultPage } from '../info'
import { defaultPage } from '../info';
import moment from 'moment';
function Detail() {
@ -47,7 +48,7 @@ function Detail() {
<div className="info-text-main">
<p className="info-name">{ detail.name }</p>
<ul className="info-ul-value">
{ cmsDir && <li>发布于{ cmsDir.createdAt }</li> }
<li>发布于{ moment(detail.publishTime).format("YYYY-MM-DD") }</li>
{ detail.visits && <li><img src={ views } alt="" className="mr5" />{ detail.visits }</li> }
</ul>
</div>
@ -56,7 +57,7 @@ function Detail() {
}
{
content ?
<RenderHtml className="informations_detail imageLayerParent" value={ content } url={ location } />
<RenderHtml className="informations_detail imageLayerParent" value={ content } url={ location } linkReplace={false}/>
:
<span>暂无详情~</span>
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 731 B

View File

@ -126,8 +126,8 @@ export default function request(url: string, option: any, flag?: boolean) {
let newOptions = { ...defaultOptions, ...options }
let eduHeader = {
'X-Edu-Signature':'1619eba6f182db728a190d444965c47c',
'X-Edu-Timestamp':'1728974333737',
'X-Edu-Signature':'5a997f55c8ead42db9c8102b0eeed947',
'X-Edu-Timestamp':'1732082882272',
'X-Edu-Type':'pc',
}