|
@@ -253,6 +253,8 @@
|
|
|
var email_lastVerity = {{.T.timeSpaceing}}
|
|
|
var previewDataTime = {{.T.PreviewData}}
|
|
|
var phone_lastInput = {{.T.phone}}
|
|
|
+ var payway ={{.T.payway}}
|
|
|
+ console.log(payway)
|
|
|
//可以支付
|
|
|
var canpay = true;
|
|
|
//订单编号
|
|
@@ -324,6 +326,16 @@
|
|
|
$(".payment").text("支付宝支付");
|
|
|
}
|
|
|
}
|
|
|
+ //记录用户上次付款信息
|
|
|
+ if(payway){
|
|
|
+ if(payway=="ali"){
|
|
|
+ $("#zfb").attr("checked",true);
|
|
|
+ $(".payment").text("支付宝支付");
|
|
|
+ }else if (payway=="wx"){
|
|
|
+ $("#wx").attr("checked",true);
|
|
|
+ $(".payment").text("微信支付");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if(sessionStorage.index=="1"){
|
|
|
$(".choose .choose-item").eq(sessionStorage.index).addClass("active").siblings().removeClass("active");
|
|
@@ -354,18 +366,21 @@
|
|
|
$("#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){
|
|
|
+ console.log("if")
|
|
|
$(".email_check_ok").hide();
|
|
|
$(".email_input").val(sessionStorage.getItem("send_email_"+{{.T._id}}));
|
|
|
var emver = sessionStorage.getItem("EmailVerity_"+{{.T._id}});
|
|
|
- console.log(emver)
|
|
|
if(emver==null){
|
|
|
+ console.log("emver==null")
|
|
|
$(".email_input").parents('div.form-control').siblings().slideDown();
|
|
|
}else{
|
|
|
+ console.log("emver!=null")
|
|
|
+ $(".verity_input").val("");
|
|
|
$(".email_check_ok").show();
|
|
|
+ finishEmailVerity = true;
|
|
|
+ email_lastInput=sessionStorage.getItem("send_email_"+{{.T._id}});
|
|
|
}
|
|
|
lstimes = parseInt(sessionStorage.getItem("send_code_"+{{.T._id}}));
|
|
|
$(".verity_input").removeAttr("readonly");
|
|
@@ -373,17 +388,26 @@
|
|
|
if (lstimes>0){
|
|
|
sendemailTimer(lstimes);
|
|
|
}
|
|
|
- sessionStorage.removeItem("EmailVerity_"+{{.T._id}});
|
|
|
sessionStorage.removeItem("send_email_"+{{.T._id}});
|
|
|
}else {
|
|
|
+ console.log("else")
|
|
|
if (sessionStorage.getItem("order_email"+userId+ {{.T._id}}) != null) {
|
|
|
+ console.log("id!=null")
|
|
|
$(".email_check_ok").show();
|
|
|
$(".email_input").val(sessionStorage.getItem("order_email"+userId + {{.T._id}}));
|
|
|
finishEmailVerity = true;
|
|
|
} else if (email_lastInput != "") {
|
|
|
- $(".email_check_ok").show();
|
|
|
- $(".email_input").val(email_lastInput);
|
|
|
- finishEmailVerity = true;
|
|
|
+ console.log("email_lastInput!=null")
|
|
|
+// if(sessionStorage.getItem("new_email_"+userId)!=null){
|
|
|
+// $(".email_input").val(sessionStorage.getItem("new_email_"+userId));
|
|
|
+// $(".verification").show();
|
|
|
+// console.log("返回!")
|
|
|
+// $(".verity_input").attr("readonly", false);
|
|
|
+// }else{
|
|
|
+ $(".email_check_ok").show();
|
|
|
+ $(".email_input").val(email_lastInput);
|
|
|
+ finishEmailVerity = true;
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
if (email_lastVerity > 0) {
|
|
@@ -519,16 +543,20 @@
|
|
|
//邮箱输入监控
|
|
|
$(".email_input").on("input propertychange", function() {
|
|
|
var email_input = $(this).val().replace(/\s*/g, "");
|
|
|
+ console.log("email===="+email_input);
|
|
|
if (email_input.indexOf("@") > 0) {
|
|
|
+ console.log(email_lastInput)
|
|
|
if (email_input != email_lastInput) {
|
|
|
$(this).parents('div.form-control').siblings().slideDown();
|
|
|
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)){
|
|
|
+ console.log("可输入")
|
|
|
$(".verity_input").attr("readonly", false);
|
|
|
+ }else{
|
|
|
+ $(".verity_input").attr("readonly", true);
|
|
|
}
|
|
|
}
|
|
|
finishEmailVerity = false;
|
|
@@ -606,7 +634,6 @@
|
|
|
finishEmailVerity = false;
|
|
|
//发送成功
|
|
|
sendemailTimer(60 * 5);
|
|
|
- sessionStorage.email_sign="1";
|
|
|
$(".verity_input").removeAttr("readonly");;
|
|
|
$(".sendCode").attr("disabled", "disabled");
|
|
|
$(".email_input").attr("readonly", true);
|
|
@@ -639,11 +666,8 @@
|
|
|
}
|
|
|
$(".email_check_ok").show();
|
|
|
$(".email_err_msg").hide();
|
|
|
- console.log("555")
|
|
|
$(".verity_input").attr("readonly", true);
|
|
|
$(".email_input").parents('div.form-control').siblings().slideUp();
|
|
|
- //进入其他页面 验证码显示 清除缓存
|
|
|
- sessionStorage.removeItem("email_sign");
|
|
|
sessionStorage.setItem("EmailVerity_"+{{.T._id}},"T");
|
|
|
} else {
|
|
|
EasyAlert.show("验证码错误", "", 3000);
|
|
@@ -654,11 +678,16 @@
|
|
|
}
|
|
|
//防遮挡
|
|
|
}).on("focus",function(){
|
|
|
- this.scrollIntoView();
|
|
|
+ var target = this;
|
|
|
+ setTimeout(function(){
|
|
|
+ target.scrollIntoViewIfNeeded();
|
|
|
+ },600)
|
|
|
})
|
|
|
|
|
|
//点击阅读条款
|
|
|
$(".fixed-bottom-box .weui-check").on("click", function() {
|
|
|
+ console.log("finishEmailVerity:",finishEmailVerity)
|
|
|
+ console.log("finishPhoneVerity:",finishPhoneVerity)
|
|
|
if ($(this).is(":checked")) {
|
|
|
if (finishEmailVerity && finishPhoneVerity) {
|
|
|
readClause = true;
|
|
@@ -761,6 +790,7 @@
|
|
|
sessionStorage.removeItem("index");
|
|
|
sessionStorage.removeItem("pay_way");
|
|
|
sessionStorage.removeItem("new_email_"+userId);
|
|
|
+ sessionStorage.removeItem("EmailVerity_"+{{.T._id}});
|
|
|
clearInterval(interval);
|
|
|
window.location.replace("/jyapp/front/dataExport/paySuccessPage?code=" + r.orderCode+"&email="+r.email+"&payTime="+r.payTime+"&pay_way="+r.pay_way);
|
|
|
}
|