Fix:2891 【商城小程序】封面【播放/暂停键】点击范围不明确,响应不灵敏,把播放/暂停触控区域再加大一些

This commit is contained in:
modendeveloper
2024-12-18 22:10:26 +08:00
parent 9d2c99507c
commit f2f2528316
2 changed files with 20 additions and 5 deletions
+2
View File
@@ -13,6 +13,8 @@ export const pageListenMixins = {
onShow() {
this.pageViewDateTime = getCurrDateTime()
this.pageToWatchShowCount(this.pageKeyId)
this.videoContext = uni.createVideoContext('indexVideo', this);
},
onUnload() {
this.pageToHideHandle()
+18 -5
View File
@@ -166,16 +166,16 @@
</swiper-item>
</swiper> -->
<view class="new-zone-wrap">
<view class="kd" @click="toKD">
<view class="kd" >
<view class="img-wrap" style="padding-top: 10rpx; box-sizing:border-box">
<image style="width: 112rpx; height:26rpx" :src="webUrl + '/orderIcon/kd.png'" mode="heightFix|widthFix"></image>
</view>
<view class="tip-img">
<image style="width: 142rpx; height:66.11rpx;border-radius: 0" :src="webUrl + '/orderIcon/dot.png'" mode="heightFix|widthFix"></image>
</view>
<view class="kd-cover">
<video play-btn-position="center" v-if="indexVideo" :show-fullscreen-btn="false" class="kd-cover v12-mt-0" :src="indexVideo" controls autoplay :poster="indexVideo + '?vframe/jpg/offset/1'"></video>
<view class="enter-btn">点击进入</view>
<view class="kd-cover" @click.stop="played">
<video play-btn-position="center" id="indexVideo" v-if="indexVideo" :show-fullscreen-btn="false" class="kd-cover v12-mt-0" :src="indexVideo" controls autoplay :poster="indexVideo + '?vframe/jpg/offset/1'"></video>
<view class="enter-btn" >点击进入</view>
</view>
</view>
<view class="xpsx">
@@ -383,7 +383,9 @@ export default {
contentFestival: {},
pageKeyId: Object.freeze('appIndex'),
scrollTop: 0,
lotteryCanDraw: false
lotteryCanDraw: false,
videoContext: null,
isPlay: true,
}
},
onLoad() {
@@ -417,6 +419,17 @@ export default {
this.scrollTop = e.scrollTop
},
methods: {
played() {
this.isPlay = !this.isPlay
if(this.isPlay) {
this.videoContext.play()
} else {
this.videoContext.pause()
}
this.toKD()
},
pause() {
},
toKD() {
this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackList')
},