diff --git a/Frontend/src/router/index.ts b/Frontend/src/router/index.ts index 96e408e7..932736ea 100644 --- a/Frontend/src/router/index.ts +++ b/Frontend/src/router/index.ts @@ -92,6 +92,12 @@ const router = createRouter({ component: () => import('../views/admin/ProductsView.vue'), meta: { requiresAuth: true, isAdmin: true, hideNav: true, permissionCode: 'product:view' } }, + { + path: 'coupons', + name: 'admin-coupons', + component: () => import('../views/admin/CouponsView.vue'), + meta: { requiresAuth: true, isAdmin: true, hideNav: true, permissionCode: 'coupon:view' } + }, { path: 'shops', name: 'admin-shops', diff --git a/Frontend/src/views/ProfileView.vue b/Frontend/src/views/ProfileView.vue index 6f806112..fc79959c 100644 --- a/Frontend/src/views/ProfileView.vue +++ b/Frontend/src/views/ProfileView.vue @@ -38,26 +38,6 @@ -
- - -
-
-
{{ groupName }}
-
- - {{ permission.permissionName }} - -
-
-
-
-
@@ -156,7 +136,7 @@ @@ -469,73 +421,6 @@ onMounted(() => { z-index: 1; } -.permissions-section { - padding: 0 15px 15px; - position: relative; - z-index: 1; -} - -.permissions-card { - border-radius: 20px; - overflow: hidden; - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); -} - -.permissions-card :deep(.ant-card-head) { - border-bottom: none; - padding: 16px 20px 12px; -} - -.card-title { - display: flex; - align-items: center; - gap: 8px; - font-size: 16px; - font-weight: 600; - color: #1a1a2e; -} - -.title-icon { - font-size: 20px; - color: #667eea; -} - -.permissions-card :deep(.ant-card-body) { - padding: 0 20px 20px; -} - -.permissions-content { - display: flex; - flex-direction: column; - gap: 16px; -} - -.permission-group { - display: flex; - flex-direction: column; - gap: 10px; -} - -.group-title { - font-size: 14px; - font-weight: 600; - color: #667eea; - margin-bottom: 4px; -} - -.permission-tags { - display: flex; - flex-wrap: wrap; - gap: 8px; -} - -.permission-tag { - font-size: 13px; - padding: 4px 12px; - border-radius: 12px; - margin: 0; -} - .profile-card { border-radius: 20px; overflow: hidden; @@ -787,4 +672,4 @@ onMounted(() => { color: white !important; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); } - + \ No newline at end of file diff --git a/Frontend/src/views/admin/AdminLayout.vue b/Frontend/src/views/admin/AdminLayout.vue index 13c8aa08..cb7850fb 100644 --- a/Frontend/src/views/admin/AdminLayout.vue +++ b/Frontend/src/views/admin/AdminLayout.vue @@ -90,7 +90,8 @@ import { HomeOutlined, SafetyCertificateOutlined, DownOutlined, - LogoutOutlined + LogoutOutlined, + GiftOutlined } from '@ant-design/icons-vue' import { message, Modal } from 'ant-design-vue' import { userApi, type UserVO, adminAuthApi } from '@/api/admin' @@ -129,6 +130,12 @@ const menuItems = [ label: '商品管理', permissionCode: 'product:view' }, + { + key: '/admin/coupons', + icon: GiftOutlined, + label: '优惠券管理', + permissionCode: 'coupon:view' + }, { key: '/admin/shops', icon: HomeOutlined, diff --git a/Frontend/src/views/admin/HomeView.vue b/Frontend/src/views/admin/HomeView.vue index dbb7b149..6d7e095d 100644 --- a/Frontend/src/views/admin/HomeView.vue +++ b/Frontend/src/views/admin/HomeView.vue @@ -21,6 +21,28 @@ + + +
+
+
{{ groupName }}
+
+ + {{ permission.permissionName }} + +
+
+
+
+ 暂无权限信息 +
+
+