Commit 16a68e13 by 任晓松

update

parent f651d54a
...@@ -34,50 +34,50 @@ class ExecClientNew { ...@@ -34,50 +34,50 @@ class ExecClientNew {
} }
} }
try { try {
// if (settings.env === "localhost" || settings.env === "dev") { if (settings.env === "localhost" || settings.env === "dev") {
// var headers = { var headers = {
// 'Content-type': 'application/json' 'Content-type': 'application/json'
// } }
// if (headData) { if (headData) {
// var headDataKeys = Object.keys(headData); var headDataKeys = Object.keys(headData);
// if (headDataKeys.length > 0) { if (headDataKeys.length > 0) {
// for (let index = 0; index < headDataKeys.length; index++) { for (let index = 0; index < headDataKeys.length; index++) {
// const indexKey = headDataKeys[index]; const indexKey = headDataKeys[index];
// var headValue = headData[indexKey]; var headValue = headData[indexKey];
// if (indexKey && headValue) { if (indexKey && headValue) {
// headers[indexKey] = headValue; headers[indexKey] = headValue;
// } }
// } }
// } }
// } }
// axios.default.timeout = timeOut; axios.default.timeout = timeOut;
// let result = await axios({ let result = await axios({
// // headers: {'Content-Type': 'application/x-www-form-urlencoded'}, // headers: {'Content-Type': 'application/x-www-form-urlencoded'},
// headers: headers, headers: headers,
// method: 'POST', method: 'POST',
// url: url, url: url,
// data: JSON.stringify(params) data: JSON.stringify(params)
// }); });
// if (result.status == 200) { if (result.status == 200) {
// reqResult = system.getResultSuccess(result.data); reqResult = system.getResultSuccess(result.data);
//
// } else { } else {
// reqResult = system.getResult(null, "执行execPostTimeOutByBusiness存在错误"); reqResult = system.getResult(null, "执行execPostTimeOutByBusiness存在错误");
// } }
// reqResult.requestId = requestId || uuid.v1(); reqResult.requestId = requestId || uuid.v1();
// if (result.headers) { if (result.headers) {
// delete result["headers"]; delete result["headers"];
// } }
// if (result.request) { if (result.request) {
// delete result["request"]; delete result["request"];
// } }
// if (result.config) { if (result.config) {
// delete result["config"]; delete result["config"];
// } }
// params.reqUrl = url; params.reqUrl = url;
// this.execLogs(execFile + "执行execPostTimeOutByBusiness,errorInfo信息为请求的返回结果", params, params.identifyCode, reqResult, result); this.execLogs(execFile + "执行execPostTimeOutByBusiness,errorInfo信息为请求的返回结果", params, params.identifyCode, reqResult, result);
// return reqResult; return reqResult;
// } }
//方式二 //方式二
rtn = await this.execPostTimeOut(params, url, ContentType, headData, timeOut); rtn = await this.execPostTimeOut(params, url, ContentType, headData, timeOut);
params.reqUrl = url; params.reqUrl = url;
...@@ -182,7 +182,6 @@ class ExecClientNew { ...@@ -182,7 +182,6 @@ class ExecClientNew {
ContentType = "application/json"; ContentType = "application/json";
} }
let cmd = this.FetchPostCmd(params, url, ContentType, headData); let cmd = this.FetchPostCmd(params, url, ContentType, headData);
console.log(cmd)
var options = { var options = {
timeout: timeOut, timeout: timeOut,
maxBuffer: 1024 * 1024 * 15 maxBuffer: 1024 * 1024 * 15
......
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