From 05309060997a8a21a9843c2b03304c0325c8df5f Mon Sep 17 00:00:00 2001 From: yuyongdong Date: Tue, 9 Jul 2024 11:24:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=AA=E4=BA=BA=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E9=A1=B5=E7=AD=9B=E9=80=89=E3=80=81=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E9=87=91=E9=A2=9D=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/assets/collectibles.vue | 2 +- src/components/assets/hanging.vue | 1 + src/components/assets/trading.vue | 2 +- src/components/chain/utils.js | 12 +++++++----- src/components/common/imgCard.vue | 2 +- src/components/common/searchView/Sort.vue | 4 ++-- src/components/common/tradingCard.vue | 1 - src/components/home/banner.vue | 4 ++-- src/components/marketplace/mktContent.vue | 14 +++++++++++++- 9 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/components/assets/collectibles.vue b/src/components/assets/collectibles.vue index 78de06b..ab2c874 100644 --- a/src/components/assets/collectibles.vue +++ b/src/components/assets/collectibles.vue @@ -119,7 +119,7 @@ const handleScroll = () => { } watch(localWalletStore,() => { - console.log('localWalletStore.token',localWalletStore.address,localWalletStore.token) + // console.log('localWalletStore.token',localWalletStore.address,localWalletStore.token) if(!localWalletStore.token) { nftList.value = [] } else { diff --git a/src/components/assets/hanging.vue b/src/components/assets/hanging.vue index 8e4775c..b5ee2cb 100644 --- a/src/components/assets/hanging.vue +++ b/src/components/assets/hanging.vue @@ -27,6 +27,7 @@ const overviewValue = ref(); const overviewChild = (val) => { overviewValue.value = val; + nftList.value = [] getHistoryList(); }; const myAddress = ref(localWalletStore.address); diff --git a/src/components/assets/trading.vue b/src/components/assets/trading.vue index 12cb945..3c3ea6a 100644 --- a/src/components/assets/trading.vue +++ b/src/components/assets/trading.vue @@ -32,6 +32,7 @@ const cursorObj = ref() const overviewChild = (val) => { overviewValue.value = val + nftList.value = [] getHistoryList() } @@ -78,7 +79,6 @@ const getHistoryList = async () => { sub.event.decimals = _data.decimals } } - console.log(nftListBox) nftList.value = nftListBox } } diff --git a/src/components/chain/utils.js b/src/components/chain/utils.js index 131cf44..d0196fc 100644 --- a/src/components/chain/utils.js +++ b/src/components/chain/utils.js @@ -246,11 +246,13 @@ export const formatPrice = (nftData) => { export const parseTradeEvent = (event) => { const marketplaceList = useMarketplaceStore() const payments = event.data?.details?.payment - const feeList = payments?.fees || [] - let amountBn = 0n; - for (const fee of feeList) { - amountBn += BigInt(fee.amount) - } + const feeList = payments?.price_including_fees || [] + let amountBn = BigInt(feeList) + // console.log(amountBn) + // return + // for (const fee of feeList) { + // amountBn += BigInt(fee.amount) + // } let address; let icon, price, usd, currencyName; if (payments?.token?.contract_address) { diff --git a/src/components/common/imgCard.vue b/src/components/common/imgCard.vue index e0b6f74..f51a9bb 100644 --- a/src/components/common/imgCard.vue +++ b/src/components/common/imgCard.vue @@ -78,7 +78,7 @@ const props = defineProps({ } } .gold-img { - border: 2px solid #fff; + border: 2px solid #655b77; background: rgb(60, 50, 26); } } diff --git a/src/components/common/searchView/Sort.vue b/src/components/common/searchView/Sort.vue index dcb1b07..5018244 100644 --- a/src/components/common/searchView/Sort.vue +++ b/src/components/common/searchView/Sort.vue @@ -15,11 +15,11 @@ const emit = defineEmits(['clickSortChild']) const optionValue = ref("From low to high"); const options = ref([ { - value: "-1", + value: "1", label: "From low to high", }, { - value: "1", + value: "-1", label: "From high to low", }, ]); diff --git a/src/components/common/tradingCard.vue b/src/components/common/tradingCard.vue index a710a1e..2a33cfb 100644 --- a/src/components/common/tradingCard.vue +++ b/src/components/common/tradingCard.vue @@ -101,7 +101,6 @@ const props = defineProps({ required: true, }, }); - const chainExpolor = (urlPart) => { const base = currentChainCfg.explorerurl return `${base}/tx/${urlPart}` diff --git a/src/components/home/banner.vue b/src/components/home/banner.vue index 1a02579..8456c3e 100644 --- a/src/components/home/banner.vue +++ b/src/components/home/banner.vue @@ -92,7 +92,7 @@ const downloadGame = (platform) => { .overlay { position: absolute; // top: 204px; - bottom: -220px; + bottom: -250px; left: 0; width: 100%; height: 100%; @@ -158,7 +158,7 @@ const downloadGame = (platform) => { margin-bottom: 12px; margin-top: 20px; width: 48px; - height: 90px; + height: 0px; position: relative; // transform: translate(-50%, -50%); // display: flex; diff --git a/src/components/marketplace/mktContent.vue b/src/components/marketplace/mktContent.vue index 26c0d3a..cf70e28 100644 --- a/src/components/marketplace/mktContent.vue +++ b/src/components/marketplace/mktContent.vue @@ -126,6 +126,7 @@ const isClearAll = ref(false) const contentScroll = ref() const clearOverviewAll = () => { + window.scrollTo(0, 0) marketplaceList.overview = '' toRaw(marketplaceList.getParamsData).search.name = '' reqData.value.search.name = '' @@ -135,6 +136,7 @@ const clearOverviewAll = () => { getHeroData() } const overviewChild = (val) => { + window.scrollTo(0, 0) marketplaceList.overview = val toRaw(marketplaceList.getParamsData).search.name = val reqData.value.search.name = val @@ -144,6 +146,7 @@ const overviewChild = (val) => { } const clearSortAll = () => { + window.scrollTo(0, 0) marketplaceList.sort = '' toRaw(marketplaceList.getParamsData).sort.fields[0].type = '' reqData.value.sort.fields[0].type = '' @@ -153,7 +156,7 @@ const clearSortAll = () => { getHeroData() } const sortChild = (val) => { - // nftList.value = [] + window.scrollTo(0, 0) marketplaceList.sort = val toRaw(marketplaceList.getParamsData).sort.fields[0].type = val reqData.value.sort.fields[0].type = val @@ -165,6 +168,7 @@ const sortChild = (val) => { const clearPriceAll = () => { + window.scrollTo(0, 0) marketplaceList.minPrice = '' marketplaceList.maxPrice = '' toRaw(marketplaceList.getParamsData).filter.price_min = '' @@ -177,6 +181,7 @@ const clearPriceAll = () => { getHeroData() } const priceChild = (minPrice, maxPrice) => { + window.scrollTo(0, 0) toRaw(marketplaceList.getParamsData).filter.price_min = minPrice ? Number(minPrice) * 1e6 : '' toRaw(marketplaceList.getParamsData).filter.price_max = maxPrice ? Number(maxPrice) * 1e6 : '' toRaw(reqData.value).filter.price_min = minPrice ? Number(minPrice) * 1e6 : '' @@ -188,6 +193,7 @@ const priceChild = (minPrice, maxPrice) => { } const clearHeroAll = () => { + window.scrollTo(0, 0) marketplaceList.hero = [] reqData.value.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero] toRaw(marketplaceList.getParamsData).filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero] @@ -197,6 +203,7 @@ const clearHeroAll = () => { getHeroData() } const heroChild = (val) => { + window.scrollTo(0, 0) marketplaceList.hero = val reqData.value.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero] toRaw(marketplaceList.getParamsData).filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero] @@ -206,6 +213,7 @@ const heroChild = (val) => { } const clearRankAll = () => { + window.scrollTo(0, 0) marketplaceList.rank = [] reqData.value.filter.hero_ranks = [] toRaw(marketplaceList.getParamsData).filter.hero_ranks = [] @@ -215,6 +223,7 @@ const clearRankAll = () => { getHeroData() } const rankChild = (val) => { + window.scrollTo(0, 0) marketplaceList.rank = val reqData.value.filter.hero_ranks = val toRaw(marketplaceList.getParamsData).filter.hero_ranks = val @@ -224,6 +233,7 @@ const rankChild = (val) => { } const clearGoldAll = () => { + window.scrollTo(0, 0) marketplaceList.gold = [] reqData.value.filter.item_ids.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero] toRaw(marketplaceList.getParamsData).filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero] @@ -232,6 +242,7 @@ const clearGoldAll = () => { getHeroData() } const goldChild = (val) => { + window.scrollTo(0, 0) marketplaceList.gold = val reqData.value.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero] toRaw(marketplaceList.getParamsData).filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero] @@ -241,6 +252,7 @@ const goldChild = (val) => { } const clearAll = () => { + window.scrollTo(0, 0) marketplaceList.overview = '' marketplaceList.sort = '' marketplaceList.minPrice = ''