fix: make content api

This commit is contained in:
zzc
2026-02-06 14:21:14 +08:00
parent 1d3258ee0d
commit 23b0ae35af
3 changed files with 172 additions and 168 deletions

View File

@@ -243,174 +243,174 @@ export const asyncRoutes = [
},
],
},
{
path: '/maomaotou',
component: Layout,
redirect: 'noRedirect',
name: 'CxshMini',
meta: { title: '猫猫头', icon: 'cat', permissions: ['admin'] },
children: [
{
path: 'cat',
component: EmptyLayout,
alwaysShow: true,
redirect: 'noRedirect',
name: 'cat',
meta: {
title: '猫猫',
icon: 'cat',
permissions: ['admin'],
},
children: [
{
path: 'cat',
name: 'Cat',
component: () => import('@/views/maomao/cat/cat/index'),
meta: { title: '猫猫' },
},
],
},
{
path: 'post',
component: EmptyLayout,
alwaysShow: true,
redirect: 'noRedirect',
name: 'Post',
meta: {
title: '帖子',
icon: 'post',
permissions: ['admin'],
},
children: [
{
path: 'post',
name: 'Post',
component: () => import('@/views/maomao/post/post/index'),
meta: { title: '帖子' },
},
],
},
{
path: 'user',
component: EmptyLayout,
alwaysShow: true,
redirect: 'noRedirect',
name: 'User',
meta: {
title: '用户',
icon: 'user',
permissions: ['admin'],
},
children: [
{
path: 'user',
name: 'User',
component: () => import('@/views/maomao/user/user/index'),
meta: { title: '用户' },
},
{
path: 'userChat',
name: 'UserChat',
component: () => import('@/views/maomao/user/chat/index'),
meta: { title: '聊天' },
},
],
},
],
},
{
path: '/cxshMini',
component: Layout,
redirect: 'noRedirect',
name: 'CxshMini',
meta: { title: '小程序', icon: 'comment', permissions: ['admin', 'csxh_admin', 'csxh_user'] },
children: [
{
path: 'home',
component: EmptyLayout,
alwaysShow: true,
redirect: 'noRedirect',
name: 'Home',
meta: {
title: '首页',
icon: 'home',
permissions: ['admin', 'csxh_admin', 'csxh_user'],
},
children: [
{
path: 'banner',
name: 'Banner',
component: () => import('@/views/cxshMini/home/banner/index'),
meta: { title: '轮播图' },
},
{
path: 'news',
name: 'News',
component: () => import('@/views/cxshMini/home/news/index'),
meta: { title: '花絮动态' },
},
{
path: 'createNews',
name: 'CreateNews',
component: () => import('@/views/cxshMini/home/createNews/index'),
meta: { title: '新建花絮' },
},
],
},
{
path: 'anli',
component: EmptyLayout,
alwaysShow: true,
redirect: 'noRedirect',
name: 'Anli',
meta: {
title: '精彩案例',
icon: 'handshake',
permissions: ['admin', 'csxh_admin', 'csxh_user'],
},
children: [
{
path: 'article',
name: 'Article',
component: () => import('@/views/cxshMini/anli/article/index'),
meta: { title: '新建案例' },
},
{
path: 'list',
name: 'List',
component: () => import('@/views/cxshMini/anli/list/index'),
meta: { title: '案例列表' },
},
{
path: 'category',
name: 'Category',
component: () => import('@/views/cxshMini/anli/category/index'),
meta: { title: '案例分类' },
},
],
},
{
path: 'lianxi',
component: EmptyLayout,
alwaysShow: true,
redirect: 'noRedirect',
name: 'Lianxi',
meta: {
title: '联系我们',
icon: 'user-friends',
permissions: ['admin', 'csxh_admin', 'csxh_user'],
},
children: [
{
path: 'member',
name: 'Member',
component: () => import('@/views/cxshMini/lianxi/member/index'),
meta: { title: '成员' },
},
],
},
],
},
// {
// path: '/maomaotou',
// component: Layout,
// redirect: 'noRedirect',
// name: 'CxshMini',
// meta: { title: '猫猫头', icon: 'cat', permissions: ['admin'] },
// children: [
// {
// path: 'cat',
// component: EmptyLayout,
// alwaysShow: true,
// redirect: 'noRedirect',
// name: 'cat',
// meta: {
// title: '猫猫',
// icon: 'cat',
// permissions: ['admin'],
// },
// children: [
// {
// path: 'cat',
// name: 'Cat',
// component: () => import('@/views/maomao/cat/cat/index'),
// meta: { title: '猫猫' },
// },
// ],
// },
// {
// path: 'post',
// component: EmptyLayout,
// alwaysShow: true,
// redirect: 'noRedirect',
// name: 'Post',
// meta: {
// title: '帖子',
// icon: 'post',
// permissions: ['admin'],
// },
// children: [
// {
// path: 'post',
// name: 'Post',
// component: () => import('@/views/maomao/post/post/index'),
// meta: { title: '帖子' },
// },
// ],
// },
// {
// path: 'user',
// component: EmptyLayout,
// alwaysShow: true,
// redirect: 'noRedirect',
// name: 'User',
// meta: {
// title: '用户',
// icon: 'user',
// permissions: ['admin'],
// },
// children: [
// {
// path: 'user',
// name: 'User',
// component: () => import('@/views/maomao/user/user/index'),
// meta: { title: '用户' },
// },
// {
// path: 'userChat',
// name: 'UserChat',
// component: () => import('@/views/maomao/user/chat/index'),
// meta: { title: '聊天' },
// },
// ],
// },
// ],
// },
// {
// path: '/cxshMini',
// component: Layout,
// redirect: 'noRedirect',
// name: 'CxshMini',
// meta: { title: '小程序', icon: 'comment', permissions: ['admin', 'csxh_admin', 'csxh_user'] },
// children: [
// {
// path: 'home',
// component: EmptyLayout,
// alwaysShow: true,
// redirect: 'noRedirect',
// name: 'Home',
// meta: {
// title: '首页',
// icon: 'home',
// permissions: ['admin', 'csxh_admin', 'csxh_user'],
// },
// children: [
// {
// path: 'banner',
// name: 'Banner',
// component: () => import('@/views/cxshMini/home/banner/index'),
// meta: { title: '轮播图' },
// },
// {
// path: 'news',
// name: 'News',
// component: () => import('@/views/cxshMini/home/news/index'),
// meta: { title: '花絮动态' },
// },
// {
// path: 'createNews',
// name: 'CreateNews',
// component: () => import('@/views/cxshMini/home/createNews/index'),
// meta: { title: '新建花絮' },
// },
// ],
// },
// {
// path: 'anli',
// component: EmptyLayout,
// alwaysShow: true,
// redirect: 'noRedirect',
// name: 'Anli',
// meta: {
// title: '精彩案例',
// icon: 'handshake',
// permissions: ['admin', 'csxh_admin', 'csxh_user'],
// },
// children: [
// {
// path: 'article',
// name: 'Article',
// component: () => import('@/views/cxshMini/anli/article/index'),
// meta: { title: '新建案例' },
// },
// {
// path: 'list',
// name: 'List',
// component: () => import('@/views/cxshMini/anli/list/index'),
// meta: { title: '案例列表' },
// },
// {
// path: 'category',
// name: 'Category',
// component: () => import('@/views/cxshMini/anli/category/index'),
// meta: { title: '案例分类' },
// },
// ],
// },
// {
// path: 'lianxi',
// component: EmptyLayout,
// alwaysShow: true,
// redirect: 'noRedirect',
// name: 'Lianxi',
// meta: {
// title: '联系我们',
// icon: 'user-friends',
// permissions: ['admin', 'csxh_admin', 'csxh_user'],
// },
// children: [
// {
// path: 'member',
// name: 'Member',
// component: () => import('@/views/cxshMini/lianxi/member/index'),
// meta: { title: '成员' },
// },
// ],
// },
// ],
// },
/* {
path: "/test",
component: Layout,

View File

@@ -40,6 +40,8 @@
<el-select v-model="form.tag" placeholder="请选择标签" style="width: 100%">
<el-option label="最新" value="new" />
<el-option label="热门" value="hot" />
<el-option label="精选" value="featured" />
<el-option label="爆款" value="hot2" />
<el-option label="无" value="" />
</el-select>
</el-form-item>

View File

@@ -43,6 +43,8 @@
<template #default="{ row }">
<el-tag v-if="row.tag === 'new'" type="success">最新</el-tag>
<el-tag v-else-if="row.tag === 'hot'" type="danger">热门</el-tag>
<el-tag v-else-if="row.tag === 'featured'" type="info">精选</el-tag>
<el-tag v-else-if="row.tag === 'hot2'" type="warning">爆款</el-tag>
<span v-else>{{ row.tag || '--' }}</span>
</template>
</el-table-column>