vue里接收后端返回的from并提交,跳转支付

 1 let pamases = {
 2                  username:this.aggregatedata.sellerName,
 3                  userId:this.aggregatedata.sellerId,
 4                  rechargeAmount:this.Recharge.RechargeAmount,
 5                  userType:'卖家',
 6                  productCode:'CZ',
 7              }
 8               this.$api.Implementation.gochana(pamases).then( res => {
 9                  //  this.htmls = res;
10                  document.querySelector('body').innerHTML = res;
11                  
12                  const div = document.createElement('div') // 创建div
13                  div.innerHTML = res // 将返回的form 放入div
14                  document.body.appendChild(div)
15                  document.forms[0].submit()
16                  
17               })
18              this.$message({
19              showClose: true,
20              message: '请输入正确的充值金额',
21              type: 'warning'
22              });
原文地址:https://www.cnblogs.com/qdjj/p/13544793.html