public IActionResult Get(string docTypeId) { /*判断是否合法*/ if (ModelState.IsValid) { try { var docTypeInfo = DocTypeConfig.GetModel(docTypeId); var childNodes = DocTypeConfig.GetChildNodes(docTypeId); return(null == docTypeInfo ? Ok(new { result = false, tips = ResponseMessageTips.MSG_DOCTYPE_INFO_NO_FOUND }) : Ok(new { result = true, tips = ResponseMessageTips.MSG_PROCESS_SUCCESS, data = new { detail = docTypeInfo, childNodes = childNodes } })); } catch (Exception e) { return(Ok(new { result = false, tips = ResponseMessageTips.MSG_PROCESS_EXCEPTION + e.Message.ToString() })); } } return(Ok(new { result = false, tips = ResponseMessageTips.MSG_PROCESS_DATA_FORMAT_ERROR })); }