提交 4cf3d682 编写于 作者: KK's avatar KK

调整control-service

上级 9c6cc832
...@@ -168,7 +168,7 @@ export class ControlServiceBase { ...@@ -168,7 +168,7 @@ export class ControlServiceBase {
* @memberof ControlServiceBase * @memberof ControlServiceBase
*/ */
public async add(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> { public async add(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
let response: HttpResponse = new HttpResponse(201); let response: any;
await this.onBeforeAction(action, context, data, isLoading); await this.onBeforeAction(action, context, data, isLoading);
try{ try{
data = this.handleRequestData(action, context, data); data = this.handleRequestData(action, context, data);
...@@ -199,7 +199,7 @@ export class ControlServiceBase { ...@@ -199,7 +199,7 @@ export class ControlServiceBase {
* @memberof ControlServiceBase * @memberof ControlServiceBase
*/ */
public async delete(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> { public async delete(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
let response: HttpResponse = new HttpResponse(201); let response: any;
await this.onBeforeAction(action, context, data, isLoading); await this.onBeforeAction(action, context, data, isLoading);
try{ try{
data = this.handleRequestData(action, context, data); data = this.handleRequestData(action, context, data);
...@@ -230,7 +230,7 @@ export class ControlServiceBase { ...@@ -230,7 +230,7 @@ export class ControlServiceBase {
* @memberof ControlServiceBase * @memberof ControlServiceBase
*/ */
public async update(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> { public async update(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
let response: HttpResponse = new HttpResponse(201); let response: any;
await this.onBeforeAction(action, context, data, isLoading); await this.onBeforeAction(action, context, data, isLoading);
try{ try{
data = this.handleRequestData(action, context, data); data = this.handleRequestData(action, context, data);
...@@ -261,7 +261,7 @@ export class ControlServiceBase { ...@@ -261,7 +261,7 @@ export class ControlServiceBase {
* @memberof ControlServiceBase * @memberof ControlServiceBase
*/ */
public async get(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> { public async get(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
let response: HttpResponse = new HttpResponse(201); let response: any;
await this.onBeforeAction(action, context, data, isLoading); await this.onBeforeAction(action, context, data, isLoading);
try{ try{
data = this.handleRequestData(action, context, data); data = this.handleRequestData(action, context, data);
...@@ -292,7 +292,7 @@ export class ControlServiceBase { ...@@ -292,7 +292,7 @@ export class ControlServiceBase {
* @memberof ControlServiceBase * @memberof ControlServiceBase
*/ */
public async loadDraft(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> { public async loadDraft(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
let response: HttpResponse = new HttpResponse(201); let response: any;
await this.onBeforeAction(action, context, data, isLoading); await this.onBeforeAction(action, context, data, isLoading);
try{ try{
...@@ -330,7 +330,7 @@ export class ControlServiceBase { ...@@ -330,7 +330,7 @@ export class ControlServiceBase {
* @memberof EditServiceBase * @memberof EditServiceBase
*/ */
public async frontLogic(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> { public async frontLogic(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
let response: HttpResponse = new HttpResponse(201); let response: any;
await this.onBeforeAction(action, context, data, isLoading); await this.onBeforeAction(action, context, data, isLoading);
try{ try{
data = this.handleRequestData(action, context, data); data = this.handleRequestData(action, context, data);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册