Kaynağa Gözat

视频优化等

pansl 1 yıl önce
ebeveyn
işleme
c031adbfa3
1 değiştirilmiş dosya ile 8 ekleme ve 1 silme
  1. 8 1
      pages/video/index.nvue

+ 8 - 1
pages/video/index.nvue

@@ -1,6 +1,9 @@
 <template>
 	<view class="">
-		<view class="content">
+		<!-- 加载中提示 -->
+		<u-loading-page bg-color="#000000" :loading="isLoading" loading-text="加载中..." loading-mode="semicircle"
+			loading-color="#ffffff" font-size="18" icon-size="46" color="#ffffff"></u-loading-page>
+		<view class="content" v-if="!isLoading">
 			<u-navbar :leftText="topTitle" @leftClick="leftClick" titleStyle="color:#fff;" bgColor="#000"
 				leftIconColor="#fff" :autoBack="false">
 			</u-navbar>
@@ -222,6 +225,7 @@
 	export default {
 		data() {
 			return {
+				isLoading: true, // 页面加载中的状态
 				centerShow: false, //暂未更新弹窗
 				limitPage: 15,
 				top_height: 0,
@@ -282,6 +286,7 @@
 				}
 			},
 			swiperList() {
+				// return Number(2800) + 1
 				return Number(this.videoInfo.updated_episode_num) + 1
 			},
 			isShowVideo(item) {
@@ -307,6 +312,8 @@
 			}
 		},
 		onReady: function(res) {
+			// 将 isLoading 状态设置为 false,表示页面加载完成
+			this.isLoading = false;
 			this.videoContext = uni.createVideoContext('myVideo')
 		},
 		mounted() {