feat:修改访问他人时获取光栅卡的时候不显示bug

This commit is contained in:
zerosaturation 2026-06-16 23:27:54 +08:00
parent 8ccb4e2565
commit b2c044a282

View File

@ -31,7 +31,7 @@
:skip-built-in-touch="true" :shimmer-mid-opacity="0.16"
@simulate="(x, y) => onLenticularSimulate(exhibitionAtSlot[0].id, x, y)" />
<image v-else class="card-image"
:src="exhibitionAtSlot[0].cover_url || '/static/nft/placeholder.png'" mode="aspectFill">
:src="exhibitionAtSlot[0].realCoverUrl || exhibitionAtSlot[0].cover_url || '/static/nft/placeholder.png'" mode="aspectFill">
</image>
<image class="card-frame" src="/static/square/gerenzhongxincangpinkuang.png" mode="aspectFill">
</image>
@ -67,7 +67,7 @@
:skip-built-in-touch="true" :shimmer-mid-opacity="0.16"
@simulate="(x, y) => onLenticularSimulate(exhibitionAtSlot[1].id, x, y)" />
<image v-else class="card-image"
:src="exhibitionAtSlot[1].cover_url || '/static/nft/placeholder.png'" mode="aspectFill">
:src="exhibitionAtSlot[1].realCoverUrl || exhibitionAtSlot[1].cover_url || '/static/nft/placeholder.png'" mode="aspectFill">
</image>
<image class="card-frame" src="/static/square/gerenzhongxincangpinkuang.png" mode="aspectFill">
</image>
@ -123,7 +123,7 @@
:transforms="getLikedLenticularTransforms(item.id)" :gyro-source="gyroSourceLabel"
:skip-built-in-touch="true" :shimmer-mid-opacity="0.16"
@simulate="(x, y) => onLikedLenticularSimulate(item.id, x, y)" />
<image v-else class="liked-cover" :src="item.cover_url || '/static/nft/placeholder.png'"
<image v-else class="liked-cover" :src="item.realCoverUrl || item.cover_url || '/static/nft/placeholder.png'"
mode="aspectFill"></image>
<image class="liked-cover-frame" src="/static/square/cangpinkuang1.png"
mode="aspectFill"></image>
@ -164,6 +164,7 @@
import { ref, onMounted, onUnmounted, computed } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { getUserGalleriesApi, getUserLikedAssetsApi, getAssetMaterialsApi } from '@/utils/api.js';
import { getAssetCoverRealUrl } from '@/utils/assetImageHelper.js';
import LenticularCard from '@/components/lenticular/LenticularCard.vue';
import { useLenticularCraftTiltPreview } from '@/composables/useLenticularCraftTiltPreview.js';
import { buildLenticularLayers, buildLenticularLayersTwo } from '@/utils/castloveMintForm.js';
@ -549,7 +550,7 @@ const loadExhibitedAssets = async () => {
try {
const res = await getUserGalleriesApi(userId.value);
if (res.data && res.data.slots) {
exhibitionWorks.value = res.data.slots
const mapped = res.data.slots
.filter(slot => slot.status === 'OCCUPIED' && slot.asset)
.map(slot => ({
id: slot.asset.asset_id,
@ -559,8 +560,12 @@ const loadExhibitedAssets = async () => {
name: slot.asset.name,
slot_index: slot.slot_index ?? 0,
is_lenticular: slot.asset.is_lenticular ?? false,
}))
.sort((a, b) => (a.slot_index ?? 0) - (b.slot_index ?? 0));
}));
// cover_url 访 URLOSS / URL /
for (const item of mapped) {
item.realCoverUrl = await getAssetCoverRealUrl(item.cover_url);
}
exhibitionWorks.value = mapped.sort((a, b) => (a.slot_index ?? 0) - (b.slot_index ?? 0));
//
for (const item of exhibitionWorks.value) {
@ -591,7 +596,7 @@ const loadLikedAssets = async () => {
res = await getUserLikedAssetsApi(userId.value, 1, 20);
}
if (res.data && res.data.items) {
likedWorks.value = res.data.items.map((item, index) => ({
const mapped = res.data.items.map((item, index) => ({
id: item.asset_id,
cover_url: item.cover_url,
like_count: item.like_count,
@ -602,6 +607,11 @@ const loadLikedAssets = async () => {
score: item.like_count,
reward: Math.floor(item.earnings || 0),
}));
// cover_url 访 URL
for (const item of mapped) {
item.realCoverUrl = await getAssetCoverRealUrl(item.cover_url);
}
likedWorks.value = mapped;
//
for (const item of likedWorks.value) {
@ -908,6 +918,7 @@ onUnmounted(() => {
z-index: 9;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.4);
opacity: 0.95;
/* display: none; */
}
/* 倒计时文字 */