Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
方斌
51business
Commits
9bdb153e
Commit
9bdb153e
authored
May 21, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
response fix
parent
c9a167b2
Pipeline
#7930
passed with stage
in 14 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
response.js
app/controller/response.js
+5
-5
No files found.
app/controller/response.js
View file @
9bdb153e
...
@@ -6,7 +6,7 @@ class ResponseController extends Controller {
...
@@ -6,7 +6,7 @@ class ResponseController extends Controller {
//内部授权注册
//内部授权注册
async
internalAuth
()
{
async
internalAuth
()
{
//https://b.jianbing.com/51business/api/response/internal/auth?target_url=https://b.jianbing.com/webserve/51estate/index
?
channel_id=fc_gjjfc1
//https://b.jianbing.com/51business/api/response/internal/auth?target_url=https://b.jianbing.com/webserve/51estate/index
&
channel_id=fc_gjjfc1
const
{
ctx
}
=
this
;
const
{
ctx
}
=
this
;
const
header
=
ctx
.
request
.
header
;
const
header
=
ctx
.
request
.
header
;
const
input_params
=
ctx
.
query
;
const
input_params
=
ctx
.
query
;
...
@@ -16,11 +16,12 @@ class ResponseController extends Controller {
...
@@ -16,11 +16,12 @@ class ResponseController extends Controller {
channel_id
:
{
type
:
'string'
,
required
:
true
},
channel_id
:
{
type
:
'string'
,
required
:
true
},
}
}
ctx
.
validate
(
rule
,
input_params
);
ctx
.
validate
(
rule
,
input_params
);
const
channel_alias
=
input_params
.
channel_id
;
if
(
target_url
.
indexOf
(
'?'
)
!==
-
1
)
{
if
(
target_url
.
indexOf
(
'?'
)
!==
-
1
)
{
target_url
+=
`&channel_id=
${
channel_
id
}
`
;
target_url
+=
`&channel_id=
${
channel_
alias
}
`
;
}
else
{
}
else
{
target_url
+=
`?channel_id=
${
channel_
id
}
`
;
target_url
+=
`?channel_id=
${
channel_
alias
}
`
;
}
}
//如果cookie中已存在 5要素 则可直接 跳到目标地址
//如果cookie中已存在 5要素 则可直接 跳到目标地址
...
@@ -40,7 +41,6 @@ class ResponseController extends Controller {
...
@@ -40,7 +41,6 @@ class ResponseController extends Controller {
ctx
.
logger
.
info
(
'phone_info: '
+
JSON
.
stringify
(
phone_info
));
ctx
.
logger
.
info
(
'phone_info: '
+
JSON
.
stringify
(
phone_info
));
const
phone
=
phone_info
.
phone
;
const
phone
=
phone_info
.
phone
;
// const phone = '15968762898';
// const phone = '15968762898';
const
channel_alias
=
input_params
.
channel_id
;
const
app_channel_info
=
await
ctx
.
blockModel
.
AppChannel
.
one
({
where
:
{
alias
:
channel_alias
}
});
//
const
app_channel_info
=
await
ctx
.
blockModel
.
AppChannel
.
one
({
where
:
{
alias
:
channel_alias
}
});
//
ctx
.
logger
.
info
(
'app_channel_info: '
+
JSON
.
stringify
(
app_channel_info
));
ctx
.
logger
.
info
(
'app_channel_info: '
+
JSON
.
stringify
(
app_channel_info
));
const
channel_id
=
(
app_channel_info
&&
app_channel_info
.
channel_id
)
?
app_channel_info
.
channel_id
:
false
;
const
channel_id
=
(
app_channel_info
&&
app_channel_info
.
channel_id
)
?
app_channel_info
.
channel_id
:
false
;
...
...
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