uniapp通过webview调用第三方页面,ios系统点击没有任何反应,而安卓系统手机则会重复加载第三方H5网页。
代码如下
<template>
<view><web-view :src="subviewUrl" @message="handleMessage"></web-view></view>
</template>
<script>
export default {
data() {
return {
subviewUrl: ''
};
},
methods: {
handleMessage(evt) {
console.log('接收到的消息:' + JSON.stringify(evt.detail.data));
}
},
onLoad(option) {
let ccbWebUrl = uni.getStorageSync('CCB_WEB_PAY_URL');
this.subviewUrl = ccbWebUrl;
}
};
</script>
<style></style>
1 个回复
DCloud_UNI_GSQ
换个地址试试,这个页面可能一直在向前跳转