|
@ -30,9 +30,9 @@ |
|
|
<div class="card-number"></div> |
|
|
<div class="card-number"></div> |
|
|
<img class="bg" id="m1" src="./img/m1.png" alt=""> |
|
|
<img class="bg" id="m1" src="./img/m1.png" alt=""> |
|
|
<div class="filter"> |
|
|
<div class="filter"> |
|
|
<div class="filter-item active">近一周</div> |
|
|
<div class="filter-item active" data-query-key="nearlyWeek">近一周</div> |
|
|
<div class="filter-item">近一月</div> |
|
|
<div class="filter-item" data-query-key="nearlyMonth">近一月</div> |
|
|
<div class="filter-item">近三月</div> |
|
|
<div class="filter-item" data-query-key="lastThreeMonths">近三月</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -92,7 +92,8 @@ |
|
|
|
|
|
|
|
|
<script src="./js/swiper-3.4.2.min.js"></script> |
|
|
<script src="./js/swiper-3.4.2.min.js"></script> |
|
|
<script src="./js/jquery-3.6.1.min.js"></script> |
|
|
<script src="./js/jquery-3.6.1.min.js"></script> |
|
|
<!-- <script lang="javascript" src="https://cdn.sheetjs.com/xlsx-0.19.1/package/dist/xlsx.full.min.js"></script> --> |
|
|
<script src="./js/moment.js"></script> |
|
|
|
|
|
<script src="./1.js"></script> |
|
|
<script> |
|
|
<script> |
|
|
function hideLoading() { |
|
|
function hideLoading() { |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
@ -101,38 +102,9 @@ |
|
|
} |
|
|
} |
|
|
hideLoading(); |
|
|
hideLoading(); |
|
|
|
|
|
|
|
|
$('#my_account_rn,#mx_rn').on('click', () => { |
|
|
|
|
|
window?.ReactNativeWebView?.postMessage(1) |
|
|
|
|
|
}) |
|
|
|
|
|
$('.account-back').on('click', () => { |
|
|
|
|
|
window?.ReactNativeWebView?.postMessage(0) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
$("#m1").each(function () { |
|
|
|
|
|
if (this.complete) { |
|
|
|
|
|
console.log('complete', this.height) |
|
|
|
|
|
$('.billing-list').css('paddingTop', this.height) |
|
|
|
|
|
} else { |
|
|
|
|
|
$($(this)).on('load', function () { |
|
|
|
|
|
// image now loaded |
|
|
|
|
|
$('.billing-list').css('paddingTop', this.height) |
|
|
|
|
|
|
|
|
|
|
|
console.log('load', this.height) |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$('.filter-item').click(function () { |
|
|
|
|
|
$('.filter-item').removeClass('active'); |
|
|
|
|
|
$(this).addClass('active') |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
$('.account,.mx').on('click', () => { |
|
|
|
|
|
$('.loading').show() |
|
|
|
|
|
hideLoading(); |
|
|
|
|
|
}) |
|
|
|
|
|
$(async function () { |
|
|
$(async function () { |
|
|
|
|
|
let nearlyMonth = [], lastThreeMonths = [], nearlyWeek = []; |
|
|
|
|
|
|
|
|
new Swiper('.swiper-container', { |
|
|
new Swiper('.swiper-container', { |
|
|
loop: true, |
|
|
loop: true, |
|
|
pagination: '.swiper-pagination', |
|
|
pagination: '.swiper-pagination', |
|
@ -140,19 +112,95 @@ |
|
|
paginationClickable: true |
|
|
paginationClickable: true |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
$('#my_account_rn,#mx_rn').on('click', () => { |
|
|
|
|
|
window?.ReactNativeWebView?.postMessage(1) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
$('.account-back').on('click', () => { |
|
|
|
|
|
window?.ReactNativeWebView?.postMessage(0) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
$("#m1").each(function () { |
|
|
|
|
|
if (this.complete) { |
|
|
|
|
|
console.log('complete', this.height) |
|
|
|
|
|
$('.billing-list').css('paddingTop', this.height) |
|
|
|
|
|
} else { |
|
|
|
|
|
$($(this)).on('load', function () { |
|
|
|
|
|
// image now loaded |
|
|
|
|
|
$('.billing-list').css('paddingTop', this.height) |
|
|
|
|
|
|
|
|
|
|
|
console.log('load', this.height) |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$('.filter-item').click(function () { |
|
|
|
|
|
$('.filter-item').removeClass('active'); |
|
|
|
|
|
const key = $(this).attr('data-query-key'); |
|
|
|
|
|
$(this).addClass('active') |
|
|
|
|
|
if (key === 'nearlyMonth') { |
|
|
|
|
|
renderBillingDom(nearlyMonth) |
|
|
|
|
|
} else if (key === 'lastThreeMonths') { |
|
|
|
|
|
renderBillingDom(lastThreeMonths) |
|
|
|
|
|
} else if (key === 'nearlyWeek') { |
|
|
|
|
|
renderBillingDom(nearlyWeek) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
$('.account,.mx').on('click', () => { |
|
|
|
|
|
$('.loading').show() |
|
|
|
|
|
hideLoading(); |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// const raw_data = XLSX.readFile('ex.xls'); |
|
|
|
|
|
// console.log(raw_data, 'raw_data') |
|
|
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: "https://parking.houzhisoft.com/json.php?id=1", |
|
|
url: "https://parking.houzhisoft.com/json.php?id=1", |
|
|
type: "GET", |
|
|
type: "GET", |
|
|
success(result) { |
|
|
success(result) { |
|
|
console.log(result, 'result') |
|
|
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); |
|
|
|
|
|
} |
|
|
|
|
|
if (moment(item.time).isAfter(nearlyWeekS)) { |
|
|
|
|
|
nearlyMonth.unshift(item); |
|
|
|
|
|
} |
|
|
|
|
|
if (moment(item.time).isAfter(lastThreeMonthsS)) { |
|
|
|
|
|
lastThreeMonths.unshift(item); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
renderBillingDom(nearlyMonth) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
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) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: "./config.json", |
|
|
url: "./config.json", |
|
|
success: function (result) { |
|
|
success: function (result) { |
|
@ -177,28 +225,7 @@ |
|
|
|
|
|
|
|
|
$('.bb-list').html(cardHtmlArr.join('')) |
|
|
$('.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> |
|
|
|
|
|
<img class="bg" src="./img/m2.png" alt=""> |
|
|
|
|
|
</div> |
|
|
|
|
|
` |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
$('.billing-list').html(billingHtmlArr) |
|
|
|
|
|
$('.card-number').text(billingCardNumber) |
|
|
$('.card-number').text(billingCardNumber) |
|
|
$('.box-list').html(`<div>${fontAnimationList[0]}</div><div>${fontAnimationList[1]}</div>`) |
|
|
$('.box-list').html(`<div>${fontAnimationList[0]}</div><div>${fontAnimationList[1]}</div>`) |
|
|
$('.toList').each(function () { |
|
|
$('.toList').each(function () { |
|
|