Commit 71e4ec44 by 宋毅

tj

parent bba46df7
......@@ -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("/jdtm/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);
res.redirect(skipUrl);
res.redirect("/#/jd/jdindentlist?channelUserId=" + encodeURIComponent(userItemResult.data.encryptChannelUserId));
return;
});
app.get("/", async function (req, res) {
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