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
4c41a8d6
Commit
4c41a8d6
authored
May 11, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feishu login
parent
c93b8742
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletions
+23
-1
center-channel/app/base/service/impl/common/feishuLoginSve.js
+1
-0
center-channel/app/config/routes/api.js
+22
-1
No files found.
center-channel/app/base/service/impl/common/feishuLoginSve.js
View file @
4c41a8d6
...
...
@@ -8,6 +8,7 @@ class feishuLoginService{
};
//用户登录
async
checkAndLogin
(
pobj
){
return
system
.
getResultSuccess
(
null
,
"测试"
);
if
(
!
pobj
.
code
){
return
system
.
getResultFail
(
-
100
,
"code参数不能为空"
);
}
...
...
center-channel/app/config/routes/api.js
View file @
4c41a8d6
...
...
@@ -4,7 +4,7 @@ const utilsAuthSve = system.getObject("service.utilsSve.utilsAuthSve");
const
logCtl
=
system
.
getObject
(
"service.common.oplogSve"
);
const
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
const
utilsFeishuSve
=
system
.
getObject
(
"service.utilsSve.utilsFeishuSve"
);
const
feishuLoginSve
=
system
.
getObject
(
"service.common.feishuLoginSve"
);
module
.
exports
=
function
(
app
)
{
//-----------------------新的模式---------web---------开始
...
...
@@ -349,6 +349,27 @@ module.exports = function (app) {
});
}
});
app
.
use
(
'/feishu/login'
,
async
function
(
req
,
res
)
{
try
{
var
client_ip
=
system
.
get_client_ip
(
req
);
var
result
=
await
feishuLoginSve
.
checkAndLogin
(
req
.
body
);
logCtl
.
info
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"飞书小程序记录回调处理结果,method=login"
,
op
:
"app/config/routes/api.js/feishu/notify"
,
content
:
"回调参数:"
+
JSON
.
stringify
(
req
.
body
)
+
"回调结果:"
+
JSON
.
stringify
(
result
),
clientIp
:
client_ip
||
""
});
var
returnObj
=
JSON
.
stringify
(
result
);
return
res
.
end
(
returnObj
);
}
catch
(
error
)
{
logCtl
.
error
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"飞书小程序记录回调处理结果异常:,method=login"
,
op
:
"app/config/routes/api.js/feishu/notify"
,
content
:
"回调参数:"
+
JSON
.
stringify
(
req
.
body
)
+
"error:"
+
error
.
stack
,
clientIp
:
client_ip
||
""
});
}
});
//----------------------飞书小程序---------------------------------------------结束
};
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