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