其他分享
首页 > 其他分享> > uni-app微信内置浏览器支付

uni-app微信内置浏览器支付

作者:互联网

// 微信内置浏览器支付
onBridgeReady(data){
// #ifdef H5
  WeixinJSBridge.invoke('getBrandWCPayRequest', {
    appId:data.appid,
    timeStamp: String(data.timestamp),
    nonceStr: data.noncestr,
    package: data.package,
    signType: data.signtype,
    paySign: data.paysign, //微信签名 
  });
  if (typeof WeixinJSBridge == "undefined") {
    if (document.addEventListener) {
      document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(data), false);
    } else if (document.attachEvent) {
      document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(data));
      document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(data));
    }
  }
// #endif
},

标签:微信,app,attachEvent,onBridgeReady,uni,WeixinJSBridgeReady,document,data
来源: https://www.cnblogs.com/rzl795/p/16597584.html