|
@@ -1,30 +1,34 @@
|
|
<template>
|
|
<template>
|
|
- <div class="login">
|
|
|
|
|
|
+ <div class="login" :style="{backgroundImage: 'url('+backgroudImg+')'}">
|
|
|
|
+ <StarBackground />
|
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
|
- <h3 class="title">数字四平态势感知监管平台</h3>
|
|
|
|
|
|
+ <h3 class="sub-title" v-if="systemTitle.subTitle">{{systemTitle.subTitle}}</h3>
|
|
|
|
+ <h3 class="title">{{systemTitle.title}}</h3>
|
|
|
|
+
|
|
<div class="login-container">
|
|
<div class="login-container">
|
|
<h4>请登录</h4>
|
|
<h4>请登录</h4>
|
|
<el-form-item prop="username">
|
|
<el-form-item prop="username">
|
|
- <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号" class="m-b-15">
|
|
|
|
- <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon"/>
|
|
|
|
|
|
+ <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号"
|
|
|
|
+ class="m-b-15">
|
|
|
|
+ <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 v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
|
|
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
|
|
@keyup.enter.native="handleLogin" class="m-b-15">
|
|
@keyup.enter.native="handleLogin" class="m-b-15">
|
|
- <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="captchaOnOff">
|
|
<el-form-item prop="code" v-if="captchaOnOff">
|
|
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
|
|
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
|
|
@keyup.enter.native="handleLogin">
|
|
@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">
|
|
- <img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
|
|
|
|
|
+ <img :src="codeUrl" @click="getCode" class="login-code-img" />
|
|
</div>
|
|
</div>
|
|
</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 :loading="loading" size="medium" type="primary" style="width:100%;"
|
|
<el-button :loading="loading" size="medium" type="primary" style="width:100%;"
|
|
@click.native.prevent="handleLogin">
|
|
@click.native.prevent="handleLogin">
|
|
@@ -42,7 +46,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
- getCodeImg
|
|
|
|
|
|
+ getCodeImg,fontConfig
|
|
} from '@/api/login'
|
|
} from '@/api/login'
|
|
import Cookies from 'js-cookie'
|
|
import Cookies from 'js-cookie'
|
|
import {
|
|
import {
|
|
@@ -54,6 +58,12 @@
|
|
name: 'Login',
|
|
name: 'Login',
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+
|
|
|
|
+ backgroudImg:require('../../assets/images/login/login-ty.jpg'), //背景图片
|
|
|
|
+ systemTitle:{
|
|
|
|
+ title:'通榆县乡村振兴综合监管平台', //标题
|
|
|
|
+ subTitle:'数字交通' ,//副标题
|
|
|
|
+ },
|
|
codeUrl: '',
|
|
codeUrl: '',
|
|
loginForm: {
|
|
loginForm: {
|
|
username: 'admin',
|
|
username: 'admin',
|
|
@@ -98,8 +108,16 @@
|
|
created() {
|
|
created() {
|
|
this.getCode()
|
|
this.getCode()
|
|
this.getCookie()
|
|
this.getCookie()
|
|
|
|
+ this.fontConfig();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ fontConfig(){
|
|
|
|
+ fontConfig().then(res => {
|
|
|
|
+ this.systemTitle.title = res.data.fontTitle;
|
|
|
|
+ this.systemTitle.subTitle = res.data.subTitle;
|
|
|
|
+ this.backgroudImg = res.data.picUrl;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getCode() {
|
|
getCode() {
|
|
getCodeImg().then(res => {
|
|
getCodeImg().then(res => {
|
|
this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff
|
|
this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff
|