fix(模板中心):修复模板中心点击【使用】按钮进入编辑器页面,默认回显数据异常

style:清除console
This commit is contained in:
Apple 2022-10-17 14:22:44 +08:00
parent 82ce579267
commit 5bb0066e97
22 changed files with 13 additions and 44 deletions

View File

@ -84,7 +84,6 @@ export default class edittemplate extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {
reject();

View File

@ -58,7 +58,6 @@ export default class bottomBar extends React.Component {
}
}
render() {
console.log(53,this.state);
let active=this.state.active;
return (
<ul className='bottomBar-view' style={{ background:this.props.bottomBarConfig.background? `url('${this.props.bottomBarConfig.background}') center center /cover`:'#f9f9f9'}}>

View File

@ -48,7 +48,6 @@ export default class backPicture extends React.Component {
};
onUpload = (file, report) => {
let self = this;
console.log('上传头像', file);
return new Promise((resolve, reject) => {
let path = ""
let formdata = new FormData();
@ -78,7 +77,6 @@ export default class backPicture extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {

View File

@ -40,7 +40,6 @@ export default class edittemplate extends React.Component {
}
}
changeConfig(attr,value){
console.log(36,attr,value);
this.setState({ [attr]: value })
Bus.emit('bottomBarConfig', {attr,value})
}
@ -83,7 +82,6 @@ export default class edittemplate extends React.Component {
let model = this.state.navlist;
model[index].iswitch = checked?1:0;
this.setState({ navlist: model })
console.log(86,model);
Bus.emit('bottomBarConfig', {attr:'navlist',value:model})
}

View File

@ -125,7 +125,6 @@ export default class couponGoodConfig extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {

View File

@ -76,7 +76,6 @@ export default class edittemplate extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {
reject();

View File

@ -28,7 +28,6 @@ export default class Searchbar extends React.Component {
}
//形状+颜色+框体颜色+背景颜色+文字颜色
changeConfig(attr,value){
console.log(36,attr,value);
this.setState({ [attr]: value })
Bus.emit('searchBarConfig', {attr,value})
}
@ -41,7 +40,6 @@ export default class Searchbar extends React.Component {
sessionStorage.setItem('editorConfig', JSON.stringify(oldobj));
}
render() {
console.log(83,this.state);
let { shape, textAlign, borderColor, placeholder,bgColor,fontColor } = this.state;
return (
<div className="assembly">

View File

@ -27,7 +27,6 @@ export default class Title extends React.Component {
}
}
changeConfig(attr,value){
console.log(36,attr,value);
this.setState({ [attr]: value })
Bus.emit('titleBarConfig', {attr,value})
}
@ -78,7 +77,6 @@ export default class Title extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {

View File

@ -122,7 +122,6 @@ export default class couponLandpage extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {

View File

@ -82,7 +82,6 @@ export default class edittemplate extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {
reject();

View File

@ -120,7 +120,6 @@ export default class edittemplate extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {

View File

@ -173,7 +173,6 @@ export default class edittemplate extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {

View File

@ -23,7 +23,6 @@ export default class edittemplate extends React.Component {
customComponent(e, name, icon, comName) {
//getBoundingClientRect().top ;获取div最顶边距离浏览器的位置
let offset_top = this.refs[name].getBoundingClientRect().top;
console.log(25, offset_top - 125);
this.setState({ clientY: (offset_top - 125), selectDom: name, icon: icon, comName });
if (name == 'searchBar') {
this.setState({ clientY: 0 });

View File

@ -173,8 +173,6 @@ export default class edittemplate extends React.Component {
Bus.addListener('componentLib', (prop) => {
let couponEditorInfo = _.cloneDeep(JSON.parse(sessionStorage.getItem('editorConfig')))
let coupongoodsConfig = this.state.product_list
console.log('coupongoodsConfig',coupongoodsConfig);
console.log('prop.attr',prop.attr);
coupongoodsConfig[prop.attr].iswitch = prop.value
this.setState({ product_list: coupongoodsConfig })
if(prop.value==0){
@ -212,7 +210,6 @@ export default class edittemplate extends React.Component {
})
//底部栏
Bus.addListener('bottomBarConfig', (prop) => {
console.log(203,prop);
let bottomConfig = this.state.product_list
bottomConfig.bottomBar[prop.attr] = prop.value;
this.setState({ product_list: bottomConfig })
@ -379,7 +376,6 @@ export default class edittemplate extends React.Component {
formdata.exchange = _.omit(infoExchange,['land[sort]','land[title]','thumb'])//优惠券
formdata.access_conf = infoWhite
formdata.coupon = infoCoupon
console.log(387,formdata);
if (myInfoData) {
//编辑
putSystemTemplate(myInfoData.id, formdata).then((res) => {
@ -517,7 +513,6 @@ export default class edittemplate extends React.Component {
}
//获取落地页数据
getlandConfig(c) {
console.log(578);
let landConfig = this.state.model
landConfig[c.attr] = c.value;
this.setState({ model: landConfig })
@ -687,7 +682,6 @@ export default class edittemplate extends React.Component {
}
componentWillUnmount() {
console.log('组件销毁');
if (document.querySelector('canvas')) {
document.querySelector('canvas').remove()
}
@ -698,7 +692,6 @@ export default class edittemplate extends React.Component {
this.setState({ componentOfconfig: c });
}
render() {
console.log(761, this.state);
return (
<div className='edittemplate'>
<div className='topHeader'>

View File

@ -13,7 +13,6 @@ export default class edittemplate extends React.Component {
this.props.opendesc(true)
}
render() {
console.log(16,this.props.detaildata);
return (
<div className="editor-main goodstemplate details-reduce">
<img src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png'} className="preBtn" />

View File

@ -116,7 +116,6 @@ export default class edittemplate extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {
reject();

View File

@ -86,7 +86,6 @@ export default class edittemplate extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {

View File

@ -117,7 +117,6 @@ export default class edittemplate extends React.Component {
count += 2;
report(count);
setTimeout(update, 500);
console.log("上传中")
}
else {

View File

@ -317,13 +317,9 @@ export default class acclist extends React.Component {
width={'260px'}
alignment={'left'}
onClearItem={(e) => {
console.log('清空')
this.setState({ key_word: '' })
}}
onChange={(e) => {
console.log(777777)
console.log(e)
this.setState({ key_word: e })
}}
wordSearch={(e) => {
@ -350,7 +346,7 @@ export default class acclist extends React.Component {
this.pageChange(e)
}}
checkChange={(selection) => {
console.log(selection)
}}
ComponentHandler={(com, rowData) => {
if (com == 'thumb') {

View File

@ -154,7 +154,6 @@ export default class mytemplate extends React.Component {
if(e) data.type_id=e;
getSystemTemplate(data).then(res => {
handelResponse(res, (req) => {
console.log(req)
this.setState({ system_template: req.data })
if (req.data.length < 10) {
this.setState({ endreq: false });
@ -209,7 +208,6 @@ export default class mytemplate extends React.Component {
}
}
}
console.log(14,previewInfo);
this.setState({ preview_visible: true,previewData:previewInfo, showType: row.page,moudleData: row, showPage: 1, pageStep: 1, activeHeight: 667, setStyle: { width: '375px', height: '667px', transform: 'scale(0.75)' } });
}
onUse(row, type) {
@ -224,6 +222,12 @@ export default class mytemplate extends React.Component {
sessionStorage.setItem("pageInfo", JSON.stringify(row))
sessionStorage.setItem("isSort", 0)
sessionStorage.setItem('pageChange', 0);
sessionStorage.setItem('mouldType', 1);
if (type) {
window.location.href = "/#/edittemplate?type=" + type;
} else {
window.location.href = "/#/edittemplate?type=" + row.page;
}
}, () => {
})
}).catch(() => {
@ -231,8 +235,6 @@ export default class mytemplate extends React.Component {
}else {
sessionStorage.setItem("pageInfo", JSON.stringify(row))
sessionStorage.setItem('pageChange', 1);
}
sessionStorage.setItem('mouldType', 1);
if (type) {
window.location.href = "/#/edittemplate?type=" + type;
@ -240,6 +242,7 @@ export default class mytemplate extends React.Component {
window.location.href = "/#/edittemplate?type=" + row.page;
}
}
}
toTop() {
this.refs.component.scrollTo({
top: 0,

View File

@ -53,7 +53,6 @@ export default class preview extends React.Component {
render() {
let propsData = this.props.data;
let goodsConfig = propsData.product_list;
console.log(56,goodsConfig);
let naVisual = [];
if (goodsConfig&&goodsConfig.bottomBar) {
naVisual = goodsConfig.bottomBar.navlist.filter((item) => item.iswitch==1);

View File

@ -83,7 +83,6 @@ const getAccountList = () => {
sessionStorage.setItem("showflag", true);
let menuList = response.menu;
if (response.menu && response.menu.length > 0) {
console.log(105,menuList);
sessionStorage.setItem(
"activeMenu",
JSON.stringify(response.menu)