import {Result} from './Result'; export class JSONResponse { // 响应结果 // tslint:disable-next-line:variable-name private _result: Result; // 响应详细结果 // tslint:disable-next-line:variable-name private _message: string; // 自定义其他响应信息 // tslint:disable-next-line:variable-name private _body: T; get result(): Result { return this._result; } set result(value: Result) { this._result = value; } get message(): string { return this._message; } set message(value: string) { this._message = value; } get body(): T { return this._body; } set body(value: T) { this._body = value; } }