zhangxinlei1996 пре 5 година
родитељ
комит
f9f2154162

+ 149 - 63
src/web/templates/weixin/email/bind_email.html

@@ -3,7 +3,7 @@
 	<head>
 		<meta charset="utf-8">
 		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		{{if .T.text_email}}
-		<title>修改邮箱</title>
+		<title>更换邮箱</title>
 		{{else}}
 		<title>我的邮箱</title>
 		{{end}}
		<meta name="Keywords" content="绑定邮箱"/>
		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxmyemail/css/reset.css?v={{Msg "seo" "version"}}">
		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxmyemail/css/common.css?v={{Msg "seo" "version"}}">
		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxmyemail/css/mine.css?v={{Msg "seo" "version"}}"/>        
@@ -12,7 +12,8 @@
 		{{include "/common/weixin.html"}}
 		<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
 	</head>
-	<body>
+	<body style="visibility:hidden">
+		<!--<body>-->
 		<style>
 			.code_true{
 				position: absolute;
@@ -27,34 +28,105 @@
 			.email_input,.code_input{
 				line-height: 20px !important;
 			}
+			body .loading_ {
+			    height: 100%;
+			    width: 100%;
+			    position: fixed;
+			    background: #382f3d;
+			    z-index: 999999999990;
+				opacity: .7;
+				    margin-top: 20px;
+			}
+			body .loading_ > p {
+			    position: absolute;
+			    left: 0;
+			    right: 0;
+			    top: 0;
+			    bottom: 0;
+			    margin: auto;
+			    height: 60px;
+			    width: 60px;
+			    text-align: center;
+			    line-height: 60px;
+			    font-size: 0.36rem;
+			    color: rgba(44, 183, 202, 0.8);
+			}
+			body .loading_ p span {
+			    position: absolute;
+			    display: block;
+			    height: 40px;
+			    width: 40px;
+			    margin: 10px;
+			    border-radius: 50%;
+			    -webkit-box-shadow: 0 2px 3px rgba(44, 183, 202, 0.8);
+			    animation: loading_ ease 1s infinite;
+			    left: 0;
+			    top: 0;
+			}
+			@keyframes loading_ {
+			  0% {
+			    transform: rotate(0deg); }
+			  100% {
+			    transform: rotate(360deg); } 
+			}
 		</style>
+		<!-- 加载数据-->
+		<div class="loading_">
+		    <p><span></span></p>
+		</div>
 		<div class="bind_email">
			<div class="input mgT26">
				<input type="email" placeholder="输入邮箱" name="" id="" value="" class="email_input" />
				<input type="text" placeholder="输入验证码" name="" id="" value="" class="code_input" />
				<button class="sendcode" >获取验证码</button>
 				<button class="code_true"><i class="icon iconfont email_check_ok" style="display: inline;"></i></button>
-				<!--<i class="icon iconfont email_check_ok" style="display: inline;color:#2cb7ca"></i>-->
			</div>
			<button type="button" disabled="disabled" class="common_btn btn" id="bindBtn">绑定</button>
			<div class="toast" style="display: none;">
				<div class="toast_content"></div>
			</div>
		</div>
		<script src="{{Msg "seo" "cdn"}}/wxmyemail/js//zepto.js?v={{Msg "seo" "version"}}"></script>
		<script src="{{Msg "seo" "cdn"}}/wxmyemail/js/public.js?v={{Msg "seo" "version"}}1"></script>
		<script>
			$(function(){
+				<!--<i class="icon iconfont email_check_ok" style="display: inline;color:#2cb7ca"></i>-->
			</div>
			<button type="button" disabled="disabled" class="common_btn btn" id="bindBtn">绑定</button>
			<div class="toast" style="display: none;">
				<div class="toast_content"></div>
			</div>
		</div>
		<script src="{{Msg "seo" "cdn"}}/wxmyemail/js//zepto.js?v={{Msg "seo" "version"}}"></script>
		<script src="{{Msg "seo" "cdn"}}/wxmyemail/js/public.js?v={{Msg "seo" "version"}}1"></script>
		<script>
+			$(function () {    
+				var isPageHide = false;   
+				window.addEventListener('pageshow', function () {      
+				    if (isPageHide) {
+		                location.reload();
+				    }    
+				});    
+				window.addEventListener('pagehide', function () {
+				    isPageHide = true;
+				});  
+			});
+			var param = getParam('name');
+			var orderCode=getParam("orderCode");
+			function initpage(){
+				$(".loading_").hide();
+				if(sessionStorage.getItem("1-1")=="1"){
+					sessionStorage.removeItem("1-1")
+					if((param=="change")||(param=="unbind")){
+						window.location.replace("/front/wxMyOrder/myEmail");
+					}else{
+						location.reload();
+					}
+				}else{
+					$("body").css({"visibility":""});
+				}
+			}
			$(function(){
+//				var initflag = true;
+//				$(window).bind("pageshow", function(event){
+//					initflag = false;
+//					if (initflag){
+//						initpage();
+//					}
+//				});
+//				if (initflag){
+//					initflag = false;
+//					initpage();
+//				}
+				$("body").css({"visibility":""});
+				$(".loading_").hide();
 				initShare({{.T.signature}},{{.T.openid}},2,"jy_wxmyorder",{{.T.nickname}},{{.T.avatar}});
				var emailVal,code;
 				var userId={{.T.userId}}
				var reg = /^[a-zA-Z0-9]+([._-]*[a-zA-Z0-9]*)*@[a-zA-Z0-9]+.[a-zA-Z0-9{2,5}$]/;
 				//判断是否是更改邮箱;
-				var param = getParam('name');
-				var orderCode=getParam("orderCode");
 				if (param=="change"){
-					$(".email_input").attr("placeholder",{{.T.text_email}})
+					$(".email_input").attr("placeholder","输入新邮箱");
 					$("#bindBtn").html("确定");
 				}else if(param == "unbind"){
 					sessionStorage.setItem("unbind_"+userId,"ok");
 					promptbox("解绑成功");
 				}
 				
-//				$(".email_input").bind('input propertychange',()=>{
-//					if((sessionStorage.getItem("send_myemail_"+userId)!=null)&&(sessionStorage.getItem("send_myemail_"+userId)!="")){
-//						if((sessionStorage.getItem("send_myemail_"+userId))!= $('.email_input').val()){
-//							$('.sendcode').prop("disabled","disabled");
-//						}else{
-//							sessionStorage.removeItem("send_myemail_"+userId);
-//							$('.sendcode').removeAttr("disabled");
-//						}
-//					}
-//				})
-				
 				//
				$('.sendcode').on('click',function(){
 					var that =this;
					emailVal = $('.email_input').val();
					let isEmail = reg.test(emailVal);//正则验证邮箱号
					if($.trim(emailVal) === ''){
 						promptbox('邮箱号不能为空');
					}else if(isEmail === false){
						promptbox('邮箱格式不正确');
					}else{
@@ -82,57 +154,69 @@
 						});
 
					}
				})
 				
-										//验证码校验
-						$('.code_input').bind('input propertychange',()=>{
-							var verity=$(".code_input").val();
-							var email=$(".email_input").val().replace(/\s*/g,"");
-							if(verity.length==6){
-								$.post("/subscribepay/orderListDetails/checkMailCodeVerify",{
-									"email":email,
-									"emailVerity":verity,
-								},function(data){
-									if(data.success){
-										$(".sendcode").css("display","none");
-										$(".code_true").show();
-										$(".code_input").prop("readonly","true");
-										$("#bindBtn").removeAttr("disabled");
-									}else{
-										$(".code_true").hide();
-										$("#bindBtn").attr("disabled","disabled");
-										promptbox("邮箱验证码错误");
-									}
-								});
-							}
-						}).on("blur",()=>{
-							var code_input_len=$(".code_input").val().length
-							if((code_input_len!=6)&&(code_input_len!=0)){
+				//验证码校验
+				$('.code_input').bind('input propertychange',()=>{
+					var verity=$(".code_input").val();
+					var email=$(".email_input").val().replace(/\s*/g,"");
+					if(verity.length==6){
+						$.post("/subscribepay/orderListDetails/checkMailCodeVerify",{
+							"email":email,
+							"emailVerity":verity,
+						},function(data){
+							if(data.success){
+								$(".sendcode").css("display","none");
+								$(".code_true").show();
+								$(".code_input").prop("readonly","true");
+								$(".email_input").prop("readonly",true);
+								$("#bindBtn").removeAttr("disabled");
+							}else{
 								$(".code_true").hide();
 								$("#bindBtn").attr("disabled","disabled");
 								promptbox("邮箱验证码错误");
 							}
 						});
-						
-						//绑定
-						$("#bindBtn").on("click",function(){
-							$.post("/subscribepay/orderListDetails/emailOperation",{
-								"operation":"binding",
-								"email":$(".email_input").val()
-								},function(data){
-								if(data.success){
-									if ($("#bindBtn").text()=="确定"){	//更改绑定
-										sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
-										window.location.replace("/front/wxMyOrder/setSuccess?name=changeEmail"); 
-									}else{
-										sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
-										if((param="invoice")&&(orderCode!=null)){
-											window.location.replace("/front/wxMyOrder/setSuccess?name=invoice&orderCode="+orderCode); 
-										}else{
-											window.location.replace("/front/wxMyOrder/setSuccess?name=bindEmail"); 
-										}
-									}
+					}
+				}).on("blur",()=>{
+					var code_input_len=$(".code_input").val().length
+					if((code_input_len!=6)&&(code_input_len!=0)){
+						$(".code_true").hide();
+						$("#bindBtn").attr("disabled","disabled");
+						promptbox("邮箱验证码错误");
+					}
+				});
+				
+				//绑定
+				$("#bindBtn").on("click",function(){
+					$.post("/subscribepay/orderListDetails/emailOperation",{
+						"operation":"binding",
+						"email":$(".email_input").val()
+						},function(data){
+						if(data.success){
+							if ($("#bindBtn").text()=="确定"){	//更改绑定
+								sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
+								sessionStorage.setItem("1-1","1")
+								window.location.replace("/front/wxMyOrder/setSuccess?name=changeEmail"); 
+								$("body").css({"visibility":"hidden"});
+								$(".loading_").show();
+								//window.location.href="/front/wxMyOrder/setSuccess?name=changeEmail";
+							}else{
+								sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
+								if((param="invoice")&&(orderCode!=null)){
+									$(".loading_").show();
+									$("body").css({"visibility":"hidden"});
+									window.location.replace("/front/wxMyOrder/setSuccess?name=invoice&orderCode="+orderCode); 
+									//Window.location.href="/front/wxMyOrder/setSuccess?name=invoice&orderCode="+orderCode;
+								}else{
+									$("body").css({"visibility":"hidden"});
+									$(".loading_").show();
+									sessionStorage.setItem("1-1","1")
+									window.location.replace("/front/wxMyOrder/setSuccess?name=bindEmail");  
+									//window.location.href="/front/wxMyOrder/setSuccess?name=bindEmail";
 								}
-							})
-						})
			})
+							}
+						}
+					})
+				})
			})
 			
 			//提示框
 			function promptbox(str){
@@ -141,7 +225,9 @@
 				setTimeout(() =>{
 					$('.toast').hide(400);
 				},1500)
-			}
		</script>
+			}
+			
+
		</script>
 		
 	{{include "/common/baiducc.html"}}
	</body>
 </html>

+ 12 - 2
src/web/templates/weixin/email/bind_success.html

@@ -25,8 +25,16 @@
 				//分享
 				initShare({{.T.signature}},{{.T.openid}},2,"jy_wxmyorder",{{.T.nickname}},{{.T.avatar}});
 				
+				
 				let param = getParam('name');//获取url传来的参数 判断显示成功的字幕
 				var orderCode=getParam("orderCode"); //开发票的订单
+				if(param!="invoice"){
+					//增加一条历史记录
+					history.pushState({},"","");
+					window.addEventListener('popstate', function(event){
+						window.location.replace('/front/wxMyOrder/myEmail');
+					});
+				}
 				var time = 3;
 				function countDown(){
 					if(time == 0){
@@ -34,7 +42,8 @@
 						if((param=="invoice")&&(orderCode!=null)){
 							window.location.replace('/weixin/pay/toOrderDetailPage?orderCode='+orderCode);
 						}else{
-							window.location.replace('/front/wxMyOrder/myEmail');
+							window.history.go(-1);
+							//window.location.replace('/front/wxMyOrder/myEmail');
 						}
 					}else{
 						$('.time').html('(' + time + ')');
@@ -68,7 +77,8 @@
 					if((param=="invoice")&&(orderCode!=null)){
 							window.location.replace('/weixin/pay/toOrderDetailPage?orderCode='+orderCode);
 						}else{
-							window.location.replace('/front/wxMyOrder/myEmail');
+							window.history.go(-1);
+							//window.location.replace('/front/wxMyOrder/myEmail');
 						}
 				})
 			})

