|
|
@@ -14,23 +14,23 @@
|
|
|
@keyup.enter.native="submit"
|
|
|
>
|
|
|
<h4>{{ $t('login.title') }}</h4>
|
|
|
- <el-form-item prop="username">
|
|
|
+ <el-form-item prop="loginName">
|
|
|
<el-input
|
|
|
clearable
|
|
|
- v-model="form.username"
|
|
|
+ v-model="form.loginName"
|
|
|
prefix-icon="el-icon-user"
|
|
|
- :placeholder="$t('login.username')"
|
|
|
+ :placeholder="$t('login.loginName')"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="password">
|
|
|
+ <el-form-item prop="loginPwd">
|
|
|
<el-input
|
|
|
show-password
|
|
|
- v-model="form.password"
|
|
|
+ v-model="form.loginPwd"
|
|
|
prefix-icon="el-icon-lock"
|
|
|
- :placeholder="$t('login.password')"
|
|
|
+ :placeholder="$t('login.loginPwd')"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="code">
|
|
|
+ <!-- <el-form-item prop="code">
|
|
|
<div class="login-input-group">
|
|
|
<el-input
|
|
|
clearable
|
|
|
@@ -46,7 +46,7 @@
|
|
|
@click="changeCaptcha"
|
|
|
/>
|
|
|
</div>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<div class="el-form-item">
|
|
|
<el-checkbox v-model="form.remember">
|
|
|
{{ $t('login.remember') }}
|
|
|
@@ -123,10 +123,10 @@
|
|
|
loading: false,
|
|
|
// 表单数据
|
|
|
form: {
|
|
|
- username: 'admin',
|
|
|
- password: 'admin',
|
|
|
- remember: true,
|
|
|
- code: ''
|
|
|
+ loginName: 'aaa',
|
|
|
+ loginPwd: 'admin',
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:10
|
|
|
},
|
|
|
// 验证码base64数据
|
|
|
captcha: '',
|
|
|
@@ -138,18 +138,18 @@
|
|
|
// 表单验证规则
|
|
|
rules() {
|
|
|
return {
|
|
|
- username: [
|
|
|
+ loginName: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: this.$t('login.username'),
|
|
|
+ message: this.$t('login.loginName'),
|
|
|
type: 'string',
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
],
|
|
|
- password: [
|
|
|
+ loginPwd: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: this.$t('login.password'),
|
|
|
+ message: this.$t('login.loginPwd'),
|
|
|
type: 'string',
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
@@ -161,7 +161,7 @@
|
|
|
if (getToken()) {
|
|
|
this.goHome();
|
|
|
} else {
|
|
|
- this.changeCaptcha();
|
|
|
+ // this.changeCaptcha();
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -171,10 +171,10 @@
|
|
|
if (!valid) {
|
|
|
return false;
|
|
|
}
|
|
|
- if (this.form.code.toLowerCase() !== this.text) {
|
|
|
- this.$message.error('验证码错误');
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (this.form.code.toLowerCase() !== this.text) {
|
|
|
+ // this.$message.error('验证码错误');
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
this.loading = true;
|
|
|
login(this.form)
|
|
|
.then((msg) => {
|