diff --git a/src/components/assets/collectibles.vue b/src/components/assets/collectibles.vue index cb0a46b..b7e2e1b 100644 --- a/src/components/assets/collectibles.vue +++ b/src/components/assets/collectibles.vue @@ -63,8 +63,8 @@ const statusChild = (val) => { // 更新数据 const renewMyNft = async() => { let timer = setTimeout(() => { - // getMyAssets() - location.reload() + getMyAssets() + // location.reload() clearTimeout(timer); }, 2000); } @@ -81,8 +81,22 @@ const getMyAssets = async () => { } if(myADdress) { try { + let nftListBox let res = await apiAssetsState(myADdress, data) - nftList.value = Array.from(new Set([...res.rows, ...nftList.value].map(JSON.stringify))).map(JSON.parse); + // nftList.value = Array.from(new Set([...res.rows, ...nftList.value].map(JSON.stringify))).map(JSON.parse); + nftList.value = [...res.rows, ...nftList.value] + // console.log(toRaw(nftList.value)) + // debugger + nftListBox = nftList.value.reduce((acc, obj) => { + // console.log(acc,obj) + const existingObj = acc.find(item => item.token_id == obj.token_id) + if(!existingObj) { + acc.push(obj) + } + return acc + },[]) + nftList.value = nftListBox + // console.log(nftListBox) marketplaceStore.cursorObj = res.page next_cursor.value = res.page.next_cursor } catch(e) { diff --git a/src/components/home/HomeFooter.vue b/src/components/home/HomeFooter.vue index c1464cf..d812d2b 100644 --- a/src/components/home/HomeFooter.vue +++ b/src/components/home/HomeFooter.vue @@ -17,7 +17,7 @@
@@ -27,7 +27,7 @@