vue调起微信支付,vue获取openid

vue调起微信支付

vue获取code、openid

vue调起微信支付
	//微信调起
      weixinPay:function(){
   
        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));
          }
        }else{
   
          this.onBridgeReady();
        }
      },

      

你可能感兴趣的:(VUE,微信公众号充值,vue调起微信支付,vue获取openid)