fix: 修改文章
This commit is contained in:
parent
278b4e0afa
commit
dc9387a4d1
@ -104,15 +104,15 @@ export const routes = [
|
|||||||
component: () => import('@/components/edit/tinymce.vue'),
|
component: () => import('@/components/edit/tinymce.vue'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/community/editcontent',
|
path: '/community/edit',
|
||||||
name: 'editcontent',
|
name: 'EditArticle',
|
||||||
meta: { title: '修改帖子', auth: [0, 1, 2], hidden: true },
|
component: () => import('@/components/edit/EditContent'),
|
||||||
component: () => import('@/components/edit/EditContent.vue'),
|
meta: { title: '编辑文章', auth: [0, 1, 2] },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/community/pages',
|
path: '/community/pages',
|
||||||
name: 'pages',
|
name: 'pages',
|
||||||
meta: { title: '帖子详细', auth: [0, 1, 2] },
|
meta: { title: '帖子详细', auth: [0, 1, 2], hidden: true },
|
||||||
component: () => import('@/views/communtiy/pages.vue'),
|
component: () => import('@/views/communtiy/pages.vue'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -263,8 +263,12 @@ export default {
|
|||||||
this.fetchStats();
|
this.fetchStats();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
editArticle(id) {
|
editArticle(article) {
|
||||||
this.$router.push(`/article/edit/${id}`);
|
// 使用query参数格式
|
||||||
|
this.$router.push({
|
||||||
|
path: "/community/edit",
|
||||||
|
query: { id: article.articleId },
|
||||||
|
});
|
||||||
},
|
},
|
||||||
deleteItemArticle(article) {
|
deleteItemArticle(article) {
|
||||||
// 参数重命名为article
|
// 参数重命名为article
|
||||||
@ -272,7 +276,6 @@ export default {
|
|||||||
title: "提示",
|
title: "提示",
|
||||||
content: "确定要删除这篇文章吗?",
|
content: "确定要删除这篇文章吗?",
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
// 直接传递articleId作为参数
|
|
||||||
DeteleArticleById(article.articleId)
|
DeteleArticleById(article.articleId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user