Commit 526a5022 by 宋毅

tj

parent 95096ca2
......@@ -1179,14 +1179,17 @@ auther:sy
try {
rtn = await rc.execPost(params, requrl);
var j = JSON.parse(rtn.stdout);
console.log(rtn.stdout, "rtn.stdout........................############################");
// console.log(rtn.stdout, "rtn.stdout........................############################");
var res = {};
res.total = 0;
res.data = [];
if (j.hits.total > 0) {
res.total = j.hits.total;
for (var x in j.hits.hits) {
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......
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