Authored by lzhy

测试bug修复

... ... @@ -12,7 +12,7 @@
<tr :key="index">
<td>{{ goods.productSku }}</td>
<td>
<img v-prod-img.sku="{ val: goods.productSku, size: '40x60' }" />
<img :src="prodImage({ sku: goods.productSku })" />
</td>
<td style="text-align: left">
<p>{{ goods.productName }}</p>
... ... @@ -67,14 +67,26 @@
</tr>
<tr>
<td colspan="13">
<div class="ivu-card">
<div class="ivu-card-head" style="text-align: left">
<p slot="title">参与促销</p>
</div>
<div style="text-align: left; padding: 10px;">
<template v-if="orderPromos">
<template v-for="(item, index) in orderPromos">
<Row :key="index">{{ item.promotionTitle }} {{ item.beginTime }} — {{ item.endTime }}</Row>
<Row :key="index">
{{ item.promotionTitle }}
<span v-if="item.beginTime || item.endTime">
( 有效期:{{ item.beginTime }} — {{ item.endTime }} )
</span>
</Row>
</template>
</template>
<template v-else>
<span>没有参加活动.</span>
</template>
</div>
</div>
</td>
</tr>
</tfoot>
... ... @@ -82,6 +94,7 @@
</template>
<script>
import prodImage from 'util/prod-image';
export default {
name: 'OrderGoodsInfo',
props: ['orderInfo', 'tableData', 'couponsData', 'goodsPromos', 'orderPromos'],
... ... @@ -126,6 +139,9 @@ export default {
],
};
},
methods: {
prodImage,
},
};
</script>
<style lang="scss">
... ...
... ... @@ -19,7 +19,7 @@
<template v-for="(goods, gindex) in item.goodsList">
<tr :key="tindex + '_' + gindex">
<td>
<img v-prod-img.sku="{ val: goods.productSku, size: '40x60' }" />
<img :src="prodImage({ sku: goods.productSku })" />
</td>
<td style="text-align: left">
<p>{{ goods.prodcutName }}</p>
... ... @@ -47,6 +47,7 @@
</template>
<script>
import prodImage from 'util/prod-image';
export default {
name: 'OrderListTable',
props: {
... ... @@ -87,6 +88,7 @@ export default {
},
});
},
prodImage,
},
};
</script>
... ...
... ... @@ -19,7 +19,7 @@
<template v-for="(goods, gindex) in item.goodsList">
<tr :key="tindex + '_' + gindex">
<td>
<img v-prod-img.sku="{ val: goods.productSku, size: '40x60' }" />
<img :src="prodImage({ sku: goods.productSku })" />
</td>
<td style="text-align: left">
<p>{{ goods.productName }}</p>
... ... @@ -46,6 +46,7 @@
</template>
<script>
import prodImage from 'util/prod-image';
export default {
name: 'DataTable',
props: {
... ... @@ -86,6 +87,7 @@ export default {
},
});
},
prodImage,
},
};
</script>
... ...
... ... @@ -17,7 +17,7 @@
<tr :key="index">
<td>{{ goods.productSku }}</td>
<td>
<img v-prod-img.sku="{ val: goods.productSku, size: '40x60' }" />
<img :src="prodImage({ sku: goods.productSku })" />
</td>
<td style="text-align: left">
<p>{{ goods.productName }}</p>
... ... @@ -38,7 +38,6 @@
<Row>
<template v-for="(img, imgIndex) in goods.imperfectImage">
<img :key="imgIndex" :src="img.imageUrl" />
<img :key="imgIndex" :src="img.imageUrl" />
</template>
</Row>
</td>
... ... @@ -51,6 +50,7 @@
</template>
<script>
import prodImage from 'util/prod-image';
export default {
name: 'ReturnedGoodsInfo',
props: ['tableData', 'returnedReason'],
... ... @@ -71,6 +71,9 @@ export default {
],
};
},
methods: {
prodImage,
},
};
</script>
<style lang="scss">
... ...
... ... @@ -19,7 +19,7 @@
<template v-for="(goods, key) in item.returnedGoodsListBoArray">
<tr :key="index + '_' + key">
<td>
<img v-prod-img.sku="{ val: goods.productSku, size: '40x60' }" />
<img :src="prodImage({ sku: goods.productSku })" />
</td>
<td style="text-align: left">
<p>{{ goods.productName }}</p>
... ... @@ -46,6 +46,7 @@
</template>
<script>
import prodImage from 'util/prod-image';
export default {
name: 'ReturnedListTable',
props: ['tableData', 'shopStatus'],
... ... @@ -86,6 +87,7 @@ export default {
},
});
},
prodImage,
},
};
</script>
... ...
function prodImage({ skn, sku, size }) {
const baseUrl = '/Api/platform/getRemoteImageUrlBySku';
const params = [];
if (skn) {
params.push(`skn_id=${skn}`);
}
if (sku) {
params.push(`sku_id=${sku}`);
}
params.push(size ? `size=${size}` : 'size=80x80');
params.push(`t=${new Date().getTime()}`);
return `${baseUrl}?${params.join('&')}`;
}
export default prodImage;
... ...