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