Commit 6e10739e by zhanghaozhe

分类页修改

parent 3d02edc5
{ {
"BargainMiddlePage.css": "/mrstatic/css/BargainMiddlePage.718dff83.chunk.css", "BargainMiddlePage.css": "/mrstatic/css/BargainMiddlePage.718dff83.chunk.css",
"BargainMiddlePage.js": "/mrstatic/js/BargainMiddlePage.08512d4a.chunk.js", "BargainMiddlePage.js": "/mrstatic/js/BargainMiddlePage.a32b6dde.chunk.js",
"BargainMiddlePage.js.map": "/mrstatic/js/BargainMiddlePage.08512d4a.chunk.js.map", "BargainMiddlePage.js.map": "/mrstatic/js/BargainMiddlePage.a32b6dde.chunk.js.map",
"Classify.css": "/mrstatic/css/Classify.f2f19957.chunk.css", "Classify.css": "/mrstatic/css/Classify.f2f19957.chunk.css",
"Classify.js": "/mrstatic/js/Classify.14b87a5c.chunk.js", "Classify.js": "/mrstatic/js/Classify.790143c5.chunk.js",
"Classify.js.map": "/mrstatic/js/Classify.14b87a5c.chunk.js.map", "Classify.js.map": "/mrstatic/js/Classify.790143c5.chunk.js.map",
"CourseList.css": "/mrstatic/css/CourseList.462fc81e.chunk.css", "CourseList.css": "/mrstatic/css/CourseList.c0829f24.chunk.css",
"CourseList.js": "/mrstatic/js/CourseList.e4a17922.chunk.js", "CourseList.js": "/mrstatic/js/CourseList.bc50f964.chunk.js",
"CourseList.js.map": "/mrstatic/js/CourseList.e4a17922.chunk.js.map", "CourseList.js.map": "/mrstatic/js/CourseList.bc50f964.chunk.js.map",
"DrawDocument.css": "/mrstatic/css/DrawDocument.2e7d81ca.chunk.css", "DrawDocument.css": "/mrstatic/css/DrawDocument.2e7d81ca.chunk.css",
"DrawDocument.js": "/mrstatic/js/DrawDocument.d919a532.chunk.js", "DrawDocument.js": "/mrstatic/js/DrawDocument.d919a532.chunk.js",
"DrawDocument.js.map": "/mrstatic/js/DrawDocument.d919a532.chunk.js.map", "DrawDocument.js.map": "/mrstatic/js/DrawDocument.d919a532.chunk.js.map",
"Examination.css": "/mrstatic/css/Examination.f2cc3163.chunk.css", "Examination.css": "/mrstatic/css/Examination.f2cc3163.chunk.css",
"Examination.js": "/mrstatic/js/Examination.8a0d6ea9.chunk.js", "Examination.js": "/mrstatic/js/Examination.16357a6b.chunk.js",
"Examination.js.map": "/mrstatic/js/Examination.8a0d6ea9.chunk.js.map", "Examination.js.map": "/mrstatic/js/Examination.16357a6b.chunk.js.map",
"MyEdit.js": "/mrstatic/js/MyEdit.3cc6e1e4.chunk.js", "MyEdit.js": "/mrstatic/js/MyEdit.11ae1da1.chunk.js",
"MyEdit.js.map": "/mrstatic/js/MyEdit.3cc6e1e4.chunk.js.map", "MyEdit.js.map": "/mrstatic/js/MyEdit.11ae1da1.chunk.js.map",
"Order.css": "/mrstatic/css/Order.8bb031ea.chunk.css", "Order.css": "/mrstatic/css/Order.8bb031ea.chunk.css",
"Order.js": "/mrstatic/js/Order.90142569.chunk.js", "Order.js": "/mrstatic/js/Order.e705234a.chunk.js",
"Order.js.map": "/mrstatic/js/Order.90142569.chunk.js.map", "Order.js.map": "/mrstatic/js/Order.e705234a.chunk.js.map",
"Orderinfo.js": "/mrstatic/js/Orderinfo.b94e811f.chunk.js", "Orderinfo.js": "/mrstatic/js/Orderinfo.e108ea6a.chunk.js",
"Orderinfo.js.map": "/mrstatic/js/Orderinfo.b94e811f.chunk.js.map", "Orderinfo.js.map": "/mrstatic/js/Orderinfo.e108ea6a.chunk.js.map",
"PayOrder.css": "/mrstatic/css/PayOrder.e5315535.chunk.css", "PayOrder.css": "/mrstatic/css/PayOrder.e5315535.chunk.css",
"PayOrder.js": "/mrstatic/js/PayOrder.7486172b.chunk.js", "PayOrder.js": "/mrstatic/js/PayOrder.8a9c9c25.chunk.js",
"PayOrder.js.map": "/mrstatic/js/PayOrder.7486172b.chunk.js.map", "PayOrder.js.map": "/mrstatic/js/PayOrder.8a9c9c25.chunk.js.map",
"Preferential.css": "/mrstatic/css/Preferential.7456653e.chunk.css", "Preferential.css": "/mrstatic/css/Preferential.7456653e.chunk.css",
"Preferential.js": "/mrstatic/js/Preferential.b44f1d85.chunk.js", "Preferential.js": "/mrstatic/js/Preferential.96f9c0af.chunk.js",
"Preferential.js.map": "/mrstatic/js/Preferential.b44f1d85.chunk.js.map", "Preferential.js.map": "/mrstatic/js/Preferential.96f9c0af.chunk.js.map",
"SearchResult.css": "/mrstatic/css/SearchResult.1ad68937.chunk.css", "SearchResult.css": "/mrstatic/css/SearchResult.1ad68937.chunk.css",
"SearchResult.js": "/mrstatic/js/SearchResult.fb4552ba.chunk.js", "SearchResult.js": "/mrstatic/js/SearchResult.a0c80e4c.chunk.js",
"SearchResult.js.map": "/mrstatic/js/SearchResult.fb4552ba.chunk.js.map", "SearchResult.js.map": "/mrstatic/js/SearchResult.a0c80e4c.chunk.js.map",
"ShopCart.css": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css", "ShopCart.css": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css",
"ShopCart.js": "/mrstatic/js/ShopCart.7d28defb.chunk.js", "ShopCart.js": "/mrstatic/js/ShopCart.eb48d301.chunk.js",
"ShopCart.js.map": "/mrstatic/js/ShopCart.7d28defb.chunk.js.map", "ShopCart.js.map": "/mrstatic/js/ShopCart.eb48d301.chunk.js.map",
"aist-share.css": "/mrstatic/css/aist-share.bef8c404.chunk.css", "aist-share.css": "/mrstatic/css/aist-share.bef8c404.chunk.css",
"aist-share.js": "/mrstatic/js/aist-share.d80fae56.chunk.js", "aist-share.js": "/mrstatic/js/aist-share.d80fae56.chunk.js",
"aist-share.js.map": "/mrstatic/js/aist-share.d80fae56.chunk.js.map", "aist-share.js.map": "/mrstatic/js/aist-share.d80fae56.chunk.js.map",
"coupons.css": "/mrstatic/css/coupons.9ece7350.chunk.css", "coupons.css": "/mrstatic/css/coupons.9ece7350.chunk.css",
"coupons.js": "/mrstatic/js/coupons.42908a9e.chunk.js", "coupons.js": "/mrstatic/js/coupons.5ab92333.chunk.js",
"coupons.js.map": "/mrstatic/js/coupons.42908a9e.chunk.js.map", "coupons.js.map": "/mrstatic/js/coupons.5ab92333.chunk.js.map",
"detail.css": "/mrstatic/css/detail.00799624.chunk.css", "detail.css": "/mrstatic/css/detail.00799624.chunk.css",
"detail.js": "/mrstatic/js/detail.4b9dc842.chunk.js", "detail.js": "/mrstatic/js/detail.e1e29c15.chunk.js",
"detail.js.map": "/mrstatic/js/detail.4b9dc842.chunk.js.map", "detail.js.map": "/mrstatic/js/detail.e1e29c15.chunk.js.map",
"main.css": "/mrstatic/css/main.ad15f1e8.chunk.css", "main.css": "/mrstatic/css/main.ad15f1e8.chunk.css",
"main.js": "/mrstatic/js/main.25eeca6a.chunk.js", "main.js": "/mrstatic/js/main.e5fd2300.chunk.js",
"main.js.map": "/mrstatic/js/main.25eeca6a.chunk.js.map", "main.js.map": "/mrstatic/js/main.e5fd2300.chunk.js.map",
"myorders.css": "/mrstatic/css/myorders.3ae12dec.chunk.css", "myorders.css": "/mrstatic/css/myorders.3ae12dec.chunk.css",
"myorders.js": "/mrstatic/js/myorders.885afd39.chunk.js", "myorders.js": "/mrstatic/js/myorders.127a850e.chunk.js",
"myorders.js.map": "/mrstatic/js/myorders.885afd39.chunk.js.map", "myorders.js.map": "/mrstatic/js/myorders.127a850e.chunk.js.map",
"purchased.css": "/mrstatic/css/purchased.1daf107b.chunk.css", "purchased.css": "/mrstatic/css/purchased.1daf107b.chunk.css",
"purchased.js": "/mrstatic/js/purchased.50b002b9.chunk.js", "purchased.js": "/mrstatic/js/purchased.6730aed9.chunk.js",
"purchased.js.map": "/mrstatic/js/purchased.50b002b9.chunk.js.map", "purchased.js.map": "/mrstatic/js/purchased.6730aed9.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.0bb8e92c.js", "runtime~main.js": "/mrstatic/js/runtime~main.414ea351.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.0bb8e92c.js.map", "runtime~main.js.map": "/mrstatic/js/runtime~main.414ea351.js.map",
"search.css": "/mrstatic/css/search.fab97849.chunk.css", "search.css": "/mrstatic/css/search.fab97849.chunk.css",
"search.js": "/mrstatic/js/search.5ac662a8.chunk.js", "search.js": "/mrstatic/js/search.5ac662a8.chunk.js",
"search.js.map": "/mrstatic/js/search.5ac662a8.chunk.js.map", "search.js.map": "/mrstatic/js/search.5ac662a8.chunk.js.map",
"shareposter.css": "/mrstatic/css/shareposter.f09a5959.chunk.css", "shareposter.css": "/mrstatic/css/shareposter.f09a5959.chunk.css",
"shareposter.js": "/mrstatic/js/shareposter.f1a65f58.chunk.js", "shareposter.js": "/mrstatic/js/shareposter.3cc4222f.chunk.js",
"shareposter.js.map": "/mrstatic/js/shareposter.f1a65f58.chunk.js.map", "shareposter.js.map": "/mrstatic/js/shareposter.3cc4222f.chunk.js.map",
"study.css": "/mrstatic/css/study.5e9927d1.chunk.css", "study.css": "/mrstatic/css/study.5e9927d1.chunk.css",
"study.js": "/mrstatic/js/study.3d82a05b.chunk.js", "study.js": "/mrstatic/js/study.f2e73fa9.chunk.js",
"study.js.map": "/mrstatic/js/study.3d82a05b.chunk.js.map", "study.js.map": "/mrstatic/js/study.f2e73fa9.chunk.js.map",
"togroup.css": "/mrstatic/css/togroup.49988cae.chunk.css", "togroup.css": "/mrstatic/css/togroup.49988cae.chunk.css",
"togroup.js": "/mrstatic/js/togroup.ff4e7682.chunk.js", "togroup.js": "/mrstatic/js/togroup.0bceafc5.chunk.js",
"togroup.js.map": "/mrstatic/js/togroup.ff4e7682.chunk.js.map", "togroup.js.map": "/mrstatic/js/togroup.0bceafc5.chunk.js.map",
"video.css": "/mrstatic/css/video.b57a1aec.chunk.css", "video.css": "/mrstatic/css/video.b57a1aec.chunk.css",
"video.js": "/mrstatic/js/video.5cbec8d3.chunk.js", "video.js": "/mrstatic/js/video.e5987a4a.chunk.js",
"video.js.map": "/mrstatic/js/video.5cbec8d3.chunk.js.map", "video.js.map": "/mrstatic/js/video.e5987a4a.chunk.js.map",
"mrstatic/css/24.b608c916.chunk.css": "/mrstatic/css/24.b608c916.chunk.css", "mrstatic/css/24.b608c916.chunk.css": "/mrstatic/css/24.b608c916.chunk.css",
"mrstatic/js/24.77980575.chunk.js": "/mrstatic/js/24.77980575.chunk.js", "mrstatic/js/24.dceae550.chunk.js": "/mrstatic/js/24.dceae550.chunk.js",
"mrstatic/js/24.77980575.chunk.js.map": "/mrstatic/js/24.77980575.chunk.js.map", "mrstatic/js/24.dceae550.chunk.js.map": "/mrstatic/js/24.dceae550.chunk.js.map",
"mrstatic/js/25.9e7c92d2.chunk.js": "/mrstatic/js/25.9e7c92d2.chunk.js", "mrstatic/js/25.9e7c92d2.chunk.js": "/mrstatic/js/25.9e7c92d2.chunk.js",
"mrstatic/js/25.9e7c92d2.chunk.js.map": "/mrstatic/js/25.9e7c92d2.chunk.js.map", "mrstatic/js/25.9e7c92d2.chunk.js.map": "/mrstatic/js/25.9e7c92d2.chunk.js.map",
"mrstatic/css/26.4c706a4e.chunk.css": "/mrstatic/css/26.4c706a4e.chunk.css", "mrstatic/css/26.4c706a4e.chunk.css": "/mrstatic/css/26.4c706a4e.chunk.css",
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
"mrstatic/css/30.ecbb6f9a.chunk.css.map": "/mrstatic/css/30.ecbb6f9a.chunk.css.map", "mrstatic/css/30.ecbb6f9a.chunk.css.map": "/mrstatic/css/30.ecbb6f9a.chunk.css.map",
"mrstatic/css/BargainMiddlePage.718dff83.chunk.css.map": "/mrstatic/css/BargainMiddlePage.718dff83.chunk.css.map", "mrstatic/css/BargainMiddlePage.718dff83.chunk.css.map": "/mrstatic/css/BargainMiddlePage.718dff83.chunk.css.map",
"mrstatic/css/Classify.f2f19957.chunk.css.map": "/mrstatic/css/Classify.f2f19957.chunk.css.map", "mrstatic/css/Classify.f2f19957.chunk.css.map": "/mrstatic/css/Classify.f2f19957.chunk.css.map",
"mrstatic/css/CourseList.462fc81e.chunk.css.map": "/mrstatic/css/CourseList.462fc81e.chunk.css.map", "mrstatic/css/CourseList.c0829f24.chunk.css.map": "/mrstatic/css/CourseList.c0829f24.chunk.css.map",
"mrstatic/css/DrawDocument.2e7d81ca.chunk.css.map": "/mrstatic/css/DrawDocument.2e7d81ca.chunk.css.map", "mrstatic/css/DrawDocument.2e7d81ca.chunk.css.map": "/mrstatic/css/DrawDocument.2e7d81ca.chunk.css.map",
"mrstatic/css/Examination.f2cc3163.chunk.css.map": "/mrstatic/css/Examination.f2cc3163.chunk.css.map", "mrstatic/css/Examination.f2cc3163.chunk.css.map": "/mrstatic/css/Examination.f2cc3163.chunk.css.map",
"mrstatic/css/Order.8bb031ea.chunk.css.map": "/mrstatic/css/Order.8bb031ea.chunk.css.map", "mrstatic/css/Order.8bb031ea.chunk.css.map": "/mrstatic/css/Order.8bb031ea.chunk.css.map",
...@@ -117,6 +117,6 @@ ...@@ -117,6 +117,6 @@
"mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.f983caa7.svg", "mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.f983caa7.svg",
"mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png", "mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png",
"mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png", "mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png",
"precache-manifest.7a6b03b59519fced7da361524131348e.js": "/precache-manifest.7a6b03b59519fced7da361524131348e.js", "precache-manifest.b743e66a906da8571a424d9d2efeb985.js": "/precache-manifest.b743e66a906da8571a424d9d2efeb985.js",
"service-worker.js": "/service-worker.js" "service-worker.js": "/service-worker.js"
} }
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{1173:function(e,t,a){"use strict";a.r(t);var n=a(8),s=a(9),c=a(10),r=a(7),o=a(11),i=a(0),l=a.n(i),m=(a(903),a(15)),u=a.n(m),h=a(30),p=(a(904),function(){return l.a.createElement("div",{className:"open-app"},l.a.createElement("p",{className:"left"},"\u66f4\u591a\u8bd5\u9898\u8bf7\u524d\u5f80App\u67e5\u770b"),l.a.createElement(h.a,{className:"right"},"\u5728APP\u6253\u5f00"))}),w=a(3),d=a(905);a.d(t,"default",function(){return f});var f=function(e){function t(e){var a;return Object(n.a)(this,t),(a=Object(c.a)(this,Object(r.a)(t).call(this,e))).showAnswer=function(){a.setState({isShowAnswer:!a.state.isShowAnswer})},a.state={isShowAnswer:!1,questionData:{}},a}return Object(o.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this;w.c.get("".concat(API.home,"/m/dailyQuestion")).then(function(t){var a=t.data,n=a.data;if(200===a.code){var s=d.Object.assign(n,{analysis:n.analysis.length>0?n.analysis.split("\n"):[]});e.setState({questionData:s})}})}},{key:"render",value:function(){var e=this.state,t=e.questionData,a=t.ques,n=t.type_id,s=t.options,c=t.analysis,r=t.category,o=e.isShowAnswer;return l.a.createElement("div",{className:"examination"},l.a.createElement(h.e,{title:"\u6bcf\u65e5\u4e00\u9898",arrow:!0,cart:!1}),l.a.createElement("div",{className:"question-container"},l.a.createElement("div",{className:"topic"},l.a.createElement(h.h,{className:"category-tag"},r),l.a.createElement("span",{dangerouslySetInnerHTML:{__html:a}})),1===n&&l.a.createElement(E,{className:"options",options:s,showCorrect:this.state.isShowAnswer}),!o&&l.a.createElement("div",{className:"show-answer",onClick:this.showAnswer},l.a.createElement("span",null,"\u67e5\u770b\u89e3\u6790",l.a.createElement("i",{className:"iconfont iconiconfront-69"})))),o&&l.a.createElement(v,{content:c,isShowAnswer:!0}),l.a.createElement(p,null))}}]),t}(i.PureComponent),E=l.a.memo(function(e){var t=e.options,a=e.showCorrect;return l.a.createElement("ul",{className:"options"},t.map(function(e,t){return l.a.createElement("li",{key:t,className:u()("option",{active:1===e.is_ans&&a})},l.a.createElement("span",{className:"alphabet"},String.fromCharCode(65+t)),e.des)}))}),v=l.a.memo(function(e){var t=e.content,a=e.isShowAnswer;return l.a.createElement("div",{className:u()("answer",{scale:a})},l.a.createElement("p",{className:"legend"},"\u89e3\u6790"),t.length>0&&t.map(function(e,t){return l.a.createElement("p",{key:t,className:"content",dangerouslySetInnerHTML:{__html:e}})}))})},903:function(e,t,a){},904:function(e,t,a){}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{1173:function(e,t,a){"use strict";a.r(t);var n=a(8),s=a(9),c=a(10),r=a(7),o=a(11),i=a(0),l=a.n(i),m=(a(903),a(15)),u=a.n(m),p=a(30),w=(a(904),function(){return l.a.createElement("div",{className:"open-app"},l.a.createElement("p",{className:"left"},"\u66f4\u591a\u8bd5\u9898\u8bf7\u524d\u5f80App\u67e5\u770b"),l.a.createElement(p.a,{className:"right"},"\u5728APP\u6253\u5f00"))}),h=a(3),d=a(905);a.d(t,"default",function(){return f});var f=function(e){function t(e){var a;return Object(n.a)(this,t),(a=Object(c.a)(this,Object(r.a)(t).call(this,e))).showAnswer=function(){a.setState({isShowAnswer:!a.state.isShowAnswer})},a.state={isShowAnswer:!1,questionData:{}},a}return Object(o.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this;h.c.get("".concat(API.home,"/m/dailyQuestion")).then(function(t){var a=t.data,n=a.data;if(200===a.code){var s=d.Object.assign(n,{analysis:n.analysis.length>0?n.analysis.split("\n"):[]});e.setState({questionData:s})}})}},{key:"render",value:function(){var e=this.state,t=e.questionData,a=t.ques,n=t.type_id,s=t.options,c=t.analysis,r=t.category,o=e.isShowAnswer;return l.a.createElement("div",{className:"examination"},l.a.createElement(p.e,{title:"\u6bcf\u65e5\u4e00\u9898",arrow:!0,cart:!1}),l.a.createElement("div",{className:"question-container"},l.a.createElement("div",{className:"topic"},l.a.createElement(p.i,{className:"category-tag"},r),l.a.createElement("span",{dangerouslySetInnerHTML:{__html:a}})),1===n&&l.a.createElement(E,{className:"options",options:s,showCorrect:this.state.isShowAnswer}),!o&&l.a.createElement("div",{className:"show-answer",onClick:this.showAnswer},l.a.createElement("span",null,"\u67e5\u770b\u89e3\u6790",l.a.createElement("i",{className:"iconfont iconiconfront-69"})))),o&&l.a.createElement(v,{content:c,isShowAnswer:!0}),l.a.createElement(w,null))}}]),t}(i.PureComponent),E=l.a.memo(function(e){var t=e.options,a=e.showCorrect;return l.a.createElement("ul",{className:"options"},t.map(function(e,t){return l.a.createElement("li",{key:t,className:u()("option",{active:1===e.is_ans&&a})},l.a.createElement("span",{className:"alphabet"},String.fromCharCode(65+t)),e.des)}))}),v=l.a.memo(function(e){var t=e.content,a=e.isShowAnswer;return l.a.createElement("div",{className:u()("answer",{scale:a})},l.a.createElement("p",{className:"legend"},"\u89e3\u6790"),t.length>0&&t.map(function(e,t){return l.a.createElement("p",{key:t,className:"content",dangerouslySetInnerHTML:{__html:e}})}))})},903:function(e,t,a){},904:function(e,t,a){}}]);
//# sourceMappingURL=Examination.8a0d6ea9.chunk.js.map //# sourceMappingURL=Examination.16357a6b.chunk.js.map
\ No newline at end of file \ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{1163:function(e,t,a){"use strict";a.r(t);a(43);var n=a(14),s=a.n(n),i=a(8),c=a(9),o=a(10),l=a(7),r=a(11),u=a(0),m=a.n(u),d=(a(258),a(20)),h=a(3),p=a(30),v=a(33),f=a(23),b=a(71),E=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(o.a)(this,Object(l.a)(t).call(this,e))).toEditName=function(e){a.setState({isShow:!0,value:e})},a.cancle=function(){a.setState({isShow:!1})},a.handleChange=function(e){a.setState({value:e.target.value})},a.outLogin=function(){a.props.logout(),s.a.info("\u5df2\u9000\u51fa",2),a.props.history.push("/my")},a.submit=function(){if(a.state.value.length>12)s.a.info("\u4e0d\u8d85\u8fc712\u4e2a\u5b57\u7b26",2);else if(0===a.state.value.length)s.a.info("\u8bf7\u8f93\u5165\u6635\u79f0",2);else{var e={user_name:a.state.value};h.c.post("".concat(API.home,"/m/user_info/update"),e).then(function(e){200===e.data.code?(a.setState({isShow:!1}),a.props.updateUser({data:{username:a.state.value}}),s.a.info("\u4fee\u6539\u6210\u529f",2)):4008===e.data.code?a.setState({isShow:!1}):s.a.info(e.data.msg,2)})}},a.state={isShow:!1,value:""},a}return Object(r.a)(t,e),Object(c.a)(t,[{key:"render",value:function(){var e=this.props.user,t=e&&e.data&&e.data.username,a=e&&e.data&&e.data.avatar;return m.a.createElement("div",{className:"edit-name"},m.a.createElement(p.e,{title:"\u8d26\u53f7",arrow:!0,cart:!1}),m.a.createElement("div",{className:"my-mess"},m.a.createElement("img",{src:a,alt:""}),m.a.createElement("span",{className:"name"},t),m.a.createElement("span",{onClick:this.toEditName.bind(this,t),className:"edit"},"\u7f16\u8f91")),m.a.createElement("div",{className:"out-login",onClick:this.outLogin},"\u9000\u51fa\u767b\u5f55"),this.state.isShow&&m.a.createElement("div",{className:"edit-mbc"},m.a.createElement("div",{className:"edit-content"},m.a.createElement("div",{className:"edit-title"},"\u4fee\u6539\u6635\u79f0"),m.a.createElement("input",{type:"text",placeholder:"\u8bf7\u8f93\u5165\u6635\u79f0\uff08\u4e0d\u8d85\u8fc712\u4e2a\u5b57\u7b26\uff09",value:this.state.value,onChange:this.handleChange.bind(this)}),m.a.createElement("div",{className:"edit-btn"},m.a.createElement("button",{className:"cancle",onClick:this.cancle},"\u53d6\u6d88"),m.a.createElement("button",{className:"submit",onClick:this.submit},"\u786e\u8ba4")))))}}]),t}(u.PureComponent);t.default=Object(f.d)(Object(d.b)(function(e){return{user:e.user}},{logout:v.e,updateUser:v.i}),b.a)(E)}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[5],{1163:function(e,t,a){"use strict";a.r(t);a(43);var n=a(14),s=a.n(n),i=a(8),c=a(9),o=a(10),l=a(7),r=a(11),u=a(0),m=a.n(u),d=(a(258),a(20)),h=a(3),p=a(30),v=a(33),f=a(23),b=a(71),E=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(o.a)(this,Object(l.a)(t).call(this,e))).toEditName=function(e){a.setState({isShow:!0,value:e})},a.cancle=function(){a.setState({isShow:!1})},a.handleChange=function(e){a.setState({value:e.target.value})},a.outLogin=function(){a.props.logout(),s.a.info("\u5df2\u9000\u51fa",2),a.props.history.push("/my")},a.submit=function(){if(a.state.value.length>12)s.a.info("\u4e0d\u8d85\u8fc712\u4e2a\u5b57\u7b26",2);else if(0===a.state.value.length)s.a.info("\u8bf7\u8f93\u5165\u6635\u79f0",2);else{var e={user_name:a.state.value};h.c.post("".concat(API.home,"/m/user_info/update"),e).then(function(e){200===e.data.code?(a.setState({isShow:!1}),a.props.updateUser({data:{username:a.state.value}}),s.a.info("\u4fee\u6539\u6210\u529f",2)):4008===e.data.code?a.setState({isShow:!1}):s.a.info(e.data.msg,2)})}},a.state={isShow:!1,value:""},a}return Object(r.a)(t,e),Object(c.a)(t,[{key:"render",value:function(){var e=this.props.user,t=e&&e.data&&e.data.username,a=e&&e.data&&e.data.avatar;return m.a.createElement("div",{className:"edit-name"},m.a.createElement(p.e,{title:"\u8d26\u53f7",arrow:!0,cart:!1}),m.a.createElement("div",{className:"my-mess"},m.a.createElement("img",{src:a,alt:""}),m.a.createElement("span",{className:"name"},t),m.a.createElement("span",{onClick:this.toEditName.bind(this,t),className:"edit"},"\u7f16\u8f91")),m.a.createElement("div",{className:"out-login",onClick:this.outLogin},"\u9000\u51fa\u767b\u5f55"),this.state.isShow&&m.a.createElement("div",{className:"edit-mbc"},m.a.createElement("div",{className:"edit-content"},m.a.createElement("div",{className:"edit-title"},"\u4fee\u6539\u6635\u79f0"),m.a.createElement("input",{type:"text",placeholder:"\u8bf7\u8f93\u5165\u6635\u79f0\uff08\u4e0d\u8d85\u8fc712\u4e2a\u5b57\u7b26\uff09",value:this.state.value,onChange:this.handleChange.bind(this)}),m.a.createElement("div",{className:"edit-btn"},m.a.createElement("button",{className:"cancle",onClick:this.cancle},"\u53d6\u6d88"),m.a.createElement("button",{className:"submit",onClick:this.submit},"\u786e\u8ba4")))))}}]),t}(u.PureComponent);t.default=Object(f.d)(Object(d.b)(function(e){return{user:e.user}},{logout:v.e,updateUser:v.i}),b.a)(E)}}]);
//# sourceMappingURL=MyEdit.3cc6e1e4.chunk.js.map //# sourceMappingURL=MyEdit.11ae1da1.chunk.js.map
\ No newline at end of file \ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{1160:function(e,n,a){"use strict";a.r(n);var o=a(8),r=a(9),t=a(10),l=a(7),i=a(11),c=(a(43),a(14)),s=a.n(c),p=a(18),u=(a(156),a(75)),d=a.n(u),f=(a(1132),a(1134)),h=a.n(f),m=(a(1135),a(1137)),v=a.n(m),b=a(0),g=a.n(b),q=a(19),E=a(30),j=a(3),y=Object(q.e)({mapPropsToValues:function(e){return Object(p.a)({},e.userInfo)},validate:function(e,n){return{}},handleSubmit:function(e,n){var a=e.real_name,o=e.cellphone,r=e.qq;if(a)if(0!=="".concat(a).replace(/\s+/g,"").length)if(o)if(/1\d{10}/g.test("".concat(o).replace(/\s+/g,"")))if(r)if(/\d{5,}/g.test(r)){var t=0;if(n.props.userInfo){var l=n.props.userInfo;l.real_name===a&&(t+=1),l.cellphone===o&&(t+=1),l.qq===r&&(t+=1)}var i="/order";n.props.userInfo.id&&(i=i+"?id="+n.props.userInfo.id),console.log(e),3!==t?j.c.post("".concat(API["base-api"],"/m/order/saveUserInfo"),{real_name:e.real_name,cellphone:"".concat(e.cellphone).replace(/\s+/g,""),qq:e.qq}).then(function(a){console.log(a),200===a.data.errno?(s.a.info("\u4fdd\u5b58\u6210\u529f\uff01",void 0,void 0,!1),n.props.history.replace(i,Object(p.a)({},e))):s.a.info(a.data.msg,void 0,void 0,!1)}):n.props.history.replace(i,Object(p.a)({},e))}else s.a.info("\u8bf7\u8f93\u5165\u6b63\u786eQQ\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165QQ\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u624b\u673a\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u59d3\u540d\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u59d3\u540d\uff01",void 0,void 0,!1)}})(function(e){var n=e.values,a=(e.errors,e.touched,e.setFieldValue),o=(e.handleBlur,e.handleSubmit);e.isSubmitting;return g.a.createElement("form",null,g.a.createElement(v.a,{clear:!0,name:"real_name",onChange:function(e){return a("real_name",e)},placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684\u771f\u5b9e\u59d3\u540d",value:n.real_name},"\u59d3\u540d"),g.a.createElement(v.a,{clear:!0,type:"phone",name:"cellphone",placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684\u624b\u673a\u53f7\u7801",onChange:function(e){return a("cellphone",e)},value:n.cellphone},"\u7535\u8bdd"),g.a.createElement(v.a,{clear:!0,name:"qq",placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684QQ\u53f7\u7801",maxLength:"15",onChange:function(e){return a("qq",e)},value:n.qq},"QQ"),g.a.createElement("div",{style:{marginTop:"21px"}},g.a.createElement(d.a,null,g.a.createElement(h.a,{type:"primary",onClick:o},"\u786e\u8ba4"))))}),O=function(e){function n(e){return Object(o.a)(this,n),Object(t.a)(this,Object(l.a)(n).call(this,e))}return Object(i.a)(n,e),Object(r.a)(n,[{key:"render",value:function(){return g.a.createElement("div",null,g.a.createElement(E.e,{title:"\u62a5\u540d\u4fe1\u606f",arrow:!0}),g.a.createElement(y,{history:this.props.history,userInfo:this.props.location.state}))}}]),n}(b.Component);n.default=O}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[7],{1160:function(e,n,a){"use strict";a.r(n);var o=a(8),r=a(9),t=a(10),l=a(7),i=a(11),c=(a(43),a(14)),s=a.n(c),p=a(18),u=(a(156),a(75)),d=a.n(u),f=(a(1132),a(1134)),h=a.n(f),m=(a(1135),a(1137)),v=a.n(m),b=a(0),g=a.n(b),q=a(19),E=a(30),j=a(3),y=Object(q.e)({mapPropsToValues:function(e){return Object(p.a)({},e.userInfo)},validate:function(e,n){return{}},handleSubmit:function(e,n){var a=e.real_name,o=e.cellphone,r=e.qq;if(a)if(0!=="".concat(a).replace(/\s+/g,"").length)if(o)if(/1\d{10}/g.test("".concat(o).replace(/\s+/g,"")))if(r)if(/\d{5,}/g.test(r)){var t=0;if(n.props.userInfo){var l=n.props.userInfo;l.real_name===a&&(t+=1),l.cellphone===o&&(t+=1),l.qq===r&&(t+=1)}var i="/order";n.props.userInfo.id&&(i=i+"?id="+n.props.userInfo.id),console.log(e),3!==t?j.c.post("".concat(API["base-api"],"/m/order/saveUserInfo"),{real_name:e.real_name,cellphone:"".concat(e.cellphone).replace(/\s+/g,""),qq:e.qq}).then(function(a){console.log(a),200===a.data.errno?(s.a.info("\u4fdd\u5b58\u6210\u529f\uff01",void 0,void 0,!1),n.props.history.replace(i,Object(p.a)({},e))):s.a.info(a.data.msg,void 0,void 0,!1)}):n.props.history.replace(i,Object(p.a)({},e))}else s.a.info("\u8bf7\u8f93\u5165\u6b63\u786eQQ\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165QQ\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u624b\u673a\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u59d3\u540d\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u59d3\u540d\uff01",void 0,void 0,!1)}})(function(e){var n=e.values,a=(e.errors,e.touched,e.setFieldValue),o=(e.handleBlur,e.handleSubmit);e.isSubmitting;return g.a.createElement("form",null,g.a.createElement(v.a,{clear:!0,name:"real_name",onChange:function(e){return a("real_name",e)},placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684\u771f\u5b9e\u59d3\u540d",value:n.real_name},"\u59d3\u540d"),g.a.createElement(v.a,{clear:!0,type:"phone",name:"cellphone",placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684\u624b\u673a\u53f7\u7801",onChange:function(e){return a("cellphone",e)},value:n.cellphone},"\u7535\u8bdd"),g.a.createElement(v.a,{clear:!0,name:"qq",placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684QQ\u53f7\u7801",maxLength:"15",onChange:function(e){return a("qq",e)},value:n.qq},"QQ"),g.a.createElement("div",{style:{marginTop:"21px"}},g.a.createElement(d.a,null,g.a.createElement(h.a,{type:"primary",onClick:o},"\u786e\u8ba4"))))}),O=function(e){function n(e){return Object(o.a)(this,n),Object(t.a)(this,Object(l.a)(n).call(this,e))}return Object(i.a)(n,e),Object(r.a)(n,[{key:"render",value:function(){return g.a.createElement("div",null,g.a.createElement(E.e,{title:"\u62a5\u540d\u4fe1\u606f",arrow:!0}),g.a.createElement(y,{history:this.props.history,userInfo:this.props.location.state}))}}]),n}(b.Component);n.default=O}}]);
//# sourceMappingURL=Orderinfo.b94e811f.chunk.js.map //# sourceMappingURL=Orderinfo.e108ea6a.chunk.js.map
\ No newline at end of file \ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{1172:function(e,t,a){"use strict";a.r(t);a(737);var c=a(738),n=a.n(c),r=a(18),s=(a(43),a(14)),o=a.n(s),i=a(8),l=a(9),u=a(10),d=a(7),h=a(11),m=(a(255),a(91)),p=a.n(m),f=a(0),v=a.n(f),g=a(20),k=a(30),E=a(64),b=a(17),N=a(160),C=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).state={val:e.item.value},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"onChange",value:function(e,t){var a=e.target.checked;this.props.checkChange(t,a)}},{key:"render",value:function(){var e=this,t=this.props.item,a=v.a.createElement("div",{className:"order-info"},v.a.createElement("p",{className:"order-title text-overflow-one",onClick:function(){return e.props.toDetail(t.course_id)}},t.course_title),v.a.createElement("p",{className:"order-content text-overflow-2"},t.simpledescription),v.a.createElement("p",{className:"order-des"},v.a.createElement("span",{className:"order-newprice"},"\xa5",t.price1),v.a.createElement("span",{className:"order-price"},"\xa5",t.price0)));return v.a.createElement("div",{className:"cart-c-item"},v.a.createElement("div",{className:"cart-c-check"},v.a.createElement(n.a,{checked:t.check,onChange:function(a){e.onChange(a,t.course_id)}})),v.a.createElement("div",{className:"card-wrap"},v.a.createElement(N.a,{info:a,src:t.image_name,id:t.course_id,toDetail:this.props.toDetail})))}}]),t}(f.Component),j=function(e){function t(){return Object(i.a)(this,t),Object(u.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-main"},v.a.createElement("div",{className:"cart-c-body"},this.props.data.length>0?this.props.data.map(function(t,a){return v.a.createElement(C,{index:a,changeStock:function(t,a){e.props.changeStock(t,a)},checkChange:function(t,a){e.props.checkChange(t,a)},key:a,item:t,toDetail:e.props.toDetail})}):v.a.createElement("div",{className:"cart-tip"},v.a.createElement("p",{className:"cart-mess"},"\u8fd9\u91cc\u662f\u7a7a\u7684\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),v.a.createElement(b.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(f.Component),y=(a(902),a(15)),O=a.n(y),I=a(3),w=(a(63),p.a.alert),S=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).getList=function(){I.c.get("".concat(API.home,"/m/cart/list")).then(function(e){200===e.data.code?a.setState({data:e.data.data.courses,isLoading:!1}):o.a.info(e.data.msg,2)})},a.tobuy=function(){console.log(a.state.courseIdarr),I.c.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(a.state.courseIdarr,"]")).then(function(e){0==e.data.errno?a.props.history.push("/order?id=[".concat(a.state.courseIdarr,"]"),{simple:1}):o.a.info(e.data.msg,2)})},a.todelete=function(){a.state.courseIdarr.length>0&&w("","\u786e\u5b9a\u4ece\u8d2d\u7269\u8f66\u4e2d\u5220\u9664\uff1f",[{text:"\u53d6\u6d88",onPress:function(){return console.log("cancel")}},{text:"\u786e\u8ba4",onPress:function(){var e={course_ids:a.state.courseIdarr};I.c.post("".concat(API.home,"/m/cart/remove"),e).then(function(e){200===e.data.code?(a.getList(),a.setState({checkedNum:0,allPrice:0})):o.a.info(e.data.msg,2)})}}])},a.toCourseDetail=function(e){console.log(e);var t=a.props;t.dispatch;t.history.push("/detail?id=".concat(e))},a.state={data:[],checkedNum:0,allPrice:0,cartNmu:0,courseIdarr:[],isLoading:!0},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"allChange",value:function(e){var t=e.target.checked,a=this.state.data.map(function(e,a){return Object(r.a)({},e,{check:t})});if(this.setState({data:a}),this.calc(a),t){var c=[];a.map(function(e,t){c.push(e.course_id)}),this.setState({courseIdarr:c})}else this.setState({courseIdarr:[]})}},{key:"checkChange",value:function(e,t){var a=this,c=this.state.data.map(function(a,c){return a.course_id===e?Object(r.a)({},a,{check:t}):a});this.setState({data:c}),this.calc(c);var n=[];c.forEach(function(e,t){e.check?(n.push(e.course_id),a.setState({courseIdarr:n})):a.setState({courseIdarr:n})})}},{key:"calc",value:function(e){var t=0,a=0,c=0,n=[];e.forEach(function(e,r){e.check&&(n.push(e),c+=1,a=n.length,t+=parseFloat(e.price1))}),this.setState({checkedNum:a,allPrice:t,cartNmu:c})}},{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-page",style:{overflow:"hidden"}},v.a.createElement(k.e,{title:"\u8d2d\u7269\u8f66",arrow:!0,cart:!1,delete:!0,toDelete:this.todelete}),v.a.createElement(E.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"cart-body"},v.a.createElement(j,{checkChange:this.checkChange.bind(this),data:this.state.data,toDetail:this.toCourseDetail}),v.a.createElement("div",{className:"cart-footer"},v.a.createElement("div",{className:"cart-label"},v.a.createElement(n.a,{onChange:function(t){e.allChange(t)}}),v.a.createElement("div",null,"\u5168\u9009")),v.a.createElement("div",{className:"all-pirce"},v.a.createElement("p",null,v.a.createElement("span",null,"\u5408\u8ba1\uff1a"),v.a.createElement("span",null,"\uffe5",this.state.allPrice))),v.a.createElement("div",{className:O()({active:this.state.checkedNum>0}),onClick:function(){e.state.checkedNum>0&&e.tobuy()}},"\u7ed3\u7b97",v.a.createElement("span",null," ( ",this.state.checkedNum," ) "))))))}}]),t}(f.Component);t.default=Object(g.b)()(S)},902:function(e,t,a){}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[11],{1172:function(e,t,a){"use strict";a.r(t);a(737);var c=a(738),n=a.n(c),r=a(18),s=(a(43),a(14)),o=a.n(s),i=a(8),l=a(9),u=a(10),d=a(7),h=a(11),m=(a(255),a(91)),p=a.n(m),f=a(0),v=a.n(f),g=a(20),k=a(30),E=a(64),b=a(17),N=a(160),C=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).state={val:e.item.value},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"onChange",value:function(e,t){var a=e.target.checked;this.props.checkChange(t,a)}},{key:"render",value:function(){var e=this,t=this.props.item,a=v.a.createElement("div",{className:"order-info"},v.a.createElement("p",{className:"order-title text-overflow-one",onClick:function(){return e.props.toDetail(t.course_id)}},t.course_title),v.a.createElement("p",{className:"order-content text-overflow-2"},t.simpledescription),v.a.createElement("p",{className:"order-des"},v.a.createElement("span",{className:"order-newprice"},"\xa5",t.price1),v.a.createElement("span",{className:"order-price"},"\xa5",t.price0)));return v.a.createElement("div",{className:"cart-c-item"},v.a.createElement("div",{className:"cart-c-check"},v.a.createElement(n.a,{checked:t.check,onChange:function(a){e.onChange(a,t.course_id)}})),v.a.createElement("div",{className:"card-wrap"},v.a.createElement(N.a,{info:a,src:t.image_name,id:t.course_id,toDetail:this.props.toDetail})))}}]),t}(f.Component),j=function(e){function t(){return Object(i.a)(this,t),Object(u.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-main"},v.a.createElement("div",{className:"cart-c-body"},this.props.data.length>0?this.props.data.map(function(t,a){return v.a.createElement(C,{index:a,changeStock:function(t,a){e.props.changeStock(t,a)},checkChange:function(t,a){e.props.checkChange(t,a)},key:a,item:t,toDetail:e.props.toDetail})}):v.a.createElement("div",{className:"cart-tip"},v.a.createElement("p",{className:"cart-mess"},"\u8fd9\u91cc\u662f\u7a7a\u7684\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),v.a.createElement(b.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(f.Component),y=(a(902),a(15)),O=a.n(y),I=a(3),w=(a(63),p.a.alert),S=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).getList=function(){I.c.get("".concat(API.home,"/m/cart/list")).then(function(e){200===e.data.code?a.setState({data:e.data.data.courses,isLoading:!1}):o.a.info(e.data.msg,2)})},a.tobuy=function(){console.log(a.state.courseIdarr),I.c.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(a.state.courseIdarr,"]")).then(function(e){0==e.data.errno?a.props.history.push("/order?id=[".concat(a.state.courseIdarr,"]"),{simple:1}):o.a.info(e.data.msg,2)})},a.todelete=function(){a.state.courseIdarr.length>0&&w("","\u786e\u5b9a\u4ece\u8d2d\u7269\u8f66\u4e2d\u5220\u9664\uff1f",[{text:"\u53d6\u6d88",onPress:function(){return console.log("cancel")}},{text:"\u786e\u8ba4",onPress:function(){var e={course_ids:a.state.courseIdarr};I.c.post("".concat(API.home,"/m/cart/remove"),e).then(function(e){200===e.data.code?(a.getList(),a.setState({checkedNum:0,allPrice:0})):o.a.info(e.data.msg,2)})}}])},a.toCourseDetail=function(e){console.log(e);var t=a.props;t.dispatch;t.history.push("/detail?id=".concat(e))},a.state={data:[],checkedNum:0,allPrice:0,cartNmu:0,courseIdarr:[],isLoading:!0},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"allChange",value:function(e){var t=e.target.checked,a=this.state.data.map(function(e,a){return Object(r.a)({},e,{check:t})});if(this.setState({data:a}),this.calc(a),t){var c=[];a.map(function(e,t){c.push(e.course_id)}),this.setState({courseIdarr:c})}else this.setState({courseIdarr:[]})}},{key:"checkChange",value:function(e,t){var a=this,c=this.state.data.map(function(a,c){return a.course_id===e?Object(r.a)({},a,{check:t}):a});this.setState({data:c}),this.calc(c);var n=[];c.forEach(function(e,t){e.check?(n.push(e.course_id),a.setState({courseIdarr:n})):a.setState({courseIdarr:n})})}},{key:"calc",value:function(e){var t=0,a=0,c=0,n=[];e.forEach(function(e,r){e.check&&(n.push(e),c+=1,a=n.length,t+=parseFloat(e.price1))}),this.setState({checkedNum:a,allPrice:t,cartNmu:c})}},{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-page",style:{overflow:"hidden"}},v.a.createElement(k.e,{title:"\u8d2d\u7269\u8f66",arrow:!0,cart:!1,delete:!0,toDelete:this.todelete}),v.a.createElement(E.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"cart-body"},v.a.createElement(j,{checkChange:this.checkChange.bind(this),data:this.state.data,toDetail:this.toCourseDetail}),v.a.createElement("div",{className:"cart-footer"},v.a.createElement("div",{className:"cart-label"},v.a.createElement(n.a,{onChange:function(t){e.allChange(t)}}),v.a.createElement("div",null,"\u5168\u9009")),v.a.createElement("div",{className:"all-pirce"},v.a.createElement("p",null,v.a.createElement("span",null,"\u5408\u8ba1\uff1a"),v.a.createElement("span",null,"\uffe5",this.state.allPrice))),v.a.createElement("div",{className:O()({active:this.state.checkedNum>0}),onClick:function(){e.state.checkedNum>0&&e.tobuy()}},"\u7ed3\u7b97",v.a.createElement("span",null," ( ",this.state.checkedNum," ) "))))))}}]),t}(f.Component);t.default=Object(g.b)()(S)},902:function(e,t,a){}}]);
//# sourceMappingURL=ShopCart.7d28defb.chunk.js.map //# sourceMappingURL=ShopCart.eb48d301.chunk.js.map
\ No newline at end of file \ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{1171:function(e,t,a){"use strict";a.r(t);var n=a(24),o=(a(43),a(14)),c=a.n(o),s=a(117),i=a(8),r=a(9),l=a(10),u=a(7),p=a(11),d=a(0),m=a.n(d),h=(a(779),a(780),a(781),a(15)),f=a.n(h),v=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).clearInput=function(){a.props.onChange("")},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props,t=e.type,a=e.placeholder;return m.a.createElement("div",{className:"custom-input-wrapper"},m.a.createElement("input",{type:t,className:f()("custom-input"),placeholder:a,onChange:this.props.onChange,value:this.props.value}),m.a.createElement("i",{className:f()("iconfont icondanseshixintubiao-3",{hide:0===this.props.value.length}),onClick:this.clearInput}))}}]),t}(d.Component);v.defaultProps={type:"text",placeholder:""};var C,b=v,g=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).state={},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onChange,a=e.redeemCode,n=e.exchange;return m.a.createElement("div",{className:"exchange-bar"},m.a.createElement(b,{placeholder:"\u8bf7\u8f93\u5165\u4f18\u60e0\u7801",onChange:t,value:a}),m.a.createElement("button",{className:f()({active:a&&a.length>0}),onClick:n},"\u5151\u6362"))}}]),t}(d.Component),y=(a(782),function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).pick=function(){var e=a.props,t=e.useCoupon;!e.invalid&&t&&t(a.props.id)},a.GoToUse=function(){a.props.useCoupon(a.props.id)},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props,t=e.ctype,a=e.amount,n=e.format_expire_time,o=e.limit_course,c=e.invalid,s=e.course_title,i=e.id,r=e.selectedCouponId,l=e.showUseButton;return m.a.createElement("li",{className:"coupon",onClick:this.pick},m.a.createElement("div",{className:f()("coupon-info",c?"invalid":"coupon-type".concat(t))},m.a.createElement("p",{className:"type"},1===t?"\u4ee3\u91d1\u5238":"\u8bfe\u7a0b\u5238"),1===t?m.a.createElement("p",{className:"denomination"},a," ",m.a.createElement("span",null,"\u5143")):m.a.createElement("p",{className:"course-title"},s),m.a.createElement("p",{className:"expire"},"\u6709\u6548\u671f\u81f3\uff1a",n),r===i&&m.a.createElement("i",{className:f()("iconfont icondanseshixintubiao-5",{check:!c})}),m.a.createElement("ul",null,new Array(19).fill("a").map(function(e,t){return m.a.createElement("li",{key:t})}))),m.a.createElement("div",{className:"coupon-des"},m.a.createElement("span",{className:"limit"},0===o?"\u53ef\u7528\u4e8e\u5927\u4e8e\u4ee3\u91d1\u5238\u91d1\u989d\u7684\u8bfe\u7a0b":"\u4ec5\u9002\u7528\u4e8e\u300a".concat(s,"\u300b")),l&&m.a.createElement("button",{className:"use",onClick:this.GoToUse},"\u7acb\u5373\u4f7f\u7528")))}}]),t}(d.PureComponent)),E=a(3),j=a(71),O=a(38),_=a(30),I=a(20),w=(a(63),Object(I.b)()(C=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).state={selectedCouponId:0,redeemCode:"",couponList:[],valid_coupons:[],invalid_coupons:[],courseId:Object(E.b)("id"),showUseButton:!1},a.handleChange=function(e){var t=e?e.target.value:"";a.setState({redeemCode:t})},a.exchange=function(){var e=a.props.location.state,t=void 0===e?{}:e;""!==a.state.redeemCode?E.c.post("".concat(API.home,"/m/coupon/exchange"),{code:a.state.redeemCode}).then(function(e){var n=e.data;if(200===n.code){var o=n.data;if(a.state.showUseButton)a.setState({couponList:[].concat(Object(s.a)(a.state.couponList),[o]),redeemCode:""});else{var i=n.data;2==i.ctype&&i.limit_course!=a.state.courseId?a.setState({invalid_coupons:[].concat(Object(s.a)(a.state.invalid_coupons),[i]),showUseButton:null}):a.setState({valid_coupons:[].concat(Object(s.a)(a.state.valid_coupons),[i]),redeemCode:""})}c.a.info("\u5151\u6362\u6210\u529f"),"/my"===t.from&&a.getMyCoupons(),"/order"===t.from&&a.getAllCoupons()}else c.a.info(n.msg)}):c.a.info("\u8bf7\u8f93\u5165\u5151\u6362\u7801")},a.getMyCoupons=function(){E.c.get("".concat(API.home,"/m/coupon/all")).then(function(e){var t=e.data;200===t.code?a.setState({couponList:Object(O.isEmpty)(t.data)?[]:t.data}):c.a.info(t.msg)})},a.getAllCoupons=function(){E.c.post("".concat(API.home,"/m/coupon/select"),{course_id:a.state.courseId}).then(function(e){var t=e.data;if(200===t.code){var n=t.data.inuse_coupon;a.setState({valid_coupons:n?[].concat(Object(s.a)(n),Object(s.a)(t.data.valid_coupons)):t.data.valid_coupons,invalid_coupons:t.data.invalid_coupons,selectedCouponId:n.length?n[0].id:0})}else c.a.info(t.msg)})},a.useCoupon=function(e){var t=a.props,n=t.history,o=(t.dispatch,a.state.couponList.find(function(t){return t.id===e}));if(e)if(a.state.showUseButton){if(1!==o.ctype)return n.push("/detail?id=".concat(o.limit_course)),!1;n.push("/classify")}else{var s=a.state,i=s.courseId;s.selectedCouponId===e?E.c.post("".concat(API.home,"/m/coupon/cancel"),{course_id:i}).then(function(e){var t=e.data;200===t.code?a.setState({selectedCouponId:0}):c.a.info(t.msg)}):E.c.post("".concat(API.home,"/m/coupon/use"),{course_id:a.state.courseId,coupon_id:e}).then(function(t){var n=t&&t.data;200===n.code?(a.setState({selectedCouponId:e}),a.props.history.goBack()):c.a.info(n.msg)})}else c.a.info("\u672a\u77e5\u9519\u8bef"),location.reload()},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.history,a=e.location,n=this.props.location.state;n&&n.from&&("/my"===n.from?(this.getMyCoupons(),this.setState({showUseButton:!0})):(this.state.courseId||(a.state&&a.state.from?t.replace(a.state.from):t.goBack()),this.getAllCoupons()))}},{key:"render",value:function(){var e=this.props.location.state,t=this.state,a=t.showUseButton,n=t.selectedCouponId;return m.a.createElement("div",{className:"use-coupon"},m.a.createElement(_.e,{title:"\u4f18\u60e0\u5238",arrow:!0}),m.a.createElement(g,{onChange:this.handleChange,exchange:this.exchange,redeemCode:this.state.redeemCode}),m.a.createElement("div",{className:"coupons-area"},m.a.createElement(N,{coupons:e&&e.from&&"/my"===e.from?this.state.couponList:this.state.valid_coupons,showUseButton:a,selectedCouponId:n,select:this.select,useCoupon:this.useCoupon}),this.state.invalid_coupons.length>0&&m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{className:"invalid-title"},"- \u4e0d\u53ef\u4f7f\u7528\u7684\u4f18\u60e0\u5238 -"),m.a.createElement(N,{coupons:this.state.invalid_coupons,selectedCouponId:n,select:this.select,purpose:"use",invalid:"invalid"}))))}}]),t}(d.PureComponent))||C);function N(e){var t=e.coupons,a=Object(n.a)(e,["coupons"]);return 0===t.length?m.a.createElement("div",{className:"empty"},m.a.createElement("p",null,"\u6682\u65e0\u53ef\u4f7f\u7528\u7684\u4f18\u60e0\u5238")):m.a.createElement("ul",null,t.map(function(e){return m.a.createElement(y,Object.assign({key:e.id},e,{id:e.id},a))}))}t.default=Object(j.a)(w)},779:function(e,t,a){},780:function(e,t,a){},781:function(e,t,a){},782:function(e,t,a){}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[13],{1171:function(e,t,a){"use strict";a.r(t);var n=a(24),o=(a(43),a(14)),c=a.n(o),s=a(117),i=a(8),r=a(9),l=a(10),u=a(7),p=a(11),d=a(0),m=a.n(d),h=(a(779),a(780),a(781),a(15)),f=a.n(h),v=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).clearInput=function(){a.props.onChange("")},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props,t=e.type,a=e.placeholder;return m.a.createElement("div",{className:"custom-input-wrapper"},m.a.createElement("input",{type:t,className:f()("custom-input"),placeholder:a,onChange:this.props.onChange,value:this.props.value}),m.a.createElement("i",{className:f()("iconfont icondanseshixintubiao-3",{hide:0===this.props.value.length}),onClick:this.clearInput}))}}]),t}(d.Component);v.defaultProps={type:"text",placeholder:""};var C,b=v,g=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).state={},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onChange,a=e.redeemCode,n=e.exchange;return m.a.createElement("div",{className:"exchange-bar"},m.a.createElement(b,{placeholder:"\u8bf7\u8f93\u5165\u4f18\u60e0\u7801",onChange:t,value:a}),m.a.createElement("button",{className:f()({active:a&&a.length>0}),onClick:n},"\u5151\u6362"))}}]),t}(d.Component),y=(a(782),function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).pick=function(){var e=a.props,t=e.useCoupon;!e.invalid&&t&&t(a.props.id)},a.GoToUse=function(){a.props.useCoupon(a.props.id)},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props,t=e.ctype,a=e.amount,n=e.format_expire_time,o=e.limit_course,c=e.invalid,s=e.course_title,i=e.id,r=e.selectedCouponId,l=e.showUseButton;return m.a.createElement("li",{className:"coupon",onClick:this.pick},m.a.createElement("div",{className:f()("coupon-info",c?"invalid":"coupon-type".concat(t))},m.a.createElement("p",{className:"type"},1===t?"\u4ee3\u91d1\u5238":"\u8bfe\u7a0b\u5238"),1===t?m.a.createElement("p",{className:"denomination"},a," ",m.a.createElement("span",null,"\u5143")):m.a.createElement("p",{className:"course-title"},s),m.a.createElement("p",{className:"expire"},"\u6709\u6548\u671f\u81f3\uff1a",n),r===i&&m.a.createElement("i",{className:f()("iconfont icondanseshixintubiao-5",{check:!c})}),m.a.createElement("ul",null,new Array(19).fill("a").map(function(e,t){return m.a.createElement("li",{key:t})}))),m.a.createElement("div",{className:"coupon-des"},m.a.createElement("span",{className:"limit"},0===o?"\u53ef\u7528\u4e8e\u5927\u4e8e\u4ee3\u91d1\u5238\u91d1\u989d\u7684\u8bfe\u7a0b":"\u4ec5\u9002\u7528\u4e8e\u300a".concat(s,"\u300b")),l&&m.a.createElement("button",{className:"use",onClick:this.GoToUse},"\u7acb\u5373\u4f7f\u7528")))}}]),t}(d.PureComponent)),E=a(3),j=a(71),O=a(38),_=a(30),I=a(20),w=(a(63),Object(I.b)()(C=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).state={selectedCouponId:0,redeemCode:"",couponList:[],valid_coupons:[],invalid_coupons:[],courseId:Object(E.b)("id"),showUseButton:!1},a.handleChange=function(e){var t=e?e.target.value:"";a.setState({redeemCode:t})},a.exchange=function(){var e=a.props.location.state,t=void 0===e?{}:e;""!==a.state.redeemCode?E.c.post("".concat(API.home,"/m/coupon/exchange"),{code:a.state.redeemCode}).then(function(e){var n=e.data;if(200===n.code){var o=n.data;if(a.state.showUseButton)a.setState({couponList:[].concat(Object(s.a)(a.state.couponList),[o]),redeemCode:""});else{var i=n.data;2==i.ctype&&i.limit_course!=a.state.courseId?a.setState({invalid_coupons:[].concat(Object(s.a)(a.state.invalid_coupons),[i]),showUseButton:null}):a.setState({valid_coupons:[].concat(Object(s.a)(a.state.valid_coupons),[i]),redeemCode:""})}c.a.info("\u5151\u6362\u6210\u529f"),"/my"===t.from&&a.getMyCoupons(),"/order"===t.from&&a.getAllCoupons()}else c.a.info(n.msg)}):c.a.info("\u8bf7\u8f93\u5165\u5151\u6362\u7801")},a.getMyCoupons=function(){E.c.get("".concat(API.home,"/m/coupon/all")).then(function(e){var t=e.data;200===t.code?a.setState({couponList:Object(O.isEmpty)(t.data)?[]:t.data}):c.a.info(t.msg)})},a.getAllCoupons=function(){E.c.post("".concat(API.home,"/m/coupon/select"),{course_id:a.state.courseId}).then(function(e){var t=e.data;if(200===t.code){var n=t.data.inuse_coupon;a.setState({valid_coupons:n?[].concat(Object(s.a)(n),Object(s.a)(t.data.valid_coupons)):t.data.valid_coupons,invalid_coupons:t.data.invalid_coupons,selectedCouponId:n.length?n[0].id:0})}else c.a.info(t.msg)})},a.useCoupon=function(e){var t=a.props,n=t.history,o=(t.dispatch,a.state.couponList.find(function(t){return t.id===e}));if(e)if(a.state.showUseButton){if(1!==o.ctype)return n.push("/detail?id=".concat(o.limit_course)),!1;n.push("/classify")}else{var s=a.state,i=s.courseId;s.selectedCouponId===e?E.c.post("".concat(API.home,"/m/coupon/cancel"),{course_id:i}).then(function(e){var t=e.data;200===t.code?a.setState({selectedCouponId:0}):c.a.info(t.msg)}):E.c.post("".concat(API.home,"/m/coupon/use"),{course_id:a.state.courseId,coupon_id:e}).then(function(t){var n=t&&t.data;200===n.code?(a.setState({selectedCouponId:e}),a.props.history.goBack()):c.a.info(n.msg)})}else c.a.info("\u672a\u77e5\u9519\u8bef"),location.reload()},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.history,a=e.location,n=this.props.location.state;n&&n.from&&("/my"===n.from?(this.getMyCoupons(),this.setState({showUseButton:!0})):(this.state.courseId||(a.state&&a.state.from?t.replace(a.state.from):t.goBack()),this.getAllCoupons()))}},{key:"render",value:function(){var e=this.props.location.state,t=this.state,a=t.showUseButton,n=t.selectedCouponId;return m.a.createElement("div",{className:"use-coupon"},m.a.createElement(_.e,{title:"\u4f18\u60e0\u5238",arrow:!0}),m.a.createElement(g,{onChange:this.handleChange,exchange:this.exchange,redeemCode:this.state.redeemCode}),m.a.createElement("div",{className:"coupons-area"},m.a.createElement(N,{coupons:e&&e.from&&"/my"===e.from?this.state.couponList:this.state.valid_coupons,showUseButton:a,selectedCouponId:n,select:this.select,useCoupon:this.useCoupon}),this.state.invalid_coupons.length>0&&m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{className:"invalid-title"},"- \u4e0d\u53ef\u4f7f\u7528\u7684\u4f18\u60e0\u5238 -"),m.a.createElement(N,{coupons:this.state.invalid_coupons,selectedCouponId:n,select:this.select,purpose:"use",invalid:"invalid"}))))}}]),t}(d.PureComponent))||C);function N(e){var t=e.coupons,a=Object(n.a)(e,["coupons"]);return 0===t.length?m.a.createElement("div",{className:"empty"},m.a.createElement("p",null,"\u6682\u65e0\u53ef\u4f7f\u7528\u7684\u4f18\u60e0\u5238")):m.a.createElement("ul",null,t.map(function(e){return m.a.createElement(y,Object.assign({key:e.id},e,{id:e.id},a))}))}t.default=Object(j.a)(w)},779:function(e,t,a){},780:function(e,t,a){},781:function(e,t,a){},782:function(e,t,a){}}]);
//# sourceMappingURL=coupons.42908a9e.chunk.js.map //# sourceMappingURL=coupons.5ab92333.chunk.js.map
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1154:function(e,t,a){"use strict";a.r(t);a(43);var s=a(14),i=a.n(s),n=a(8),c=a(9),r=a(10),o=a(7),l=a(11),u=a(0),d=a.n(u),m=(a(889),a(30)),p=a(3),f=a(17),h=a(20),v=(a(63),a(64)),E=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;t.dispatch;t.history.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,{arrow:!0,title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,toHref:"/my"}),d.a.createElement(v.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)(E)},889:function(e,t,a){}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1154:function(e,t,a){"use strict";a.r(t);a(43);var s=a(14),i=a.n(s),n=a(8),c=a(9),r=a(10),o=a(7),l=a(11),u=a(0),d=a.n(u),m=(a(889),a(30)),p=a(3),f=a(17),h=a(20),v=(a(63),a(64)),E=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;t.dispatch;t.history.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,{arrow:!0,title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,toHref:"/my"}),d.a.createElement(v.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.j,{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)(E)},889:function(e,t,a){}}]);
//# sourceMappingURL=purchased.50b002b9.chunk.js.map //# sourceMappingURL=purchased.6730aed9.chunk.js.map
\ No newline at end of file \ No newline at end of file
!function(e){function r(r){for(var n,a,i=r[0],u=r[1],f=r[2],d=0,l=[];d<i.length;d++)a=i[d],o[a]&&l.push(o[a][0]),o[a]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,f||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,a=1;a<t.length;a++){var u=t[a];0!==o[u]&&(n=!1)}n&&(c.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},a={18:0},o={18:0},c=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[];a[e]?r.push(a[e]):0!==a[e]&&{0:1,1:1,2:1,3:1,4:1,6:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,16:1,17:1,19:1,20:1,21:1,22:1,23:1,26:1,28:1,29:1,30:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="mrstatic/css/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"718dff83",1:"f2f19957",2:"462fc81e",3:"2e7d81ca",4:"f2cc3163",5:"31d6cfe0",6:"8bb031ea",7:"31d6cfe0",8:"e5315535",9:"7456653e",10:"1ad68937",11:"3a4dbb7a",12:"bef8c404",13:"9ece7350",14:"00799624",16:"3ae12dec",17:"1daf107b",19:"fab97849",20:"f09a5959",21:"5e9927d1",22:"49988cae",23:"b57a1aec",25:"31d6cfe0",26:"4c706a4e",27:"31d6cfe0",28:"0bb224f2",29:"5ed15c7e",30:"ecbb6f9a"}[e]+".chunk.css",o=i.p+n,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var f=(s=c[u]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(f===n||f===o))return r()}var d=document.getElementsByTagName("style");for(u=0;u<d.length;u++){var s;if((f=(s=d[u]).getAttribute("data-href"))===n||f===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var n=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.request=n,delete a[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){a[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var c,u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(e){return i.p+"mrstatic/js/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"08512d4a",1:"14b87a5c",2:"e4a17922",3:"d919a532",4:"8a0d6ea9",5:"3cc6e1e4",6:"90142569",7:"b94e811f",8:"7486172b",9:"b44f1d85",10:"fb4552ba",11:"7d28defb",12:"d80fae56",13:"42908a9e",14:"4b9dc842",16:"885afd39",17:"50b002b9",19:"5ac662a8",20:"f1a65f58",21:"3d82a05b",22:"ff4e7682",23:"5cbec8d3",25:"9e7c92d2",26:"7a2827b2",27:"10103e6c",28:"a9948060",29:"0bcf050f",30:"663cc16b"}[e]+".chunk.js"}(e),c=function(r){u.onerror=u.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");c.type=n,c.request=a,t[1](c)}o[e]=void 0}};var f=setTimeout(function(){c({type:"timeout",target:u})},12e4);u.onerror=u.onload=c,document.head.appendChild(u)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var u=window.webpackJsonp=window.webpackJsonp||[],f=u.push.bind(u);u.push=r,u=u.slice();for(var d=0;d<u.length;d++)r(u[d]);var s=f;t()}([]); !function(e){function r(r){for(var a,n,i=r[0],u=r[1],f=r[2],d=0,l=[];d<i.length;d++)n=i[d],o[n]&&l.push(o[n][0]),o[n]=0;for(a in u)Object.prototype.hasOwnProperty.call(u,a)&&(e[a]=u[a]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,f||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],a=!0,n=1;n<t.length;n++){var u=t[n];0!==o[u]&&(a=!1)}a&&(c.splice(r--,1),e=i(i.s=t[0]))}return e}var a={},n={18:0},o={18:0},c=[];function i(r){if(a[r])return a[r].exports;var t=a[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[];n[e]?r.push(n[e]):0!==n[e]&&{0:1,1:1,2:1,3:1,4:1,6:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,16:1,17:1,19:1,20:1,21:1,22:1,23:1,26:1,28:1,29:1,30:1}[e]&&r.push(n[e]=new Promise(function(r,t){for(var a="mrstatic/css/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"718dff83",1:"f2f19957",2:"c0829f24",3:"2e7d81ca",4:"f2cc3163",5:"31d6cfe0",6:"8bb031ea",7:"31d6cfe0",8:"e5315535",9:"7456653e",10:"1ad68937",11:"3a4dbb7a",12:"bef8c404",13:"9ece7350",14:"00799624",16:"3ae12dec",17:"1daf107b",19:"fab97849",20:"f09a5959",21:"5e9927d1",22:"49988cae",23:"b57a1aec",25:"31d6cfe0",26:"4c706a4e",27:"31d6cfe0",28:"0bb224f2",29:"5ed15c7e",30:"ecbb6f9a"}[e]+".chunk.css",o=i.p+a,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var f=(s=c[u]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(f===a||f===o))return r()}var d=document.getElementsByTagName("style");for(u=0;u<d.length;u++){var s;if((f=(s=d[u]).getAttribute("data-href"))===a||f===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var a=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");c.request=a,delete n[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){n[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var a=new Promise(function(r,a){t=o[e]=[r,a]});r.push(t[2]=a);var c,u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(e){return i.p+"mrstatic/js/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"aist-share",13:"coupons",14:"detail",16:"myorders",17:"purchased",19:"search",20:"shareposter",21:"study",22:"togroup",23:"video"}[e]||e)+"."+{0:"a32b6dde",1:"790143c5",2:"bc50f964",3:"d919a532",4:"16357a6b",5:"11ae1da1",6:"e705234a",7:"e108ea6a",8:"8a9c9c25",9:"96f9c0af",10:"a0c80e4c",11:"eb48d301",12:"d80fae56",13:"5ab92333",14:"e1e29c15",16:"127a850e",17:"6730aed9",19:"5ac662a8",20:"3cc4222f",21:"f2e73fa9",22:"0bceafc5",23:"e5987a4a",25:"9e7c92d2",26:"7a2827b2",27:"10103e6c",28:"a9948060",29:"0bcf050f",30:"663cc16b"}[e]+".chunk.js"}(e),c=function(r){u.onerror=u.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var a=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+a+": "+n+")");c.type=a,c.request=n,t[1](c)}o[e]=void 0}};var f=setTimeout(function(){c({type:"timeout",target:u})},12e4);u.onerror=u.onload=c,document.head.appendChild(u)}return Promise.all(r)},i.m=e,i.c=a,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)i.d(t,a,function(r){return e[r]}.bind(null,a));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var u=window.webpackJsonp=window.webpackJsonp||[],f=u.push.bind(u);u.push=r,u=u.slice();for(var d=0;d<u.length;d++)r(u[d]);var s=f;t()}([]);
//# sourceMappingURL=runtime~main.0bb8e92c.js.map //# sourceMappingURL=runtime~main.414ea351.js.map
\ No newline at end of file \ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{1152:function(e,t,a){"use strict";a.r(t);a(43);var n=a(14),c=a.n(n),r=a(8),i=a(9),s=a(10),o=a(7),l=a(11),d=a(154),m=a(0),u=a.n(m),g=(a(866),a(30)),v=a(3),h=a(867),f=a.n(h),p=function(e){function t(e){var a;return Object(r.a)(this,t),(a=Object(s.a)(this,Object(o.a)(t).call(this,e))).initCanvas=function(e,t){var n=Object(d.a)(Object(d.a)(a)),c=e[t].poster,r=450*e[t].header_position_x,i=800*e[t].header_position_y,s=(e[t].qr_code_x,e[t].qr_code_y,e[t].qr_code_width,e[t].qr_code_height,"https://m.julyedu.com/detail?id=".concat(Object(v.b)("courseId"),"&dist_code").concat(Object(v.b)("dist_code")),document.getElementById("canvas")),o=s.getContext("2d");console.log(n),n.getBase64(c).then(function(a){var c=new Image;c.src=a;var s=document.getElementById("qrcode"),l=navigator.userAgent.toLowerCase();l.indexOf("Android")>-1||l.indexOf("Adr"),l.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?s=document.getElementById("qrcode"):/(Android)/i.test(navigator.userAgent)&&(s=document.getElementById("qrcode")),c.setAttribute("crossOrigin","anonymous"),c.onload=function(){o.drawImage(c,0,0,450,800),o.drawImage(s,320,685,100,100),o.fillStyle=e[t].username_color,o.font="16px serif",o.fillText("@"+n.state.name,r+50+20,i+25),o.font="14px serif",o.fillText("\u6b63\u5728\u5b66\u4e60\u8be5\u8bfe\u7a0b",r+50+20,i+25+20),o.restore()}}).then(function(){n.getBase64(n.state.imgUrl).then(function(e){var t=new Image;t.src=e,t.setAttribute("crossOrigin","anonymous"),t.setAttribute("border-Radius","50%"),t.onload=function(){n.imgPosition(o,t,r,i,24),o.drawImage(t,r,i,48,48),o.restore(),n.setState({billSrc:n.convertCanvasToImage(s)})}})})},a.children=function(e,t){var a=e.childNodes,n=[];if(/MSIE(6|7|8)/.test(navigator.userAgent))for(var c=0;c<a.length;c++){var r=a[c];1===r.nodeType&&(n[n.length]=r)}else n=Array.prototype.slice.call(e.children);if("string"===typeof t)for(var i=0;i<n.length;i++)(e=n[i]).nodeName.toLowerCase()!==t.toLowerCase()&&(n.splice(i,1),i--);return n},a.imgPosition=function(e,t,a,n,c){e.save();var r=a+c,i=n+c;e.beginPath(),e.arc(r,i,c,0,2*Math.PI),e.clip()},a.getBase64Image=function(e){var t=document.createElement("canvas");t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0,e.width,e.height);var a=e.src.substring(e.src.lastIndexOf(".")+1).toLowerCase();return t.toDataURL("image/"+a)},a.convertCanvasToImage=function(e){var t=new Image;return t.src=e.toDataURL("image/png"),t},a.squareClick=function(e){a.setState({smallactive:e}),a.initCanvas(a.state.bgImage,e)},a.state={codeSrc:"",billSrc:"",imgUrl:"",smallListImg:[],smallactive:0,distPrice:"",name:"",bgImage:[]},a}return Object(l.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.getCodeWe(),v.c.get("".concat(API.home,"/m/dist/posters/").concat(Object(v.b)("courseId"),"/").concat(Object(v.b)("uid"))).then(function(t){console.log(t),200===t.data.code?(e.setState({imgUrl:t.data.data.avatar,smallListImg:t.data.data.list,distPrice:t.data.data.dist_course,bgImage:t.data.data.list,name:t.data.data.username}),e.initCanvas(e.state.bgImage,0)):c.a.info(t.data.msg,2)})}},{key:"getCodeWe",value:function(){var e=this,t="https://m.julyedu.com/detail?id=".concat(Object(v.b)("courseId"),"&dist_code=").concat(Object(v.b)("dist_code"));return new Promise(function(a){f.a.toDataURL(t,{},function(t,a){e.setState({codeSrc:a})}),a()})}},{key:"getBase64",value:function(e){var t=this;return new Promise(function(a){var n=null,c=new Image,r=+new Date;c.setAttribute("crossOrigin","anonymous"),c.src=e+"?"+r,c.onload=function(){n=t.getBase64Image(c),a(n)},c.onerror=function(){var a=+new Date;t.getBase64(e+"?"+a)}})}},{key:"render",value:function(){var e=this,t=this.state,a=t.distPrice,n=void 0===a?{}:a,c=t.smallListImg,r=void 0===c?[]:c,i=t.smallactive;return u.a.createElement("div",{className:"share-poster"},u.a.createElement(g.e,{title:"\u751f\u6210\u4e13\u5c5e\u6d77\u62a5",arrow:!0,cart:!1}),u.a.createElement("div",{className:"total-container"},u.a.createElement("div",{className:"placard-img-container",id:"imgWrapper"},u.a.createElement("img",{src:this.state.billSrc.src,alt:""})),u.a.createElement("img",{src:this.state.codeSrc,alt:"",id:"qrcode",className:"placard-code"}),u.a.createElement("canvas",{id:"canvas",width:"450",height:"800",className:""===this.state.billSrc?"":"hide"})),u.a.createElement("div",{className:"placard-desc"},u.a.createElement("span",{className:"placard-sharetxt"},"\u957f\u6309\u4fdd\u5b58\u6d77\u62a5\u5206\u4eab\u7ed9\u597d\u53cb\uff0c\u6bcf\u6709\u4e00\u4eba\u901a\u8fc7\u60a8\u7684\u5206\u4eab\u8d2d\u4e70\u8be5\u8bfe\u7a0b\uff0c\u60a8\u53ef\u4ee5",0===n.count_type&&u.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97",n.first_level_tip,"\u5143\u7684\u4f63\u91d1\u5956\u52b1\u3002"),1===n.count_type&&u.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97\u6210\u4ea4\u91d1\u989d\u7684",n.first_level_scale,"%\u4f5c\u4e3a\u4f63\u91d1\u5956\u52b1\u3002"))),u.a.createElement("div",{className:"placard-swiper"},u.a.createElement("ul",{className:"placard-list"},r.length>0&&r.map(function(t,a){return u.a.createElement("li",{onClick:e.squareClick.bind(e,a),key:a,className:i===a?"active":""},u.a.createElement("img",{src:t.square,alt:""}))}))))}}]),t}(m.Component);t.default=p},866:function(e,t,a){}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[20],{1152:function(e,t,a){"use strict";a.r(t);a(43);var n=a(14),c=a.n(n),r=a(8),i=a(9),s=a(10),o=a(7),l=a(11),d=a(154),m=a(0),u=a.n(m),g=(a(866),a(30)),v=a(3),h=a(867),f=a.n(h),p=function(e){function t(e){var a;return Object(r.a)(this,t),(a=Object(s.a)(this,Object(o.a)(t).call(this,e))).initCanvas=function(e,t){var n=Object(d.a)(Object(d.a)(a)),c=e[t].poster,r=450*e[t].header_position_x,i=800*e[t].header_position_y,s=(e[t].qr_code_x,e[t].qr_code_y,e[t].qr_code_width,e[t].qr_code_height,"https://m.julyedu.com/detail?id=".concat(Object(v.b)("courseId"),"&dist_code").concat(Object(v.b)("dist_code")),document.getElementById("canvas")),o=s.getContext("2d");console.log(n),n.getBase64(c).then(function(a){var c=new Image;c.src=a;var s=document.getElementById("qrcode"),l=navigator.userAgent.toLowerCase();l.indexOf("Android")>-1||l.indexOf("Adr"),l.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?s=document.getElementById("qrcode"):/(Android)/i.test(navigator.userAgent)&&(s=document.getElementById("qrcode")),c.setAttribute("crossOrigin","anonymous"),c.onload=function(){o.drawImage(c,0,0,450,800),o.drawImage(s,320,685,100,100),o.fillStyle=e[t].username_color,o.font="16px serif",o.fillText("@"+n.state.name,r+50+20,i+25),o.font="14px serif",o.fillText("\u6b63\u5728\u5b66\u4e60\u8be5\u8bfe\u7a0b",r+50+20,i+25+20),o.restore()}}).then(function(){n.getBase64(n.state.imgUrl).then(function(e){var t=new Image;t.src=e,t.setAttribute("crossOrigin","anonymous"),t.setAttribute("border-Radius","50%"),t.onload=function(){n.imgPosition(o,t,r,i,24),o.drawImage(t,r,i,48,48),o.restore(),n.setState({billSrc:n.convertCanvasToImage(s)})}})})},a.children=function(e,t){var a=e.childNodes,n=[];if(/MSIE(6|7|8)/.test(navigator.userAgent))for(var c=0;c<a.length;c++){var r=a[c];1===r.nodeType&&(n[n.length]=r)}else n=Array.prototype.slice.call(e.children);if("string"===typeof t)for(var i=0;i<n.length;i++)(e=n[i]).nodeName.toLowerCase()!==t.toLowerCase()&&(n.splice(i,1),i--);return n},a.imgPosition=function(e,t,a,n,c){e.save();var r=a+c,i=n+c;e.beginPath(),e.arc(r,i,c,0,2*Math.PI),e.clip()},a.getBase64Image=function(e){var t=document.createElement("canvas");t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0,e.width,e.height);var a=e.src.substring(e.src.lastIndexOf(".")+1).toLowerCase();return t.toDataURL("image/"+a)},a.convertCanvasToImage=function(e){var t=new Image;return t.src=e.toDataURL("image/png"),t},a.squareClick=function(e){a.setState({smallactive:e}),a.initCanvas(a.state.bgImage,e)},a.state={codeSrc:"",billSrc:"",imgUrl:"",smallListImg:[],smallactive:0,distPrice:"",name:"",bgImage:[]},a}return Object(l.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.getCodeWe(),v.c.get("".concat(API.home,"/m/dist/posters/").concat(Object(v.b)("courseId"),"/").concat(Object(v.b)("uid"))).then(function(t){console.log(t),200===t.data.code?(e.setState({imgUrl:t.data.data.avatar,smallListImg:t.data.data.list,distPrice:t.data.data.dist_course,bgImage:t.data.data.list,name:t.data.data.username}),e.initCanvas(e.state.bgImage,0)):c.a.info(t.data.msg,2)})}},{key:"getCodeWe",value:function(){var e=this,t="https://m.julyedu.com/detail?id=".concat(Object(v.b)("courseId"),"&dist_code=").concat(Object(v.b)("dist_code"));return new Promise(function(a){f.a.toDataURL(t,{},function(t,a){e.setState({codeSrc:a})}),a()})}},{key:"getBase64",value:function(e){var t=this;return new Promise(function(a){var n=null,c=new Image,r=+new Date;c.setAttribute("crossOrigin","anonymous"),c.src=e+"?"+r,c.onload=function(){n=t.getBase64Image(c),a(n)},c.onerror=function(){var a=+new Date;t.getBase64(e+"?"+a)}})}},{key:"render",value:function(){var e=this,t=this.state,a=t.distPrice,n=void 0===a?{}:a,c=t.smallListImg,r=void 0===c?[]:c,i=t.smallactive;return u.a.createElement("div",{className:"share-poster"},u.a.createElement(g.e,{title:"\u751f\u6210\u4e13\u5c5e\u6d77\u62a5",arrow:!0,cart:!1}),u.a.createElement("div",{className:"total-container"},u.a.createElement("div",{className:"placard-img-container",id:"imgWrapper"},u.a.createElement("img",{src:this.state.billSrc.src,alt:""})),u.a.createElement("img",{src:this.state.codeSrc,alt:"",id:"qrcode",className:"placard-code"}),u.a.createElement("canvas",{id:"canvas",width:"450",height:"800",className:""===this.state.billSrc?"":"hide"})),u.a.createElement("div",{className:"placard-desc"},u.a.createElement("span",{className:"placard-sharetxt"},"\u957f\u6309\u4fdd\u5b58\u6d77\u62a5\u5206\u4eab\u7ed9\u597d\u53cb\uff0c\u6bcf\u6709\u4e00\u4eba\u901a\u8fc7\u60a8\u7684\u5206\u4eab\u8d2d\u4e70\u8be5\u8bfe\u7a0b\uff0c\u60a8\u53ef\u4ee5",0===n.count_type&&u.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97",n.first_level_tip,"\u5143\u7684\u4f63\u91d1\u5956\u52b1\u3002"),1===n.count_type&&u.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97\u6210\u4ea4\u91d1\u989d\u7684",n.first_level_scale,"%\u4f5c\u4e3a\u4f63\u91d1\u5956\u52b1\u3002"))),u.a.createElement("div",{className:"placard-swiper"},u.a.createElement("ul",{className:"placard-list"},r.length>0&&r.map(function(t,a){return u.a.createElement("li",{onClick:e.squareClick.bind(e,a),key:a,className:i===a?"active":""},u.a.createElement("img",{src:t.square,alt:""}))}))))}}]),t}(m.Component);t.default=p},866:function(e,t,a){}}]);
//# sourceMappingURL=shareposter.f1a65f58.chunk.js.map //# sourceMappingURL=shareposter.3cc4222f.chunk.js.map
\ No newline at end of file \ No newline at end of file
self.__precacheManifest = [ self.__precacheManifest = [
{ {
"revision": "46f3edf3ea13bb430d10", "revision": "82573bf83d21e39c2a35",
"url": "/mrstatic/css/purchased.1daf107b.chunk.css" "url": "/mrstatic/css/purchased.1daf107b.chunk.css"
}, },
{ {
"revision": "ca4915a1e285a5c0a3f3", "revision": "0555fd95c11b96281410",
"url": "/mrstatic/css/BargainMiddlePage.718dff83.chunk.css" "url": "/mrstatic/css/BargainMiddlePage.718dff83.chunk.css"
}, },
{ {
"revision": "79c2d2972cdbc7ddc998", "revision": "5155d93a3c8d9a6060a5",
"url": "/mrstatic/css/Classify.f2f19957.chunk.css" "url": "/mrstatic/css/Classify.f2f19957.chunk.css"
}, },
{ {
"revision": "79c2d2972cdbc7ddc998", "revision": "5155d93a3c8d9a6060a5",
"url": "/mrstatic/js/Classify.14b87a5c.chunk.js" "url": "/mrstatic/js/Classify.790143c5.chunk.js"
}, },
{ {
"revision": "f9204b3f9dc083a59e34", "revision": "b71f613b5ea383cfca32",
"url": "/mrstatic/css/CourseList.462fc81e.chunk.css" "url": "/mrstatic/css/CourseList.c0829f24.chunk.css"
}, },
{ {
"revision": "f9204b3f9dc083a59e34", "revision": "b71f613b5ea383cfca32",
"url": "/mrstatic/js/CourseList.e4a17922.chunk.js" "url": "/mrstatic/js/CourseList.bc50f964.chunk.js"
}, },
{ {
"revision": "e297972512727ad34380", "revision": "e297972512727ad34380",
...@@ -32,60 +32,60 @@ self.__precacheManifest = [ ...@@ -32,60 +32,60 @@ self.__precacheManifest = [
"url": "/mrstatic/js/DrawDocument.d919a532.chunk.js" "url": "/mrstatic/js/DrawDocument.d919a532.chunk.js"
}, },
{ {
"revision": "d11dcd28a7628da0de93", "revision": "5a2ac299986c294a615d",
"url": "/mrstatic/css/Examination.f2cc3163.chunk.css" "url": "/mrstatic/css/Examination.f2cc3163.chunk.css"
}, },
{ {
"revision": "d11dcd28a7628da0de93", "revision": "5a2ac299986c294a615d",
"url": "/mrstatic/js/Examination.8a0d6ea9.chunk.js" "url": "/mrstatic/js/Examination.16357a6b.chunk.js"
}, },
{ {
"revision": "9dbade89e425cb7b267f", "revision": "5e62539c5a1fbcf59be8",
"url": "/mrstatic/js/MyEdit.3cc6e1e4.chunk.js" "url": "/mrstatic/js/MyEdit.11ae1da1.chunk.js"
}, },
{ {
"revision": "feecbe38e95c183f22f7", "revision": "8c82ada762d83b89b569",
"url": "/mrstatic/css/Order.8bb031ea.chunk.css" "url": "/mrstatic/css/Order.8bb031ea.chunk.css"
}, },
{ {
"revision": "feecbe38e95c183f22f7", "revision": "8c82ada762d83b89b569",
"url": "/mrstatic/js/Order.90142569.chunk.js" "url": "/mrstatic/js/Order.e705234a.chunk.js"
}, },
{ {
"revision": "efd0e02a07d9e3db8aed", "revision": "0cc67ab0c3186c44378b",
"url": "/mrstatic/js/Orderinfo.b94e811f.chunk.js" "url": "/mrstatic/js/Orderinfo.e108ea6a.chunk.js"
}, },
{ {
"revision": "6378da2b2377d07e39d3", "revision": "814af398f2f8c48952d4",
"url": "/mrstatic/css/PayOrder.e5315535.chunk.css" "url": "/mrstatic/css/PayOrder.e5315535.chunk.css"
}, },
{ {
"revision": "6378da2b2377d07e39d3", "revision": "814af398f2f8c48952d4",
"url": "/mrstatic/js/PayOrder.7486172b.chunk.js" "url": "/mrstatic/js/PayOrder.8a9c9c25.chunk.js"
}, },
{ {
"revision": "fe2459c78bc65aff638d", "revision": "20e005373e62184cb839",
"url": "/mrstatic/css/Preferential.7456653e.chunk.css" "url": "/mrstatic/css/Preferential.7456653e.chunk.css"
}, },
{ {
"revision": "fe2459c78bc65aff638d", "revision": "20e005373e62184cb839",
"url": "/mrstatic/js/Preferential.b44f1d85.chunk.js" "url": "/mrstatic/js/Preferential.96f9c0af.chunk.js"
}, },
{ {
"revision": "e3d8438f464bdc467135", "revision": "501d51d2793bc3bedc33",
"url": "/mrstatic/css/SearchResult.1ad68937.chunk.css" "url": "/mrstatic/css/SearchResult.1ad68937.chunk.css"
}, },
{ {
"revision": "e3d8438f464bdc467135", "revision": "501d51d2793bc3bedc33",
"url": "/mrstatic/js/SearchResult.fb4552ba.chunk.js" "url": "/mrstatic/js/SearchResult.a0c80e4c.chunk.js"
}, },
{ {
"revision": "d6b598c9453284171bf5", "revision": "a227cca379a5237e6477",
"url": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css" "url": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css"
}, },
{ {
"revision": "d6b598c9453284171bf5", "revision": "a227cca379a5237e6477",
"url": "/mrstatic/js/ShopCart.7d28defb.chunk.js" "url": "/mrstatic/js/ShopCart.eb48d301.chunk.js"
}, },
{ {
"revision": "07009ff0e48ca7743af2", "revision": "07009ff0e48ca7743af2",
...@@ -96,48 +96,48 @@ self.__precacheManifest = [ ...@@ -96,48 +96,48 @@ self.__precacheManifest = [
"url": "/mrstatic/js/aist-share.d80fae56.chunk.js" "url": "/mrstatic/js/aist-share.d80fae56.chunk.js"
}, },
{ {
"revision": "321ffb04308fb81fc1f7", "revision": "305a82204974dfbb1e58",
"url": "/mrstatic/css/coupons.9ece7350.chunk.css" "url": "/mrstatic/css/coupons.9ece7350.chunk.css"
}, },
{ {
"revision": "321ffb04308fb81fc1f7", "revision": "305a82204974dfbb1e58",
"url": "/mrstatic/js/coupons.42908a9e.chunk.js" "url": "/mrstatic/js/coupons.5ab92333.chunk.js"
}, },
{ {
"revision": "faed2c64443f7d371791", "revision": "89f2c785e5e416f4f504",
"url": "/mrstatic/css/detail.00799624.chunk.css" "url": "/mrstatic/css/detail.00799624.chunk.css"
}, },
{ {
"revision": "faed2c64443f7d371791", "revision": "89f2c785e5e416f4f504",
"url": "/mrstatic/js/detail.4b9dc842.chunk.js" "url": "/mrstatic/js/detail.e1e29c15.chunk.js"
}, },
{ {
"revision": "f786987c314312860c0e", "revision": "bcf4cc2ec06e696bc6fc",
"url": "/mrstatic/css/main.ad15f1e8.chunk.css" "url": "/mrstatic/css/main.ad15f1e8.chunk.css"
}, },
{ {
"revision": "f786987c314312860c0e", "revision": "bcf4cc2ec06e696bc6fc",
"url": "/mrstatic/js/main.25eeca6a.chunk.js" "url": "/mrstatic/js/main.e5fd2300.chunk.js"
}, },
{ {
"revision": "4b2f88e7c478d41a60a7", "revision": "5ea5993dc513dd00ef41",
"url": "/mrstatic/css/myorders.3ae12dec.chunk.css" "url": "/mrstatic/css/myorders.3ae12dec.chunk.css"
}, },
{ {
"revision": "4b2f88e7c478d41a60a7", "revision": "5ea5993dc513dd00ef41",
"url": "/mrstatic/js/myorders.885afd39.chunk.js" "url": "/mrstatic/js/myorders.127a850e.chunk.js"
}, },
{ {
"revision": "ca4915a1e285a5c0a3f3", "revision": "0555fd95c11b96281410",
"url": "/mrstatic/js/BargainMiddlePage.08512d4a.chunk.js" "url": "/mrstatic/js/BargainMiddlePage.a32b6dde.chunk.js"
}, },
{ {
"revision": "46f3edf3ea13bb430d10", "revision": "82573bf83d21e39c2a35",
"url": "/mrstatic/js/purchased.50b002b9.chunk.js" "url": "/mrstatic/js/purchased.6730aed9.chunk.js"
}, },
{ {
"revision": "dc294be7f20426ea71de", "revision": "802217e5616c4544d718",
"url": "/mrstatic/js/runtime~main.0bb8e92c.js" "url": "/mrstatic/js/runtime~main.414ea351.js"
}, },
{ {
"revision": "7958e79d48a7a89a0b5b", "revision": "7958e79d48a7a89a0b5b",
...@@ -148,44 +148,44 @@ self.__precacheManifest = [ ...@@ -148,44 +148,44 @@ self.__precacheManifest = [
"url": "/mrstatic/js/search.5ac662a8.chunk.js" "url": "/mrstatic/js/search.5ac662a8.chunk.js"
}, },
{ {
"revision": "388a0dcd8203a70127c6", "revision": "e402af38fe66e65f74d9",
"url": "/mrstatic/css/shareposter.f09a5959.chunk.css" "url": "/mrstatic/css/shareposter.f09a5959.chunk.css"
}, },
{ {
"revision": "388a0dcd8203a70127c6", "revision": "e402af38fe66e65f74d9",
"url": "/mrstatic/js/shareposter.f1a65f58.chunk.js" "url": "/mrstatic/js/shareposter.3cc4222f.chunk.js"
}, },
{ {
"revision": "dec06297a83d00a56bab", "revision": "54247a60c742cbe3644c",
"url": "/mrstatic/css/study.5e9927d1.chunk.css" "url": "/mrstatic/css/study.5e9927d1.chunk.css"
}, },
{ {
"revision": "dec06297a83d00a56bab", "revision": "54247a60c742cbe3644c",
"url": "/mrstatic/js/study.3d82a05b.chunk.js" "url": "/mrstatic/js/study.f2e73fa9.chunk.js"
}, },
{ {
"revision": "c21dc93130c98bc7f9b0", "revision": "f6391be9e39fd8eea0aa",
"url": "/mrstatic/css/togroup.49988cae.chunk.css" "url": "/mrstatic/css/togroup.49988cae.chunk.css"
}, },
{ {
"revision": "c21dc93130c98bc7f9b0", "revision": "f6391be9e39fd8eea0aa",
"url": "/mrstatic/js/togroup.ff4e7682.chunk.js" "url": "/mrstatic/js/togroup.0bceafc5.chunk.js"
}, },
{ {
"revision": "3513e9643ec8829df9c9", "revision": "9e6723b2d87d8e386117",
"url": "/mrstatic/css/video.b57a1aec.chunk.css" "url": "/mrstatic/css/video.b57a1aec.chunk.css"
}, },
{ {
"revision": "3513e9643ec8829df9c9", "revision": "9e6723b2d87d8e386117",
"url": "/mrstatic/js/video.5cbec8d3.chunk.js" "url": "/mrstatic/js/video.e5987a4a.chunk.js"
}, },
{ {
"revision": "80011994e30adf599e5f47fcc81bc06d", "revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/mrstatic/media/progress-share-bg.80011994.png" "url": "/mrstatic/media/progress-share-bg.80011994.png"
}, },
{ {
"revision": "f496e16c9a70e63bf74c", "revision": "7ea608cc458204eeb58f",
"url": "/mrstatic/js/24.77980575.chunk.js" "url": "/mrstatic/js/24.dceae550.chunk.js"
}, },
{ {
"revision": "e25f782cb4ad1d9be1c5", "revision": "e25f782cb4ad1d9be1c5",
...@@ -248,11 +248,11 @@ self.__precacheManifest = [ ...@@ -248,11 +248,11 @@ self.__precacheManifest = [
"url": "/mrstatic/css/26.4c706a4e.chunk.css" "url": "/mrstatic/css/26.4c706a4e.chunk.css"
}, },
{ {
"revision": "f496e16c9a70e63bf74c", "revision": "7ea608cc458204eeb58f",
"url": "/mrstatic/css/24.b608c916.chunk.css" "url": "/mrstatic/css/24.b608c916.chunk.css"
}, },
{ {
"revision": "dc357c7b141338f2b330040814d3fd0a", "revision": "445270e8791f7d6ed393e0f1c6422f78",
"url": "/index.html" "url": "/index.html"
} }
]; ];
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"); importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts( importScripts(
"/precache-manifest.7a6b03b59519fced7da361524131348e.js" "/precache-manifest.b743e66a906da8571a424d9d2efeb985.js"
); );
workbox.clientsClaim(); workbox.clientsClaim();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment