Browse Source

南岸小程序加载遮罩

zwq 2 years ago
parent
commit
0499c4772a

File diff suppressed because it is too large
+ 3 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/app.wxss


BIN
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/images/onload-init-mini.png


+ 18 - 12
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.js

@@ -25,6 +25,7 @@ const app = getApp()
 
 Page({
 	data: {
+		hideAll: true,
 		imgUrl: imgUrl,
 		// 屏幕高度
 		navHeight: '',
@@ -450,18 +451,18 @@ Page({
 		}
 	},
 	onLoad() {
-		// 加载字体
-		wx.loadFontFace({
-			family: 'DOUYU',
-			// source: 'url("https://hui.yrslm.com:8089/douyu.ttf")',
-			source: 'url("https://www.cqna.gov.cn/mnazw/applet/font/douyu.ttf")',
-			success: function (e) {
-				console.log(e, '动态加载字体成功')
-			},
-			fail: function (e) {
-				console.log(e, '动态加载字体失败')
-			},
-		})
+		// // 加载字体
+		// wx.loadFontFace({
+		// 	family: 'DOUYU',
+		// 	// source: 'url("https://hui.yrslm.com:8089/douyu.ttf")',
+		// 	source: 'url("https://www.cqna.gov.cn/mnazw/applet/font/douyu.ttf")',
+		// 	success: function (e) {
+		// 		console.log(e, '动态加载字体成功')
+		// 	},
+		// 	fail: function (e) {
+		// 		console.log(e, '动态加载字体失败')
+		// 	},
+		// })
 		// 获取视频推荐数据
 		this.getVideoRecommend();
 		// 获取媒体矩阵南岸发布数据
@@ -483,6 +484,11 @@ Page({
 		})
 
 		this.initNadt()
+		setTimeout(() => {
+			this.setData({
+				hideAll: false
+			})
+		}, 1000);
 		// wx.login({
 		//   success(res) {
 		//     if (res.code) {

+ 6 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.wxml

@@ -1,6 +1,11 @@
 <!--pages/publics/publics.wxml-->
 <view style=" background-color:#F5F5F5;">
-	<scroll-view style="height: 1549rpx;" scroll-y="true">
+	<view wx:if="{{hideAll}}" style="position: absolute;z-index: 999999;height: 100vh;width:100%;background-color: #ffffff;">
+		<view style="height: 110vh;width: 100%;display: flex;align-items: center;justify-content: center;">
+			<image class="init-rate" style="height: 76rpx;width: 76rpx;" src="images/onload-init-mini.png"></image>
+		</view>
+	</view>
+	<scroll-view hidden="{{hideAll}}" style="height: 1549rpx;" scroll-y="true">
 		<view class="top">
 			<video src="http://www.cq.gov.cn/masvod/public/2022/06/23/20220623_1818e6fa1b0_r1_1200k.mp4" loop muted controls="{{false}}" show-play-btn="{{false}}" show-center-play-btn="{{false}}" enable-progress-gesture="{{false}}" object-fit="cover" autoplay style="width:100%;height:409rpx"></video>
 			<image src="{{imgUrl}}toplogo.png" class="top-logo" style="top: {{navHeight}}rpx"></image>

+ 12 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.wxss

@@ -539,4 +539,15 @@ scroll-view ::-webkit-scrollbar {
 	100% {
 	opacity: 1; /*结尾状态 透明度为1*/
 	}
-	}
+	}
+
+	@keyframes box-ani {
+    from {transform: rotate(0)}
+    to {transform: rotate(360deg)}
+  }
+.init-rate{
+    /* border-radius:50%; */
+    position: relative;
+    /* margin-left: -30rpx; */
+    animation: box-ani 1s  infinite linear;
+}

Some files were not shown because too many files changed in this diff