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