+ 2 - 1
src/web/templates/weixin/email/unbind_email.html

@@ -17,7 +17,8 @@
 					});
 					$('#sure_choose').on('click',() =>{
 						//sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
-						window.location.replace("/front/wxMyOrder/myEmail?name=change");
+						//window.location.replace("/front/wxMyOrder/myEmail?name=change");
+						window.location.href="/front/wxMyOrder/myEmail?name=change";
 					});
 				})
 				

+ 14 - 0
src/web/templates/weixin/my.html

@@ -79,6 +79,18 @@
 		</style>
 		
 		<script>
+			$(function () {    
+				var isPageHide = false;   
+				window.addEventListener('pageshow', function () {      
+				    if (isPageHide) {
+		                location.reload();
+				    }    
+				});    
+				window.addEventListener('pagehide', function () {
+				    isPageHide = true;
+				});  
+			});
+		
 			initShare({{.T.signature}},{{.T.openid}},2,"jy_wxmyorder",{{.T.nickname}},{{.T.avatar}});
 			$(function(){
 				var nowTimestamp= (new Date()).valueOf();
@@ -133,6 +145,8 @@
 			        }
 			    }
 			}
+			
+
 		</script>
 
 	</head>

+ 1 - 1
src/web/templates/weixin/vipsubscribe/edit_subscribe_success.html

