|
@@ -1,82 +1,85 @@
|
|
|
<template>
|
|
|
<div class="login">
|
|
|
- <el-form
|
|
|
- ref="loginForm"
|
|
|
- :model="loginForm"
|
|
|
- :rules="loginRules"
|
|
|
- class="login-form"
|
|
|
- >
|
|
|
- <h3 class="title">争锋科技管理系统</h3>
|
|
|
- <el-form-item prop="username">
|
|
|
- <el-input
|
|
|
- v-model="loginForm.username"
|
|
|
- type="text"
|
|
|
- auto-complete="off"
|
|
|
- placeholder="账号"
|
|
|
- >
|
|
|
- <svg-icon
|
|
|
- slot="prefix"
|
|
|
- icon-class="user"
|
|
|
- class="el-input__icon input-icon"
|
|
|
- />
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="password">
|
|
|
- <el-input
|
|
|
- v-model="loginForm.password"
|
|
|
- type="password"
|
|
|
- auto-complete="off"
|
|
|
- placeholder="密码"
|
|
|
- @keyup.enter.native="handleLogin"
|
|
|
- >
|
|
|
- <svg-icon
|
|
|
- slot="prefix"
|
|
|
- icon-class="password"
|
|
|
- class="el-input__icon input-icon"
|
|
|
- />
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="code" v-if="captchaEnabled">
|
|
|
- <el-input
|
|
|
- v-model="loginForm.code"
|
|
|
- auto-complete="off"
|
|
|
- placeholder="验证码"
|
|
|
- style="width: 63%"
|
|
|
- @keyup.enter.native="handleLogin"
|
|
|
- >
|
|
|
- <svg-icon
|
|
|
- slot="prefix"
|
|
|
- icon-class="validCode"
|
|
|
- class="el-input__icon input-icon"
|
|
|
- />
|
|
|
- </el-input>
|
|
|
- <div class="login-code">
|
|
|
- <img :src="codeUrl" @click="getCode" class="login-code-img" />
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-checkbox
|
|
|
- v-model="loginForm.rememberMe"
|
|
|
- style="margin: 0px 0px 25px 0px"
|
|
|
- >记住密码</el-checkbox
|
|
|
+ <div class="loginBox">
|
|
|
+ <el-form
|
|
|
+ ref="loginForm"
|
|
|
+ :model="loginForm"
|
|
|
+ :rules="loginRules"
|
|
|
+ class="login-form"
|
|
|
>
|
|
|
- <el-form-item style="width: 100%">
|
|
|
- <el-button
|
|
|
- :loading="loading"
|
|
|
- size="medium"
|
|
|
- type="primary"
|
|
|
- style="width: 100%"
|
|
|
- @click.native.prevent="handleLogin"
|
|
|
- >
|
|
|
- <span v-if="!loading">登 录</span>
|
|
|
- <span v-else>登 录 中...</span>
|
|
|
- </el-button>
|
|
|
- <div style="float: right" v-if="register">
|
|
|
- <router-link class="link-type" :to="'/register'"
|
|
|
- >立即注册</router-link
|
|
|
+ <el-form-item prop="username">
|
|
|
+ <el-input
|
|
|
+ v-model="loginForm.username"
|
|
|
+ type="text"
|
|
|
+ auto-complete="off"
|
|
|
+ placeholder="账号"
|
|
|
+ >
|
|
|
+ <svg-icon
|
|
|
+ slot="prefix"
|
|
|
+ icon-class="user"
|
|
|
+ class="el-input__icon input-icon"
|
|
|
+ />
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="password">
|
|
|
+ <el-input
|
|
|
+ v-model="loginForm.password"
|
|
|
+ type="password"
|
|
|
+ auto-complete="off"
|
|
|
+ placeholder="密码"
|
|
|
+ @keyup.enter.native="handleLogin"
|
|
|
+ >
|
|
|
+ <svg-icon
|
|
|
+ slot="prefix"
|
|
|
+ icon-class="password"
|
|
|
+ class="el-input__icon input-icon"
|
|
|
+ />
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="code" v-if="captchaEnabled">
|
|
|
+ <el-input
|
|
|
+ v-model="loginForm.code"
|
|
|
+ auto-complete="off"
|
|
|
+ placeholder="验证码"
|
|
|
+ style="width: 63%"
|
|
|
+ @keyup.enter.native="handleLogin"
|
|
|
>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <svg-icon
|
|
|
+ slot="prefix"
|
|
|
+ icon-class="validCode"
|
|
|
+ class="el-input__icon input-icon"
|
|
|
+ />
|
|
|
+ </el-input>
|
|
|
+ <div class="login-code">
|
|
|
+ <img :src="codeUrl" @click="getCode" class="login-code-img" />
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="width: 100%">
|
|
|
+ <el-button
|
|
|
+ :loading="loading"
|
|
|
+ size="medium"
|
|
|
+ type="primary"
|
|
|
+ style="width: 100%"
|
|
|
+ @click.native.prevent="handleLogin"
|
|
|
+ >
|
|
|
+ <span v-if="!loading">登 录</span>
|
|
|
+ <span v-else>登 录 中...</span>
|
|
|
+ </el-button>
|
|
|
+ <div style="float: right" v-if="register">
|
|
|
+ <router-link class="link-type" :to="'/register'"
|
|
|
+ >立即注册</router-link
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-divider>
|
|
|
+ <!-- 欢迎登录争锋后台系统 -->
|
|
|
+ <span class="title">欢迎登录争锋后台系统</span>
|
|
|
+ </el-divider>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- 底部 -->
|
|
|
<div class="el-login-footer">
|
|
|
<span>南京争锋信息科技有限公司 All rights Reserved</span>
|
|
@@ -100,8 +103,8 @@ export default {
|
|
|
return {
|
|
|
codeUrl: "",
|
|
|
loginForm: {
|
|
|
- username: "admin",
|
|
|
- password: "admin123",
|
|
|
+ username: "",
|
|
|
+ password: "",
|
|
|
rememberMe: false,
|
|
|
code: "",
|
|
|
uuid: "",
|
|
@@ -195,23 +198,30 @@ export default {
|
|
|
<style rel="stylesheet/scss" lang="scss">
|
|
|
.login {
|
|
|
display: flex;
|
|
|
- justify-content: center;
|
|
|
+ justify-content: flex-end;
|
|
|
align-items: center;
|
|
|
height: 100%;
|
|
|
- background-image: url("../assets/images/login-background.jpg");
|
|
|
+ background-image: url("../assets/images/login-background.png");
|
|
|
background-size: cover;
|
|
|
}
|
|
|
.title {
|
|
|
- margin: 0px auto 30px auto;
|
|
|
- text-align: center;
|
|
|
color: #707070;
|
|
|
+ font-size: 12px;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
|
|
|
-.login-form {
|
|
|
- border-radius: 6px;
|
|
|
+.loginBox {
|
|
|
+ border-radius: 20px;
|
|
|
background: #ffffff;
|
|
|
width: 400px;
|
|
|
- padding: 25px 25px 5px 25px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ padding-top: 50px;
|
|
|
+ margin-right: 20%;
|
|
|
+}
|
|
|
+.login-form {
|
|
|
+ width: 88%;
|
|
|
.el-input {
|
|
|
height: 38px;
|
|
|
input {
|
|
@@ -224,6 +234,15 @@ export default {
|
|
|
margin-left: 2px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+@media (max-width: 1280px) {
|
|
|
+ .loginBox {
|
|
|
+ width: 360px;
|
|
|
+ margin-right: 10%;
|
|
|
+ padding-top: 40px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
.login-tip {
|
|
|
font-size: 13px;
|
|
|
text-align: center;
|
|
@@ -245,7 +264,7 @@ export default {
|
|
|
bottom: 0;
|
|
|
width: 100%;
|
|
|
text-align: center;
|
|
|
- color: #fff;
|
|
|
+ color: #707070;
|
|
|
font-family: Arial;
|
|
|
font-size: 12px;
|
|
|
letter-spacing: 1px;
|