From 4b9a0e8acb7e090b0ac52224f96d8d7af9f512ea Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Thu, 4 Jul 2024 05:44:26 +0800 Subject: [PATCH] bug fix: assets card price show error --- src/components/assets/myCard.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/assets/myCard.vue b/src/components/assets/myCard.vue index f87bd3f..df827ee 100644 --- a/src/components/assets/myCard.vue +++ b/src/components/assets/myCard.vue @@ -18,7 +18,7 @@ {{ nftPrice }} - 图片 +
@@ -159,14 +159,16 @@ const lockToGameConfirm = async () => { // 获取出售中价格价格 -const nftPrice = ref() +const nftPrice = ref('-') +const icon = ref('') const cardPrice = async (val) => { let nftData = await getNftData(toRaw(val)) - if(nftData.event) { - nftPrice.value = priceCalculated(nftData.event.data.buy[0].amount) - } else { - return false + if (nftData?.event?.data) { + const data = formatPrice(nftData?.event?.data) + icon.value = data.icon + nftPrice.value = data.tokenAmount } + }