zhangxinlei1996 5 rokov pred
rodič
commit
e5d1521cbe

+ 20 - 1
src/web/templates/weixin/vipsubscribe/vip_upgrade.html

@@ -349,12 +349,31 @@
 		         	"paySign": res["sign"]
   				},
   				function(r){
-				    if(r.err_msg == "get_brand_wcpay_request:ok"){
+				    if(true){
 				    	//
                     	clearSessionStorage();
+						/*
 						setTimeout(function(){
 							window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode="+ordercode);
 						},500)
+						*/
+						 var interval
+				        //支付完成跳转
+				        function checkPaySuccess(orderCode){
+				        	if(interval){
+				            	clearInterval(interval);
+			        		}
+				        	interval=setInterval(function() {
+				            	$.post("/jypay/isPaySuccess", {
+											code: orderCode
+										}, function(r) {
+											if (r.success) {
+												window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode="+ordercode);
+												clearInterval(interval);
+											}
+										})
+				         	},3000)
+				        }
 					}
 //					}else if(r.err_msg == "get_brand_wcpay_request:cancel"){               
 ////	                	alert("开发环境【支付跳转完成】")