diff --git a/pages/goods-detail/goods-detail.wxml b/pages/goods-detail/goods-detail.wxml index ca078ff..58e36cc 100644 --- a/pages/goods-detail/goods-detail.wxml +++ b/pages/goods-detail/goods-detail.wxml @@ -27,6 +27,10 @@ autoplay="{{true}}" loop="{{true}}" muted="{{true}}" + initial-time="0" + show-mute-btn="{{true}}" + enable-progress-gesture="{{true}}" + enable-play-gesture="{{true}}" object-fit="fill" poster="" > @@ -47,7 +51,7 @@ - + {{goodsDetail.supplyStatus || '暂无状态'}} diff --git a/pages/goods-detail/goods-detail.wxss b/pages/goods-detail/goods-detail.wxss index a199d70..1c4248e 100644 --- a/pages/goods-detail/goods-detail.wxss +++ b/pages/goods-detail/goods-detail.wxss @@ -117,6 +117,14 @@ video.slider-media { z-index: 1; } +/* 视频控制器样式 - 调整进度条位置 */ +video.slider-media .wx-video-controlbar { + bottom: 50px !important; + padding-bottom: 15px !important; + height: 60px !important; + z-index: 10 !important; +} + /* 视频播放按钮样式 */ video.slider-media .wx-video-play-btn { width: 80rpx; @@ -128,6 +136,13 @@ video.slider-media .wx-video-play-btn::after { background-color: rgba(0, 0, 0, 0.6); } +/* 视频静音图标样式 */ +video.slider-media .wx-video-volume-icon { + background-image: url('https://img.icons8.com/windows/32/mute.png') !important; + background-size: contain !important; + background-repeat: no-repeat !important; +} + /* 商品基本信息 */ .goods-info { background-color: #ffffff; diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 6caf8eb..67503e1 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -153,12 +153,16 @@ class="product-media" src="{{item.mediaItems[0].url}}" mode="aspectFill" - show-center-play-btn="{{true}}" + show-center-play-btn="{{false}}" show-play-btn="{{false}}" - controls="{{true}}" + controls="{{false}}" autoplay="{{true}}" loop="{{true}}" muted="{{true}}" + initial-time="0" + show-mute-btn="{{false}}" + enable-progress-gesture="{{false}}" + enable-play-gesture="{{true}}" object-fit="fill" poster="" style="height: 270rpx; display: block; box-sizing: border-box; width: 337rpx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1;"> diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 7da9d9a..1ab4b60 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1279,6 +1279,11 @@ wx-button:not([size=mini]) { background-color: #f5f5f5; } +/* 视频样式增强 */ +video.product-media { + object-fit: fill; +} + /* 促销标签 */ .promo-tag { position: absolute;