@@ -16,7 +16,7 @@
         <div class="edit_success">
             <div><i class="icon iconfont success">&#xe612;</i></div>
             <p>修改成功</p>
-            <button class="public_btn" id="back">返回(<em class="time">5</em>)</button>
+            <button class="public_btn" id="back">返回(<em class="time">3</em>)</button>
         </div>
         <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
         <script>

+ 1 - 1
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -411,7 +411,7 @@ try{
       	if (r.data.order.order_status==0){
 	    	//倒计时 未购买
 			var create_time=r.data.order.create_time;
-			//create_time="2019-11-09 11:17:55";
+			create_time=create_time.replace(/-/g,'/')
 			var clock_end = +new Date(create_time) + 172800000;
 			setTimeFunc(clock_end); 
 			setInterval(function(){

+ 1 - 0
src/web/templates/weixin/vipsubscribe/vip_purchase.html

@@ -386,6 +386,7 @@
                             if (r.timeSelect!=undefined&&r.company!=undefined){
                            		purchase.timeSelect=[r.timeSelect,r.company];
                             }
+                            $(".weui-icon-checked").click();
                             sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
                             sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
                             sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));

+ 98 - 0
src/web/templates/weixin/wxinfocontent_rec.html

@@ -406,6 +406,45 @@ pre {
 	left: 90%;
 	top: 20px;
 }
+
+.buyerclass{
+    background: #CFAD89;
+    padding: 1px 3px;
+    color: #fff;
+    border-radius: 3px;
+    margin-right: 3px;
+    float: left;
+}
+.timebefore_vip{
+	color: #888888;
+    font-size: 14px;
+	
+}
+.timebefore_vip i{
+	color: #7a7a7a;
+	font-size: 16px;
+	top: 3px;
+}
+.toolbar{
+	font-size: 13px;
+	margin:10px 10px 25px;
+}
+.toolbar i{
+	margin-right: 2px;
+}
+.toolbar .follow{
+	float: right;
+	color: #ffba00;
+	position: relative;
+	top: 2px;
+}
+.toolbar .follow_vip{
+	float: right;
+	color: #ffba00;
+}
+.toolbar .follow i,.toolbar .follow_vip i{
+	top: 2px;
+}
 </style>
 </head>
 <body>
@@ -427,6 +466,64 @@ pre {
 <div class="info">
 	<div class="title myfollow" id="title">{{.T.obj.title}}</div>
 	<div class="toolbar">
+	{{if .T.isVip}}
+	<!--VIP-->
+		<div class="type_label clearfix">
+			<script>var area="{{.T.obj.area}}"; if(area!="A" && area.replace(/\s+/g,"")!=""){document.write('<span class="area">'+area+'</span>');}</script>
+			<script>
+				var type = "";
+				if ({{.T.obj.subtype}} !=""){
+					type = {{.T.obj.subtype}};
+				}else if({{.T.obj.toptype}} !=""){
+					type = {{.T.obj.toptype}};
+				}else{
+					type = {{.T.obj.type}};
+					if(type == "bid"){
+						type = "中标";
+					}else if(type == "tender"){
+						type = "招标";
+					}else{
+						type = "";
+					}
+				}
+				if(type != ""){
+					document.write("<span class='type'>"+type+"</span>");
+				}
+	
+				var industry = {{.T.obj.industry}};
+				var subscopeclass = {{.T.obj.s_subscopeclass}};
+				//vip用户显示与普通用户不同
+				var buyerclass={{.T.obj.buyerclass}};
+				if(industry){
+	                document.write("<span class='industry'>"+industry+"</span>");
+				}else if(subscopeclass){
+					var suclass = subscopeclass.split(",")[0];
+					document.write("<span class='industry'>"+ suclass.split("_")[0]+"</span>");
+				}
+				if(buyerclass){
+					document.write("<span class='buyerclass'>"+ buyerclass+"</span>");
+				}
+				//项目匹配
+				projectMatch=getParam("projectMatch");
+				if (projectMatch){
+					document.write("<span class='projectMatch'>"+projectMatch+"</span>")
+				}
+				
+			</script>
+		</div>
+		<div class="time_label">
+			<script>
+				var l_publishtime = {{.T.obj.l_publishtime}};
+					if(l_publishtime != ""){
+						var tdf = timeDiff(new Date(Number(l_publishtime+"000")))
+						if(tdf != null){
+							document.write("<div class='timebefore_vip'><i class='glyphicon bofangjilu'></i>"+tdf+"</div>");
+						}
+					}
+			</script>
+		{{if .T.obj.hasSession}}{{if or .T.obj.projectname .T.obj.projectcode}}<div class="follow" style="top:-21px !important">{{if .T.obj.followFlag}}<i class="glyphicon yiguanzhu"></i>已关注{{else}}<i class="glyphicon weiguanzhu"></i>关注项目{{end}}</div>{{end}}{{else}}<!--<a href="/swordfish/share/-1" style="text-decoration: none;color:#24C0D7;"><span class="follow"><i class="glyphicon weiguanzhu"></i></span>关注项目</a>-->{{end}}
+		</div>
+	{{else}}<!--非VIP-->
 		<script>var area="{{.T.obj.area}}"; if(area!="A" && area.replace(/\s+/g,"")!=""){document.write('<span class="area">'+area+'</span>');}</script>
 		<script>
 			var type = "";
@@ -465,6 +562,7 @@ pre {
 			}
 		</script>
 		{{if .T.obj.hasSession}}{{if or .T.obj.projectname .T.obj.projectcode}}<span class="follow">{{if .T.obj.followFlag}}<i class="glyphicon yiguanzhu"></i>已关注{{else}}<i class="glyphicon weiguanzhu"></i>关注项目{{end}}</span>{{end}}{{else}}<!--<a href="/swordfish/share/-1" style="text-decoration: none;color:#24C0D7;"><span class="follow"><i class="glyphicon weiguanzhu"></i></span>关注项目</a>-->{{end}}
+	{{end}}
 	</div>
 	
 	<div class="newuser hidden">