问题描述
下面代码是官网出的一个demo,手机上访问是可以支付成功。但是一直不回调我接口返回数据,页面上alert(res.err_code+res.err_desc+res.err_msg);这个代码也没执行求解,求解<html><head><metahttp-equiv="content-type"content="text/html;charset=utf-8"/><title>微信安全支付</title><scripttype="text/javascript">//调用微信JSapi支付functionjsApiCall(){WeixinJSBridge.invoke('getBrandWCPayRequest',<?phpecho$jsApiParameters;?>,function(res){WeixinJSBridge.log(res.err_msg);alert(res.err_code+res.err_desc+res.err_msg);});}functioncallpay(){if(typeofWeixinJSBridge=="undefined"){if(document.addEventListener){document.addEventListener('WeixinJSBridgeReady',jsApiCall,false);}elseif(document.attachEvent){document.attachEvent('WeixinJSBridgeReady',jsApiCall);document.attachEvent('onWeixinJSBridgeReady',jsApiCall);}}else{jsApiCall();}}</script></head><body></br></br></br></br><divalign="center"><buttonstyle="width:210px;height:30px;background-color:#FE6714;border:0px#FE6714solid;cursor:pointer;color:white;font-size:16px;"type="button"onclick="callpay()">贡献一下</button></div></body></html>