|
@@ -53,7 +53,8 @@ function AddLandingPage(props: Props) {
|
|
|
const { content, pageBackColor } = state
|
|
|
const { componentItem } = stateGlobal
|
|
|
const { currentUser }: any = useModel('@@initialState', model => ({ currentUser: model.initialState?.currentUser }))
|
|
|
- const { init, add, get, state: { parentId, belongUser } } = useModel('useLaunchAdq.useBdMediaPup')
|
|
|
+ const { init, add, get } = useModel('useLaunchAdq.useBdMediaPup')
|
|
|
+ const { state: { parentId, belongUser } } = useModel('useLaunchAdq.useBdMedia')
|
|
|
/** 变量开始 */
|
|
|
const [selectImgVisible, setSelectImgVisible] = useState<boolean>(false) // 选择图片弹窗
|
|
|
const [lastVisible, setLastVisible] = useState<boolean>(false) // 最后保存设置
|
|
@@ -140,28 +141,28 @@ function AddLandingPage(props: Props) {
|
|
|
setIsFootlock(() => false)
|
|
|
if (selectData?.adLocation === 'sns') { // 朋友圈信息流
|
|
|
if (selectData?.outerStyle === 0) { // 常规广告
|
|
|
- init({ mediaType: 'IMG', cloudSize: [[{ relation: '=', width: 800, height: 800 }]],maxSize:300*1024 })
|
|
|
+ init({ mediaType: 'IMG', cloudSize: [[{ relation: '=', width: 800, height: 800 }]], maxSize: 300 * 1024 })
|
|
|
} else { // 卡片广告
|
|
|
- init({ mediaType: 'IMG', cloudSize: [[{ relation: '=', width: 800, height: 450 }]],maxSize:300*1024})
|
|
|
+ init({ mediaType: 'IMG', cloudSize: [[{ relation: '=', width: 800, height: 450 }]], maxSize: 300 * 1024 })
|
|
|
}
|
|
|
} else { // 公众号及其他
|
|
|
- init({ mediaType: 'IMG', cloudSize: [[{ relation: '=', width: 800, height: 800 }], [{ relation: '=', width: 800, height: 450 }], [{ relation: '=', width: 800, height: 640 }], [{ relation: '=', width: 640, height: 800 }]] ,maxSize:300*1024})
|
|
|
+ init({ mediaType: 'IMG', cloudSize: [[{ relation: '=', width: 800, height: 800 }], [{ relation: '=', width: 800, height: 450 }], [{ relation: '=', width: 800, height: 640 }], [{ relation: '=', width: 640, height: 800 }]], maxSize: 300 * 1024 })
|
|
|
}
|
|
|
} else if (selectData?.elementType === 'IMAGE') { // 内容图片
|
|
|
setIsFootlock(() => false)
|
|
|
- init({ mediaType: 'IMG', cloudSize: [[{ relation: '=', width: 750, height: null }, { relation: '<=', width: null, height: 1536 }]],maxSize:300*1024 })
|
|
|
+ init({ mediaType: 'IMG', cloudSize: [[{ relation: '=', width: 750, height: null }, { relation: '<=', width: null, height: 1536 }]], maxSize: 300 * 1024 })
|
|
|
} else if (selectData?.elementType === 'TOP_SLIDER') { // 轮播图
|
|
|
- init({ mediaType: 'IMG', num: selectData?.imageUrlList?.length || 3, cloudSize: [[{ relation: '=', width: 800, height: 800 }]],maxSize:300*1024 })
|
|
|
+ init({ mediaType: 'IMG', num: selectData?.imageUrlList?.length || 3, cloudSize: [[{ relation: '=', width: 800, height: 800 }]], maxSize: 300 * 1024 })
|
|
|
setIsFootlock(() => false)
|
|
|
} else if (selectData?.elementType === 'TOP_VIDEO') { // 视频
|
|
|
if (selectData?.adLocation === 'sns') { // 朋友圈信息流
|
|
|
if (selectData?.outerStyle === 0) { // 常规广告
|
|
|
- init({ mediaType: 'VIDEO', cloudSize: [[{ relation: '=', width: 640, height: 480 }], [{ relation: '=', width: 640, height: 360 }], [{ relation: '=', width: 750, height: 1334 }], [{ relation: '=', width: 720, height: 1280 }] ],maxSize:20*1024*1024 })
|
|
|
+ init({ mediaType: 'VIDEO', cloudSize: [[{ relation: '=', width: 640, height: 480 }], [{ relation: '=', width: 640, height: 360 }], [{ relation: '=', width: 750, height: 1334 }], [{ relation: '=', width: 720, height: 1280 }]], maxSize: 20 * 1024 * 1024 })
|
|
|
} else { // 卡片广告
|
|
|
- init({ mediaType: 'VIDEO', cloudSize: [[{ relation: '=', width: 750, height: null }, { relation: '<=', width: null, height: 1536 }]],maxSize:20*1024*1024 })
|
|
|
+ init({ mediaType: 'VIDEO', cloudSize: [[{ relation: '=', width: 750, height: null }, { relation: '<=', width: null, height: 1536 }]], maxSize: 20 * 1024 * 1024 })
|
|
|
}
|
|
|
} else { // 公众号及其它
|
|
|
- init({ mediaType: 'VIDEO', cloudSize: [[{ relation: '=', width: 750, height: null }, { relation: '<=', width: null, height: 1536 }]],maxSize:20*1024*1024 })
|
|
|
+ init({ mediaType: 'VIDEO', cloudSize: [[{ relation: '=', width: 750, height: null }, { relation: '<=', width: null, height: 1536 }]], maxSize: 20 * 1024 * 1024 })
|
|
|
setIsFootlock(() => false)
|
|
|
}
|
|
|
} else if (selectData?.elementType === 'shelfnew') { // 图文复合组件 1个
|
|
@@ -1021,7 +1022,7 @@ function AddLandingPage(props: Props) {
|
|
|
<div className="adui-form-control">
|
|
|
<Radio.Group onChange={(e) => { setCon('adLocation', e.target.value, true) }} value={adLocation} size='small'>
|
|
|
<Radio value='sns'>朋友圈信息流</Radio>
|
|
|
- <Radio value='gh'>公众号及其他</Radio>
|
|
|
+ <Radio value='gzh'>公众号及其他</Radio>
|
|
|
</Radio.Group>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1097,7 +1098,7 @@ function AddLandingPage(props: Props) {
|
|
|
<div className="adui-form-control">
|
|
|
<Radio.Group onChange={(e) => { changeAdLocation(e.target.value) }} value={adLocation} size='small'>
|
|
|
<Radio value='sns'>朋友圈信息流</Radio>
|
|
|
- <Radio value='gh'>公众号及其他</Radio>
|
|
|
+ <Radio value='gzh'>公众号及其他</Radio>
|
|
|
</Radio.Group>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -2130,12 +2131,11 @@ function AddLandingPage(props: Props) {
|
|
|
bgColor: pageBackColor,
|
|
|
pageElementsSpecList: pageContextList
|
|
|
}
|
|
|
-
|
|
|
let params = {
|
|
|
mediaType: 'PAGE',
|
|
|
folder: false,
|
|
|
- parentId, title:
|
|
|
- layoutName,
|
|
|
+ parentId,
|
|
|
+ title: layoutName,
|
|
|
pageName: layoutName,
|
|
|
belongUser: belongUser === '0' ? false : true,
|
|
|
sort,
|