守护星球暂存

This commit is contained in:
Dragon
2024-02-19 18:00:15 +08:00
parent f15768be4e
commit 8c5e933052
7 changed files with 399 additions and 328 deletions

View File

@@ -67,7 +67,7 @@ body {
.wrap .rule, .wrap .record, .wrap .mall, .wrap .rank {
position: absolute;
top: 0.64rem;
top: 1.73333rem;
left: 0.26667rem;
z-index: 99;
width: 1.14667rem;
@@ -79,11 +79,13 @@ body {
}
.wrap .record {
top: 0.66667rem;
left: 8.58667rem;
}
.wrap .mall {
top: 1.73333rem;
display: none;
}
.wrap .rank {
@@ -474,8 +476,9 @@ body {
.wrap .info-bottom .f-wrap .fragment img, .wrap .info-bottom .f-wrap .award img {
width: 0.46667rem;
width: 0.4rem;
margin-right: 0.08rem;
margin-left: 0.08rem;
vertical-align: middle;
margin-top: -0.02667rem;
}
.wrap .info-bottom .f-wrap .fragment span, .wrap .info-bottom .f-wrap .award span {

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -71,7 +71,8 @@
<div class="decrement-ten"><img src="./images/main/decrement-ten.png" alt=""></div>
<div class="ipt-wrap">
<span>召唤个数</span>
<p>成功击败怪兽将获得<i>0</i>鉆石奖励</p>
<p style="bottom:-0.32rem" class="p1">消耗 <b style="color:#f1db14">钻石*0</b></p>
<p style="bottom:-0.64rem">成功击败怪兽将获得 <b style="color:#f1db14">鉆石*<i>0</i></b></p>
<!-- <main>消耗魔法石<i>0</i></main> -->
<main>召唤个数</main>
<img src="./images/main/decrement.png" alt="" class="decrement">
@@ -90,7 +91,7 @@
<div class="f-wrap">
<div class="fragment">
<img src="./images/main/prop-icon.png" alt="">
我的魔石:<span>0</span>
我的魔石:<span>0</span><img src="./images/popup/add.png" alt="" class="add">
</div>
<div class="award">
<img src="./images/main/award-icon.png" alt="">
@@ -195,7 +196,7 @@
<div class="ipt-wrap">
<span>召唤个数</span>
<p>成功击败怪兽将获得<i>0</i>鉆石奖励</p>
<main>消耗魔法<i>0</i></main>
<main>消耗<i>0</i></main>
<img src="./images/main/decrement.png" alt="" class="decrement">
<input type="text" value="0">
<img src="./images/main/increment.png" alt="" class="increment">
@@ -203,7 +204,7 @@
<div class="increment-ten"><img src="./images/popup/increment-ten.png" alt=""></div>
</div>
<div class="popup-confitm-btn active"><img src="./images/main/confirm-btn.png" alt=""></div>
<div class="mine-prop-num">我的魔法<span>0</span> <img src="./images/popup/add.png" alt="" class="add"></div>
<div class="mine-prop-num">我的<span>0</span> <img src="./images/popup/add.png" alt="" class="add"></div>
</div>
</div>
@@ -256,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.1"></script>
</body>
</html>

View File

@@ -48,7 +48,7 @@ const toastMsg = (content = '操作完成', time = 2) => {
})
}
if (!browser.app) {//false
if (false) {//!browser.app
toastMsg('请在app内打开');
} else {
$('body').removeClass('no-in-app')
@@ -98,8 +98,8 @@ const getUserInfo = (param) => {
$('.info-bottom').find('.fragment span')[0].innerHTML = parseInt($('.info-bottom').find('.fragment span')[0].innerHTML) + param
myFragment = $('.info-bottom').find('.fragment span')[0].innerHTML
} else {
$('.info-bottom').find('.fragment span').html(res.data.pieceNum)
myFragment = res.data.pieceNum
$('.info-bottom').find('.fragment span').html(res.data.diamonds)
myFragment = res.data.diamonds
}
userDiamonds = res.data.diamonds
} else {
@@ -217,6 +217,7 @@ const showView = (data, monsterImg, drawId) => {
// 清空input数量
$('.select-num input').val(0)
$('.select-num .ipt-wrap main i').html(0)
$('.select-num .ipt-wrap .p1 b').html('钻石*0')
$('.select-num .ipt-wrap p i').html(0)
if (currentWeaponIndex != undefined) {
// restrainArr[currentWeaponIndex]['num'] = 0
@@ -296,7 +297,7 @@ const showView = (data, monsterImg, drawId) => {
console.log('isStatus3的值------------', isStatus3);
// 判断处于怪兽进攻动画阶段还是结果弹窗展示阶段
if (userComeinTime - showResultStageStartTime > STAGE3_TIME * 1000) {
if (userComeinTime - showResultStageStartTime > STAGE3_TIME * 10000) {
console.log('结果弹窗展示阶段');
// 准备中 不可召唤
@@ -414,7 +415,7 @@ const showCountDown = (timestamp, startTime, endTime) => {
// hideLoading(layerIndex)
setTimeout(() => {
getNewestAct()
}, delayTime * 1000)
}, delayTime * 10000)
isStatus2 = false
} else {
showLoading()
@@ -426,19 +427,19 @@ const showCountDown = (timestamp, startTime, endTime) => {
setTimeout(() => {
getNewestAct()
// getListItem(roundId)
}, delayTime * 1000)
}, delayTime * 10000)
// getNewestAct()
// getListItem()
isStatus3 = false
} else {
setTimeout(() => {
getNewestAct()
}, delayTime * 1000)
}, delayTime * 10000)
}
} else {
$countDown.html(countDownTime + 'S')
}
}, interval * 1000)
}, interval * 10000)
}
//判断status的状态
@@ -541,13 +542,13 @@ const monsterAnimation = () => {
if (isStatus3) {
$('.monster-position').attr('src', img)
$('.monster-position').show()
$('.monster-position').animate({ top: '0.64rem' }, 75.6 / 500.3 * STAGE3_TIME * 1000, 'linear', () => {
$('.monster-position').animate({ left: '8.16rem' }, 139.1 / 500.3 * STAGE3_TIME * 1000, 'linear', () => {
$('.monster-position').animate({ top: `${90 / 75 * 2}rem` }, 31.4 / 500.3 * STAGE3_TIME * 1000, 'linear', () => {
$('.monster-position').animate({ left: `${98 / 75 * 2}rem` }, 103.8 / 500.3 * STAGE3_TIME * 1000, 'linear', () => {
$('.monster-position').animate({ top: '4rem' }, 29.9 / 500.3 * STAGE3_TIME * 1000, 'linear', () => {
$('.monster-position').animate({ left: `${8.16}rem` }, 103.8 / 500.3 * STAGE3_TIME * 1000, 'linear', () => {
$('.monster-position').animate({ top: '4.8rem' }, 16.7 / 500.3 * STAGE3_TIME * 1000, 'linear', () => {
$('.monster-position').animate({ top: '0.64rem' }, 75.6 / 500.3 * STAGE3_TIME * 10000, 'linear', () => {
$('.monster-position').animate({ left: '8.16rem' }, 139.1 / 500.3 * STAGE3_TIME * 10000, 'linear', () => {
$('.monster-position').animate({ top: `${90 / 75 * 2}rem` }, 31.4 / 500.3 * STAGE3_TIME * 10000, 'linear', () => {
$('.monster-position').animate({ left: `${98 / 75 * 2}rem` }, 103.8 / 500.3 * STAGE3_TIME * 10000, 'linear', () => {
$('.monster-position').animate({ top: '4rem' }, 29.9 / 500.3 * STAGE3_TIME * 10000, 'linear', () => {
$('.monster-position').animate({ left: `${8.16}rem` }, 103.8 / 500.3 * STAGE3_TIME * 10000, 'linear', () => {
$('.monster-position').animate({ top: '4.8rem' }, 16.7 / 500.3 * STAGE3_TIME * 10000, 'linear', () => {
$('.monster-position').hide()
$('.monster-position').css({ top: '4.8rem', left: `${28 * 2 / 75}rem` })
@@ -587,7 +588,7 @@ const showResultPopup = () => {
$('.result-monster-name').html(drawInfo.drawRestraintName)
if (drawInfo.userDrawResult.drawStatus === 1) {
$('.result-award span').html(drawInfo.userDrawResult.prizeDiamonds * 10)
$('.result-award span').html(drawInfo.userDrawResult.prizeDiamonds * 100)
$('.result-award').show()
$('.result-content').removeClass('not-join-bg')
$('.result-content').removeClass('failure-bg')
@@ -640,6 +641,7 @@ const sendUserDrawInfo = (itemId, num) => {
toastMsg('召唤成功!')
$('.select-num input').val(0)
$('.select-num .ipt-wrap main i').html(0)
$('.select-num .ipt-wrap .p1 b').html('钻石*0')
$('.select-num .ipt-wrap p i').html(0)
if (currentWeaponIndex != undefined) {
restrainArr[currentWeaponIndex]['num'] = 0
@@ -779,6 +781,7 @@ $('.record-list').scroll(function () {
// 获取往轮游戏结果
let previousResults = []
const getPreviousResults = (count, roundId) => {
showLoading();
networkRequest({
type: 'GET',
url: urlPrefix + '/act/callBattle/listActInfo',
@@ -791,8 +794,10 @@ const getPreviousResults = (count, roundId) => {
previousResults = res.data
renderPreviousResults()
}
hideLoading(layerIndex);
},
error (err) {
hideLoading(layerIndex);
toastMsg('網絡錯誤,請退出重進')
}
})
@@ -1063,7 +1068,53 @@ $(function () {
location.href = './mall.html'
})
$('.mine-prop-num .add').click(() => {
location.href = './mall.html'
// location.href = './mall.html'
if (browser.app) {
if (browser.android) {
let channel = pubInfo.deviceInfo.channel;
console.log(pubInfo.deviceInfo);
if (channel == "google") {
window.androidJsObj.openChargePage(6);
} else {
window.androidJsObj.openChargePage(6);
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
}
} else if (browser.ios) {
let channel = pubInfo.deviceInfo.channel;
if (channel == "appstore") {
window.webkit.messageHandlers.openChargePage.postMessage(null);
} else {
window.webkit.messageHandlers.chargePayClickPage.postMessage(6);
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
}
}
} else {
toastMsg('請在app內打開')
}
})
$('.wrap .info-bottom .f-wrap .fragment img').click(() => {
if (browser.app) {
if (browser.android) {
let channel = pubInfo.deviceInfo.channel;
console.log(pubInfo.deviceInfo);
if (channel == "google") {
window.androidJsObj.openChargePage(6);
} else {
window.androidJsObj.openChargePage(6);
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
}
} else if (browser.ios) {
let channel = pubInfo.deviceInfo.channel;
if (channel == "appstore") {
window.webkit.messageHandlers.openChargePage.postMessage(null);
} else {
window.webkit.messageHandlers.chargePayClickPage.postMessage(6);
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
}
}
} else {
toastMsg('請在app內打開')
}
})
// 我的记录弹窗
@@ -1189,6 +1240,7 @@ $(function () {
// 切换时清空数量
$('.select-num .ipt-wrap input').val(0)
$('.select-num .ipt-wrap main i').html(0)
$('.select-num .ipt-wrap .p1 b').html('钻石*0')
$('.select-num .ipt-wrap p i').html(0)
restrainArr[index]['num'] = 0
@@ -1202,10 +1254,10 @@ $(function () {
}
restrainArr[currentWeaponIndex]['num']++
console.log(restrainArr[currentWeaponIndex]);
let awardNum = restrainArr[currentWeaponIndex]['num'] * restrainArr[currentWeaponIndex]['multiple'] * 10
let awardNum = restrainArr[currentWeaponIndex]['num'] * restrainArr[currentWeaponIndex]['multiple'] * 100
$('.select-num .ipt-wrap input').val(restrainArr[currentWeaponIndex]['num'])
$('.select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex]['num'])
$('.select-num .ipt-wrap .p1 b').html('钻石*' + restrainArr[currentWeaponIndex]['num'] * 100)
$('.select-num .ipt-wrap p i').html(awardNum)
})
$('.select-num .increment-ten').on('click', function () {
@@ -1213,10 +1265,10 @@ $(function () {
return toastMsg('请先选择神器')
}
restrainArr[currentWeaponIndex]['num'] += 10
let awardNum = restrainArr[currentWeaponIndex]['num'] * restrainArr[currentWeaponIndex]['multiple'] * 10
let awardNum = restrainArr[currentWeaponIndex]['num'] * restrainArr[currentWeaponIndex]['multiple'] * 100
$('.select-num .ipt-wrap input').val(restrainArr[currentWeaponIndex]['num'])
$('.select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex]['num'])
$('.select-num .ipt-wrap .p1 b').html('钻石*' + restrainArr[currentWeaponIndex]['num'] * 100)
$('.select-num .ipt-wrap p i').html(awardNum)
})
$('.select-num .decrement').on('click', function () {
@@ -1230,10 +1282,10 @@ $(function () {
restrainArr[currentWeaponIndex]['num'] = 0
return
}
let awardNum = restrainArr[currentWeaponIndex]['num'] * restrainArr[currentWeaponIndex]['multiple'] * 10
let awardNum = restrainArr[currentWeaponIndex]['num'] * restrainArr[currentWeaponIndex]['multiple'] * 100
$('.select-num .ipt-wrap input').val(restrainArr[currentWeaponIndex]['num'])
$('.select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex]['num'])
$('.select-num .ipt-wrap .p1 b').html('钻石*' + restrainArr[currentWeaponIndex]['num'] * 100)
$('.select-num .ipt-wrap p i').html(awardNum)
})
$('.select-num .decrement-ten').on('click', function () {
@@ -1246,10 +1298,10 @@ $(function () {
restrainArr[currentWeaponIndex]['num'] = parseInt($('.select-num .ipt-wrap input').val())
return
}
let awardNum = restrainArr[currentWeaponIndex]['num'] * restrainArr[currentWeaponIndex]['multiple'] * 10
let awardNum = restrainArr[currentWeaponIndex]['num'] * restrainArr[currentWeaponIndex]['multiple'] * 100
$('.select-num .ipt-wrap input').val(restrainArr[currentWeaponIndex]['num'])
$('.select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex]['num'])
$('.select-num .ipt-wrap .p1 b').html('钻石*' + restrainArr[currentWeaponIndex]['num'] * 100)
$('.select-num .ipt-wrap p i').html(awardNum)
})
$('.select-num input').on('input', function () {
@@ -1263,10 +1315,10 @@ $(function () {
return toastMsg('请输入数字')
}
restrainArr[currentWeaponIndex]['num'] = $(this).val() - 0
let awardNum = restrainArr[currentWeaponIndex]['num'] * restrainArr[currentWeaponIndex]['multiple'] * 10
let awardNum = restrainArr[currentWeaponIndex]['num'] * restrainArr[currentWeaponIndex]['multiple'] * 100
$('.select-num .ipt-wrap input').val(restrainArr[currentWeaponIndex]['num'])
$('.select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex]['num'])
$('.select-num .ipt-wrap .p1 b').html('钻石*' + restrainArr[currentWeaponIndex]['num'] * 100)
$('.select-num .ipt-wrap p i').html(awardNum)
})
@@ -1359,10 +1411,10 @@ $(function () {
restrainArr[currentWeaponIndex_top]['num_top']++
console.log(restrainArr[currentWeaponIndex_top]);
let awardNum = restrainArr[currentWeaponIndex_top]['num_top'] * restrainArr[currentWeaponIndex_top]['multiple'] * 10
let awardNum = restrainArr[currentWeaponIndex_top]['num_top'] * restrainArr[currentWeaponIndex_top]['multiple'] * 100
$('.popup-select-num .ipt-wrap input').val(restrainArr[currentWeaponIndex_top]['num_top'])
$('.popup-select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex_top]['num_top'])
$('.popup-select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex_top]['num_top'] * 100)
$('.popup-select-num .ipt-wrap p i').html(awardNum)
})
$('.popup-select-num .increment-ten').on('click', function () {
@@ -1372,10 +1424,10 @@ $(function () {
restrainArr[currentWeaponIndex_top]['num_top'] += 10
console.log(restrainArr[currentWeaponIndex_top]);
let awardNum = restrainArr[currentWeaponIndex_top]['num_top'] * restrainArr[currentWeaponIndex_top]['multiple'] * 10
let awardNum = restrainArr[currentWeaponIndex_top]['num_top'] * restrainArr[currentWeaponIndex_top]['multiple'] * 100
$('.popup-select-num .ipt-wrap input').val(restrainArr[currentWeaponIndex_top]['num_top'])
$('.popup-select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex_top]['num_top'])
$('.popup-select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex_top]['num_top'] * 100)
$('.popup-select-num .ipt-wrap p i').html(awardNum)
})
$('.popup-select-num .decrement').on('click', function () {
@@ -1389,10 +1441,10 @@ $(function () {
restrainArr[currentWeaponIndex_top]['num_top'] = 0
return
}
let awardNum = restrainArr[currentWeaponIndex_top]['num_top'] * restrainArr[currentWeaponIndex_top]['multiple'] * 10
let awardNum = restrainArr[currentWeaponIndex_top]['num_top'] * restrainArr[currentWeaponIndex_top]['multiple'] * 100
$('.popup-select-num .ipt-wrap input').val(restrainArr[currentWeaponIndex_top]['num_top'])
$('.popup-select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex_top]['num_top'])
$('.popup-select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex_top]['num_top'] * 100)
$('.popup-select-num .ipt-wrap p i').html(awardNum)
})
$('.popup-select-num .decrement-ten').on('click', function () {
@@ -1405,10 +1457,10 @@ $(function () {
restrainArr[currentWeaponIndex_top]['num_top'] = parseInt($('.popup-select-num .ipt-wrap input').val())
return
}
let awardNum = restrainArr[currentWeaponIndex_top]['num_top'] * restrainArr[currentWeaponIndex_top]['multiple'] * 10
let awardNum = restrainArr[currentWeaponIndex_top]['num_top'] * restrainArr[currentWeaponIndex_top]['multiple'] * 100
$('.popup-select-num .ipt-wrap input').val(restrainArr[currentWeaponIndex_top]['num_top'])
$('.popup-select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex_top]['num_top'])
$('.popup-select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex_top]['num_top'] * 100)
$('.popup-select-num .ipt-wrap p i').html(awardNum)
})
$('.popup-select-num input').on('input', function () {
@@ -1422,10 +1474,10 @@ $(function () {
return toastMsg('请输入数字')
}
restrainArr[currentWeaponIndex_top]['num_top'] = $(this).val() - 0
let awardNum = restrainArr[currentWeaponIndex_top]['num_top'] * restrainArr[currentWeaponIndex_top]['multiple'] * 10
let awardNum = restrainArr[currentWeaponIndex_top]['num_top'] * restrainArr[currentWeaponIndex_top]['multiple'] * 100
$('.popup-select-num .ipt-wrap input').val(restrainArr[currentWeaponIndex_top]['num_top'])
$('.popup-select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex_top]['num_top'])
$('.popup-select-num .ipt-wrap main i').html(restrainArr[currentWeaponIndex_top]['num_top'] * 100)
$('.popup-select-num .ipt-wrap p i').html(awardNum)
})
@@ -1534,13 +1586,25 @@ $(function () {
$('.no-money-recharge').on('click', function () {
if (browser.app) {
if (browser.android) {
// window.androidJsObj.openChargePage()
tools.nativeUtils.jumpAppointPage('RECHARGE_PAGE')
let channel = pubInfo.deviceInfo.channel;
console.log(pubInfo.deviceInfo);
if (channel == "google") {
window.androidJsObj.openChargePage(6);
} else {
window.androidJsObj.openChargePage(6);
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
}
} else if (browser.ios) {
window.webkit.messageHandlers.openChargePage.postMessage(null)
let channel = pubInfo.deviceInfo.channel;
if (channel == "appstore") {
window.webkit.messageHandlers.openChargePage.postMessage(null);
} else {
window.webkit.messageHandlers.chargePayClickPage.postMessage(6);
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
}
}
} else {
toastMsg('在app内打开')
toastMsg('在app內打開')
}
})
@@ -1601,14 +1665,14 @@ document.addEventListener('visibilitychange', function () {
}
})
//返回页面 重新请求接口
var hiddenProperty = 'hidden' in document ? 'hidden' :
'webkitHidden' in document ? 'webkitHidden' :
'mozHidden' in document ? 'mozHidden' : null;
// var hiddenProperty = 'hidden' in document ? 'hidden' :
// 'webkitHidden' in document ? 'webkitHidden' :
// 'mozHidden' in document ? 'mozHidden' : null;
var visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange');
var onVisibilityChange = function () {
if (!document[hiddenProperty]) {
location.reload();
}
}
document.addEventListener(visibilityChangeEvent, onVisibilityChange);
// var visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange');
// var onVisibilityChange = function () {
// if (!document[hiddenProperty]) {
// location.reload();
// }
// }
// document.addEventListener(visibilityChangeEvent, onVisibilityChange);