(this["webpackJsonpmr-julyedu"]=this["webpackJsonpmr-julyedu"]||[]).push([[18],{1524:function(e,t,a){},1685:function(e,t,a){"use strict";a.r(t);a(25);var s=a(5),r=a.n(s),n=a(0),o=a.n(n),i=(a(1524),a(23)),l=a(1);class c extends n.Component{constructor(e){super(e),this.toCourseDetail=e=>{if(this.state.fromApp)Object(l.a)("toCourse",e);else{const{history:t}=this.props;t.push("/detail?id="+e)}},this.state={list:[],fromApp:!!Object(l.c)("from")}}componentDidMount(){l.f.get(API.home+"/sys/red_packet/share_course").then(e=>{200===e.data.code?this.setState({list:e.data.data}):r.a.info(e.data.msg,2)})}render(){const{list:e}=this.state;return o.a.createElement("div",{className:"share-course"},!this.state.fromApp&&o.a.createElement(i.e,{title:"\u5206\u4eab\u9886\u7ea2\u5305",arrow:!0}),e&&e.length>0?o.a.createElement("div",null,e.map((e,t)=>{const a=o.a.createElement("div",{className:"info"},o.a.createElement("p",{className:"title text-overflow-1"},e.course_title),o.a.createElement("p",{className:"contact text-overflow-1"},e.simpledescription),o.a.createElement("button",null,"\u5206\u4eab\u9886\u7ea2\u5305"));return o.a.createElement("div",{key:t},o.a.createElement(i.j,{img:e.image_name,info:a,id:e.course_id,toDetail:this.toCourseDetail}))})):o.a.createElement("div",null,o.a.createElement("p",{className:"not-data"},"\u6682\u65f6\u6ca1\u6709\u53ef\u5206\u4eab\u7684\u8bfe\u7a0b\u54e6\u301c")))}}t.default=c}}]);
//# sourceMappingURL=ShareCourse.980ecf3b.chunk.js.map