diff --git a/src/components/Dialogs/sellDialog.vue b/src/components/Dialogs/sellDialog.vue index bf2e3c4..78c53eb 100644 --- a/src/components/Dialogs/sellDialog.vue +++ b/src/components/Dialogs/sellDialog.vue @@ -183,7 +183,7 @@ const sellConfirm = async () => { contractAddress: props.sellDataArr.contract_address, tokenId: props.sellDataArr.token_id, currencyAddress: currency, - currencyAmount: ethers.utils.parseEther(totalPrice(priceValue.value)).toString(), + currencyAmount: ethers.utils.parseEther(priceValue.value).toString(), orderExpiry: orderData, }; console.log(data) diff --git a/src/components/assets/myCard.vue b/src/components/assets/myCard.vue index f87bd3f..3af3ed1 100644 --- a/src/components/assets/myCard.vue +++ b/src/components/assets/myCard.vue @@ -18,7 +18,7 @@ {{ nftPrice }} - 图片 +
@@ -51,6 +51,7 @@ import {createModal} from "@/utils/model.util"; import ConfirmDialog from "@/components/Dialogs/confirmDialog.vue" import { timeFormat } from "@/configs/priceCalculate" const emit = defineEmits(['renewMyNft']) +import {formatPrice} from "@/components/chain/utils" import { useRouter } from "vue-router"; import { BlockChain } from "@/components/chain/BlockChain" @@ -159,14 +160,17 @@ 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 + console.log(nftData) + if (nftData?.event?.data) { + const data = formatPrice(nftData?.event?.data) + icon.value = data.icon + nftPrice.value = data.tokenAmount } + }