| | |
| | | @touchmove="handleSwiperMove" |
| | | @touchend="handleSwiperEnd(item)" |
| | | > |
| | | <view style="width: 100%;height: 100%;" v-if="item.videoContentType === 'video'"> |
| | | <view :style="{width: '100%', height: windowHeight - marginBottom + 'px'}" v-if="item.videoContentType === 'video'"> |
| | | <!-- 播放按钮(仅当视频暂停时显示) --> |
| | | <view |
| | | class="play-icon" |
| | |
| | | pageSize: 10, |
| | | authorId: '', |
| | | videoFrom: '' |
| | | } |
| | | }, |
| | | marginBottom: 0, // 底部安全区域 |
| | | windowHeight: 0 // 可使用屏幕高度 |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | |
| | | }, |
| | | onLoad(option) { |
| | | this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom |
| | | this.windowHeight = uni.getSystemInfoSync().windowHeight |
| | | const playInfo = uni.getStorageSync("playInfo", playInfo); |
| | | if(playInfo) { |
| | | this.currentIndex = playInfo.playIndex; |
| | |
| | | .video-info { |
| | | width: 70%; |
| | | position: absolute; |
| | | bottom: 20px; |
| | | bottom: 40px; |
| | | left: 20px; |
| | | color: #f8f8f8; |
| | | z-index: 10; |
| | |
| | | flex-direction: column; |
| | | align-items: center; |
| | | position: absolute; |
| | | bottom: 0; |
| | | bottom: 20px; |
| | | width: 100%; |
| | | } |
| | | |