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
4ed7d4b8
Commit
4ed7d4b8
authored
Oct 22, 2020
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d287c972
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
center-channel/app/base/service/impl/utilsSve/utilsAuthSve.js
+13
-12
No files found.
center-channel/app/base/service/impl/utilsSve/utilsAuthSve.js
View file @
4ed7d4b8
...
...
@@ -32,7 +32,7 @@ class UtilsAuthService extends AppServiceBase {
}
/**
* 渠道通过账户进行登录,有则返回用户信息,没有则创建用户
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {channelUserId:XX}
*/
async
getLoginByUserName
(
pobj
,
actionBody
)
{
//渠道通过账户进行登录,有则返回用户信息,没有则创建用户---actionBody.channelUserId
...
...
@@ -50,7 +50,7 @@ class UtilsAuthService extends AppServiceBase {
/**
* 通过账户和密码登录
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {userName:XX,password:XXX}
*/
async
getReqUserPinByLgoin
(
pobj
,
actionBody
)
{
...
...
@@ -70,7 +70,7 @@ class UtilsAuthService extends AppServiceBase {
}
/**
* 通过短信登录或注册信息
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {mobile:XXX,vcode:XXX,reqType:"reg",password:XXX-reqType为reg时有此值}
*/
async
getReqUserPinByLgoinVcode
(
pobj
,
actionBody
)
{
...
...
@@ -96,7 +96,7 @@ class UtilsAuthService extends AppServiceBase {
/**
* 获取默认模板的手机验证码
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {mobile:XXX}
*/
async
getVerifyCodeByMoblie
(
pobj
,
actionBody
)
{
...
...
@@ -108,7 +108,7 @@ class UtilsAuthService extends AppServiceBase {
/**
* 通过手机验证码修改用户密码
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {mobile:XX,vcode:XXX,newPwd:XXX,userpin:XXXXX}
*/
async
putUserPwdByMobile
(
pobj
,
actionBody
)
{
...
...
@@ -132,7 +132,7 @@ class UtilsAuthService extends AppServiceBase {
}
/**
* 通过userpin获取用户登录信息
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {userpin:XXXXX}
*/
async
getLoginInfo
(
pobj
,
actionBody
)
{
...
...
@@ -147,7 +147,7 @@ class UtilsAuthService extends AppServiceBase {
}
/**
* 用户退出
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {userpin:XXXX}
*/
async
userLogout
(
pobj
,
actionBody
)
{
...
...
@@ -172,20 +172,21 @@ class UtilsAuthService extends AppServiceBase {
let
result
=
await
this
.
get360Token
();
let
token
=
result
.
access_token
;
//360验证接口
let
subData
=
"pin="
+
pin
+
"&token="
+
token
let
rtn
=
await
this
.
restClient
.
execGet
(
subData
,
settings
.
requestUrl360
());
let
subData
=
"pin="
+
pin
+
"&token="
+
token
;
let
url
=
settings
.
requestUrl360
()
+
'api/v1/VerifyPin'
;
let
rtn
=
await
this
.
restClient
.
execGet
(
subData
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"rest
Pos
t data is empty"
);
return
system
.
getResult
(
null
,
"rest
Ge
t data is empty"
);
}
let
checkRet
=
JSON
.
parse
(
rtn
.
stdout
);
console
.
log
(
checkRet
,
'checkRet--------------'
)
console
.
log
(
checkRet
,
'checkRet--------------'
)
;
//---渠道用户登录,有则返回userpin ,没有则注册用户并返回userpin
actionBody
.
channelUserId
=
pin
;
let
loginRt
=
await
this
.
getLoginByUserName
(
pobj
,
actionBody
);
if
(
loginRt
.
status
!=
0
&&
loginRt
.
status
!=
2060
)
{
return
loginRt
;
}
opResult
.
data
=
{
userpin
:
pobj
.
actionBody
.
userpin
}
opResult
.
data
=
{
userpin
:
pobj
.
actionBody
.
userpin
}
if
(
loginRt
.
status
==
2060
)
{
opResult
.
msg
=
loginRt
.
msg
;
opResult
.
data
.
userpin
=
loginRt
.
data
.
userpin
;
...
...
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