|
@@ -8,6 +8,7 @@ import { useModel } from "umi"
|
|
|
import styles from './index.less'
|
|
|
import { getVideoImgUrl } from "@/utils/utils"
|
|
|
import VideoFrame from "@/pages/launchSystemNew/components/videoFrame"
|
|
|
+import VideoNews from "@/pages/launchSystemNew/components/newsModal/videoNews"
|
|
|
|
|
|
interface Props {
|
|
|
value?: any[]
|
|
@@ -157,7 +158,7 @@ const Material: React.FC<Props> = (props) => {
|
|
|
return item
|
|
|
})
|
|
|
form.setFieldsValue({ materials })
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
return <>
|
|
|
<span onClick={() => { setVisible(true) }}>{value && value?.length > 0 ? '编辑' : '添加'}</span>
|
|
@@ -235,12 +236,13 @@ const Material: React.FC<Props> = (props) => {
|
|
|
set_selectVideoVisible(true)
|
|
|
}, 100)
|
|
|
}}>
|
|
|
- <p>
|
|
|
- {materials?.length > 0 && materials[num] && Object.keys(materials[num])?.includes(item.name) ? <video src={materials[num][item.name]} controls /> : <>
|
|
|
+ <div className={styles.p}>
|
|
|
+ {/* <video src={materials[num][item.name]} controls /> */}
|
|
|
+ {materials?.length > 0 && materials[num] && Object.keys(materials[num])?.includes(item.name) ? <VideoNews src={materials[num][item.name]} style={{ display: 'block', width: 'auto', margin: 0, height: '100%' }} maskImgStyle={{ position: 'absolute', top: '50%', left: '50%', width: 40, height: 40, transform: 'translate(-50%, -50%)', zIndex: 10 }}/> : <>
|
|
|
<span>{`推荐尺寸(${adcreativeTemplateId === 1708 ? 1280 : item.restriction.videoRestriction.minWidth} x ${adcreativeTemplateId === 1708 ? 720 : item.restriction.videoRestriction.minHeight})`}</span>
|
|
|
<span>{`${item.restriction.videoRestriction.fileFormat?.map((str: any) => str?.replace('MEDIA_TYPE_', ''))};< ${item.restriction.videoRestriction.fileSize / 1024}M;时长 ≥ ${item.restriction.videoRestriction.minDuration}s,≤ ${item.restriction.videoRestriction.maxDuration}s,必须带有声音`}</span>
|
|
|
</>}
|
|
|
- </p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</Form.Item>
|
|
|
}
|
|
@@ -274,7 +276,7 @@ const Material: React.FC<Props> = (props) => {
|
|
|
</p>
|
|
|
</div>
|
|
|
{videoUploads && Object.keys(videoUploads)?.length > 0 && <div style={{ width: 32 }}>
|
|
|
- {materials?.length > 0 && materials[num] && (Object.keys(materials[num])?.includes('video') || Object.keys(materials[num])?.includes('short_video1')) && <VideoFrame onChange={(e) => setFrame(e, num, item.name)} url={materials[num]?.video || materials[num]?.short_video1}/>}
|
|
|
+ {materials?.length > 0 && materials[num] && (Object.keys(materials[num])?.includes('video') || Object.keys(materials[num])?.includes('short_video1')) && <VideoFrame onChange={(e) => setFrame(e, num, item.name)} url={materials[num]?.video || materials[num]?.short_video1} />}
|
|
|
</div>}
|
|
|
</Space>
|
|
|
</Form.Item>
|