浏览代码

营销活动-活动分享页加loading且默认不展示参与活动和分享按钮

chenrui 4 年之前
父节点
当前提交
9161ecfc99

+ 16 - 0
index.html

@@ -133,6 +133,7 @@
 					</p>
 				</div>
 			</div>
+			<div id="foo"></div>
 		</div>
 	</body>
 	<style>
@@ -499,6 +500,20 @@
 			color: #666;
 			border: 1px solid #eee;
 		}
+		/* 加载中 */
+		#foo{
+			width: 50px;
+			height: 50px;
+			position: fixed;
+			left: 50%;
+			top: 50%;
+			margin: -25px 0 0 -25px;
+			z-index: 5001;
+		}
+		.spinner{
+			left: 25px!important;
+			top: 25px!important;
+		}
 	</style>
 	<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
 	<script src="海报/theme/alert.js"></script>
@@ -509,4 +524,5 @@
 		var staticHtmlPath = ""
 	</script>
 	<script src="海报/theme/script.js"></script>
+	<script src="海报/theme/spin.min.js"></script>
 </html>

+ 16 - 0
tpl.html

@@ -372,6 +372,20 @@
 				color: #666;
 				border: 1px solid #eee;
 			}
+			/* 加载中 */
+			#foo{
+				width: 50px;
+				height: 50px;
+				position: fixed;
+				left: 50%;
+				top: 50%;
+				margin: -25px 0 0 -25px;
+				z-index: 5001;
+			}
+			.spinner{
+				left: 25px!important;
+				top: 25px!important;
+			}
 		</style>
 	</head>
 	<body>
@@ -497,10 +511,12 @@
 					</p>
 				</div>
 			</div>
+			<div id="foo"></div>
 		</div>
 		 
 		<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
 		<script src="${active.staticMouldTheme.basePath}/alert.js"></script>
