1 Star 0 Fork 0

吃不搭/hsfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 3.14 KB
一键复制 编辑 原始数据 按行查看 历史
吃不搭 提交于 2021-08-20 05:07 . add index.html.
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<title>Hello APICloud</title>
<link rel="stylesheet" type="text/css" href="./css/api.css" />
<link rel="stylesheet" type="text/css" href="./css/common.css" />
<style>
.center{
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-box-pack:center;
-webkit-box-align:center;
}
</style>
</head>
<body style='background:#EDEDED;'>
<div id="wrap">
<div id="main" class='center'>
<img id='loading' src='image/loading.gif' width=65 height=65>
</div>
</div>
</body>
<script type="text/javascript" src="./script/api.js"></script>
<script type="text/javascript">
var launchRemoved = false;
var loadingRemoved = false;
apiready = function(){
api.setStatusBarStyle({
style: 'light'
});
api.openFrame({
name: 'main',
url: 'http://43.128.47.87:8082/',
bounces: false,
allowEdit:true,
rect: {
w: 'auto',
h: 'auto'
},
progress:{
type:'page'
}
});
api.setFrameClient({
frameName:'main'
},function(ret){
onBrowserStateChange(ret);
});
removeLogic();
api.addEventListener({
name: 'keyback'
}, function(ret, err){
api.historyBack({
frameName:'main'
},function(ret,err){
if(!ret.status){
api.closeWidget();
}
});
});
removeLogic();
};
function onBrowserStateChange(ret){
if(0 == ret.state){//开始加载
if(!launchRemoved){
launchRemoved = true;
removeLaunch();
}
}
if(2 == ret.state){
if(!loadingRemoved){
loadingRemoved = true;
document.getElementById('loading').style.display = 'none';
}
}
}
function removeLogic(){
setTimeout(function(){
if(!launchRemoved){
launchRemoved = true;
removeLaunch();
}
}, 3000);
}
function removeLaunch(){
api.removeLaunchView({
animation:{
type:"fade",
subType:"from_right",
duration:300
}
});
}
</script>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lihuasen/hsfs.git
[email protected]:lihuasen/hsfs.git
lihuasen
hsfs
hsfs
master

搜索帮助