修复一直加载中问题

This commit is contained in:
Dragon
2024-01-23 15:15:42 +08:00
parent c18cd57b9e
commit 195c550ef1
2 changed files with 31 additions and 26 deletions

View File

@@ -65,7 +65,7 @@
<div class="pages page1 animate__animated"> <div class="pages page1 animate__animated">
<img src="./images/pageTxte1.png" alt="" class="pageTxte1 animate__animated animate__slow__3s"> <img src="./images/pageTxte1.png" alt="" class="pageTxte1 animate__animated animate__slow__3s">
<!-- <img src="./images/h5And.png" alt="" class="h5And animate__animated animate__slow__1.8s"> --> <!-- <img src="./images/h5And.png" alt="" class="h5And animate__animated animate__slow__1.8s"> -->
<img src="./images/downioad.png" alt="" class="downioad animate__animated animate__slow__1.8s"> <img style="display: none;" src="" alt="" class="downioad animate__animated animate__slow__1.8s">
<img src="./images/down.png" alt="" class="down"> <img src="./images/down.png" alt="" class="down">
</div> </div>
@@ -74,7 +74,7 @@
<img src="./images/pageText2.png" alt="" class="pageText2 animate__animated animate__slow__2s"> <img src="./images/pageText2.png" alt="" class="pageText2 animate__animated animate__slow__2s">
<img src="./images/page2.png" alt="" class="page2_in"> <img src="./images/page2.png" alt="" class="page2_in">
<img src="./images/pagetx1.png" alt="" class="pagetx1 animate__animated animate__slow__2s"> <img src="./images/pagetx1.png" alt="" class="pagetx1 animate__animated animate__slow__2s">
<img src="./images/pagetx2.png" alt="" class="pagetx2 animate__animated animate__slow__2s"> <img src="./images/pagetx2.png" alt="" class="pagetx2 animate__animated animate__delay-1s ">
<img src="./images/downioad.png" alt="" class="downioad animate__animated animate__slow__2s"> <img src="./images/downioad.png" alt="" class="downioad animate__animated animate__slow__2s">
<img src="./images/down.png" alt="" class="down"> <img src="./images/down.png" alt="" class="down">
</div> </div>

View File

