编辑器整体自测

This commit is contained in:
Apple 2022-09-23 15:20:03 +08:00
parent e49c6fd6e9
commit 1e7997b3ef
1 changed files with 7 additions and 9 deletions

View File

@ -46,17 +46,15 @@ export default class edittemplate extends React.Component {
render() {
let goodsConfig = this.props.goodsdata;
console.log(49,goodsConfig);
let naVisual = []
if (goodsConfig.bottomBar) {
naVisual = goodsConfig.bottomBar.navlist.filter(item => item.iswitch);
naVisual = goodsConfig.bottomBar.navlist.filter(item => item.iswitch==1);
}
console.log(54,naVisual);
return (
<div className="goodstemplate_Xcenter" >
<div className="goodstemplate" style={{ background: goodsConfig.backgroundImg && goodsConfig.backgroundImg.bgImg ? `url('${goodsConfig.backgroundImg.bgImg}') center center /cover` : goodsConfig.backgroundImg && goodsConfig.backgroundImg.bgColor ? goodsConfig.backgroundImg.bgColor : '#F2F7F8' }}>
{
goodsConfig.search && goodsConfig.search.iswitch ?
goodsConfig.search && goodsConfig.search.iswitch==1 ?
<div onClick={e => this.customComponent(e, 'search', 'marketing-sousuolan-', '搜索栏')} className={this.state.selectDom == 'search' ? 'selectBorder' : ''} ref="search"><SearchBarView searchConfig={goodsConfig.search} /></div> : null
}
@ -66,19 +64,19 @@ export default class edittemplate extends React.Component {
}
{
goodsConfig.picture && goodsConfig.picture.iswitch ? <div onClick={e => this.customComponent(e, 'picture', 'marketing-tupian', '图片')} ref="picture" className={this.state.selectDom == 'picture' ? 'selectBorder' : ''}><img src={goodsConfig.picture.img} alt="" className="picture" /></div> : null
goodsConfig.picture && goodsConfig.picture.iswitch==1 ? <div onClick={e => this.customComponent(e, 'picture', 'marketing-tupian', '图片')} ref="picture" className={this.state.selectDom == 'picture' ? 'selectBorder' : ''}><img src={goodsConfig.picture.img} alt="" className="picture" /></div> : null
}
{
goodsConfig.title && goodsConfig.title.iswitch && goodsConfig.title.comstyle == 1 ? <div onClick={e => this.customComponent(e, 'title', 'marketing-fuwenbenkuang', '标题')} ref="title" className={this.state.selectDom == 'title' ? 'selectBorder' : ''}><div className={goodsConfig.title.textAlign + ' content-title ' + goodsConfig.title.fontSize} style={{ color: goodsConfig.title.fontColor, fontWeight: 'bold' }}>{goodsConfig.title.text}</div></div> : null
goodsConfig.title && goodsConfig.title.iswitch==1 && goodsConfig.title.comstyle == 1 ? <div onClick={e => this.customComponent(e, 'title', 'marketing-fuwenbenkuang', '标题')} ref="title" className={this.state.selectDom == 'title' ? 'selectBorder' : ''}><div className={goodsConfig.title.textAlign + ' content-title ' + goodsConfig.title.fontSize} style={{ color: goodsConfig.title.fontColor, fontWeight: 'bold' }}>{goodsConfig.title.text}</div></div> : null
}
{
goodsConfig.title && goodsConfig.title.iswitch && goodsConfig.title.comstyle == 2 ? <div onClick={e => this.customComponent(e, 'title', 'marketing-fuwenbenkuang', '标题')} ref="title" className={this.state.selectDom == 'title' ? 'selectBorder' : ''}>
goodsConfig.title && goodsConfig.title.iswitch==1 && goodsConfig.title.comstyle == 2 ? <div onClick={e => this.customComponent(e, 'title', 'marketing-fuwenbenkuang', '标题')} ref="title" className={this.state.selectDom == 'title' ? 'selectBorder' : ''}>
<img src={goodsConfig.title.pic} alt="" className="title-pic" />
</div> : null
}
{
goodsConfig.title && goodsConfig.title.iswitch && goodsConfig.title.text || goodsConfig.picture && goodsConfig.picture.iswitch && goodsConfig.picture.img ? <div className="parting-line"></div> : null
goodsConfig.title && goodsConfig.title.iswitch==1 && goodsConfig.title.text || goodsConfig.picture && goodsConfig.picture.iswitch==1 && goodsConfig.picture.img ? <div className="parting-line"></div> : null
}
{
goodsConfig.list == 2 ? <img className="goodsPic" src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/swiper.png'} /> : goodsConfig.list == 3 ? <img className="goodsPicMatrax" src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/matrix.png'} /> : <img className="goodsPicMatrax" src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/listnew.png'} />
@ -95,7 +93,7 @@ export default class edittemplate extends React.Component {
</button> : null
}
{
goodsConfig.bottomBar && goodsConfig.bottomBar.iswitch ? <div ref="bottomBar" onClick={e => this.customComponent(e, 'bottomBar', 'marketing-list', '底部栏')} className={this.state.selectDom == 'bottomBar' ? 'selectBottomBorder' : ''}><BottomBarView bottomBarConfig={goodsConfig.bottomBar} /></div> : null
goodsConfig.bottomBar && goodsConfig.bottomBar.iswitch==1 ? <div ref="bottomBar" onClick={e => this.customComponent(e, 'bottomBar', 'marketing-list', '底部栏')} className={this.state.selectDom == 'bottomBar' ? 'selectBottomBorder' : ''}><BottomBarView bottomBarConfig={goodsConfig.bottomBar} /></div> : null
}
</div>
{