Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
5b5f93db
Commit
5b5f93db
authored
Aug 21, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix : bug
parent
146cb174
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
center-manage/app/base/service/impl/auth/userSve.js
+6
-6
No files found.
center-manage/app/base/service/impl/auth/userSve.js
View file @
5b5f93db
...
@@ -157,19 +157,19 @@ class UserService extends ServiceBase {
...
@@ -157,19 +157,19 @@ class UserService extends ServiceBase {
return
null
;
return
null
;
}
}
var
rtn
=
{}
var
rtn
=
{}
let
u
=
await
this
.
findOne
({
userName
:
p
.
userName
});
let
u
=
await
this
.
findOne
({
userName
:
p
.
userName
});
let
inpassword
=
this
.
getEncryptStr
(
p
.
password
);
let
inpassword
=
this
.
getEncryptStr
(
p
.
password
);
if
(
u
.
password
!=
inpassword
)
{
if
(
u
.
password
!=
inpassword
)
{
return
null
;
return
null
;
}
}
let
last
=
new
Date
(
u
.
last_change_date
).
getTime
();
//注意月份
let
last
=
new
Date
(
u
.
last_change_date
).
getTime
();
//注意月份
let
differ
=
Date
.
now
()
-
last
;
let
differ
=
Date
.
now
()
-
last
;
let
days
=
Math
.
round
(
differ
/
(
24
*
60
*
60
*
1000
));
let
days
=
Math
.
round
(
differ
/
(
24
*
60
*
60
*
1000
));
if
(
days
>=
settings
.
changepwdcycle
)
{
//禁用用户
if
(
days
>=
settings
.
changepwdcycle
)
{
//禁用用户
await
this
.
dao
.
updateByWhere
({
isEnabled
:
false
},
{
userName
:
p
.
userName
})
await
this
.
dao
.
updateByWhere
({
isEnabled
:
false
},
{
userName
:
p
.
userName
})
return
null
return
null
}
else
if
((
settings
.
changepwdcycle
-
7
)
<=
days
)
{
}
else
if
((
settings
.
changepwdcycle
-
7
)
<=
days
)
{
rtn
.
hint
=
"请尽快修改密码,否则会禁用您的账户"
rtn
.
hint
=
"请尽快修改密码,否则会禁用您的账户"
}
}
return
this
.
db
.
transaction
(
async
function
(
t
)
{
return
this
.
db
.
transaction
(
async
function
(
t
)
{
//从缓存中取得
//从缓存中取得
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment