后端返回了支付宝form表单 使用web-view加载后可以显示,但是不能唤醒支付宝APP

1***@qq.com
- 发布:2019-05-23 21:44
- 更新:2022-04-01 16:36
- 阅读:17249

这个问题应该是后端使用的某个库直接返回的表单数据,我的方案是在根节点下添加一个view,将获取到的表单内容设置到v-v-html
,设置完后,在nextTick中提交表单,完成支付。具体如下:
<template>
<!-- other code ... -->
<view v-html="payForm“>
</template>
pay() {
this.formHtml = response.data.data;
this.$nextTick(() => {
document.forms['alipaysubmit'].submit();
})
}
希望可以帮到遇到同样问题的朋友!

这个是支付宝h5页面自己的逻辑,它会调用scheme唤起app。uni-app的app的webview是支持scheme的

请问后台返回的form表单,uniapp里怎么打开?

Flame_ - 入门级前端渣渣
请问后台返回的form表单,uniapp里怎么打开?