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
719b8562
Commit
719b8562
authored
Mar 27, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
6c9c0c42
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
2 deletions
+35
-2
center-channel/app/base/api/impl/auth/channelAccessAuth.js
+3
-0
center-channel/app/base/service/impl/utilsSve/utilsChannelAuthSve.js
+6
-1
center-channel/阿里文档
+26
-1
No files found.
center-channel/app/base/api/impl/auth/channelAccessAuth.js
View file @
719b8562
...
...
@@ -49,6 +49,9 @@ class ChannelAccessAuthAPI extends WEBBase {
opResult
.
data
.
userpin
=
tmpOpResult
.
data
.
userpin
;
}
break
;
case
"getDingJsApiAuthInfo"
:
//获取钉钉鉴权信息
opResult
=
await
this
.
utilsChannelAuthSve
.
getDingJsApiAuthInfo
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsChannelAuthSve.js
View file @
719b8562
...
...
@@ -10,7 +10,7 @@ class UtilsChannelAuthService extends AppServiceBase {
}
//---------------登录-----------------------------------------------------
async
getH5AliDingUserByCode
(
pobj
,
actionBody
)
{
//
获取token
async
getH5AliDingUserByCode
(
pobj
,
actionBody
)
{
//
渠道通过账户进行登录,有则返回用户信息,没有则创建用户
if
(
!
actionBody
.
code
)
{
return
system
.
getResult
(
null
,
"actionBody.code can not be empty"
);
}
...
...
@@ -18,5 +18,10 @@ class UtilsChannelAuthService extends AppServiceBase {
return
result
;
}
async
getDingJsApiAuthInfo
(
pobj
,
actionBody
)
{
//获取token
var
result
=
await
this
.
restPostUrl
(
pobj
,
this
.
centerAppUrl
+
"auth/channelAccessAuth/getDingJsApiAuthInfo"
);
return
result
;
}
}
module
.
exports
=
UtilsChannelAuthService
;
center-channel/阿里文档
View file @
719b8562
1.获取请
求token
1.获取请
求token
...
...
@@ -70,3 +70,27 @@ HTTP请求方式 POST
},
"requestId": "8691ec2bf95d4eef94cff70959c4f062"
}
4.获取钉钉鉴权信息---->供前端调用
地址:[/web/auth/channelAccessAuth/springBoard]
请求方式:POST
请求头中需要有token(token值从接口1中获取)
{
"actionType": "getDingJsApiAuthInfo",
"actionBody": {
"nowPageUrl":"http://alitm.qifu.gongsibao.com"// Y 当前网页的URL,不包含#及其后面部分
}
}
返回结果
{
"status": 0,//0成功,否则失败
"msg": "success",
"data": {
"agentId": "639185135",
"corpId": "ding1d097f874960e207",
"timeStamp": "1585319973691",
"nonceStr": "SY202003272239rOpDt2",
"signature": "f413e164fd1fe1cf057bf9ff0bbc23747ee7b732"
},
"requestId": "17e6cf486d1e40c49e3e7def2eb16e28"
}
\ No newline at end of file
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