Commit 0416bb93 by 宋毅

tj

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