From fbff879504e8b06b1a79d1409fb424c657d7c73a Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 7 Apr 2023 10:15:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84SSO=E5=8D=95=E7=82=B9?= =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit e22363d061eb31214bf2b8c8e0902a5d50952aba) --- src/api/login/index.ts | 13 ++++++-- src/views/Login/Login.vue | 33 ++++++-------------- src/views/Login/components/LoginForm.vue | 1 - src/views/Login/components/SSOLogin.vue | 38 +++++++++++++++--------- 4 files changed, 43 insertions(+), 42 deletions(-) diff --git a/src/api/login/index.ts b/src/api/login/index.ts index bc60e8c9..07d08370 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -76,7 +76,14 @@ export const reqCheckApi = (data) => { } // ========== OAUTH 2.0 相关 ========== - +export type scopesType = string[] +export interface paramsType { + responseType: string + clientId: string + redirectUri: string + state: string + scopes: scopesType +} export const getAuthorize = (clientId) => { return request.get({ url: '/system/oauth2/authorize?clientId=' + clientId }) } @@ -87,8 +94,8 @@ export function authorize( redirectUri: string, state: string, autoApprove: boolean, - checkedScopes: any, - uncheckedScopes: any + checkedScopes: scopesType, + uncheckedScopes: scopesType ) { // 构建 scopes const scopes = {} diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index 4bd9ff90..a0186ab7 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -9,19 +9,19 @@ >
- + {{ underlineToHump(appStore.getTitle) }}
- -
{{ t('login.welcome') }}
-
+ +
{{ t('login.welcome') }}
+
{{ t('login.message') }}
@@ -31,7 +31,7 @@
- + {{ underlineToHump(appStore.getTitle) }}
@@ -52,18 +52,15 @@ - - + +
-