public IHttpActionResult GetCourses(int id) { var res = new ResponseBase(); try { var service = new WxService(); var data = service.GetCourse(id); res.resData = data; } catch (Exception ex) { res.code = "100"; res.msg = ex.Message; } return(Ok(res)); }