@@ -359,7 +359,7 @@ onMounted(() => {
-
+
{{ errors.title }}
@@ -392,9 +392,9 @@ onMounted(() => {
-
+
+ placeholder="输入曲谱介绍内容" />
{{ errors.introduction }}
diff --git a/frontend/admin/src/pages/PostPage.vue b/frontend/admin/src/pages/PostPage.vue
index 057756e..aa407c6 100644
--- a/frontend/admin/src/pages/PostPage.vue
+++ b/frontend/admin/src/pages/PostPage.vue
@@ -35,7 +35,7 @@ const statusOptions = ref([
// Media types for filtering
const mediaTypeOptions = ref([
{ name: '所有类型', value: null },
- { name: '文章', value: '文章' },
+ { name: '曲谱', value: '曲谱' },
{ name: '视频', value: '视频' },
{ name: '音频', value: '音频' }
]);
@@ -92,12 +92,12 @@ const confirmDelete = (post) => {
postService.deletePost(post.id)
.then(() => {
// toast success
- toast.add({ severity: 'success', summary: '成功', detail: '文章已删除', life: 3000 });
+ toast.add({ severity: 'success', summary: '成功', detail: '曲谱已删除', life: 3000 });
fetchPosts();
})
.catch(error => {
console.error('Delete error:', error); // Debug log
- toast.add({ severity: 'error', summary: '错误', detail: '删除文章失败', life: 3000 });
+ toast.add({ severity: 'error', summary: '错误', detail: '删除曲谱失败', life: 3000 });
});
}
@@ -140,7 +140,7 @@ const fetchPosts = async () => {
total.value = response.data.total;
} catch (error) {
console.error('Fetch error:', error); // Debug log
- toast.add({ severity: 'error', summary: '错误', detail: '加载文章失败', life: 3000 });
+ toast.add({ severity: 'error', summary: '错误', detail: '加载曲谱失败', life: 3000 });
} finally {
loading.value = false;
}
@@ -173,11 +173,10 @@ onMounted(() => {
// Status badge severity mapping
const getBadgeSeverity = (status) => {
const map = {
- '已发布': 'success',
- '草稿': 'warning',
- '已下架': 'danger'
+ '发布': 'success',
+ '草稿': 'secondary',
};
- return map[status] || 'info';
+ return map[status] || 'warn';
};
// Format price to display ¥ symbol
@@ -299,7 +298,7 @@ const handleSendConfirm = async () => {