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
adae7ccc
Commit
adae7ccc
authored
Jan 15, 2020
by
高宇强
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
51cfcbd2
5593527a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
center-channel/app/base/api/impl/auth/accessAuth.js
+3
-3
center-channel/app/base/service/impl/utilsSve/utilsAuthSve.js
+12
-5
No files found.
center-channel/app/base/api/impl/auth/accessAuth.js
View file @
adae7ccc
...
...
@@ -23,7 +23,7 @@ class AccessAuthAPI extends APIBase {
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
system
.
getResult
(
null
,
"req Failure"
);
pobj
.
actionBody
.
userpin
=
this
.
getUUID
();
pobj
.
actionBody
.
userpin
=
pobj
.
actionBody
.
userpin
||
this
.
getUUID
();
switch
(
action_type
)
{
// sy
case
"test"
:
//测试
...
...
@@ -62,10 +62,10 @@ class AccessAuthAPI extends APIBase {
}
break
;
case
"logout"
:
opResult
=
await
this
.
utilsAuthSve
.
userLogout
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsAuthSve
.
userLogout
(
pobj
,
pobj
.
actionBody
);
break
;
case
"putUserPwdByMobile"
:
opResult
=
await
this
.
utilsAuthSve
.
putUserPwdByMobile
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsAuthSve
.
putUserPwdByMobile
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsAuthSve.js
View file @
adae7ccc
...
...
@@ -102,7 +102,7 @@ class UtilsAuthSve extends AppServiceBase {
if
(
result
.
status
==
0
&&
actionBody
.
userpin
)
{
this
.
userLogout
(
pobj
,
actionBody
);
}
return
system
.
getResultSuccess
()
;
return
result
;
}
async
userLogout
(
pobj
,
actionBody
)
{
console
.
log
(
actionBody
.
userpin
);
...
...
@@ -110,10 +110,17 @@ class UtilsAuthSve extends AppServiceBase {
return
system
.
getResult
(
null
,
"actionBody.userpin can not be empty !"
);
}
var
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
var
a
=
await
cacheManager
[
"AppUserPinByLoginVcodeCache"
].
invalidate
(
actionBody
.
userpin
);
var
b
=
await
cacheManager
[
"AppUserPinByLoginPwdCache"
].
invalidate
(
actionBody
.
userpin
);
var
c
=
actionBody
.
userpin
;
return
system
.
getResultSuccess
({
a
,
b
,
c
});
var
userinfo
=
await
this
.
cacheManager
[
"AppUserPinByLoginPwdCache"
].
cache
(
actionBody
.
userpin
,
pobj
,
system
.
exTime
);
if
(
userinfo
.
data
){
pobj
.
actionBody
.
userName
=
userinfo
.
data
.
channel_username
;
}
else
{
return
system
.
getResultSuccess
();
}
await
cacheManager
[
"AppUserPinByLoginVcodeCache"
].
invalidate
(
actionBody
.
userpin
);
await
cacheManager
[
"AppUserPinByLoginPwdCache"
].
invalidate
(
actionBody
.
userpin
);
var
applogout
=
await
this
.
restPostUrl
(
pobj
,
this
.
centerAppUrl
+
"auth/accessAuth/logout"
);
return
applogout
;
}
}
...
...
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