|
|
|
@ -19,9 +19,19 @@ $(document).ready(function () {
|
|
|
|
|
var dataCache = {paying: false};
|
|
|
|
|
$('#key_P').bind('touchstart', startPay);
|
|
|
|
|
if (window.paydata) {
|
|
|
|
|
wx.ready(function () {
|
|
|
|
|
var paymentInvoker = function() {
|
|
|
|
|
invokePay(window.paydata);
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
if (typeof WeixinJSBridge == "undefined"){
|
|
|
|
|
if( document.addEventListener ){
|
|
|
|
|
document.addEventListener('WeixinJSBridgeReady', paymentInvoker, false);
|
|
|
|
|
}else if (document.attachEvent){
|
|
|
|
|
document.attachEvent('WeixinJSBridgeReady', paymentInvoker);
|
|
|
|
|
document.attachEvent('onWeixinJSBridgeReady', paymentInvoker);
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
paymentInvoker();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function startPay() {
|
|
|
|
|