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
4993069d
Commit
4993069d
authored
Aug 17, 2021
by
肖爱江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e6c499e3
Pipeline
#33506
passed with stage
in 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
response.js
app/controller/response.js
+8
-8
No files found.
app/controller/response.js
View file @
4993069d
...
@@ -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'
);
...
...
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