78 lines
1.3 KiB
Vue
78 lines
1.3 KiB
Vue
<template>
|
|
<view class="bg">
|
|
<web-view :src="this_url" class="webbg"></web-view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
this_url: '',
|
|
}
|
|
},
|
|
onLoad(e) {
|
|
// #ifdef APP-PLUS
|
|
var currentWebview = this.$scope.$getAppWebview() //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效
|
|
setTimeout(function () {
|
|
const wv = currentWebview.children()[0]
|
|
// wv.setStyle({top: 0, height: 300})
|
|
}, 1000);
|
|
//如果是页面初始化调用时,需要延时一下
|
|
// #endif
|
|
|
|
this.this_url = e.url;
|
|
if (e.uid) {
|
|
this.this_url = this.this_url + "&uid=" + e.uid;
|
|
}
|
|
},
|
|
methods: {}
|
|
}
|
|
</script>
|
|
|
|
|
|
<style>
|
|
.bg {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.titletopbg {
|
|
width: 100%;
|
|
background: #F8F8F8;
|
|
height: 50rpx;
|
|
}
|
|
|
|
.titlebg {
|
|
width: 100%;
|
|
height: 100rpx;
|
|
background: #F8F8F8;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
position: relative;
|
|
}
|
|
|
|
.arrowleft {
|
|
width: 45rpx;
|
|
height: 45rpx;
|
|
position: absolute;
|
|
left: 20rpx;
|
|
}
|
|
|
|
.txt {
|
|
width: 100%;
|
|
height: 100%;
|
|
color: #000000;
|
|
font-weight: 600;
|
|
font-size: 38rpx;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.webbg {
|
|
}
|
|
</style>
|