<script>
function onBridgeReady() {
alert(1)
WeixinJSBridge.invoke('getBrandWCPayRequest', {
"appId": "",
"timeStamp": "1395712654",
"nonceStr": "",
"package": "prepay_id=",
"signType": "RSA",
"paySign": "oR9d8PuhnIc+\/X+QBhcCYL21N7cHCTUxbQ+EAt6Uy+lwSN22f5YZvI45MLko8Pfso0jm46v5hqcVwrk6uddkGuT+Cdvu4WBqDzaDjnNa5UK3GfE1Wfl2gHxIIY5lLdUgWFts17D4WuolLLkiFZV+JSHMvH7eaLdT9N5GBovBwu5yYKUR7skR8Fu+LozcSqQixnlEZUfyE55feLOQTUYzLmR9pNtPbPsu6WVhbNHMS3Ss2+AehHvz+n64GDmXxbX++IOBvm2olHu3PsOUGRwhudhVf7UcGcunXt8cqNjKNqZLhLw4jq\/xDg=="
},
function(res) {
alert(res);
if (res.err_msg == "get_brand_wcpay_request:ok") {
}
});
}
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
}
} else {
onBridgeReady();
}
</script>
<button id='call'>ccc</button>
<script>
$('#call').bind('click',onBridgeReady)
</script>
https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_4.shtml
直接复制上面的代码调用,点击按钮后只弹出1,alert(res); 没有反应,如果错误最起码有反应吧,
上周还好好的,不知道是不是改过什么东西
我也是这个问题..解决了吗
解决了吗