public JsonModel() { _res = new JsonParam(); _jsonResult = new JsonResult() { JsonRequestBehavior = JsonRequestBehavior.AllowGet }; }
public JsonResult SetResult(JsonParam param) { if (param == null) { return(Defeate()); } _jsonResult.Data = param; return(_jsonResult); }
/// <summary> /// 自定义响应结果 *支持多语言* /// </summary> /// <param name="param"></param> /// <param name="_IsTranslate">是否进行翻译(默认翻译)</param> /// <returns></returns> public JsonResult SetResult(JsonParam param, bool _IsTranslate = true) { if (param == null) { return(Defeate(_IsTranslate)); } jsonResult.Data = param; return(jsonResult); }