Browse Source

活动结束时应关闭加载状态

chenrui 4 years ago
parent
commit
47ec459806
3 changed files with 54 additions and 39 deletions
  1. 18 13
      海报/theme - jiyou/script.js
  2. 18 13
      海报/theme - meiyan/script.js
  3. 18 13
      海报/theme/script.js

+ 18 - 13
海报/theme - jiyou/script.js

@@ -57,6 +57,7 @@ window.onload = function(){
 					if(res.data){
 						getActivityData()  //  获取活动信息
 					}else{
+						closeLoading()  //  关闭加载状态
 						alert('该活动已经结束!')
 					}
 				}
@@ -109,23 +110,27 @@ 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'
-						}
-					}
+					closeLoading()  //  关闭加载状态
 				}
 			},
 		})
 	}
+	//  关闭加载状态
+	function closeLoading(){
+		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(){
 		// 隐藏参与和分享按钮

+ 18 - 13
海报/theme - meiyan/script.js

@@ -57,6 +57,7 @@ window.onload = function(){
 					if(res.data){
 						getActivityData()  //  获取活动信息
 					}else{
+						closeLoading()  //  关闭加载状态
 						alert('该活动已经结束!')
 					}
 				}
@@ -109,23 +110,27 @@ 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'
-						}
-					}
+					closeLoading()  //  关闭加载状态
 				}
 			},
 		})
 	}
+	//  关闭加载状态
+	function closeLoading(){
+		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(){
 		// 隐藏参与和分享按钮

+ 18 - 13
海报/theme/script.js

@@ -57,6 +57,7 @@ window.onload = function(){
 					if(res.data){
 						getActivityData()  //  获取活动信息
 					}else{
+						closeLoading()  //  关闭加载状态
 						alert('该活动已经结束!')
 					}
 				}
@@ -109,23 +110,27 @@ 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'
-						}
-					}
+					closeLoading()  //  关闭加载状态
 				}
 			},
 		})
 	}
+	//  关闭加载状态
+	function closeLoading(){
+		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(){
 		// 隐藏参与和分享按钮