zhangxinlei1996 5 жил өмнө
parent
commit
2a1564e7d2

+ 19 - 17
src/web/templates/weixin/vipsubscribe/vip_upgrade.html

@@ -357,24 +357,9 @@
 							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)
-				        }
+						checkPaySuccess(data.order);
 					}
+					
 //					}else if(r.err_msg == "get_brand_wcpay_request:cancel"){               
 ////	                	alert("开发环境【支付跳转完成】")
 //		                try{
@@ -390,6 +375,23 @@
 //	                	});
 //	  				}
   				});
+				 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)
+				        }
   			}   
 		}catch(e){
 		  console.log(e)