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
eeb56fab
Commit
eeb56fab
authored
Apr 16, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
79a2f070
8be567a5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
center-channel/app/base/api/impl/auth/accessAuth.js
+4
-1
center-channel/app/base/service/impl/utilsSve/utilsAuthSve.js
+18
-8
No files found.
center-channel/app/base/api/impl/auth/accessAuth.js
View file @
eeb56fab
...
@@ -112,9 +112,12 @@ class AccessAuthAPI extends WEBBase {
...
@@ -112,9 +112,12 @@ class AccessAuthAPI extends WEBBase {
case
"logout"
:
//用户退出--已经废弃,前端自己进行移除userpin信息
case
"logout"
:
//用户退出--已经废弃,前端自己进行移除userpin信息
opResult
=
await
this
.
utilsAuthSve
.
userLogout
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsAuthSve
.
userLogout
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"getAllChannels"
:
case
"getAllChannels"
:
//获取所有渠道(去重appid、app名字)
opResult
=
await
this
.
utilsAuthSve
.
getAllChannels
(
pobj
);
opResult
=
await
this
.
utilsAuthSve
.
getAllChannels
(
pobj
);
break
;
break
;
case
"getAllService"
:
//获取所有渠道(信息更全一些)
opResult
=
await
this
.
utilsAuthSve
.
getAllService
(
pobj
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsAuthSve.js
View file @
eeb56fab
...
@@ -270,17 +270,17 @@ class UtilsAuthService extends AppServiceBase {
...
@@ -270,17 +270,17 @@ class UtilsAuthService extends AppServiceBase {
//360验证接口
//360验证接口
let
subData
=
"pin="
+
pin
+
"&token="
+
token
;
let
subData
=
"pin="
+
pin
+
"&token="
+
token
;
let
url
=
settings
.
requestUrl360
()
+
'api/v1/VerifyPin'
;
let
url
=
settings
.
requestUrl360
()
+
'api/v1/VerifyPin'
;
let
rtn
=
await
this
.
restClient
.
execGet
(
subData
,
url
);
let
rtn
=
await
this
.
restClient
.
execGet
(
subData
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"restGet data is empty"
);
return
system
.
getResult
(
null
,
"restGet data is empty"
);
}
}
let
checkRet
=
JSON
.
parse
(
rtn
.
stdout
);
let
checkRet
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
checkRet
.
code
!=
200
)
{
if
(
checkRet
.
code
!=
200
)
{
return
system
.
getResultFail
(
-
1
,
checkRet
.
msg
)
return
system
.
getResultFail
(
-
1
,
checkRet
.
msg
)
}
}
//---渠道用户登录,有则返回userpin ,没有则注册用户并返回userpin
//---渠道用户登录,有则返回userpin ,没有则注册用户并返回userpin
actionBody
.
channelUserId
=
pin
;
actionBody
.
channelUserId
=
pin
;
opResult
=
await
this
.
getLoginByUserName
(
req
,
pobj
,
actionBody
);
opResult
=
await
this
.
getLoginByUserName
(
req
,
pobj
,
actionBody
);
return
opResult
;
return
opResult
;
}
}
...
@@ -294,12 +294,22 @@ class UtilsAuthService extends AppServiceBase {
...
@@ -294,12 +294,22 @@ class UtilsAuthService extends AppServiceBase {
}
}
/**
/**
* 获取所有渠道
* 获取所有渠道(去重appid、app名字)
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getAllChannels
(
pobj
){
async
getAllChannels
(
pobj
)
{
let
url
=
this
.
centerAppUrl
+
'auth/accessAuth/getAllChannels'
;
let
url
=
this
.
centerAppUrl
+
'auth/accessAuth/getAllChannels'
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
}
/**
* 获取所有渠道(信息更全一些)
* @returns {Promise<void>}
*/
async
getAllService
(
pobj
)
{
let
url
=
this
.
centerAppUrl
+
'auth/accessAuth/getAllService'
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
return
result
}
}
...
...
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