From 4275f1840c3bd77612b094e42cd4c555115726e1 Mon Sep 17 00:00:00 2001 From: xiaowang Date: Thu, 26 Feb 2026 14:20:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E7=AE=A1=E7=90=86=E5=88=9D?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/src/api/admin.ts | 6 +- Frontend/src/api/shop.ts | 7 +- Frontend/src/router/index.ts | 6 + Frontend/src/views/ProfileView.vue | 11 +- Frontend/src/views/admin/ShopsView.vue | 209 ++++++++++++++++-- .../xiaowang/yuminailcore/dto/ShopDTO.java | 4 +- .../xiaowang/yuminailcore/entity/ShopDO.java | 6 +- .../service/impl/ShopServiceImpl.java | 10 +- .../com/xiaowang/yuminailcore/vo/ShopVO.java | 8 +- 9 files changed, 230 insertions(+), 37 deletions(-) diff --git a/Frontend/src/api/admin.ts b/Frontend/src/api/admin.ts index a073e1b0..a656b805 100644 --- a/Frontend/src/api/admin.ts +++ b/Frontend/src/api/admin.ts @@ -174,8 +174,8 @@ export interface Shop { description: string address: string businessHours: string - coverImageFileId: string - coverImageUrl?: string + imageFileIds: string + imageUrls?: string[] createTime: string updateTime: string } @@ -192,7 +192,7 @@ export interface CreateShopRequest { description: string address: string businessHours: string - coverImageFileId: string + imageFileIds: string } export const adminShopApi = { diff --git a/Frontend/src/api/shop.ts b/Frontend/src/api/shop.ts index 351285f8..833a1524 100644 --- a/Frontend/src/api/shop.ts +++ b/Frontend/src/api/shop.ts @@ -2,13 +2,12 @@ import api from './index' export interface ShopVO { id: number - name: string + shopName: string description: string - image: string - phone: string address: string businessHours: string - status: number + imageFileIds: string + imageUrls?: string[] createTime: string updateTime: string } diff --git a/Frontend/src/router/index.ts b/Frontend/src/router/index.ts index 5b8034bd..5c3483fe 100644 --- a/Frontend/src/router/index.ts +++ b/Frontend/src/router/index.ts @@ -39,6 +39,12 @@ const router = createRouter({ component: () => import('../views/ProfileView.vue'), meta: { requiresAuth: true, isAdmin: false } }, + { + path: '/shop/:id', + name: 'shop-detail', + component: () => import('../views/ShopDetailView.vue'), + meta: { requiresAuth: true, isAdmin: false } + }, { path: '/wishlist', name: 'wishlist', diff --git a/Frontend/src/views/ProfileView.vue b/Frontend/src/views/ProfileView.vue index 7a433440..6f806112 100644 --- a/Frontend/src/views/ProfileView.vue +++ b/Frontend/src/views/ProfileView.vue @@ -20,7 +20,7 @@
-
+
@@ -401,6 +401,15 @@ const handleSettingsClick = () => { router.push('/settings') } +const handleShopClick = () => { + console.log('店铺信息被点击') + if (userInfo.value.shopId) { + router.push(`/shop/${userInfo.value.shopId}`) + } else { + message.error('店铺信息不完整') + } +} + onMounted(() => { fetchUserInfo() fetchUserPermissions() diff --git a/Frontend/src/views/admin/ShopsView.vue b/Frontend/src/views/admin/ShopsView.vue index a779e893..5dc4babb 100644 --- a/Frontend/src/views/admin/ShopsView.vue +++ b/Frontend/src/views/admin/ShopsView.vue @@ -30,12 +30,25 @@ >