File tree Expand file tree Collapse file tree 4 files changed +45
-18
lines changed
aspnet-core/src/AbpCompanyName.AbpProjectName.Core/Localization/SourceFiles Expand file tree Collapse file tree 4 files changed +45
-18
lines changed Original file line number Diff line number Diff line change @@ -143,22 +143,26 @@ export default {
143
143
async handleSubmit () {
144
144
this .$refs .loginForm .validate (async (valid ) => {
145
145
if (valid) {
146
- let self = this ;
147
146
this .$Message .loading ({
148
147
content: this .L (' PleaseWait' ),
149
148
duration: 0
150
149
});
151
150
152
- await this .$store .dispatch (' user/login' , this .form )
153
- .then (response => {
154
- location .reload ();
155
- }, (error ) => {
156
- this .$Modal .error ({
157
- title: ' ' ,
158
- content: ' Login failed !'
159
- });
160
- this .$Message .destroy ();
161
- });
151
+ let self = this ;
152
+
153
+ await this .$store .dispatch ({
154
+ type: ' user/login' ,
155
+ data: self .form
156
+ }).then (response => {
157
+ Cookies .set (' userNameOrEmailAddress' , self .form .userNameOrEmailAddress );
158
+ location .reload ();
159
+ }, (error ) => {
160
+ this .$Modal .error ({
161
+ title: ' ' ,
162
+ content: ' Login failed !'
163
+ });
164
+ this .$Message .destroy ();
165
+ });
162
166
}
163
167
});
164
168
}
Original file line number Diff line number Diff line change @@ -50,16 +50,35 @@ export default {
50
50
}
51
51
},
52
52
methods: {
53
- validator () {
54
- return true ; // 你可以在这里写密码验证方式,如发起ajax请求将用户输入的密码this.password与数据库用户密码对比
53
+ async validator () {
54
+ var username = Cookies .get (' userNameOrEmailAddress' );
55
+ if (! username){
56
+ return false ;
57
+ }
58
+
59
+ var password = this .password ;
60
+ var result = false ;
61
+ await this .$store .dispatch ({
62
+ type: ' user/login' ,
63
+ data: {
64
+ userNameOrEmailAddress: username,
65
+ password: password
66
+ }
67
+ }).then (response => {
68
+ result = true ;
69
+ }, (error ) => {
70
+ result = false ;
71
+ });
72
+
73
+ return result;
55
74
},
56
75
handleClickAvator () {
57
76
this .avatorLeft = ' -180px' ;
58
77
this .inputLeft = ' 0px' ;
59
78
this .$refs .inputEle .focus ();
60
79
},
61
- handleUnlock () {
62
- if (this .validator ()) {
80
+ async handleUnlock () {
81
+ if (await this .validator ()) {
63
82
this .avatorLeft = ' 0px' ;
64
83
this .inputLeft = ' 400px' ;
65
84
this .password = ' ' ;
Original file line number Diff line number Diff line change 7
7
<div class =" close-all-tag-con" >
8
8
<Dropdown transfer @on-click =" handleTagsOption" >
9
9
<Button size =" small" type =" primary" >
10
- 标签选项
10
+ {{"LabelOptions" | l}}
11
11
<Icon type =" arrow-down-b" ></Icon >
12
12
</Button >
13
13
<DropdownMenu slot =" list" >
14
- <DropdownItem name =" clearAll" >关闭所有 </DropdownItem >
15
- <DropdownItem name =" clearOthers" >关闭其他 </DropdownItem >
14
+ <DropdownItem name =" clearAll" >{{"ClearAll" | l}} </DropdownItem >
15
+ <DropdownItem name =" clearOthers" >{{"ClearOthers" | l}} </DropdownItem >
16
16
</DropdownMenu >
17
17
</Dropdown >
18
18
</div >
Original file line number Diff line number Diff line change 87
87
<text name =" ThisFieldIsRequired" >This field is required</text >
88
88
<text name =" PleaseWait" >Please wait...</text >
89
89
<text name =" Administration" >Administration</text >
90
+
91
+ <text name =" ClearAll" >Clear all</text >
92
+ <text name =" ClearOthers" >Clear others</text >
93
+ <text name =" LabelOptions" >Label options</text >
90
94
</texts >
91
95
</localizationDictionary >
You can’t perform that action at this time.
0 commit comments