Commit 9bdb153e authored by 李尚科's avatar 李尚科

response fix

parent c9a167b2
Pipeline #7930 passed with stage
in 14 seconds
......@@ -6,7 +6,7 @@ class ResponseController extends Controller {
//内部授权注册
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 header = ctx.request.header;
const input_params = ctx.query;
......@@ -17,10 +17,11 @@ class ResponseController extends Controller {
}
ctx.validate(rule, input_params);
const channel_alias = input_params.channel_id;
if (target_url.indexOf('?') !== -1) {
target_url += `&channel_id=${channel_id}`;
target_url += `&channel_id=${channel_alias}`;
} else {
target_url += `?channel_id=${channel_id}`;
target_url += `?channel_id=${channel_alias}`;
}
//如果cookie中已存在 5要素 则可直接 跳到目标地址
......@@ -40,7 +41,6 @@ class ResponseController extends Controller {
ctx.logger.info('phone_info: ' + JSON.stringify(phone_info));
const phone = phone_info.phone;
// const phone = '15968762898';
const channel_alias = input_params.channel_id;
const app_channel_info = await ctx.blockModel.AppChannel.one({ where: { alias: channel_alias } });//
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment