Authored by 陈轩

fix

const yoho = require('yoho');
const getImgHost = function(url) {
const getImgHost = function(url, bucket = 'goodsimg') {
let urlArr = url.split('/'),
num = urlArr[urlArr.length - 1].substr(1, 1),
domain = 'static.yhbimg.com/goodsimg';
domain = `static.yhbimg.com/${bucket}`;
url = domain + url;
if (num === '1') {
... ...
... ... @@ -15,7 +15,7 @@
}
p {
font-size: 21px;
font-size: 30px;
text-align: center;
margin: 20px 40px 48px;
}
... ...
... ... @@ -11,4 +11,5 @@
.return select {
background: transparent;
border: 0;
-webkit-appearance: none;
}
... ...
... ... @@ -11,11 +11,9 @@
<h2 class="card-label">
<a href="{{item | goodsUrl}}" class="line-clamp-2">{{item.productName}}</a>
</h2>
<div class="good-price-box clearfix">
<span class="good-price" :class="{'old-price': item.marketPrice}" v-if="item.marketPrice">¥ {{item.marketPrice | toFixed}}</span>
<span class="good-price" :class="{'sale-price': item.marketPrice}">¥ {{item.salesPrice | toFixed}}</span>
</div>
</div>
</li>
</ul>
<p class="cardlist--loading text-center" v-show="inLoading">正在加载...</p>
... ... @@ -110,19 +108,15 @@
}
}
.good-price-box {
white-space: nowrap;
}
.good-price {
display: inline-block;
width: 50%;
color: #b0b0b0;
margin-right: 10px;
&:last-of-type {
margin-right: 0;
}
&.old-price {
text-decoration: line-through;
}
&.sale-price {
color: #d0021b;
}
... ...
... ... @@ -218,7 +218,7 @@
return true;
}
if (isSpecialReason && !(goods.mark && goods.evidence_images)) {
if (isSpecialReason && !(goods.remark && goods.evidence_images && goods.evidence_images.length)) {
msg = '换货原因 请填写完整';
return true;
}
... ...
... ... @@ -60,7 +60,7 @@
<blockquote v-if="goods.remark">{{goods.remark}}</blockquote>
<ul v-if="goods.evidenceImages.length > 0" class="exchange-img">
<li v-for="image in goods.evidenceImages">
<img :src="image">
<img :src="image | resize 154 154">
</li>
</ul>
</div>
... ... @@ -169,9 +169,9 @@
this.id = this.detail.id;
this.sourceOrderCode = this.detail.sourceOrderCode;
this.detail.goodsList.forEach(d => {
d.evidenceImages = d.evidenceImages.map(p => {
return util.getImgHost(p) + '?imageView2/2/w/154/h/154';
})
// d.evidenceImages = d.evidenceImages.map(p => {
// return util.getImgHost(p) + '?imageView2/2/w/154/h/154';
// })
});
}
});
... ...
... ... @@ -21,7 +21,7 @@
<span v-on:click="deleteImage(image.index)" class="icon icon-close"></span>
<img v-bind:src="image.path">
</div>
<upload v-show="imageListForShow.length < 4" class="image-item" v-bind:image-list="product.imageList"></upload>
<upload v-show="imageListForShow.length < 4" class="image-item" v-bind:image-list="product.imageList" v-bind:bucket="bucket"></upload>
</div>
</template>
</div>
... ... @@ -37,6 +37,7 @@
props: ['product', 'data'],
data() {
return {
bucket: 'evidenceImages',
reasons: [],
specialReasons: [],
specialNotice: {}
... ... @@ -49,7 +50,7 @@
this.product.imageList.forEach((path, index) => {
list.push({
index: index,
path: util.getImgHost(path) + '?imageView2/2/w/160/h/160'
path: util.getImgHost(path, this.bucket) + '?imageView2/2/w/160/h/160'
});
});
... ...