123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template>
- <view>
- </view>
- </template>
- <script>
- import helper from "@/libs/helper.js";
- export default{
- data(){
- return {
- url:'',
- webviewStyles: {
- progress: {
- color: '#FF3333'
- }
- },
- wv: null
- }
- },
- onLoad:function(option){
- console.log(option)
- uni.setNavigationBarTitle({
- title: option.title
- })
- var url = decodeURI(option.url);
- if(!url || !helper.IsURL(url)){
- this.result = "跳转地址错误";
- uni.navigateBack({
- delta:1,
- animationType: 'pop-out',
- animationDuration: 200
- })
- }else{
-
- this.wv = plus.webview.create("","custom-webview",{
- plusrequire:"none",
- 'uni-app': 'none',
- top:uni.getSystemInfoSync().statusBarHeight + 44
- })
- this.wv.setStyle({ height:uni.getSystemInfoSync().windowHeight})
- this.wv.loadURL(url)
- var currentWebview = this.$mp.page.$getAppWebview()
- currentWebview.append(this.wv);
- setTimeout(()=>{this.wv.getStyle()}, 1000);
-
- }
- }
- }
- </script>
- <style>
- </style>
|