Commit 88fb81f3 by wujiabao

fix bug

parent d10f92a4
...@@ -16,13 +16,14 @@ class BreakageProductDetail extends React.Component{ ...@@ -16,13 +16,14 @@ class BreakageProductDetail extends React.Component{
} }
], ],
statusColor:0, statusColor:0,
positionColor:0 positionColor:0,
productPos:[1,2,3,4]
} }
} }
render (){ render (){
let {breakageProductInfo}=this.props; let {breakageProductInfo}=this.props;
let {packStatus,statusColor,positionColor} =this.state; let {packStatus,statusColor,positionColor,productPos} =this.state;
return ( return (
<div> <div>
{ {
...@@ -61,7 +62,17 @@ class BreakageProductDetail extends React.Component{ ...@@ -61,7 +62,17 @@ class BreakageProductDetail extends React.Component{
<li><img src={UTILPATH.localImg.defaultImg} alt=""/><span className={'font28 col333'}>左</span></li> <li><img src={UTILPATH.localImg.defaultImg} alt=""/><span className={'font28 col333'}>左</span></li>
<li><img src={UTILPATH.localImg.defaultImg} alt=""/><span className={'font28 col333'}>右</span></li> */} <li><img src={UTILPATH.localImg.defaultImg} alt=""/><span className={'font28 col333'}>右</span></li> */}
{ {
breakageProductInfo.product.skuPositionList && breakageProductInfo.product.skuPositionList.map((item,key)=>{ breakageProductInfo.product.skuPositionList&&breakageProductInfo.product.skuPositionList.length===0?
productPos.map((item,key)=>{
return <li
key={key}
className={positionColor===key?'active':''}
onClick={this.changePositionColor.bind(this,key)}
>
<img src={UTILPATH.localImg.defaultImg} alt=""/>
<span className={'font28 col333'}>{item}</span>
</li>
}):breakageProductInfo.product.skuPositionList.map((item,key)=>{
return <li return <li
key={key} key={key}
className={positionColor===key?'active':''} className={positionColor===key?'active':''}
...@@ -76,7 +87,7 @@ class BreakageProductDetail extends React.Component{ ...@@ -76,7 +87,7 @@ class BreakageProductDetail extends React.Component{
</div> </div>
</div> </div>
<div className={'breakProductPosition'}> <div className={'breakProductPosition'}>
{<img src={breakageProductInfo.product.skuPositionList[positionColor].filePath} alt=""/>} {breakageProductInfo.product.skuPositionList[positionColor]?<img src={breakageProductInfo.product.skuPositionList[positionColor].filePath} alt=""/>:<img src={UTILPATH.localImg.defaultImg} alt="" />}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
.pagebox .ProductPosition .imgList { .pagebox .ProductPosition .imgList {
display: flex; display: flex;
margin-top: 0.16666666666666666rem; margin-top: 0.16666666666666666rem;
height: 1.5833333333333333rem; height: 1.65rem;
} }
.pagebox .ProductPosition ul li { .pagebox .ProductPosition ul li {
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
} }
.pagebox .ProductPosition ul li.active { .pagebox .ProductPosition ul li.active {
border: 6px solid #05bb09; border: 3px solid #05bb09;
} }
.breakageInfo { .breakageInfo {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment