修复个人资产页筛选、历史记录金额显示问题
This commit is contained in:
parent
de925ce596
commit
0530906099
@ -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 {
|
||||
|
@ -27,6 +27,7 @@ const overviewValue = ref();
|
||||
|
||||
const overviewChild = (val) => {
|
||||
overviewValue.value = val;
|
||||
nftList.value = []
|
||||
getHistoryList();
|
||||
};
|
||||
const myAddress = ref(localWalletStore.address);
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -78,7 +78,7 @@ const props = defineProps({
|
||||
}
|
||||
}
|
||||
.gold-img {
|
||||
border: 2px solid #fff;
|
||||
border: 2px solid #655b77;
|
||||
background: rgb(60, 50, 26);
|
||||
}
|
||||
}
|
||||
|
@ -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",
|
||||
},
|
||||
]);
|
||||
|
@ -101,7 +101,6 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const chainExpolor = (urlPart) => {
|
||||
const base = currentChainCfg.explorerurl
|
||||
return `${base}/tx/${urlPart}`
|
||||
|
@ -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;
|
||||
|
@ -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 = ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user