formatResponse static method

String formatResponse(
  1. Map<String, dynamic> result
)

Implementation

static String formatResponse(Map<String,dynamic> result) {
  try {
    return jsonEncode(Cm005BaseResponse.fromJson(result).toJson());
  } catch (e) {
    return jsonEncode({
        "success": false,
        "message": "数据解析异常",
        "code": 500,
        "result": null,
    });
  }
}