启动页优化
This commit is contained in:
+11
-4
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user