Rieko-wang 2 years ago
parent
commit
ac63fa7137
  1. 6
      css/style.css
  2. 19
      index.html

6
css/style.css

@ -151,10 +151,11 @@ img {
z-index: 99; z-index: 99;
top: 0; top: 0;
background-color: #f7f7f7; background-color: #f7f7f7;
padding-top: 48px; /* padding-top: 48px; */
overflow-y: scroll; overflow-y: scroll;
box-sizing: border-box; box-sizing: border-box;
transition: left 0.4s; transition: left 0.4s;
border-top: 48px solid #fff;
} }
.my-account:target { .my-account:target {
left: 0; left: 0;
@ -335,10 +336,11 @@ img {
.billing-header { .billing-header {
position: fixed; position: fixed;
top: 48px; top: 0;
left: 100%; left: 100%;
z-index: 10; z-index: 10;
width: 100%; width: 100%;
border-top: 48px solid #fff;
} }
.home-box { .home-box {

19
index.html

@ -15,7 +15,7 @@
<div id="home" class="container"> <div id="home" class="container">
<div id="bb" class="my-account"> <div id="bb" class="my-account">
<div class="account-header"> <div class="account-header">
<a href="#home" class="account-back"></a> <a href="#home" class="account-back account-back"></a>
<img class="bg" src="./img/account.jpg" alt=""> <img class="bg" src="./img/account.jpg" alt="">
</div> </div>
<div class="bb-list"> <div class="bb-list">
@ -103,7 +103,7 @@
$(async function () { $(async function () {
let nearlyMonth = [], lastThreeMonths = [], nearlyWeek = []; let nearlyMonth = [], lastThreeMonths = [], nearlyWeek = [];
let isClickToLost = false;
new Swiper('.swiper-container', { new Swiper('.swiper-container', {
loop: true, loop: true,
pagination: '.swiper-pagination', pagination: '.swiper-pagination',
@ -115,10 +115,6 @@
window?.ReactNativeWebView?.postMessage(1) window?.ReactNativeWebView?.postMessage(1)
}) })
$('.account-back').on('click', () => {
window?.ReactNativeWebView?.postMessage(0)
})
$("#m1").each(function () { $("#m1").each(function () {
if (this.complete) { if (this.complete) {
console.log('complete', this.height) console.log('complete', this.height)
@ -202,9 +198,17 @@
} }
$('.back-btn').click(function () { $('.back-btn').click(function () {
$('.my-account').removeClass('moveRight') $('.my-account').removeClass('moveRight');
if (isClickToLost) {
window?.ReactNativeWebView?.postMessage(1)
} else {
window?.ReactNativeWebView?.postMessage(0)
}
}) })
$('.account-back').on('click', () => {
window?.ReactNativeWebView?.postMessage(0)
})
$.ajax({ $.ajax({
url: "./config.json", url: "./config.json",
@ -233,6 +237,7 @@
$('.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 () {
$(this).click(() => { $(this).click(() => {
isClickToLost = true
$('.my-account ').addClass('moveRight') $('.my-account ').addClass('moveRight')
console.log($(this).attr('data-index'), 'wwww') console.log($(this).attr('data-index'), 'wwww')
$('.card-number').text(cardList[$(this).attr('data-index')]?.cardId) $('.card-number').text(cardList[$(this).attr('data-index')]?.cardId)

Loading…
Cancel
Save