|
@@ -1,8 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <div
|
|
|
|
- class="system-layer"
|
|
|
|
- :style="{ backgroundImage: `url('/image/Frame 208@2x.png')` }"
|
|
|
|
- >
|
|
|
|
|
|
+ <div class="system-layer" :style="{ backgroundImage: `url('/image/Frame 208@2x.png')` }">
|
|
<div class="l-content">
|
|
<div class="l-content">
|
|
<div class="login-layer">
|
|
<div class="login-layer">
|
|
<div class="content">
|
|
<div class="content">
|
|
@@ -30,72 +27,63 @@
|
|
<img class="code" src="/image/pic_camera@2x.png" />
|
|
<img class="code" src="/image/pic_camera@2x.png" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <el-form class="panel login" :model="form" @submit.stop>
|
|
|
|
- <h2>欢迎登录</h2>
|
|
|
|
- <el-form-item class="panel-form-item">
|
|
|
|
- <p class="err-info">{{ verification.phone }}</p>
|
|
|
|
- <el-input
|
|
|
|
- :maxlength="11"
|
|
|
|
- v-model.trim="form.phone"
|
|
|
|
- placeholder="手机号"
|
|
|
|
- @keydown.enter="submitClick"
|
|
|
|
- ></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item class="panel-form-item">
|
|
|
|
- <p class="err-info">{{ verification.psw }}</p>
|
|
|
|
- <el-input
|
|
|
|
- v-model="form.psw"
|
|
|
|
- :maxlength="16"
|
|
|
|
- placeholder="密码"
|
|
|
|
- :type="flag ? 'text' : 'password'"
|
|
|
|
- @keydown.enter="submitClick"
|
|
|
|
- >
|
|
|
|
- <template v-slot:suffix>
|
|
|
|
- <el-icon :size="20" @click="flag = !flag" class="icon-style">
|
|
|
|
- <View v-if="flag" />
|
|
|
|
- <Hide v-else />
|
|
|
|
- </el-icon>
|
|
|
|
- </template>
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
-
|
|
|
|
- <el-form-item class="panel-form-item" style="user-select: none">
|
|
|
|
- <DragVerify
|
|
|
|
- ref="verify"
|
|
|
|
- :class="{ passing: isPassing2 }"
|
|
|
|
- :isPassing="isPassing2"
|
|
|
|
- @passcallback="isPassing2 = true"
|
|
|
|
- handlerIcon="el-icon-d-arrow-right"
|
|
|
|
- background="#D9D9D9"
|
|
|
|
- textColor="#333333"
|
|
|
|
- successIcon="el-icon-circle-check"
|
|
|
|
- :text="isPassing2 ? '已通过验证' : '登录需要拖拽验证'"
|
|
|
|
- successText="验证通过"
|
|
|
|
- :width="400"
|
|
|
|
- >
|
|
|
|
- <template v-slot:handlerIcon>
|
|
|
|
- <el-icon
|
|
|
|
- :size="20"
|
|
|
|
- style="
|
|
|
|
|
|
+ <!-- login right panel -->
|
|
|
|
+ <template v-if="currentStatus(0)">
|
|
|
|
+ <el-form class="panel login" :model="form" @submit.stop>
|
|
|
|
+ <h2>欢迎登录</h2>
|
|
|
|
+ <el-form-item class="panel-form-item">
|
|
|
|
+ <p class="err-info">{{ verification.phone }}</p>
|
|
|
|
+ <el-input :maxlength="11" v-model.trim="form.phone" placeholder="手机号"
|
|
|
|
+ @keydown.enter="submitClick"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item class="panel-form-item">
|
|
|
|
+ <p class="err-info">{{ verification.psw }}</p>
|
|
|
|
+ <el-input v-model="form.psw" :maxlength="16" placeholder="密码" :type="flag ? 'text' : 'password'"
|
|
|
|
+ @keydown.enter="submitClick">
|
|
|
|
+ <template v-slot:suffix>
|
|
|
|
+ <el-icon :size="20" @click="flag = !flag" class="icon-style">
|
|
|
|
+ <View v-if="flag" />
|
|
|
|
+ <Hide v-else />
|
|
|
|
+ </el-icon>
|
|
|
|
+ </template>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item class="panel-form-item" style="user-select: none">
|
|
|
|
+ <DragVerify ref="verify" :class="{ passing: isPassing2 }" :isPassing="isPassing2"
|
|
|
|
+ @passcallback="isPassing2 = true" handlerIcon="el-icon-d-arrow-right" background="#D9D9D9"
|
|
|
|
+ textColor="#333333" successIcon="el-icon-circle-check" :text="isPassing2 ? '已通过验证' : '登录需要拖拽验证'"
|
|
|
|
+ successText="验证通过" :width="400">
|
|
|
|
+ <template v-slot:handlerIcon>
|
|
|
|
+ <el-icon :size="20" style="
|
|
width: 20px;
|
|
width: 20px;
|
|
display: inline-block;
|
|
display: inline-block;
|
|
line-height: 20px;
|
|
line-height: 20px;
|
|
margin-top: 8px;
|
|
margin-top: 8px;
|
|
- "
|
|
|
|
- >
|
|
|
|
- <DArrowRight v-if="!isPassing2" />
|
|
|
|
- <SuccessFilled v-else />
|
|
|
|
- </el-icon>
|
|
|
|
- </template>
|
|
|
|
- </DragVerify>
|
|
|
|
- </el-form-item>
|
|
|
|
-
|
|
|
|
- <el-form-item class="panel-form-item">
|
|
|
|
- <el-button type="primary" class="fill submit" @click="submitClick"
|
|
|
|
- >登录</el-button
|
|
|
|
- >
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
|
|
+ ">
|
|
|
|
+ <DArrowRight v-if="!isPassing2" />
|
|
|
|
+ <SuccessFilled v-else />
|
|
|
|
+ </el-icon>
|
|
|
|
+ </template>
|
|
|
|
+ </DragVerify>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item class="panel-form-item">
|
|
|
|
+ <el-button type="primary" class="fill submit" @click="submitClick">登录</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ <div class="register">
|
|
|
|
+ <span @click="handleForgetPassword"> 忘记密码</span> |
|
|
|
|
+ <span @click="handleRegister"> 单位注册</span>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="currentStatus(1)">
|
|
|
|
+ <register @done="goTologin"></register>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="currentStatus(2)">
|
|
|
|
+ <reset @done="goTologin"></reset>
|
|
|
|
+ </template>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -103,14 +91,15 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
-import { reactive, watch, ref } from "vue";
|
|
|
|
|
|
+import { reactive, watch, ref, computed } from "vue";
|
|
import { View, Hide, DArrowRight, SuccessFilled } from "@element-plus/icons-vue";
|
|
import { View, Hide, DArrowRight, SuccessFilled } from "@element-plus/icons-vue";
|
|
import { login } from "@/store/user";
|
|
import { login } from "@/store/user";
|
|
import { ElMessage } from "element-plus";
|
|
import { ElMessage } from "element-plus";
|
|
import { router } from "@/router";
|
|
import { router } from "@/router";
|
|
import qrCode from "qrcode";
|
|
import qrCode from "qrcode";
|
|
import DragVerify from "@/components/drag-verify.vue";
|
|
import DragVerify from "@/components/drag-verify.vue";
|
|
-
|
|
|
|
|
|
+import register from '@/view/register/register.vue'
|
|
|
|
+import reset from '@/view/register/reset.vue'
|
|
const PHONE = {
|
|
const PHONE = {
|
|
REG: /^1(3|4|5|6|7|8|9)\d{9}$/,
|
|
REG: /^1(3|4|5|6|7|8|9)\d{9}$/,
|
|
// REG: /^((13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\d{8})|(8){11}$/,
|
|
// REG: /^((13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\d{8})|(8){11}$/,
|
|
@@ -120,6 +109,9 @@ const PHONE = {
|
|
const flag = ref(false);
|
|
const flag = ref(false);
|
|
const verify = ref<any>();
|
|
const verify = ref<any>();
|
|
const isPassing2 = ref(false);
|
|
const isPassing2 = ref(false);
|
|
|
|
+
|
|
|
|
+const registerStatus = ref(0);
|
|
|
|
+const currentStatus = computed(() => (status: number) => status === registerStatus.value)
|
|
// 表单
|
|
// 表单
|
|
const form = reactive({
|
|
const form = reactive({
|
|
phone: import.meta.env.DEV ? "13800000001" : "",
|
|
phone: import.meta.env.DEV ? "13800000001" : "",
|
|
@@ -187,6 +179,21 @@ const submitClick = async () => {
|
|
verify.value.reset();
|
|
verify.value.reset();
|
|
isPassing2.value = false;
|
|
isPassing2.value = false;
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+// 忘记密码
|
|
|
|
+const handleForgetPassword = () => {
|
|
|
|
+ registerStatus.value = 2
|
|
|
|
+}
|
|
|
|
+// 注册
|
|
|
|
+const handleRegister = () => {
|
|
|
|
+ registerStatus.value = 1
|
|
|
|
+}
|
|
|
|
+// 业务回到login
|
|
|
|
+const goTologin = () => {
|
|
|
|
+ registerStatus.value = 0
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -194,6 +201,7 @@ const submitClick = async () => {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
+
|
|
.content {
|
|
.content {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
@@ -204,6 +212,7 @@ const submitClick = async () => {
|
|
height: 100vh;
|
|
height: 100vh;
|
|
padding: 0 50px 0 50px;
|
|
padding: 0 50px 0 50px;
|
|
}
|
|
}
|
|
|
|
+
|
|
.info {
|
|
.info {
|
|
color: #000;
|
|
color: #000;
|
|
flex: none;
|
|
flex: none;
|
|
@@ -218,10 +227,12 @@ const submitClick = async () => {
|
|
|
|
|
|
.top {
|
|
.top {
|
|
margin-top: 50px;
|
|
margin-top: 50px;
|
|
|
|
+
|
|
img {
|
|
img {
|
|
width: 142px;
|
|
width: 142px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.bottom {
|
|
.bottom {
|
|
height: 470px;
|
|
height: 470px;
|
|
display: flex;
|
|
display: flex;
|
|
@@ -257,13 +268,16 @@ const submitClick = async () => {
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.e-code {
|
|
.e-code {
|
|
width: 128px;
|
|
width: 128px;
|
|
margin-top: 13px;
|
|
margin-top: 13px;
|
|
position: relative;
|
|
position: relative;
|
|
- > img {
|
|
|
|
|
|
+
|
|
|
|
+ >img {
|
|
width: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
+
|
|
.e-logo {
|
|
.e-logo {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 50%;
|
|
top: 50%;
|
|
@@ -274,6 +288,7 @@ const submitClick = async () => {
|
|
padding: 7px;
|
|
padding: 7px;
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
text-align: center;
|
|
text-align: center;
|
|
|
|
+
|
|
img {
|
|
img {
|
|
height: 100%;
|
|
height: 100%;
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -281,6 +296,7 @@ const submitClick = async () => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
p:last-child {
|
|
p:last-child {
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
@@ -291,15 +307,18 @@ const submitClick = async () => {
|
|
|
|
|
|
.center {
|
|
.center {
|
|
text-align: center;
|
|
text-align: center;
|
|
|
|
+
|
|
h1 {
|
|
h1 {
|
|
color: #781c0b;
|
|
color: #781c0b;
|
|
font-size: 48px;
|
|
font-size: 48px;
|
|
line-height: 3.7rem;
|
|
line-height: 3.7rem;
|
|
margin-bottom: 0.7rem;
|
|
margin-bottom: 0.7rem;
|
|
}
|
|
}
|
|
|
|
+
|
|
p {
|
|
p {
|
|
width: 100%;
|
|
width: 100%;
|
|
margin-top: 40px;
|
|
margin-top: 40px;
|
|
|
|
+
|
|
img {
|
|
img {
|
|
width: 320px;
|
|
width: 320px;
|
|
}
|
|
}
|
|
@@ -312,14 +331,17 @@ const submitClick = async () => {
|
|
pointer-events: none;
|
|
pointer-events: none;
|
|
height: 153px;
|
|
height: 153px;
|
|
min-width: 1200px;
|
|
min-width: 1200px;
|
|
|
|
+
|
|
img {
|
|
img {
|
|
position: absolute;
|
|
position: absolute;
|
|
right: 0;
|
|
right: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.fill {
|
|
.fill {
|
|
width: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
+
|
|
.login {
|
|
.login {
|
|
width: 400px;
|
|
width: 400px;
|
|
// padding: 40px 40px 30px;
|
|
// padding: 40px 40px 30px;
|
|
@@ -344,6 +366,7 @@ const submitClick = async () => {
|
|
.panel-form-item {
|
|
.panel-form-item {
|
|
padding-left: 0;
|
|
padding-left: 0;
|
|
padding-right: 0;
|
|
padding-right: 0;
|
|
|
|
+
|
|
.icon-style {
|
|
.icon-style {
|
|
margin-right: 14px;
|
|
margin-right: 14px;
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
@@ -379,6 +402,7 @@ const submitClick = async () => {
|
|
background: no-repeat left bottom;
|
|
background: no-repeat left bottom;
|
|
background-size: auto 100%;
|
|
background-size: auto 100%;
|
|
}
|
|
}
|
|
|
|
+
|
|
.l-content {
|
|
.l-content {
|
|
display: flex;
|
|
display: flex;
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -386,6 +410,17 @@ const submitClick = async () => {
|
|
justify-content: center;
|
|
justify-content: center;
|
|
align-items: flex-start;
|
|
align-items: flex-start;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.register {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ flex: 1;
|
|
|
|
+ justify-content: center;
|
|
|
|
+
|
|
|
|
+ span {
|
|
|
|
+ padding: 0 10px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|
|
|
|
|
|
<style>
|
|
<style>
|
|
@@ -406,10 +441,12 @@ const submitClick = async () => {
|
|
.login .code-form-item .el-input__inner {
|
|
.login .code-form-item .el-input__inner {
|
|
flex: 1;
|
|
flex: 1;
|
|
}
|
|
}
|
|
|
|
+
|
|
.login .code-form-item .el-input-group__append,
|
|
.login .code-form-item .el-input-group__append,
|
|
.login .code-form-item .el-input__inner {
|
|
.login .code-form-item .el-input__inner {
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
}
|
|
}
|
|
|
|
+
|
|
input[type="password"]::-ms-reveal {
|
|
input[type="password"]::-ms-reveal {
|
|
display: none;
|
|
display: none;
|
|
}
|
|
}
|
|
@@ -488,6 +525,7 @@ input[type="password"]::-ms-reveal {
|
|
.panel-form-item .el-form-item__label {
|
|
.panel-form-item .el-form-item__label {
|
|
line-height: 50px;
|
|
line-height: 50px;
|
|
}
|
|
}
|
|
|
|
+
|
|
.e-code img {
|
|
.e-code img {
|
|
width: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
@@ -503,4 +541,8 @@ input[type="password"]::-ms-reveal {
|
|
.drag_verify {
|
|
.drag_verify {
|
|
border: 1px solid #dcdfe6;
|
|
border: 1px solid #dcdfe6;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.register span {
|
|
|
|
+ cursor: pointer;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|