(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1160:function(e,t,a){"use strict";a.r(t);a(43);var s=a(14),i=a.n(s),n=a(7),c=a(8),r=a(10),o=a(9),l=a(11),u=a(0),d=a.n(u),m=(a(888),a(30)),p=a(4),f=a(19),h=a(20),v=a(45),E=a(63),b=function(e){function t(e){var a;return Object(n.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).getList=function(){p.c.get("".concat(API.home,"/m/my/courses")).then(function(e){200===e.data.code?a.setState({data:e.data.data,isLoading:!1}):i.a.info(e.data.msg,2)})},a.toCourseDetail=function(e){var t=a.props,s=t.dispatch,i=t.history;s(Object(v.d)(e,function(){i.push("/detail?id=".concat(e))}))},a.state={data:[],isLoading:!0},a}return Object(l.a)(t,e),Object(c.a)(t,[{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 d.a.createElement("div",{className:"purchased-box"},d.a.createElement(m.e,{title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,href:"/my"}),d.a.createElement(E.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?d.a.createElement("div",{className:"purchased-body"},d.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=d.a.createElement("div",{className:"info"},d.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),d.a.createElement("p",{className:"contact text-overflow-2"},t.simpledescription),t.is_aist?d.a.createElement("div",{className:"des"},"\u52a9\u6559\u5fae\u4fe1\uff1a",t.assist_weixin):d.a.createElement("div",{className:"des"},"QQ\u7fa4\uff1a",t.course_qq)),i=t.is_aist&&d.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return d.a.createElement(m.i,{key:a,img:t.image_name,id:t.course_id,info:s,status:i,toDetail:e.toCourseDetail})})):d.a.createElement("div",{className:"cart-tip"},d.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),d.a.createElement(f.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(u.Component);t.default=Object(h.b)(function(e){return{user:e.user}},null)(b)},888:function(e,t,a){}}]);
//# sourceMappingURL=purchased.61f91062.chunk.js.map