- plus.nativeUI.showWaiting()
- var ws = null,
- embed = null;
- ws = this.$scope.$getAppWebview(); //plus.webview.currentWebview();在uni-app里vue页面直接使用无效,非v3编译模式使用this.$mp.page.$getAppWebview()
- embed = plus.webview.create(this.url, '', {
- top: getApp().globalData.bh + 35 + "px",
- bottom: '0px'
- });
- ws.append(embed);
- //监听webview窗口事件
- embed.addEventListener('loaded', function() {
- if (embed.isVisible()) {
- plus.nativeUI.closeWaiting()
- // 页面加载完成且可见时的操作
- }
- });
复制代码 |