Merge branch 'new-CounterFire-0704' of http://git.kingsome.cn/huangjinming/CounterFireGames into cec-claim
This commit is contained in:
commit
7d58ed97b2
@ -135,8 +135,8 @@ function hideModal(result = null) {
|
||||
background: #fec25d;
|
||||
border: 0px;
|
||||
font-family: 'Poppins';
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
font-size: 18px;
|
||||
color: #2D2738;
|
||||
border-radius:30px;
|
||||
}
|
||||
|
@ -691,36 +691,51 @@ const rechargeIncrease = async () => {
|
||||
|
||||
// 充值
|
||||
const conformBtn = async () => {
|
||||
// return
|
||||
// if(localWalletStore.walletType == 3) {
|
||||
let address = localWalletStore.address
|
||||
if(toRaw(confirmRecharge.value).price == 0) {
|
||||
message.error('Please select the amount of bricks to be recharged.')
|
||||
} else {
|
||||
loadingDialogVisible.value = true
|
||||
// getGameLog()
|
||||
// return
|
||||
let goods_num = Number(toRaw(confirmRecharge.value).goods_id) == 1006 ? Number(brickworkAmount.value) : 1
|
||||
try {
|
||||
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)
|
||||
// console.log(res)
|
||||
if(res) {
|
||||
brickworkAmount.value = 1
|
||||
priceAmount.value = 1
|
||||
activeIndex.value = 0
|
||||
await dataInfo()
|
||||
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) {
|
||||
console.log(e)
|
||||
if(e.message.indexOf('rejected') > -1) {
|
||||
message.error('Top-Up Cancelled by User')
|
||||
if(e.message.indexOf('rejected') > -1 || e.message.indexOf('reject') > -1) {
|
||||
// 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) {
|
||||
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 {
|
||||
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user