let url = this.qr_code_url;
const wv = plus.webview.create("", "custom-webview", {
additionalHttpHeaders: {
'User-Agent': 'MicroMessenger',
}, //JSON类型,窗口加载页面时额外添加的HTTP请求头数据,内容按照http协议写.
plusrequire: "none",
'uni-app': 'none', //不加载uni-app渲染层框架,避免样式冲突
top: uni.getSystemInfoSync().statusBarHeight +
44,
height: this.vuex_screenHeight - (uni.getSystemInfoSync().statusBarHeight + 44),
})
wv.loadURL(url)
const currentWebview = this.$scope
.$getAppWebview();
currentWebview.append(wv);
const self = this;
this.wv = wv
wv.addEventListener('loaded', e => {
wv.canBack(e => {
self.canBack = e.canBack
currentWebview.setTitleNViewButtonStyle(0, {
color: e.canBack ? '#000' : '#fff',
});
})
})
小白菜QaQ
- 发布:2023-09-07 19:24
- 更新:2023-09-07 19:24
- 阅读:136
0 个回复