소스 검색

Merge branch 'dev2.8' of http://192.168.3.207:10080/qmx/jy into dev2.8

xuzhiheng 5 년 전
부모
커밋
38f75e99c3

+ 16 - 16
src/jfw/front/follow.go

@@ -208,14 +208,14 @@ func (m *Follow) ShareFW(tp string) error {
 	fields := `"_id","title","comeintime","projectcode","projectname","bidopentime","projectcode","area","toptype","subtype","type","href","publishtime","area"`
 	data := elastic.GetByIdField("bidding", "bidding", id, fields)
 	bidopentime := (*data)["bidopentime"]
-	if bidopentime != nil {
+	if bidopentime != nil && util.Int64All(bidopentime) != 0 {
 		m.T["bidopentime"] = util.FormatDateWithObj(&bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(bidopentime), 0).Weekday().String())
 		m.T["l_bidopentime"] = bidopentime
 	}
-	if remindtime := (*data)["remindtime"]; remindtime != nil {
+	if remindtime := (*data)["remindtime"]; remindtime != nil && util.Int64All(remindtime) != 0 {
 		m.T["remindtime"] = util.FormatDateWithObj(&remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(remindtime), 0).Weekday().String())
 		m.T["l_remindtime"] = remindtime
-	} else if bidopentime != nil {
+	} else if bidopentime != nil && util.Int64All(bidopentime) != 0 {
 		date := time.Unix(util.Int64All(bidopentime), 0).AddDate(0, 0, -1)
 		m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 		m.T["l_remindtime"] = date.Unix()
@@ -355,14 +355,14 @@ func (m *Follow) Photo(tp string) error {
 		m.T["l_lastpushtime"] = (*data)["l_lastpushtime"]
 		m.T["a_lastpushids"] = (*data)["a_lastpushids"]
 		l_bidopentime := (*data)["l_bidopentime"]
-		if l_bidopentime != nil && l_bidopentime != "" {
+		if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			m.T["bidopentime"] = util.FormatDateWithObj(&l_bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_bidopentime), 0).Weekday().String())
 			m.T["l_bidopentime"] = l_bidopentime
 		}
-		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" {
+		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" && util.Int64All(l_remindtime) != 0 {
 			m.T["remindtime"] = util.FormatDateWithObj(&l_remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_remindtime), 0).Weekday().String())
 			m.T["l_remindtime"] = l_remindtime
-		} else if l_bidopentime != nil && l_bidopentime != "" {
+		} else if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			date := time.Unix(util.Int64All(l_bidopentime), 0).AddDate(0, 0, -1)
 			m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 			m.T["l_remindtime"] = date.Unix()
@@ -394,14 +394,14 @@ func (m *Follow) Photo(tp string) error {
 			}
 			////////////////////////
 			bidopentime := (*data)["bidopentime"]
-			if bidopentime != nil && bidopentime != "" {
+			if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				m.T["bidopentime"] = util.FormatDateWithObj(&bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(bidopentime), 0).Weekday().String())
 				m.T["l_bidopentime"] = bidopentime
 			}
-			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" {
+			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" && util.Int64All(remindtime) != 0 {
 				m.T["remindtime"] = util.FormatDateWithObj(&remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(remindtime), 0).Weekday().String())
 				m.T["l_remindtime"] = remindtime
-			} else if bidopentime != nil && bidopentime != "" {
+			} else if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				date := time.Unix(util.Int64All(bidopentime), 0).AddDate(0, 0, -1)
 				m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 				m.T["l_remindtime"] = date.Unix()
