修改弹窗

This commit is contained in:
yuyongdong 2024-07-22 16:00:34 +08:00
parent b1d6322a07
commit 92502755be
3 changed files with 36 additions and 4 deletions

View File

@ -130,6 +130,7 @@ const mintHero = async () => {
if(marketplaceStore.userGold < 0) {
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Mint Failed - Negative in-game gold balance. Please adjust your balance to continue.'
}).show()
} else {

View File

@ -172,7 +172,12 @@ const lockToGameConfirm = async () => {
try {
const bc = new BlockChain()
let res = await bc.locker.lock(toRaw(props.nftData).contract_address, [toRaw(props.nftData).token_id])
message.success('lockToGame success')
// message.success('lockToGame success')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Staking is complete. This process may take 3-4 minutes.'
}).show()
// router.go(-1)
emit('renewMyNft')
loadingDialogVisible.value = false
@ -191,7 +196,12 @@ const unlockMainConfirm = async () => {
try {
const bc = new BlockChain()
let res = await bc.locker.lockMain(toRaw(props.nftData).contract_address, [toRaw(props.nftData).token_id])
message.success('lockToGame success')
// message.success('lockToGame success')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Staking is complete. This process may take 3-4 minutes.'
}).show()
// router.go(-1)
emit('renewMyNft')
loadingDialogVisible.value = false
@ -246,6 +256,7 @@ const heroLock = async (data) => {
// message.success('Unstake success.')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Unstake success. It is expected to take 3-4 minutes. Please log in to the original wallet address to check later.'
}).show()
loadingDialogVisible.value = false
@ -254,6 +265,7 @@ const heroLock = async (data) => {
}, 2000);
}
} catch (e) {
console.log(e)
loadingDialogVisible.value = false
if(e.message.indexOf('rejected') > -1) {
message.error('User rejected the request')
@ -274,6 +286,7 @@ const founderLock = async (data) => {
// message.success('Unstake success.')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Unstake success. It is expected to take 3-4 minutes. Please log in to the original wallet address to check later.'
}).show()
loadingDialogVisible.value = false
@ -282,11 +295,14 @@ const founderLock = async (data) => {
}, 2000);
}
} catch (e) {
console.log(e);
loadingDialogVisible.value = false
if(e.message.indexOf('rejected') > -1) {
message.error('User rejected the request')
} else if (e.message.indexOf('select wallet') > -1) {
message.error('user cancel select wallet')
} else if (e.message.indexOf('eoa address changed') > -1) {
message.error("It looks like there's an issue with your MetaMask or OKX wallet address. Please check your wallet address and try again")
} else {
message.error('Unstake fail')
}

View File

@ -335,7 +335,12 @@ const lockToGame = async(type) => {
const lockToGameConfirm = async () => {
try {
await new BlockChain().locker.lock(detailData.value.nft.contract_address, [detailData.value.nft.token_id])
message.success('lockToGame success')
// message.success('lockToGame success')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Staking is complete. This process may take 3-4 minutes.'
}).show()
loadingDialogVisible.value = false
router.go(-1)
} catch (e) {
@ -351,7 +356,12 @@ const unlockMainConfirm = async () => {
try {
const bc = new BlockChain()
let res = await bc.locker.lockMain(detailData.value.nft.contract_address, [detailData.value.nft.token_id])
message.success('lockToGame success')
// message.success('lockToGame success')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Staking is complete. This process may take 3-4 minutes.'
}).show()
// router.go(-1)
emit('renewMyNft')
loadingDialogVisible.value = false
@ -392,6 +402,7 @@ const heroLock = async () => {
// message.success('Unstake success.')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Unstake success. It is expected to take 3-4 minutes. Please log in to the original wallet address to check later.'
}).show()
loadingDialogVisible.value = false
@ -420,6 +431,7 @@ const founderLock = async () => {
// message.success('Unstake success.')
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Unstake success. It is expected to take 3-4 minutes. Please log in to the original wallet address to check later.'
}).show()
loadingDialogVisible.value = false
@ -433,6 +445,8 @@ const founderLock = async () => {
message.error('User rejected the request')
} else if (e.message.indexOf('select wallet') > -1) {
message.error('user cancel select wallet')
} else if (e.message.indexOf('eoa address changed') > -1) {
message.error("It looks like there's an issue with your MetaMask or OKX wallet address. Please check your wallet address and try again")
} else {
message.error('Unstake fail')
}
@ -528,6 +542,7 @@ const mintHero = async () => {
if(marketplaceList.userGold < 0) {
const confirmResult = await createModal(ConfirmDialog, {
title: '',
noBtnTitle: '',
message: 'Mint Failed - Negative in-game gold balance. Please adjust your balance to continue.'
}).show()
} else {