|
@@ -68,7 +68,7 @@ function AddLandingPage(props: Props) {
|
|
|
const [goodsCount, setGoodsCount] = useState<number>(0)
|
|
|
/** 变量结束 */
|
|
|
|
|
|
- // console.log('content---->', content)
|
|
|
+ console.log('content---->', content)
|
|
|
|
|
|
// 回填
|
|
|
useEffect(() => {
|
|
@@ -84,6 +84,17 @@ function AddLandingPage(props: Props) {
|
|
|
let typeKey = getTypeKey(item?.elementType)
|
|
|
if (typeKey) {
|
|
|
let data = item[typeKey] || {}
|
|
|
+ if (item?.elementType === "IMAGE_TEXT" && data?.imageTextItem) {
|
|
|
+ data.imageTextItem = data.imageTextItem?.map((item: any) => {
|
|
|
+ if (item?.subElemType === 'GH') {
|
|
|
+ let { ghSpec, ...GHData } = item
|
|
|
+ return { ...GHData, content: { ...ghSpec } }
|
|
|
+ } else {
|
|
|
+ let { enterpriseWxSpec, ...EnterpriseWxData } = item
|
|
|
+ return { ...EnterpriseWxData, content: { ...enterpriseWxSpec } }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
return {
|
|
|
elementType: item?.elementType,
|
|
|
...data
|
|
@@ -1486,7 +1497,7 @@ function AddLandingPage(props: Props) {
|
|
|
<Select style={{ width: 120 }} value={imgTextData.subElemType} onChange={(e) => { onSetShelfnewButton(e) }}>
|
|
|
{/* <Option value="link">跳转链接</Option> */}
|
|
|
<Option value="GH">关注公众号</Option>
|
|
|
- <Option value="ENTERPRISE_WX">添加商家微信</Option>
|
|
|
+ <Option value="ENTERPRISE_WX" disabled>添加商家微信</Option>
|
|
|
</Select>
|
|
|
<Button type="link" size="small" onClick={() => { setImgTextButtonShow(true) }}>配置</Button>
|
|
|
</Space>
|
|
@@ -2036,7 +2047,7 @@ function AddLandingPage(props: Props) {
|
|
|
</div>
|
|
|
<div className={style.title}>营销组件</div>
|
|
|
<div className={style.assembly}>
|
|
|
- {/* <div {...getDragPropsCon(`IMAGE_TEXT`)}> <ImgText /> <span className="my">图文复合组件</span> </div> */}
|
|
|
+ <div {...getDragPropsCon(`IMAGE_TEXT`)}> <ImgText /> <span className="my">图文复合组件</span> </div>
|
|
|
{componentItem?.some((item: { elementType: string }) => item.elementType === 'FLOAT_BUTTON') ?
|
|
|
<div className={style.disabled}> <FloatbuttonSvg /> <span>悬浮组件</span></div> : <div {...getDragPropsCon(`FLOAT_BUTTON`)}> <FloatbuttonSvg /> <span className="my">悬浮组件</span></div>
|
|
|
}
|