You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

263 lines
8.4 KiB

2 years ago
<!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">
2 years ago
<link rel="stylesheet" href="https://parking.houzhisoft.com/rem.php">
2 years ago
<link rel="stylesheet" href="./css/swiper-3.4.2.min.css">
</head>
<body>
2 years ago
<img class="loading" src="./img/loading.png" alt="">
2 years ago
<div id="bb" class="my-account">
<div class="account-header">
<a href="#home" class="account-back account-back-bb"></a>
<img class="bg" src="./img/account.jpg" alt="">
</div>
2 years ago
<div class="bb-list-box">
<div class="bb-list">
</div>
<img class="bg" style="margin-top: 10px;" src="./img/IMG_3620.jpg" alt="">
2 years ago
</div>
2 years ago
2 years ago
</div>
2 years ago
2 years ago
<div id="list" class="billing list-class">
<div class="account-header billing-header">
<a href="javascript:history.back(-1)" class="account-back back-btn"></a>
<div class="card-box">
<div class="card-number"></div>
2 years ago
<img class="bg" id="m1" src="./img/m1.jpg" alt="">
2 years ago
<div class="filter">
<div class="filter-item active" data-query-key="nearlyWeek">近一周</div>
<div class="filter-item" data-query-key="nearlyMonth">近一月</div>
<div class="filter-item" data-query-key="lastThreeMonths">近三月</div>
2 years ago
<div class="filter-item-last">
筛选
<img style="margin-left: 4px;" width="9" src="./img/sanjiao.jpg" alt="">
</div>
2 years ago
</div>
2 years ago
</div>
</div>
2 years ago
<div class="billing-list">
</div>
</div>
<div id="home" class="container">
2 years ago
<!-- <div class="header">
2 years ago
2 years ago
</div> -->
2 years ago
<div class="banner">
2 years ago
<!-- <img class="bg top-header" src="./img/t.jpg" alt=""> -->
2 years ago
<a href="#bb" id="my_account_rn" class="account"></a>
<a href="#list" id="mx_rn" class="mx"></a>
2 years ago
</div>
2 years ago
<div class="home-box">
<img class="bg" src="./img/1.jpg" alt="">
<div class="font-animation-box">
<div class="box-list">
<div>21312312</div>
<div>--1231231</div>
</div>
</div>
</div>
2 years ago
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
2 years ago
<img src="./img/lun1.png" alt="">
2 years ago
</div>
<div class="swiper-slide">
2 years ago
<img src="./img/lun2.jpg" alt="">
2 years ago
</div>
<div class="swiper-slide">
2 years ago
<img src="./img/lun3.png" alt="">
2 years ago
</div>
<div class="swiper-slide">
2 years ago
<img src="./img/lun4.png" alt="">
2 years ago
</div>
<div class="swiper-slide">
2 years ago
<img src="./img/lun5.png" alt="">
2 years ago
</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>
2 years ago
<script src="./js/moment.js"></script>
<script src="./1.js"></script>
2 years ago
<script>
2 years ago
function hideLoading() {
setTimeout(() => {
$('.loading').hide();
2 years ago
}, 500)
2 years ago
}
hideLoading();
2 years ago
2 years ago
$(async function () {
2 years ago
let nearlyMonth = [], lastThreeMonths = [], nearlyWeek = [];
2 years ago
let isClickToLost = false;
2 years ago
new Swiper('.swiper-container', {
loop: true,
pagination: '.swiper-pagination',
autoplay: 3000,
paginationClickable: true
})
2 years ago
2 years ago
$('#my_account_rn,#mx_rn').on('click', () => {
window?.ReactNativeWebView?.postMessage(1)
})
$("#m1").each(function () {
if (this.complete) {
console.log('complete', this.height)
2 years ago
$('.billing-list').css('paddingTop', this.height + 52)
2 years ago
} else {
$($(this)).on('load', function () {
2 years ago
$('.billing-list').css('paddingTop', this.height + 52)
2 years ago
});
}
});
$('.filter-item').click(function () {
2 years ago
hideLoading();
2 years ago
renderBillingDom([])
2 years ago
$('.loading').show();
2 years ago
$('.filter-item').removeClass('active');
const key = $(this).attr('data-query-key');
$(this).addClass('active')
2 years ago
const timer = setTimeout(() => {
clearTimeout(timer)
if (key === 'nearlyMonth') {
renderBillingDom(nearlyMonth)
} else if (key === 'lastThreeMonths') {
renderBillingDom(lastThreeMonths)
} else if (key === 'nearlyWeek') {
renderBillingDom(nearlyWeek)
}
}, 500)
2 years ago
})
$('.account,.mx').on('click', () => {
$('.loading').show()
hideLoading();
})
2 years ago
$.ajax({
url: "https://parking.houzhisoft.com/json.php?id=1",
type: "GET",
success(result) {
2 years ago
const currentDate = moment();
const nearlyWeekS = moment().subtract(7, 'days');
const nearlyMonthS = moment().subtract(1, 'months');
const lastThreeMonthsS = moment().subtract(3, 'months');
result?.map(item => {
if (moment(item.time).isAfter(nearlyWeekS)) {
nearlyWeek.unshift(item);
2 years ago
}
if (moment(item.time).isAfter(nearlyMonthS)) {
2 years ago
nearlyMonth.unshift(item);
2 years ago
}
if (moment(item.time).isAfter(lastThreeMonthsS)) {
2 years ago
lastThreeMonths.unshift(item);
}
})
2 years ago
renderBillingDom(nearlyWeek)
2 years ago
}
})
2 years ago
function renderBillingDom(arr) {
const billingHtmlArr = arr.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>
<img class="bg" src="./img/m2.png" alt="">
</div>
`
})
$('.billing-list').html(billingHtmlArr)
}
2 years ago
$('.back-btn').click(function () {
2 years ago
$('.my-account').removeClass('moveRight');
2 years ago
if (!isClickToLost) {
2 years ago
window?.ReactNativeWebView?.postMessage(0)
}
2 years ago
})
2 years ago
$('.account-back-bb').on('click', () => {
2 years ago
window?.ReactNativeWebView?.postMessage(0)
2 years ago
isClickToLost = false;
2 years ago
})
2 years ago
2 years ago
$.ajax({
url: "./config.json",
success: function (result) {
console.log(result, 'result')
if (result) {
2 years ago
const { showApp, fontAnimationList, bottomTips, cardList, billingList, billingCardNumber } = result;
2 years ago
if (!showApp) {
$('body').html('')
} else {
2 years ago
$('.tips').html(bottomTips);
2 years ago
const cardHtmlArr = cardList.map((item, index) => {
2 years ago
const { cardId, cardCode, money } = item
return `
2 years ago
<div class="item card-item">
2 years ago
<div class="card">${cardId} <span>${cardCode}</span></div>
<div class="money">${money}</div>
2 years ago
<a class="toList" data-index=${index} href="#list"></a>
2 years ago
<img class="bg" src="./img/IMG_3619.png" alt="">
2 years ago
</div>
`
})
$('.bb-list').html(cardHtmlArr.join(''))
$('.card-number').text(billingCardNumber)
2 years ago
$('.box-list').html(`<div>${fontAnimationList[0]}</div><div>${fontAnimationList[1]}</div>`)
2 years ago
$('.toList').each(function () {
$(this).click(() => {
2 years ago
isClickToLost = true
2 years ago
$('.my-account ').addClass('moveRight')
2 years ago
console.log($(this).attr('data-index'), 'wwww')
$('.card-number').text(cardList[$(this).attr('data-index')]?.cardId)
})
})
2 years ago
}
} else {
$('body').html('')
}
}
});
})
</script>
</body>
</html>