提交 1d6c76da 编写于 作者: KK's avatar KK

判断方式调整

上级 39827c46
......@@ -177,7 +177,7 @@ export class ControlServiceBase {
} else {
response = await this.service.Create(context, data, isLoading);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response);
}
}catch (error) {
......@@ -208,7 +208,7 @@ export class ControlServiceBase {
} else {
response = await this.service.Remove(context, data, isLoading);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response);
}
}catch (error) {
......@@ -239,7 +239,7 @@ export class ControlServiceBase {
} else {
response = await this.service.Update(context, data, isLoading);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response);
}
}catch(error){
......@@ -270,7 +270,7 @@ export class ControlServiceBase {
} else {
response = await this.service.Get(context, data, isLoading);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response);
}
}catch (error) {
......@@ -306,7 +306,7 @@ export class ControlServiceBase {
} else {
response = await this.service.GetDraft(context, data, isLoading);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response, true);
this.mergeDefaults(response);
}
......@@ -340,7 +340,7 @@ export class ControlServiceBase {
} else {
response = new HttpResponse(200, null, { code: 100, message: `${action}前台逻辑未实现` });
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response, true);
}
}catch (error) {
......
......@@ -29,7 +29,7 @@ export class DataViewServiceBase extends ControlServiceBase {
} else {
response = await this.service.FetchDefault(context, data);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response);
}
await this.onAfterAction(action, context, response);
......
......@@ -44,7 +44,7 @@ export class FormServiceBase extends ControlServiceBase {
} else {
response = await this.service.Create(context, data);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response);
}
await this.onAfterAction(action, context, response);
......@@ -71,7 +71,7 @@ export class FormServiceBase extends ControlServiceBase {
} else {
response = await this.service.WFSubmit(context, data, wfdata);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response);
}
await this.onAfterAction(action, context, response);
......
......@@ -29,7 +29,7 @@ export class MdServiceBase extends ControlServiceBase {
} else {
response = await this.service.FetchDefault(context, data);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response);
}
await this.onAfterAction(action, context, response);
......
......@@ -29,7 +29,7 @@ export class WizardPanelServiceBase extends ControlServiceBase {
} else {
response = await this.service.Create(context, data);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response);
}
await this.onAfterAction(action, context, response);
......@@ -55,7 +55,7 @@ export class WizardPanelServiceBase extends ControlServiceBase {
} else {
response = await this.service.Update(context, data);
}
if (!response.isError && response.isError()) {
if (!response.isError()) {
response = this.handleResponse(action, response);
}
await this.onAfterAction(action, context, response);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册