diff --git a/src/components/assets/myCard.vue b/src/components/assets/myCard.vue index 8596283..54b2213 100644 --- a/src/components/assets/myCard.vue +++ b/src/components/assets/myCard.vue @@ -130,6 +130,8 @@ const cancelNft = async (val) => { } } + +const loadingDialogVisible = ref(false) // 下链使用 const lockToGame = async(type) => { 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?` }).show() if (confirmResult.errcode == 0) { - loadingDialogVisible = true + loadingDialogVisible.value = true lockToGameConfirm() } } 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?' }).show() if (confirmResult.errcode == 0) { - loadingDialogVisible = true + loadingDialogVisible.value = true lockToGameConfirm() } } @@ -159,7 +161,7 @@ const lockToGameConfirm = async () => { message.success('lockToGame success') // router.go(-1) emit('renewMyNft') - loadingDialogVisible = false + loadingDialogVisible.value = false // router.push('/assets') } catch (e) { if(e.message.indexOf('rejected') > -1) { @@ -167,7 +169,7 @@ const lockToGameConfirm = async () => { } else { message.error('lockToGame fail.') } - loadingDialogVisible = false + loadingDialogVisible.value = false } }