我原生的iOS项目,想要调用“由H5实现的功能”怎么跳过去啊,怎么找到我H5项目的那个程序入口界面(http://xxx.xxx.xxx.xxx:3000/index.html)
下雨咯
- 发布:2018-02-24 15:52
- 更新:2018-02-24 16:29
- 阅读:1838
王者地带 - 5+混合APP开发教程网 | http://www.html5-app.com | 咨询QQ: 2564034335
是不是类型这种
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="../css/mui.min.css" rel="stylesheet" />
<style>
.mui-bar{ box-shadow: none; background: white; height:50px;}
.mui-bar .mui-icon{ margin-top:0px; font-size:32px; color: #2f2f2f; }
.mui-bar-nav.mui-bar .mui-icon{padding-left:5px;}
.mui-bar .mui-title{margin-top:6px;color: #2f2f2f; font-weight: normal;}
.more{ margin-top: 16px; margin-right: 5px;}
.mui-bar:after
{
position: absolute;
right: 0;
bottom: 0;
left: 0;
height: 1px;
content: '';
-webkit-transform: scaleY(.5);
transform: scaleY(.5);
background-color:#dadada;
}
body{ background: white;}
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-arrowleft mui-pull-left"></a>
<a class="mui-icon mui-icon-closeempty mui-pull-left"></a>
<h1 class="mui-title" id="header_title"></h1>
</header>
<script src="../js/mui.min.js"></script>
<script type="text/javascript">
mui.init();
var open_page;
var pagew;
mui.plusReady(function()
{
pagew=plus.webview.currentWebview();
var tit=“百度”;
var pageurl="https://www.baidu.com/"
document.getElementById("header_title").innerText=tit;
open_page=plus.webview.create(pageurl,'hk_news_page',{top:'50px',scrollIndicator:"none",scalable:true});
plus.nativeUI.showWaiting("加载网页中...",{size:"12px",background:"rgba(0,0,0,0.6)"});
open_page.addEventListener("loaded",function()
{
plus.nativeUI.closeWaiting();
plus.webview.currentWebview().append(open_page);
});
document.querySelector(".mui-icon-closeempty").addEventListener("tap",function()
{
pagew.close("slide-out-right");
},false);
});
mui.back=function()
{
open_page.canBack( function(e)
{
if(e.canBack)
{
open_page.back();
}
else
{
pagew.close("slide-out-right");
}
});
}
</script>
</body>
</html>
下雨咯 (作者)
不只是一些页面,很多底层的功能都是用5+实现的 我想从把h5的项目嵌套进去
2018-02-24 16:07
回梦無痕
回复 下雨咯:那你需要把H5+SDK集成到你的APP当中,参考文档https://ask.dcloud.net.cn/article/104
2018-02-24 16:09
下雨咯 (作者)
回复 回梦無痕:谢谢您。感谢
2018-02-24 16:15