Commit b39a76c48cc1eb19b03cc2a56f73f067f70b579a

Authored by liuqimichale
1 parent 8aa21713

调试微信支付

Showing 2 changed files with 5 additions and 4 deletions
home.html
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
83 <script src="js/config.js?v=0.1"></script> 83 <script src="js/config.js?v=0.1"></script>
84 <script src="js/common.js?v=1.11"></script> 84 <script src="js/common.js?v=1.11"></script>
85 <!--<script src="js/jweixin-1.0.0.js?v=0.1"></script>--> 85 <!--<script src="js/jweixin-1.0.0.js?v=0.1"></script>-->
86 -<script src="js/pay.js?v=0.320"></script> 86 +<script src="js/pay.js?v=0.4420"></script>
87 </body> 87 </body>
88 88
89 </html> 89 </html>
js/pay.js
@@ -458,15 +458,13 @@ var webAppClass = { @@ -458,15 +458,13 @@ var webAppClass = {
458 458
459 //1:有code获取OpenId 459 //1:有code获取OpenId
460 postRequest(openIdUrl, codeParams, function (res) { 460 postRequest(openIdUrl, codeParams, function (res) {
461 - alert('走了微信接口')  
462 //alert(JSON.stringify(res)); 461 //alert(JSON.stringify(res));
463 if (res.code == 0) { 462 if (res.code == 0) {
464 - alert('走了微信接口为0')  
465 //alert(res.data); 463 //alert(res.data);
466 webAppClass.getPayParams(res.data, orderID); 464 webAppClass.getPayParams(res.data, orderID);
467 } 465 }
468 else if (res.code == 40163) {//code been used, hints[重复code问题] 466 else if (res.code == 40163) {//code been used, hints[重复code问题]
469 - alert('走了微信接口不为0') 467 +
470 alertMsg(appState.codeNullTip); 468 alertMsg(appState.codeNullTip);
471 console.log(res.message); 469 console.log(res.message);
472 $btnObj.style.display = "block"; 470 $btnObj.style.display = "block";
@@ -511,6 +509,9 @@ var webAppClass = { @@ -511,6 +509,9 @@ var webAppClass = {
511 wxParams.openId = openId; 509 wxParams.openId = openId;
512 wxParams.appId = appWxID; 510 wxParams.appId = appWxID;
513 var payParamsUrl = webAppRoot + window.webAppH5.wxPayServer; 511 var payParamsUrl = webAppRoot + window.webAppH5.wxPayServer;
  512 + alert('调接口之前')
  513 + alert(payParamsUrl)
  514 + alert(JSON.stringify(wxParams))
514 //alert(payParamsUrl);alert(orderID); 515 //alert(payParamsUrl);alert(orderID);
515 postRequest(payParamsUrl, wxParams, function (res) { 516 postRequest(payParamsUrl, wxParams, function (res) {
516 alert('走了微信支付接口') 517 alert('走了微信支付接口')