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
4e3f8114
Commit
4e3f8114
authored
Dec 24, 2019
by
刘泽奇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'igirl-channel-web' of gitlab.gongsibao.com:jiangyong/zhichan into igirl-channel-web
parents
b769d2e6
4447e031
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
5 deletions
+46
-5
igirl-channel-web/app/base/controller/impl/trademark/tmqueryCtl.js
+3
-3
igirl-channel-web/app/config/routes/web.js
+43
-2
No files found.
igirl-channel-web/app/base/controller/impl/trademark/tmqueryCtl.js
View file @
4e3f8114
...
@@ -353,7 +353,7 @@ class tmqueryCtl extends CtlBase {
...
@@ -353,7 +353,7 @@ class tmqueryCtl extends CtlBase {
var
payDataResult
=
JSON
.
parse
(
tmpResult
.
data
);
var
payDataResult
=
JSON
.
parse
(
tmpResult
.
data
);
if
(
payDataResult
&&
payDataResult
.
success
&&
payDataResult
.
success
==
true
)
{
if
(
payDataResult
&&
payDataResult
.
success
&&
payDataResult
.
success
==
true
)
{
//更新订单信息
//更新订单信息
var
channelServiceNo
=
payDataResult
.
data
.
erpOrderId
;
var
channelServiceNo
=
payDataResult
.
data
.
orderNumber
;
var
needNo
=
pobj
.
actionBody
.
itemCode
+
"_"
+
payDataResult
.
data
.
orderNumber
;
var
needNo
=
pobj
.
actionBody
.
itemCode
+
"_"
+
payDataResult
.
data
.
orderNumber
;
var
needNoOrderNo
=
payDataResult
.
data
.
orderNumber
;
var
needNoOrderNo
=
payDataResult
.
data
.
orderNumber
;
await
this
.
putPayOrderData
(
pobj
,
orderResult
,
channelServiceNo
,
needNo
,
needNoOrderNo
,
req
);
await
this
.
putPayOrderData
(
pobj
,
orderResult
,
channelServiceNo
,
needNo
,
needNoOrderNo
,
req
);
...
@@ -489,8 +489,8 @@ class tmqueryCtl extends CtlBase {
...
@@ -489,8 +489,8 @@ class tmqueryCtl extends CtlBase {
channelUserId
:
pushData
.
jdPin
,
channelUserId
:
pushData
.
jdPin
,
payStatus
:
"yfk"
,
payStatus
:
"yfk"
,
channelItemCode
:
pushData
.
skuId
,
channelItemCode
:
pushData
.
skuId
,
needNo
:
pushData
.
skuId
+
"_"
+
pushData
.
order
Id
,
needNo
:
pushData
.
skuId
+
"_"
+
pushData
.
order
Number
,
needNoOrderNo
:
pushData
.
order
Id
,
needNoOrderNo
:
pushData
.
order
Number
,
buyerMoblie
:
pushData
.
mobile
buyerMoblie
:
pushData
.
mobile
},
},
isUser
:
"yes"
isUser
:
"yes"
...
...
igirl-channel-web/app/config/routes/web.js
View file @
4e3f8114
...
@@ -48,6 +48,47 @@ module.exports = function (app) {
...
@@ -48,6 +48,47 @@ module.exports = function (app) {
});
});
}
}
});
});
app
.
get
(
"/jdtm/loginUser"
,
async
function
(
req
,
res
)
{
try
{
var
params
=
req
.
query
;
if
(
!
params
.
state
||
!
params
.
token_type
||
!
params
.
access_token
)
{
res
.
redirect
(
"http://oauth2.jdcloud.com/authorize?response_type=token&redirect_uri=http://tm.plus.jdcloud.com/jdtm/loginUser&state=jdindentlist&client_id=9841572588670903"
);
return
;
}
var
getUserparams
=
{
actionProcess
:
"jd"
,
authUrl
:
"https://oauth2.jdcloud.com/userinfo"
,
authToken
:
params
.
token_type
+
" "
+
params
.
access_token
};
var
userItemResult
=
await
tmqueryCtl
.
getJdUserInfo
(
getUserparams
,
req
.
query
,
req
);
logClient
.
info
(
"jd"
,
{
optitle
:
"###获取京东用户结果...getJdUserInfo"
,
op
:
"/jdtm/loginUser"
,
content
:
"参数="
+
JSON
.
stringify
(
getUserparams
)
+
",result="
+
JSON
.
stringify
(
userItemResult
),
clientIp
:
""
});
if
(
userItemResult
.
status
!=
0
)
{
res
.
redirect
(
"/#/jd/jdindentlist"
);
return
;
}
if
(
!
userItemResult
.
data
.
encryptChannelUserId
||
userItemResult
.
data
.
encryptChannelUserId
==
"undefined"
)
{
userItemResult
=
await
tmqueryCtl
.
getUserIdEncryptStr
(
getUserparams
,
req
.
query
,
req
);
if
(
userItemResult
.
status
!=
0
)
{
res
.
redirect
(
"/#/jd/jdindentlist"
);
return
;
}
}
var
skipUrl
=
"/#/jd/"
+
params
.
state
+
"?channelUserId="
+
encodeURIComponent
(
userItemResult
.
data
.
encryptChannelUserId
);
res
.
redirect
(
skipUrl
);
}
catch
(
error
)
{
logClient
.
error
(
"jd"
,
{
optitle
:
"###获取京东用户异常...getJdUserInfo"
,
op
:
"/jdtm/loginUser"
,
content
:
error
.
stack
,
clientIp
:
""
});
}
});
app
.
get
(
"/jd/orderNotify"
,
async
function
(
req
,
res
)
{
app
.
get
(
"/jd/orderNotify"
,
async
function
(
req
,
res
)
{
logClient
.
payLog
(
"jd"
,
{
logClient
.
payLog
(
"jd"
,
{
optitle
:
"###操作订单结果参数...orderNotify"
,
optitle
:
"###操作订单结果参数...orderNotify"
,
...
@@ -71,8 +112,8 @@ module.exports = function (app) {
...
@@ -71,8 +112,8 @@ module.exports = function (app) {
{
{
instanceId
:
req
.
query
.
orderBizId
,
instanceId
:
req
.
query
.
orderBizId
,
appInfo
:
{
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/skipPage?channelUserId="
+
req
.
query
.
jdPin
,
a
uthUrl
:
"http://tm.plus.jdcloud.com/jd/skipPage?channelUserId="
+
req
.
query
.
jdPin
a
dminUrl
:
"http://tm.plus.jdcloud.com/jdtm/loginUser"
}
}
};
};
res
.
end
(
JSON
.
stringify
(
params
));
res
.
end
(
JSON
.
stringify
(
params
));
...
...
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