Commit 4993069d authored by 肖爱江's avatar 肖爱江

1

parent e6c499e3
Pipeline #33506 passed with stage
in 4 seconds
...@@ -52,13 +52,13 @@ class ResponseController extends Controller { ...@@ -52,13 +52,13 @@ class ResponseController extends Controller {
} }
const auth_token = ctx.cookies.get('auth_token', { signed: false }); const auth_token = ctx.cookies.get('auth_token', { signed: false });
// ctx.logger.info('target_user--' + new Date().getTime() + JSON.stringify({ target_old_user: { auth_token, user_sid } })); ctx.logger.info('target_user--' + new Date().getTime() + JSON.stringify({ target_old_user: { auth_token, user_sid } }));
const phone_info = await ctx.service.user.get_phone_by_user_sid({ user_sid: user_sid, token: auth_token });//获取用户手机号码 const phone_info = await ctx.service.user.get_phone_by_user_sid({ user_sid: user_sid, token: auth_token });//获取用户手机号码
// 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 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;
const app_id = (app_channel_info && app_channel_info.app_id) ? app_channel_info.app_id : false; const app_id = (app_channel_info && app_channel_info.app_id) ? app_channel_info.app_id : false;
...@@ -69,12 +69,12 @@ class ResponseController extends Controller { ...@@ -69,12 +69,12 @@ class ResponseController extends Controller {
app_id: app_id, app_id: app_id,
channel_id: channel_id, channel_id: channel_id,
} }
// ctx.logger.info('go_register_params: ' + JSON.stringify(go_register_params)); ctx.logger.info('go_register_params: ' + JSON.stringify(go_register_params));
// console.info(this.config.NODE_URL + '/login/go_register'); // console.info(this.config.NODE_URL + '/login/go_register');
const result_go_register = await ctx.helper.send_request(this.config.NODE_URL + '/login/go_register', go_register_params, { method: 'POST' });//通过手机号直接注册新用户中心 const result_go_register = await ctx.helper.send_request(this.config.NODE_URL + '/login/go_register', go_register_params, { method: 'POST' });//通过手机号直接注册新用户中心
node_user_center_login_ret = result_go_register.data; node_user_center_login_ret = result_go_register.data;
// ctx.logger.info('target_user--' + new Date().getTime() + JSON.stringify({ target_old_user: { go_register_params, node_user_center_login_ret } })); ctx.logger.info('target_user--' + new Date().getTime() + JSON.stringify({ target_old_user: { go_register_params, node_user_center_login_ret } }));
// ctx.logger.info('go_register_result: ' + JSON.stringify(node_user_center_login_ret)); ctx.logger.info('go_register_result: ' + JSON.stringify(node_user_center_login_ret));
ctx.logger.info(JSON.stringify({ url: ctx.app.config.NODE_URL + '/login/go_register', go_register_params: go_register_params, go_register_result: node_user_center_login_ret })); ctx.logger.info(JSON.stringify({ url: ctx.app.config.NODE_URL + '/login/go_register', go_register_params: go_register_params, go_register_result: node_user_center_login_ret }));
node_user_center_login_ret.user_id = node_user_center_login_ret.uid; node_user_center_login_ret.user_id = node_user_center_login_ret.uid;
node_user_center_login_ret.device_login_id = node_user_center_login_ret.device_login_logs_id; node_user_center_login_ret.device_login_id = node_user_center_login_ret.device_login_logs_id;
...@@ -94,10 +94,10 @@ class ResponseController extends Controller { ...@@ -94,10 +94,10 @@ class ResponseController extends Controller {
app_id: app_id, app_id: app_id,
device_info: {}, device_info: {},
} }
// ctx.logger.info('device_login_params: ' + JSON.stringify(device_login_params));//设备登录参数 ctx.logger.info('device_login_params: ' + JSON.stringify(device_login_params));//设备登录参数
const result_device_login = await ctx.helper.send_request(this.config.NODE_URL + '/login/device', device_login_params, { method: 'POST' });//设备登录 const result_device_login = await ctx.helper.send_request(this.config.NODE_URL + '/login/device', device_login_params, { method: 'POST' });//设备登录
const device_login_data = result_device_login.data;//设备登录返回结果 const device_login_data = result_device_login.data;//设备登录返回结果
// ctx.logger.info('device_login_result: ' + JSON.stringify(device_login_data)); ctx.logger.info('device_login_result: ' + JSON.stringify(device_login_data));
ctx.logger.info('target_user--' + new Date().getTime() + JSON.stringify({ target_old_user: { device_login_params, result_device_login } })); ctx.logger.info('target_user--' + new Date().getTime() + JSON.stringify({ target_old_user: { device_login_params, result_device_login } }));
if (!device_login_data || Object.keys(device_login_data).length === 0) { if (!device_login_data || Object.keys(device_login_data).length === 0) {
ctx.failed('device login error, device_login_data empty'); ctx.failed('device login error, device_login_data empty');
......
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