private static void RestoreUrl(List <SubjectOption> options, UeditorType type) { options.ForEach((o) => { o.Text = UeditorContentFactory.RestoreUrl(o.Text, type); }); }
public ActionResult GetDetails(int id) { CourseBll bll = new CourseBll(); var dtoDetails = bll.GetDetailOfManagements(id); var vm = dtoDetails.ConvertTo <CurriculumDetailsViewModel>( PropertyNamePrefixAction.Remove); vm.CoverImage = UeditorContentFactory.RestoreUrl(vm.CoverImage, UeditorType.Image); SuccessJsonResponse response = new SuccessJsonResponse { Data = vm }; return(Json(response, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 课程制作详情视图动作 /// </summary> /// <returns></returns> public ActionResult MakeInfo(int id = 0) { CourseBll bll = new CourseBll(); var model = bll.GetDetails(id); var vm = model.ConvertTo <CurriculumDetailsViewModel>( PropertyNamePrefixAction.Remove); vm.CoverImage = UeditorContentFactory.RestoreUrl( vm.CoverImage, UeditorType.Image); if (model != null) { return(View(vm)); } else { return(View(new CurriculumDetailsViewModel())); } }