绿满眶商城微信小程序-uniapp
zxl
2025-09-12 814f5915fde05ecf5e565a07bc9d611cf6202505
pages/video/home-page.vue
@@ -50,7 +50,7 @@
          >
            作品{{`(${videoTotal})`}}
          </view>
          <view
         <view
            class="tab-item"
            :class="{active: currentTab === 'collect'}"
            @click="switchTab('collect')"
@@ -65,7 +65,9 @@
          喜欢
        </view>
        </view>
        <!-- 视频列表 -->
      <scroll-view class="video-list" scroll-y :show-scrollbar="false" @scrolltolower="getPage" v-show="currentTab === 'works' && videoList.length > 0">
         <view class="video-container">
@@ -74,8 +76,16 @@
              v-for="(item, index) in videoList"
              :key="item.id"
            >
              <image class="video-cover" @click="playAuthorVideo(index)" :src="item.videoContentType === 'video' ? item.coverUrl : item.imgs[0]" mode="aspectFill"></image>
              <image v-if="item.videoContentType === 'img'" class="video-cover" @click="playAuthorVideo(index)" :src="item.imgs[0]" mode="aspectFill"></image>
              <!-- <image class="video-cover" @click="playAuthorVideo(index)" :src="item.videoContentType === 'video' ? item.coverUrl : item.imgs[0]" mode="aspectFill"></image> -->
              <video v-else :src="item.videoUrl"
              :poster-for-crawler='item.coverUrl'
              object-fit='"cover"'
              :show-fullscreen-btn='false'
              :show-play-btn='false'
              :show-center-play-btn='false'
              :enable-progress-gesture='false'
               class="video-cover" @click="playAuthorVideo(index)"></video>
              <view class="video-info">
                <view class="video-stats">
                  <view class="stat">
@@ -96,7 +106,10 @@
            </view>
         </view>
      </scroll-view>
      <scroll-view class="video-list" scroll-y :show-scrollbar="false" @scrolltolower="getPage" v-show="currentTab === 'collect' && collectVideoList.length > 0">
      <view>
         <mycollect v-show ="currentTab ==='collect'"></mycollect>
      </view>
   <!--    <scroll-view class="video-list" scroll-y :show-scrollbar="false" @scrolltolower="getPage" v-show="currentTab === 'collect' && collectVideoList.length > 0">
         <view class="video-container">
            <view
              class="video-item"
@@ -113,7 +126,7 @@
               :show-center-play-btn="false"
               object-fit="cover"></video>
   
              <!-- <image class="video-cover" :src="getCoverUrl(item)"></image> -->
              <view class="video-info">
                <view class="video-stats">
                  <view class="stat">
@@ -124,7 +137,7 @@
              </view>
            </view>
         </view>
      </scroll-view>
      </scroll-view> -->
      <scroll-view class="video-list" scroll-y :show-scrollbar="false" @scrolltolower="getPage" v-show="currentTab === 'likes' && likeVideoList.length > 0">
         <view class="video-container">
            <view
@@ -187,8 +200,10 @@
import {getAuthorInfo, getAuthorVideoPage, getAuthorCollectVideoPage, getAuthorLikeVideoPage} from '@/api/user.js'
import {subscribe, unSubscribe, delVideo, updateVideo, userDownVideo} from '@/api/video.js'
import mycollect from '@/pages/video/myCollect.vue'
export default {
  components: {DropdownMenu},
  components: {DropdownMenu,
  mycollect},
  data() {
    return {
     options: [