| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <%--
- Created by IntelliJ IDEA.
- User: 熊竹
- Date: 2017/3/9
- Time: 11:39
- To change this template use File | Settings | File Templates.
- --%>
- <%@ page contentType="text/html;charset=UTF-8" language="java" %>
- <html>
- <head>
- <jsp:include page="head.jsp"/>
- <title>享居屋房源管理系统</title>
- <style lang="scss" scoped>
- #login-page {
- width: 100vw;
- height: 100vh;
- display: flex;
- justify-content: center;
- align-items: center;
- background: #efeeee;
- }
- #login-page .login-form {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 500px;
- height: 445px;
- border-radius: 10px;
- background: white;
- border: 1px #eaeaea solid;
- box-shadow: 0px 0px 25px #cac6c6;
- }
- #login-page .login-form .title {
- color: #20a0ff;
- font-weight: bold;
- font-size: 40px;
- text-align: center;
- line-height: 2.2;
- font-family: sans-serif;
- }
- #login-page .login-form .input-group {
- margin-top: 30px;
- width: 80%;
- }
- #login-page .login-form .input-group button {
- width: 100%;
- }
- </style>
- </head>
- <body>
- <div id="app">
- <div id="login-page" @keyup.enter="login">
- <div class="login-form">
- <div class="input-group">
- <div class="title">享居屋房源管理系统 </div>
- <el-input
- :autofocus="true"
- placeholder="请输入用户名"
- icon="time"
- v-model="username">
- </el-input>
- </div>
- <div class="input-group">
- <el-input
- placeholder="请输入密码"
- type="password"
- icon="time"
- v-model="password">
- </el-input>
- </div>
- <div class="input-group">
- <el-input
- style="width: 280px;"
- placeholder="请输入验证码"
- icon="time"
- v-model="code">
- </el-input>
- <img style="width: 80px; float: right;" src="../auth/image" ref="img" @click="refresh">
- </div>
- <div class="input-group">
- <label>记住我?</label>
- <el-switch
- v-model="rememberMe"
- on-text=""
- off-text="">
- </el-switch>
- </div>
- <div class="input-group">
- <el-button @click.native="login" type="primary" :loading="isBtnLoading">{{btnText}}</el-button>
- </div>
- </div>
- </div>
- </div>
- </body>
- <script>
- new Vue({
- el : '#app',
- data : function () {
- return {
- username : '',
- password : '',
- code : '',
- rememberMe : false,
- isBtnLoading: false
- };
- },
- computed: {
- btnText: function () {
- if (this.isBtnLoading) return '登录中...';
- return '登录';
- }
- },
- methods : {
- login : function () {
- window.location.href = 'index';
-
- this.isBtnLoading = true;
- $.post({
- url : '../adminInfo/login',
- data: {
- userName: this.username,
- password: this.password,
- code : this.code,
- }
- }).then(function (res) {
- this.isBtnLoading = false;
- if (res.success) {
- window.location.href = 'index';
- } else {
- this.$message.error(res.error);
- }
- }.bind(this));
- },
- refresh: function () {
- this.$refs.img.src = '../auth/image' + '?' + Math.random();
- }
- }
- })
- </script>
- </html>
|