1
1
<template >
2
2
<div >
3
- <el-row >
4
- <el-col :span =" 8 " :offset =" 8 " >
3
+ <el-row align = " center " >
4
+ <el-col :span =" 10 " :offset =" 7 " >
5
5
<el-tabs type =" border-card" >
6
6
<el-tab-pane label =" 登录" >
7
7
<el-form :model =" lgForm" >
8
8
<el-input type =" text" v-model =" lgForm.username" >
9
- <template #prepend > 用户名</template >
9
+ <template #prepend > < span > 用户名 </ span > </template >
10
10
</el-input >
11
11
12
12
<el-input type =" password" v-model =" lgForm.password" >
13
- <template #prepend >密码 </template >
13
+ <template #prepend > < span > 密码 </ span > </template >
14
14
</el-input >
15
15
16
16
<el-form-item >
21
21
<el-tab-pane label =" 注册" >
22
22
<el-form :model =" regForm" >
23
23
<el-input type =" text" v-model =" regForm.username" >
24
- <template #prepend >用户名</template >
24
+ <template #prepend > < span > 用户名 </ span > </template >
25
25
</el-input >
26
26
27
27
<el-input type =" password" v-model =" regForm.password" >
28
- <template #prepend >密码 </template >
28
+ <template #prepend > < span > 密码 </ span > </template >
29
29
</el-input >
30
30
31
31
<el-input type =" password" v-model =" regForm.confirm" >
32
- <template #prepend >重复密码</template >
32
+ <template #prepend > < span > 重复密码 </ span > </template >
33
33
</el-input >
34
34
<el-form-item >
35
35
<el-button type =" info" @click =" register" > 注册 </el-button >
@@ -58,6 +58,10 @@ import { ElMessageBox } from "element-plus";
58
58
axios .defaults .withCredentials = true ;
59
59
const aes_key = aes .init_key ();
60
60
const aes_iv = aes .init_iv ();
61
+
62
+ console .log (aes .b64stringify (aes_key));
63
+ console .log (aes .b64stringify (aes_iv));
64
+ console .log (aes .encrypt (aes_key, aes_iv, " test" ));
61
65
export default {
62
66
name: " Login" ,
63
67
setup () {
@@ -134,7 +138,7 @@ export default {
134
138
this .msFail (" 请完整填写表单" );
135
139
return ;
136
140
}
137
- if (this .regForm .username !== this .regForm .confirm ) {
141
+ if (this .regForm .password !== this .regForm .confirm ) {
138
142
this .msFail (" 密码重复错误" );
139
143
return ;
140
144
}
@@ -162,3 +166,10 @@ export default {
162
166
};
163
167
</script >
164
168
169
+ <style scoped>
170
+ span {
171
+
172
+ float :left ;
173
+ width : 50px ;
174
+ }
175
+ </style >
0 commit comments