mui.init({ swipeBack: true //启用右滑关闭功能 }); /**/ mui.back = function() {}; mui.plusReady(function() { var showGuide = plus.storage.getItem("lauchFlag"); if(showGuide) { //有值,说明已经显示过了,无需显示//关闭splash页面; plus.navigator.closeSplashscreen(); closeGuide(); }else{ launchScreen(); } function launchScreen() { mui.ajax('http://www.juzi199.com/get_startup.php', { dataType: 'json', //服务器返回json格式数据 type: 'post', //HTTP请求类型 timeout: 10000, //超时时间设置为10秒; aysnc:false, success: function(data) {//服务器返回响应,根据响应结果,分析是否登录成功; if(1 == data.show){ var html = ''; var indicatorHtml = ''; $.each(data.img, function() { html += '
'; indicatorHtml+=''; }); $(".mui-slider-group").html(html); $(".mui-slider-indicator").html(indicatorHtml); $('.mui-slider-item').first().addClass('mui-slider-item-duplicate'); $('.mui-slider-item').last().append(''); $('.mui-indicator').first().addClass('mui-active'); setTimeout(function(){ plus.navigator.closeSplashscreen(); },1000) }else{ plus.navigator.closeSplashscreen(); closeGuide(); } //if(data.img.count() == 1){ //} }, error: function(xhr, type, errorThrown) { //异常处理; //alert(errorThrown); } }); setTimeout(function(){ closeGuide(); },6000) } mui('body').on('tap', '#close', function(){ closeGuide(); }) // document.addEventListener('tap', function() { // // //console.log("addEventListener: newintent"); // //console.log(1) // }, false); function closeGuide(){ //显示启动导航 mui.openWindow({ id: 'index', url: 'index.html', show: { }, waiting: { autoShow: false } }); setTimeout(function(){ //plus.storage.setItem("lauchFlag", "true"); //第一次登陆显示 //plus.storage.removeItem("lauchFlag"); //plus.navigator.setFullscreen(false); plus.webview.currentWebview().close(); },1000) } }); //立即体验按钮点击事件 //document.getElementById("close").addEventListener('tap', function(event) { // //}, false);