Authored by 张文文

商品跳转添加

<template>
<img v-lazy="currentSrc" :alt="alt" v-if="!refresh">
<img v-lazy="currentSrc" :alt="alt" v-if="!refresh" @click="onProductImgClick" />
</template>
<script>
export default {
name: 'ImgSize',
name: "ImgSize",
props: {
src: String,
width: Number,
height: Number,
alt: String,
alt: String
},
data() {
return {
... ... @@ -26,15 +26,19 @@ export default {
},
computed: {
currentSrc() {
return (this.src || '')
.replace('http://', '//')
.replace('{width}', this.width)
.replace('{height}', this.height);
return (this.src || "")
.replace("http://", "//")
.replace("{width}", this.width)
.replace("{height}", this.height);
}
},
methods: {
onProductImgClick() {
this.$emit("onProductImgClick");
}
}
};
</script>
<style>
</style>
... ...
... ... @@ -33,9 +33,12 @@
:src="shareIdentifyInfo.productImageUrl"
:width="200"
:height="200"
@onProductImgClick="goProductDetail(shareIdentifyInfo.productId, shareIdentifyInfo.productName)"
></ImgSize>
<div class="product-size">{{shareIdentifyInfo.productSize}}码</div>
<div class="product-name">{{shareIdentifyInfo.productName}}</div>
<div
class="product-name"
@click="goProductDetail(shareIdentifyInfo.productId, shareIdentifyInfo.productName)"
>{{shareIdentifyInfo.productName}}</div>
<div class="provideo-btn" @click="playVideoOperation(shareIdentifyInfo.vedioFileUrl)"></div>
<VideoPlayer ref="videoPlay" class="play-video" :source="shareIdentifyInfo.vedioFileUrl"></VideoPlayer>
<div class="identify-plat">{{shareIdentifyInfo.identifyPlat}}</div>
... ...