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
bba46df7
Commit
bba46df7
authored
Dec 13, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
e28db10e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
6 deletions
+31
-6
igirl-channel-jdweb/app/base/controller/impl/trademark/tmqueryCtl.js
+12
-3
igirl-channel-jdweb/app/config/routes/web.js
+19
-3
No files found.
igirl-channel-jdweb/app/base/controller/impl/trademark/tmqueryCtl.js
View file @
bba46df7
...
...
@@ -188,7 +188,16 @@ class tmqueryCtl extends CtlBase {
async
getUserIdEncryptStr
(
pobj
,
qobj
,
req
)
{
try
{
if
(
!
req
.
session
.
userPinInfo
)
{
return
system
.
getResult
(
null
,
"user is not login..."
);
var
userInfo
=
await
this
.
createUserInfo
(
pobj
,
qobj
,
req
);
if
(
userInfo
.
status
!=
0
)
{
return
system
.
getResult
(
null
,
"user is not login..."
);
}
if
(
req
.
session
.
userPinInfo
.
encryptChannelUserId
)
{
return
system
.
getResultSuccess
({
encryptChannelUserId
:
req
.
session
.
userPinInfo
.
encryptChannelUserId
});
}
}
if
(
req
.
session
.
userPinInfo
.
encryptChannelUserId
)
{
return
system
.
getResultSuccess
({
encryptChannelUserId
:
req
.
session
.
userPinInfo
.
encryptChannelUserId
});
}
var
tokenInfo
=
await
this
.
getToken
(
pobj
.
actionProcess
);
if
(
tokenInfo
.
status
!=
0
)
{
...
...
@@ -216,7 +225,7 @@ class tmqueryCtl extends CtlBase {
return
system
.
getResultFail
(
-
200
,
"操作error"
);
}
}
async
getUserInfoTest
(
pobj
,
qobj
,
req
)
{
async
createUserInfo
(
pobj
,
qobj
,
req
)
{
try
{
var
tokenInfo
=
await
this
.
getToken
(
pobj
.
actionProcess
);
if
(
tokenInfo
.
status
!=
0
)
{
...
...
@@ -226,7 +235,7 @@ class tmqueryCtl extends CtlBase {
var
param
=
{
actionProcess
:
pobj
.
actionProcess
,
actionType
:
"createChannelUser"
,
actionBody
:
{
channelUserId
:
pobj
.
tmp
channelUserId
},
actionBody
:
{
channelUserId
:
pobj
.
channelUserId
},
isUser
:
"yes"
};
var
reqUrl
=
this
.
channelApiUrl
+
"/action/tmTools/springBoard"
;
...
...
igirl-channel-jdweb/app/config/routes/web.js
View file @
bba46df7
...
...
@@ -64,11 +64,27 @@ 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://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
)
}
};
res
.
end
(
JSON
.
stringify
(
params
));
...
...
@@ -85,9 +101,9 @@ module.exports = function (app) {
actionProcess
:
"jd"
,
authUrl
:
"https://oauth2.jdcloud.com/userinfo"
,
authToken
:
params
.
token_type
+
" "
+
params
.
access_token
,
tmp
channelUserId
:
params
.
tmpchannelUserId
channelUserId
:
params
.
tmpchannelUserId
};
var
userItemResult
=
await
tmqueryCtl
.
getUserInfoTest
(
getUserparams
,
req
.
query
,
req
);
var
userItemResult
=
await
tmqueryCtl
.
createUserInfo
(
getUserparams
,
req
.
query
,
req
);
if
(
userItemResult
.
status
!=
0
)
{
res
.
redirect
(
"/#/jd/jdtrademark"
);
return
;
...
...
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