|
@@ -93,11 +93,13 @@ function CreativeModal(props: Props) {
|
|
delete newValues[key]
|
|
delete newValues[key]
|
|
break;
|
|
break;
|
|
case 'short_video1'://视频素材
|
|
case 'short_video1'://视频素材
|
|
- // newValues.adcreativeElements = {
|
|
|
|
- // video: materialConfig.list[0].url,
|
|
|
|
- // description: newValues.description,
|
|
|
|
- // }
|
|
|
|
- // delete newValues[key]
|
|
|
|
|
|
+ newValues.adcreativeElements = {
|
|
|
|
+ shortVideoStruct:{
|
|
|
|
+ shortVideo1Url:materialConfig.list[0].url
|
|
|
|
+ },
|
|
|
|
+ description: newValues.description,
|
|
|
|
+ }
|
|
|
|
+ delete newValues[key]
|
|
break;
|
|
break;
|
|
case 'description'://文案
|
|
case 'description'://文案
|
|
newValues.adcreativeElements = { ...newValues.adcreativeElements, description: newValues.description }
|
|
newValues.adcreativeElements = { ...newValues.adcreativeElements, description: newValues.description }
|
|
@@ -298,7 +300,7 @@ function CreativeModal(props: Props) {
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
if (dataInfo && adcreative_template_list?.length > 0 && adcreative_template) {
|
|
if (dataInfo && adcreative_template_list?.length > 0 && adcreative_template) {
|
|
let { adcreativeName, adcreativeTemplateId, conversionDataType, conversionTargetType, linkNameType, linkPageType, pageType, promotedObjectType, siteSet, adcreativeElements } = dataInfo
|
|
let { adcreativeName, adcreativeTemplateId, conversionDataType, conversionTargetType, linkNameType, linkPageType, pageType, promotedObjectType, siteSet, adcreativeElements } = dataInfo
|
|
- let { description, imageUrl, title, videoUrl, imageUrlList,endPage } = adcreativeElements
|
|
|
|
|
|
+ let { description, imageUrl, title, videoUrl, imageUrlList,endPage,shortVideoStruct } = adcreativeElements
|
|
let obj: any = {
|
|
let obj: any = {
|
|
adcreativeName,
|
|
adcreativeName,
|
|
siteSet,
|
|
siteSet,
|
|
@@ -361,6 +363,15 @@ function CreativeModal(props: Props) {
|
|
adcreativeTemplateId
|
|
adcreativeTemplateId
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if(shortVideoStruct){
|
|
|
|
+ setMaterialConfig({
|
|
|
|
+ cloudSize: [],
|
|
|
|
+ list: [{ url: shortVideoStruct.shortVideo1Url }],
|
|
|
|
+ max: 1,
|
|
|
|
+ type: 'short_video1',
|
|
|
|
+ adcreativeTemplateId
|
|
|
|
+ })
|
|
|
|
+ }
|
|
form.setFieldsValue(obj)
|
|
form.setFieldsValue(obj)
|
|
}
|
|
}
|
|
}, [dataInfo, adcreative_template_list, adcreative_template])
|
|
}, [dataInfo, adcreative_template_list, adcreative_template])
|
|
@@ -455,7 +466,7 @@ function CreativeModal(props: Props) {
|
|
{/* 视频 */}
|
|
{/* 视频 */}
|
|
{
|
|
{
|
|
(item.name === 'short_video1' || item.name === 'video') && <div className={`${styles.box} ${styles.video}`} onClick={() => {
|
|
(item.name === 'short_video1' || item.name === 'video') && <div className={`${styles.box} ${styles.video}`} onClick={() => {
|
|
- init({ mediaType: 'VIDEO', cloudSize: [[{ relation: '=', width: item.restriction.videoRestriction.minWidth, height: item.restriction.videoRestriction.minHeight }]] })
|
|
|
|
|
|
+ init({ mediaType: 'VIDEO', cloudSize:adcreativeTemplateId === 1708 ? [[{ relation: '=', width: 1280, height: 720 }]]:[[{ relation: '=', width: item.restriction.videoRestriction.minWidth, height: item.restriction.videoRestriction.minHeight }]] })
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
set_selectImgVisible(true)
|
|
set_selectImgVisible(true)
|
|
setMaterialConfig({
|
|
setMaterialConfig({
|
|
@@ -469,7 +480,7 @@ function CreativeModal(props: Props) {
|
|
<p>
|
|
<p>
|
|
{
|
|
{
|
|
materialConfig?.list[0] ? <video src={materialConfig?.list[0].url} controls /> : <>
|
|
materialConfig?.list[0] ? <video src={materialConfig?.list[0].url} controls /> : <>
|
|
- <span>{`推荐尺寸(${item.restriction.videoRestriction.minWidth} x ${item.restriction.videoRestriction.minHeight})`}</span>
|
|
|
|
|
|
+ <span>{`推荐尺寸(${adcreativeTemplateId === 1708 ?1280 :item.restriction.videoRestriction.minWidth} x ${adcreativeTemplateId === 1708 ?720 :item.restriction.videoRestriction.minHeight})`}</span>
|
|
<span>{`${item.restriction.videoRestriction.fileFormat?.map(str => str?.replace('MEDIA_TYPE_', ''))};< ${item.restriction.videoRestriction.fileSize / 1024}M;时长 ≥ ${item.restriction.videoRestriction.minDuration}s,≤ ${item.restriction.videoRestriction.maxDuration}s,必须带有声音`}</span>
|
|
<span>{`${item.restriction.videoRestriction.fileFormat?.map(str => str?.replace('MEDIA_TYPE_', ''))};< ${item.restriction.videoRestriction.fileSize / 1024}M;时长 ≥ ${item.restriction.videoRestriction.minDuration}s,≤ ${item.restriction.videoRestriction.maxDuration}s,必须带有声音`}</span>
|
|
</>
|
|
</>
|
|
}
|
|
}
|