启动页优化

This commit is contained in:
尹吉欢
2018-05-02 17:30:35 +08:00
parent c5b64e63bd
commit 4dac2fac90
3 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -113,7 +113,7 @@
autoShow: false
}
});
setTimeout(function(){$(".loadingBg").hide();},1000)
setTimeout(function(){$(".loadingBg").hide();plus.navigator.closeSplashscreen();},1000)
}
var self = plus.webview.currentWebview();
for (var i = 0; i < 4; i++) {
+1 -1
View File
@@ -114,7 +114,7 @@
"url": "error.html"
},
"splashscreen": {
"autoclose": true,/*是否自动关闭程序启动界面,true表示应用加载应用入口页面后自动关闭;false则需调plus.navigator.closeSplashscreen()关闭*/
"autoclose": false,/*是否自动关闭程序启动界面,true表示应用加载应用入口页面后自动关闭;false则需调plus.navigator.closeSplashscreen()关闭*/
"waiting": true,
"delay": "0"
},
+11 -4
View File
@@ -33,7 +33,7 @@
<div class="page page-current">
<div class="content contentStart">
<a class="time" @click="skip()">跳过 <span id="time">5</span></a>
<img :src="imgUrl" class="startImg" @click="openView">
<img :src="imgUrl" class="startImg" @click="openView" onload="imgLoad()">
</div>
</div>
</div>
@@ -56,7 +56,6 @@
<script type="text/javascript" src="js/light7-swiper.min.js" ></script>
<script>
localStorage.removeItem("yf_guide_page_status")
/* 引导页隐藏并进入首页 */
$(document).on("click",".swiper-container .button", function () {
$(".swiper-container").hide();
@@ -117,9 +116,16 @@ new Vue({
if (startPageClickUrl != null) {
this.url = startPageClickUrl;
}
this.guideImgs = JSON.parse(localStorage.getItem("guidePageUrls"))
if(localStorage.getItem("yf_guide_page_status") == null) {
this.guideImgs = JSON.parse(localStorage.getItem("guidePageUrls"))
}
}
});
function imgLoad(){
window.setInterval("run();", 1000);
}
/* 5s倒计时后跳转页面 */
var isShow = false;
var isRun = false;
@@ -130,6 +136,7 @@ function run(){
var time = document.getElementById("time");
if(time.innerHTML == 0 && isShow == false) {
isShow = true;
if (localStorage.getItem("yf_guide_page_status") == null && JSON.parse(localStorage.getItem("guidePageUrls")).length > 0) {
$(".swiper-container").removeClass("dn");
$(".swiper-container").swiper();
@@ -143,7 +150,7 @@ function run(){
}
time.innerHTML = time.innerHTML * 1 - 1;
}
window.setInterval("run();", 1000);
</script>
</body>