Commit 19a0001c by 王悦

fix解析错误

parent 2a04c537
...@@ -28,7 +28,12 @@ class GatewaypushlogService extends ServiceBase { ...@@ -28,7 +28,12 @@ class GatewaypushlogService extends ServiceBase {
} }
var url = settings.gatewayUrl() + "action/intentionapi/springBoard"; var url = settings.gatewayUrl() + "action/intentionapi/springBoard";
var rtn = await self.execClient.execPost(requestdata, url); var rtn = await self.execClient.execPost(requestdata, url);
var data = JSON.parse(rtn.stdout); var data = rtn
try {
data = JSON.parse(rtn.stdout);
}catch (e) {
console.error(e)
}
if (data.success) { if (data.success) {
icloginfo.pushStatus = "yts"; icloginfo.pushStatus = "yts";
} else { } else {
...@@ -45,7 +50,7 @@ class GatewaypushlogService extends ServiceBase { ...@@ -45,7 +50,7 @@ class GatewaypushlogService extends ServiceBase {
return system.getResultSuccess(); return system.getResultSuccess();
} catch (error) { } catch (error) {
this.dingClient.gatewayPushError({message:"Exception",api:"center-channel/taskAliIcapi"}) this.dingClient.gatewayPushError({message:"Exception",api:"center-channel/taskAliIcapi",error})
return system.getResultFail(-1,error); return system.getResultFail(-1,error);
} }
} }
......
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