From d055a11921fd464cadc49a3b5337f18ee19d2514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=89=E6=9D=A5=E6=8A=80=E6=9C=AF?= <1490493387@qq.com> Date: Fri, 26 Nov 2021 23:57:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=99=BB=E5=BD=95=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 + src/api/login/index.ts | 5 +- src/layout/components/Sidebar/SidebarItem.vue | 11 +- src/layout/components/TagsView/index.vue | 2 +- src/main.ts | 4 +- src/permission.ts | 7 +- src/store/modules/user.ts | 1 + src/utils/request.ts | 10 +- src/views/login/index.vue | 61 ++++++-- vite.config.ts | 135 +++++++++--------- 10 files changed, 141 insertions(+), 97 deletions(-) diff --git a/package.json b/package.json index 7d2c992b..8398b71b 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "dependencies": { "axios": "^0.24.0", "element-plus": "^1.2.0-beta.3", + "nprogress": "^0.2.0", + "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.0", "screenfull": "^6.0.0", "vue": "^3.2.16", diff --git a/src/api/login/index.ts b/src/api/login/index.ts index 58e39036..93d7a993 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -7,9 +7,10 @@ import request from "@utils/request"; export function login(data: object) { return request({ url: '/youlai-auth/oauth/token', + method:'post', params: data, headers: { - 'Authorization': 'Basic bWFsbC1hZG1pbi13ZWI6MTIzNDU2' // 客户端信息加密摘要认证,明文:mall-admin-web:123456 + 'Authorization': 'Basic bWFsbC1hZG1pbi13ZWI6MTIzNDU2' // 客户端信息Base64明文:mall-admin-web:123456 } }) } @@ -39,7 +40,7 @@ export function logout() { */ export function getCaptcha() { return request({ - url: '/captcha', + url: '/captcha?t='+(new Date()).getTime().toString(), method: 'get' }) } \ No newline at end of file diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 386f4c6d..23450cbb 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -10,14 +10,7 @@