Commit 79247f95 by 王栋源

wdy

parent a0138363
......@@ -49,7 +49,7 @@ class UtilsNeedSve extends AppServiceBase {
"actionType": pobj.action_type,
"actionBody": pobj
}
var self=this;
var self = this;
var tokenInfo = await this.getCenterToken();
if (tokenInfo.status != 0) {
return {
......@@ -91,13 +91,47 @@ class UtilsNeedSve extends AppServiceBase {
rtn = await self.execlient.execDataPostByTokenUserPin(sobj, url, token, userpin);
} else {
rtn = await self.execlient.execPostTK(sobj, url, token);
return rtn;
if (rtn.status == 0) {
return {
"requestId": rtn.requestId,
"success": true,
"errorMsg": "",
"errorCode": "ok"
};
} else {
return {
"requestId": rtn.requestId,
"success": false,
"errorMsg": rtn.msg,
"errorCode": "ok"
};
}
}
if (!rtn || !rtn.stdout) {
return system.getResult(null, "execPost is empty");
return {
"requestId": self.getUUID(),
"success": false,
"errorMsg": "网络错误",
"errorCode": "ok"
};
}
var result = JSON.parse(rtn.stdout);
return result;
if (result.status == 0) {
return {
"requestId": result.requestId,
"success": true,
"errorMsg": "",
"errorCode": "ok"
};
} else {
return {
"requestId": result.requestId,
"success": false,
"errorMsg": result.msg,
"errorCode": "ok"
};
}
}
......
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