fix(系统模板):修复在优惠券中增加了图片、背景图、搜索栏、底部栏,切换进行保存时,增加的基础组件消失不见
This commit is contained in:
parent
57fc9746be
commit
3698ffab6f
|
@ -10,6 +10,7 @@ import BottomBar from './bottomBar';
|
||||||
import Picture from './picture.js'; //白名单商品页面
|
import Picture from './picture.js'; //白名单商品页面
|
||||||
import SearchBar from './searchBar.js';
|
import SearchBar from './searchBar.js';
|
||||||
import Title from './title';
|
import Title from './title';
|
||||||
|
import _ from "lodash"
|
||||||
export default class couponGoodConfig extends React.Component {
|
export default class couponGoodConfig extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
@ -113,35 +114,29 @@ export default class couponGoodConfig extends React.Component {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
const update = () => {
|
const update = () => {
|
||||||
if (path) {
|
if (path) {
|
||||||
|
|
||||||
resolve(
|
resolve(
|
||||||
path
|
path
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
if (count < 100) {
|
if (count < 100) {
|
||||||
count += 2;
|
count += 2;
|
||||||
report(count);
|
report(count);
|
||||||
setTimeout(update, 500);
|
setTimeout(update, 500);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
setTimeout(update, 500);
|
setTimeout(update, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
let oldobj = JSON.parse(sessionStorage.getItem('editorConfig'));
|
let oldobj = JSON.parse(sessionStorage.getItem('editorConfig'));
|
||||||
|
let {top_image,list,font_color,button_color,describe}=this.state.model;
|
||||||
let coupon = oldobj.coupon
|
let coupon = oldobj.coupon
|
||||||
coupon.product_list = this.state.model;
|
coupon.product_list =_.assign(coupon.product_list,{top_image,list,font_color,button_color,describe});
|
||||||
oldobj.coupon = coupon;
|
oldobj.coupon = coupon;
|
||||||
sessionStorage.setItem('editorConfig', JSON.stringify(oldobj));
|
sessionStorage.setItem('editorConfig', JSON.stringify(oldobj));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
.goodstemplate,
|
.goodstemplate,
|
||||||
.detailstemplate {
|
.detailstemplate {
|
||||||
height: 653px;
|
height: 653px;
|
||||||
background: #F2F7F8;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
Loading…
Reference in New Issue