bug fix: assets card price show error
This commit is contained in:
parent
1e88d573d3
commit
4b9a0e8acb
@ -18,7 +18,7 @@
|
||||
{{ nftPrice }}
|
||||
<!-- {{cardPrice(nftData)}} -->
|
||||
</span>
|
||||
<img src="@/assets/img/marketplace/ETHicon.png" alt="图片">
|
||||
<img :src="icon" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="nftData.type == 0 && nftData.on_sale == 0" class="enabled" @click="lockToGame('redeem')">
|
||||
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user