(this["webpackJsonpmr-julyedu"]=this["webpackJsonpmr-julyedu"]||[]).push([[37],{1673:function(e,t,a){"use strict";a.r(t);a(25);var s=a(4),i=a.n(s),c=a(0),r=a.n(c),o=(a(981),a(18)),n=a(1),l=a(8),m=a(15),d=a(56);class u extends c.Component{constructor(e){super(e),this.getList=()=>{n.f.get(API.home+"/m/my/courses").then(e=>{200===e.data.code?this.setState({data:e.data.data,isLoading:!1}):i.a.info(e.data.msg,2)})},this.toCourseDetail=e=>{const{history:t}=this.props;t.push("/detail?id="+e)},this.state={data:[],isLoading:!0}}componentDidMount(){this.getList()}render(){const{user:e}=this.props,t=e&&e.data&&e.data.uid;return r.a.createElement("div",{className:"purchased-box"},r.a.createElement(o.e,{arrow:!0,title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,toHref:"/my"}),r.a.createElement(d.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?r.a.createElement("div",{className:"purchased-body"},r.a.createElement("div",{className:"tip"},"\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a",t),this.state.data.map((e,t)=>{const a=r.a.createElement("div",{className:"info"},r.a.createElement("p",{className:"title text-overflow-2",onClick:()=>this.toCourseDetail(e.course_id)},e.course_title),r.a.createElement("p",{className:"contact text-overflow-1"},e.simpledescription),e.is_aist&&r.a.createElement("div",{className:"des"},"\u52a9\u6559\u5fae\u4fe1\uff1a",e.assist_weixin),!e.is_aist&&1==e.contact_type&&e.course_qq&&r.a.createElement("div",{className:"des"},"QQ\u7fa4\uff1a",e.course_qq),!e.is_aist&&2==e.contact_type&&e.course_qq&&r.a.createElement("div",{className:"des"},"\u73ed\u4e3b\u4efb\u5fae\u4fe1\uff1a",e.course_qq)),s=e.is_aist&&r.a.createElement("span",{className:"status"},"\u8fd4\u73b0"),i=e.course_expire&&""!=e.course_expire&&r.a.createElement("span",{className:"course-expire"},e.course_expire);return r.a.createElement(o.j,{key:t,img:e.image_name,id:e.course_id,info:a,status:s,courseExpire:i,toDetail:this.toCourseDetail})})):r.a.createElement("div",{className:"cart-tip"},r.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),r.a.createElement(l.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}t.default=Object(m.b)(e=>({user:e.user}),null)(u)},981:function(e,t,a){}}]);
//# sourceMappingURL=purchased.6a564704.chunk.js.map