+		<script src="${active.staticMouldTheme.basePath}/spin.min.js"></script>
 		<script>
 			//判断访问终端
 			var browser={

+ 44 - 3
海报/theme - jiyou/script.js

@@ -18,11 +18,13 @@ var upScrollT = getNode("upScroll-t")  //  参与人信息  盒子2
 
 var storeId = getQueryString('orgId') || 0  //  门店id
 var companyId = ''
-// test,  测试     local:本地     pre :预发布      pro:生产
+// test,  测试     local、dev:本地开发环境     pre :预发布      pro:生产
 if(baseType == 'test'){
 	var reqUrl = 'http://192.168.16.100:9110/saas/clz/'
 }else if(baseType == 'local'){
-	var reqUrl = 'http://192.168.16.102:9110/saas/clz/'
+	var reqUrl = 'http://192.168.16.104:9110/saas/clz/'
+}else if(baseType == 'dev'){
+	var reqUrl = 'http://192.168.16.104:9110/saas/clz/'
 }else if(baseType == 'pre'){
 	var reqUrl = 'http://md.test.zyucgj.com/saas/clz/'
 }else if(baseType == 'pro'){
@@ -36,11 +38,11 @@ var closeYy = function (){
 }
 window.onload = function(){
 	if(staticHtmlPath){  //  发布
+		onLoading()  //  加载中
 		checkActiveValid()
 	}else{  //  预览
 		getActivityData()  //  获取活动信息
 	}
-	
 	//  校验活动是否还在进行
 	function checkActiveValid(){
 		$.ajax({
@@ -107,10 +109,49 @@ window.onload = function(){
 					}else{  //  运营端发布活动无门店id参数
 						joinerList()  //  参与人列表数据
 					}
+					if(staticHtmlPath){  //  发布
+						// 关闭加载状态
+						document.getElementById('foo').style.display = 'none'
+						modalZz.style.display = 'none'
+						// 不是微信端打开的页面
+						if(!browser.versions.weixin){
+							document.querySelector('.zy-h5-bf-bar').style.display = 'none'
+							document.querySelector('.zy-h5-fx-bar').style.display = 'none'
+						}else{
+							document.querySelector('.zy-h5-bf-bar').style.display = 'flex'
+							document.querySelector('.zy-h5-fx-bar').style.display = 'block'
+						}
+					}
 				}
 			},
 		})
 	}
+	// 加载中
+	function onLoading(){
+		// 隐藏参与和分享按钮
+		document.querySelector('.zy-h5-bf-bar').style.display = 'none'
+		document.querySelector('.zy-h5-fx-bar').style.display = 'none'
+		modalZz.style.display = 'block'  //  遮罩层
+		var opts = {
+			lines: 9, // The number of lines to draw
+			length: 0, // The length of each line
+			width: 10, // The line thickness
+			radius: 15, // The radius of the inner circle
+			corners: 1, // Corner roundness (0..1)
+			rotate: 0, // The rotation offset
+			color: '#2979ff', // #rgb or #rrggbb
+			speed: 1, // Rounds per second
+			trail: 60, // Afterglow percentage
+			shadow: false, // Whether to render a shadow
+			hwaccel: false, // Whether to use hardware acceleration
+			className: 'spinner', // The CSS class to assign to the spinner
+			zIndex: 2e9, // The z-index (defaults to 2000000000)
+			top: 'auto', // Top position relative to parent in px
+			left: 'auto' // Left position relative to parent in px
+		};
+		var target = document.getElementById('foo');
+		var spinner = new Spinner(opts).spin(target);
+	}
 	// 打开预约弹框
 	yuyue.onclick = function(){
 		modal.style.display = 'block'

文件差异内容过多而无法显示
+ 0 - 0
海报/theme - jiyou/spin.min.js


+ 44 - 3
海报/theme - meiyan/script.js

@@ -18,11 +18,13 @@ var upScrollT = getNode("upScroll-t")  //  参与人信息  盒子2
 
 var storeId = getQueryString('orgId') || 0  //  门店id
 var companyId = ''
-// test,  测试     local:本地     pre :预发布      pro:生产
+// test,  测试     local、dev:本地开发环境     pre :预发布      pro:生产
 if(baseType == 'test'){
 	var reqUrl = 'http://192.168.16.100:9110/saas/clz/'
 }else if(baseType == 'local'){
-	var reqUrl = 'http://192.168.16.102:9110/saas/clz/'
+	var reqUrl = 'http://192.168.16.104:9110/saas/clz/'
+}else if(baseType == 'dev'){
+	var reqUrl = 'http://192.168.16.104:9110/saas/clz/'
 }else if(baseType == 'pre'){
 	var reqUrl = 'http://md.test.zyucgj.com/saas/clz/'
 }else if(baseType == 'pro'){
@@ -36,11 +38,11 @@ var closeYy = function (){
 }
 window.onload = function(){
 	if(staticHtmlPath){  //  发布
+		onLoading()  //  加载中
 		checkActiveValid()
 	}else{  //  预览
 		getActivityData()  //  获取活动信息
 	}
-	
 	//  校验活动是否还在进行
 	function checkActiveValid(){
 		$.ajax({
@@ -107,10 +109,49 @@ window.onload = function(){
 					}else{  //  运营端发布活动无门店id参数
 						joinerList()  //  参与人列表数据
 					}
+					if(staticHtmlPath){  //  发布
+						// 关闭加载状态
+						document.getElementById('foo').style.display = 'none'
+						modalZz.style.display = 'none'
+						// 不是微信端打开的页面
+						if(!browser.versions.weixin){
+							document.querySelector('.zy-h5-bf-bar').style.display = 'none'
+							document.querySelector('.zy-h5-fx-bar').style.display = 'none'
+						}else{
+							document.querySelector('.zy-h5-bf-bar').style.display = 'flex'
+							document.querySelector('.zy-h5-fx-bar').style.display = 'block'
+						}
+					}
 				}
 			},
 		})
 	}
+	// 加载中
+	function onLoading(){
+		// 隐藏参与和分享按钮
+		document.querySelector('.zy-h5-bf-bar').style.display = 'none'
+		document.querySelector('.zy-h5-fx-bar').style.display = 'none'
+		modalZz.style.display = 'block'  //  遮罩层
+		var opts = {
+			lines: 9, // The number of lines to draw
+			length: 0, // The length of each line
+			width: 10, // The line thickness
+			radius: 15, // The radius of the inner circle
+			corners: 1, // Corner roundness (0..1)
+			rotate: 0, // The rotation offset
+			color: '#2979ff', // #rgb or #rrggbb
+			speed: 1, // Rounds per second
+			trail: 60, // Afterglow percentage
+			shadow: false, // Whether to render a shadow
+			hwaccel: false, // Whether to use hardware acceleration
+			className: 'spinner', // The CSS class to assign to the spinner
+			zIndex: 2e9, // The z-index (defaults to 2000000000)
+			top: 'auto', // Top position relative to parent in px
+			left: 'auto' // Left position relative to parent in px
+		};
+		var target = document.getElementById('foo');
+		var spinner = new Spinner(opts).spin(target);
+	}
 	// 打开预约弹框
 	yuyue.onclick = function(){
 		modal.style.display = 'block'

文件差异内容过多而无法显示
+ 0 - 0
海报/theme - meiyan/spin.min.js


+ 44 - 3
海报/theme/script.js

@@ -18,11 +18,13 @@ var upScrollT = getNode("upScroll-t")  //  参与人信息  盒子2
 
 var storeId = getQueryString('orgId') || 0  //  门店id
 var companyId = ''
-// test,  测试     local:本地     pre :预发布      pro:生产
+// test,  测试     local、dev:本地开发环境     pre :预发布      pro:生产
 if(baseType == 'test'){
 	var reqUrl = 'http://192.168.16.100:9110/saas/clz/'
 }else if(baseType == 'local'){
-	var reqUrl = 'http://192.168.16.102:9110/saas/clz/'
+	var reqUrl = 'http://192.168.16.104:9110/saas/clz/'
+}else if(baseType == 'dev'){
+	var reqUrl = 'http://192.168.16.104:9110/saas/clz/'
 }else if(baseType == 'pre'){
 	var reqUrl = 'http://md.test.zyucgj.com/saas/clz/'
 }else if(baseType == 'pro'){
@@ -36,11 +38,11 @@ var closeYy = function (){
 }
 window.onload = function(){
 	if(staticHtmlPath){  //  发布
+		onLoading()  //  加载中
 		checkActiveValid()
 	}else{  //  预览
 		getActivityData()  //  获取活动信息
 	}
-	
 	//  校验活动是否还在进行
 	function checkActiveValid(){
 		$.ajax({
@@ -107,10 +109,49 @@ window.onload = function(){
 					}else{  //  运营端发布活动无门店id参数
 						joinerList()  //  参与人列表数据
 					}
+					if(staticHtmlPath){  //  发布
+						// 关闭加载状态
+						document.getElementById('foo').style.display = 'none'
+						modalZz.style.display = 'none'
+						// 不是微信端打开的页面
+						if(!browser.versions.weixin){
+							document.querySelector('.zy-h5-bf-bar').style.display = 'none'
+							document.querySelector('.zy-h5-fx-bar').style.display = 'none'
+						}else{
+							document.querySelector('.zy-h5-bf-bar').style.display = 'flex'
+							document.querySelector('.zy-h5-fx-bar').style.display = 'block'
+						}
+					}
 				}
 			},
 		})
 	}
+	// 加载中
+	function onLoading(){
+		// 隐藏参与和分享按钮
+		document.querySelector('.zy-h5-bf-bar').style.display = 'none'
+		document.querySelector('.zy-h5-fx-bar').style.display = 'none'
+		modalZz.style.display = 'block'  //  遮罩层
+		var opts = {
+			lines: 9, // The number of lines to draw
+			length: 0, // The length of each line
+			width: 10, // The line thickness
+			radius: 15, // The radius of the inner circle
+			corners: 1, // Corner roundness (0..1)
+			rotate: 0, // The rotation offset
+			color: '#2979ff', // #rgb or #rrggbb
+			speed: 1, // Rounds per second
+			trail: 60, // Afterglow percentage
+			shadow: false, // Whether to render a shadow
+			hwaccel: false, // Whether to use hardware acceleration
+			className: 'spinner', // The CSS class to assign to the spinner
+			zIndex: 2e9, // The z-index (defaults to 2000000000)
+			top: 'auto', // Top position relative to parent in px
+			left: 'auto' // Left position relative to parent in px
+		};
+		var target = document.getElementById('foo');
+		var spinner = new Spinner(opts).spin(target);
+	}
 	// 打开预约弹框
 	yuyue.onclick = function(){
 		modal.style.display = 'block'

文件差异内容过多而无法显示
+ 0 - 0
海报/theme/spin.min.js


部分文件因为文件数量过多而无法显示