1 Star 0 Fork 0

dengqihua / phpdoc-app

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 2.39 KB
一键复制 编辑 原始数据 按行查看 历史
邓启华 提交于 2017-12-11 13:41 . 代码优化
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>PHP手册</title>
<style>
body,
html {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: 0;
}
</style>
<script type="text/javascript">
if(window.plus) {
plusReady();
} else {
document.addEventListener('plusready', plusReady, false);
}
// H5 plus事件处理
var as = 'pop-in', //默认窗口动画,
appName = '', //应用名称
quitCount = 0; // 退出应用计时器
function plusReady() {
plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
appName = wgtinfo.name;
});
// 隐藏滚动条
plus.webview.currentWebview().setStyle({
scrollIndicator: 'none'
});
plus.key.addEventListener('backbutton', function() {
// Android处理返回键
quitCount = quitCount + 1;
if(quitCount >= 2) {
plus.runtime.quit();
quitCount = 0;
return false;
}
plus.nativeUI.toast("再按一次退出" + appName, {
duration: "short"
});
setTimeout(function() {
quitCount = 0;
}, 2000);
});
compatibleAdjust();
}
// DOMContentLoaded事件处理
var _domReady = false;
document.addEventListener('DOMContentLoaded', function() {
_domReady = true;
compatibleAdjust();
}, false);
// 兼容性样式调整
var _adjust = false;
function compatibleAdjust() {
if(_adjust || !window.plus || !_domReady) {
return;
}
_adjust = true;
// iOS平台特效
if('iOS' == plus.os.name) {
document.getElementById('content').className = 'scontent'; // 使用div的滚动条
if(navigator.userAgent.indexOf('StreamApp') >= 0) { // 在流应用模式下显示返回按钮
document.getElementById('back').style.visibility = 'visible';
}
}
// 预创建二级窗口
// preateWebviews();
// 关闭启动界面
setTimeout(function() {
plus.navigator.closeSplashscreen();
plus.navigator.setStatusBarBackground('#FFFFFF');
if(plus.navigator.isImmersedStatusbar()) {
plus.navigator.setStatusBarStyle('UIStatusBarStyleBlackOpaque');
}
}, 500);
}
</script>
</head>
<body>
<iframe src="https://doc.cppedu.net"></iframe>
</body>
</html>
Android
1
https://gitee.com/cppwork/phpdoc-app.git
git@gitee.com:cppwork/phpdoc-app.git
cppwork
phpdoc-app
phpdoc-app
master

搜索帮助