Commit 9f4a44e2 by linboxuan

lin pannong

parent 4f72dd0b
......@@ -87,8 +87,12 @@ class SignService{
}
for (let k = 0; k < keys.length; k++) {
const tKey = keys[k];
if (tKey != "sign" && params[tKey] && !(params[tKey] instanceof Array)) {
signArr.push(tKey + "=" + params[tKey]);
if (tKey != "sign" && params[tKey]) {
let tmpKeyValue = params[tKey];
if (tmpKeyValue instanceof Array || tmpKeyValue instanceof Object) {
tmpKeyValue = JSON.stringify(tmpKeyValue);
}
signArr.push(tKey + "=" + tmpKeyValue);
}
}
if (signArr.length == 0) {
......@@ -98,10 +102,10 @@ class SignService{
var resultTmpSign = md5(resultSignStr).toUpperCase();
return system.getResultSuccess(resultTmpSign);
}
}
module.exports = SignService;
// var task = new SignService();
var task = new SignService();
// var obj = {
// "intentionBizId": "TRE-nmnHtEoTjeEtest",
// "phone": "13126673246",
......@@ -113,3 +117,23 @@ module.exports = SignService;
// task.createSign(obj,"7cbb892450174167b5c7e01we4716t51").then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
// });
// var obj = {
// "bizId":"202011031421",
// "contactName":"lin",
// "contactMobile":"13911391996",
// "timeUnit":"year",
// "quantity":1,
// "companyInfo":{
// "companyName":"公司宝",
// "taxpayerType":"NORMAL_TAXPAYER",
// "acctgSystemId":"10001",
// "companyForm":"1",
// "industry":"1",
// "taxpayerNumber":"123456789",
// "companyArea":"北京"
// }
// }
// task.createSign(obj,"7cbb892450174167b5c7e01we4717z51").then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
// });
\ No newline at end of file
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