Merge branch 'new-CounterFire-0704' of http://git.kingsome.cn/huangjinming/CounterFireGames into cec-claim

This commit is contained in:
yuyongdong 2024-08-20 16:02:52 +08:00
commit 7d58ed97b2
2 changed files with 27 additions and 12 deletions

View File

@ -135,8 +135,8 @@ function hideModal(result = null) {
background: #fec25d; background: #fec25d;
border: 0px; border: 0px;
font-family: 'Poppins'; font-family: 'Poppins';
font-weight: 500; font-weight: 700;
font-size: 14px; font-size: 18px;
color: #2D2738; color: #2D2738;
border-radius:30px; border-radius:30px;
} }

View File

@ -691,36 +691,51 @@ const rechargeIncrease = async () => {
// //
const conformBtn = async () => { const conformBtn = async () => {
// return
// if(localWalletStore.walletType == 3) {
let address = localWalletStore.address let address = localWalletStore.address
if(toRaw(confirmRecharge.value).price == 0) { if(toRaw(confirmRecharge.value).price == 0) {
message.error('Please select the amount of bricks to be recharged.') message.error('Please select the amount of bricks to be recharged.')
} else { } else {
loadingDialogVisible.value = true loadingDialogVisible.value = true
// getGameLog()
// return
let goods_num = Number(toRaw(confirmRecharge.value).goods_id) == 1006 ? Number(brickworkAmount.value) : 1 let goods_num = Number(toRaw(confirmRecharge.value).goods_id) == 1006 ? Number(brickworkAmount.value) : 1
try { try {
const bc = new BlockChain() const bc = new BlockChain()
let res = await bc.mall.execBuyItem(Number(toRaw(confirmRecharge.value).goods_id), goods_num,toRaw(confirmRecharge.value).currency_list[0].address) let res = await bc.mall.execBuyItem(Number(toRaw(confirmRecharge.value).goods_id), goods_num,toRaw(confirmRecharge.value).currency_list[0].address)
// console.log(res)
if(res) { if(res) {
brickworkAmount.value = 1 brickworkAmount.value = 1
priceAmount.value = 1 priceAmount.value = 1
activeIndex.value = 0 activeIndex.value = 0
await dataInfo() await dataInfo()
loadingDialogVisible.value = false loadingDialogVisible.value = false
message.success('Top-Up Successful') // message.success('Top-Up Successful')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Top-Up Successful'
}).show()
} }
} catch(e) { } catch(e) {
console.log(e) console.log(e)
if(e.message.indexOf('rejected') > -1) { if(e.message.indexOf('rejected') > -1 || e.message.indexOf('reject') > -1) {
message.error('Top-Up Cancelled by User') // message.error('Top-Up Cancelled by User')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Top-Up Cancelled by User'
}).show()
} else if(e.message.indexOf('Error during transaction') > -1) { } else if(e.message.indexOf('Error during transaction') > -1) {
message.error('Top-Up Failed - Insufficient Balance') // message.error('Top-Up Failed - Insufficient Balance')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Top-Up Failed - Insufficient Balance'
}).show()
} else { } else {
message.error('Top-Up fail.') // message.error('Top-Up fail.')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Top-Up fail.'
}).show()
} }
loadingDialogVisible.value = false loadingDialogVisible.value = false
} }