修复bug
This commit is contained in:
@@ -24,12 +24,11 @@ body {
|
||||
|
||||
.wrap {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
height: 115vh;
|
||||
background: url("../images/main/index-bg.png") no-repeat center/cover;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
margin-bottom: 1.46667rem;
|
||||
}
|
||||
|
||||
.wrap .header {
|
||||
@@ -440,6 +439,10 @@ body {
|
||||
width: 4rem;
|
||||
height: 1.01333rem;
|
||||
margin: 0.93333rem auto 0;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
top: 14.3rem;
|
||||
}
|
||||
|
||||
.wrap .summon-area .confitm-btn.inactive {
|
||||
@@ -1409,7 +1412,7 @@ body {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
z-index: 9999;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
|
@@ -34,12 +34,12 @@ body{
|
||||
|
||||
.wrap{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
height: 115vh;
|
||||
background: url('../images/main/index-bg.png') no-repeat center/cover;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
margin-bottom: px2rem(110);
|
||||
// margin-bottom: px2rem(200);
|
||||
.header{
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
@@ -408,6 +408,10 @@ body{
|
||||
width: px2rem(300);
|
||||
height: px2rem(76);
|
||||
margin: px2rem(70) auto 0;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
top: 14.3rem;
|
||||
&.inactive{
|
||||
width: px2rem(333);
|
||||
height: px2rem(84);
|
||||
@@ -1270,7 +1274,7 @@ body{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
z-index: 9999;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba($color: #000000, $alpha: 0.4);
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
@@ -257,7 +257,7 @@
|
||||
<script src="../../common/js/vconsole.min.js"></script>
|
||||
<script src="../../common/js/svga.min.js"></script>
|
||||
<script src="../../common/js/route-constant.js"></script>
|
||||
<script src="./js/index.js?v=2.1"></script>
|
||||
<script src="./js/index.js?v=2.2"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@@ -23,7 +23,7 @@ if (env == 'test') {
|
||||
|
||||
console.log($(window).width());
|
||||
console.log($(window).height());
|
||||
|
||||
var lock = true;
|
||||
|
||||
// 封裝layer消息提醒框
|
||||
let layerIndex
|
||||
@@ -606,14 +606,16 @@ const sendUserDrawInfo = (itemId, num) => {
|
||||
if (currentWeaponIndex_top != undefined) {
|
||||
restrainArr[currentWeaponIndex_top]['num_top'] = 0
|
||||
}
|
||||
}else if(res.code === 31005){
|
||||
} else if (res.code === 31005) {
|
||||
$('.shade-mask-no-money').show();
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
lock = true;
|
||||
},
|
||||
error (err) {
|
||||
toastMsg('網絡錯誤,請退出重進')
|
||||
lock = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1326,22 +1328,25 @@ $(function () {
|
||||
// return
|
||||
// }
|
||||
|
||||
// 每個標誌位上的數量
|
||||
restrainArr[currentWeaponIndex].costPieceNum += parseInt($('.select-num input').val())
|
||||
|
||||
$('.sign-wrap div').eq(currentWeaponIndex).find('img')
|
||||
.stop(true, true)
|
||||
.animate({ scale: 1.2 }, 200)
|
||||
.animate({ scale: 1 }, 200, function () {
|
||||
$('.sign-wrap div').eq(currentWeaponIndex).find('p').html('+' + restrainArr[currentWeaponIndex].costPieceNum).hide().fadeIn(200)
|
||||
setTimeout(() => {
|
||||
getUserInfo()
|
||||
}, 100)
|
||||
})
|
||||
if (lock) {
|
||||
lock = false;
|
||||
// 每個標誌位上的數量
|
||||
restrainArr[currentWeaponIndex].costPieceNum += parseInt($('.select-num input').val())
|
||||
$('.sign-wrap div').eq(currentWeaponIndex).find('img')
|
||||
.stop(true, true)
|
||||
.animate({ scale: 1.2 }, 200)
|
||||
.animate({ scale: 1 }, 200, function () {
|
||||
$('.sign-wrap div').eq(currentWeaponIndex).find('p').html('+' + restrainArr[currentWeaponIndex].costPieceNum).hide().fadeIn(200)
|
||||
setTimeout(() => {
|
||||
getUserInfo()
|
||||
}, 100)
|
||||
})
|
||||
|
||||
console.log('costPieceNum---', restrainArr[currentWeaponIndex].costPieceNum);
|
||||
console.log('id----', restrainArr[currentWeaponIndex].id);
|
||||
sendUserDrawInfo(restrainArr[currentWeaponIndex].id, $('.select-num input').val())
|
||||
console.log('costPieceNum---', restrainArr[currentWeaponIndex].costPieceNum);
|
||||
console.log('id----', restrainArr[currentWeaponIndex].id);
|
||||
sendUserDrawInfo(restrainArr[currentWeaponIndex].id, $('.select-num input').val())
|
||||
}
|
||||
})
|
||||
|
||||
// let isSelectTopWeapon
|
||||
@@ -1451,63 +1456,66 @@ $(function () {
|
||||
if ($('.popup-select-num input').val() == 0) {
|
||||
return toastMsg('數量不能少於0')
|
||||
}
|
||||
if (parseInt(myFragment) < $('.popup-select-num input').val()) {
|
||||
console.log(1);
|
||||
let distance = $('.popup-select-num input').val() - myFragment
|
||||
// let listArr = JSON.parse( window.sessionStorage.getItem('listMap'))
|
||||
// console.log(JSON.parse( window.sessionStorage.getItem('listMap') ));
|
||||
let packItem = {}
|
||||
let giveNum = ''
|
||||
if (distance == 1) {
|
||||
packItem = listMap[0]
|
||||
giveNum = 1
|
||||
} else if (distance <= 10) {
|
||||
console.log(2);
|
||||
packItem = listMap[1]
|
||||
giveNum = '7~10'
|
||||
} else if (distance <= 100) {
|
||||
packItem = listMap[2]
|
||||
giveNum = '70~100'
|
||||
} else {
|
||||
packItem = listMap[3]
|
||||
giveNum = '700~1000'
|
||||
}
|
||||
console.log(packItem);
|
||||
$('.popup-not-enough .headwear-pic').attr('src', packItem.imgUrl)
|
||||
$('.popup-not-enough .headwear-name').html(packItem.name + '/天')
|
||||
$('.popup-not-enough .headwear-award').html(`獲贈魔法石${giveNum}個`)
|
||||
$('.popup-not-enough .headwear-price span').html(packItem.sellingPrice)
|
||||
$('.popup-not-enough .diamond-num span').html(userDiamonds)
|
||||
// if (parseInt(myFragment) < $('.popup-select-num input').val()) {
|
||||
// console.log(1);
|
||||
// let distance = $('.popup-select-num input').val() - myFragment
|
||||
// // let listArr = JSON.parse( window.sessionStorage.getItem('listMap'))
|
||||
// // console.log(JSON.parse( window.sessionStorage.getItem('listMap') ));
|
||||
// let packItem = {}
|
||||
// let giveNum = ''
|
||||
// if (distance == 1) {
|
||||
// packItem = listMap[0]
|
||||
// giveNum = 1
|
||||
// } else if (distance <= 10) {
|
||||
// console.log(2);
|
||||
// packItem = listMap[1]
|
||||
// giveNum = '7~10'
|
||||
// } else if (distance <= 100) {
|
||||
// packItem = listMap[2]
|
||||
// giveNum = '70~100'
|
||||
// } else {
|
||||
// packItem = listMap[3]
|
||||
// giveNum = '700~1000'
|
||||
// }
|
||||
// console.log(packItem);
|
||||
// $('.popup-not-enough .headwear-pic').attr('src', packItem.imgUrl)
|
||||
// $('.popup-not-enough .headwear-name').html(packItem.name + '/天')
|
||||
// $('.popup-not-enough .headwear-award').html(`獲贈魔法石${giveNum}個`)
|
||||
// $('.popup-not-enough .headwear-price span').html(packItem.sellingPrice)
|
||||
// $('.popup-not-enough .diamond-num span').html(userDiamonds)
|
||||
|
||||
$('.popup-not-enough .buy-btn').data('id', packItem.id)
|
||||
// $('.popup-not-enough .buy-btn').data('id', packItem.id)
|
||||
|
||||
// 召喚神器彈窗關閉
|
||||
$('.popup-summon').hide()
|
||||
$('.popup-summon input').val(0)
|
||||
$('.popup-select-num .ipt-wrap main i').html(0)
|
||||
$('.popup-select-num .ipt-wrap p i').html(0)
|
||||
restrainArr[currentWeaponIndex_top]['num_top'] = 0
|
||||
// // 召喚神器彈窗關閉
|
||||
// $('.popup-summon').hide()
|
||||
// $('.popup-summon input').val(0)
|
||||
// $('.popup-select-num .ipt-wrap main i').html(0)
|
||||
// $('.popup-select-num .ipt-wrap p i').html(0)
|
||||
// restrainArr[currentWeaponIndex_top]['num_top'] = 0
|
||||
|
||||
$('.popup-not-enough').show()
|
||||
return
|
||||
// $('.popup-not-enough').show()
|
||||
// return
|
||||
// }
|
||||
|
||||
if (lock) {
|
||||
lock = false;
|
||||
// 每個標誌位上的數量
|
||||
restrainArr[currentWeaponIndex_top].costPieceNum += parseInt($('.popup-select-num input').val())
|
||||
|
||||
$('.sign-wrap div').eq(currentWeaponIndex_top).find('img')
|
||||
.stop(true, true)
|
||||
.animate({ scale: 1.2 }, 200)
|
||||
.animate({ scale: 1 }, 200, function () {
|
||||
$('.sign-wrap div').eq(currentWeaponIndex_top).find('p').html('+' + restrainArr[currentWeaponIndex_top].costPieceNum).hide().fadeIn(200)
|
||||
setTimeout(() => {
|
||||
getUserInfo()
|
||||
}, 100)
|
||||
})
|
||||
|
||||
console.log('costPieceNum---', restrainArr[currentWeaponIndex_top].costPieceNum);
|
||||
console.log('id----', restrainArr[currentWeaponIndex_top].id);
|
||||
sendUserDrawInfo(restrainArr[currentWeaponIndex_top].id, $('.popup-select-num input').val())
|
||||
}
|
||||
|
||||
// 每個標誌位上的數量
|
||||
restrainArr[currentWeaponIndex_top].costPieceNum += parseInt($('.popup-select-num input').val())
|
||||
|
||||
$('.sign-wrap div').eq(currentWeaponIndex_top).find('img')
|
||||
.stop(true, true)
|
||||
.animate({ scale: 1.2 }, 200)
|
||||
.animate({ scale: 1 }, 200, function () {
|
||||
$('.sign-wrap div').eq(currentWeaponIndex_top).find('p').html('+' + restrainArr[currentWeaponIndex_top].costPieceNum).hide().fadeIn(200)
|
||||
setTimeout(() => {
|
||||
getUserInfo()
|
||||
}, 100)
|
||||
})
|
||||
|
||||
console.log('costPieceNum---', restrainArr[currentWeaponIndex_top].costPieceNum);
|
||||
console.log('id----', restrainArr[currentWeaponIndex_top].id);
|
||||
sendUserDrawInfo(restrainArr[currentWeaponIndex_top].id, $('.popup-select-num input').val())
|
||||
})
|
||||
|
||||
|
||||
@@ -1571,6 +1579,9 @@ $(function () {
|
||||
$('.popup-not-enough .close').click(() => {
|
||||
$('.popup-not-enough').hide()
|
||||
})
|
||||
$('.wrap .popup-result .result-content .close').click(function () {
|
||||
$('.popup-result').hide()
|
||||
})
|
||||
$('body').click(() => {
|
||||
$('.shade-mask-no-money').hide()
|
||||
})
|
||||
|
Reference in New Issue
Block a user