Merge branch 'factory' of https://gitlink.org.cn/Gitlink/forgeplus-react-v2 into factory
This commit is contained in:
commit
00408400f2
|
|
@ -10,7 +10,7 @@ import '../../common.scss'
|
|||
import { getSourceList, httpUrl } from '../../api';
|
||||
import { factoryZoneId, docId, standardId, lessonId, manualId } from '../../../constants/factory'
|
||||
import { downloadFunc } from '../../../forge/Utils/utils'
|
||||
import { Carousel } from 'antd';
|
||||
import { Carousel, message } from 'antd';
|
||||
|
||||
const iconList = [lessonsStandard1, lessonsStandard2, lessonsStandard3]
|
||||
|
||||
|
|
@ -163,7 +163,16 @@ const Resource2 = forwardRef(({ zoneId }, ref) => {
|
|||
<div className="manual-content">
|
||||
<ul>
|
||||
{docList.map((item, index) => (
|
||||
<li key={index} className={`activity-item-v2 df activity-section-item ${current === index ? 'activity-section-item-active' : ''}`} onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>
|
||||
<li
|
||||
key={index}
|
||||
className={`activity-item-v2 df activity-section-item ${current === index ? 'activity-section-item-active' : ''}`}
|
||||
onClick={() => {
|
||||
if (item.fileIds) {
|
||||
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
|
||||
} else {
|
||||
message.error('该文档稍后提供下载')
|
||||
}
|
||||
}}>
|
||||
<span className="title-border-to-right-icon">{item.name}</span>
|
||||
</li>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import RenderHtml from '../../../components/render-html';
|
|||
import { Breadcrumb } from 'antd';
|
||||
import { getSourceDetail, httpUrl, getSourceList } from '../../api';
|
||||
import { downloadFunc } from '../../../forge/Utils/utils'
|
||||
import { factoryZoneId, } from '../../../constants/factory'
|
||||
import { docId, } from '../../../constants/factory'
|
||||
import '../../common.scss'
|
||||
import { Base64 } from 'js-base64';
|
||||
|
||||
|
|
@ -61,7 +61,12 @@ function Index(props) {
|
|||
<h3 title={detail.name}>{detail.name}</h3>
|
||||
<p title={detail.summary}>{detail.summary}</p>
|
||||
{
|
||||
detail.fileIds && <button className="shiny-button" onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${detail.fileIds}`) }}>立即下载</button>
|
||||
detail.keywords === docId &&
|
||||
<button onClick={() => {
|
||||
if (detail.fileIds) {
|
||||
downloadFunc(`${httpUrl}/file/open/download/${detail.fileIds}`)
|
||||
}
|
||||
}} disabled={!detail.fileIds} className={`shiny-button ${!detail.fileIds && 'disabled'}`} >{detail.fileIds ? '立即下载' : '稍后下载'}</button>
|
||||
}
|
||||
{
|
||||
detail.url &&
|
||||
|
|
@ -91,7 +96,7 @@ function Index(props) {
|
|||
}
|
||||
{
|
||||
detail.url && <div className="news-detail-content-wrapper">
|
||||
<video ref={videoRef} src={ detail.url } controls={ true }></video>
|
||||
<video ref={videoRef} src={ detail.url } controls={ true } poster={ detail.headImg || imageBack1 }></video>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ function Index(props) {
|
|||
getProjectsLists(factoryZoneId, { isHomepage: 0, pageSize: 6, pageNum: 1 }).then(res => {
|
||||
const rows = res.data.rows
|
||||
if (rows) {
|
||||
setProjectList(rows.map(e => { return e.projectProperties.fullName.split('/')[1]}))
|
||||
setProjectList(rows.map(e => { return e.projectProperties.name.split('/')[1]}))
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue