<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
<script type="text/javascript">
document.addEventListener('UniAppJSBridgeReady', function() {
uni.postMessage({
data: {
action: 'postMessage'
}
});
uni.navigateBack({
delta:10
});
})
</script>
我在本地html页面里面这样写,在unapp vue页面可以通过<web-view src="/hybrid/html/local.html" @message="getMessage" ></web-view>
getMessage(e) {
console.log("@message",JSON.stringify(e.detail))
}
这个拿到传过来的值,但是,我现在的项目,html这个页面是后端用Php直接写好了传过来的,然后我这边就拿不到值了,这个是怎么回事啊?
0 个回复