你好请问解决了吗?
web-view的bindload方法安卓手机不能触发?<template> <web-view src="https://cloud.sootry.com/h5/index.html" bindload="onShareAppMessage"></web-view> </template> <script> export default { data() { return { itemList: {}, itemUserInfo: {} } }, methods: { onShareAppMessage(options) { let link = options.detail.src; if (link.indexOf('code=') > -1){ let temp = link.split("code=")[1]; let code = temp.split("&")[0]; this.request({ url: 'api/EamWeiXin/UserOpenid', data: { code: code }, success: res => { if (res.code == 200) { this.itemList = JSON.parse(res.data); //let access_token = this.itemList['access_token']; let openid = this.itemList['openid']; let phone = this.vuex_user.userName; this.request({ url: 'api/SysAdmin/Openid?phone=' + phone + '&openid='+ openid, method: 'POST', success: res => { if (res.code == 200) { this.$u.toast('授权成功'); } else { this.$u.toast(res.msg); } } }); } else { this.$u.toast(res.msg); } } }); } } } }; </script> <style> </style> 经测试,PC端,苹果手机,开发者工具中运行此段代码时,都能正常触发onShareAppMessage方法,就安卓手机无法触发onShareAppMessage方法。
2023-10-16你好,请问是怎么解决的,我也遇到了一样的问题;请问配置了业务域名就解决了吗?
web-view bindload src 参数为空今天 (10.9) 下午开始, web-view bindload 函数的 src 参数开始返回空字符串 "" ,安卓 / iOS 均有报告,请问微信这边是做了变更吗?[图片]
2023-10-16