wcj 6 年 前
コミット
8927cff1f7

+ 12 - 5
src/jfw/pay/weixin.go

@@ -383,11 +383,15 @@ func (p *WxPayAction) SacnPay_WaitPay() error {
 		if openid == "" || code == "" || token == "" {
 		if openid == "" || code == "" || token == "" {
 			return 0, 0, ""
 			return 0, 0, ""
 		}
 		}
-		data := tools.Mysql.FindOne("dataexport_order", map[string]interface{}{"order_code": code, "user_openid": openid}, "id,code_url,prepay_time,order_money", "")
+		data := tools.Mysql.FindOne("dataexport_order", map[string]interface{}{"order_code": code, "user_openid": openid}, "id,code_url,prepay_time,order_money,order_status", "")
 		if data == nil {
 		if data == nil {
 			log.Println("订单号不存在!", openid)
 			log.Println("订单号不存在!", openid)
 			return 0, 0, ""
 			return 0, 0, ""
 		}
 		}
+		if util.IntAll((*data)["order_status"]) != 0 {
+			log.Println("订单状态不允许支付!", openid)
+			return 0, 0, ""
+		}
 		orderid := (*data)["id"]
 		orderid := (*data)["id"]
 		orderMoney := util.IntAll((*data)["order_money"])
 		orderMoney := util.IntAll((*data)["order_money"])
 		realToken := util.GetMd5String(fmt.Sprintf("%s_%d_%s_%s", fmt.Sprint(orderid), orderMoney, code, openid))
 		realToken := util.GetMd5String(fmt.Sprintf("%s_%d_%s_%s", fmt.Sprint(orderid), orderMoney, code, openid))
@@ -400,26 +404,29 @@ func (p *WxPayAction) SacnPay_WaitPay() error {
 		codeUrl := util.ObjToString((*data)["code_url"])
 		codeUrl := util.ObjToString((*data)["code_url"])
 		if err == nil && surplus_second <= 0 {
 		if err == nil && surplus_second <= 0 {
 			log.Println("二维码已失效,重新生成预订单!", openid)
 			log.Println("二维码已失效,重新生成预订单!", openid)
+			surplus_second = 0
 			//重新生成预订单
 			//重新生成预订单
 			tradeno, ret := CreateOrder(p.IP(), openid, orderMoney)
 			tradeno, ret := CreateOrder(p.IP(), openid, orderMoney)
 			if ret != nil {
 			if ret != nil {
 				now := time.Now()
 				now := time.Now()
-				tools.Mysql.Update("dataexport_order", map[string]interface{}{
+				if tools.Mysql.Update("dataexport_order", map[string]interface{}{
 					"id": orderid,
 					"id": orderid,
 				}, map[string]interface{}{
 				}, map[string]interface{}{
 					"prepay_time":  util.FormatDate(&now, util.Date_Full_Layout),
 					"prepay_time":  util.FormatDate(&now, util.Date_Full_Layout),
 					"prepay_id":    (*ret)["prepayid"],
 					"prepay_id":    (*ret)["prepayid"],
 					"code_url":     (*ret)["codeurl"],
 					"code_url":     (*ret)["codeurl"],
 					"out_trade_no": tradeno,
 					"out_trade_no": tradeno,
-				})
-				codeUrl = (*ret)["codeurl"]
+				}) {
+					surplus_second = 7200
+					codeUrl = (*ret)["codeurl"]
+				}
 			}
 			}
 		}
 		}
 		r, _ := qr.Encode(codeUrl, qr.M)
 		r, _ := qr.Encode(codeUrl, qr.M)
 		pngdat := r.PNG()
 		pngdat := r.PNG()
 		return surplus_second, orderMoney, base64.StdEncoding.EncodeToString(pngdat)
 		return surplus_second, orderMoney, base64.StdEncoding.EncodeToString(pngdat)
 	}()
 	}()
-	p.T["money"] = money / 100
+	p.T["money"] = float64(money) / 100
 	p.T["surplus_second"] = surplus
 	p.T["surplus_second"] = surplus
 	p.T["qrcode"] = qrcode
 	p.T["qrcode"] = qrcode
 	return p.Render("/pc/waitpay.html")
 	return p.Render("/pc/waitpay.html")

+ 13 - 13
src/web/staticres/dataExport/css/pay_success.css

@@ -1,28 +1,28 @@
-#pay_succ { padding: 30px 0; position: relative; }
+#pay_succ { position: relative; }
 
 
-#pay_succ .progress { width: 1200px; display: inline-block; padding-left: 120px; margin-bottom: 30px; box-sizing: border-box; }
+#pay_succ .progress_ { width: 1200px; display: inline-block; padding-left: 120px; margin-bottom: 30px; box-sizing: border-box; }
 
 
-#pay_succ .progress div { width: 300px; height: 38px; line-height: 38px; text-align: center; background-color: #BFBFBF; float: left; margin-right: 8px; }
+#pay_succ .progress_ div { width: 300px; height: 38px; line-height: 38px; text-align: center; background-color: #BFBFBF; float: left; margin-right: 8px; }
 
 
-#pay_succ .progress div.a1 { background-color: #BFBFBF; color: #fff; }
+#pay_succ .progress_ div.a1 { background-color: #BFBFBF; color: #fff; }
 
 
-#pay_succ .progress div.b2 { background-color: #72DAE8; color: #fff; }
+#pay_succ .progress_ div.b2 { background-color: #72DAE8; color: #fff; }
 
 
-#pay_succ .progress div.c3 { background-color: #2CB7CA; color: #fff; }
+#pay_succ .progress_ div.c3 { background-color: #2CB7CA; color: #fff; }
 
 
-#pay_succ .progress .l { position: relative; z-index: 3; }
+#pay_succ .progress_ .l { position: relative; z-index: 3; }
 
 
-#pay_succ .progress .l:after { content: ""; position: absolute; right: -23px; top: 0; width: 0; height: 0; border-top: 19px solid transparent; border-left: 23px solid #72DAE8; border-bottom: 19px solid transparent; }
+#pay_succ .progress_ .l:after { content: ""; position: absolute; right: -23px; top: 0; width: 0; height: 0; border-top: 19px solid transparent; border-left: 23px solid #72DAE8; border-bottom: 19px solid transparent; }
 
 
-#pay_succ .progress .c { z-index: 2; position: relative; }
+#pay_succ .progress_ .c { z-index: 2; position: relative; }
 
 
-#pay_succ .progress .c:before { content: ""; position: absolute; left: 0; top: 0; width: 0; height: 0; border-top: 19px solid transparent; border-left: 23px solid #fff; border-bottom: 19px solid transparent; }
+#pay_succ .progress_ .c:before { content: ""; position: absolute; left: 0; top: 0; width: 0; height: 0; border-top: 19px solid transparent; border-left: 23px solid #fff; border-bottom: 19px solid transparent; }
 
 
-#pay_succ .progress .c:after { content: ""; position: absolute; right: -23px; top: 0; width: 0; height: 0; border-top: 19px solid transparent; border-left: 23px solid #2CB7CA; border-bottom: 19px solid transparent; }
+#pay_succ .progress_ .c:after { content: ""; position: absolute; right: -23px; top: 0; width: 0; height: 0; border-top: 19px solid transparent; border-left: 23px solid #2CB7CA; border-bottom: 19px solid transparent; }
 
 
-#pay_succ .progress .r { position: relative; }
+#pay_succ .progress_ .r { position: relative; }
 
 
-#pay_succ .progress .r:before { content: ""; position: absolute; left: 0; top: 0; width: 0; height: 0; border-top: 19px solid transparent; border-left: 23px solid #fff; border-bottom: 19px solid transparent; }
+#pay_succ .progress_ .r:before { content: ""; position: absolute; left: 0; top: 0; width: 0; height: 0; border-top: 19px solid transparent; border-left: 23px solid #fff; border-bottom: 19px solid transparent; }
 
 
 #pay_succ .main { background-color: #fff; padding: 30px; border-top: 2px solid #2CB7CA; font-size: 16px; }
 #pay_succ .main { background-color: #fff; padding: 30px; border-top: 2px solid #2CB7CA; font-size: 16px; }
 
 

+ 2 - 2
src/web/staticres/js/public-nav.js

@@ -9,7 +9,7 @@ $(function () {
 		    $thisWidth = $(this).width(),
 		    $thisWidth = $(this).width(),
 		    //当前宽度
 		    //当前宽度
 		$thisIndex = $(this).index();
 		$thisIndex = $(this).index();
-		if($href.indexOf("supsearch")>-1||$href.indexOf("bidsearchforent")>-1||$href.indexOf("promotional/topics")>-1||$href.indexOf("list")>-1||$href.indexOf("article/content")>-1||$href.indexOf("article/bdprivate")>-1||$href.indexOf("article/mailprivate")>-1||$href.indexOf("/jypc/toPushView")>-1||$href.indexOf("/jyblog")>-1||$href.indexOf("/dataExport")>-1){
+		if((typeof(myPageNavIsNormal)!="undefined"&&myPageNavIsNormal==true)||$href.indexOf("supsearch")>-1||$href.indexOf("bidsearchforent")>-1||$href.indexOf("promotional/topics")>-1||$href.indexOf("list")>-1||$href.indexOf("article/content")>-1||$href.indexOf("article/bdprivate")>-1||$href.indexOf("article/mailprivate")>-1||$href.indexOf("/jypc/toPushView")>-1||$href.indexOf("/jyblog")>-1||$href.indexOf("/dataExport")>-1){
 			$navLi.find("a").css({"color":"#252627"});
 			$navLi.find("a").css({"color":"#252627"});
 		}else{
 		}else{
 			$navLi.find("a").css({"color":"#fff"});
 			$navLi.find("a").css({"color":"#fff"});
@@ -39,7 +39,7 @@ function seclectNavLi(el, $index) {
 	var $slider = $(".public-nav .jynav .slider");
 	var $slider = $(".public-nav .jynav .slider");
 	/*获取当前这个元素的css*/
 	/*获取当前这个元素的css*/
 	var $thisCss = el.eq($index).width();
 	var $thisCss = el.eq($index).width();
-	if($href.indexOf("supsearch")>-1||$href.indexOf("bidsearchforent")>-1||$href.indexOf("promotional/topics")>-1||$href.indexOf("list")>-1||$href.indexOf("article/content")>-1||$href.indexOf("article/bdprivate")>-1||$href.indexOf("article/mailprivate")>-1||$href.indexOf("/jyblog")>-1||$href.indexOf("/dataExport")>-1){
+	if((typeof(myPageNavIsNormal)!="undefined"&&myPageNavIsNormal==true)||$href.indexOf("supsearch")>-1||$href.indexOf("bidsearchforent")>-1||$href.indexOf("promotional/topics")>-1||$href.indexOf("list")>-1||$href.indexOf("article/content")>-1||$href.indexOf("article/bdprivate")>-1||$href.indexOf("article/mailprivate")>-1||$href.indexOf("/jyblog")>-1||$href.indexOf("/dataExport")>-1){
 		el.find("a").css({"color":"#252627"});
 		el.find("a").css({"color":"#252627"});
 	}else{
 	}else{
 		el.find("a").css({"color":"#fff"});
 		el.find("a").css({"color":"#fff"});

BIN
src/web/staticres/upload/2018/11/15/201811151709277155.jpg


+ 103 - 9
src/web/templates/pc/waitpay.html

@@ -6,23 +6,112 @@
           content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
           content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
 	<script>
 	<script>
+		var myPageNavIsNormal = true;
 		var surplus_second = {{.T.surplus_second}};
 		var surplus_second = {{.T.surplus_second}};
-		setInterval(function(){
+		var interval = setInterval(function(){
 			surplus_second--;
 			surplus_second--;
 			if(document.getElementById("surplus_second")!=null){
 			if(document.getElementById("surplus_second")!=null){
 				document.getElementById("surplus_second").innerText = surplus_second;
 				document.getElementById("surplus_second").innerText = surplus_second;
 			}
 			}
+			if(surplus_second <= 0){
+				clearInterval(interval);
+			}
 		},1000);
 		},1000);
 	</script>
 	</script>
+	{{include "/common/pnc.html"}}
     <link rel="stylesheet" href="/dataExport/css/font_624651_bjdvktmum68.css">
     <link rel="stylesheet" href="/dataExport/css/font_624651_bjdvktmum68.css">
-    <link rel="stylesheet" href="/dataExport/css/reset_pc.css">
+	<link href="/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+	<link rel="stylesheet" href="/dataExport/css/conditions.css">
+	<link href="/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
     <link rel="stylesheet" href="/dataExport/css/pay_success.css">
     <link rel="stylesheet" href="/dataExport/css/pay_success.css">
-	{{include "/common/pnc.html"}}
+	<link rel="stylesheet" type="text/css" href="/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
+	<script type="text/javascript" src="/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
     <title>支付订单</title>
     <title>支付订单</title>
+	<style type="text/css">
+	.public-nav{
+	    border-bottom: 1px solid #e0e0e0;
+	}
+	/*j-wx-code Start*/
+	.j-wx-code{
+		width: 335px;
+		height: 355px;
+		background-color: #fff;
+		-webkit-border-radius: 6px;
+		   -moz-border-radius: 6px;
+		        border-radius: 6px;
+		position: relative;
+		/*margin: 100px auto;*/
+	}
+	.j-wx-code>.code-close{
+		width: 40px;
+		height: 40px;
+		position: absolute;
+		right: -20px;
+		top: -20px;
+		cursor: pointer;
+		-webkit-transition: all 1s;
+		-o-transition: all 1s;
+		-moz-transition: all 1s;
+		transition: all 1s;
+	}
+	.j-wx-code>.code-close:hover{
+		-webkit-transform: scale(1.2);
+		   -moz-transform: scale(1.2);
+		    -ms-transform: scale(1.2);
+		     -o-transform: scale(1.2);
+		        transform: scale(1.2);
+	}
+	.j-wx-code>.code-title{
+		height: 82px;
+		background:url(/images/j-wx-code-title.png) center center no-repeat;
+		-webkit-animation: moveYun 15s infinite linear both;
+		   -moz-animation: moveYun 15s infinite linear both;
+		     -o-animation: moveYun 15s infinite linear both;
+		        animation: moveYun 15s infinite linear both;
+	}
+	.j-wx-code>.code-wxm{
+		text-align: center;
+		margin-bottom: -6px;
+		margin-top: -16px;
+		
+	}
+	.j-wx-code>.code-wxm>img{
+		width: 200px;
+		height: 200px;
+		margin-top: -5px;
+	}
+	.j-wx-code>.code-text{
+		font: 16px "microsoft yahei";
+		text-align: center;
+		color: #252627;
+	}
+	.j-wx-code>.code-bottom{
+		width: 470px;
+		height: 211px;
+		position: absolute;
+		bottom: -113px;
+		left: -73px;
+		background: url(/images/j-wx-code-bottom.png) 0 0 no-repeat;
+	}
+	.j-wx-code>.code-bottom>img{
+		position: absolute;
+		left: 280px;
+		top: 88px;
+		-webkit-animation: codeWxMove 10s linear both;
+		   -moz-animation: codeWxMove 10s linear both;
+		     -o-animation: codeWxMove 10s linear both;
+		        animation: codeWxMove 10s linear both;
+		-webkit-animation-fill-mode:forwards;
+		   -moz-animation-fill-mode:forwards;
+		     -o-animation-fill-mode:forwards;
+		        animation-fill-mode:forwards;
+	}
+	</style>
 </head>
 </head>
 <body>
 <body>
-<section id="pay_succ" class="w">
-    <div class="progress">
+{{include "/common/pchead.html"}}
+<section id="pay_succ" class="conditions-box w">
+    <div class="progress_">
         <div class="l b2">
         <div class="l b2">
             1.条件筛选
             1.条件筛选
         </div>
         </div>
@@ -48,9 +137,9 @@
                 <div class="fl">
                 <div class="fl">
 					<div style="position:relative;">
 					<div style="position:relative;">
 						<img src="data:image/png;base64,{{.T.qrcode}}" style="width: 330px;position:relative;left:-15px;top:-15px;">
 						<img src="data:image/png;base64,{{.T.qrcode}}" style="width: 330px;position:relative;left:-15px;top:-15px;">
-						<a style="border-radius:3px;position:absolute;top:0px;border: 1px solid #ccc;width: 300px;height:300px;"></a>
+						<a style="border-radius:3px;position:absolute;left: 0;top:0px;border: 1px solid #ccc;width: 300px;height:300px;"></a>
 					</div>
 					</div>
-                    <div style="font-size: 16px; color: #1d1d1d;padding-left: 20px;margin-top: 30px;position: relative;top: -30px;">
+                    <div style="text-align:left;font-size: 16px; color: #1d1d1d;padding-left: 30px;margin-top: 30px;position: relative;top: -30px;">
 						<img src="/dataExport/image/wx_cm.jpg" style="vertical-align: middle;margin-right:10px;position: relative;top: -2px;"><span>使用手机微信扫描二维码支付</span>
 						<img src="/dataExport/image/wx_cm.jpg" style="vertical-align: middle;margin-right:10px;position: relative;top: -2px;"><span>使用手机微信扫描二维码支付</span>
 					</div>
 					</div>
                 </div>
                 </div>
@@ -58,10 +147,15 @@
                     <img src="/dataExport/image/phone_.png" alt="">
                     <img src="/dataExport/image/phone_.png" alt="">
                 </div>
                 </div>
             </div>
             </div>
-
         </div>
         </div>
     </div>
     </div>
-
 </section>
 </section>
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<script>
+	selcetIndexNav(4);
+	haslogin("10");
+	$(".logo img").attr("src","/images/swordfish/sf_01.png");
+</script>
 </body>
 </body>
 </html>
 </html>