解决优惠券白名单商品列表页面基础组建增加删除数据不匹配
This commit is contained in:
parent
17f38c3491
commit
10b4d02838
|
@ -13,7 +13,7 @@ export default class edittemplate extends React.Component {
|
|||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
iswitch:false,
|
||||
iswitch:true,
|
||||
comType:1,
|
||||
navlist:[
|
||||
{
|
||||
|
@ -53,6 +53,11 @@ export default class edittemplate extends React.Component {
|
|||
}
|
||||
}
|
||||
componentWillMount(e) {
|
||||
Bus.addListener('componentLibClose', (prop) => {
|
||||
if(prop=='bottomBar'){
|
||||
this.setState({iswitch:false})
|
||||
}
|
||||
})
|
||||
let config = JSON.parse(sessionStorage.getItem('editorConfig'));
|
||||
if (config && config.couponList && config.couponList.product_list) {
|
||||
let { navlist, defaultText, selectText, background,iswitch } = config.couponList.product_list.bottomBar;
|
||||
|
|
|
@ -11,19 +11,22 @@ export default class edittemplate extends React.Component {
|
|||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
iswitch:false,
|
||||
iswitch:true,
|
||||
img:'',
|
||||
jumpType:'0',//0不跳转 1跳转
|
||||
jumpUrl:''
|
||||
}
|
||||
}
|
||||
componentWillMount(e) {
|
||||
|
||||
Bus.addListener('componentLibClose', (prop) => {
|
||||
if(prop=='picture'){
|
||||
this.setState({iswitch:false})
|
||||
}
|
||||
})
|
||||
let config = JSON.parse(sessionStorage.getItem('editorConfig'));
|
||||
if (config && config.couponList && config.couponList.product_list) {
|
||||
let {img,jumpType,jumpUrl,iswitch}=config.couponList.product_list.picture;
|
||||
console.log(21,config.couponList.product_list.picture);
|
||||
this.setState({ img,jumpType,jumpUrl,iswitch});
|
||||
let {img,jumpType,jumpUrl}=config.couponList.product_list.picture;
|
||||
this.setState({ img,jumpType,jumpUrl});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,12 +101,13 @@ export default class edittemplate extends React.Component {
|
|||
componentWillUnmount() {
|
||||
let oldobj = JSON.parse(sessionStorage.getItem('editorConfig'));
|
||||
let couponList = oldobj.couponList;
|
||||
console.log(105,this.state);
|
||||
couponList.product_list.picture = _.cloneDeep(this.state);
|
||||
oldobj.couponList = couponList;
|
||||
sessionStorage.setItem('editorConfig', JSON.stringify(oldobj));
|
||||
}
|
||||
render() {
|
||||
console.log(105,this.state);
|
||||
|
||||
return (
|
||||
<div className="assembly">
|
||||
<div className='control page-title-control'>
|
||||
|
|
|
@ -11,7 +11,7 @@ export default class Searchbar extends React.Component {
|
|||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
switch:false,
|
||||
iswitch:true,
|
||||
shape: 'circular',
|
||||
textAlign: 'center',
|
||||
borderColor: '#333',
|
||||
|
@ -21,6 +21,13 @@ export default class Searchbar extends React.Component {
|
|||
}
|
||||
}
|
||||
componentWillMount(e) {
|
||||
//关闭
|
||||
Bus.addListener('componentLibClose', (prop) => {
|
||||
console.log(999,prop);
|
||||
if(prop=='search'){
|
||||
this.setState({iswitch:false})
|
||||
}
|
||||
})
|
||||
let config = JSON.parse(sessionStorage.getItem('editorConfig'));
|
||||
if (config && config.couponList && config.couponList.product_list) {
|
||||
let { shape, textAlign, borderColor, placeholder } = config.couponList.product_list.search;
|
||||
|
|
|
@ -11,7 +11,7 @@ export default class Title extends React.Component {
|
|||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
switch:false,
|
||||
switch:true,
|
||||
text: '商品标题',
|
||||
textAlign: 'left',
|
||||
fontColor: '#333',
|
||||
|
@ -21,6 +21,12 @@ export default class Title extends React.Component {
|
|||
}
|
||||
}
|
||||
componentWillMount(e) {
|
||||
Bus.addListener('componentLibClose', (prop) => {
|
||||
console.log(999,prop);
|
||||
if(prop=='title'){
|
||||
this.setState({iswitch:false})
|
||||
}
|
||||
})
|
||||
let config = JSON.parse(sessionStorage.getItem('editorConfig'));
|
||||
if (config && config.couponList && config.couponList.product_list) {
|
||||
let { text, textAlign, fontColor, fontSize } = config.couponList.product_list.title;
|
||||
|
|
|
@ -822,7 +822,7 @@ export default class edittemplate extends React.Component {
|
|||
this.setState({ componentOfconfig: c });
|
||||
}
|
||||
render() {
|
||||
console.log(761,this.state.model);
|
||||
console.log(761,this.state);
|
||||
return (
|
||||
<div className='edittemplate'>
|
||||
<div className='topHeader'>
|
||||
|
|
Loading…
Reference in New Issue