From 090d49b1d7a655e451dcdd9eec51c196cb2d9ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Sun, 4 Feb 2024 14:29:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Login/components/LoginForm.vue | 284 ------------------ src/views/Login/components/LoginFormTitle.vue | 26 -- src/views/Login/components/MobileForm.vue | 225 -------------- src/views/Login/components/QrCodeForm.vue | 30 -- src/views/Login/components/RegisterForm.vue | 142 --------- src/views/Login/components/SSOLogin.vue | 199 ------------ src/views/Login/components/index.ts | 8 - src/views/Login/components/useLogin.ts | 42 --- src/views/login/login.vue | 104 ------- 9 files changed, 1060 deletions(-) delete mode 100644 src/views/Login/components/LoginForm.vue delete mode 100644 src/views/Login/components/LoginFormTitle.vue delete mode 100644 src/views/Login/components/MobileForm.vue delete mode 100644 src/views/Login/components/QrCodeForm.vue delete mode 100644 src/views/Login/components/RegisterForm.vue delete mode 100644 src/views/Login/components/SSOLogin.vue delete mode 100644 src/views/Login/components/index.ts delete mode 100644 src/views/Login/components/useLogin.ts delete mode 100644 src/views/login/login.vue diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue deleted file mode 100644 index 6c235f45a..000000000 --- a/src/views/Login/components/LoginForm.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ t('login.remember') }} - - - - {{ t('login.forgetPassword') }} - - - - - - - - - - - - - - - - - diff --git a/src/views/Login/components/LoginFormTitle.vue b/src/views/Login/components/LoginFormTitle.vue deleted file mode 100644 index cdf4facce..000000000 --- a/src/views/Login/components/LoginFormTitle.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - {{ getFormTitle }} - - - diff --git a/src/views/Login/components/MobileForm.vue b/src/views/Login/components/MobileForm.vue deleted file mode 100644 index ebb36b84e..000000000 --- a/src/views/Login/components/MobileForm.vue +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ t('login.getSmsCode') }} - - - {{ mobileCodeTimer }}秒后可重新获取 - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/Login/components/QrCodeForm.vue b/src/views/Login/components/QrCodeForm.vue deleted file mode 100644 index 31d28453e..000000000 --- a/src/views/Login/components/QrCodeForm.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - {{ t('login.qrcode') }} - - - - - - - - diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/Login/components/RegisterForm.vue deleted file mode 100644 index 23b3bd428..000000000 --- a/src/views/Login/components/RegisterForm.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/Login/components/SSOLogin.vue b/src/views/Login/components/SSOLogin.vue deleted file mode 100644 index f31ab0e5f..000000000 --- a/src/views/Login/components/SSOLogin.vue +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - 此第三方应用请求获得以下权限: - - - - {{ formatScope(scope) }} - - - - - - - 同意授权 - 授 权 中... - - 拒绝 - - - - - - diff --git a/src/views/Login/components/index.ts b/src/views/Login/components/index.ts deleted file mode 100644 index 204ad73d0..000000000 --- a/src/views/Login/components/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -import LoginForm from './LoginForm.vue' -import MobileForm from './MobileForm.vue' -import LoginFormTitle from './LoginFormTitle.vue' -import RegisterForm from './RegisterForm.vue' -import QrCodeForm from './QrCodeForm.vue' -import SSOLoginVue from './SSOLogin.vue' - -export { LoginForm, MobileForm, LoginFormTitle, RegisterForm, QrCodeForm, SSOLoginVue } diff --git a/src/views/Login/components/useLogin.ts b/src/views/Login/components/useLogin.ts deleted file mode 100644 index b4a02f8f1..000000000 --- a/src/views/Login/components/useLogin.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Ref } from 'vue' - -export enum LoginStateEnum { - LOGIN, - REGISTER, - RESET_PASSWORD, - MOBILE, - QR_CODE, - SSO -} - -const currentState = ref(LoginStateEnum.LOGIN) - -export function useLoginState() { - function setLoginState(state: LoginStateEnum) { - currentState.value = state - } - const getLoginState = computed(() => currentState.value) - - function handleBackLogin() { - setLoginState(LoginStateEnum.LOGIN) - } - - return { - setLoginState, - getLoginState, - handleBackLogin - } -} - -export function useFormValid(formRef: Ref) { - async function validForm() { - const form = unref(formRef) - if (!form) return - const data = await form.validate() - return data as T - } - - return { - validForm - } -} diff --git a/src/views/login/login.vue b/src/views/login/login.vue deleted file mode 100644 index a0025ab66..000000000 --- a/src/views/login/login.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - {{ underlineToHump(appStore.getTitle) }} - - - - - - {{ t('login.welcome') }} - - {{ t('login.message') }} - - - - - - - - - - {{ underlineToHump(appStore.getTitle) }} - - - - - - - - - - - - - - - - - - - - - - - - - - - -