fix: create post
This commit is contained in:
@@ -131,7 +131,7 @@ const fetchPosts = async () => {
|
||||
keyword: globalFilterValue.value
|
||||
});
|
||||
|
||||
posts.value = response.items.map(post => ({
|
||||
posts.value = response.data.items.map(post => ({
|
||||
...post,
|
||||
status: statusMap[post.status] || '未知',
|
||||
mediaTypes: getMediaTypes(post.assets),
|
||||
@@ -140,7 +140,7 @@ const fetchPosts = async () => {
|
||||
viewCount: post.views,
|
||||
likes: post.likes
|
||||
}));
|
||||
total.value = response.total;
|
||||
total.value = response.data.total;
|
||||
} catch (error) {
|
||||
console.error('Fetch error:', error); // Debug log
|
||||
toast.add({ severity: 'error', summary: '错误', detail: '加载文章失败', life: 3000 });
|
||||
|
||||
Reference in New Issue
Block a user