| | |
| | | <template> |
| | | <view class="video-container"> |
| | | <top-bar selectedTitleIndex="home" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <top-bar selectedTitleIndex="home" textColor="white" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <!-- 视频加载 --> |
| | | <zero-loading v-show="videoLoading" type="circle" color="#0ebd57" text=""></zero-loading> |
| | | <!-- 视频列表 --> |
| | |
| | | :autoplay="index === currentIndex" |
| | | :controls="false" |
| | | :loop="true" |
| | | :object-fit="item.objectFit" |
| | | :object-fit="item.videoFit" |
| | | :enable-progress-gesture="false" |
| | | :show-center-play-btn="false" |
| | | class="video-item" |
| | |
| | | @touchstart.stop="handleTouchStart" |
| | | @touchmove.stop="handleTouchMove" |
| | | @touchend.stop="handleTouchEnd" |
| | | :style="{bottom: marginBottom + 'px'}" |
| | | class="container"> |
| | | <!-- 进度条 - 整个区域可拖动 --> |
| | | <view class="process-warp" :style="{ opacity: showProcess ? 1 : 0 }"> |
| | |
| | | |
| | | |
| | | <!-- 视频信息层 --> |
| | | <view class="video-info"> |
| | | <view class="video-info" :style="{bottom: marginBottom + 20 + 'px'}"> |
| | | <view> |
| | | <text class="video-author">@{{item.authorName}}</text> |
| | | </view> |
| | |
| | | pageNumber: 1, |
| | | pageSize: 10, |
| | | videoFrom: 'recommend' |
| | | } |
| | | }, |
| | | marginBottom: 0 // 底部安全区域 |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | this.startHidenTime = Date.now() |
| | | }, |
| | | onLoad(option) { |
| | | this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom |
| | | const token = storage.getAccessToken(); |
| | | if (! token) { |
| | | this.wxSilentLogin(() => { |