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
73ddaeb1
Commit
73ddaeb1
authored
Jul 06, 2023
by
董加伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
57fedf6f
Pipeline
#48905
passed with stage
in 1 minute 28 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
response.js
app/controller/response.js
+5
-4
config.local.js
config/config.local.js
+17
-5
No files found.
app/controller/response.js
View file @
73ddaeb1
...
@@ -51,7 +51,6 @@ class ResponseController extends Controller {
...
@@ -51,7 +51,6 @@ class ResponseController extends Controller {
const
device_login_id
=
ctx
.
cookies
.
get
(
'device_login_id'
,
{
signed
:
false
});
const
device_login_id
=
ctx
.
cookies
.
get
(
'device_login_id'
,
{
signed
:
false
});
ctx
.
logger
.
info
(
'target_user--'
+
JSON
.
stringify
({
target_cookies_user
:
{
token
,
user_id
,
app_user_id
,
device_id
,
device_login_id
}
}));
ctx
.
logger
.
info
(
'target_user--'
+
JSON
.
stringify
({
target_cookies_user
:
{
token
,
user_id
,
app_user_id
,
device_id
,
device_login_id
}
}));
let
user_sid
=
ctx
.
cookies
.
get
(
'jianbing_customer_id'
,
{
signed
:
false
});
let
user_sid
=
ctx
.
cookies
.
get
(
'jianbing_customer_id'
,
{
signed
:
false
});
let
auth_token
=
ctx
.
cookies
.
get
(
'auth_token'
,
{
signed
:
false
});
let
auth_token
=
ctx
.
cookies
.
get
(
'auth_token'
,
{
signed
:
false
});
if
(
input_params
.
user_token
)
{
if
(
input_params
.
user_token
)
{
...
@@ -63,11 +62,12 @@ class ResponseController extends Controller {
...
@@ -63,11 +62,12 @@ class ResponseController extends Controller {
}
}
}
}
// 判断user_sid 和 app_user_id
// 判断user_sid 和 app_user_id
let
oid
=
''
;
if
(
app_user_id
)
{
if
(
app_user_id
)
{
const
result
=
await
ctx
.
helper
.
send_request
(
this
.
config
.
USER_CENTER_API_URI
+
'/v1/appusers/'
+
app_user_id
,
{},
{
method
:
'GET'
,
dataType
:
'json'
});
const
result
=
await
ctx
.
helper
.
send_request
(
this
.
config
.
USER_CENTER_API_URI
+
'/v1/appusers/'
+
app_user_id
,
{},
{
method
:
'GET'
,
dataType
:
'json'
});
const
ret_appuid
=
result
.
status
===
200
?
result
.
data
:
{};
const
ret_appuid
=
result
.
status
===
200
?
result
.
data
:
{};
this
.
logger
.
info
(
`user:
${
user_sid
}
, appuid:
${
app_user_id
}
, ret:
${
JSON
.
stringify
(
ret_appuid
)}
`
);
this
.
logger
.
info
(
`user:
${
user_sid
}
, appuid:
${
app_user_id
}
, ret:
${
JSON
.
stringify
(
ret_appuid
)}
`
);
oid
=
ret_appuid
.
oid
;
if
(
this
.
ctx
.
helper
.
encodeUserSid
(
ret_appuid
.
oid
)
==
user_sid
)
{
if
(
this
.
ctx
.
helper
.
encodeUserSid
(
ret_appuid
.
oid
)
==
user_sid
)
{
if
(
token
&&
user_id
&&
app_user_id
&&
device_id
&&
device_login_id
)
{
if
(
token
&&
user_id
&&
app_user_id
&&
device_id
&&
device_login_id
)
{
ctx
.
redirect
(
target_url2
);
ctx
.
redirect
(
target_url2
);
...
@@ -138,6 +138,8 @@ class ResponseController extends Controller {
...
@@ -138,6 +138,8 @@ class ResponseController extends Controller {
node_user_center_login_ret
.
device_id
=
device_login_data
.
device_id
;
node_user_center_login_ret
.
device_id
=
device_login_data
.
device_id
;
node_user_center_login_ret
.
device_login_id
=
device_login_data
.
device_login_logs_id
;
node_user_center_login_ret
.
device_login_id
=
device_login_data
.
device_login_logs_id
;
}
}
if
(
auth_token
)
node_user_center_login_ret
.
auth_token
=
auth_token
;
if
(
user_sid
&&
this
.
ctx
.
helper
.
encodeUserSid
(
oid
)
!==
user_sid
)
node_user_center_login_ret
.
jianbing_customer_id
=
this
.
ctx
.
helper
.
encodeUserSid
(
input_params
.
user_sid
);
const
expire
=
7200
*
1000
;
const
expire
=
7200
*
1000
;
const
date
=
new
Date
();
const
date
=
new
Date
();
...
@@ -145,11 +147,10 @@ class ResponseController extends Controller {
...
@@ -145,11 +147,10 @@ class ResponseController extends Controller {
const
value
=
node_user_center_login_ret
[
key
];
const
value
=
node_user_center_login_ret
[
key
];
// const exist_value = ctx.cookies.get(key, { signed: false });
// const exist_value = ctx.cookies.get(key, { signed: false });
// if (!exist_value) {
// if (!exist_value) {
ctx
.
logger
.
info
(
JSON
.
stringify
({
key
,
value
,
phone
}));
ctx
.
logger
.
info
(
JSON
.
stringify
({
key
,
value
,
phone
}));
ctx
.
cookies
.
set
(
key
,
value
,
{
httpOnly
:
false
,
signed
:
false
,
path
:
'/'
,
overwrite
:
true
});
ctx
.
cookies
.
set
(
key
,
value
,
{
httpOnly
:
false
,
signed
:
false
,
path
:
'/'
,
overwrite
:
true
});
// }
// }
}
}
ctx
.
redirect
(
target_url2
);
ctx
.
redirect
(
target_url2
);
return
;
return
;
}
}
...
...
config/config.local.js
View file @
73ddaeb1
...
@@ -64,6 +64,18 @@ module.exports = appInfo => {
...
@@ -64,6 +64,18 @@ module.exports = appInfo => {
port
:
3306
,
port
:
3306
,
},
},
{
{
// 公积金数据库
timezone
:
'+08:00'
,
delegate
:
'gjjModel'
,
baseDir
:
'model/gjj'
,
dialect
:
'mysql'
,
host
:
'rm-bp1mnwmta5778y0d3jo.mysql.rds.aliyuncs.com'
,
database
:
'uatgjj'
,
username
:
'uatgjj'
,
password
:
'jianbingUATsljwd'
,
port
:
3306
,
},
{
// 东八时区
// 东八时区
timezone
:
'+08:00'
,
timezone
:
'+08:00'
,
delegate
:
'realestateModel'
,
delegate
:
'realestateModel'
,
...
@@ -71,7 +83,7 @@ module.exports = appInfo => {
...
@@ -71,7 +83,7 @@ module.exports = appInfo => {
// other sequelize configurations
// other sequelize configurations
dialect
:
'mysql'
,
dialect
:
'mysql'
,
host
:
'rm-bp1mnwmta5778y0d3jo.mysql.rds.aliyuncs.com'
,
host
:
'rm-bp1mnwmta5778y0d3jo.mysql.rds.aliyuncs.com'
,
database
:
'realestate_
dev
'
,
database
:
'realestate_
uat
'
,
username
:
'realestate'
,
username
:
'realestate'
,
password
:
'ppD1sDSutHG83T2s1Ue3k'
,
password
:
'ppD1sDSutHG83T2s1Ue3k'
,
port
:
3306
,
port
:
3306
,
...
@@ -84,9 +96,9 @@ module.exports = appInfo => {
...
@@ -84,9 +96,9 @@ module.exports = appInfo => {
// other sequelize configurations
// other sequelize configurations
dialect
:
'mysql'
,
dialect
:
'mysql'
,
host
:
'rm-bp1mnwmta5778y0d3jo.mysql.rds.aliyuncs.com'
,
host
:
'rm-bp1mnwmta5778y0d3jo.mysql.rds.aliyuncs.com'
,
database
:
'
dev
huodong'
,
database
:
'
uat
huodong'
,
username
:
'
dev
huodong'
,
username
:
'
uat
huodong'
,
password
:
'jianbing
2014GG
'
,
password
:
'jianbing
UATsljwd2016
'
,
port
:
3306
,
port
:
3306
,
},
},
{
{
...
@@ -97,7 +109,7 @@ module.exports = appInfo => {
...
@@ -97,7 +109,7 @@ module.exports = appInfo => {
// other sequelize configurations
// other sequelize configurations
dialect
:
'mysql'
,
dialect
:
'mysql'
,
host
:
'rm-bp1mnwmta5778y0d3jo.mysql.rds.aliyuncs.com'
,
host
:
'rm-bp1mnwmta5778y0d3jo.mysql.rds.aliyuncs.com'
,
database
:
'prometheus_
dev
'
,
database
:
'prometheus_
uat
'
,
username
:
'prometheus'
,
username
:
'prometheus'
,
password
:
'q9t8Ay4qIUW4sw3s25K28'
,
password
:
'q9t8Ay4qIUW4sw3s25K28'
,
port
:
3306
,
port
:
3306
,
...
...
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