<view>
<web-view src="https://00.com/demo/weixin/index1.html" bindmessage="pagesdata"/>
</view>
pagesdata(data){
console.log(data)
}
h5端
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
function sendMessageToMiniProgram() {
wx.miniProgram.navigateTo({ url: '/path/to/page' })
}
点击后在微信开发者工具中输出invokeAppService postMessage url: '/path/to/page'但不跳转
我是用reLaunch ,jweixin.miniProgram.reLaunch({
url: path,
success: function() {
},
fall: function() {
}
})