From 3660f01d001f6a1a2387c375aee6d2998a6e97e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Tue, 29 Jun 2021 18:27:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=99=BB=E5=87=BA=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 1 + src/api/system.js | 5 +++ src/main.js | 11 +---- .../header/LayoutTopHeaderAvatar.vue | 42 +++++-------------- src/pages/frame/services/accountService.js | 15 ++++--- src/pages/frame/view/login/Login.vue | 20 +++++---- src/pages/user/index.vue | 3 ++ src/router/config.js | 17 +++++++- src/utils/index.js | 3 ++ 9 files changed, 60 insertions(+), 57 deletions(-) create mode 100644 src/api/system.js create mode 100644 src/pages/user/index.vue diff --git a/src/api/index.js b/src/api/index.js index 752a133..18af1f5 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,5 +1,6 @@ import { request, METHOD } from '@/utils'; export * from './menu'; +export * from './system'; export function getUserDetailInfoApi() { return request('/api/v1/detail', METHOD.GET); diff --git a/src/api/system.js b/src/api/system.js new file mode 100644 index 0000000..c2122b6 --- /dev/null +++ b/src/api/system.js @@ -0,0 +1,5 @@ +import { putReq } from '@/utils'; + +export function logoutApi() { + return putReq('/api/v1/logout'); +} diff --git a/src/main.js b/src/main.js index 66f1194..1fac095 100644 --- a/src/main.js +++ b/src/main.js @@ -34,7 +34,7 @@ const store = new Vuex.Store({ Vue.use(Router); const isAsynRount = store.state.settingModule.asyncRoutes; const options = initRouter(isAsynRount); -const router = new Router({ mode: 'history', ...options }); +const router = new Router(options); //装载vue-i18n控件 如果语言优先级 请直接修改这里localeLang和fallbackLang Vue.use(VueI18n); @@ -64,15 +64,6 @@ loadRoutes(); // 加载路由守卫 loadGuards(guards, { router, store, i18n, message: Vue.prototype.$message }); -// this.$notification.open({ -// message: 'Notification Title', -// description: -// 'This is the content of the notification. This is the content of the notification. This is the content of the notification.', -// onClick: () => { -// console.log('Notification Clicked!'); -// }, -// }); - loadResponseInterceptor({ router }); new Vue({ diff --git a/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue b/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue index bc6f922..f869acb 100644 --- a/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue +++ b/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue @@ -1,22 +1,18 @@