Commit 7c1590fe by wujiabao

修改图片

parent 800f80dc
......@@ -38,7 +38,7 @@ class BreakageProductDetail extends React.Component{
<div className={'breakProduct'}>
<div className={'breakProductInfo'}>
<div className={'breakProductImg'}>
<img src={breakageProductInfo.product&&UTILPATH.getNewFormatPath(breakageProductInfo.product.skuImage,'middle')} alt=""/>
<img src={breakageProductInfo.product&&UTILPATH.getPic(breakageProductInfo.product.skuImage,'middle')} alt=""/>
</div>
<div style={{textAlign:'left',marginLeft:UTILPATH.getRemByPx(10)}}>
<h2 className={'col333 font40'} style={
......
......@@ -32,8 +32,8 @@ const getNewPath = (path,host)=>{
*/
const getNewFormatPath = (path,format)=>{
let particial = path.split('.');
if(particial.length === 2){
particial[0] = particial[0] + '_' + format;
if(particial.length === 4){
particial[2] = particial[2] + '_' + format;
return particial.join('.')
} else {
return path;
......
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