| | |
| | | <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" autocomplete="on" label-position="left"> |
| | | |
| | | <div class="title-container"> |
| | | <h3 class="title">袁曦藏酒</h3> |
| | | <h3 class="title">”项目名称“</h3> |
| | | </div> |
| | | |
| | | <el-form-item prop="username"> |
| | |
| | | type="text" |
| | | tabindex="1" |
| | | autocomplete="on" |
| | | maxlength="20" |
| | | @keyup.enter.native="handleLogin" |
| | | /> |
| | | </el-form-item> |
| | |
| | | name="password" |
| | | tabindex="2" |
| | | autocomplete="on" |
| | | maxlength="20" |
| | | @keyup.native="checkCapslock" |
| | | @blur="capsTooltip = false" |
| | | @keyup.enter.native="handleLogin" |
| | |
| | | name="safecode" |
| | | type="text" |
| | | tabindex="3" |
| | | maxlength="10" |
| | | autocomplete="off" |
| | | @keyup.enter.native="handleLogin" |
| | | /> |
| | |
| | | checkedId: '' |
| | | }, |
| | | loginRules: { |
| | | username: [{ required: true, trigger: 'change', validator: validateUsername }], |
| | | password: [{ required: true, trigger: 'change', validator: validatePassword }], |
| | | safecode: [{ required: true, trigger: 'change', validator: validateSafecode }] |
| | | username: [{ required: true, trigger: 'blur', validator: validateUsername }], |
| | | password: [{ required: true, trigger: 'blur', validator: validatePassword }], |
| | | safecode: [{ required: true, trigger: 'blur', validator: validateSafecode }] |
| | | }, |
| | | passwordType: 'password', |
| | | capsTooltip: false, |
| | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | var loginData = localStorage.getItem('loginData') |
| | | var loginData = localStorage.getItem('loginData_XXXX') |
| | | // 获取保存的账号密码 |
| | | if (loginData) this.loginForm = JSON.parse(loginData) |
| | | |
| | |
| | | username: this.loginForm.username.trim(), |
| | | password: this.loginForm.password.trim() |
| | | }) |
| | | localStorage.setItem('loginData', loginData) |
| | | localStorage.setItem('loginData_XXXX', loginData) |
| | | |
| | | // 保存用户数据 |
| | | setUserData(inf) |
| | |
| | | |
| | | /* reset element-ui css */ |
| | | .login-container { |
| | | // 背景 ↓↓↓↓↓↓↓↓↓↓ |
| | | // background: url(../../assets/imgs/loginBg.jpg) no-repeat; |
| | | // background-size: cover; |
| | | // 背景 ↑↑↑↑↑↑↑↑↑↑ |
| | | background-color: $bg; |
| | | .el-input { |
| | | display: inline-block; |
| | | height: 47px; |
| | |
| | | .login-container { |
| | | min-height: 100%; |
| | | width: 100%; |
| | | background-color: $bg; |
| | | // background-color: $bg; |
| | | overflow: hidden; |
| | | |
| | | .login-form { |
| | | position: relative; |
| | | width: 520px; |
| | | max-width: 100%; |
| | | padding: 160px 35px 0; |
| | | padding: 35px 35px 0; |
| | | margin: 0 auto; |
| | | margin-top: 160px; |
| | | overflow: hidden; |
| | | // 背景 ↓↓↓↓↓↓↓↓↓↓ |
| | | // background-color: $bg; |
| | | // opacity: .96; |
| | | // border-radius: 10px; |
| | | // box-shadow: 0px 20px 60px rgba(0,0,0,0.4), 0px 0px 150px rgba(0,0,0,0.4); |
| | | // 背景 ↑↑↑↑↑↑↑↑↑↑ |
| | | } |
| | | |
| | | .tips { |