1.设置guide.html
2.登陆或者主页面引用guide.html
1 mui.plusReady(function() { 2 3 //读取本地存储,检查是否为首次启动 决定是否显示引导页 4 var showGuide = plus.storage.getItem("lauchFlag"); 5 if(showGuide){ 6 //有值,说明已经显示过了,无需显示; 7 //关闭splash页面; 8 plus.navigator.closeSplashscreen(); 9 plus.navigator.setFullscreen(false); 10 11 }else{ 12 //显示启动导航 13 mui.openWindow({ 14 id:'guide', 15 url:'guide.html', 16 show:{ 17 aniShow:'none' 18 }, 19 waiting:{ 20 autoShow:false 21 } 22 }); 23 } 24 });
3.设置manifest.json页面 splashscreen 下的"autoclose": false即可。切记