|
@@ -6,7 +6,17 @@ |
|
@@ -6,7 +6,17 @@ |
6
|
<el-input type="text" v-model="ruleForm2.account" autofocus placeholder="账号"></el-input>
|
6
|
<el-input type="text" v-model="ruleForm2.account" autofocus placeholder="账号"></el-input>
|
7
|
</el-form-item>
|
7
|
</el-form-item>
|
8
|
<el-form-item prop="checkPass">
|
8
|
<el-form-item prop="checkPass">
|
9
|
- <el-input type="password" v-model="ruleForm2.checkPass" placeholder="密码" @keyup.enter.native="handleSubmit2"></el-input>
|
9
|
+ <el-input type="password" v-model="ruleForm2.checkPass" placeholder="密码"></el-input>
|
|
|
10
|
+ </el-form-item>
|
|
|
11
|
+ <el-form-item prop="verify">
|
|
|
12
|
+ <el-input type="text" v-model="ruleForm2.verify" placeholder="请输入下方图片显示的验证码" @keyup.enter.native="handleSubmit2"></el-input>
|
|
|
13
|
+ </el-form-item>
|
|
|
14
|
+ <el-form-item>
|
|
|
15
|
+ <img
|
|
|
16
|
+ style="width: 125px; height: 60px"
|
|
|
17
|
+ :src="verifyImg"
|
|
|
18
|
+ @click="getVerifyCode"
|
|
|
19
|
+ >
|
10
|
</el-form-item>
|
20
|
</el-form-item>
|
11
|
<!-- <el-form-item prop="checkPass">-->
|
21
|
<!-- <el-form-item prop="checkPass">-->
|
12
|
<!-- <el-input type="password" v-model="ruleForm2.checkPass" placeholder="密码" @keyup.enter.native="handleSubmit2"></el-input>-->
|
22
|
<!-- <el-input type="password" v-model="ruleForm2.checkPass" placeholder="密码" @keyup.enter.native="handleSubmit2"></el-input>-->
|
|
@@ -42,13 +52,15 @@ |
|
@@ -42,13 +52,15 @@ |
42
|
export default {
|
52
|
export default {
|
43
|
data() {
|
53
|
data() {
|
44
|
return {
|
54
|
return {
|
|
|
55
|
+ verifyImg: "",
|
45
|
vedioCanPlay: true,
|
56
|
vedioCanPlay: true,
|
46
|
fixStyle: '',
|
57
|
fixStyle: '',
|
47
|
logining: false,
|
58
|
logining: false,
|
48
|
ruleForm2: {
|
59
|
ruleForm2: {
|
49
|
account: '',
|
60
|
account: '',
|
50
|
- checkPass: ''
|
|
|
51
|
- // checkPass: 'vmvnv1v2VV'
|
61
|
+ checkPass: '',
|
|
|
62
|
+ verify: '',
|
|
|
63
|
+ verifyToken: ''
|
52
|
},
|
64
|
},
|
53
|
rules2: {
|
65
|
rules2: {
|
54
|
account: [
|
66
|
account: [
|
|
@@ -58,6 +70,9 @@ |
|
@@ -58,6 +70,9 @@ |
58
|
checkPass: [
|
70
|
checkPass: [
|
59
|
{ required: true, message: '请输入密码', trigger: 'blur' },
|
71
|
{ required: true, message: '请输入密码', trigger: 'blur' },
|
60
|
//{ validator: validaePass2 }
|
72
|
//{ validator: validaePass2 }
|
|
|
73
|
+ ],
|
|
|
74
|
+ checkVerify: [
|
|
|
75
|
+ { required: true, message: '请输入验证码', trigger: 'blur' }
|
61
|
]
|
76
|
]
|
62
|
},
|
77
|
},
|
63
|
checked: true,
|
78
|
checked: true,
|
|
@@ -101,9 +116,12 @@ |
|
@@ -101,9 +116,12 @@ |
101
|
// 本地存储用户目录 ,防刷新目录丢失用
|
116
|
// 本地存储用户目录 ,防刷新目录丢失用
|
102
|
sessionStorage.setItem('menu', JSON.stringify(_this.$router.options.routes));
|
117
|
sessionStorage.setItem('menu', JSON.stringify(_this.$router.options.routes));
|
103
|
},
|
118
|
},
|
104
|
- randCode: function(){
|
|
|
105
|
- getRandCode().then((res) =>{
|
|
|
106
|
|
119
|
|
|
|
120
|
+ getVerifyCode: function(){
|
|
|
121
|
+ getRandCode().then((res) =>{
|
|
|
122
|
+ let status = res.status;
|
|
|
123
|
+ this.ruleForm2.verifyToken = res.data.jwtToken;
|
|
|
124
|
+ this.verifyImg = res.data.data.verifyImg;
|
107
|
}).catch({
|
125
|
}).catch({
|
108
|
|
126
|
|
109
|
});
|
127
|
});
|
|
@@ -115,7 +133,7 @@ |
|
@@ -115,7 +133,7 @@ |
115
|
//_this.$router.replace('/table');
|
133
|
//_this.$router.replace('/table');
|
116
|
this.logining = true;
|
134
|
this.logining = true;
|
117
|
//NProgress.start();
|
135
|
//NProgress.start();
|
118
|
- var loginParams = {username: this.ruleForm2.account, password: this.ruleForm2.checkPass};
|
136
|
+ var loginParams = {username: this.ruleForm2.account, password: this.ruleForm2.checkPass, verify: this.ruleForm2.verify,verifyToken:this.ruleForm2.verifyToken};
|
119
|
http.login(loginParams).then(res => {
|
137
|
http.login(loginParams).then(res => {
|
120
|
this.logining = false;
|
138
|
this.logining = false;
|
121
|
//NProgress.done();
|
139
|
//NProgress.done();
|
|
@@ -189,9 +207,12 @@ |
|
@@ -189,9 +207,12 @@ |
189
|
'margin-bottom': 'initial'
|
207
|
'margin-bottom': 'initial'
|
190
|
}
|
208
|
}
|
191
|
}
|
209
|
}
|
192
|
- }
|
210
|
+ },
|
193
|
window.onresize();
|
211
|
window.onresize();
|
194
|
// this.randCode();
|
212
|
// this.randCode();
|
|
|
213
|
+ },
|
|
|
214
|
+ created(){
|
|
|
215
|
+ this.getVerifyCode()
|
195
|
}
|
216
|
}
|
196
|
}
|
217
|
}
|
197
|
|
218
|
|