Răsfoiți Sursa

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

wangkaiyue 5 ani în urmă
părinte
comite
889c4aafe8
1 a modificat fișierele cu 20 adăugiri și 18 ștergeri
  1. 20 18
      src/web/templates/weixin/vipsubscribe/vip_upgrade.html

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

@@ -349,7 +349,7 @@
 		         	"paySign": res["sign"]
   				},
   				function(r){
-				    if(true){
+				    if(r.err_msg == "get_brand_wcpay_request:ok"){
 				    	//
                     	clearSessionStorage();
 						/*
@@ -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)