Browse Source

春节发货安排

wangxiaoming 5 years ago
parent
commit
4ccf43f4c2
3 changed files with 16 additions and 24 deletions
  1. BIN
      tooth/images/20200103/20200103_active.jpg
  2. BIN
      watero/images/watero_tc.png
  3. 16 24
      watero/index.html

BIN
tooth/images/20200103/20200103_active.jpg


BIN
watero/images/watero_tc.png


+ 16 - 24
watero/index.html

@@ -19,7 +19,7 @@
 		<link rel="stylesheet" type="text/css" href="css/iconfont.css" />
 		<link rel="stylesheet" type="text/css" href="css/style.css" />
 		<style>
-			.year-dalog { background: url(images/year-dalog.png) center center no-repeat rgba(0, 0, 0, .7); background-size: 80% auto; position: fixed; left: 0; top: 0; right: 0; bottom: 0; width: 100%; height: 100%; z-index: 99; display: none; -webkit-transform: translateY(-100%); transform: translateY(-100%); -webkit-transition: .5s; transition: .5s; }
+			.year-dalog { background: url(images/watero_tc.png) center center no-repeat rgba(0, 0, 0, .7); background-size: 80% auto; position: fixed; left: 0; top: 0; right: 0; bottom: 0; width: 100%; height: 100%; z-index: 99; display: none; -webkit-transform: translateY(-100%); transform: translateY(-100%); -webkit-transition: .5s; transition: .5s; }
 			.year-dalog.active { -webkit-transform: translateY(0%); transform: translateY(0%); } 
 			.year-dalog img { width: 100%; } 
 			.header { padding: 10px 0 7px 0; height: 65px; box-shadow: 0 0 0 #fff; background: #fff; } 
@@ -393,36 +393,28 @@
 		//春节放假通知弹窗点击事件
 		$(document).on('tap', '.year-dalog', function() {
 			if(!window.localStorage) {
-				mui.alert("您的浏览器不支持localStorage");
+				$(".year-dalog").removeClass("active");
+				// mui.alert("您的浏览器不支持localStorage");
 			} else {
-				//自定义json数据
-				var obj = {};
-				obj = {
-					text: new Date().getTime()
-				};
-				//json格式化插入    点击时间
-				localStorage.setItem('clickdate', JSON.stringify(obj));
+				//json格式化插入
+				 localStorage.setItem('dalog_tc', 1);
+				 $(".year-dalog").removeClass("active");
 			}
-			$(".year-dalog").removeClass("active");
-			setTimeout(function() {
-				$(".year-dalog").hide();
-			}, 500);
 		});
 		$(document).ready(function() {
-			var d = new Date().getTime(); //当前时间戳
 			//弹窗提示时间为1月18日-2月13日
-			if(d > 1547740800000 && d < 1550073599000) {
+			var start = new Date(2020,1-1,20,00,00,00);
+			var end = new Date(2020,2-1,1,23,59,59);
+			// var start = new Date(2020,1-1,13,00,00,00);
+			// var end = new Date(2020,2-1,1,23,59,59);
+			var d = new Date().getTime(); //当前时间戳
+			if (d > start && d <= end) {
 				if(!window.localStorage) {
-					mui.alert("您的浏览器不支持localStorage");
+					// mui.alert("您的浏览器不支持localStorage");
+					$(".year-dalog").addClass("active").show();
 				} else {
-					if(clickdate != null) {
-						var oldDate = new Date(clickdate.text).getDay();
-						//如果本地存储的getDay比当前时间的getDay大则显示弹窗
-						if(new Date().getDay() > oldDate) {
-							$(".year-dalog").addClass("active").show();
-						}
-					} else {
-						//本地没有存储时间也显示弹窗
+					var dalog_tc = localStorage.getItem('dalog_tc');
+					if(dalog_tc != 1){
 						$(".year-dalog").addClass("active").show();
 					}
 				}