在webview中 overrideUrlLoading 拦截无效啊,正则匹配也没错啊,就是进不到成功的回调里面
在webview中 loaded 事件也是时好时坏啊
代码如下
onReady() {
const that=this;
// #ifdef APP-PLUS
var currentWebview = this.$mp.page.$getAppWebview() //获取当前页面的webview对象
setTimeout(function() {
wv = currentWebview.children()[0]
console.log('===========',currentWebview.children()[0])
wv.setStyle({top:uni.getSystemInfoSync().statusBarHeight,bottom:0})
wv.addEventListener('loaded', function () {
//加载完成后获取URL
console.log('
0 个回复