From b39a76c48cc1eb19b03cc2a56f73f067f70b579a Mon Sep 17 00:00:00 2001 From: liuqimichale <123456lq> Date: Thu, 14 Nov 2019 11:30:02 +0800 Subject: [PATCH] 调试微信支付 --- home.html | 2 +- js/pay.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/home.html b/home.html index cb8dab0..651e357 100644 --- a/home.html +++ b/home.html @@ -83,7 +83,7 @@ - + diff --git a/js/pay.js b/js/pay.js index ff53f4a..d19b97e 100644 --- a/js/pay.js +++ b/js/pay.js @@ -458,15 +458,13 @@ var webAppClass = { //1:有code获取OpenId postRequest(openIdUrl, codeParams, function (res) { - alert('走了微信接口') //alert(JSON.stringify(res)); if (res.code == 0) { - alert('走了微信接口为0') //alert(res.data); webAppClass.getPayParams(res.data, orderID); } else if (res.code == 40163) {//code been used, hints[重复code问题] - alert('走了微信接口不为0') + alertMsg(appState.codeNullTip); console.log(res.message); $btnObj.style.display = "block"; @@ -511,6 +509,9 @@ var webAppClass = { wxParams.openId = openId; wxParams.appId = appWxID; var payParamsUrl = webAppRoot + window.webAppH5.wxPayServer; + alert('调接口之前') + alert(payParamsUrl) + alert(JSON.stringify(wxParams)) //alert(payParamsUrl);alert(orderID); postRequest(payParamsUrl, wxParams, function (res) { alert('走了微信支付接口') -- libgit2 0.21.4