@@ -646,7 +646,7 @@ func (m *Follow) Addsave() error {
 				data["s_title"] = d["title"]
 				data["s_area"] = d["area"]
 				data["s_province"] = d["area"]
-				if bidopentime := d["bidopentime"]; bidopentime != nil {
+				if bidopentime := d["bidopentime"]; bidopentime != nil && util.Int64All(bidopentime) != 0 {
 					data["l_bidopentime"] = bidopentime
 				}
 				if d["projectcode"] != nil {
@@ -737,14 +737,14 @@ func (m *Follow) Set(tp, id string) error {
 			mySelf["l_publishtime"] = (*data)["publishtime"]
 			////////////////////////
 			bidopentime := (*data)["bidopentime"]
-			if bidopentime != nil && bidopentime != "" {
+			if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				m.T["bidopentime"] = util.FormatDateWithObj(&bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(bidopentime), 0).Weekday().String())
 				m.T["l_bidopentime"] = bidopentime
 			}
-			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" {
+			if remindtime := (*data)["remindtime"]; remindtime != nil && remindtime != "" && util.Int64All(remindtime) != 0 {
 				m.T["remindtime"] = util.FormatDateWithObj(&remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(remindtime), 0).Weekday().String())
 				m.T["l_remindtime"] = remindtime
-			} else if bidopentime != nil && bidopentime != "" {
+			} else if bidopentime != nil && bidopentime != "" && util.Int64All(bidopentime) != 0 {
 				date := time.Unix(util.Int64All(bidopentime), 0).AddDate(0, 0, -1)
 				m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 				m.T["l_remindtime"] = date.Unix()
@@ -804,14 +804,14 @@ func (m *Follow) Set(tp, id string) error {
 		m.T["l_lastpushtime"] = (*data)["l_lastpushtime"]
 		m.T["a_lastpushids"] = (*data)["a_lastpushids"]
 		l_bidopentime := (*data)["l_bidopentime"]
-		if l_bidopentime != nil && l_bidopentime != "" {
+		if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			m.T["bidopentime"] = util.FormatDateWithObj(&l_bidopentime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_bidopentime), 0).Weekday().String())
 			m.T["l_bidopentime"] = l_bidopentime
 		}
-		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" {
+		if l_remindtime := (*data)["l_remindtime"]; l_remindtime != nil && l_remindtime != "" && util.Int64All(l_remindtime) != 0 {
 			m.T["remindtime"] = util.FormatDateWithObj(&l_remindtime, "2006年01月02日 15时") + " " + convertWeekday(time.Unix(util.Int64All(l_remindtime), 0).Weekday().String())
 			m.T["l_remindtime"] = l_remindtime
-		} else if l_bidopentime != nil && l_bidopentime != "" {
+		} else if l_bidopentime != nil && l_bidopentime != "" && util.Int64All(l_bidopentime) != 0 {
 			date := time.Unix(util.Int64All(l_bidopentime), 0).AddDate(0, 0, -1)
 			m.T["remindtime"] = util.FormatDate(&date, "2006年01月02日 15时") + " " + convertWeekday(date.Weekday().String())
 			m.T["l_remindtime"] = date.Unix()

+ 17 - 3
src/jfw/modules/app/src/web/templates/dataExport/dataExport_payOrder.html

@@ -354,6 +354,9 @@
 					    $("#bottombox").css("position","fixed");
 					}
 			   	});
+			   	if(sessionStorage.getItem("new_email_"+userId)!=null){
+			   		$(".email_input").val(sessionStorage.getItem("new_email_"+userId));
+			   	}
 				if (sessionStorage.getItem("send_email_"+{{.T._id}})!=null&&sessionStorage.getItem("send_code_"+{{.T._id}})!=null&&sessionStorage.getItem("send_email_"+{{.T._id}})!=email_lastInput){
 					$(".email_check_ok").hide();
 					$(".email_input").val(sessionStorage.getItem("send_email_"+{{.T._id}}));
@@ -519,10 +522,14 @@
 					if (email_input.indexOf("@") > 0) {
 						if (email_input != email_lastInput) {
 							$(this).parents('div.form-control').siblings().slideDown();
-							console.log(email_lastVerity)
 							if (email_lastVerity > 0) {
+								console.log("3333")
 								$("#sendCode").attr("disabled", true);
+								//返回后验证码可输入
 								$(".verity_input").attr("readonly", true);
+								if((sessionStorage.getItem("new_email_"+userId)!=null)&&(sessionStorage.getItem("new_email_"+userId)==email_input)){
+									$(".verity_input").attr("readonly", false);
+								}
 							}
 							finishEmailVerity = false;
 							$(".toPay").attr("disabled", "disabled");
@@ -536,6 +543,7 @@
 								$(".email_err_msg").hide();
 							}
 						} else {
+							console.log("111")
 							finishEmailVerity = true;
 							if (readClause && finishPhoneVerity) {
 								$(".toPay").removeAttr("disabled")
@@ -547,6 +555,7 @@
 							$(this).parents('div.form-control').siblings().slideUp();
 						}
 					} else {
+						console.log("222")
 						$(this).parents('div.form-control').siblings().slideUp();
 						$("#sendCode").attr("disabled", "disabled");
 						$(".verity_input").attr("readonly", true);
@@ -603,6 +612,8 @@
 								$(".email_input").attr("readonly", true);
 								//sessionStorage.setItem("send_email_"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
 								sessionStorage.setItem("send_code_"+{{.T._id}}, Date.parse(new Date())/1000);
+								//
+								sessionStorage.setItem("new_email_"+userId,$(".email_input").val().replace(/\s*/g,""))
 							}
 						} else {
 							EasyAlert.show(data.errMsg, "", 3000)
@@ -628,6 +639,7 @@
 								}
 								$(".email_check_ok").show();
 								$(".email_err_msg").hide();
