|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<link rel="stylesheet" href="./css/style.css">
|
|
|
|
<link rel="stylesheet" href="./css/swiper-3.4.2.min.css">
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<img class="loading" src="./img/loading.png" alt="">
|
|
|
|
|
|
|
|
<div id="home" class="container">
|
|
|
|
<div id="bb" class="billing">
|
|
|
|
<div class="account-header">
|
|
|
|
<a href="#home" class="account-back"></a>
|
|
|
|
<img class="bg" src="./img/account.jpg" alt="">
|
|
|
|
<div class="bb-list">
|
|
|
|
</div>
|
|
|
|
<img class="bg" style="margin-top: 10px;" src="./img/IMG_3620.jpg" alt="">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="list" class="billing">
|
|
|
|
<div class="account-header">
|
|
|
|
<a href="#home" class="account-back"></a>
|
|
|
|
<div class="card-box">
|
|
|
|
<div class="card-number"></div>
|
|
|
|
<img class="bg" src="./img/m1.jpg" alt="">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="billing-list">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="header"></div>
|
|
|
|
<div class="banner">
|
|
|
|
<!-- <img class="bg top-header" src="./img/t.jpg" alt=""> -->
|
|
|
|
<a href="#bb" class="account"></a>
|
|
|
|
<a href="#list" class="mx"></a>
|
|
|
|
</div>
|
|
|
|
<img class="bg" src="./img/1.jpg" alt="">
|
|
|
|
<div class="swiper-container">
|
|
|
|
<div class="swiper-wrapper">
|
|
|
|
<div class="swiper-slide">
|
|
|
|
<img src="./img/lun.jpg" alt="">
|
|
|
|
</div>
|
|
|
|
<div class="swiper-slide">
|
|
|
|
<img src="./img/lun.jpg" alt="">
|
|
|
|
</div>
|
|
|
|
<div class="swiper-slide">
|
|
|
|
<img src="./img/lun.jpg" alt="">
|
|
|
|
</div>
|
|
|
|
<div class="swiper-slide">
|
|
|
|
<img src="./img/lun.jpg" alt="">
|
|
|
|
</div>
|
|
|
|
<div class="swiper-slide">
|
|
|
|
<img src="./img/lun.jpg" alt="">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- 如果需要分页器 -->
|
|
|
|
<div class="swiper-pagination"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<img class="bg" src="./img/2.jpg" alt="">
|
|
|
|
<img class="bg" src="./img/3.jpg" alt="">
|
|
|
|
<img class="bg" src="./img/4.jpg" alt="">
|
|
|
|
<img class="bg" src="./img/5.jpg" alt="">
|
|
|
|
<img class="bg" src="./img/6.jpg" alt="">
|
|
|
|
<img class="bg footer" src="./img/7.jpg" alt="">
|
|
|
|
<p class="tips"></p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script src="./js/swiper-3.4.2.min.js"></script>
|
|
|
|
<script src="./js/jquery-3.6.1.min.js"></script>
|
|
|
|
<script>
|
|
|
|
function hideLoading() {
|
|
|
|
setTimeout(() => {
|
|
|
|
$('.loading').hide();
|
|
|
|
}, 500)
|
|
|
|
}
|
|
|
|
hideLoading();
|
|
|
|
|
|
|
|
$('.account,.mx').on('click', () => {
|
|
|
|
$('.loading').show()
|
|
|
|
hideLoading();
|
|
|
|
})
|
|
|
|
$(function () {
|
|
|
|
|
|
|
|
function getPageScroll() {
|
|
|
|
var xScroll, yScroll;
|
|
|
|
if (self.pageYOffset) {
|
|
|
|
yScroll = self.pageYOffset;
|
|
|
|
xScroll = self.pageXOffset;
|
|
|
|
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
|
|
|
|
yScroll = document.documentElement.scrollTop;
|
|
|
|
xScroll = document.documentElement.scrollLeft;
|
|
|
|
} else if (document.body) {// all other Explorers
|
|
|
|
yScroll = document.body.scrollTop;
|
|
|
|
xScroll = document.body.scrollLeft;
|
|
|
|
}
|
|
|
|
arrayPageScroll = new Array(xScroll, yScroll);
|
|
|
|
return arrayPageScroll;
|
|
|
|
};
|
|
|
|
new Swiper('.swiper-container', {
|
|
|
|
loop: true,
|
|
|
|
pagination: '.swiper-pagination',
|
|
|
|
autoplay: 3000,
|
|
|
|
paginationClickable: true
|
|
|
|
})
|
|
|
|
console.log('44')
|
|
|
|
document.addEventListener('scroll', () => {
|
|
|
|
const pageScroll = getPageScroll();
|
|
|
|
const isShow = $('.top-header').is(":visible")
|
|
|
|
console.log('11', isShow)
|
|
|
|
|
|
|
|
if (pageScroll[1] >= 48 && !isShow) {
|
|
|
|
$('.top-header').show()
|
|
|
|
}
|
|
|
|
if (pageScroll[1] < 48 && isShow) {
|
|
|
|
$('.top-header').hide()
|
|
|
|
}
|
|
|
|
})
|
|
|
|
$.ajax({
|
|
|
|
url: "./config.json",
|
|
|
|
success: function (result) {
|
|
|
|
console.log(result, 'result')
|
|
|
|
if (result) {
|
|
|
|
const { showApp, bottomTips, cardList, billingList, billingCardNumber } = result;
|
|
|
|
if (!showApp) {
|
|
|
|
$('body').html('')
|
|
|
|
} else {
|
|
|
|
$('.tips').html(bottomTips);
|
|
|
|
const cardHtmlArr = cardList.map((item) => {
|
|
|
|
const { cardId, cardCode, money } = item
|
|
|
|
return `
|
|
|
|
<div class="item">
|
|
|
|
<div class="card">${cardId} <span>${cardCode}</span></div>
|
|
|
|
<div class="money">${money}</div>
|
|
|
|
<img class="bg" src="./img/IMG_3619.jpg" alt="">
|
|
|
|
</div>
|
|
|
|
`
|
|
|
|
})
|
|
|
|
|
|
|
|
$('.bb-list').html(cardHtmlArr.join(''))
|
|
|
|
|
|
|
|
const billingHtmlArr = billingList.map(item => {
|
|
|
|
const { type, name, amount, time, money } = item;
|
|
|
|
|
|
|
|
return `
|
|
|
|
<div class="item">
|
|
|
|
<div class="card-l">
|
|
|
|
<div class="row">
|
|
|
|
<p class="name">${name}</p>
|
|
|
|
${type == 0 ? `<div class="add">${amount}</div>` : ` <div class="add jian">${amount}</div>`
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="time">${time}</div>
|
|
|
|
<div class="ye">余额:${money}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
${type == 0 ? ' <img class="bg" src="./img/m2.jpg" alt="">' : ' <img class="bg" src="./img/m3.jpg" alt="">'}
|
|
|
|
</div>
|
|
|
|
`
|
|
|
|
})
|
|
|
|
|
|
|
|
$('.billing-list').html(billingHtmlArr)
|
|
|
|
$('.card-number').text(billingCardNumber)
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$('body').html('')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|