Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
71e4ec44
Commit
71e4ec44
authored
Dec 13, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
bba46df7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
29 deletions
+18
-29
igirl-channel-jdweb/app/config/routes/web.js
+18
-29
No files found.
igirl-channel-jdweb/app/config/routes/web.js
View file @
71e4ec44
...
...
@@ -64,52 +64,41 @@ module.exports = function (app) {
res
.
end
(
JSON
.
stringify
(
result
));
return
;
}
var
getUserparams
=
{
actionProcess
:
"jd"
,
channelUserId
:
req
.
query
.
jdPin
};
var
userItemResult
=
await
tmqueryCtl
.
getUserIdEncryptStr
(
getUserparams
,
req
.
query
,
req
);
if
(
userItemResult
.
status
!=
0
)
{
logClient
.
payLog
(
"jd"
,
{
optitle
:
"###操作订单结果...orderNotify...加密用户错误"
,
op
:
"/jd/orderNotify"
,
content
:
"result="
+
JSON
.
stringify
(
result
),
clientIp
:
""
});
res
.
redirect
(
"/#/jd/jdtrademark"
);
return
;
}
var
params
=
{
instanceId
:
req
.
query
.
orderBizId
,
appInfo
:
{
// authUrl: "http://oauth2.jdcloud.com/authorize?response_type=token&redirect_uri=http://tm.plus.jdcloud.com/jdtm/getUser&state=jdindentlist&client_id=9841572588670903"
authUrl
:
"http://tm.plus.jdcloud.com/
#/jd/jdindentlist?channelUserId="
+
encodeURIComponent
(
userItemResult
.
data
.
encryptChannelUserId
)
authUrl
:
"http://tm.plus.jdcloud.com/
jd/skipPage?channelUserId="
+
req
.
query
.
jdPin
}
};
res
.
end
(
JSON
.
stringify
(
params
));
return
;
});
app
.
get
(
"/jd
tm/getUserTest
"
,
async
function
(
req
,
res
)
{
console
.
log
(
req
.
query
,
"/jdtm/getUser...................."
);
var
params
=
req
.
query
;
if
(
!
params
.
state
)
{
res
.
redirect
(
"/#/jd/jdtrademark"
);
return
;
}
app
.
get
(
"/jd
/skipPage
"
,
async
function
(
req
,
res
)
{
logClient
.
payLog
(
"jd"
,
{
optitle
:
"###操作订单结果后跳转参数...skipPage"
,
op
:
"/jd/skipPage"
,
content
:
"req.query="
+
JSON
.
stringify
(
req
.
query
)
+
",req.body="
+
JSON
.
stringify
(
req
.
body
),
clientIp
:
""
}
);
var
getUserparams
=
{
actionProcess
:
"jd"
,
authUrl
:
"https://oauth2.jdcloud.com/userinfo"
,
authToken
:
params
.
token_type
+
" "
+
params
.
access_token
,
channelUserId
:
params
.
tmpchannelUserId
channelUserId
:
req
.
query
.
channelUserId
};
var
userItemResult
=
await
tmqueryCtl
.
createUserInfo
(
getUserparams
,
req
.
query
,
req
);
var
userItemResult
=
await
tmqueryCtl
.
getUserIdEncryptStr
(
getUserparams
,
req
.
query
,
req
);
if
(
userItemResult
.
status
!=
0
)
{
logClient
.
payLog
(
"jd"
,
{
optitle
:
"###操作订单结果...orderNotify...加密用户错误"
,
op
:
"/jd/orderNotify"
,
content
:
"result="
+
JSON
.
stringify
(
result
),
clientIp
:
""
});
res
.
redirect
(
"/#/jd/jdtrademark"
);
return
;
}
var
skipUrl
=
"/#/jd/"
+
params
.
state
+
"?channelUserId="
+
encodeURIComponent
(
userItemResult
.
data
.
encryptChannelUserId
);
re
s
.
redirect
(
skipUrl
)
;
res
.
redirect
(
"/#/jd/jdindentlist?channelUserId="
+
encodeURIComponent
(
userItemResult
.
data
.
encryptChannelUserId
)
);
re
turn
;
});
app
.
get
(
"/"
,
async
function
(
req
,
res
)
{
try
{
...
...
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