目前采用的是讨巧的方法
h5页面修改title
document.title = id '|' type;
webview页面监听titleUpdate事件
var w = plus.webview.create(this.wvSrc, 'id',
{
top: uni.getSystemInfoSync().statusBarHeight 50,
height: uni.getSystemInfoSync().windowHeight - 95 - uni.getSystemInfoSync().statusBarHeight
},
{
preload: 'preload webview'
});
//监听titleUpdate
w.addEventListener('titleUpdate', (e) => {
let o = e.title.split("|")[0]
if(isFinite(o)){
this.toBBsDetail(o)
}
});
var currentWebview = this.$mp.page.$getAppWebview()
currentWebview.append(w);
不知道还有其他方法没
0 个评论
要回复文章请先登录或注册