vue打开网页版支付宝链接

vue打开网页版支付宝链接,第1张

仅为笔记参考

// 立即支付
    payment() {
      immediatePayment({ videoId: this.id, payType: this.payType }).then(
        (res) => {
          console.log('支付成功', res)
          // 支付跳转 payType:1 微信,2:支付宝
          if (this.payType === 1) {
            this.dialogVisible = true
            // 拿到微信二维码地址
            this.QRlink = res.data
            // console.log('微信二维码', this.ewmUrl)
          } else {
            // 跳转支付宝网页版
            const div = document.createElement('div') // 创建div
            div.innerHTML = res.data // 将返回的form 放入div
            document.body.appendChild(div)
            document.forms[0].submit()
          }
        }
      )
   },

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/876335.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-13
下一篇2022-05-13

发表评论

登录后才能评论

评论列表(0条)

    保存