From 62b9421c4f0b2c6be110ffd441d6a4bcf156769e Mon Sep 17 00:00:00 2001 From: Dragon <> Date: Wed, 13 Mar 2024 15:13:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/components/Forget.vue | 294 ++++++++++++++++++++++++++ src/views/login/components/Login.vue | 95 ++++++++- src/views/login/index.vue | 14 +- 3 files changed, 395 insertions(+), 8 deletions(-) create mode 100644 src/views/login/components/Forget.vue diff --git a/src/views/login/components/Forget.vue b/src/views/login/components/Forget.vue new file mode 100644 index 0000000..b54f447 --- /dev/null +++ b/src/views/login/components/Forget.vue @@ -0,0 +1,294 @@ + + + + + diff --git a/src/views/login/components/Login.vue b/src/views/login/components/Login.vue index 184813d..a086192 100644 --- a/src/views/login/components/Login.vue +++ b/src/views/login/components/Login.vue @@ -11,7 +11,7 @@ import { getFilter, setFilter } from '@/api/home/filter' import { getConfig } from '@/api/system/user' import { asideMap } from '@/config/aside' -const emit = defineEmits(['close']) +const emit = defineEmits(['close', 'forget']) interface FormState { enterprisecode?: string username: string @@ -35,7 +35,7 @@ const formInline: FormState = reactive({ captcha: '', }) const tab = ref(0) - +const countTime = ref('获取验证码') const rules = { enterprisecode: { required: true, message: '请输入企业编码', trigger: 'blur' }, username: { required: true, message: '请输入用户名', trigger: 'blur' }, @@ -99,7 +99,6 @@ function handleSubmit(e) { } function close() { - console.log(888) emit('close') } @@ -110,6 +109,23 @@ function switchTab(type: number) { function computedForm() { return !formInline.enterprisecode || !formInline.username || !formInline.password } + +function startCount() { + let time = 60 + countTime.value = '60s' + const timer = setInterval(() => { + countTime.value = `${--time}s` + if (time === 0) { + clearInterval(timer) + countTime.value = '重新获取' + // this.flag = false; + } + }, 1000) +} + +function forget() { + emit('forget') +} - + 登录 @@ -160,7 +176,54 @@ function computedForm() { 记住账号 -
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + 登录 + + + +
+
+ + 记住账号 + +
+
@@ -249,6 +312,8 @@ function computedForm() { height: 44px; background: linear-gradient(234deg,#96aaff 0%, #1c43ff 100%); border-radius: 3px; + margin-top: 10px; + margin-bottom: 14px; &-disabled{ opacity: 0.5; @@ -257,12 +322,30 @@ function computedForm() { } } + .img-phone{ + width: 20px; + height: 20px; + } + .order-last{ font-size: 14px; font-family: PingFang SC, PingFang SC-Regular; font-weight: Regular; color: #507afd; } + + .code{ + font-size: 15px; + font-family: PingFang SC, PingFang SC-Regular; + font-weight: Regular; + color: #507afd; + margin-left: 12px; + + &-count{ + font-size: 14px; + color: #999999; + } + } } ::v-deep(.n-form-item-feedback--error) { // color: #FF4E4F !important; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index f0760b6..b6ffe9e 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -4,6 +4,7 @@ import { useRoute, useRouter } from 'vue-router' import { useMessage } from 'naive-ui' import captcha from './captcha.vue' import Login from './components/Login.vue' +import Forget from './components/Forget.vue' import { PageEnum } from '@/enums/pageEnum' import { useUserStore } from '@/store/modules/user' import { ResultEnum } from '@/enums/httpEnum' @@ -27,6 +28,9 @@ const userStore = useUserStore() const router = useRouter() const route = useRoute() const show = ref(true) +const showForget = ref(true) +const ifLogin = ref(true) + const formInline: FormState = reactive({ enterprisecode: '三方系统标识8', username: '13311111111', @@ -99,6 +103,11 @@ function handleSubmit(e) { function showLogin() { show.value = true } + +function forget() { + show.value = false + showForget.value = true +}