<!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"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>O2Odemo</title>
<link rel="stylesheet" type="text/css" href="./css/api.css" />
<style type="text/css">
</style>
</head>
<body>
</body>
<script type="text/javascript" src="./script/api.js"></script>
<script type="text/javascript">
apiready = function(){
//判断第一次进来显示欢迎页,并将其缓存在本地
var welcomeShowed = $api.getStorage('welcomeShowed');
//alert(welcomeShowed+"你要获取的是welcomeShowed");
//如果本地有数据就直接打开页面
if(welcomeShowed){
api.openWin({
name: 'main',
url: './html/main.html',
bounces:false,
pageParam:{key : ''},
animation: {
type: 'none' //动画为none
}
});
//如果本地没有,是第一次进来,就进入欢迎页
}else{
api.openFrameGroup({
name: 'welcomFrames',
scrollEnabled:true,
rect:{
x:0,
y:0,
w:'auto',
h:'auto'
},
index:0,
frames:[{
name:'welcome_frame_1',
url:'./html/welcome_frame_1.html',
bgColor:'./image/welcome/1.png',
bounces:false,
vScrollBarEnabled:false,
hScrollBarEnabled:false
},{
name:'welcome_frame_2',
url:'./html/welcome_frame_2.html',
bgColor:'./image/welcome/2.png',
bounces:false,
vScrollBarEnabled:false,
hScrollBarEnabled:false
},{
name:'welcome_frame_3',
url:'./html/welcome_frame_3.html',
bgColor:'./image/welcome/3.png',
bounces:false,
vScrollBarEnabled:false,
hScrollBarEnabled:false
},{
name:'welcome_frame_4',
url:'./html/welcome_frame_4.html',
bgColor:'./image/welcome/4.png',
bounces:false,
vScrollBarEnabled:false,
hScrollBarEnabled:false
}]
},function(ret,err){
var name = ret.name;
var index = ret.index;
});
$api.setStorage('welcomeShowed', '0');
}
};
</script>
</html>
APICloud成长记录 一 欢迎页制作总结
最新推荐文章于 2022-01-19 19:27:33 发布