Authored by 陈轩

fix

1 const yoho = require('yoho'); 1 const yoho = require('yoho');
2 2
3 -const getImgHost = function(url) { 3 +const getImgHost = function(url, bucket = 'goodsimg') {
4 let urlArr = url.split('/'), 4 let urlArr = url.split('/'),
5 num = urlArr[urlArr.length - 1].substr(1, 1), 5 num = urlArr[urlArr.length - 1].substr(1, 1),
6 - domain = 'static.yhbimg.com/goodsimg'; 6 + domain = `static.yhbimg.com/${bucket}`;
7 7
8 url = domain + url; 8 url = domain + url;
9 if (num === '1') { 9 if (num === '1') {
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 } 15 }
16 16
17 p { 17 p {
18 - font-size: 21px; 18 + font-size: 30px;
19 text-align: center; 19 text-align: center;
20 margin: 20px 40px 48px; 20 margin: 20px 40px 48px;
21 } 21 }
@@ -11,4 +11,5 @@ @@ -11,4 +11,5 @@
11 .return select { 11 .return select {
12 background: transparent; 12 background: transparent;
13 border: 0; 13 border: 0;
  14 + -webkit-appearance: none;
14 } 15 }
@@ -11,11 +11,9 @@ @@ -11,11 +11,9 @@
11 <h2 class="card-label"> 11 <h2 class="card-label">
12 <a href="{{item | goodsUrl}}" class="line-clamp-2">{{item.productName}}</a> 12 <a href="{{item | goodsUrl}}" class="line-clamp-2">{{item.productName}}</a>
13 </h2> 13 </h2>
14 - <div class="good-price-box clearfix">  
15 <span class="good-price" :class="{'old-price': item.marketPrice}" v-if="item.marketPrice">¥ {{item.marketPrice | toFixed}}</span> 14 <span class="good-price" :class="{'old-price': item.marketPrice}" v-if="item.marketPrice">¥ {{item.marketPrice | toFixed}}</span>
16 <span class="good-price" :class="{'sale-price': item.marketPrice}">¥ {{item.salesPrice | toFixed}}</span> 15 <span class="good-price" :class="{'sale-price': item.marketPrice}">¥ {{item.salesPrice | toFixed}}</span>
17 </div> 16 </div>
18 - </div>  
19 </li> 17 </li>
20 </ul> 18 </ul>
21 <p class="cardlist--loading text-center" v-show="inLoading">正在加载...</p> 19 <p class="cardlist--loading text-center" v-show="inLoading">正在加载...</p>
@@ -110,19 +108,15 @@ @@ -110,19 +108,15 @@
110 } 108 }
111 } 109 }
112 110
113 - .good-price-box {  
114 - white-space: nowrap;  
115 - }  
116 -  
117 .good-price { 111 .good-price {
118 - display: inline-block;  
119 - width: 50%;  
120 color: #b0b0b0; 112 color: #b0b0b0;
121 - 113 + margin-right: 10px;
  114 + &:last-of-type {
  115 + margin-right: 0;
  116 + }
122 &.old-price { 117 &.old-price {
123 text-decoration: line-through; 118 text-decoration: line-through;
124 } 119 }
125 -  
126 &.sale-price { 120 &.sale-price {
127 color: #d0021b; 121 color: #d0021b;
128 } 122 }
@@ -218,7 +218,7 @@ @@ -218,7 +218,7 @@
218 return true; 218 return true;
219 } 219 }
220 220
221 - if (isSpecialReason && !(goods.mark && goods.evidence_images)) { 221 + if (isSpecialReason && !(goods.remark && goods.evidence_images && goods.evidence_images.length)) {
222 msg = '换货原因 请填写完整'; 222 msg = '换货原因 请填写完整';
223 return true; 223 return true;
224 } 224 }
@@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
60 <blockquote v-if="goods.remark">{{goods.remark}}</blockquote> 60 <blockquote v-if="goods.remark">{{goods.remark}}</blockquote>
61 <ul v-if="goods.evidenceImages.length > 0" class="exchange-img"> 61 <ul v-if="goods.evidenceImages.length > 0" class="exchange-img">
62 <li v-for="image in goods.evidenceImages"> 62 <li v-for="image in goods.evidenceImages">
63 - <img :src="image"> 63 + <img :src="image | resize 154 154">
64 </li> 64 </li>
65 </ul> 65 </ul>
66 </div> 66 </div>
@@ -169,9 +169,9 @@ @@ -169,9 +169,9 @@
169 this.id = this.detail.id; 169 this.id = this.detail.id;
170 this.sourceOrderCode = this.detail.sourceOrderCode; 170 this.sourceOrderCode = this.detail.sourceOrderCode;
171 this.detail.goodsList.forEach(d => { 171 this.detail.goodsList.forEach(d => {
172 - d.evidenceImages = d.evidenceImages.map(p => {  
173 - return util.getImgHost(p) + '?imageView2/2/w/154/h/154';  
174 - }) 172 + // d.evidenceImages = d.evidenceImages.map(p => {
  173 + // return util.getImgHost(p) + '?imageView2/2/w/154/h/154';
  174 + // })
175 }); 175 });
176 } 176 }
177 }); 177 });
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <span v-on:click="deleteImage(image.index)" class="icon icon-close"></span> 21 <span v-on:click="deleteImage(image.index)" class="icon icon-close"></span>
22 <img v-bind:src="image.path"> 22 <img v-bind:src="image.path">
23 </div> 23 </div>
24 - <upload v-show="imageListForShow.length < 4" class="image-item" v-bind:image-list="product.imageList"></upload> 24 + <upload v-show="imageListForShow.length < 4" class="image-item" v-bind:image-list="product.imageList" v-bind:bucket="bucket"></upload>
25 </div> 25 </div>
26 </template> 26 </template>
27 </div> 27 </div>
@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
37 props: ['product', 'data'], 37 props: ['product', 'data'],
38 data() { 38 data() {
39 return { 39 return {
  40 + bucket: 'evidenceImages',
40 reasons: [], 41 reasons: [],
41 specialReasons: [], 42 specialReasons: [],
42 specialNotice: {} 43 specialNotice: {}
@@ -49,7 +50,7 @@ @@ -49,7 +50,7 @@
49 this.product.imageList.forEach((path, index) => { 50 this.product.imageList.forEach((path, index) => {
50 list.push({ 51 list.push({
51 index: index, 52 index: index,
52 - path: util.getImgHost(path) + '?imageView2/2/w/160/h/160' 53 + path: util.getImgHost(path, this.bucket) + '?imageView2/2/w/160/h/160'
53 }); 54 });
54 }); 55 });
55 56