Commit b365cc37 authored by ly's avatar ly

1

parent 5070011f
...@@ -245,8 +245,7 @@ ...@@ -245,8 +245,7 @@
"path": "pages/web/web", "path": "pages/web/web",
"style": { "style": {
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTitleText": "", "navigationBarTitleText": ""
"navigationStyle": "custom"
} }
}, },
{ {
......
<template> <template>
<view class="page-web"> <view class="page-web">
<!-- 导航栏 -->
<!-- <navigation-bar v-if="showNavBar"></navigation-bar> -->
<web-view ref='webview' :webview-styles="webviewStyles" @message="handleMessage" :src="src"></web-view> <web-view ref='webview' :webview-styles="webviewStyles" @message="handleMessage" :src="src"></web-view>
</view> </view>
</template> </template>
...@@ -24,15 +26,14 @@ ...@@ -24,15 +26,14 @@
titleVal: '', titleVal: '',
typePage: false, typePage: false,
deviceStatus: '', deviceStatus: '',
showNavBar: true ,// 控制导航栏是否显示
viewerUrl: '/hybrid/html/web/viewer.html' viewerUrl: '/hybrid/html/web/viewer.html'
} }
}, },
async onLoad(options) { async onLoad(options) {
console.log(options,typeof(options),'options222')
const that = this const that = this
if(options.url){ if(options.url){
console.log(options.url,'6666')
that.src=options.url that.src=options.url
} }
uni.getStorage({ uni.getStorage({
...@@ -47,7 +48,7 @@ ...@@ -47,7 +48,7 @@
let pages = getCurrentPages(); let pages = getCurrentPages();
let page = pages[pages.length - 1]; let page = pages[pages.length - 1];
let currentWebView = page.$getAppWebview(); let currentWebView = page.$getAppWebview();
}, },
methods: { methods: {
...@@ -73,7 +74,14 @@ ...@@ -73,7 +74,14 @@
this.toast('缺少方法名', 'error') this.toast('缺少方法名', 'error')
return return
} }
console.log(data,'data222')
// if (data === 'hideNavBar') {
// console.log(data,'data333')
// this.showNavBar = false;
// } else if (data === 'showNavBar') {
// console.log(data,'data444')
// this.showNavBar = true;
// }
if (params) { if (params) {
this[name](params) this[name](params)
} else { } else {
...@@ -170,35 +178,35 @@ ...@@ -170,35 +178,35 @@
}, },
// 隐藏导航了 // 隐藏导航了
HideNavBar() { HideNavBar() {
console.log('titleNView的值') console.log('titleNView的值')
try { try {
plus.navigator.setFullscreen(true) plus.navigator.setFullscreen(true)
// let pages = getCurrentPages(); let pages = getCurrentPages();
// let page = pages[pages.length - 1]; let page = pages[pages.length - 1];
// let currentWebView = page.$getAppWebview(); let currentWebView = page.$getAppWebview();
// let titleNView = currentWebView.getStyle().titleNView; let titleNView = currentWebView.getStyle().titleNView;
// console.log(titleNView, 'titleNView的值') console.log(titleNView, 'titleNView的值')
// currentWebView.setStyle({ currentWebView.setStyle({
// titleNView: false titleNView: false
// }) })
} catch (err) { } catch (err) {
this.toast('隐藏导航了报错') this.toast('隐藏导航了报错')
} }
}, },
// 显示导航了 // 显示导航了
ShowNavBar() { ShowNavBar() {
try { try {
let pages = getCurrentPages(); let pages = getCurrentPages();
let page = pages[pages.length - 1]; let page = pages[pages.length - 1];
let currentWebView = page.$getAppWebview(); let currentWebView = page.$getAppWebview();
let titleNView = currentWebView.getStyle().titleNView; let titleNView = currentWebView.getStyle().titleNView;
console.log(titleNView, 'titleNView的值') console.log(titleNView, 'titleNView的值')
currentWebView.setStyle({ currentWebView.setStyle({
titleNView: {} titleNView: {}
}) })
} catch (err) { } catch (err) {
this.toast('拨打电话报错') this.toast('显示导航报错')
} }
}, },
// 实名认证正面 // 实名认证正面
Camera_OCR_Front(config) { Camera_OCR_Front(config) {
...@@ -617,5 +625,10 @@ ...@@ -617,5 +625,10 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
navigation-bar{
width: 100vw;
height: 90rpx;
background: #fff;
}
} }
</style> </style>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment