public AjaxResponse <string> Convert([FromBody] ConvertPost convertPost) { try { var defaultChart = _convertService.GenerateDefaultChart(convertPost.InputText, convertPost.From, convertPost.CheckRepeat, convertPost.Delay); return(new AjaxResponse <string>(_convertService.CovertDefaultChart(defaultChart, convertPost.To))); } catch (FormatErrorException) { return(new AjaxResponse <string>(new ErrorInfo("谱面转换出错,请确认格式是否正确"))); } catch (OutputErrorException) { return(new AjaxResponse <string>(new ErrorInfo("谱面导出时发生错误"))); } catch (Exception e) { return(new AjaxResponse <string>(new ErrorInfo(e.Message))); } }