@@ -52,7 +52,8 @@ function getConfig () {
ios = res.data.iosUrl; ios = res.data.iosUrl;
androidSkipType = res.data.androidSkipType; androidSkipType = res.data.androidSkipType;
iosSkipType = res.data.iosSkipType; iosSkipType = res.data.iosSkipType;
console.log(browser); // console.log(browser);
$('body .h5 .pagesBox .pages .downioad').show();
if (browser.ios) { if (browser.ios) {
url = ios; url = ios;
$('body .h5 .pagesBox .pages .downioad').attr('src', './images/h5Ios.png'); $('body .h5 .pagesBox .pages .downioad').attr('src', './images/h5Ios.png');
@@ -60,7 +61,7 @@ function getConfig () {
url = and; url = and;
$('body .h5 .pagesBox .pages .downioad').attr('src', './images/h5And.png'); $('body .h5 .pagesBox .pages .downioad').attr('src', './images/h5And.png');
} }
$('body .h5 .pagesBox .page2 .downioad,body .h5 .pagesBox .page3 .downioad,body .h5 .pagesBox .page4 .downioad').attr('src', './images/downioad.png');
hideLoading(layerIndex) hideLoading(layerIndex)
animatedImplementFun(0); animatedImplementFun(0);
}, },
@@ -71,7 +72,7 @@ function getConfig () {
} }
// 点击记录接口 // 点击记录接口
function officialClick (downloadType) { function officialClick (downloadType) {
showLoading(); // showLoading();
networkRequest({ networkRequest({
type: 'GET', type: 'GET',
url: urlPrefix + '/official/click', url: urlPrefix + '/official/click',
@@ -115,30 +116,30 @@ $('body .h5').on('touchend', function (e) {
// 動畫調用 // 動畫調用
function animatedImplementFun (index) { function animatedImplementFun (index) {
if (index == 0) { if (index == 0) {
animatedFun($(`body .h5 .pagesBox .page1 .pageTxte1`), ['animate__zoomInUp',]); animatedFun($(`body .h5 .pagesBox .page1 .pageTxte1`), ['animate__fadeInUp',]);
animatedFun($(`body .h5 .pagesBox .page1 .downioad`), ['animate__wobble',]); // animatedFun($(`body .h5 .pagesBox .page1 .downioad`), ['animate__wobble',]);
} else if (index == 1) { } else if (index == 1) {
animatedFun($(`body .h5 .pagesBox .page2 .pageText2`), ['animate__bounce',]); // animatedFun($(`body .h5 .pagesBox .page2 .pageText2`), ['animate__bounce',]);
animatedFun($(`body .h5 .pagesBox .page2 .pagetx1`), ['animate__heartBeat',]); animatedFun($(`body .h5 .pagesBox .page2 .pagetx1`), ['animate__shakeX',]);
animatedFun($(`body .h5 .pagesBox .page2 .pagetx2`), ['animate__heartBeat',]); animatedFun($(`body .h5 .pagesBox .page2 .pagetx2`), ['animate__shakeX',]);
animatedFun($(`body .h5 .pagesBox .page2 .downioad`), ['animate__wobble',]); // animatedFun($(`body .h5 .pagesBox .page2 .downioad`), ['animate__wobble',]);
} else if (index == 2) { } else if (index == 2) {
animatedFun($(`body .h5 .pagesBox .page3 .pageText3`), ['animate__rubberBand',]); // animatedFun($(`body .h5 .pagesBox .page3 .pageText3`), ['animate__rubberBand',]);
animatedFun($(`body .h5 .pagesBox .page3 .page3Icon1`), ['animate__lightSpeedInRight',]); animatedFun($(`body .h5 .pagesBox .page3 .page3Icon1`), ['animate__lightSpeedInRight',]);
animatedFun($(`body .h5 .pagesBox .page3 .page3Icon2`), ['animate__lightSpeedInLeft',]); animatedFun($(`body .h5 .pagesBox .page3 .page3Icon2`), ['animate__lightSpeedInLeft',]);
animatedFun($(`body .h5 .pagesBox .page3 .page3Icon3`), ['animate__lightSpeedInRight',]); animatedFun($(`body .h5 .pagesBox .page3 .page3Icon3`), ['animate__lightSpeedInRight',]);
animatedFun($(`body .h5 .pagesBox .page3 .page3Icon4`), ['animate__lightSpeedInLeft',]); animatedFun($(`body .h5 .pagesBox .page3 .page3Icon4`), ['animate__lightSpeedInLeft',]);
animatedFun($(`body .h5 .pagesBox .page3 .downioad`), ['animate__slideInUp',]); // animatedFun($(`body .h5 .pagesBox .page3 .downioad`), ['animate__slideInUp',]);
} else if (index == 3) { } else if (index == 3) {
animatedFun($(`body .h5 .pagesBox .page4 .pageText4 `), ['animate__rubberBand',]); // animatedFun($(`body .h5 .pagesBox .page4 .pageText4 `), ['animate__rubberBand',]);
animatedFun($(`body .h5 .pagesBox .page4 .page4Icon1 `), ['animate__lightSpeedInLeft',]); animatedFun($(`body .h5 .pagesBox .page4 .page4Icon1 `), ['animate__lightSpeedInLeft',]);
animatedFun($(`body .h5 .pagesBox .page4 .page4Icon2 `), ['animate__lightSpeedInRight',]); animatedFun($(`body .h5 .pagesBox .page4 .page4Icon2 `), ['animate__lightSpeedInRight',]);
animatedFun($(`body .h5 .pagesBox .page4 .downioad `), ['animate__slideInUp',]); // animatedFun($(`body .h5 .pagesBox .page4 .downioad `), ['animate__slideInUp',]);
} else if (index == 4) { } else if (index == 4) {
animatedFun($(`body .h5 .pagesBox .page5 .pageTxte5 `), ['animate__jackInTheBox',]); // animatedFun($(`body .h5 .pagesBox .page5 .pageTxte5 `), ['animate__jackInTheBox',]);
animatedFun($(`body .h5 .pagesBox .page5 .contactUs `), ['animate__flipInY',]); // animatedFun($(`body .h5 .pagesBox .page5 .contactUs `), ['animate__flipInY',]);
animatedFun($(`body .h5 .pagesBox .page5 .downioad `), ['animate__slideInUp',]); // animatedFun($(`body .h5 .pagesBox .page5 .downioad `), ['animate__slideInUp',]);
} }
} }
// 處理動畫 // 處理動畫
@@ -154,13 +155,13 @@ function animatedFun (dom, arrClass) {
} }
// pc跳轉充值 // pc跳轉充值
$('body .pc .header .diamound, html .pc .header .diamound').click(function () { $('body .pc .header .diamound, html .pc .header .diamound').click(function () {
window.location.href = 'https://api.pekolive.com/peko/modules/pay/index.html?channelType=4' window.location = 'https://api.pekolive.com/peko/modules/pay/index.html?channelType=4'
}) })
// PC蘋果下載按鈕 // PC蘋果下載按鈕
$('html .pc .pcIos').click(function () { $('html .pc .pcIos').click(function () {
if (ios) { if (ios) {
officialClick(iosSkipType); officialClick(iosSkipType);
window.location.href = ios; window.location = ios;
} else { } else {
toastMsg('暫未開放下載,詳情請聯繫客服') toastMsg('暫未開放下載,詳情請聯繫客服')
} }
@@ -169,14 +170,14 @@ $('html .pc .pcIos').click(function () {
$('html .pc .pcAnd').click(function () { $('html .pc .pcAnd').click(function () {
if (and) { if (and) {
officialClick(androidSkipType); officialClick(androidSkipType);
window.location.href = and; window.location = and;
} else { } else {
toastMsg('暫未開放下載,詳情請聯繫客服') toastMsg('暫未開放下載,詳情請聯繫客服')
} }
}) })
// h5跳轉充值 // h5跳轉充值
$('body .header .diamound, html .header .diamound').click(function () { $('body .header .diamound, html .header .diamound').click(function () {
window.location.href = 'https://api.pekolive.com/peko/modules/pay/index.html?channelType=4' window.location = 'https://api.pekolive.com/peko/modules/pay/index.html?channelType=4'
}) })
// h5展開菜單 // h5展開菜單
$('body .header .more, html .header .more').click(function () { $('body .header .more, html .header .more').click(function () {
@@ -194,7 +195,7 @@ $('body .h5 .menu ul li, html .h5 .menu ul li').click(function () {
$('.pagesBox').css("transform", `translateY(-${0}%)`); $('.pagesBox').css("transform", `translateY(-${0}%)`);
index = 0; index = 0;
} else if (i == 2) { } else if (i == 2) {
window.location.href = 'https://api.pekolive.com/peko/modules/h5Income/login.html' window.location = 'https://api.pekolive.com/peko/modules/h5Income/login.html'
} else { } else {
$('.menu').css("height", "0%"); $('.menu').css("height", "0%");
$('.contactUs_pub').show(); $('.contactUs_pub').show();
@@ -212,7 +213,7 @@ $('.page5 .contactUs').click(function () {
$('body .h5 .pagesBox .page1 .h5And').click(function () { $('body .h5 .pagesBox .page1 .h5And').click(function () {
if (and) { if (and) {
officialClick(androidSkipType); officialClick(androidSkipType);
window.location.href = and; window.location = and;
} else { } else {
toastMsg('暫未開放下載,詳情請聯繫客服') toastMsg('暫未開放下載,詳情請聯繫客服')
} }
@@ -221,7 +222,7 @@ $('body .h5 .pagesBox .page1 .h5And').click(function () {
$('body .h5 .pagesBox .page1 .h5Ios').click(function () { $('body .h5 .pagesBox .page1 .h5Ios').click(function () {
if (ios) { if (ios) {
officialClick(iosSkipType); officialClick(iosSkipType);
window.location.href = ios; window.location = ios;
} else { } else {
toastMsg('暫未開放下載,詳情請聯繫客服') toastMsg('暫未開放下載,詳情請聯繫客服')
} }
@@ -231,10 +232,14 @@ $('body .h5 .pagesBox .pages .downioad').click(function () {
if (url) { if (url) {
if (browser.ios) { if (browser.ios) {
officialClick(iosSkipType); officialClick(iosSkipType);
window.location = url;
} else if (browser.android) { } else if (browser.android) {
officialClick(androidSkipType); officialClick(androidSkipType);
window.location = url;
} else {
$('.pagesBox').css("transform", `translateY(-${0}%)`);
index = 0;
} }
window.location.href = url;
} else { } else {
toastMsg('暫未開放下載,詳情請聯繫客服') toastMsg('暫未開放下載,詳情請聯繫客服')
} }