({
- password: '',
- email: ''
+ username: 'admin',
+ password: 'admin123'
})
const canRegister = ref(false)
@@ -18,7 +18,7 @@ const loading = ref(false)
const appStore = useAppStore()
const handleLogin = async () => {
- if (!loginForm.email || !loginForm.password) {
+ if (!loginForm.username || !loginForm.password) {
MessagePlugin.error('用户名或密码不能为空')
return
}
@@ -40,7 +40,7 @@ const handleLogin = async () => {
买有账号?注册新账号
-
+
diff --git a/src/router/index.ts b/src/router/index.ts
index ddbf593..595be79 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -14,6 +14,15 @@ export const asyncRoutes: RouteRecordRaw[] = [
icon: 'system-3'
}
},
+ {
+ name: 'carousal',
+ path: 'carousal',
+ component: () => import('@/pages/carousal/index.vue'),
+ meta: {
+ title: '轮播图管理',
+ icon: 'system-3'
+ }
+ },
]
const router = createRouter({
@@ -36,13 +45,13 @@ const router = createRouter({
]
})
-router.beforeEach((to, from, next) => {
- if (to.name !== 'login') {
- const appStore = useAppStore()
- appStore.isLogin ? next() : next({ name: 'login' })
- return
- }
- next()
-})
+// router.beforeEach((to, from, next) => {
+// if (to.name !== 'login') {
+// const appStore = useAppStore()
+// appStore.isLogin ? next() : next({ name: 'login' })
+// return
+// }
+// next()
+// })
export default router