web-view bindmessage 触发问题
web-view bindmessage在开发者工具里可以触发,但是到手机端测试就无法触发该事件。请问怎么解决?
10 回复
wxml
<web-view bindmessage=“bindGetMsg” src="{{url}}"></web-view>
js
let app = getApp();
Page({
data: {
url: ‘’
},
bindGetMsg(e) {
console.log(“aaa”)
console.log(e.detail)
},
onLoad: function(e) {
},
})