浏览代码

fix: 调整店铺装修页面

周玉环 1 天之前
父节点
当前提交
71f4c667e7

+ 14 - 6
xinkeaboard-seller/src/pages/store/pc_diy/adv_02.js

@@ -45,8 +45,8 @@ export default class Adv_02 extends Component {
         type: 'adv_02',
         left: {
           type: 'single_img',
-          width: 210,
-          height: 344,//高度为0的话表示不限制
+          width: 250,
+          height: 540,//高度为0的话表示不限制
           data: {
             imgUrl: 'https://img.alicdn.com/simba/img/TB1jsBeKYPpK1RjSZFFSuu5PpXa.jpg',
             imgPath: '/images/brand/3e56e20d-453d-4cf8-906f-a928de37ce6a.png',
@@ -65,8 +65,8 @@ export default class Adv_02 extends Component {
         },//中间商品信息
         right: {
           type: 'more_img',
-          width: 242,
-          height: 108,
+          width: 150,
+          height: 150,
           data: [{
             imgUrl: 'https://img.alicdn.com/simba/img/TB1jsBeKYPpK1RjSZFFSuu5PpXa.jpg',
             imgPath: '/images/brand/3e56e20d-453d-4cf8-906f-a928de37ce6a.png',
@@ -98,18 +98,26 @@ export default class Adv_02 extends Component {
     total_num: 0,
   };//商品选择器参数
 
+  parseData = (tpl) => {
+		tpl.right.width = 250;
+		tpl.right.height = 150;
+		tpl.left.width = 250;
+		tpl.left.height = 540;
+
+		return tpl;
+	}
 
   componentDidMount() {
     let { tpl_info } = this.state;
     this.setState({
-      data: tpl_info,
+      data: this.parseData(tpl_info),
     });
   }
 
   componentWillReceiveProps(nextProps, nextContext) {
     let { data } = this.state;
     if (JSON.stringify(nextProps.tpl_info) != JSON.stringify(data)) {
-      data = nextProps.tpl_info;
+      data = this.parseData(nextProps.tpl_info);
       this.setState({ data });
     }
   }

+ 16 - 3
xinkeaboard-seller/src/pages/store/pc_diy/adv_12.js

@@ -39,7 +39,7 @@ export default class Adv_12 extends Component {
 				type: 'adv_12',
 				left: {
 					width: 480,
-					height: 550,//高度为0的话表示不限制
+					height: 535,//高度为0的话表示不限制
 					data: [{
 						imgUrl: '',
 						imgPath: '',
@@ -137,18 +137,31 @@ export default class Adv_12 extends Component {
 		};
 	}
 
+	parseData = (tpl) => {
+		tpl.right.top.width = 450;
+	    tpl.right.top.height = 215;
+		tpl.right.bottom.width = 220;
+		tpl.right.bottom.height = 215;
+		tpl.center.width = 220;
+		tpl.center.height = 250;
+		tpl.left.width = 480;
+		tpl.left.height = 535;
+
+		return tpl;
+	}
+
 
 	componentDidMount() {
 		let { tpl_info } = this.state;
 		this.setState({
-			data: tpl_info,
+			data: this.parseData(tpl_info),
 		});
 	}
 
   componentWillReceiveProps(nextProps, nextContext) {
     let { data } = this.state;
     if (JSON.stringify(nextProps.tpl_info) != JSON.stringify(data)) {
-      data = nextProps.tpl_info;
+      data = this.parseData(nextProps.tpl_info);
       this.setState({ data });
     }
   }

+ 17 - 2
xinkeaboard-seller/src/pages/store/pc_diy/adv_13.js

@@ -156,18 +156,33 @@ export default class Adv_13 extends Component {
 		};
 	}
 
+	parseData = (tpl) => {
+		tpl.left.top.width = 450;
+	    tpl.left.top.height = 215;
+		tpl.left.bottom.width = 220;
+		tpl.left.bottom.height = 215;
+		tpl.center.top.width = 450;
+		tpl.center.top.height = 215;
+		tpl.center.bottom.width = 220;
+		tpl.center.bottom.height = 215;
+		tpl.right.width = 480;
+		tpl.right.height = 535;
+
+		return tpl;
+	}
+
 
 	componentDidMount() {
 		let { tpl_info } = this.state;
 		this.setState({
-			data: tpl_info,
+			data: this.parseData(tpl_info),
 		});
 	}
 
   componentWillReceiveProps(nextProps, nextContext) {
     let { data } = this.state;
     if (JSON.stringify(nextProps.tpl_info) != JSON.stringify(data)) {
-      data = nextProps.tpl_info;
+      data = this.parseData(nextProps.tpl_info);
       this.setState({ data });
     }
   }

+ 1 - 1
xinkeaboard-seller/src/pages/store/pc_diy/edit_diy_page.js

@@ -774,7 +774,7 @@ export default class Edit_diy_page extends Component {
                                 </div>
                               </div>
                               <Fragment>
-                                <div className={`${styles.diy_part_wrap} ${styles.allow_show_edit}`} style={{backgroundColor:item.data.bg_color!=undefined&&item.data.bg_color?item.data.bg_color:'#fff',paddingTop:item.data.padding_top!=undefined&&item.data.padding_top?item.data.padding_top:0,paddingBottom:item.data.padding_bottom!=undefined&&item.data.padding_bottom?item.data.padding_bottom:0}}>
+                                <div className={`${styles.diy_part_wrap} ${styles.allow_show_edit}`} style={{backgroundColor:item.data.bg_color!=undefined&&item.data.bg_color?item.data.bg_color:'#fff',marginTop:item.data.padding_top!=undefined&&item.data.padding_top?item.data.padding_top:0,marginBottom:item.data.padding_bottom!=undefined&&item.data.padding_bottom?item.data.padding_bottom:0}}>
                                   {data_json.type == 'adv_01' &&
                                   <Adv_01 tpl_info={data_json} full_screen={item.data.full_screen!=undefined?item.data.full_screen:0}
                                           save_tpl_data={(val, html) => this.save_tpl_data(val, html, index)}/>

+ 8 - 5
xinkeaboard-seller/src/pages/store/pc_diy/pcdecorate.less

@@ -498,17 +498,20 @@ a {
 
 .adv_04_wrap .floor_goods .item {
   float: left;
-  width: 286px;
+  width: 288px;
   height: 326px;
   background-color: #FFF;
 }
 
-.adv_04_wrap .floor_goods .item {
-  border: 1px solid #f2f2f2;
-  border-right: none;
+.adv_04_wrap .floor_goods .item:nth-child(n + 6) {
+  border-bottom: 1px solid #f2f2f2;
+}
+.adv_04_wrap .floor_goods .item:nth-child(-n + 6) {
+  border-top: 1px solid #f2f2f2;
+  border-bottom: 1px solid #f2f2f2;
 }
 
-.adv_04_wrap .floor_goods .item:last-child{
+.adv_04_wrap .floor_goods .item {
   border-right: 1px solid #f2f2f2;
 }
 

+ 4 - 0
xinkeaboard-web/assets/style/decorate.scss

@@ -2012,6 +2012,10 @@
   margin: 10px 0px;
   position: relative;
   overflow: hidden;
+
+  &:first-child {
+    margin-bottom: 20px;
+  }
 }
 
 .adv_13 .adv_13_wrap .item.right .img_bottom {