竞赛相关
|
After Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 731 B |
|
After Width: | Height: | Size: 492 KiB |
|
Before Width: | Height: | Size: 495 KiB After Width: | Height: | Size: 492 KiB |
|
|
@ -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 {
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 731 B |
|
|
@ -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>
|
||||
}
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 731 B |
|
|
@ -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',
|
||||
}
|
||||
|
||||
|
|
|
|||