Commit 71e4ec44 by 宋毅

tj

parent bba46df7
...@@ -64,52 +64,41 @@ module.exports = function (app) { ...@@ -64,52 +64,41 @@ module.exports = function (app) {
res.end(JSON.stringify(result)); res.end(JSON.stringify(result));
return; 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 = var params =
{ {
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://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)); res.end(JSON.stringify(params));
return; return;
}); });
app.get("/jdtm/getUserTest", async function (req, res) { app.get("/jd/skipPage", async function (req, res) {
console.log(req.query, "/jdtm/getUser...................."); logClient.payLog("jd", {
var params = req.query; optitle: "###操作订单结果后跳转参数...skipPage",
if (!params.state) { op: "/jd/skipPage",
res.redirect("/#/jd/jdtrademark"); content: "req.query=" + JSON.stringify(req.query) + ",req.body=" + JSON.stringify(req.body),
return; clientIp: ""
} });
var getUserparams = { var getUserparams = {
actionProcess: "jd", actionProcess: "jd",
authUrl: "https://oauth2.jdcloud.com/userinfo", channelUserId: req.query.channelUserId
authToken: params.token_type + " " + params.access_token,
channelUserId: params.tmpchannelUserId
}; };
var userItemResult = await tmqueryCtl.createUserInfo(getUserparams, req.query, req); var userItemResult = await tmqueryCtl.getUserIdEncryptStr(getUserparams, req.query, req);
if (userItemResult.status != 0) { if (userItemResult.status != 0) {
logClient.payLog("jd", {
optitle: "###操作订单结果...orderNotify...加密用户错误",
op: "/jd/orderNotify",
content: "result=" + JSON.stringify(result),
clientIp: ""
});
res.redirect("/#/jd/jdtrademark"); res.redirect("/#/jd/jdtrademark");
return; return;
} }
var skipUrl = "/#/jd/" + params.state + "?channelUserId=" + encodeURIComponent(userItemResult.data.encryptChannelUserId); res.redirect("/#/jd/jdindentlist?channelUserId=" + encodeURIComponent(userItemResult.data.encryptChannelUserId));
res.redirect(skipUrl); return;
}); });
app.get("/", async function (req, res) { app.get("/", async function (req, res) {
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment