From e09c056124b8007a067fe228096ce804828eb333 Mon Sep 17 00:00:00 2001 From: carolsi Date: Fri, 8 Dec 2023 15:03:16 +0800 Subject: [PATCH] feat: add login\logout --- src/App.vue | 15 ++------- src/components/AnakinHeader.vue | 51 +++++++++++++++++++---------- src/main.ts | 7 +--- src/plugins/axios/index.ts | 17 +++++++++- src/router/guards/index.ts | 14 ++++++++ src/router/index.ts | 11 ++++++- src/stores/user.ts | 41 ++++++++++++++++++++++++ src/utils/constant.ts | 2 +- src/views/RouterContent.vue | 22 +++++++++++-- src/views/login/Login.vue | 57 +++++++++++++++++++++++++++++++++ 10 files changed, 196 insertions(+), 41 deletions(-) create mode 100644 src/router/guards/index.ts create mode 100644 src/stores/user.ts create mode 100644 src/views/login/Login.vue diff --git a/src/App.vue b/src/App.vue index d2c15e4..a14d0c3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,16 +1,5 @@ - - diff --git a/src/components/AnakinHeader.vue b/src/components/AnakinHeader.vue index 7b2e83f..758641c 100644 --- a/src/components/AnakinHeader.vue +++ b/src/components/AnakinHeader.vue @@ -1,28 +1,37 @@ + diff --git a/src/views/login/Login.vue b/src/views/login/Login.vue new file mode 100644 index 0000000..aaef80b --- /dev/null +++ b/src/views/login/Login.vue @@ -0,0 +1,57 @@ + + + + +