Commit 0416bb93 by 宋毅

tj

parent a1d2aad0
......@@ -7,7 +7,7 @@ class tmqueryCtl extends CtlBase {
super();
this.channelApiUrl = settings.channelApiUrl();
this.appInfo = {
1688: { appkey: "201911051030", secret: "eeb18393aade40149287b024d8ba0850", selfRegistProduct: ["5743091"] }
1688: { appkey: "201911131657", secret: "eeb18393aade40149287b024d8ba0850", selfRegistProduct: ["5743091"] }
};
this.execClient = system.getObject("util.execClient");
}
......@@ -44,10 +44,12 @@ class tmqueryCtl extends CtlBase {
}
var oldActionType = reqobj.actionType;
var oldActionBody = reqobj.actionBody;
var oldIsUser = reqobj.isUser;
if (reqobj.isDecryptUser == "yes") {
reqobj.actionType = "decryptStr";
reqobj.isUser = "no";
let currentDate = Math.floor(new Date().getTime() / 1000);
reqobj.actionBody = { opStr: oldActionBody.channelUserId, timeStamp: currentDate };
reqobj.actionBody = { opStr: decodeURIComponent(oldActionBody.channelUserId), timeStamp: currentDate };
var decryptSignResult = await this.createSign(reqobj.actionBody, tokenInfo.data.secret);
if (decryptSignResult.status != 0) {
return decryptSignResult;
......@@ -69,6 +71,7 @@ class tmqueryCtl extends CtlBase {
oldActionBody.channelUserId = decryptResult.data;
reqobj.actionType = oldActionType;
reqobj.actionBody = oldActionBody;
reqobj.isUser = oldIsUser;
var signResult = await this.createSign(reqobj.actionBody, tokenInfo.data.secret);
if (signResult.status != 0) {
return signResult;
......
module.exports = {
"appid": "bfe73612fa024822941e3e1ecd9a06e1",
"label": "研发开放平台",
"appid": "201911061258",
"label": "知产渠道api web应用",
"config": {
"rstree": {
"code": "paasroot",
......
......@@ -17,7 +17,7 @@ module.exports = function (app) {
res.end(JSON.stringify(result));
return;
}
var skipUrl = "/#/1688/jdindentlist?channelUserId=" + result.data;
var skipUrl = "/#/1688/jdindentlist?channelUserId=" + encodeURIComponent(result.data);
res.redirect(skipUrl);
});
app.get("/1688/auxRegister", async function (req, res) {
......@@ -34,7 +34,7 @@ module.exports = function (app) {
res.end(JSON.stringify(result));
return;
}
var skipUrl = "/#/1688/jdindentlist?channelUserId=" + result.data;
var skipUrl = "/#/1688/jdindentlist?channelUserId=" + encodeURIComponent(result.data);
res.redirect(skipUrl);
});
app.get("/", async function (req, res) {
......
......@@ -13,7 +13,7 @@ var ENVINPUT = {
};
var settings = {
env: ENVINPUT.APP_ENV,
appKey: "bfe73612fa024822941e3e1ecd9a06e1",
appKey: "201911061258",
paasKey: "wx76a324c5d201d1a4",
secret: "1671ab5405fa49c8b5dd0b0c55c279b8",
salt: "%iatpD1gcxz7iF#B",
......
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