功能:完善多店铺登录与首次部署SQL

This commit is contained in:
xiaowang
2026-03-26 10:28:28 +08:00
parent 5601428087
commit 764bfadb51
79 changed files with 6524 additions and 2603 deletions
+4 -6
View File
@@ -13,19 +13,19 @@ const router = createRouter({
path: '/home',
name: 'home',
component: () => import('../views/HomeView.vue'),
meta: { requiresAuth: true, isAdmin: false }
meta: { requiresAuth: false, isAdmin: false }
},
{
path: '/products',
name: 'products',
component: () => import('../views/ProductListView.vue'),
meta: { requiresAuth: true, isAdmin: false }
meta: { requiresAuth: false, isAdmin: false }
},
{
path: '/product/:id',
name: 'product-detail',
component: () => import('../views/ProductDetailView.vue'),
meta: { requiresAuth: true, hideNav: true, isAdmin: false }
meta: { requiresAuth: false, hideNav: true, isAdmin: false }
},
{
path: '/cart',
@@ -43,7 +43,7 @@ const router = createRouter({
path: '/shop/:id',
name: 'shop-detail',
component: () => import('../views/ShopDetailView.vue'),
meta: { requiresAuth: true, hideNav: true, isAdmin: false }
meta: { requiresAuth: false, hideNav: true, isAdmin: false }
},
{
path: '/wishlist',
@@ -273,8 +273,6 @@ router.beforeEach((to, _from, next) => {
next('/')
} else if (to.path === '/' && token) {
next('/home')
} else if (to.path === '/home' && !token) {
next('/')
} else {
// 对于需要认证的页面,验证token的有效性
if (requiresAuth && token) {