From e59a11c05e06ca0c4ab645de68799ec2d37cdf7a Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Thu, 27 Nov 2025 22:49:49 +0800 Subject: [PATCH] feat: page --- src/api/maomaotou/cat/index.js | 9 + src/api/maomaotou/post/index.js | 9 + src/api/maomaotou/user/index.js | 17 ++ src/router/index.js | 75 +++++++++ src/utils/index.js | 2 +- src/views/maomao/cat/cat/index.vue | 185 +++++++++++++++++++++ src/views/maomao/post/post/index.vue | 232 ++++++++++++++++++++++++++ src/views/maomao/user/chat/index.vue | 240 +++++++++++++++++++++++++++ src/views/maomao/user/user/index.vue | 210 +++++++++++++++++++++++ 9 files changed, 978 insertions(+), 1 deletion(-) create mode 100644 src/api/maomaotou/cat/index.js create mode 100644 src/api/maomaotou/post/index.js create mode 100644 src/api/maomaotou/user/index.js create mode 100644 src/views/maomao/cat/cat/index.vue create mode 100644 src/views/maomao/post/post/index.vue create mode 100644 src/views/maomao/user/chat/index.vue create mode 100644 src/views/maomao/user/user/index.vue diff --git a/src/api/maomaotou/cat/index.js b/src/api/maomaotou/cat/index.js new file mode 100644 index 0000000..647a8e5 --- /dev/null +++ b/src/api/maomaotou/cat/index.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export function getList(data) { + return request({ + url: '/management/api/maomaotou/cat/list', + method: 'get', + params: data, + }) +} diff --git a/src/api/maomaotou/post/index.js b/src/api/maomaotou/post/index.js new file mode 100644 index 0000000..98dad77 --- /dev/null +++ b/src/api/maomaotou/post/index.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export function getList(data) { + return request({ + url: '/management/api/maomaotou/post/list', + method: 'get', + params: data, + }) +} diff --git a/src/api/maomaotou/user/index.js b/src/api/maomaotou/user/index.js new file mode 100644 index 0000000..fc02551 --- /dev/null +++ b/src/api/maomaotou/user/index.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +export function getList(data) { + return request({ + url: '/management/api/maomaotou/user/list', + method: 'get', + params: data, + }) +} + +export function getChatList(data) { + return request({ + url: '/management/api/maomaotou/user/chat/list', + method: 'get', + params: data, + }) +} diff --git a/src/router/index.js b/src/router/index.js index 768a3ba..10ff993 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -48,6 +48,81 @@ 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, diff --git a/src/utils/index.js b/src/utils/index.js index a6b37c8..b04d547 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -83,7 +83,7 @@ export function formatTime(time, option) { if (option) { return parseTime(time, option) } else { - return `${time.getMonth() + 1}月${time.getDate()}日${time.getHours()}时${time.getMinutes()}分` + return `${time.getFullYear()}/${time.getMonth() + 1}/${time.getDate()} ${time.getHours()}:${time.getMinutes()}` } } diff --git a/src/views/maomao/cat/cat/index.vue b/src/views/maomao/cat/cat/index.vue new file mode 100644 index 0000000..822f39f --- /dev/null +++ b/src/views/maomao/cat/cat/index.vue @@ -0,0 +1,185 @@ + + + diff --git a/src/views/maomao/post/post/index.vue b/src/views/maomao/post/post/index.vue new file mode 100644 index 0000000..e015904 --- /dev/null +++ b/src/views/maomao/post/post/index.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/src/views/maomao/user/chat/index.vue b/src/views/maomao/user/chat/index.vue new file mode 100644 index 0000000..99e8314 --- /dev/null +++ b/src/views/maomao/user/chat/index.vue @@ -0,0 +1,240 @@ + + + + + diff --git a/src/views/maomao/user/user/index.vue b/src/views/maomao/user/user/index.vue new file mode 100644 index 0000000..7f9b805 --- /dev/null +++ b/src/views/maomao/user/user/index.vue @@ -0,0 +1,210 @@ + + + + +