(this["webpackJsonpmr-julyedu"]=this["webpackJsonpmr-julyedu"]||[]).push([[59],{1068:function(e,t,a){},1174:function(e,t,a){"use strict";a.r(t);a(40);var c=a(6),s=a.n(c),o=a(0),r=a.n(o),n=a(1),l=a(20),i=a(590),m=a(592);a(1068);class d extends o.Component{constructor(e){super(e),this.fetchCourseList=()=>{const e=this.props.match.params.id||0;n.f.get("".concat(API.home,"/sys/school/").concat(e)).then(e=>{const t=e.data,a=t.code,c=t.data;200===a&&(this.setState({header:c.name,courseList:c.data}),document.title="\u52a9\u529b\u9ad8\u6821\u5728\u7ebf\u6559\u5b66\u8ba1\u5212\u4e4b".concat(c.name,"\u4e13\u533a - \u4e03\u6708\u5728\u7ebf"))})},this.toCourseDetail=e=>{const t=this.props,a=t.history,c=t.match.params.id||0;n.f.post("".concat(API.home,"/sys/school/verify"),{school_id:c,course_id:e}).then(t=>{const c=t.data,o=c.code,r=c.msg;200===o?a.push("/detail?id=".concat(e)):4030===o||4013===o?a.push("/passport/login"):s.a.info("".concat(r,"~"))})},this.state={header:"",courseList:[]}}componentDidMount(){this.fetchCourseList()}render(){const e=this.state,t=e.courseList,a=void 0===t?[]:t,c=e.header;return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.e,{title:"\u52a9\u5b66\u8ba1\u5212",arrow:!0}),r.a.createElement(i.a,null),r.a.createElement(m.a,{headerStyle:{marginTop:"20px"},title:c}),r.a.createElement("p",{className:"college-course__desc"},"\u70b9\u51fb\u9700\u8981\u5b66\u4e60\u7684\u8bfe\u7a0b\u5c01\u9762\uff0c\u5728\u8bfe\u7a0b\u8be6\u60c5\u9875\u8fdb\u5165\u8d2d\u4e70\u6d41\u7a0b\u51ed\u514d\u5355\u5238\u514d\u8d39\u5151\u6362\u8bfe\u7a0b\u3002"),r.a.createElement("div",{className:"college-course__body"},a.map(e=>r.a.createElement("div",{className:"college-course__item",onClick:()=>this.toCourseDetail(e.course_id),key:e.course_id},r.a.createElement("i",{className:"college-course__cover",style:{backgroundImage:"url(".concat(e.image_name,")")}}),r.a.createElement("p",{className:"college-course__title"},e.course_title)))))}}t.default=d},590:function(e,t,a){"use strict";var c=a(0),s=a.n(c);a(591);t.a=e=>{e.banner;return s.a.createElement("div",{className:"college-banner"})}},591:function(e,t,a){},592:function(e,t,a){"use strict";var c=a(0),s=a.n(c);a(593);t.a=e=>{const t=e.title,a=e.isDecorate,c=void 0===a||a,o=e.headerStyle,r=void 0===o?{}:o;return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:"college-header",style:r},s.a.createElement("i",{className:"college-header__icon","data-direction":"left"}),s.a.createElement("h2",{className:"college-header__text"},t),s.a.createElement("i",{className:"college-header__icon","data-direction":"right"})),c&&s.a.createElement("i",{className:"college-header__decorate"}))}},593:function(e,t,a){}}]);
//# sourceMappingURL=59.4389cf46.chunk.js.map