仅为笔记参考
// 立即支付
payment() {
immediatePayment({ videoId: this.id, payType: this.payType }).then(
(res) => {
console.log('支付成功', res)
// 支付跳转 payType:1 微信,2:支付宝
// 1.网页转化成收款码
if (this.payType === 1) {
this.dialogVisible = true
// 拿到微信二维码地址
this.QRlink = res.data
// console.log('微信二维码', this.ewmUrl)
this.getQRcode()
}
// 2.H5调微信支付(两种情况二选一)
if (this.radio === "1") {
if (res.payType === "auth") {
//微信授权
console.log(res);
window.location.href = res.data;
} else if (res.payType === "jspPay") {
function onBridgeReady() {
WeixinJSBridge.invoke(
"getB