赞
踩
Hbuilder开发的app,会涉及到跳转H5页面
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <link rel="stylesheet" href="css/mui.min.css" /> <link rel="stylesheet" href="css/common/style.css" /> <title></title> </head> <body> <header id="header" class="mui-bar mui-bar-nav"> <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> <h1 class="mui-title" id="title"></h1> </header> <script type="text/javascript" src="js/mui.min.js"></script> <script> mui.init(); mui.plusReady(function () { var self = plus.webview.currentWebview(); var title = self.title; document.getElementById("title").innerText = title; var url = "https://nt.zjrcbank.com/openplatformgw/app/openplatform/HN/index.html#/entry"; var embed=plus.webview.create(url,'embed',{top:'44px',bottom:'0px'}); var ws = plus.webview.currentWebview(); ws.append(embed); embed.addEventListener('loading',function(){ //当页面加载时 plus.nativeUI.showWaiting('',{style:'black',modal:false,background:'rgba(0,0,0,0)'}); },false); embed.addEventListener('loaded',function(){ //当页面加载完成时 plus.nativeUI.closeWaiting(); },false); }) </script> </body> </html>
官网文档:web-view
<web-view :src="webUrl" ></web-view>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。