This commit is contained in:
zhangds 2022-09-09 12:21:46 +08:00
commit 704b5ff62a
12 changed files with 290 additions and 90 deletions

View File

@ -172,15 +172,15 @@ input {
} }
.center { .center {
text-align: center; justify-content: center!important;;
} }
.left { .left {
text-align: left; justify-content: flex-start!important;;
} }
.right { .right {
text-align: right; justify-content: flex-end!important;;
} }
.square { .square {

View File

@ -36,9 +36,13 @@ export default class componentLib extends React.Component {
//组件将要销毁阶段 //组件将要销毁阶段
componentWillUnmount() {} componentWillUnmount() {}
propcomponentName(item){ propcomponentName(item){
console.log(39,item);
this.props.componentName(item.name); this.props.componentName(item.name);
if(item.name){
Bus.emit('componentLib',item) Bus.emit('componentLib',item)
} }
}
render() { render() {
return ( return (
<div className="componentLib"> <div className="componentLib">

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { ImageUpload, Notify, RadioGroup, RadioButton } from 'zent'; import { ImageUpload, ColorPicker, Notify, RadioGroup, RadioButton } from 'zent';
import "@/assets/comm.css" import "@/assets/comm.css"
import Form from "@/components/form/main" import Form from "@/components/form/main"
import FormItem from "@/components/form-item/main" import FormItem from "@/components/form-item/main"
@ -11,7 +11,8 @@ export default class edittemplate extends React.Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
bgimg:'' bgimg: '',
bgColor: '#f2f3f4'
} }
} }
@ -22,6 +23,12 @@ export default class edittemplate extends React.Component {
this.setState({ bgimg }); this.setState({ bgimg });
} }
} }
handleChange1 = (color) => {
this.setState({
bgColor: color
});
Bus.emit('globalColor',color)
}
//顶部banner //顶部banner
onUploadChange(files) { onUploadChange(files) {
if (files.length > 0 && files[0].status == "success") { if (files.length > 0 && files[0].status == "success") {
@ -102,7 +109,7 @@ export default class edittemplate extends React.Component {
</div> </div>
<div style={{ width: "92%", "margin": "0 auto", "overflow": "auto", "maxHeight": "100%" }}> <div style={{ width: "92%", "margin": "0 auto", "overflow": "auto", "maxHeight": "100%" }}>
<Form model={this.state.model} ref="form1"> <Form model={this.state.model} ref="form1">
<FormItem labelname="添加图片:" prop="top" id="top" labelwidth="100px"> <FormItem labelname="覆盖背景:" labelwidth="80px">
<ImageUpload <ImageUpload
className="zent-image-upload-demo" className="zent-image-upload-demo"
maxSize={5 * 1024 * 1024} maxSize={5 * 1024 * 1024}
@ -116,6 +123,18 @@ export default class edittemplate extends React.Component {
onError={this.onUploadError} onError={this.onUploadError}
/> />
</FormItem> </FormItem>
<FormItem labelname="背景颜色:" labelwidth="80px">
<div className="colorItemfont dfleac">
<span style={{ border: '1px solid #f1f2f3' }} className={this.state.bgColor == '#fff' ? "cicle activecicle" : "cicle"} onClick={() => { this.bgColor('#fff') }}></span>
<span className={this.state.bgColor == '#04C160' ? "activecicle cicle cicle6" : "cicle cicle6"} onClick={() => { this.bgColor('#04C160') }}></span>
<span className={this.state.bgColor == '#AE99D3' ? "activecicle cicle cicle3" : "cicle cicle3"} onClick={() => { this.bgColor('#AE99D3') }}></span>
<span className={this.state.bgColor == '#FACD6A' ? "activecicle cicle cicle4" : "cicle cicle4"} onClick={() => { this.bgColor('#FACD6A') }}></span>
<span className={this.state.bgColor == '#FE7962' ? "activecicle cicle cicle5" : "cicle cicle5"} onClick={() => { this.bgColor('#FE7962') }}></span>
<div className="selfset">
<ColorPicker className="setbgColor" color={this.state.bgColor} onChange={this.handleChange1} />
</div>
</div>
</FormItem>
</Form> </Form>
</div> </div>
</div> </div>

View File

@ -197,11 +197,8 @@ export default class edittemplate extends React.Component {
<div className="component-item"> <div className="component-item">
<div className="v-editItem"> <div className="v-editItem">
<span>首页</span> <span>首页</span>
<p className="dflexacsa"><span className="showType">显示</span> <p className="dflexacsa"><span>显示</span>
<Switch </p>
checked={this.state.navlist[0].iswitch}
onChange={checked=>this.handleChangeStatus(0,checked)}
/></p>
</div> </div>
<FormItem labelname="添加图片:" prop="top" id="top" labelwidth="100px"> <FormItem labelname="添加图片:" prop="top" id="top" labelwidth="100px">
<div className="dflexacsa"> <div className="dflexacsa">
@ -246,13 +243,13 @@ export default class edittemplate extends React.Component {
this.setState({ navlist: model2 }) this.setState({ navlist: model2 })
Bus.emit('navlist', model2) Bus.emit('navlist', model2)
}} }}
value={this.state.navlist[0].text} placeholder={"请输入"} labelWidth={'0px'} maxLength={4} height={'36px'} width={'300px'} alignment={'left'} /> value={this.state.navlist[0].text} placeholder={"首页"} labelWidth={'0px'} maxLength={5} height={'36px'} width={'300px'} alignment={'left'} />
</FormItem> </FormItem>
</div> </div>
<div className="component-item"> <div className="component-item">
<div className="v-editItem"> <div className="v-editItem">
<span>订单</span> <span>订单</span>
<p className="dflexacsa"><span className="showType">显示</span> <p className="dflexacsa"><span className="showType">{this.state.navlist[1].iswitch?'显示':'隐藏'}</span>
<Switch <Switch
checked={this.state.navlist[1].iswitch} checked={this.state.navlist[1].iswitch}
onChange={checked=>this.handleChangeStatus(1,checked)} onChange={checked=>this.handleChangeStatus(1,checked)}
@ -301,13 +298,13 @@ export default class edittemplate extends React.Component {
Bus.emit('navlist', model2) Bus.emit('navlist', model2)
this.setState({ navlist: model2 }) this.setState({ navlist: model2 })
}} }}
value={this.state.navlist[1].text} placeholder={"请输入"} labelWidth={'0px'} maxLength={4} height={'36px'} width={'300px'} alignment={'left'} /> value={this.state.navlist[1].text} placeholder={"订单"} labelWidth={'0px'} maxLength={5} height={'36px'} width={'300px'} alignment={'left'} />
</FormItem> </FormItem>
</div> </div>
<div className="component-item"> <div className="component-item">
<div className="v-editItem"> <div className="v-editItem">
<span>我的券</span> <span>我的券</span>
<p className="dflexacsa"><span className="showType">显示</span> <p className="dflexacsa"><span className="showType">{this.state.navlist[2].iswitch?'显示':'隐藏'}</span>
<Switch <Switch
checked={this.state.navlist[2].iswitch} checked={this.state.navlist[2].iswitch}
onChange={checked=>this.handleChangeStatus(2,checked)} onChange={checked=>this.handleChangeStatus(2,checked)}
@ -356,7 +353,7 @@ export default class edittemplate extends React.Component {
this.setState({ navlist:model2}) this.setState({ navlist:model2})
Bus.emit('navlist', model2) Bus.emit('navlist', model2)
}} }}
value={this.state.navlist[2].text} placeholder={"请输入"} labelWidth={'0px'} maxLength={4} height={'36px'} width={'300px'} alignment={'left'} /> value={this.state.navlist[2].text} placeholder={"我的券"} labelWidth={'0px'} maxLength={5} height={'36px'} width={'300px'} alignment={'left'} />
</FormItem> </FormItem>
</div> </div>
<div className="color-control"> <div className="color-control">

View File

@ -13,8 +13,10 @@ export default class Searchbar extends React.Component {
this.state = { this.state = {
switch:false, switch:false,
shape: 'circular', shape: 'circular',
textAlign: 'left', textAlign: 'center',
borderColor: '#333', borderColor: '#333',
bgColor:'#a00',
fontColor:'#f3f4f5',
placeholder: '请输入关键字搜索' placeholder: '请输入关键字搜索'
} }
} }
@ -43,11 +45,31 @@ export default class Searchbar extends React.Component {
}); });
Bus.emit('borderColor', color) Bus.emit('borderColor', color)
} }
changebgColor = (color) => {
this.setState({
bgColor: color
});
Bus.emit('searchbgColor', color)
}
changefontColor = (color) => {
this.setState({
fontColor: color
});
Bus.emit('searchfontColor', color)
}
borderColorFn(cor) { borderColorFn(cor) {
this.setState({ borderColor: cor }); this.setState({ borderColor: cor });
Bus.emit('borderColor', cor) Bus.emit('borderColor', cor)
} }
bgColorFn(cor) {
this.setState({ bgColor: cor });
Bus.emit('searchbgColor', cor)
}
fontColorFn(cor) {
this.setState({ fontColor: cor });
Bus.emit('searchfontColor', cor)
}
componentWillUnmount() { componentWillUnmount() {
let oldobj = JSON.parse(sessionStorage.getItem('editorConfig')); let oldobj = JSON.parse(sessionStorage.getItem('editorConfig'));
let couponList = oldobj.couponList; let couponList = oldobj.couponList;
@ -56,7 +78,7 @@ export default class Searchbar extends React.Component {
sessionStorage.setItem('editorConfig', JSON.stringify(oldobj)); sessionStorage.setItem('editorConfig', JSON.stringify(oldobj));
} }
render() { render() {
let { shape, textAlign, borderColor, placeholder } = this.state; let { shape, textAlign, borderColor, placeholder,bgColor,fontColor } = this.state;
return ( return (
<div className="assembly"> <div className="assembly">
<div className='control page-title-control'> <div className='control page-title-control'>
@ -80,7 +102,7 @@ export default class Searchbar extends React.Component {
<RadioButton value={"right"}>居右</RadioButton> <RadioButton value={"right"}>居右</RadioButton>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem labelname="框体颜色:" labelwidth="80px"> <FormItem required={false} labelname="框体颜色:" labelwidth="80px">
<div className="colorItemfont dfleac"> <div className="colorItemfont dfleac">
<span style={{ border: '1px solid #f1f2f3' }} className={borderColor == '#fff' ? "cicle activecicle" : "cicle"} onClick={() => { this.borderColorFn('#fff') }}></span> <span style={{ border: '1px solid #f1f2f3' }} className={borderColor == '#fff' ? "cicle activecicle" : "cicle"} onClick={() => { this.borderColorFn('#fff') }}></span>
<span className={borderColor == '#04C160' ? "activecicle cicle cicle6" : "cicle cicle6"} onClick={() => { this.borderColorFn('#04C160') }}></span> <span className={borderColor == '#04C160' ? "activecicle cicle cicle6" : "cicle cicle6"} onClick={() => { this.borderColorFn('#04C160') }}></span>
@ -92,7 +114,31 @@ export default class Searchbar extends React.Component {
</div> </div>
</div> </div>
</FormItem> </FormItem>
<FormItem labelname="提示文字:" prop="title" id="title" labelwidth="100px"> <FormItem required={false} labelname="背景颜色:" labelwidth="80px">
<div className="colorItemfont dfleac">
<span style={{ border: '1px solid #f1f2f3' }} className={borderColor == '#fff' ? "cicle activecicle" : "cicle"} onClick={() => { this.bgColorFn('#fff') }}></span>
<span className={borderColor == '#04C160' ? "activecicle cicle cicle6" : "cicle cicle6"} onClick={() => { this.bgColorFn('#04C160') }}></span>
<span className={borderColor == '#AE99D3' ? "activecicle cicle cicle3" : "cicle cicle3"} onClick={() => { this.bgColorFn('#AE99D3') }}></span>
<span className={borderColor == '#FACD6A' ? "activecicle cicle cicle4" : "cicle cicle4"} onClick={() => { this.bgColorFn('#FACD6A') }}></span>
<span className={borderColor == '#FE7962' ? "activecicle cicle cicle5" : "cicle cicle5"} onClick={() => { this.bgColorFn('#FE7962') }}></span>
<div className="selfset">
<ColorPicker className="setbgColor" color={bgColor} onChange={this.changebgColor} />
</div>
</div>
</FormItem>
<FormItem required={false} labelname="文字颜色:" labelwidth="80px">
<div className="colorItemfont dfleac">
<span style={{ border: '1px solid #f1f2f3' }} className={borderColor == '#fff' ? "cicle activecicle" : "cicle"} onClick={() => { this.fontColorFn('#fff') }}></span>
<span className={borderColor == '#04C160' ? "activecicle cicle cicle6" : "cicle cicle6"} onClick={() => { this.fontColorFn('#04C160') }}></span>
<span className={borderColor == '#AE99D3' ? "activecicle cicle cicle3" : "cicle cicle3"} onClick={() => { this.fontColorFn('#AE99D3') }}></span>
<span className={borderColor == '#FACD6A' ? "activecicle cicle cicle4" : "cicle cicle4"} onClick={() => { this.fontColorFn('#FACD6A') }}></span>
<span className={borderColor == '#FE7962' ? "activecicle cicle cicle5" : "cicle cicle5"} onClick={() => { this.fontColorFn('#FE7962') }}></span>
<div className="selfset">
<ColorPicker className="setbgColor" color={fontColor} onChange={this.changefontColor} />
</div>
</div>
</FormItem>
<FormItem required={false} labelname="提示文字:" labelwidth="100px">
<Ipt onChange={(e) => { <Ipt onChange={(e) => {
this.setState({ placeholder: e }) this.setState({ placeholder: e })
Bus.emit('placeholder', e) Bus.emit('placeholder', e)

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { ColorPicker, Notify, RadioGroup, RadioButton } from 'zent'; import { ColorPicker,ImageUpload, Notify, RadioGroup, RadioButton } from 'zent';
import "@/assets/comm.css" import "@/assets/comm.css"
import Form from "@/components/form/main" import Form from "@/components/form/main"
import FormItem from "@/components/form-item/main" import FormItem from "@/components/form-item/main"
@ -12,10 +12,12 @@ export default class Title extends React.Component {
super(props) super(props)
this.state = { this.state = {
switch:false, switch:false,
text: '', text: '商品标题',
textAlign: 'left', textAlign: 'left',
fontColor: '#333', fontColor: '#333',
fontSize: 1 fontSize: 1,
comstyle:1,
pic:''
} }
} }
componentWillMount(e) { componentWillMount(e) {
@ -50,6 +52,73 @@ export default class Title extends React.Component {
this.setState({ fontSize: e.target.value }) this.setState({ fontSize: e.target.value })
Bus.emit('fontSize', e.target.value) Bus.emit('fontSize', e.target.value)
} }
styleChange(e){
this.setState({ comstyle: e.target.value })
Bus.emit('comstyle', e.target.value)
}
onUploadChange(files) {
if (files.length > 0 && files[0].status == "success") {
this.setState({ pic: files[0].src })
Bus.emit('titlePic', files[0].src)
} else {
this.setState({ pic: ''})
Bus.emit('titlePic','')
}
};
onUploadError = (type, data) => {
if (type === 'overMaxAmount') {
Notify.error(`最多可上传 ${data.maxAmount} 张图片`);
} else if (type === 'overMaxSize') {
Notify.error(`图片大小不能超过 ${data.formattedMaxSize}`);
}
};
onUpload = (file, report) => {
let self = this;
console.log('上传头像', file);
return new Promise((resolve, reject) => {
let path = ""
let formdata = new FormData();
formdata.append("file", file)
formdata.append("path", "common_image")
uploadImg(formdata).then((res) => {
handelResponse(res, (req, msg) => {
path = req.path;
}, (err) => {
reject();
})
});
let count = 0;
const update = () => {
if (path) {
resolve(
path
);
}
else {
if (count < 100) {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {
reject();
}
}
};
setTimeout(update, 500);
});
};
componentWillUnmount() { componentWillUnmount() {
let oldobj = JSON.parse(sessionStorage.getItem('editorConfig')); let oldobj = JSON.parse(sessionStorage.getItem('editorConfig'));
@ -60,13 +129,20 @@ export default class Title extends React.Component {
} }
render() { render() {
return ( return (
<div> <div className="assembly">
<div className='control page-title-control'> <div className='control page-title-control'>
<h1 style={{ fontSize: '16px' }}>标题设置</h1> <h1 style={{ fontSize: '16px' }}>标题设置</h1>
</div> </div>
<div style={{ width: "92%", "margin": "0 auto", "overflow": "auto", "maxHeight": "100%" }}> <div style={{ width: "92%", "margin": "0 auto", "overflow": "auto", "maxHeight": "100%" }}>
<Form model={this.state.model} ref="form1"> <Form model={this.state.model} ref="form1">
<FormItem required={false} labelname="组件样式:" labelwidth="100px">
<RadioGroup onChange={(e) => { this.styleChange(e) }} value={this.state.comstyle}>
<RadioButton value={1}>文字</RadioButton>
<RadioButton value={2}>图片</RadioButton>
</RadioGroup>
</FormItem>
{
this.state.comstyle==1?<div>
<FormItem labelname="标题文字:" labelwidth="100px"> <FormItem labelname="标题文字:" labelwidth="100px">
<Ipt onChange={(e) => { <Ipt onChange={(e) => {
this.setState({ text: e }) this.setState({ text: e })
@ -104,6 +180,22 @@ export default class Title extends React.Component {
<RadioButton value={"big"}>A+</RadioButton> <RadioButton value={"big"}>A+</RadioButton>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
</div>:<FormItem labelname=":" prop="top" id="top" labelwidth="100px">
<ImageUpload
className="zent-image-upload-demo"
maxSize={5 * 1024 * 1024}
maxAmount={1}
multiple
sortable
tips="单张图片不超过 5M"
onChange={(e) => { this.onUploadChange(e) }}
onUpload={this.onUpload}
defaultFileList={this.state.pic ? [{ 'src': this.state.pic }] : null}
onError={this.onUploadError}
/>
</FormItem>
}
</Form> </Form>
</div> </div>

View File

@ -1,14 +1,16 @@
.searchBar-container{
padding: 4px 0;
box-sizing: border-box;
}
.searchBar{ .searchBar{
display: flex; display: flex;
justify-content: flex-end; justify-content: center;
justify-content: space-between; padding:0 10px;
padding:0 15px;
box-sizing: border-box; box-sizing: border-box;
i{ i{
width: 16px; width: 16px;
} }
.placeholder{ .placeholder{
flex: 1;
white-space:nowrap; /* 不换行 */ white-space:nowrap; /* 不换行 */
overflow:hidden; /* 内容超出宽度时隐藏超出部分的内容 */ overflow:hidden; /* 内容超出宽度时隐藏超出部分的内容 */

View File

@ -7,14 +7,14 @@ export default class searchBar extends React.Component {
} }
render() { render() {
let searchConfig=this.props.searchConfig; let searchConfig=this.props.searchConfig;
console.log(10,searchConfig);
return ( return (
<div className={searchConfig.shape +' searchBar'} style={{border:'1px solid '+searchConfig.borderColor}}> <div className="searchBar-container" style={{background:searchConfig.bgColor}}>
<div className={searchConfig.shape +' searchBar '+searchConfig.textAlign} style={{background:searchConfig.borderColor,color:searchConfig.fontColor}}>
<i className='marketing marketing-sousuo' /> <i className='marketing marketing-sousuo' />
<div className={searchConfig.textAlign +' placeholder'}> <div className='placeholder'>
{searchConfig.placeholder} {searchConfig.placeholder}
</div> </div>
</div>
</div> </div>
) )
} }

View File

@ -12,7 +12,7 @@ export default class edittemplate extends React.Component {
this.state = { this.state = {
clientY: 0, clientY: 0,
selectDom: '', selectDom: '',
icon:'' icon: '',
} }
} }
opendescFn() { opendescFn() {
@ -48,25 +48,32 @@ export default class edittemplate extends React.Component {
render() { render() {
let goodsConfig = this.props.goodsdata; let goodsConfig = this.props.goodsdata;
console.log(48,goodsConfig); let {backgroundImg,search,picture,title,bottomBar}=goodsConfig;
let naVisual=bottomBar.navlist.filter(item=>item.iswitch);
return ( return (
<div className="editor-main goodstemplate" style={{ background:goodsConfig.backgroundImg&&goodsConfig.backgroundImg.bgImg? `url('${goodsConfig.backgroundImg.bgImg}') center center /cover`:'#F2F7F8' }}> <div className="editor-main goodstemplate" style={{ background:backgroundImg && backgroundImg.bgImg ? `url('${backgroundImg.bgImg}') center center /cover` :backgroundImg.bgColor }}>
{ {
goodsConfig.search&&goodsConfig.search.iswitch? search && search.iswitch ?
<div onClick={e=>this.customComponent(e,'search','marketing-sousuolan-')} className={this.state.selectDom=='search'?'selectBorder':''} ref="search"><SearchBarView searchConfig={goodsConfig.search} /></div>:null <div onClick={e => this.customComponent(e, 'search', 'marketing-sousuolan-')} className={this.state.selectDom == 'search' ? 'selectBorder' : ''} ref="search"><SearchBarView searchConfig={search} /></div> : null
} }
<img src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png'} className="preBtn" /> <img src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png'} className="preBtn" />
{ {
!goodsConfig.top_image ? <img className="topbanner" src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/goodstop.png'} /> : <img className="topbanner" src={goodsConfig.top_image} /> !goodsConfig.top_image ? <img className="topbanner" src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/goodstop.png'} /> : <img className="topbanner" src={goodsConfig.top_image} />
} }
{ {
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 picture && picture.iswitch ? <div onClick={e => this.customComponent(e, 'picture', 'marketing-tupian')} ref="picture" className={this.state.selectDom == 'picture' ? 'selectBorder' : ''}><img src={picture.img} alt="" className="picture" /></div> : null
} }
{ {
goodsConfig.title&&goodsConfig.title.iswitch?<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}}>{goodsConfig.title.text}</div></div>:null title && title.iswitch && title.comstyle == 1 ? <div onClick={e => this.customComponent(e, 'title', 'marketing-fuwenbenkuang')} ref="title" className={this.state.selectDom == 'title' ? 'selectBorder' : ''}>
<div className={title.textAlign + ' content-title ' +title.fontSize} style={{ color: title.fontColor, fontWeight: 'bold' }}>{title.text}</div></div> : null
} }
{ {
goodsConfig.title&&goodsConfig.title.iswitch&&goodsConfig.title.text||goodsConfig.picture&&goodsConfig.picture.iswitch&&goodsConfig.picture.img?<div className="parting-line"></div>:null title && title.iswitch && title.comstyle == 2 ? <div onClick={e => this.customComponent(e, 'title', 'marketing-fuwenbenkuang')} ref="title" className={this.state.selectDom == 'title' ? 'selectBorder' : ''}>
<img src={title.pic} className="title-pic" />
</div> : null
}
{
(title && title.iswitch && title.text||title.pic) || picture && picture.iswitch && 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'} /> 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'} />
@ -81,7 +88,7 @@ export default class edittemplate extends React.Component {
goodsConfig.describe.type == 2 ? <img className="susactive_tip" onClick={this.opendescFn.bind(this)} src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png'} /> : null goodsConfig.describe.type == 2 ? <img className="susactive_tip" onClick={this.opendescFn.bind(this)} src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png'} /> : 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 bottomBar && bottomBar.iswitch&&naVisual.length>1 ? <div ref="bottomBar" onClick={e => this.customComponent(e, 'bottomBar', 'marketing-list')} className={this.state.selectDom == 'bottomBar' ? 'selectBottomBorder' : ''}><BottomBarView bottomBarConfig={bottomBar} /></div> : null
} }
{ {
@ -91,7 +98,6 @@ export default class edittemplate extends React.Component {
<span className="del-color" onClick={this.deleteFn.bind(this)}>删除</span> <span className="del-color" onClick={this.deleteFn.bind(this)}>删除</span>
</div> : null </div> : null
} }
</div> </div>
) )
} }

View File

@ -118,7 +118,7 @@
} }
.goodstemplate { .goodstemplate {
overflow-y: auto; // overflow-y: auto;
.selectBorder { .selectBorder {
z-index: 2; z-index: 2;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
@ -129,6 +129,9 @@
background: rgba(25,133,255,.2); background: rgba(25,133,255,.2);
content: ""; content: "";
} }
.title-pic{
height:40px;
}
.selectBottomBorder { .selectBottomBorder {
position: absolute; position: absolute;
left: 0; left: 0;
@ -153,12 +156,11 @@
.searchBar { .searchBar {
width: 80%; width: 80%;
margin: 2% 10%; margin: 2% 15%;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
padding-left: 15px;
box-sizing: border-box; box-sizing: border-box;
border: 1px solid #333; border:0;
border-radius: 20px; border-radius: 20px;
} }
} }

View File

@ -80,21 +80,26 @@ let couponProduct_list = {
}, },
backgroundImg: { backgroundImg: {
iswitch:false, iswitch:false,
bgImg: '' bgImg: '',
bgColor:'#f2f3f4'
}, },
search: { search: {
iswitch: false, iswitch: false,
shape: 'circular', shape: 'circular',
textAlign: 'left', textAlign: 'center',
borderColor: '#333', borderColor: '#333',
bgColor:'#a00',
fontColor:'#f3f4f5',
placeholder: '请输入关键字搜索' placeholder: '请输入关键字搜索'
}, },
title: { title: {
iswitch: false, iswitch: false,
text: 'circular', text: '商品标题',
textAlign: 'left', textAlign: 'left',
fontColor: '#333', fontColor: '#333',
fontSize: 1 fontSize: 1,
comstyle:1,
pic:''
}, },
bottomBar: { bottomBar: {
iswitch:false, iswitch:false,
@ -192,6 +197,12 @@ export default class edittemplate extends React.Component {
bgImgConfig.backgroundImg.bgImg = prop bgImgConfig.backgroundImg.bgImg = prop
this.setState({ product_list: bgImgConfig }) this.setState({ product_list: bgImgConfig })
}) })
Bus.addListener('globalColor', (prop) => {
let bgImgConfig = this.state.product_list
bgImgConfig.backgroundImg.bgColor = prop
this.setState({ product_list: bgImgConfig })
})
Bus.addListener('shape', (prop) => { Bus.addListener('shape', (prop) => {
let searchConfig = this.state.product_list let searchConfig = this.state.product_list
searchConfig.search.shape = prop searchConfig.search.shape = prop
@ -212,7 +223,28 @@ export default class edittemplate extends React.Component {
searchConfig.search.borderColor = prop searchConfig.search.borderColor = prop
this.setState({ product_list: searchConfig }) this.setState({ product_list: searchConfig })
}) })
Bus.addListener('searchbgColor', (prop) => {
let searchConfig = this.state.product_list
searchConfig.search.bgColor = prop
this.setState({ product_list: searchConfig })
})
Bus.addListener('searchfontColor', (prop) => {
let searchConfig = this.state.product_list
searchConfig.search.fontColor = prop
this.setState({ product_list: searchConfig })
})
//标题设置 //标题设置
Bus.addListener('comstyle', (prop) => {
let titleConfig = this.state.product_list
titleConfig.title.comstyle = prop
this.setState({ product_list: titleConfig })
})
Bus.addListener('titlePic', (prop) => {
let titleConfig = this.state.product_list
titleConfig.title.pic = prop
this.setState({ product_list: titleConfig })
})
Bus.addListener('title', (prop) => { Bus.addListener('title', (prop) => {
let titleConfig = this.state.product_list let titleConfig = this.state.product_list
titleConfig.title.text = prop titleConfig.title.text = prop

View File

@ -8,7 +8,7 @@
// background-color: #f5f7f8; // background-color: #f5f7f8;
height: 100%; height: 100%;
left: 0; left: 0;
margin: 0 485px 0 250px; margin: 0 430px 0 325px;
overflow-y: scroll; overflow-y: scroll;
position: absolute; position: absolute;
right: 0; right: 0;