+								console.log("555")
 								$(".verity_input").attr("readonly", true);
 								$(".email_input").parents('div.form-control').siblings().slideUp();
 								//进入其他页面 验证码显示 清除缓存
@@ -648,9 +660,9 @@
 				//点击阅读条款
 				$(".fixed-bottom-box .weui-check").on("click", function() {
 					if ($(this).is(":checked")) {
-						readClause = true;
-						sessionStorage.readClause="true";
 						if (finishEmailVerity && finishPhoneVerity) {
+							readClause = true;
+							sessionStorage.readClause="true";
 							$(".toPay").removeAttr("disabled")
 						}
 					} else {
@@ -748,6 +760,7 @@
 							        sessionStorage.removeItem("readClause");
 								    sessionStorage.removeItem("index");
 									sessionStorage.removeItem("pay_way");
+									sessionStorage.removeItem("new_email_"+userId);
 									clearInterval(interval);
 									window.location.replace("/jyapp/front/dataExport/paySuccessPage?code=" + r.orderCode+"&email="+r.email+"&payTime="+r.payTime+"&pay_way="+r.pay_way);
 								}
@@ -766,6 +779,7 @@
 						clearInterval(r)
 						$(".sendCode").text("发送验证码");
 						if (!finishEmailVerity) {
+							console.log("666")
 							$(".verity_input").attr("readonly", true);
 							$(".sendCode").removeAttr("disabled");
 							$(".email_input").removeAttr("readonly");

+ 9 - 4
src/web/templates/weixin/dataExport/dataExport_payOrder.html

@@ -240,6 +240,7 @@
 			//节后待处理:
 			//用户输入邮箱验证,点击获取验证码,在没有输入验证码的情况下,1.点击预览或者条款,返回后存session的邮件缓存和剩余时间,(返回后页面不会读取后台新的剩余数量,需处理一下。)处理后清除。2.返回上一页,重新点击数据导出到此页面,之前填写的邮件缓存等已不存在,但是剩余时间还在,当下的处理是时间直接显示,存在缺陷,需要出现发送验证按钮 ,如果此次属于邮箱和上次属于邮箱一致,则剩余时间继续减少,否则,重新发送验证。
 			//记录send_code_*改为发送验证码的时间-返回后重新计算剩余时间(同后台)。
+			var userId={{session "userId"}}
 			var msgCount={{.T.msgCount}}
 			var msgMaxCount={{.T.msgMaxCount}}
 			var discount={{.T.discount}}
@@ -459,7 +460,11 @@
 							$(this).parents('div.form-control').siblings().slideDown();
 							if(email_lastVerity>0){
 								$("#sendCode").attr("disabled", true);
-								$(".verity_input").attr("readonly",true);
+								//返回后验证码可输入
+								$(".verity_input").attr("readonly", true);
+								if((sessionStorage.getItem("new_email_"+userId)!=null)&&(sessionStorage.getItem("new_email_"+userId)==email_input)){
+									$(".verity_input").attr("readonly", false);
+								}
 							}
 							finishEmailVerity=false;
 							$(".toPay").attr("disabled","disabled");
@@ -537,7 +542,7 @@
 								$(".sendCode").attr("disabled","disabled");
 								$(".email_input").attr("readonly",true);
 								sessionStorage.setItem("send_code_"+{{.T._id}}, Date.parse(new Date())/1000);
-
+								sessionStorage.setItem("new_email_"+userId,$(".email_input").val().replace(/\s*/g,""))
 							}
 						}else{
 							EasyAlert.show(data.errMsg,"",3000)
@@ -581,9 +586,9 @@
 				//点击阅读条款
 				$(".fixed-bottom-box .weui-check").on("click", function () {
 					if($(this).is(":checked")){
-						readClause=true;
-						sessionStorage.readClause="true";
 						if(finishEmailVerity&&finishPhoneVerity){
+							readClause=true;
+							sessionStorage.readClause="true";
 							$(".toPay").removeAttr("disabled")
 						} 
 					}else{