在windows端小程序web-view组件,h5返回小程序不触发bindmessage事件,手机端和苹果电脑端正常
<web-view bindmessage="bindmessage" src="{{baseUrl}}/#/pages/wechatH5/wechatH5?token={{token}}&number={{number}}"></web-view>
bindmessage(e) {
console.log(e);
let list = e.detail.data[0];
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]
console.log(prevPage);
if (prevPage.route == "view/pagesB/squarList/index" || prevPage.route == "view/pagesB/squarListDesc/index") {
prevPage.setData({
selFile: e.detail.data[0][0],
isChange: true,
})
} else {
let fileList = prevPage.data.fileList;
let fileUrlList = prevPage.data.fileUrlList;
let fileNameList = prevPage.data.fileNameList;
list.forEach(item => {
fileList.push(item.fileUrl)
fileUrlList.push(item.fileZipUrl)
fileNameList.push(item.fileName)
})
prevPage.setData({
fileList: fileList,
fileUrlList: fileUrlList,
fileNameList: fileNameList
})
}
},
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
请问你这个问题怎么解决的?