Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

86
static/app2/js/main_guide.js Executable file
View File

@ -0,0 +1,86 @@
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 += '<div class="mui-slider-item"><img class="guide-img" src="' + this.src + '"/></div>';
indicatorHtml+='<div class="mui-indicator"></div>';
});
$(".mui-slider-group").html(html);
$(".mui-slider-indicator").html(indicatorHtml);
$('.mui-slider-item').first().addClass('mui-slider-item-duplicate');
$('.mui-slider-item').last().append('<button id="close" class="mui-btn mui-btn-warning mui-btn-outlined">跳过</button>');
$('.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);