修复个人资产下链loading弹窗没拉起来

This commit is contained in:
yuyongdong 2024-07-10 16:58:38 +08:00
parent 6429156822
commit d870ccfcc4

View File

@ -130,6 +130,8 @@ const cancelNft = async (val) => {
} }
} }
const loadingDialogVisible = ref(false)
// 使 // 使
const lockToGame = async(type) => { const lockToGame = async(type) => {
if(type == 'redeem') { if(type == 'redeem') {
@ -138,7 +140,7 @@ const lockToGame = async(type) => {
message: `Redeem ${props.nftData.detail.gold_coins} Gold to your game account. Do you wish to proceed?` message: `Redeem ${props.nftData.detail.gold_coins} Gold to your game account. Do you wish to proceed?`
}).show() }).show()
if (confirmResult.errcode == 0) { if (confirmResult.errcode == 0) {
loadingDialogVisible = true loadingDialogVisible.value = true
lockToGameConfirm() lockToGameConfirm()
} }
} else if(type == 'convert') { } else if(type == 'convert') {
@ -147,7 +149,7 @@ const lockToGame = async(type) => {
message: 'After converting, you will be able to use the hero in the game. At the end of Season 1, the hero will automatically be returned to your wallet or Immutable Passport. Do you want to proceed?' message: 'After converting, you will be able to use the hero in the game. At the end of Season 1, the hero will automatically be returned to your wallet or Immutable Passport. Do you want to proceed?'
}).show() }).show()
if (confirmResult.errcode == 0) { if (confirmResult.errcode == 0) {
loadingDialogVisible = true loadingDialogVisible.value = true
lockToGameConfirm() lockToGameConfirm()
} }
} }
@ -159,7 +161,7 @@ const lockToGameConfirm = async () => {
message.success('lockToGame success') message.success('lockToGame success')
// router.go(-1) // router.go(-1)
emit('renewMyNft') emit('renewMyNft')
loadingDialogVisible = false loadingDialogVisible.value = false
// router.push('/assets') // router.push('/assets')
} catch (e) { } catch (e) {
if(e.message.indexOf('rejected') > -1) { if(e.message.indexOf('rejected') > -1) {
@ -167,7 +169,7 @@ const lockToGameConfirm = async () => {
} else { } else {
message.error('lockToGame fail.') message.error('lockToGame fail.')
} }
loadingDialogVisible = false loadingDialogVisible.value = false
} }
} }