Commit 87fd8829 authored by 张九刚's avatar 张九刚

fix: 优化产品页面和品牌页面的按钮显示逻辑,调整视频组件的样式和尺寸

parent a911cbc5
No preview for this file type
...@@ -2,12 +2,18 @@ ...@@ -2,12 +2,18 @@
<view class="container"> <view class="container">
<image :key="index" v-for="(item, index) in imgList" mode="widthFix" class="productimg" :src="item.imgUrl"> <image :key="index" v-for="(item, index) in imgList" mode="widthFix" class="productimg" :src="item.imgUrl">
</image> </image>
<view class="btnbox"> <view class="btnbox" v-if="productId && skuId">
<image v-if="productId&&skuId" @tap="buyHandler" class="btnbuy" :src="$baseUrl + 'brandpage/btnbuy.png'"></image> <image @tap="buyHandler" class="btnbuy" :src="$baseUrl + 'brandpage/btnbuy.png'"></image>
<button class="btnshare" open-type="share" style="background: none; border: none; padding: 0;"> <button class="btnshare" open-type="share" style="background: none; border: none; padding: 0;">
<image class="btnshare" :src="$baseUrl + 'brandpage/btnshare.png'"></image> <image class="btnshare" :src="$baseUrl + 'brandpage/btnshare.png'"></image>
</button> </button>
</view> </view>
<view class="btnbox" v-else>
<button class="btnshare2" open-type="share" style="background: none; border: none; padding: 0;">
<image class="btnshare2" :src="$baseUrl + 'brandpage/btnsharebig.png'"></image>
</button>
</view>
</view> </view>
</template> </template>
...@@ -37,9 +43,9 @@ export default { ...@@ -37,9 +43,9 @@ export default {
this.contentImg = contentImg; this.contentImg = contentImg;
this.contentImgLen = contentImgLen; this.contentImgLen = contentImgLen;
this.shareTitle = shareTitle; this.shareTitle = shareTitle;
this.shareImg = this.$baseUrl + shareImg; this.shareImg = this.$baseUrl + shareImg;
// this.shareImg = "https://yun.duiba.com//fh/"+shareImg; // this.shareImg = "https://yun.duiba.com//fh/"+shareImg;
console.log("this.shareImg:", this.shareImg); console.log("this.shareImg:", this.shareImg);
...@@ -112,6 +118,14 @@ export default { ...@@ -112,6 +118,14 @@ export default {
width: 350rpx; width: 350rpx;
height: 75rpx; height: 75rpx;
} }
button.btnshare2::after {
border: none !important;
}
.btnshare2 {
width: 718rpx;
height: 75rpx;
}
} }
} }
</style> </style>
...@@ -121,7 +121,13 @@ ...@@ -121,7 +121,13 @@
</uni-popup> </uni-popup>
</view> </view>
<view v-if="showVideo" class="video-popup"> <view v-if="showVideo" class="video-popup">
<video :src="currentVideoUrl" controls autoplay style="width: 100vw; height: 56vw;"></video> <video
:src="currentVideoUrl"
controls
autoplay
:style="{ width: videoWidth + 'px', height: videoHeight + 'px' }"
@loadedmetadata="onVideoLoadedMeta"
></video>
<view class="close-btn-bottom" @tap="closeVideo">×</view> <view class="close-btn-bottom" @tap="closeVideo">×</view>
</view> </view>
</view> </view>
...@@ -155,9 +161,9 @@ export default { ...@@ -155,9 +161,9 @@ export default {
popupIndex: 0, popupIndex: 0,
showVideo: false, showVideo: false,
testVideoUrl: '', testVideoUrl: '',
channel: {} channel: {},
videoWidth: 375,
videoHeight: 210
} }
}, },
mounted() { mounted() {
...@@ -293,6 +299,13 @@ export default { ...@@ -293,6 +299,13 @@ export default {
current: url // 当前显示的图片 current: url // 当前显示的图片
}); });
}, },
onVideoLoadedMeta(e) {
const { width, height } = e.detail;
const pageWidth = uni.upx2px(750);
const ratio = height / width;
this.videoWidth = pageWidth;
this.videoHeight =pageWidth;// pageWidth * ratio;
}
} }
} }
</script> </script>
...@@ -438,6 +451,7 @@ export default { ...@@ -438,6 +451,7 @@ export default {
text-align: center; text-align: center;
height: 100rpx; height: 100rpx;
white-space: pre-wrap; white-space: pre-wrap;
} }
} }
...@@ -619,6 +633,7 @@ export default { ...@@ -619,6 +633,7 @@ export default {
font-size: 24rpx; font-size: 24rpx;
color: black; color: black;
margin-top: 10rpx; margin-top: 10rpx;
padding-right: 40rpx;
} }
} }
} }
......
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