修复个人资产页筛选、历史记录金额显示问题
This commit is contained in:
parent
de925ce596
commit
0530906099
@ -119,7 +119,7 @@ const handleScroll = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
watch(localWalletStore,() => {
|
watch(localWalletStore,() => {
|
||||||
console.log('localWalletStore.token',localWalletStore.address,localWalletStore.token)
|
// console.log('localWalletStore.token',localWalletStore.address,localWalletStore.token)
|
||||||
if(!localWalletStore.token) {
|
if(!localWalletStore.token) {
|
||||||
nftList.value = []
|
nftList.value = []
|
||||||
} else {
|
} else {
|
||||||
|
@ -27,6 +27,7 @@ const overviewValue = ref();
|
|||||||
|
|
||||||
const overviewChild = (val) => {
|
const overviewChild = (val) => {
|
||||||
overviewValue.value = val;
|
overviewValue.value = val;
|
||||||
|
nftList.value = []
|
||||||
getHistoryList();
|
getHistoryList();
|
||||||
};
|
};
|
||||||
const myAddress = ref(localWalletStore.address);
|
const myAddress = ref(localWalletStore.address);
|
||||||
|
@ -32,6 +32,7 @@ const cursorObj = ref()
|
|||||||
|
|
||||||
const overviewChild = (val) => {
|
const overviewChild = (val) => {
|
||||||
overviewValue.value = val
|
overviewValue.value = val
|
||||||
|
nftList.value = []
|
||||||
getHistoryList()
|
getHistoryList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +79,6 @@ const getHistoryList = async () => {
|
|||||||
sub.event.decimals = _data.decimals
|
sub.event.decimals = _data.decimals
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(nftListBox)
|
|
||||||
nftList.value = nftListBox
|
nftList.value = nftListBox
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,11 +246,13 @@ export const formatPrice = (nftData) => {
|
|||||||
export const parseTradeEvent = (event) => {
|
export const parseTradeEvent = (event) => {
|
||||||
const marketplaceList = useMarketplaceStore()
|
const marketplaceList = useMarketplaceStore()
|
||||||
const payments = event.data?.details?.payment
|
const payments = event.data?.details?.payment
|
||||||
const feeList = payments?.fees || []
|
const feeList = payments?.price_including_fees || []
|
||||||
let amountBn = 0n;
|
let amountBn = BigInt(feeList)
|
||||||
for (const fee of feeList) {
|
// console.log(amountBn)
|
||||||
amountBn += BigInt(fee.amount)
|
// return
|
||||||
}
|
// for (const fee of feeList) {
|
||||||
|
// amountBn += BigInt(fee.amount)
|
||||||
|
// }
|
||||||
let address;
|
let address;
|
||||||
let icon, price, usd, currencyName;
|
let icon, price, usd, currencyName;
|
||||||
if (payments?.token?.contract_address) {
|
if (payments?.token?.contract_address) {
|
||||||
|
@ -78,7 +78,7 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.gold-img {
|
.gold-img {
|
||||||
border: 2px solid #fff;
|
border: 2px solid #655b77;
|
||||||
background: rgb(60, 50, 26);
|
background: rgb(60, 50, 26);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,11 +15,11 @@ const emit = defineEmits(['clickSortChild'])
|
|||||||
const optionValue = ref("From low to high");
|
const optionValue = ref("From low to high");
|
||||||
const options = ref([
|
const options = ref([
|
||||||
{
|
{
|
||||||
value: "-1",
|
value: "1",
|
||||||
label: "From low to high",
|
label: "From low to high",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "1",
|
value: "-1",
|
||||||
label: "From high to low",
|
label: "From high to low",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
@ -101,7 +101,6 @@ const props = defineProps({
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const chainExpolor = (urlPart) => {
|
const chainExpolor = (urlPart) => {
|
||||||
const base = currentChainCfg.explorerurl
|
const base = currentChainCfg.explorerurl
|
||||||
return `${base}/tx/${urlPart}`
|
return `${base}/tx/${urlPart}`
|
||||||
|
@ -92,7 +92,7 @@ const downloadGame = (platform) => {
|
|||||||
.overlay {
|
.overlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
// top: 204px;
|
// top: 204px;
|
||||||
bottom: -220px;
|
bottom: -250px;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -158,7 +158,7 @@ const downloadGame = (platform) => {
|
|||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
height: 90px;
|
height: 0px;
|
||||||
position: relative;
|
position: relative;
|
||||||
// transform: translate(-50%, -50%);
|
// transform: translate(-50%, -50%);
|
||||||
// display: flex;
|
// display: flex;
|
||||||
|
@ -126,6 +126,7 @@ const isClearAll = ref(false)
|
|||||||
const contentScroll = ref()
|
const contentScroll = ref()
|
||||||
|
|
||||||
const clearOverviewAll = () => {
|
const clearOverviewAll = () => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.overview = ''
|
marketplaceList.overview = ''
|
||||||
toRaw(marketplaceList.getParamsData).search.name = ''
|
toRaw(marketplaceList.getParamsData).search.name = ''
|
||||||
reqData.value.search.name = ''
|
reqData.value.search.name = ''
|
||||||
@ -135,6 +136,7 @@ const clearOverviewAll = () => {
|
|||||||
getHeroData()
|
getHeroData()
|
||||||
}
|
}
|
||||||
const overviewChild = (val) => {
|
const overviewChild = (val) => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.overview = val
|
marketplaceList.overview = val
|
||||||
toRaw(marketplaceList.getParamsData).search.name = val
|
toRaw(marketplaceList.getParamsData).search.name = val
|
||||||
reqData.value.search.name = val
|
reqData.value.search.name = val
|
||||||
@ -144,6 +146,7 @@ const overviewChild = (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const clearSortAll = () => {
|
const clearSortAll = () => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.sort = ''
|
marketplaceList.sort = ''
|
||||||
toRaw(marketplaceList.getParamsData).sort.fields[0].type = ''
|
toRaw(marketplaceList.getParamsData).sort.fields[0].type = ''
|
||||||
reqData.value.sort.fields[0].type = ''
|
reqData.value.sort.fields[0].type = ''
|
||||||
@ -153,7 +156,7 @@ const clearSortAll = () => {
|
|||||||
getHeroData()
|
getHeroData()
|
||||||
}
|
}
|
||||||
const sortChild = (val) => {
|
const sortChild = (val) => {
|
||||||
// nftList.value = []
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.sort = val
|
marketplaceList.sort = val
|
||||||
toRaw(marketplaceList.getParamsData).sort.fields[0].type = val
|
toRaw(marketplaceList.getParamsData).sort.fields[0].type = val
|
||||||
reqData.value.sort.fields[0].type = val
|
reqData.value.sort.fields[0].type = val
|
||||||
@ -165,6 +168,7 @@ const sortChild = (val) => {
|
|||||||
|
|
||||||
|
|
||||||
const clearPriceAll = () => {
|
const clearPriceAll = () => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.minPrice = ''
|
marketplaceList.minPrice = ''
|
||||||
marketplaceList.maxPrice = ''
|
marketplaceList.maxPrice = ''
|
||||||
toRaw(marketplaceList.getParamsData).filter.price_min = ''
|
toRaw(marketplaceList.getParamsData).filter.price_min = ''
|
||||||
@ -177,6 +181,7 @@ const clearPriceAll = () => {
|
|||||||
getHeroData()
|
getHeroData()
|
||||||
}
|
}
|
||||||
const priceChild = (minPrice, maxPrice) => {
|
const priceChild = (minPrice, maxPrice) => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
toRaw(marketplaceList.getParamsData).filter.price_min = minPrice ? Number(minPrice) * 1e6 : ''
|
toRaw(marketplaceList.getParamsData).filter.price_min = minPrice ? Number(minPrice) * 1e6 : ''
|
||||||
toRaw(marketplaceList.getParamsData).filter.price_max = maxPrice ? Number(maxPrice) * 1e6 : ''
|
toRaw(marketplaceList.getParamsData).filter.price_max = maxPrice ? Number(maxPrice) * 1e6 : ''
|
||||||
toRaw(reqData.value).filter.price_min = minPrice ? Number(minPrice) * 1e6 : ''
|
toRaw(reqData.value).filter.price_min = minPrice ? Number(minPrice) * 1e6 : ''
|
||||||
@ -188,6 +193,7 @@ const priceChild = (minPrice, maxPrice) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const clearHeroAll = () => {
|
const clearHeroAll = () => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.hero = []
|
marketplaceList.hero = []
|
||||||
reqData.value.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
reqData.value.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
||||||
toRaw(marketplaceList.getParamsData).filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
toRaw(marketplaceList.getParamsData).filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
||||||
@ -197,6 +203,7 @@ const clearHeroAll = () => {
|
|||||||
getHeroData()
|
getHeroData()
|
||||||
}
|
}
|
||||||
const heroChild = (val) => {
|
const heroChild = (val) => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.hero = val
|
marketplaceList.hero = val
|
||||||
reqData.value.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
reqData.value.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
||||||
toRaw(marketplaceList.getParamsData).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 = () => {
|
const clearRankAll = () => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.rank = []
|
marketplaceList.rank = []
|
||||||
reqData.value.filter.hero_ranks = []
|
reqData.value.filter.hero_ranks = []
|
||||||
toRaw(marketplaceList.getParamsData).filter.hero_ranks = []
|
toRaw(marketplaceList.getParamsData).filter.hero_ranks = []
|
||||||
@ -215,6 +223,7 @@ const clearRankAll = () => {
|
|||||||
getHeroData()
|
getHeroData()
|
||||||
}
|
}
|
||||||
const rankChild = (val) => {
|
const rankChild = (val) => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.rank = val
|
marketplaceList.rank = val
|
||||||
reqData.value.filter.hero_ranks = val
|
reqData.value.filter.hero_ranks = val
|
||||||
toRaw(marketplaceList.getParamsData).filter.hero_ranks = val
|
toRaw(marketplaceList.getParamsData).filter.hero_ranks = val
|
||||||
@ -224,6 +233,7 @@ const rankChild = (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const clearGoldAll = () => {
|
const clearGoldAll = () => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.gold = []
|
marketplaceList.gold = []
|
||||||
reqData.value.filter.item_ids.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
reqData.value.filter.item_ids.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
||||||
toRaw(marketplaceList.getParamsData).filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
toRaw(marketplaceList.getParamsData).filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
||||||
@ -232,6 +242,7 @@ const clearGoldAll = () => {
|
|||||||
getHeroData()
|
getHeroData()
|
||||||
}
|
}
|
||||||
const goldChild = (val) => {
|
const goldChild = (val) => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.gold = val
|
marketplaceList.gold = val
|
||||||
reqData.value.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
reqData.value.filter.item_ids = [...marketplaceList.gold,...marketplaceList.hero]
|
||||||
toRaw(marketplaceList.getParamsData).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 = () => {
|
const clearAll = () => {
|
||||||
|
window.scrollTo(0, 0)
|
||||||
marketplaceList.overview = ''
|
marketplaceList.overview = ''
|
||||||
marketplaceList.sort = ''
|
marketplaceList.sort = ''
|
||||||
marketplaceList.minPrice = ''
|
marketplaceList.minPrice = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user