优化合成礼物超出提示以及投入交互

This commit is contained in:
Dragon
2024-01-11 12:01:09 +08:00
parent 0fc37c0289
commit 0d1261e87c
4 changed files with 123 additions and 64 deletions

View File

@@ -770,10 +770,16 @@ body {
.refining .refining_in p {
margin-top: 0.98667rem;
width: 100%;
width: 90%;
text-align: center;
color: #fff;
font-size: 0.32rem;
margin: 0.98667rem auto 0;
line-height: 0.45rem;
}
.refining .refining_in p b {
color: #00E5F9;
}
.refining .refining_in div {
@@ -781,7 +787,7 @@ body {
display: flex;
justify-content: space-between;
box-sizing: border-box;
margin-top: 0.74667rem;
margin-top: 0.53333rem;
padding: 0 0.73333rem;
}

View File

@@ -17,6 +17,7 @@
url('../../../common/fonts/PingFang-Regular.ttf') format('truetype'),
url('../../../common/fonts/PingFang-Regular.ttf') format('svg');
}
.back {
position: fixed;
top: px2rem(50);
@@ -52,6 +53,7 @@ body {
.step1 {
display: none;
.step_tips {
width: px2rem(684);
height: px2rem(328);
@@ -61,6 +63,7 @@ body {
left: px2rem(30);
z-index: 999;
}
.step_but {
width: px2rem(108);
height: px2rem(121);
@@ -71,8 +74,10 @@ body {
z-index: 999;
}
}
.step2 {
display: none;
.step_tips {
width: px2rem(684);
height: px2rem(328);
@@ -82,6 +87,7 @@ body {
left: px2rem(30);
z-index: 999;
}
.xuxian_qp {
width: px2rem(126);
height: px2rem(75);
@@ -90,6 +96,7 @@ body {
left: px2rem(374);
z-index: 999;
}
.xuxian_bar {
width: 1.8rem;
height: 1.3rem;
@@ -98,6 +105,7 @@ body {
right: 0.85rem;
z-index: 999;
}
.step_but {
width: px2rem(108);
height: px2rem(121);
@@ -108,8 +116,10 @@ body {
z-index: 999;
}
}
.step3 {
display: none;
.step_tips {
width: px2rem(684);
height: px2rem(328);
@@ -118,6 +128,7 @@ body {
left: px2rem(30);
z-index: 999;
}
.xuxian_c {
width: px2rem(708);
height: px2rem(295);
@@ -126,6 +137,7 @@ body {
left: px2rem(21);
z-index: 999;
}
.step_but {
width: px2rem(108);
height: px2rem(121);
@@ -135,8 +147,10 @@ body {
z-index: 999;
}
}
.step4 {
display: none;
.step_tips {
width: px2rem(684);
height: px2rem(328);
@@ -145,6 +159,7 @@ body {
left: px2rem(30);
z-index: 999;
}
.xuxian_c {
width: px2rem(690);
height: px2rem(690);
@@ -153,6 +168,7 @@ body {
left: px2rem(30);
z-index: 999;
}
.success_wrap {
display: none;
z-index: 999;
@@ -176,15 +192,18 @@ body {
background: url(../images/qipao3.png) no-repeat;
background-size: 100% 100%;
}
span {
margin-top: px2rem(22);
font-family: 'pingfang-regular';
font-size: px2rem(24);
color: #fff;
b {
color: #FDD411;
}
}
p {
margin-top: px2rem(14);
font-family: 'pingfang-regular';
@@ -192,6 +211,7 @@ body {
color: #fff;
}
}
.bad_wrap {
display: none;
z-index: 999;
@@ -214,15 +234,18 @@ body {
background: url(../images/qipao_bad.png) no-repeat;
background-size: 100% 100%;
}
span {
margin-top: px2rem(22);
font-family: 'pingfang-regular';
font-size: px2rem(24);
color: #fff;
b {
color: #FDD411;
}
}
p {
margin-top: px2rem(14);
font-family: 'pingfang-regular';
@@ -236,6 +259,7 @@ body {
.head_wrap {
height: px2rem(1139);
}
.header {
width: 100%;
height: px2rem(1018);
@@ -377,9 +401,11 @@ body {
width: 100%;
display: flex;
justify-content: space-evenly;
.tab_item {
width: px2rem(188);
height: px2rem(60);
img {
width: 100%;
height: 100%;
@@ -460,6 +486,7 @@ body {
background: url(../images/but_active.png) no-repeat;
background-size: 100% 100%;
}
.xs_but_active {
background: url(../images/xs_but_active.png) no-repeat;
background-size: 100% 100%;
@@ -482,6 +509,7 @@ body {
color: #fff;
font-size: px2rem(22);
text-align: center;
span {
color: #FBE5B5;
}
@@ -803,10 +831,16 @@ body {
p {
margin-top: px2rem(74);
width: 100%;
width: 90%;
text-align: center;
color: #fff;
font-size: px2rem(24);
margin: px2rem(74) auto 0;
line-height: 0.45rem;
b {
color: #00E5F9;
}
}
div {
@@ -814,7 +848,7 @@ body {
display: flex;
justify-content: space-between;
box-sizing: border-box;
margin-top: px2rem(56);
margin-top: px2rem(40);
padding: 0 px2rem(55);
img {
@@ -1050,6 +1084,7 @@ body {
border-radius: 50%;
border: 1px solid #C6ADFF;
}
.no_tx {
display: block;
width: px2rem(73);
@@ -1239,15 +1274,18 @@ body {
background: url(../images/qipao3.png) no-repeat;
background-size: 100% 100%;
}
span {
margin-top: px2rem(22);
font-family: 'pingfang-regular';
font-size: px2rem(24);
color: #fff;
b {
color: #FDD411;
}
}
p {
margin-top: px2rem(14);
font-family: 'pingfang-regular';
@@ -1296,15 +1334,18 @@ body {
background: url(../images/qipao3.png) no-repeat;
background-size: 100% 100%;
}
span {
margin-top: px2rem(22);
font-family: 'pingfang-regular';
font-size: px2rem(24);
color: #fff;
b {
color: #FDD411;
}
}
p {
margin-top: px2rem(14);
font-family: 'pingfang-regular';
@@ -1353,15 +1394,18 @@ body {
background: url(../images/qipao_bad.png) no-repeat;
background-size: 100% 100%;
}
span {
margin-top: px2rem(22);
font-family: 'pingfang-regular';
font-size: px2rem(24);
color: #fff;
b {
color: #FDD411;
}
}
p {
margin-top: px2rem(14);
font-family: 'pingfang-regular';

View File

@@ -8,7 +8,7 @@
<title>魔法小屋</title>
<link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/swiper-bundle.min.css">
<link rel="stylesheet" href="./css/index.css?v=1.2">
<link rel="stylesheet" href="./css/index.css?v=1.20">
</head>
<body>
@@ -150,7 +150,7 @@
</div>
</div>
<!-- 添加減少彈框 -->
<div class="investment">
<div class="investment" style="z-index: 99;">
<div class="investment_in">
<!-- <img src="./images/del.png" alt="" class="closeBut"> -->
<p class="title">選擇投入:</p>
@@ -245,4 +245,4 @@
<script src="../../common/js/vconsole.min.js"></script>
<script src="../../common/js/route-constant.js"></script>
<script src="./js/swiper-bundle.min.js"></script>
<script src="./js/index.js?v=1.2"></script>
<script src="./js/index.js?v=1.20"></script>

View File

@@ -80,31 +80,31 @@ $(function () {
window.webkit.messageHandlers.initShowNav.postMessage(0)
}
}
document.addEventListener('touchstart', function (event) {
// document.addEventListener('touchstart', function (event) {
if (event.touches.length > 1) {
// if (event.touches.length > 1) {
event.preventDefault();
// event.preventDefault();
}
// }
})
// })
var lastTouchEnd = 0;
// var lastTouchEnd = 0;
document.addEventListener('touchend', function (event) {
// document.addEventListener('touchend', function (event) {
var now = (new Date()).getTime();
// var now = (new Date()).getTime();
if (now - lastTouchEnd <= 300) {
// if (now - lastTouchEnd <= 300) {
event.preventDefault();
// event.preventDefault();
}
// }
lastTouchEnd = now;
// lastTouchEnd = now;
}, false)
// }, false)
changeTab(tabIndex)
noticeFun();
getXsDataFun();
@@ -153,6 +153,15 @@ $('.header .but').click(function () {
if (ifs == 1) {
if (headerBut) {
headerBut = false;
var valArr = $('.speed_rogress .speed_rogress_top p').text().match(/\d+(\.\d+)?/g);
// console.log(valArr[0])
// console.log(valArr[1] * 0.5)
// console.log((valArr[0] - valArr[1])>= valArr[1]* 0.5 ? '超过百分之五十了':'合理范围内');
if ((valArr[0] - valArr[1]) / valArr[1] >= 0.3) {
$('.refining .refining_in p').html('當前投入禮物值<b>已超過</b>煉制進度值,確認繼續煉制嗎?')
} else {
$('.refining .refining_in p').html('確認選擇這些背包禮物進行煉制嗎?')
}
$('.refining').show();
}
} else {
@@ -582,7 +591,7 @@ $(".investment .investment_in .num input").on("input", function () {
if (val > Number($('.bottom .swiper .swiper-slide .div_active strong b').text())) {
val = 0;
$(this).val(0);
toastMsg('超出已擁有數量');
toastMsg('背包庫存數量不足');
getDataArr[0].fraction = lastNum;
// $('.bottom .swiper .swiper-slide .div_active strong i').text("0");
} else if (val == '') {
@@ -630,7 +639,7 @@ $('.investment .investment_in .num .add').click(function (event) {
console.log(indes);
arrs[indes].goldprice = goldprice;
if (val > num) {
toastMsg('已超出現有數量');
toastMsg('背包庫存數量不足');
val = val - 1;
$('.bottom .swiper .swiper-slide .div_active').attr(`nums`, val);
arrs[indes].num = Number($('.bottom .swiper .swiper-slide .div_active').attr('nums'));