|
@@ -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 });
|
|
|
}
|
|
|
}
|