注册开发

This commit is contained in:
hanchaobo
2024-04-22 18:13:09 +08:00
parent d07ba431c5
commit aef3c0f53f
2 changed files with 82 additions and 59 deletions
+7
View File
@@ -99,3 +99,10 @@ export function getIdType() {
method: 'get', method: 'get',
}) })
} }
// 获取pc端的EIDtoken
export function selectIdentityAuthenticaEIDtoken() {
return request({
url: '/identityAuthentication/selectIdentityAuthenticaEIDtoken',
method: 'post'
})
}
+44 -28
View File
@@ -13,34 +13,19 @@
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h2 class="title">用户登录</h2> <h2 class="title">用户登录</h2>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
v-model="loginForm.username"
type="text"
auto-complete="off"
placeholder="账号"
>
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
v-model="loginForm.password" @keyup.enter.native="handleLogin">
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code" v-if="captchaEnabled"> <el-form-item prop="code" v-if="captchaEnabled">
<el-input <el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
v-model="loginForm.code" @keyup.enter.native="handleLogin">
auto-complete="off"
placeholder="验证码"
style="width: 63%"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input> </el-input>
<div class="login-code"> <div class="login-code">
@@ -49,22 +34,22 @@
</el-form-item> </el-form-item>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
<el-form-item style="width:100%;"> <el-form-item style="width:100%;">
<el-button <el-button :loading="loading" size="medium" type="primary" style="width:100%;"
:loading="loading" @click.native.prevent="handleLogin">
size="medium"
type="primary"
style="width:100%;"
@click.native.prevent="handleLogin"
>
<span v-if="!loading">登 录</span> <span v-if="!loading">登 录</span>
<span v-else>登 录 中...</span> <span v-else>登 录 中...</span>
</el-button> </el-button>
<div style="float: right;" v-if="register"> <div style="float: right;" v-if="register">
<router-link class="link-type" :to="'/register'">立即注册</router-link> <router-link class="link-type" :to="'/register'">立即注册</router-link>
<!-- <el-button type="text" @click="registrationLink('/register')">立即注册</el-button> -->
</div> </div>
<!-- <div class="registerImg">
<div id="qrcodeImg"></div>
</div> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<div>Copyright © 2023 乙巢(上海)企业管理服务有限公司.</div> <div>Copyright © 2023 乙巢(上海)企业管理服务有限公司.</div>
@@ -74,8 +59,9 @@
</template> </template>
<script> <script>
import { getCodeImg } from "@/api/login"; import { getCodeImg, selectIdentityAuthenticaEIDtoken } from "@/api/login";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import QRCode from "qrcodejs2";
import { encrypt, decrypt } from '@/utils/jsencrypt' import { encrypt, decrypt } from '@/utils/jsencrypt'
export default { export default {
@@ -162,6 +148,21 @@ export default {
}); });
} }
}); });
},
registrationLink(path) {
selectIdentityAuthenticaEIDtoken().then(res => {
console.log(res)
document.getElementById("qrcodeImg").innerHTML = "";
return new QRCode("qrcodeImg", {
width: 200,
height: 200,
text: url,
colorDark: "#000",
colorLight: "#fff",
});
})
// this.$router.push(path);
console.log("注册链接")
} }
} }
}; };
@@ -173,23 +174,28 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
.leftBox { .leftBox {
width: 50%; width: 50%;
height: 90%; height: 90%;
.leftIcon { .leftIcon {
height: 20%; height: 20%;
width: 100%; width: 100%;
margin: 0% 10% 1% 15%; margin: 0% 10% 1% 15%;
.Icon { .Icon {
width: 100px; width: 100px;
height: 105px; height: 105px;
background-image: url("../assets/images/logos.png"); background-image: url("../assets/images/logos.png");
background-size: cover; background-size: cover;
} }
div { div {
font-size: 18px; font-size: 18px;
} }
} }
.leftImage { .leftImage {
width: 100%; width: 100%;
height: 90%; height: 90%;
@@ -208,6 +214,7 @@ export default {
align-items: center; align-items: center;
} }
} }
.title { .title {
margin: 0px auto 30px auto; margin: 0px auto 30px auto;
text-align: center; text-align: center;
@@ -220,32 +227,39 @@ export default {
background: #ffffff; background: #ffffff;
width: 400px; width: 400px;
padding: 25px 25px 5px 25px; padding: 25px 25px 5px 25px;
.el-input { .el-input {
height: 38px; height: 38px;
input { input {
height: 38px; height: 38px;
} }
} }
.input-icon { .input-icon {
height: 39px; height: 39px;
width: 14px; width: 14px;
margin-left: 2px; margin-left: 2px;
} }
} }
.login-tip { .login-tip {
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
color: #bfbfbf; color: #bfbfbf;
} }
.login-code { .login-code {
width: 33%; width: 33%;
height: 38px; height: 38px;
float: right; float: right;
img { img {
cursor: pointer; cursor: pointer;
vertical-align: middle; vertical-align: middle;
} }
} }
.el-login-footer { .el-login-footer {
background-color: rgb(126, 131, 135); background-color: rgb(126, 131, 135);
height: 55px; height: 55px;
@@ -258,10 +272,12 @@ export default {
font-family: Arial; font-family: Arial;
font-size: 12px; font-size: 12px;
letter-spacing: 1px; letter-spacing: 1px;
div { div {
height: 30%; height: 30%;
} }
} }
.login-code-img { .login-code-img {
height: 38px; height: 38px;
} }