修复一些前端问题
This commit is contained in:
@@ -68,8 +68,8 @@ const handleBackClick = () => {
|
||||
const fetchWishlist = async () => {
|
||||
try {
|
||||
const response = await wishlistApi.getWishlist()
|
||||
wishlistItems.value = response
|
||||
await loadImageUrls(response)
|
||||
wishlistItems.value = response as WishlistItem[]
|
||||
await loadImageUrls(response as WishlistItem[])
|
||||
} catch (error) {
|
||||
console.error('获取收藏列表失败:', error)
|
||||
ElMessage.error('获取收藏列表失败')
|
||||
@@ -89,7 +89,9 @@ const loadImageUrls = async (items: WishlistItem[]) => {
|
||||
const response = await fileApi.getSignedUrl(Number(id)) as any
|
||||
imageIdCache.value[id] = response
|
||||
}
|
||||
urls.push(imageIdCache.value[id])
|
||||
if (imageIdCache.value[id]) {
|
||||
urls.push(imageIdCache.value[id] as string)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取签名链接失败:', error)
|
||||
urls.push(DEFAULT_PRODUCT_IMAGE)
|
||||
|
||||
Reference in New Issue
Block a user