Commit cf5daff0 by xuzhenghua

下单

parent c6429d96
{
"BargainMiddlePage.css": "/static/css/BargainMiddlePage.9e05243b.chunk.css",
"BargainMiddlePage.js": "/static/js/BargainMiddlePage.e6b11299.chunk.js",
"BargainMiddlePage.js.map": "/static/js/BargainMiddlePage.e6b11299.chunk.js.map",
"Classify.css": "/static/css/Classify.e3e9b348.chunk.css",
"Classify.js": "/static/js/Classify.88e16392.chunk.js",
"Classify.js.map": "/static/js/Classify.88e16392.chunk.js.map",
"CourseList.css": "/static/css/CourseList.369bce9d.chunk.css",
"CourseList.js": "/static/js/CourseList.d06af937.chunk.js",
"CourseList.js.map": "/static/js/CourseList.d06af937.chunk.js.map",
"DrawDocument.css": "/static/css/DrawDocument.2e7d81ca.chunk.css",
"DrawDocument.js": "/static/js/DrawDocument.cdb5e58a.chunk.js",
"DrawDocument.js.map": "/static/js/DrawDocument.cdb5e58a.chunk.js.map",
"Examination.css": "/static/css/Examination.fc9da1d2.chunk.css",
"Examination.js": "/static/js/Examination.fa19e5b9.chunk.js",
"Examination.js.map": "/static/js/Examination.fa19e5b9.chunk.js.map",
"MyEdit.js": "/static/js/MyEdit.93c1066f.chunk.js",
"MyEdit.js.map": "/static/js/MyEdit.93c1066f.chunk.js.map",
"Order.css": "/static/css/Order.6576554c.chunk.css",
"Order.js": "/static/js/Order.b2093828.chunk.js",
"Order.js.map": "/static/js/Order.b2093828.chunk.js.map",
"Orderinfo.js": "/static/js/Orderinfo.1c23f0d1.chunk.js",
"Orderinfo.js.map": "/static/js/Orderinfo.1c23f0d1.chunk.js.map",
"PayOrder.css": "/static/css/PayOrder.21570c76.chunk.css",
"PayOrder.js": "/static/js/PayOrder.c01a72d8.chunk.js",
"PayOrder.js.map": "/static/js/PayOrder.c01a72d8.chunk.js.map",
"Preferential.css": "/static/css/Preferential.3b4dfe41.chunk.css",
"Preferential.js": "/static/js/Preferential.884abefc.chunk.js",
"Preferential.js.map": "/static/js/Preferential.884abefc.chunk.js.map",
"SearchResult.css": "/static/css/SearchResult.8711b264.chunk.css",
"SearchResult.js": "/static/js/SearchResult.d7c730c9.chunk.js",
"SearchResult.js.map": "/static/js/SearchResult.d7c730c9.chunk.js.map",
"ShopCart.css": "/static/css/ShopCart.a93db4c0.chunk.css",
"ShopCart.js": "/static/js/ShopCart.ce51dba2.chunk.js",
"ShopCart.js.map": "/static/js/ShopCart.ce51dba2.chunk.js.map",
"aist-share.css": "/static/css/aist-share.bef8c404.chunk.css",
"aist-share.js": "/static/js/aist-share.6006a322.chunk.js",
"aist-share.js.map": "/static/js/aist-share.6006a322.chunk.js.map",
"coupons.css": "/static/css/coupons.9ece7350.chunk.css",
"coupons.js": "/static/js/coupons.7ac51087.chunk.js",
"coupons.js.map": "/static/js/coupons.7ac51087.chunk.js.map",
"detail.css": "/static/css/detail.72edbb5f.chunk.css",
"detail.js": "/static/js/detail.e0d344c7.chunk.js",
"detail.js.map": "/static/js/detail.e0d344c7.chunk.js.map",
"main.css": "/static/css/main.1df66505.chunk.css",
"main.js": "/static/js/main.5b0af860.chunk.js",
"main.js.map": "/static/js/main.5b0af860.chunk.js.map",
"myorders.css": "/static/css/myorders.5434bc7e.chunk.css",
"myorders.js": "/static/js/myorders.9591b784.chunk.js",
"myorders.js.map": "/static/js/myorders.9591b784.chunk.js.map",
"purchased.css": "/static/css/purchased.4b0044ec.chunk.css",
"purchased.js": "/static/js/purchased.8e73e32c.chunk.js",
"purchased.js.map": "/static/js/purchased.8e73e32c.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.2ad24738.js",
"runtime~main.js.map": "/static/js/runtime~main.2ad24738.js.map",
"search.css": "/static/css/search.9fa57dd6.chunk.css",
"search.js": "/static/js/search.4e789760.chunk.js",
"search.js.map": "/static/js/search.4e789760.chunk.js.map",
"shareposter.css": "/static/css/shareposter.82081d02.chunk.css",
"shareposter.js": "/static/js/shareposter.5ab9b613.chunk.js",
"shareposter.js.map": "/static/js/shareposter.5ab9b613.chunk.js.map",
"study.css": "/static/css/study.50d01810.chunk.css",
"study.js": "/static/js/study.37af7845.chunk.js",
"study.js.map": "/static/js/study.37af7845.chunk.js.map",
"togroup.css": "/static/css/togroup.49988cae.chunk.css",
"togroup.js": "/static/js/togroup.fe3257a0.chunk.js",
"togroup.js.map": "/static/js/togroup.fe3257a0.chunk.js.map",
"video.css": "/static/css/video.0c707680.chunk.css",
"video.js": "/static/js/video.8be500eb.chunk.js",
"video.js.map": "/static/js/video.8be500eb.chunk.js.map",
"static/css/24.257b0329.chunk.css": "/static/css/24.257b0329.chunk.css",
"static/js/24.cc1aa77e.chunk.js": "/static/js/24.cc1aa77e.chunk.js",
"static/js/24.cc1aa77e.chunk.js.map": "/static/js/24.cc1aa77e.chunk.js.map",
"static/js/25.58629408.chunk.js": "/static/js/25.58629408.chunk.js",
"static/js/25.58629408.chunk.js.map": "/static/js/25.58629408.chunk.js.map",
"static/css/26.1b3a6258.chunk.css": "/static/css/26.1b3a6258.chunk.css",
"static/js/26.ca44de75.chunk.js": "/static/js/26.ca44de75.chunk.js",
"static/js/26.ca44de75.chunk.js.map": "/static/js/26.ca44de75.chunk.js.map",
"static/js/27.32213583.chunk.js": "/static/js/27.32213583.chunk.js",
"static/js/27.32213583.chunk.js.map": "/static/js/27.32213583.chunk.js.map",
"static/css/28.694b4628.chunk.css": "/static/css/28.694b4628.chunk.css",
"static/js/28.262e6dc6.chunk.js": "/static/js/28.262e6dc6.chunk.js",
"static/js/28.262e6dc6.chunk.js.map": "/static/js/28.262e6dc6.chunk.js.map",
"static/css/29.5ed15c7e.chunk.css": "/static/css/29.5ed15c7e.chunk.css",
"static/js/29.e2cba4ed.chunk.js": "/static/js/29.e2cba4ed.chunk.js",
"static/js/29.e2cba4ed.chunk.js.map": "/static/js/29.e2cba4ed.chunk.js.map",
"static/css/30.ecbb6f9a.chunk.css": "/static/css/30.ecbb6f9a.chunk.css",
"static/js/30.9b24ec4e.chunk.js": "/static/js/30.9b24ec4e.chunk.js",
"static/js/30.9b24ec4e.chunk.js.map": "/static/js/30.9b24ec4e.chunk.js.map",
"static/css/31.bc06dce4.chunk.css": "/static/css/31.bc06dce4.chunk.css",
"static/js/31.19325664.chunk.js": "/static/js/31.19325664.chunk.js",
"static/js/31.19325664.chunk.js.map": "/static/js/31.19325664.chunk.js.map",
"BargainMiddlePage.css": "/static/css/BargainMiddlePage.6d24aba4.chunk.css",
"BargainMiddlePage.js": "/static/js/BargainMiddlePage.5ad51000.chunk.js",
"BargainMiddlePage.js.map": "/static/js/BargainMiddlePage.5ad51000.chunk.js.map",
"Classify.css": "/static/css/Classify.5ed0fc89.chunk.css",
"Classify.js": "/static/js/Classify.da3edf64.chunk.js",
"Classify.js.map": "/static/js/Classify.da3edf64.chunk.js.map",
"CourseList.css": "/static/css/CourseList.5ce769bd.chunk.css",
"CourseList.js": "/static/js/CourseList.da982f82.chunk.js",
"CourseList.js.map": "/static/js/CourseList.da982f82.chunk.js.map",
"DrawDocument.css": "/static/css/DrawDocument.aeb3f822.chunk.css",
"DrawDocument.js": "/static/js/DrawDocument.b6b14ec2.chunk.js",
"DrawDocument.js.map": "/static/js/DrawDocument.b6b14ec2.chunk.js.map",
"Examination.css": "/static/css/Examination.280c19c2.chunk.css",
"Examination.js": "/static/js/Examination.954a0197.chunk.js",
"Examination.js.map": "/static/js/Examination.954a0197.chunk.js.map",
"MyEdit.js": "/static/js/MyEdit.e7408258.chunk.js",
"MyEdit.js.map": "/static/js/MyEdit.e7408258.chunk.js.map",
"Order.css": "/static/css/Order.061a2017.chunk.css",
"Order.js": "/static/js/Order.a3016da1.chunk.js",
"Order.js.map": "/static/js/Order.a3016da1.chunk.js.map",
"Orderinfo.js": "/static/js/Orderinfo.c503b1f0.chunk.js",
"Orderinfo.js.map": "/static/js/Orderinfo.c503b1f0.chunk.js.map",
"PayOrder.css": "/static/css/PayOrder.a9111f28.chunk.css",
"PayOrder.js": "/static/js/PayOrder.c84e2bbe.chunk.js",
"PayOrder.js.map": "/static/js/PayOrder.c84e2bbe.chunk.js.map",
"Preferential.css": "/static/css/Preferential.99c1fc9f.chunk.css",
"Preferential.js": "/static/js/Preferential.5d20f031.chunk.js",
"Preferential.js.map": "/static/js/Preferential.5d20f031.chunk.js.map",
"SearchResult.css": "/static/css/SearchResult.b968f5d5.chunk.css",
"SearchResult.js": "/static/js/SearchResult.e678ace6.chunk.js",
"SearchResult.js.map": "/static/js/SearchResult.e678ace6.chunk.js.map",
"ShopCart.css": "/static/css/ShopCart.8f4c32db.chunk.css",
"ShopCart.js": "/static/js/ShopCart.4f1c3903.chunk.js",
"ShopCart.js.map": "/static/js/ShopCart.4f1c3903.chunk.js.map",
"aist-share.css": "/static/css/aist-share.a97e13d0.chunk.css",
"aist-share.js": "/static/js/aist-share.6ae202e2.chunk.js",
"aist-share.js.map": "/static/js/aist-share.6ae202e2.chunk.js.map",
"coupons.css": "/static/css/coupons.f2c7a13b.chunk.css",
"coupons.js": "/static/js/coupons.0ff2580f.chunk.js",
"coupons.js.map": "/static/js/coupons.0ff2580f.chunk.js.map",
"detail.css": "/static/css/detail.ce10de93.chunk.css",
"detail.js": "/static/js/detail.35f0eebd.chunk.js",
"detail.js.map": "/static/js/detail.35f0eebd.chunk.js.map",
"main.css": "/static/css/main.47a6e046.chunk.css",
"main.js": "/static/js/main.f0ac2fa0.chunk.js",
"main.js.map": "/static/js/main.f0ac2fa0.chunk.js.map",
"myorders.css": "/static/css/myorders.789a128d.chunk.css",
"myorders.js": "/static/js/myorders.3a9f8bf2.chunk.js",
"myorders.js.map": "/static/js/myorders.3a9f8bf2.chunk.js.map",
"purchased.css": "/static/css/purchased.fb5cdbc2.chunk.css",
"purchased.js": "/static/js/purchased.96de9074.chunk.js",
"purchased.js.map": "/static/js/purchased.96de9074.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.7dae6868.js",
"runtime~main.js.map": "/static/js/runtime~main.7dae6868.js.map",
"search.css": "/static/css/search.ed8f7a59.chunk.css",
"search.js": "/static/js/search.d9684d99.chunk.js",
"search.js.map": "/static/js/search.d9684d99.chunk.js.map",
"shareposter.css": "/static/css/shareposter.175bee2a.chunk.css",
"shareposter.js": "/static/js/shareposter.c5ea327d.chunk.js",
"shareposter.js.map": "/static/js/shareposter.c5ea327d.chunk.js.map",
"study.css": "/static/css/study.8867122f.chunk.css",
"study.js": "/static/js/study.3ca271e7.chunk.js",
"study.js.map": "/static/js/study.3ca271e7.chunk.js.map",
"togroup.css": "/static/css/togroup.f08bc5f3.chunk.css",
"togroup.js": "/static/js/togroup.a6717ccf.chunk.js",
"togroup.js.map": "/static/js/togroup.a6717ccf.chunk.js.map",
"video.css": "/static/css/video.2b2824ba.chunk.css",
"video.js": "/static/js/video.0535da32.chunk.js",
"video.js.map": "/static/js/video.0535da32.chunk.js.map",
"static/css/24.4abd5c22.chunk.css": "/static/css/24.4abd5c22.chunk.css",
"static/js/24.67004523.chunk.js": "/static/js/24.67004523.chunk.js",
"static/js/24.67004523.chunk.js.map": "/static/js/24.67004523.chunk.js.map",
"static/js/25.66a6cdfb.chunk.js": "/static/js/25.66a6cdfb.chunk.js",
"static/js/25.66a6cdfb.chunk.js.map": "/static/js/25.66a6cdfb.chunk.js.map",
"static/css/26.73976871.chunk.css": "/static/css/26.73976871.chunk.css",
"static/js/26.ad7bb673.chunk.js": "/static/js/26.ad7bb673.chunk.js",
"static/js/26.ad7bb673.chunk.js.map": "/static/js/26.ad7bb673.chunk.js.map",
"static/js/27.48079d34.chunk.js": "/static/js/27.48079d34.chunk.js",
"static/js/27.48079d34.chunk.js.map": "/static/js/27.48079d34.chunk.js.map",
"static/css/28.42a89c77.chunk.css": "/static/css/28.42a89c77.chunk.css",
"static/js/28.dc773ffa.chunk.js": "/static/js/28.dc773ffa.chunk.js",
"static/js/28.dc773ffa.chunk.js.map": "/static/js/28.dc773ffa.chunk.js.map",
"static/css/29.bf839917.chunk.css": "/static/css/29.bf839917.chunk.css",
"static/js/29.76256aca.chunk.js": "/static/js/29.76256aca.chunk.js",
"static/js/29.76256aca.chunk.js.map": "/static/js/29.76256aca.chunk.js.map",
"static/css/30.35e22f8c.chunk.css": "/static/css/30.35e22f8c.chunk.css",
"static/js/30.db405cf8.chunk.js": "/static/js/30.db405cf8.chunk.js",
"static/js/30.db405cf8.chunk.js.map": "/static/js/30.db405cf8.chunk.js.map",
"static/css/31.57d8b033.chunk.css": "/static/css/31.57d8b033.chunk.css",
"static/js/31.804baf53.chunk.js": "/static/js/31.804baf53.chunk.js",
"static/js/31.804baf53.chunk.js.map": "/static/js/31.804baf53.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.1f310ffdcb6a76653e67c5d98af25036.js": "/precache-manifest.1f310ffdcb6a76653e67c5d98af25036.js",
"precache-manifest.598d4f9a21c04382f4006facc51e0bfb.js": "/precache-manifest.598d4f9a21c04382f4006facc51e0bfb.js",
"service-worker.js": "/service-worker.js",
"static/css/24.257b0329.chunk.css.map": "/static/css/24.257b0329.chunk.css.map",
"static/css/26.1b3a6258.chunk.css.map": "/static/css/26.1b3a6258.chunk.css.map",
"static/css/28.694b4628.chunk.css.map": "/static/css/28.694b4628.chunk.css.map",
"static/css/29.5ed15c7e.chunk.css.map": "/static/css/29.5ed15c7e.chunk.css.map",
"static/css/30.ecbb6f9a.chunk.css.map": "/static/css/30.ecbb6f9a.chunk.css.map",
"static/css/31.bc06dce4.chunk.css.map": "/static/css/31.bc06dce4.chunk.css.map",
"static/css/BargainMiddlePage.9e05243b.chunk.css.map": "/static/css/BargainMiddlePage.9e05243b.chunk.css.map",
"static/css/Classify.e3e9b348.chunk.css.map": "/static/css/Classify.e3e9b348.chunk.css.map",
"static/css/CourseList.369bce9d.chunk.css.map": "/static/css/CourseList.369bce9d.chunk.css.map",
"static/css/DrawDocument.2e7d81ca.chunk.css.map": "/static/css/DrawDocument.2e7d81ca.chunk.css.map",
"static/css/Examination.fc9da1d2.chunk.css.map": "/static/css/Examination.fc9da1d2.chunk.css.map",
"static/css/Order.6576554c.chunk.css.map": "/static/css/Order.6576554c.chunk.css.map",
"static/css/PayOrder.21570c76.chunk.css.map": "/static/css/PayOrder.21570c76.chunk.css.map",
"static/css/Preferential.3b4dfe41.chunk.css.map": "/static/css/Preferential.3b4dfe41.chunk.css.map",
"static/css/SearchResult.8711b264.chunk.css.map": "/static/css/SearchResult.8711b264.chunk.css.map",
"static/css/ShopCart.a93db4c0.chunk.css.map": "/static/css/ShopCart.a93db4c0.chunk.css.map",
"static/css/aist-share.bef8c404.chunk.css.map": "/static/css/aist-share.bef8c404.chunk.css.map",
"static/css/coupons.9ece7350.chunk.css.map": "/static/css/coupons.9ece7350.chunk.css.map",
"static/css/detail.72edbb5f.chunk.css.map": "/static/css/detail.72edbb5f.chunk.css.map",
"static/css/main.1df66505.chunk.css.map": "/static/css/main.1df66505.chunk.css.map",
"static/css/myorders.5434bc7e.chunk.css.map": "/static/css/myorders.5434bc7e.chunk.css.map",
"static/css/purchased.4b0044ec.chunk.css.map": "/static/css/purchased.4b0044ec.chunk.css.map",
"static/css/search.9fa57dd6.chunk.css.map": "/static/css/search.9fa57dd6.chunk.css.map",
"static/css/shareposter.82081d02.chunk.css.map": "/static/css/shareposter.82081d02.chunk.css.map",
"static/css/study.50d01810.chunk.css.map": "/static/css/study.50d01810.chunk.css.map",
"static/css/togroup.49988cae.chunk.css.map": "/static/css/togroup.49988cae.chunk.css.map",
"static/css/video.0c707680.chunk.css.map": "/static/css/video.0c707680.chunk.css.map",
"static/css/24.4abd5c22.chunk.css.map": "/static/css/24.4abd5c22.chunk.css.map",
"static/css/26.73976871.chunk.css.map": "/static/css/26.73976871.chunk.css.map",
"static/css/28.42a89c77.chunk.css.map": "/static/css/28.42a89c77.chunk.css.map",
"static/css/29.bf839917.chunk.css.map": "/static/css/29.bf839917.chunk.css.map",
"static/css/30.35e22f8c.chunk.css.map": "/static/css/30.35e22f8c.chunk.css.map",
"static/css/31.57d8b033.chunk.css.map": "/static/css/31.57d8b033.chunk.css.map",
"static/css/BargainMiddlePage.6d24aba4.chunk.css.map": "/static/css/BargainMiddlePage.6d24aba4.chunk.css.map",
"static/css/Classify.5ed0fc89.chunk.css.map": "/static/css/Classify.5ed0fc89.chunk.css.map",
"static/css/CourseList.5ce769bd.chunk.css.map": "/static/css/CourseList.5ce769bd.chunk.css.map",
"static/css/DrawDocument.aeb3f822.chunk.css.map": "/static/css/DrawDocument.aeb3f822.chunk.css.map",
"static/css/Examination.280c19c2.chunk.css.map": "/static/css/Examination.280c19c2.chunk.css.map",
"static/css/Order.061a2017.chunk.css.map": "/static/css/Order.061a2017.chunk.css.map",
"static/css/PayOrder.a9111f28.chunk.css.map": "/static/css/PayOrder.a9111f28.chunk.css.map",
"static/css/Preferential.99c1fc9f.chunk.css.map": "/static/css/Preferential.99c1fc9f.chunk.css.map",
"static/css/SearchResult.b968f5d5.chunk.css.map": "/static/css/SearchResult.b968f5d5.chunk.css.map",
"static/css/ShopCart.8f4c32db.chunk.css.map": "/static/css/ShopCart.8f4c32db.chunk.css.map",
"static/css/aist-share.a97e13d0.chunk.css.map": "/static/css/aist-share.a97e13d0.chunk.css.map",
"static/css/coupons.f2c7a13b.chunk.css.map": "/static/css/coupons.f2c7a13b.chunk.css.map",
"static/css/detail.ce10de93.chunk.css.map": "/static/css/detail.ce10de93.chunk.css.map",
"static/css/main.47a6e046.chunk.css.map": "/static/css/main.47a6e046.chunk.css.map",
"static/css/myorders.789a128d.chunk.css.map": "/static/css/myorders.789a128d.chunk.css.map",
"static/css/purchased.fb5cdbc2.chunk.css.map": "/static/css/purchased.fb5cdbc2.chunk.css.map",
"static/css/search.ed8f7a59.chunk.css.map": "/static/css/search.ed8f7a59.chunk.css.map",
"static/css/shareposter.175bee2a.chunk.css.map": "/static/css/shareposter.175bee2a.chunk.css.map",
"static/css/study.8867122f.chunk.css.map": "/static/css/study.8867122f.chunk.css.map",
"static/css/togroup.f08bc5f3.chunk.css.map": "/static/css/togroup.f08bc5f3.chunk.css.map",
"static/css/video.2b2824ba.chunk.css.map": "/static/css/video.2b2824ba.chunk.css.map",
"static/media/iconfont.css": "/static/media/iconfont.d9bc424b.woff",
"static/media/kanjia_cg_icon.png": "/static/media/kanjia_cg_icon.81a489ac.png",
"static/media/video.scss": "/static/media/progress-share-bg.80011994.png"
......
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>七月在线 - 国内领先的人工智能教育平台</title><link href="/static/css/24.257b0329.chunk.css" rel="stylesheet"><link href="/static/css/main.1df66505.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/api.js"></script><script>!function(d){function e(e){for(var r,t,n=e[0],a=e[1],o=e[2],c=0,i=[];c<n.length;c++)t=n[c],l[t]&&i.push(l[t][0]),l[t]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(d[r]=a[r]);for(b&&b(e);i.length;)i.shift()();return s.push.apply(s,o||[]),u()}function u(){for(var e,r=0;r<s.length;r++){for(var t=s[r],n=!0,a=1;a<t.length;a++){var o=t[a];0!==l[o]&&(n=!1)}n&&(s.splice(r--,1),e=p(p.s=t[0]))}return e}var t={},f={18:0},l={18:0},s=[];function p(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return d[e].call(r.exports,r,r.exports,p),r.l=!0,r.exports}p.e=function(s){var e=[];f[s]?e.push(f[s]):0!==f[s]&&{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,31:1}[s]&&e.push(f[s]=new Promise(function(e,n){for(var r="static/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"}[s]||s)+"."+{0:"9e05243b",1:"e3e9b348",2:"369bce9d",3:"2e7d81ca",4:"fc9da1d2",5:"31d6cfe0",6:"6576554c",7:"31d6cfe0",8:"21570c76",9:"3b4dfe41",10:"8711b264",11:"a93db4c0",12:"bef8c404",13:"9ece7350",14:"72edbb5f",16:"5434bc7e",17:"4b0044ec",19:"9fa57dd6",20:"82081d02",21:"50d01810",22:"49988cae",23:"0c707680",25:"31d6cfe0",26:"1b3a6258",27:"31d6cfe0",28:"694b4628",29:"5ed15c7e",30:"ecbb6f9a",31:"bc06dce4"}[s]+".chunk.css",a=p.p+r,t=document.getElementsByTagName("link"),o=0;o<t.length;o++){var c=(d=t[o]).getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(c===r||c===a))return e()}var i=document.getElementsByTagName("style");for(o=0;o<i.length;o++){var d;if((c=(d=i[o]).getAttribute("data-href"))===r||c===a)return e()}var u=document.createElement("link");u.rel="stylesheet",u.type="text/css",u.onload=e,u.onerror=function(e){var r=e&&e.target&&e.target.src||a,t=new Error("Loading CSS chunk "+s+" failed.\n("+r+")");t.request=r,delete f[s],u.parentNode.removeChild(u),n(t)},u.href=a,document.getElementsByTagName("head")[0].appendChild(u)}).then(function(){f[s]=0}));var t=l[s];if(0!==t)if(t)e.push(t[2]);else{var r=new Promise(function(e,r){t=l[s]=[e,r]});e.push(t[2]=r);var n,o=document.createElement("script");o.charset="utf-8",o.timeout=120,p.nc&&o.setAttribute("nonce",p.nc),o.src=p.p+"static/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"}[s]||s)+"."+{0:"e6b11299",1:"88e16392",2:"d06af937",3:"cdb5e58a",4:"fa19e5b9",5:"93c1066f",6:"b2093828",7:"1c23f0d1",8:"c01a72d8",9:"884abefc",10:"d7c730c9",11:"ce51dba2",12:"6006a322",13:"7ac51087",14:"e0d344c7",16:"9591b784",17:"8e73e32c",19:"4e789760",20:"5ab9b613",21:"37af7845",22:"fe3257a0",23:"8be500eb",25:"58629408",26:"ca44de75",27:"32213583",28:"262e6dc6",29:"e2cba4ed",30:"9b24ec4e",31:"19325664"}[s]+".chunk.js",n=function(e){o.onerror=o.onload=null,clearTimeout(c);var r=l[s];if(0!==r){if(r){var t=e&&("load"===e.type?"missing":e.type),n=e&&e.target&&e.target.src,a=new Error("Loading chunk "+s+" failed.\n("+t+": "+n+")");a.type=t,a.request=n,r[1](a)}l[s]=void 0}};var c=setTimeout(function(){n({type:"timeout",target:o})},12e4);o.onerror=o.onload=n,document.head.appendChild(o)}return Promise.all(e)},p.m=d,p.c=t,p.d=function(e,r,t){p.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.t=function(r,e){if(1&e&&(r=p(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(p.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)p.d(t,n,function(e){return r[e]}.bind(null,n));return t},p.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(r,"a",r),r},p.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},p.p="/",p.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var a=0;a<r.length;a++)e(r[a]);var b=n;u()}([])</script><script src="/static/js/24.cc1aa77e.chunk.js"></script><script src="/static/js/main.5b0af860.chunk.js"></script></body></html>
\ No newline at end of file
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>七月在线 - 国内领先的人工智能教育平台</title><link href="/static/css/24.4abd5c22.chunk.css" rel="stylesheet"><link href="/static/css/main.47a6e046.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/api.js"></script><script>!function(f){function e(e){for(var r,t,a=e[0],n=e[1],o=e[2],c=0,d=[];c<a.length;c++)t=a[c],l[t]&&d.push(l[t][0]),l[t]=0;for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(f[r]=n[r]);for(h&&h(e);d.length;)d.shift()();return u.push.apply(u,o||[]),i()}function i(){for(var e,r=0;r<u.length;r++){for(var t=u[r],a=!0,n=1;n<t.length;n++){var o=t[n];0!==l[o]&&(a=!1)}a&&(u.splice(r--,1),e=p(p.s=t[0]))}return e}var t={},s={18:0},l={18:0},u=[];function p(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return f[e].call(r.exports,r,r.exports,p),r.l=!0,r.exports}p.e=function(u){var e=[];s[u]?e.push(s[u]):0!==s[u]&&{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,31:1}[u]&&e.push(s[u]=new Promise(function(e,a){for(var r="static/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"}[u]||u)+"."+{0:"6d24aba4",1:"5ed0fc89",2:"5ce769bd",3:"aeb3f822",4:"280c19c2",5:"31d6cfe0",6:"061a2017",7:"31d6cfe0",8:"a9111f28",9:"99c1fc9f",10:"b968f5d5",11:"8f4c32db",12:"a97e13d0",13:"f2c7a13b",14:"ce10de93",16:"789a128d",17:"fb5cdbc2",19:"ed8f7a59",20:"175bee2a",21:"8867122f",22:"f08bc5f3",23:"2b2824ba",25:"31d6cfe0",26:"73976871",27:"31d6cfe0",28:"42a89c77",29:"bf839917",30:"35e22f8c",31:"57d8b033"}[u]+".chunk.css",n=p.p+r,t=document.getElementsByTagName("link"),o=0;o<t.length;o++){var c=(f=t[o]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(c===r||c===n))return e()}var d=document.getElementsByTagName("style");for(o=0;o<d.length;o++){var f;if((c=(f=d[o]).getAttribute("data-href"))===r||c===n)return e()}var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",i.onload=e,i.onerror=function(e){var r=e&&e.target&&e.target.src||n,t=new Error("Loading CSS chunk "+u+" failed.\n("+r+")");t.request=r,delete s[u],i.parentNode.removeChild(i),a(t)},i.href=n,document.getElementsByTagName("head")[0].appendChild(i)}).then(function(){s[u]=0}));var t=l[u];if(0!==t)if(t)e.push(t[2]);else{var r=new Promise(function(e,r){t=l[u]=[e,r]});e.push(t[2]=r);var a,o=document.createElement("script");o.charset="utf-8",o.timeout=120,p.nc&&o.setAttribute("nonce",p.nc),o.src=p.p+"static/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"}[u]||u)+"."+{0:"5ad51000",1:"da3edf64",2:"da982f82",3:"b6b14ec2",4:"954a0197",5:"e7408258",6:"a3016da1",7:"c503b1f0",8:"c84e2bbe",9:"5d20f031",10:"e678ace6",11:"4f1c3903",12:"6ae202e2",13:"0ff2580f",14:"35f0eebd",16:"3a9f8bf2",17:"96de9074",19:"d9684d99",20:"c5ea327d",21:"3ca271e7",22:"a6717ccf",23:"0535da32",25:"66a6cdfb",26:"ad7bb673",27:"48079d34",28:"dc773ffa",29:"76256aca",30:"db405cf8",31:"804baf53"}[u]+".chunk.js",a=function(e){o.onerror=o.onload=null,clearTimeout(c);var r=l[u];if(0!==r){if(r){var t=e&&("load"===e.type?"missing":e.type),a=e&&e.target&&e.target.src,n=new Error("Loading chunk "+u+" failed.\n("+t+": "+a+")");n.type=t,n.request=a,r[1](n)}l[u]=void 0}};var c=setTimeout(function(){a({type:"timeout",target:o})},12e4);o.onerror=o.onload=a,document.head.appendChild(o)}return Promise.all(e)},p.m=f,p.c=t,p.d=function(e,r,t){p.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.t=function(r,e){if(1&e&&(r=p(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(p.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var a in r)p.d(t,a,function(e){return r[e]}.bind(null,a));return t},p.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(r,"a",r),r},p.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},p.p="/",p.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],a=r.push.bind(r);r.push=e,r=r.slice();for(var n=0;n<r.length;n++)e(r[n]);var h=a;i()}([])</script><script src="/static/js/24.67004523.chunk.js"></script><script src="/static/js/main.f0ac2fa0.chunk.js"></script></body></html>
\ No newline at end of file
self.__precacheManifest = [
{
"revision": "8b10b2870fdec14d7a01",
"url": "/static/js/purchased.8e73e32c.chunk.js"
},
{
"revision": "0b09e736fc08d21c11a6",
"url": "/static/css/BargainMiddlePage.9e05243b.chunk.css"
},
{
"revision": "d00c9cabaedfdf924745",
"url": "/static/css/Classify.e3e9b348.chunk.css"
},
{
"revision": "d00c9cabaedfdf924745",
"url": "/static/js/Classify.88e16392.chunk.js"
},
{
"revision": "dcd4f1844bec9ea70574",
"url": "/static/css/CourseList.369bce9d.chunk.css"
},
{
"revision": "dcd4f1844bec9ea70574",
"url": "/static/js/CourseList.d06af937.chunk.js"
},
{
"revision": "dea5dd0ba84b253710f9",
"url": "/static/css/DrawDocument.2e7d81ca.chunk.css"
},
{
"revision": "dea5dd0ba84b253710f9",
"url": "/static/js/DrawDocument.cdb5e58a.chunk.js"
},
{
"revision": "4d82518cb22909a25abf",
"url": "/static/css/Examination.fc9da1d2.chunk.css"
},
{
"revision": "4d82518cb22909a25abf",
"url": "/static/js/Examination.fa19e5b9.chunk.js"
},
{
"revision": "14aae70c4c2889afb061",
"url": "/static/js/MyEdit.93c1066f.chunk.js"
},
{
"revision": "70315d6bac9c221861a1",
"url": "/static/css/Order.6576554c.chunk.css"
},
{
"revision": "70315d6bac9c221861a1",
"url": "/static/js/Order.b2093828.chunk.js"
},
{
"revision": "151e03f1104a0e038d5f",
"url": "/static/js/Orderinfo.1c23f0d1.chunk.js"
},
{
"revision": "507db072f0bdbed1d95a",
"url": "/static/css/PayOrder.21570c76.chunk.css"
},
{
"revision": "507db072f0bdbed1d95a",
"url": "/static/js/PayOrder.c01a72d8.chunk.js"
},
{
"revision": "f6ffe1548a4d080a2658",
"url": "/static/css/Preferential.3b4dfe41.chunk.css"
},
{
"revision": "f6ffe1548a4d080a2658",
"url": "/static/js/Preferential.884abefc.chunk.js"
},
{
"revision": "d1ffef66f31927b078f1",
"url": "/static/css/SearchResult.8711b264.chunk.css"
},
{
"revision": "d1ffef66f31927b078f1",
"url": "/static/js/SearchResult.d7c730c9.chunk.js"
},
{
"revision": "774725bf6bb95524b4f3",
"url": "/static/css/ShopCart.a93db4c0.chunk.css"
},
{
"revision": "774725bf6bb95524b4f3",
"url": "/static/js/ShopCart.ce51dba2.chunk.js"
},
{
"revision": "dfe0c7608e5de5fe09d5",
"url": "/static/css/aist-share.bef8c404.chunk.css"
},
{
"revision": "dfe0c7608e5de5fe09d5",
"url": "/static/js/aist-share.6006a322.chunk.js"
},
{
"revision": "e9e32e9470bf19ecc796",
"url": "/static/css/coupons.9ece7350.chunk.css"
},
{
"revision": "e9e32e9470bf19ecc796",
"url": "/static/js/coupons.7ac51087.chunk.js"
},
{
"revision": "50249497bca317c2684a",
"url": "/static/css/detail.72edbb5f.chunk.css"
},
{
"revision": "50249497bca317c2684a",
"url": "/static/js/detail.e0d344c7.chunk.js"
},
{
"revision": "af773bb7ef9b2bd8b497",
"url": "/static/css/main.1df66505.chunk.css"
},
{
"revision": "af773bb7ef9b2bd8b497",
"url": "/static/js/main.5b0af860.chunk.js"
},
{
"revision": "2a87a1c865b99cd2c2c2",
"url": "/static/css/myorders.5434bc7e.chunk.css"
},
{
"revision": "2a87a1c865b99cd2c2c2",
"url": "/static/js/myorders.9591b784.chunk.js"
},
{
"revision": "8b10b2870fdec14d7a01",
"url": "/static/css/purchased.4b0044ec.chunk.css"
},
{
"revision": "0b09e736fc08d21c11a6",
"url": "/static/js/BargainMiddlePage.e6b11299.chunk.js"
},
{
"revision": "18a1f2e31fea22b15664",
"url": "/static/js/runtime~main.2ad24738.js"
},
{
"revision": "2898f0eabbbdd5947623",
"url": "/static/css/search.9fa57dd6.chunk.css"
},
{
"revision": "2898f0eabbbdd5947623",
"url": "/static/js/search.4e789760.chunk.js"
},
{
"revision": "0baf594b2f411f4e2834",
"url": "/static/css/shareposter.82081d02.chunk.css"
},
{
"revision": "0baf594b2f411f4e2834",
"url": "/static/js/shareposter.5ab9b613.chunk.js"
},
{
"revision": "72f177df4655380e5feb",
"url": "/static/css/study.50d01810.chunk.css"
},
{
"revision": "72f177df4655380e5feb",
"url": "/static/js/study.37af7845.chunk.js"
},
{
"revision": "1c9c62ad8fe9161b7762",
"url": "/static/css/togroup.49988cae.chunk.css"
},
{
"revision": "1c9c62ad8fe9161b7762",
"url": "/static/js/togroup.fe3257a0.chunk.js"
},
{
"revision": "50eb238b013db0af814f",
"url": "/static/css/video.0c707680.chunk.css"
},
{
"revision": "50eb238b013db0af814f",
"url": "/static/js/video.8be500eb.chunk.js"
},
{
"revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/static/media/progress-share-bg.80011994.png"
},
{
"revision": "ba942120040e93aeadac",
"url": "/static/js/24.cc1aa77e.chunk.js"
},
{
"revision": "3d3d421b339852d0d02b",
"url": "/static/js/25.58629408.chunk.js"
},
{
"revision": "81a489ac63f2f2df5ab412e0782bd54c",
"url": "/static/media/kanjia_cg_icon.81a489ac.png"
},
{
"revision": "cb07b07a7f721d4f5d86",
"url": "/static/js/26.ca44de75.chunk.js"
},
{
"revision": "b4e6e9ea5f7301e16f53",
"url": "/static/js/27.32213583.chunk.js"
},
{
"revision": "bf51ccc733319bcc56b89eec5dde1394",
"url": "/static/media/iconfont.bf51ccc7.svg"
},
{
"revision": "f4af1f59f8f100e000a3",
"url": "/static/js/28.262e6dc6.chunk.js"
},
{
"revision": "55ad4bbcfbe7879698a2538de5145a09",
"url": "/static/media/iconfont.55ad4bbc.ttf"
},
{
"revision": "bcc8561fa099bcbf9267",
"url": "/static/js/29.e2cba4ed.chunk.js"
},
{
"revision": "10b7bd5b99a2a0a2f1a30d7ed72ec1a0",
"url": "/static/media/iconfont.10b7bd5b.eot"
},
{
"revision": "22a49ddf2e0ac487e6ba",
"url": "/static/js/30.9b24ec4e.chunk.js"
},
{
"revision": "d9bc424b15d521a0c979da25ea02c1c9",
"url": "/static/media/iconfont.d9bc424b.woff"
},
{
"revision": "6b36272d524db88870dc",
"url": "/static/js/31.19325664.chunk.js"
},
{
"revision": "6b36272d524db88870dc",
"url": "/static/css/31.bc06dce4.chunk.css"
},
{
"revision": "22a49ddf2e0ac487e6ba",
"url": "/static/css/30.ecbb6f9a.chunk.css"
},
{
"revision": "bcc8561fa099bcbf9267",
"url": "/static/css/29.5ed15c7e.chunk.css"
},
{
"revision": "f4af1f59f8f100e000a3",
"url": "/static/css/28.694b4628.chunk.css"
},
{
"revision": "cb07b07a7f721d4f5d86",
"url": "/static/css/26.1b3a6258.chunk.css"
},
{
"revision": "ba942120040e93aeadac",
"url": "/static/css/24.257b0329.chunk.css"
},
{
"revision": "e4ca7d30ee0df16c76dcad2bc9441baf",
"url": "/index.html"
}
];
\ No newline at end of file
self.__precacheManifest = [
{
"revision": "8823859090cd21752c03",
"url": "/static/js/purchased.96de9074.chunk.js"
},
{
"revision": "79853fa80951fab1dfab",
"url": "/static/css/BargainMiddlePage.6d24aba4.chunk.css"
},
{
"revision": "60e9bf4574e9675c4584",
"url": "/static/css/Classify.5ed0fc89.chunk.css"
},
{
"revision": "60e9bf4574e9675c4584",
"url": "/static/js/Classify.da3edf64.chunk.js"
},
{
"revision": "70fc300474e81a1298ba",
"url": "/static/css/CourseList.5ce769bd.chunk.css"
},
{
"revision": "70fc300474e81a1298ba",
"url": "/static/js/CourseList.da982f82.chunk.js"
},
{
"revision": "df8f0caf1d622818e109",
"url": "/static/css/DrawDocument.aeb3f822.chunk.css"
},
{
"revision": "df8f0caf1d622818e109",
"url": "/static/js/DrawDocument.b6b14ec2.chunk.js"
},
{
"revision": "78ff2a697baf90eba4cf",
"url": "/static/css/Examination.280c19c2.chunk.css"
},
{
"revision": "78ff2a697baf90eba4cf",
"url": "/static/js/Examination.954a0197.chunk.js"
},
{
"revision": "0eeca73a739cbc7cf069",
"url": "/static/js/MyEdit.e7408258.chunk.js"
},
{
"revision": "5f92c4a49432492f54d0",
"url": "/static/css/Order.061a2017.chunk.css"
},
{
"revision": "5f92c4a49432492f54d0",
"url": "/static/js/Order.a3016da1.chunk.js"
},
{
"revision": "064f52af07df35b72c76",
"url": "/static/js/Orderinfo.c503b1f0.chunk.js"
},
{
"revision": "094995a916bb3bfa3054",
"url": "/static/css/PayOrder.a9111f28.chunk.css"
},
{
"revision": "094995a916bb3bfa3054",
"url": "/static/js/PayOrder.c84e2bbe.chunk.js"
},
{
"revision": "a5560e5dcbc955e4e141",
"url": "/static/css/Preferential.99c1fc9f.chunk.css"
},
{
"revision": "a5560e5dcbc955e4e141",
"url": "/static/js/Preferential.5d20f031.chunk.js"
},
{
"revision": "742c1e1dc18a262b5779",
"url": "/static/css/SearchResult.b968f5d5.chunk.css"
},
{
"revision": "742c1e1dc18a262b5779",
"url": "/static/js/SearchResult.e678ace6.chunk.js"
},
{
"revision": "876e183e07d958ae2e49",
"url": "/static/css/ShopCart.8f4c32db.chunk.css"
},
{
"revision": "876e183e07d958ae2e49",
"url": "/static/js/ShopCart.4f1c3903.chunk.js"
},
{
"revision": "d5aa3ee66e0c7d1c7f30",
"url": "/static/css/aist-share.a97e13d0.chunk.css"
},
{
"revision": "d5aa3ee66e0c7d1c7f30",
"url": "/static/js/aist-share.6ae202e2.chunk.js"
},
{
"revision": "75867138a18513015fd1",
"url": "/static/css/coupons.f2c7a13b.chunk.css"
},
{
"revision": "75867138a18513015fd1",
"url": "/static/js/coupons.0ff2580f.chunk.js"
},
{
"revision": "49f120281f7cf770afb5",
"url": "/static/css/detail.ce10de93.chunk.css"
},
{
"revision": "49f120281f7cf770afb5",
"url": "/static/js/detail.35f0eebd.chunk.js"
},
{
"revision": "85b934b724d7ed4d4579",
"url": "/static/css/main.47a6e046.chunk.css"
},
{
"revision": "85b934b724d7ed4d4579",
"url": "/static/js/main.f0ac2fa0.chunk.js"
},
{
"revision": "bde8e4ce000bfcb42b3c",
"url": "/static/css/myorders.789a128d.chunk.css"
},
{
"revision": "bde8e4ce000bfcb42b3c",
"url": "/static/js/myorders.3a9f8bf2.chunk.js"
},
{
"revision": "8823859090cd21752c03",
"url": "/static/css/purchased.fb5cdbc2.chunk.css"
},
{
"revision": "79853fa80951fab1dfab",
"url": "/static/js/BargainMiddlePage.5ad51000.chunk.js"
},
{
"revision": "ea768ad21ee65b6e17a4",
"url": "/static/js/runtime~main.7dae6868.js"
},
{
"revision": "3edc9e3770cae738e0d9",
"url": "/static/css/search.ed8f7a59.chunk.css"
},
{
"revision": "3edc9e3770cae738e0d9",
"url": "/static/js/search.d9684d99.chunk.js"
},
{
"revision": "5e401deaccfd8a951edf",
"url": "/static/css/shareposter.175bee2a.chunk.css"
},
{
"revision": "5e401deaccfd8a951edf",
"url": "/static/js/shareposter.c5ea327d.chunk.js"
},
{
"revision": "797afc7a7c3033eb294f",
"url": "/static/css/study.8867122f.chunk.css"
},
{
"revision": "797afc7a7c3033eb294f",
"url": "/static/js/study.3ca271e7.chunk.js"
},
{
"revision": "c941c120ae50e9dd3bb9",
"url": "/static/css/togroup.f08bc5f3.chunk.css"
},
{
"revision": "c941c120ae50e9dd3bb9",
"url": "/static/js/togroup.a6717ccf.chunk.js"
},
{
"revision": "127640c64bda7233a9ab",
"url": "/static/css/video.2b2824ba.chunk.css"
},
{
"revision": "127640c64bda7233a9ab",
"url": "/static/js/video.0535da32.chunk.js"
},
{
"revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/static/media/progress-share-bg.80011994.png"
},
{
"revision": "4400e15091d365ac5010",
"url": "/static/js/24.67004523.chunk.js"
},
{
"revision": "6375e0d7eaa1800f9ee3",
"url": "/static/js/25.66a6cdfb.chunk.js"
},
{
"revision": "81a489ac63f2f2df5ab412e0782bd54c",
"url": "/static/media/kanjia_cg_icon.81a489ac.png"
},
{
"revision": "26740888f74be42d5242",
"url": "/static/js/26.ad7bb673.chunk.js"
},
{
"revision": "8858bd1e3249c4a70cae",
"url": "/static/js/27.48079d34.chunk.js"
},
{
"revision": "bf51ccc733319bcc56b89eec5dde1394",
"url": "/static/media/iconfont.bf51ccc7.svg"
},
{
"revision": "5c3beb99650bebfe522c",
"url": "/static/js/28.dc773ffa.chunk.js"
},
{
"revision": "55ad4bbcfbe7879698a2538de5145a09",
"url": "/static/media/iconfont.55ad4bbc.ttf"
},
{
"revision": "1a8663b53ceb581886ce",
"url": "/static/js/29.76256aca.chunk.js"
},
{
"revision": "10b7bd5b99a2a0a2f1a30d7ed72ec1a0",
"url": "/static/media/iconfont.10b7bd5b.eot"
},
{
"revision": "bae180757fda30faf41f",
"url": "/static/js/30.db405cf8.chunk.js"
},
{
"revision": "d9bc424b15d521a0c979da25ea02c1c9",
"url": "/static/media/iconfont.d9bc424b.woff"
},
{
"revision": "c13d784550ed260dff69",
"url": "/static/js/31.804baf53.chunk.js"
},
{
"revision": "c13d784550ed260dff69",
"url": "/static/css/31.57d8b033.chunk.css"
},
{
"revision": "bae180757fda30faf41f",
"url": "/static/css/30.35e22f8c.chunk.css"
},
{
"revision": "1a8663b53ceb581886ce",
"url": "/static/css/29.bf839917.chunk.css"
},
{
"revision": "5c3beb99650bebfe522c",
"url": "/static/css/28.42a89c77.chunk.css"
},
{
"revision": "26740888f74be42d5242",
"url": "/static/css/26.73976871.chunk.css"
},
{
"revision": "4400e15091d365ac5010",
"url": "/static/css/24.4abd5c22.chunk.css"
},
{
"revision": "04c24767d1cc3e2167e08653fa53b292",
"url": "/index.html"
}
];
\ No newline at end of file
......@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts(
"/precache-manifest.1f310ffdcb6a76653e67c5d98af25036.js"
"/precache-manifest.598d4f9a21c04382f4006facc51e0bfb.js"
);
workbox.clientsClaim();
......
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([[28],{1131:function(e,t,n){"use strict";n(48),n(255),n(1132)},1132:function(e,t,n){},1133:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(3)),a=p(n(32)),o=p(n(5)),l=p(n(12)),i=p(n(6)),u=p(n(13)),s=p(n(15)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),d=p(n(151)),f=p(n(256));function p(e){return e&&e.__esModule?e:{default:e}}var m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]])}return n},b=/^[\u4e00-\u9fa5]{2}$/,y=b.test.bind(b);function v(e){return"string"===typeof e}function h(e){return v(e.type)&&y(e.props.children)?c.cloneElement(e,{},e.props.children.split("").join(" ")):v(e)?(y(e)&&(e=e.split("").join(" ")),c.createElement("span",null,e)):e}var C=function(e){function t(){return(0,o.default)(this,t),(0,i.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,l.default)(t,[{key:"render",value:function(){var e,t=this.props,n=t.children,o=t.className,l=t.prefixCls,i=t.type,u=t.size,p=t.inline,b=t.disabled,y=t.icon,v=t.loading,C=t.activeStyle,g=t.activeClassName,k=t.onClick,O=m(t,["children","className","prefixCls","type","size","inline","disabled","icon","loading","activeStyle","activeClassName","onClick"]),_=v?"loading":y,P=(0,s.default)(l,o,(e={},(0,a.default)(e,l+"-primary","primary"===i),(0,a.default)(e,l+"-ghost","ghost"===i),(0,a.default)(e,l+"-warning","warning"===i),(0,a.default)(e,l+"-small","small"===u),(0,a.default)(e,l+"-inline",p),(0,a.default)(e,l+"-disabled",b),(0,a.default)(e,l+"-loading",v),(0,a.default)(e,l+"-icon",!!_),e)),x=c.Children.map(n,h),K=void 0;if("string"===typeof _)K=c.createElement(f.default,{"aria-hidden":"true",type:_,size:"small"===u?"xxs":"md",className:l+"-icon"});else if(_){var I=_.props&&_.props.className,E=(0,s.default)("am-icon",l+"-icon","small"===u?"am-icon-xxs":"am-icon-md");K=c.cloneElement(_,{className:I?I+" "+E:E})}return c.createElement(d.default,{activeClassName:g||(C?l+"-active":void 0),disabled:b,activeStyle:C},c.createElement("a",(0,r.default)({role:"button",className:P},O,{onClick:b?void 0:k,"aria-disabled":b}),K,x))}}]),t}(c.Component);C.defaultProps={prefixCls:"am-button",size:"large",inline:!1,disabled:!1,loading:!1,activeStyle:{}},t.default=C,e.exports=t.default},1134:function(e,t,n){"use strict";n(48),n(114),n(1135)},1135:function(e,t,n){},1136:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(32)),a=v(n(3)),o=v(n(5)),l=v(n(12)),i=v(n(6)),u=v(n(13)),s=v(n(15)),c=y(n(2)),d=y(n(0)),f=v(n(151)),p=n(582),m=v(n(1137)),b=v(n(1141));function y(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function v(e){return e&&e.__esModule?e:{default:e}}var h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]])}return n};function C(){}function g(e){return"undefined"===typeof e||null===e?"":e+""}var k=function(e){function t(e){(0,o.default)(this,t);var n=(0,i.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onInputChange=function(e){var t=e.target,r=t.value,a=t.selectionEnd,o=n.state.value,l=void 0===o?"":o,i=n.props.type,u=r;switch(i){case"bankCard":u=r.replace(/\D/g,"").replace(/(....)(?=.)/g,"$1 ");break;case"phone":var s=(u=r.replace(/\D/g,"").substring(0,11)).length;s>3&&s<8?u=u.substr(0,3)+" "+u.substr(3):s>=8&&(u=u.substr(0,3)+" "+u.substr(3,4)+" "+u.substr(7));break;case"number":u=r.replace(/\D/g,"")}n.handleOnChange(u,u!==r,function(){switch(i){case"bankCard":case"phone":case"number":try{var e=n.calcPos(a||0,l,r,u,[" "],/\D/g);("phone"===i&&(4===e||9===e)||"bankCard"===i&&e>0&&e%5===0)&&(e-=1),t.selectionStart=t.selectionEnd=e}catch(o){console.warn("Set selection error:",o)}}})},n.handleOnChange=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C,a=n.props.onChange;"value"in n.props?n.setState({value:n.props.value}):n.setState({value:e}),a?t?setTimeout(function(){a(e),r()}):(a(e),r()):r()},n.onInputFocus=function(e){n.debounceTimeout&&(clearTimeout(n.debounceTimeout),n.debounceTimeout=null),n.setState({focus:!0}),n.props.onFocus&&n.props.onFocus(e)},n.onInputBlur=function(e){n.inputRef&&(n.debounceTimeout=window.setTimeout(function(){document.activeElement!==(n.inputRef&&n.inputRef.inputRef)&&n.setState({focus:!1})},200)),n.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),n.props.onBlur(e))},n.clearInput=function(){"password"!==n.props.type&&n.props.updatePlaceholder&&n.setState({placeholder:n.props.value}),n.setState({value:""}),n.props.onChange&&n.props.onChange(""),n.focus()},n.focus=function(){n.inputRef&&n.inputRef.focus()},n.calcPos=function(e,t,n,r,a,o){var l=n.length-t.length,i=e;if(l>0){var u=n.substr(i-l,l).replace(o,"").length;i-=l-u;for(var s=0;u>0;)-1===a.indexOf(r.charAt(i-u+s))?u--:s++;i+=s}return i},n.state={placeholder:e.placeholder,value:g(e.value||e.defaultValue)},n}return(0,u.default)(t,e),(0,l.default)(t,[{key:"componentWillReceiveProps",value:function(e){"placeholder"in e&&!e.updatePlaceholder&&this.setState({placeholder:e.placeholder}),"value"in e&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){this.debounceTimeout&&(window.clearTimeout(this.debounceTimeout),this.debounceTimeout=null)}},{key:"render",value:function(){var e,t,o=this,l=(0,a.default)({},this.props);delete l.updatePlaceholder;var i=l.prefixCls,u=l.prefixListCls,c=l.editable,y=l.style,v=l.clear,C=l.children,k=l.error,O=l.className,_=l.extra,P=l.labelNumber,x=l.type,K=l.onExtraClick,I=l.onErrorClick,E=l.moneyKeyboardAlign,w=l.moneyKeyboardWrapProps,L=l.moneyKeyboardHeader,N=l.onVirtualKeyboardConfirm,j=h(l,["prefixCls","prefixListCls","editable","style","clear","children","error","className","extra","labelNumber","type","onExtraClick","onErrorClick","moneyKeyboardAlign","moneyKeyboardWrapProps","moneyKeyboardHeader","onVirtualKeyboardConfirm"]),S=j.name,B=j.disabled,M=j.maxLength,F=this.state.value,R=(0,p.getComponentLocale)(this.props,this.context,"InputItem",function(){return n(1142)}),T=R.confirmLabel,A=R.backspaceLabel,D=R.cancelKeyboardLabel,W=this.state,V=W.focus,z=W.placeholder,H=(0,s.default)(u+"-item",i+"-item",u+"-item-middle",O,(e={},(0,r.default)(e,i+"-disabled",B),(0,r.default)(e,i+"-error",k),(0,r.default)(e,i+"-focus",V),(0,r.default)(e,i+"-android",V),e)),U=(0,s.default)(i+"-label",(t={},(0,r.default)(t,i+"-label-2",2===P),(0,r.default)(t,i+"-label-3",3===P),(0,r.default)(t,i+"-label-4",4===P),(0,r.default)(t,i+"-label-5",5===P),(0,r.default)(t,i+"-label-6",6===P),(0,r.default)(t,i+"-label-7",7===P),t)),J=i+"-control",$="text";"bankCard"===x||"phone"===x?$="tel":"password"===x?$="password":"digit"===x?$="number":"text"!==x&&"number"!==x&&($=x);var q=void 0;"number"===x&&(q={pattern:"[0-9]*"});var G=void 0;return"digit"===x&&(G={className:"h5numInput"}),d.createElement("div",{className:H},d.createElement("div",{className:u+"-line"},C?d.createElement("div",{className:U},C):null,d.createElement("div",{className:J},"money"===x?d.createElement(m.default,{value:g(F),type:x,ref:function(e){return o.inputRef=e},maxLength:M,placeholder:z,onChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onVirtualKeyboardConfirm:N,disabled:B,editable:c,prefixCls:i,style:y,confirmLabel:T,backspaceLabel:A,cancelKeyboardLabel:D,moneyKeyboardAlign:E,moneyKeyboardWrapProps:w,moneyKeyboardHeader:L}):d.createElement(b.default,(0,a.default)({},q,j,G,{value:g(F),defaultValue:void 0,ref:function(e){return o.inputRef=e},style:y,type:$,maxLength:M,name:S,placeholder:z,onChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,readOnly:!c,disabled:B}))),v&&c&&!B&&F&&(""+F).length>0?d.createElement(f.default,{activeClassName:i+"-clear-active"},d.createElement("div",{className:i+"-clear",onClick:this.clearInput})):null,k?d.createElement("div",{className:i+"-error-extra",onClick:I}):null,""!==_?d.createElement("div",{className:i+"-extra",onClick:K},_):null))}}]),t}(d.Component);k.defaultProps={prefixCls:"am-input",prefixListCls:"am-list",type:"text",editable:!0,disabled:!1,placeholder:"",clear:!1,onChange:C,onBlur:C,onFocus:C,extra:"",onExtraClick:C,error:!1,onErrorClick:C,onVirtualKeyboardConfirm:C,labelNumber:5,updatePlaceholder:!1,moneyKeyboardAlign:"right",moneyKeyboardWrapProps:{},moneyKeyboardHeader:null},k.contextTypes={antLocale:c.object},t.default=k,e.exports=t.default},1137:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=b(n(5)),a=b(n(12)),o=b(n(6)),l=b(n(13)),i=b(n(15)),u=m(n(0)),s=m(n(21)),c=n(1138),d=b(n(1139)),f=b(n(1140)),p=n(769);function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}var y=[],v=null,h=!!s.createPortal,C=function(e){function t(e){(0,r.default)(this,t);var n=(0,o.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onChange=function(e){"value"in n.props||n.setState({value:e.target.value}),n.props.onChange(e)},n.onConfirm=function(e){n.props.onVirtualKeyboardConfirm(e)},n.addBlurListener=function(){document.addEventListener("click",n.doBlur,!1)},n.removeBlurListener=function(){document.removeEventListener("click",n.doBlur,!1)},n.saveRef=function(e){h&&e&&(v=e,y.push({el:e,container:n.container}))},n.doBlur=function(e){var t=n.state.value;e.target!==n.inputRef&&n.onInputBlur(t)},n.removeCurrentExtraKeyboard=function(){y=y.filter(function(e){var t=e.el,n=e.container;return t&&n&&t!==v&&n.parentNode.removeChild(n),t===v})},n.unLinkInput=function(){v&&v.antmKeyboard&&v.linkedInput&&v.linkedInput===n&&(v.linkedInput=null,(0,c.addClass)(v.antmKeyboard,n.props.keyboardPrefixCls+"-wrapper-hide")),n.removeBlurListener(),h&&n.removeCurrentExtraKeyboard()},n.onInputBlur=function(e){n.state.focus&&(n.setState({focus:!1}),n.props.onBlur(e),setTimeout(function(){n.unLinkInput()},50))},n.onInputFocus=function(){var e=n.state.value;n.props.onFocus(e),n.setState({focus:!0},function(){v&&(v.linkedInput=n,v.antmKeyboard&&(0,c.removeClass)(v.antmKeyboard,n.props.keyboardPrefixCls+"-wrapper-hide"),v.confirmDisabled=""===e,v.confirmKeyboardItem&&(""===e?(0,c.addClass)(v.confirmKeyboardItem,n.props.keyboardPrefixCls+"-item-disabled"):(0,c.removeClass)(v.confirmKeyboardItem,n.props.keyboardPrefixCls+"-item-disabled")))})},n.onKeyboardClick=function(e){var t=n.props.maxLength,r=n.state.value,a=n.onChange,o=void 0;"delete"===e?a({target:{value:o=r.substring(0,r.length-1)}}):"confirm"===e?(a({target:{value:o=r}}),n.onInputBlur(r),n.onConfirm(r)):"hide"===e?(o=r,n.onInputBlur(o)):a(void 0!==t&&+t>=0&&(r+e).length>t?{target:{value:o=(r+e).substr(0,t)}}:{target:{value:o=r+e}}),v&&(v.confirmDisabled=""===o,v.confirmKeyboardItem&&(""===o?(0,c.addClass)(v.confirmKeyboardItem,n.props.keyboardPrefixCls+"-item-disabled"):(0,c.removeClass)(v.confirmKeyboardItem,n.props.keyboardPrefixCls+"-item-disabled")))},n.onFakeInputClick=function(){n.focus()},n.focus=function(){n.removeBlurListener(),n.state.focus||n.onInputFocus(),setTimeout(function(){n.addBlurListener()},50)},n.state={focus:!1,value:e.value||""},n}return(0,l.default)(t,e),(0,a.default)(t,[{key:"componentWillReceiveProps",value:function(e){"value"in e&&this.setState({value:e.value})}},{key:"componentDidUpdate",value:function(){this.renderCustomKeyboard()}},{key:"componentWillUnmount",value:function(){this.state.focus&&this.props.onBlur(this.state.value),this.unLinkInput()}},{key:"getComponent",value:function(){var e=this.props,t=e.confirmLabel,n=e.backspaceLabel,r=e.cancelKeyboardLabel,a=e.keyboardPrefixCls,o=e.moneyKeyboardWrapProps,l=e.moneyKeyboardHeader;return u.createElement(d.default,{ref:this.saveRef,onClick:this.onKeyboardClick,prefixCls:a,confirmLabel:t,backspaceLabel:n,cancelKeyboardLabel:r,wrapProps:o,header:l})}},{key:"getContainer",value:function(){var e=this.props.keyboardPrefixCls;if(h){if(!this.container){var t=document.createElement("div");t.setAttribute("id",e+"-container-"+(new Date).getTime()),document.body.appendChild(t),this.container=t}}else{var n=document.querySelector("#"+e+"-container");n||((n=document.createElement("div")).setAttribute("id",e+"-container"),document.body.appendChild(n)),this.container=n}return this.container}},{key:"renderCustomKeyboard",value:function(){h||(v=s.unstable_renderSubtreeIntoContainer(this,this.getComponent(),this.getContainer()))}},{key:"renderPortal",value:function(){var e=this;return h&&p.canUseDOM?u.createElement(f.default,{getContainer:function(){return e.getContainer()}},this.getComponent()):null}},{key:"render",value:function(){var e=this,t=this.props,n=t.placeholder,r=t.disabled,a=t.editable,o=t.moneyKeyboardAlign,l=this.state,s=l.focus,c=l.value,d=r||!a,f=(0,i.default)("fake-input",{focus:s,"fake-input-disabled":r}),p=(0,i.default)("fake-input-container",{"fake-input-container-left":"left"===o});return u.createElement("div",{className:p},""===c&&u.createElement("div",{className:"fake-input-placeholder"},n),u.createElement("div",{role:"textbox","aria-label":c||n,className:f,ref:function(t){return e.inputRef=t},onClick:d?function(){}:this.onFakeInputClick},c),this.renderPortal())}}]),t}(u.Component);C.defaultProps={onChange:function(){},onFocus:function(){},onBlur:function(){},onVirtualKeyboardConfirm:function(){},placeholder:"",disabled:!1,editable:!0,prefixCls:"am-input",keyboardPrefixCls:"am-number-keyboard"},t.default=C,e.exports=t.default},1138:function(e,t,n){"use strict";function r(e,t){return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}Object.defineProperty(t,"__esModule",{value:!0}),t.hasClass=r,t.addClass=function(e,t){e.classList?e.classList.add(t):r(e,t)||(e.className=e.className+" "+t)},t.removeClass=function(e,t){if(e.classList)e.classList.remove(t);else if(r(e,t)){var n=e.className;e.className=(" "+n+" ").replace(" "+t+" ","")}}},1139:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardItem=void 0;var r=f(n(3)),a=f(n(5)),o=f(n(12)),l=f(n(6)),i=f(n(13)),u=f(n(15)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),c=f(n(151)),d=n(769);function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]])}return n},m=t.KeyboardItem=function(e){function t(){return(0,a.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,i.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.onClick,a=e.className,o=(e.disabled,e.children),l=e.tdRef,i=e.label,d=e.iconOnly,f=p(e,["prefixCls","onClick","className","disabled","children","tdRef","label","iconOnly"]),m=o;"keyboard-delete"===a?m="delete":"keyboard-hide"===a?m="hide":"keyboard-confirm"===a&&(m="confirm");var b=(0,u.default)(t+"-item",a);return s.createElement(c.default,{activeClassName:t+"-item-active"},s.createElement("td",(0,r.default)({ref:l,onClick:function(e){n(e,m)},className:b},f),o,d&&s.createElement("i",{className:"sr-only"},i)))}}]),t}(s.Component);m.defaultProps={prefixCls:"am-number-keyboard",onClick:function(){},disabled:!1};var b=function(e){function t(){(0,a.default)(this,t);var e=(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onKeyboardClick=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t.nativeEvent.stopImmediatePropagation(),"confirm"===n&&e.confirmDisabled)return null;e.linkedInput&&e.linkedInput.onKeyboardClick(n)},e.renderKeyboardItem=function(t,n){return s.createElement(m,{onClick:e.onKeyboardClick,key:"item-"+t+"-"+n},t)},e}return(0,i.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.confirmLabel,o=t.backspaceLabel,l=t.cancelKeyboardLabel,i=t.wrapProps,c=t.header,d=(0,u.default)(n+"-wrapper",n+"-wrapper-hide");return s.createElement("div",(0,r.default)({className:d,ref:function(t){return e.antmKeyboard=t}},i),c&&s.cloneElement(c,{onClick:this.onKeyboardClick}),s.createElement("table",null,s.createElement("tbody",null,s.createElement("tr",null,["1","2","3"].map(function(t,n){return e.renderKeyboardItem(t,n)}),s.createElement(m,(0,r.default)({className:"keyboard-delete",rowSpan:2,onClick:this.onKeyboardClick},this.getAriaAttr(o)))),s.createElement("tr",null,["4","5","6"].map(function(t,n){return e.renderKeyboardItem(t,n)})),s.createElement("tr",null,["7","8","9"].map(function(t,n){return e.renderKeyboardItem(t,n)}),s.createElement(m,{className:"keyboard-confirm",rowSpan:2,onClick:this.onKeyboardClick,tdRef:function(t){return e.confirmKeyboardItem=t}},a)),s.createElement("tr",null,[".","0"].map(function(t,n){return e.renderKeyboardItem(t,n)}),s.createElement(m,(0,r.default)({className:"keyboard-hide",onClick:this.onKeyboardClick},this.getAriaAttr(l)))))))}},{key:"getAriaAttr",value:function(e){return d.IS_IOS?{label:e,iconOnly:!0}:{role:"button","aria-label":e}}}]),t}(s.Component);b.defaultProps={prefixCls:"am-number-keyboard"},t.default=b},1140:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(5)),a=s(n(12)),o=s(n(6)),l=s(n(13)),i=u(n(0));function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}var c=u(n(21)).createPortal,d=function(e){function t(e){(0,r.default)(this,t);var n=(0,o.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.container=n.props.getContainer(),n}return(0,l.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){return this.props.children?c(this.props.children,this.container):null}}]),t}(i.Component);t.default=d,e.exports=t.default},1141:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(3)),a=s(n(5)),o=s(n(12)),l=s(n(6)),i=s(n(13)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]])}return n},d=function(e){function t(){(0,a.default)(this,t);var e=(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onInputBlur=function(t){var n=t.target.value;e.props.onBlur&&e.props.onBlur(n)},e.onInputFocus=function(t){var n=t.target.value;e.props.onFocus&&e.props.onFocus(n)},e.focus=function(){e.inputRef&&e.inputRef.focus()},e}return(0,i.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=(t.onBlur,t.onFocus,c(t,["onBlur","onFocus"]));return u.createElement("input",(0,r.default)({ref:function(t){return e.inputRef=t},onBlur:this.onInputBlur,onFocus:this.onInputFocus},n))}}]),t}(u.Component);t.default=d,e.exports=t.default},1142:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={confirmLabel:"\u786e\u5b9a",backspaceLabel:"\u9000\u683c",cancelKeyboardLabel:"\u6536\u8d77\u952e\u76d8"},e.exports=t.default},582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(3),o=(r=a)&&r.__esModule?r:{default:r};t.getComponentLocale=function(e,t,n,r){var a={};if(t&&t.antLocale&&t.antLocale[n])a=t.antLocale[n];else{var l=r();a=l.default||l}var i=(0,o.default)({},a);e.locale&&(i=(0,o.default)({},i,e.locale),e.locale.lang&&(i.lang=(0,o.default)({},a.lang,e.locale.lang)));return i},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},769:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.canUseDOM=!("undefined"===typeof window||!window.document||!window.document.createElement);t.IS_IOS=r&&/iphone|ipad|ipod/i.test(window.navigator.userAgent)}}]);
//# sourceMappingURL=28.f699c8ca.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{1131:function(e,t,n){"use strict";n(48),n(255),n(1132)},1132:function(e,t,n){},1133:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(3)),a=p(n(33)),o=p(n(5)),l=p(n(12)),i=p(n(6)),u=p(n(13)),s=p(n(15)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),d=p(n(151)),f=p(n(256));function p(e){return e&&e.__esModule?e:{default:e}}var m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]])}return n},b=/^[\u4e00-\u9fa5]{2}$/,y=b.test.bind(b);function v(e){return"string"===typeof e}function h(e){return v(e.type)&&y(e.props.children)?c.cloneElement(e,{},e.props.children.split("").join(" ")):v(e)?(y(e)&&(e=e.split("").join(" ")),c.createElement("span",null,e)):e}var C=function(e){function t(){return(0,o.default)(this,t),(0,i.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,l.default)(t,[{key:"render",value:function(){var e,t=this.props,n=t.children,o=t.className,l=t.prefixCls,i=t.type,u=t.size,p=t.inline,b=t.disabled,y=t.icon,v=t.loading,C=t.activeStyle,g=t.activeClassName,k=t.onClick,O=m(t,["children","className","prefixCls","type","size","inline","disabled","icon","loading","activeStyle","activeClassName","onClick"]),_=v?"loading":y,P=(0,s.default)(l,o,(e={},(0,a.default)(e,l+"-primary","primary"===i),(0,a.default)(e,l+"-ghost","ghost"===i),(0,a.default)(e,l+"-warning","warning"===i),(0,a.default)(e,l+"-small","small"===u),(0,a.default)(e,l+"-inline",p),(0,a.default)(e,l+"-disabled",b),(0,a.default)(e,l+"-loading",v),(0,a.default)(e,l+"-icon",!!_),e)),x=c.Children.map(n,h),K=void 0;if("string"===typeof _)K=c.createElement(f.default,{"aria-hidden":"true",type:_,size:"small"===u?"xxs":"md",className:l+"-icon"});else if(_){var I=_.props&&_.props.className,E=(0,s.default)("am-icon",l+"-icon","small"===u?"am-icon-xxs":"am-icon-md");K=c.cloneElement(_,{className:I?I+" "+E:E})}return c.createElement(d.default,{activeClassName:g||(C?l+"-active":void 0),disabled:b,activeStyle:C},c.createElement("a",(0,r.default)({role:"button",className:P},O,{onClick:b?void 0:k,"aria-disabled":b}),K,x))}}]),t}(c.Component);C.defaultProps={prefixCls:"am-button",size:"large",inline:!1,disabled:!1,loading:!1,activeStyle:{}},t.default=C,e.exports=t.default},1134:function(e,t,n){"use strict";n(48),n(114),n(1135)},1135:function(e,t,n){},1136:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(33)),a=v(n(3)),o=v(n(5)),l=v(n(12)),i=v(n(6)),u=v(n(13)),s=v(n(15)),c=y(n(2)),d=y(n(0)),f=v(n(151)),p=n(582),m=v(n(1137)),b=v(n(1141));function y(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function v(e){return e&&e.__esModule?e:{default:e}}var h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]])}return n};function C(){}function g(e){return"undefined"===typeof e||null===e?"":e+""}var k=function(e){function t(e){(0,o.default)(this,t);var n=(0,i.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onInputChange=function(e){var t=e.target,r=t.value,a=t.selectionEnd,o=n.state.value,l=void 0===o?"":o,i=n.props.type,u=r;switch(i){case"bankCard":u=r.replace(/\D/g,"").replace(/(....)(?=.)/g,"$1 ");break;case"phone":var s=(u=r.replace(/\D/g,"").substring(0,11)).length;s>3&&s<8?u=u.substr(0,3)+" "+u.substr(3):s>=8&&(u=u.substr(0,3)+" "+u.substr(3,4)+" "+u.substr(7));break;case"number":u=r.replace(/\D/g,"")}n.handleOnChange(u,u!==r,function(){switch(i){case"bankCard":case"phone":case"number":try{var e=n.calcPos(a||0,l,r,u,[" "],/\D/g);("phone"===i&&(4===e||9===e)||"bankCard"===i&&e>0&&e%5===0)&&(e-=1),t.selectionStart=t.selectionEnd=e}catch(o){console.warn("Set selection error:",o)}}})},n.handleOnChange=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C,a=n.props.onChange;"value"in n.props?n.setState({value:n.props.value}):n.setState({value:e}),a?t?setTimeout(function(){a(e),r()}):(a(e),r()):r()},n.onInputFocus=function(e){n.debounceTimeout&&(clearTimeout(n.debounceTimeout),n.debounceTimeout=null),n.setState({focus:!0}),n.props.onFocus&&n.props.onFocus(e)},n.onInputBlur=function(e){n.inputRef&&(n.debounceTimeout=window.setTimeout(function(){document.activeElement!==(n.inputRef&&n.inputRef.inputRef)&&n.setState({focus:!1})},200)),n.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),n.props.onBlur(e))},n.clearInput=function(){"password"!==n.props.type&&n.props.updatePlaceholder&&n.setState({placeholder:n.props.value}),n.setState({value:""}),n.props.onChange&&n.props.onChange(""),n.focus()},n.focus=function(){n.inputRef&&n.inputRef.focus()},n.calcPos=function(e,t,n,r,a,o){var l=n.length-t.length,i=e;if(l>0){var u=n.substr(i-l,l).replace(o,"").length;i-=l-u;for(var s=0;u>0;)-1===a.indexOf(r.charAt(i-u+s))?u--:s++;i+=s}return i},n.state={placeholder:e.placeholder,value:g(e.value||e.defaultValue)},n}return(0,u.default)(t,e),(0,l.default)(t,[{key:"componentWillReceiveProps",value:function(e){"placeholder"in e&&!e.updatePlaceholder&&this.setState({placeholder:e.placeholder}),"value"in e&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){this.debounceTimeout&&(window.clearTimeout(this.debounceTimeout),this.debounceTimeout=null)}},{key:"render",value:function(){var e,t,o=this,l=(0,a.default)({},this.props);delete l.updatePlaceholder;var i=l.prefixCls,u=l.prefixListCls,c=l.editable,y=l.style,v=l.clear,C=l.children,k=l.error,O=l.className,_=l.extra,P=l.labelNumber,x=l.type,K=l.onExtraClick,I=l.onErrorClick,E=l.moneyKeyboardAlign,w=l.moneyKeyboardWrapProps,L=l.moneyKeyboardHeader,N=l.onVirtualKeyboardConfirm,j=h(l,["prefixCls","prefixListCls","editable","style","clear","children","error","className","extra","labelNumber","type","onExtraClick","onErrorClick","moneyKeyboardAlign","moneyKeyboardWrapProps","moneyKeyboardHeader","onVirtualKeyboardConfirm"]),S=j.name,B=j.disabled,M=j.maxLength,F=this.state.value,R=(0,p.getComponentLocale)(this.props,this.context,"InputItem",function(){return n(1142)}),T=R.confirmLabel,A=R.backspaceLabel,D=R.cancelKeyboardLabel,W=this.state,V=W.focus,z=W.placeholder,H=(0,s.default)(u+"-item",i+"-item",u+"-item-middle",O,(e={},(0,r.default)(e,i+"-disabled",B),(0,r.default)(e,i+"-error",k),(0,r.default)(e,i+"-focus",V),(0,r.default)(e,i+"-android",V),e)),U=(0,s.default)(i+"-label",(t={},(0,r.default)(t,i+"-label-2",2===P),(0,r.default)(t,i+"-label-3",3===P),(0,r.default)(t,i+"-label-4",4===P),(0,r.default)(t,i+"-label-5",5===P),(0,r.default)(t,i+"-label-6",6===P),(0,r.default)(t,i+"-label-7",7===P),t)),J=i+"-control",$="text";"bankCard"===x||"phone"===x?$="tel":"password"===x?$="password":"digit"===x?$="number":"text"!==x&&"number"!==x&&($=x);var q=void 0;"number"===x&&(q={pattern:"[0-9]*"});var G=void 0;return"digit"===x&&(G={className:"h5numInput"}),d.createElement("div",{className:H},d.createElement("div",{className:u+"-line"},C?d.createElement("div",{className:U},C):null,d.createElement("div",{className:J},"money"===x?d.createElement(m.default,{value:g(F),type:x,ref:function(e){return o.inputRef=e},maxLength:M,placeholder:z,onChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onVirtualKeyboardConfirm:N,disabled:B,editable:c,prefixCls:i,style:y,confirmLabel:T,backspaceLabel:A,cancelKeyboardLabel:D,moneyKeyboardAlign:E,moneyKeyboardWrapProps:w,moneyKeyboardHeader:L}):d.createElement(b.default,(0,a.default)({},q,j,G,{value:g(F),defaultValue:void 0,ref:function(e){return o.inputRef=e},style:y,type:$,maxLength:M,name:S,placeholder:z,onChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,readOnly:!c,disabled:B}))),v&&c&&!B&&F&&(""+F).length>0?d.createElement(f.default,{activeClassName:i+"-clear-active"},d.createElement("div",{className:i+"-clear",onClick:this.clearInput})):null,k?d.createElement("div",{className:i+"-error-extra",onClick:I}):null,""!==_?d.createElement("div",{className:i+"-extra",onClick:K},_):null))}}]),t}(d.Component);k.defaultProps={prefixCls:"am-input",prefixListCls:"am-list",type:"text",editable:!0,disabled:!1,placeholder:"",clear:!1,onChange:C,onBlur:C,onFocus:C,extra:"",onExtraClick:C,error:!1,onErrorClick:C,onVirtualKeyboardConfirm:C,labelNumber:5,updatePlaceholder:!1,moneyKeyboardAlign:"right",moneyKeyboardWrapProps:{},moneyKeyboardHeader:null},k.contextTypes={antLocale:c.object},t.default=k,e.exports=t.default},1137:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=b(n(5)),a=b(n(12)),o=b(n(6)),l=b(n(13)),i=b(n(15)),u=m(n(0)),s=m(n(21)),c=n(1138),d=b(n(1139)),f=b(n(1140)),p=n(769);function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}var y=[],v=null,h=!!s.createPortal,C=function(e){function t(e){(0,r.default)(this,t);var n=(0,o.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onChange=function(e){"value"in n.props||n.setState({value:e.target.value}),n.props.onChange(e)},n.onConfirm=function(e){n.props.onVirtualKeyboardConfirm(e)},n.addBlurListener=function(){document.addEventListener("click",n.doBlur,!1)},n.removeBlurListener=function(){document.removeEventListener("click",n.doBlur,!1)},n.saveRef=function(e){h&&e&&(v=e,y.push({el:e,container:n.container}))},n.doBlur=function(e){var t=n.state.value;e.target!==n.inputRef&&n.onInputBlur(t)},n.removeCurrentExtraKeyboard=function(){y=y.filter(function(e){var t=e.el,n=e.container;return t&&n&&t!==v&&n.parentNode.removeChild(n),t===v})},n.unLinkInput=function(){v&&v.antmKeyboard&&v.linkedInput&&v.linkedInput===n&&(v.linkedInput=null,(0,c.addClass)(v.antmKeyboard,n.props.keyboardPrefixCls+"-wrapper-hide")),n.removeBlurListener(),h&&n.removeCurrentExtraKeyboard()},n.onInputBlur=function(e){n.state.focus&&(n.setState({focus:!1}),n.props.onBlur(e),setTimeout(function(){n.unLinkInput()},50))},n.onInputFocus=function(){var e=n.state.value;n.props.onFocus(e),n.setState({focus:!0},function(){v&&(v.linkedInput=n,v.antmKeyboard&&(0,c.removeClass)(v.antmKeyboard,n.props.keyboardPrefixCls+"-wrapper-hide"),v.confirmDisabled=""===e,v.confirmKeyboardItem&&(""===e?(0,c.addClass)(v.confirmKeyboardItem,n.props.keyboardPrefixCls+"-item-disabled"):(0,c.removeClass)(v.confirmKeyboardItem,n.props.keyboardPrefixCls+"-item-disabled")))})},n.onKeyboardClick=function(e){var t=n.props.maxLength,r=n.state.value,a=n.onChange,o=void 0;"delete"===e?a({target:{value:o=r.substring(0,r.length-1)}}):"confirm"===e?(a({target:{value:o=r}}),n.onInputBlur(r),n.onConfirm(r)):"hide"===e?(o=r,n.onInputBlur(o)):a(void 0!==t&&+t>=0&&(r+e).length>t?{target:{value:o=(r+e).substr(0,t)}}:{target:{value:o=r+e}}),v&&(v.confirmDisabled=""===o,v.confirmKeyboardItem&&(""===o?(0,c.addClass)(v.confirmKeyboardItem,n.props.keyboardPrefixCls+"-item-disabled"):(0,c.removeClass)(v.confirmKeyboardItem,n.props.keyboardPrefixCls+"-item-disabled")))},n.onFakeInputClick=function(){n.focus()},n.focus=function(){n.removeBlurListener(),n.state.focus||n.onInputFocus(),setTimeout(function(){n.addBlurListener()},50)},n.state={focus:!1,value:e.value||""},n}return(0,l.default)(t,e),(0,a.default)(t,[{key:"componentWillReceiveProps",value:function(e){"value"in e&&this.setState({value:e.value})}},{key:"componentDidUpdate",value:function(){this.renderCustomKeyboard()}},{key:"componentWillUnmount",value:function(){this.state.focus&&this.props.onBlur(this.state.value),this.unLinkInput()}},{key:"getComponent",value:function(){var e=this.props,t=e.confirmLabel,n=e.backspaceLabel,r=e.cancelKeyboardLabel,a=e.keyboardPrefixCls,o=e.moneyKeyboardWrapProps,l=e.moneyKeyboardHeader;return u.createElement(d.default,{ref:this.saveRef,onClick:this.onKeyboardClick,prefixCls:a,confirmLabel:t,backspaceLabel:n,cancelKeyboardLabel:r,wrapProps:o,header:l})}},{key:"getContainer",value:function(){var e=this.props.keyboardPrefixCls;if(h){if(!this.container){var t=document.createElement("div");t.setAttribute("id",e+"-container-"+(new Date).getTime()),document.body.appendChild(t),this.container=t}}else{var n=document.querySelector("#"+e+"-container");n||((n=document.createElement("div")).setAttribute("id",e+"-container"),document.body.appendChild(n)),this.container=n}return this.container}},{key:"renderCustomKeyboard",value:function(){h||(v=s.unstable_renderSubtreeIntoContainer(this,this.getComponent(),this.getContainer()))}},{key:"renderPortal",value:function(){var e=this;return h&&p.canUseDOM?u.createElement(f.default,{getContainer:function(){return e.getContainer()}},this.getComponent()):null}},{key:"render",value:function(){var e=this,t=this.props,n=t.placeholder,r=t.disabled,a=t.editable,o=t.moneyKeyboardAlign,l=this.state,s=l.focus,c=l.value,d=r||!a,f=(0,i.default)("fake-input",{focus:s,"fake-input-disabled":r}),p=(0,i.default)("fake-input-container",{"fake-input-container-left":"left"===o});return u.createElement("div",{className:p},""===c&&u.createElement("div",{className:"fake-input-placeholder"},n),u.createElement("div",{role:"textbox","aria-label":c||n,className:f,ref:function(t){return e.inputRef=t},onClick:d?function(){}:this.onFakeInputClick},c),this.renderPortal())}}]),t}(u.Component);C.defaultProps={onChange:function(){},onFocus:function(){},onBlur:function(){},onVirtualKeyboardConfirm:function(){},placeholder:"",disabled:!1,editable:!0,prefixCls:"am-input",keyboardPrefixCls:"am-number-keyboard"},t.default=C,e.exports=t.default},1138:function(e,t,n){"use strict";function r(e,t){return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}Object.defineProperty(t,"__esModule",{value:!0}),t.hasClass=r,t.addClass=function(e,t){e.classList?e.classList.add(t):r(e,t)||(e.className=e.className+" "+t)},t.removeClass=function(e,t){if(e.classList)e.classList.remove(t);else if(r(e,t)){var n=e.className;e.className=(" "+n+" ").replace(" "+t+" ","")}}},1139:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardItem=void 0;var r=f(n(3)),a=f(n(5)),o=f(n(12)),l=f(n(6)),i=f(n(13)),u=f(n(15)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),c=f(n(151)),d=n(769);function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]])}return n},m=t.KeyboardItem=function(e){function t(){return(0,a.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,i.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.onClick,a=e.className,o=(e.disabled,e.children),l=e.tdRef,i=e.label,d=e.iconOnly,f=p(e,["prefixCls","onClick","className","disabled","children","tdRef","label","iconOnly"]),m=o;"keyboard-delete"===a?m="delete":"keyboard-hide"===a?m="hide":"keyboard-confirm"===a&&(m="confirm");var b=(0,u.default)(t+"-item",a);return s.createElement(c.default,{activeClassName:t+"-item-active"},s.createElement("td",(0,r.default)({ref:l,onClick:function(e){n(e,m)},className:b},f),o,d&&s.createElement("i",{className:"sr-only"},i)))}}]),t}(s.Component);m.defaultProps={prefixCls:"am-number-keyboard",onClick:function(){},disabled:!1};var b=function(e){function t(){(0,a.default)(this,t);var e=(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onKeyboardClick=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t.nativeEvent.stopImmediatePropagation(),"confirm"===n&&e.confirmDisabled)return null;e.linkedInput&&e.linkedInput.onKeyboardClick(n)},e.renderKeyboardItem=function(t,n){return s.createElement(m,{onClick:e.onKeyboardClick,key:"item-"+t+"-"+n},t)},e}return(0,i.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.confirmLabel,o=t.backspaceLabel,l=t.cancelKeyboardLabel,i=t.wrapProps,c=t.header,d=(0,u.default)(n+"-wrapper",n+"-wrapper-hide");return s.createElement("div",(0,r.default)({className:d,ref:function(t){return e.antmKeyboard=t}},i),c&&s.cloneElement(c,{onClick:this.onKeyboardClick}),s.createElement("table",null,s.createElement("tbody",null,s.createElement("tr",null,["1","2","3"].map(function(t,n){return e.renderKeyboardItem(t,n)}),s.createElement(m,(0,r.default)({className:"keyboard-delete",rowSpan:2,onClick:this.onKeyboardClick},this.getAriaAttr(o)))),s.createElement("tr",null,["4","5","6"].map(function(t,n){return e.renderKeyboardItem(t,n)})),s.createElement("tr",null,["7","8","9"].map(function(t,n){return e.renderKeyboardItem(t,n)}),s.createElement(m,{className:"keyboard-confirm",rowSpan:2,onClick:this.onKeyboardClick,tdRef:function(t){return e.confirmKeyboardItem=t}},a)),s.createElement("tr",null,[".","0"].map(function(t,n){return e.renderKeyboardItem(t,n)}),s.createElement(m,(0,r.default)({className:"keyboard-hide",onClick:this.onKeyboardClick},this.getAriaAttr(l)))))))}},{key:"getAriaAttr",value:function(e){return d.IS_IOS?{label:e,iconOnly:!0}:{role:"button","aria-label":e}}}]),t}(s.Component);b.defaultProps={prefixCls:"am-number-keyboard"},t.default=b},1140:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(5)),a=s(n(12)),o=s(n(6)),l=s(n(13)),i=u(n(0));function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}var c=u(n(21)).createPortal,d=function(e){function t(e){(0,r.default)(this,t);var n=(0,o.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.container=n.props.getContainer(),n}return(0,l.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){return this.props.children?c(this.props.children,this.container):null}}]),t}(i.Component);t.default=d,e.exports=t.default},1141:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(3)),a=s(n(5)),o=s(n(12)),l=s(n(6)),i=s(n(13)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]])}return n},d=function(e){function t(){(0,a.default)(this,t);var e=(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onInputBlur=function(t){var n=t.target.value;e.props.onBlur&&e.props.onBlur(n)},e.onInputFocus=function(t){var n=t.target.value;e.props.onFocus&&e.props.onFocus(n)},e.focus=function(){e.inputRef&&e.inputRef.focus()},e}return(0,i.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=(t.onBlur,t.onFocus,c(t,["onBlur","onFocus"]));return u.createElement("input",(0,r.default)({ref:function(t){return e.inputRef=t},onBlur:this.onInputBlur,onFocus:this.onInputFocus},n))}}]),t}(u.Component);t.default=d,e.exports=t.default},1142:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={confirmLabel:"\u786e\u5b9a",backspaceLabel:"\u9000\u683c",cancelKeyboardLabel:"\u6536\u8d77\u952e\u76d8"},e.exports=t.default},582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(3),o=(r=a)&&r.__esModule?r:{default:r};t.getComponentLocale=function(e,t,n,r){var a={};if(t&&t.antLocale&&t.antLocale[n])a=t.antLocale[n];else{var l=r();a=l.default||l}var i=(0,o.default)({},a);e.locale&&(i=(0,o.default)({},i,e.locale),e.locale.lang&&(i.lang=(0,o.default)({},a.lang,e.locale.lang)));return i},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},769:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.canUseDOM=!("undefined"===typeof window||!window.document||!window.document.createElement);t.IS_IOS=r&&/iphone|ipad|ipod/i.test(window.navigator.userAgent)}}]);
//# sourceMappingURL=28.dc773ffa.chunk.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,n){return"aria-"!==n.substr(0,5)&&"data-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t},{})},e.exports=t.default},658:function(e,t,n){var r=n(659);var o={shouldComponentUpdate:function(e,t){return function(e,t,n){return!r(e.props,t)||!r(e.state,n)}(this,e,t)}};e.exports=o},659:function(e,t,n){"use strict";var r=n(660);e.exports=function(e,t,n,o){var a=n?n.call(o,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var u=r(e),l=r(t),c=u.length;if(c!==l.length)return!1;o=o||null;for(var i=Object.prototype.hasOwnProperty.bind(t),f=0;f<c;f++){var s=u[f];if(!i(s))return!1;var p=e[s],d=t[s],y=n?n.call(o,p,d,s):void 0;if(!1===y||void 0===y&&p!==d)return!1}return!0}},660:function(e,t,n){var r=n(661),o=n(662),a=n(663),u=/^\d+$/,l=Object.prototype.hasOwnProperty,c=r(Object,"keys"),i=9007199254740991;var f,s=(f="length",function(e){return null==e?void 0:e[f]});function p(e,t){return e="number"==typeof e||u.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&e<t}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function y(e){for(var t=function(e){if(null==e)return[];h(e)||(e=Object(e));var t=e.length;t=t&&d(t)&&(a(e)||o(e))&&t||0;var n=e.constructor,r=-1,u="function"==typeof n&&n.prototype===e,c=Array(t),i=t>0;for(;++r<t;)c[r]=r+"";for(var f in e)i&&p(f,t)||"constructor"==f&&(u||!l.call(e,f))||c.push(f);return c}(e),n=t.length,r=n&&e.length,u=!!r&&d(r)&&(a(e)||o(e)),c=-1,i=[];++c<n;){var f=t[c];(u&&p(f,r)||l.call(e,f))&&i.push(f)}return i}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var b=c?function(e){var t,n=null==e?void 0:e.constructor;return"function"==typeof n&&n.prototype===e||"function"!=typeof e&&(null!=(t=e)&&d(s(t)))?y(e):h(e)?c(e):[]}:y;e.exports=b},661:function(e,t){var n="[object Function]",r=/^\[object .+?Constructor\]$/;var o=Object.prototype,a=Function.prototype.toString,u=o.hasOwnProperty,l=o.toString,c=RegExp("^"+a.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e,t){var o=null==e?void 0:e[t];return function(e){return null!=e&&(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&l.call(e)==n}(e)?c.test(a.call(e)):function(e){return!!e&&"object"==typeof e}(e)&&r.test(e))}(o)?o:void 0}},662:function(e,t){var n=9007199254740991,r="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]",u=Object.prototype,l=u.hasOwnProperty,c=u.toString,i=u.propertyIsEnumerable;e.exports=function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==o||t==a}(e)}(e)}(e)&&l.call(e,"callee")&&(!i.call(e,"callee")||c.call(e)==r)}},663:function(e,t){var n="[object Function]",r=/^\[object .+?Constructor\]$/;function o(e){return!!e&&"object"==typeof e}var a=Object.prototype,u=Function.prototype.toString,l=a.hasOwnProperty,c=a.toString,i=RegExp("^"+u.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),f=function(e,t){var a=null==e?void 0:e[t];return function(e){if(null==e)return!1;if(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&c.call(e)==n}(e))return i.test(u.call(e));return o(e)&&r.test(e)}(a)?a:void 0}(Array,"isArray"),s=9007199254740991;var p=f||function(e){return o(e)&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}(e.length)&&"[object Array]"==c.call(e)};e.exports=p},668:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(5)),o=f(n(12)),a=f(n(6)),u=f(n(13)),l=f(n(15)),c=f(n(702)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0));function f(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},p=function(e){function t(){return(0,r.default)(this,t),(0,a.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.style,r=s(e,["className","style"]),o=r.prefixCls,a=r.children,u=(0,l.default)(o+"-wrapper",t);"class"in r&&delete r.class;var f=i.createElement("label",{className:u,style:n},i.createElement(c.default,r),a);return this.props.wrapLabel?f:i.createElement(c.default,this.props)}}]),t}(i.Component);t.default=p,p.defaultProps={prefixCls:"am-checkbox",wrapLabel:!0},e.exports=t.default},702:function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r),a=n(32),u=n.n(a),l=n(71),c=n.n(l),i=n(5),f=n.n(i),s=n(12),p=n.n(s),d=n(6),y=n.n(d),h=n(13),b=n.n(h),v=n(0),O=n.n(v),m=n(2),g=n.n(m),j=n(658),k=n.n(j),x=n(15),C=n.n(x),P=function(e){function t(e){f()(this,t);var n=y()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));_.call(n);var r="checked"in e?e.checked:e.defaultChecked;return n.state={checked:r},n}return b()(t,e),p()(t,[{key:"componentWillReceiveProps",value:function(e){"checked"in e&&this.setState({checked:e.checked})}},{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return k.a.shouldComponentUpdate.apply(this,t)}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.className,a=t.style,l=t.name,i=t.type,f=t.disabled,s=t.readOnly,p=t.tabIndex,d=t.onClick,y=t.onFocus,h=t.onBlur,b=c()(t,["prefixCls","className","style","name","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur"]),v=Object.keys(b).reduce(function(e,t){return"aria-"!==t.substr(0,5)&&"data-"!==t.substr(0,5)&&"role"!==t||(e[t]=b[t]),e},{}),m=this.state.checked,g=C()(n,r,(e={},u()(e,n+"-checked",m),u()(e,n+"-disabled",f),e));return O.a.createElement("span",{className:g,style:a},O.a.createElement("input",o()({name:l,type:i,readOnly:s,disabled:f,tabIndex:p,className:n+"-input",checked:!!m,onClick:d,onFocus:y,onBlur:h,onChange:this.handleChange},v)),O.a.createElement("span",{className:n+"-inner"}))}}]),t}(O.a.Component);P.propTypes={prefixCls:g.a.string,className:g.a.string,style:g.a.object,name:g.a.string,type:g.a.string,defaultChecked:g.a.oneOfType([g.a.number,g.a.bool]),checked:g.a.oneOfType([g.a.number,g.a.bool]),disabled:g.a.bool,onFocus:g.a.func,onBlur:g.a.func,onChange:g.a.func,onClick:g.a.func,tabIndex:g.a.string,readOnly:g.a.bool},P.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){}};var _=function(){var e=this;this.handleChange=function(t){var n=e.props;n.disabled||("checked"in n||e.setState({checked:t.target.checked}),n.onChange({target:o()({},n,{checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()}}))}},w=P;n.d(t,"default",function(){return w})},731:function(e,t,n){"use strict";n(48),n(114),n(892)},732:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(893)),o=u(n(668)),a=u(n(894));function u(e){return e&&e.__esModule?e:{default:e}}o.default.CheckboxItem=a.default,o.default.AgreeItem=r.default,t.default=o.default,e.exports=t.default},892:function(e,t,n){},893:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(3)),o=p(n(5)),a=p(n(12)),u=p(n(6)),l=p(n(13)),c=p(n(15)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),f=p(n(577)),s=p(n(668));function p(e){return e&&e.__esModule?e:{default:e}}var d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},y=function(e){function t(){return(0,o.default)(this,t),(0,u.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.style,n=d(e,["style"]),o=n.prefixCls,a=n.className,u=(0,c.default)(o+"-agree",a);return i.createElement("div",(0,r.default)({},(0,f.default)(n),{className:u,style:t}),i.createElement(s.default,(0,r.default)({},n,{className:o+"-agree-label"})))}}]),t}(i.Component);t.default=y,y.defaultProps={prefixCls:"am-checkbox"},e.exports=t.default},894:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(3)),o=d(n(32)),a=d(n(5)),u=d(n(12)),l=d(n(6)),c=d(n(13)),i=d(n(15)),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),s=d(n(46)),p=d(n(668));function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},h=s.default.Item;function b(){}var v=function(e){function t(){return(0,a.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.listPrefixCls,a=(t.onChange,t.disabled),u=t.checkboxProps,l=t.onClick,c=y(t,["listPrefixCls","onChange","disabled","checkboxProps","onClick"]),s=c.prefixCls,d=c.className,v=c.children,O=(0,i.default)(s+"-item",d,(0,o.default)({},s+"-item-disabled",!0===a));a||(c.onClick=l||b);var m={};return["name","defaultChecked","checked","onChange","disabled"].forEach(function(t){t in e.props&&(m[t]=e.props[t])}),f.createElement(h,(0,r.default)({},c,{prefixCls:n,className:O,thumb:f.createElement(p.default,(0,r.default)({},u,m))}),v)}}]),t}(f.Component);t.default=v,v.defaultProps={prefixCls:"am-checkbox",listPrefixCls:"am-list",checkboxProps:{}},e.exports=t.default}}]);
//# sourceMappingURL=29.95cc221c.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,n){return"aria-"!==n.substr(0,5)&&"data-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t},{})},e.exports=t.default},658:function(e,t,n){var r=n(659);var o={shouldComponentUpdate:function(e,t){return function(e,t,n){return!r(e.props,t)||!r(e.state,n)}(this,e,t)}};e.exports=o},659:function(e,t,n){"use strict";var r=n(660);e.exports=function(e,t,n,o){var a=n?n.call(o,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var u=r(e),l=r(t),c=u.length;if(c!==l.length)return!1;o=o||null;for(var i=Object.prototype.hasOwnProperty.bind(t),f=0;f<c;f++){var s=u[f];if(!i(s))return!1;var p=e[s],d=t[s],y=n?n.call(o,p,d,s):void 0;if(!1===y||void 0===y&&p!==d)return!1}return!0}},660:function(e,t,n){var r=n(661),o=n(662),a=n(663),u=/^\d+$/,l=Object.prototype.hasOwnProperty,c=r(Object,"keys"),i=9007199254740991;var f,s=(f="length",function(e){return null==e?void 0:e[f]});function p(e,t){return e="number"==typeof e||u.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&e<t}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function y(e){for(var t=function(e){if(null==e)return[];h(e)||(e=Object(e));var t=e.length;t=t&&d(t)&&(a(e)||o(e))&&t||0;var n=e.constructor,r=-1,u="function"==typeof n&&n.prototype===e,c=Array(t),i=t>0;for(;++r<t;)c[r]=r+"";for(var f in e)i&&p(f,t)||"constructor"==f&&(u||!l.call(e,f))||c.push(f);return c}(e),n=t.length,r=n&&e.length,u=!!r&&d(r)&&(a(e)||o(e)),c=-1,i=[];++c<n;){var f=t[c];(u&&p(f,r)||l.call(e,f))&&i.push(f)}return i}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var b=c?function(e){var t,n=null==e?void 0:e.constructor;return"function"==typeof n&&n.prototype===e||"function"!=typeof e&&(null!=(t=e)&&d(s(t)))?y(e):h(e)?c(e):[]}:y;e.exports=b},661:function(e,t){var n="[object Function]",r=/^\[object .+?Constructor\]$/;var o=Object.prototype,a=Function.prototype.toString,u=o.hasOwnProperty,l=o.toString,c=RegExp("^"+a.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e,t){var o=null==e?void 0:e[t];return function(e){return null!=e&&(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&l.call(e)==n}(e)?c.test(a.call(e)):function(e){return!!e&&"object"==typeof e}(e)&&r.test(e))}(o)?o:void 0}},662:function(e,t){var n=9007199254740991,r="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]",u=Object.prototype,l=u.hasOwnProperty,c=u.toString,i=u.propertyIsEnumerable;e.exports=function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==o||t==a}(e)}(e)}(e)&&l.call(e,"callee")&&(!i.call(e,"callee")||c.call(e)==r)}},663:function(e,t){var n="[object Function]",r=/^\[object .+?Constructor\]$/;function o(e){return!!e&&"object"==typeof e}var a=Object.prototype,u=Function.prototype.toString,l=a.hasOwnProperty,c=a.toString,i=RegExp("^"+u.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),f=function(e,t){var a=null==e?void 0:e[t];return function(e){if(null==e)return!1;if(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&c.call(e)==n}(e))return i.test(u.call(e));return o(e)&&r.test(e)}(a)?a:void 0}(Array,"isArray"),s=9007199254740991;var p=f||function(e){return o(e)&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}(e.length)&&"[object Array]"==c.call(e)};e.exports=p},668:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(5)),o=f(n(12)),a=f(n(6)),u=f(n(13)),l=f(n(15)),c=f(n(702)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0));function f(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},p=function(e){function t(){return(0,r.default)(this,t),(0,a.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.style,r=s(e,["className","style"]),o=r.prefixCls,a=r.children,u=(0,l.default)(o+"-wrapper",t);"class"in r&&delete r.class;var f=i.createElement("label",{className:u,style:n},i.createElement(c.default,r),a);return this.props.wrapLabel?f:i.createElement(c.default,this.props)}}]),t}(i.Component);t.default=p,p.defaultProps={prefixCls:"am-checkbox",wrapLabel:!0},e.exports=t.default},702:function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r),a=n(33),u=n.n(a),l=n(71),c=n.n(l),i=n(5),f=n.n(i),s=n(12),p=n.n(s),d=n(6),y=n.n(d),h=n(13),b=n.n(h),v=n(0),O=n.n(v),m=n(2),g=n.n(m),j=n(658),k=n.n(j),x=n(15),C=n.n(x),P=function(e){function t(e){f()(this,t);var n=y()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));_.call(n);var r="checked"in e?e.checked:e.defaultChecked;return n.state={checked:r},n}return b()(t,e),p()(t,[{key:"componentWillReceiveProps",value:function(e){"checked"in e&&this.setState({checked:e.checked})}},{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return k.a.shouldComponentUpdate.apply(this,t)}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.className,a=t.style,l=t.name,i=t.type,f=t.disabled,s=t.readOnly,p=t.tabIndex,d=t.onClick,y=t.onFocus,h=t.onBlur,b=c()(t,["prefixCls","className","style","name","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur"]),v=Object.keys(b).reduce(function(e,t){return"aria-"!==t.substr(0,5)&&"data-"!==t.substr(0,5)&&"role"!==t||(e[t]=b[t]),e},{}),m=this.state.checked,g=C()(n,r,(e={},u()(e,n+"-checked",m),u()(e,n+"-disabled",f),e));return O.a.createElement("span",{className:g,style:a},O.a.createElement("input",o()({name:l,type:i,readOnly:s,disabled:f,tabIndex:p,className:n+"-input",checked:!!m,onClick:d,onFocus:y,onBlur:h,onChange:this.handleChange},v)),O.a.createElement("span",{className:n+"-inner"}))}}]),t}(O.a.Component);P.propTypes={prefixCls:g.a.string,className:g.a.string,style:g.a.object,name:g.a.string,type:g.a.string,defaultChecked:g.a.oneOfType([g.a.number,g.a.bool]),checked:g.a.oneOfType([g.a.number,g.a.bool]),disabled:g.a.bool,onFocus:g.a.func,onBlur:g.a.func,onChange:g.a.func,onClick:g.a.func,tabIndex:g.a.string,readOnly:g.a.bool},P.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){}};var _=function(){var e=this;this.handleChange=function(t){var n=e.props;n.disabled||("checked"in n||e.setState({checked:t.target.checked}),n.onChange({target:o()({},n,{checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()}}))}},w=P;n.d(t,"default",function(){return w})},731:function(e,t,n){"use strict";n(48),n(114),n(892)},732:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(893)),o=u(n(668)),a=u(n(894));function u(e){return e&&e.__esModule?e:{default:e}}o.default.CheckboxItem=a.default,o.default.AgreeItem=r.default,t.default=o.default,e.exports=t.default},892:function(e,t,n){},893:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(3)),o=p(n(5)),a=p(n(12)),u=p(n(6)),l=p(n(13)),c=p(n(15)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),f=p(n(577)),s=p(n(668));function p(e){return e&&e.__esModule?e:{default:e}}var d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},y=function(e){function t(){return(0,o.default)(this,t),(0,u.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.style,n=d(e,["style"]),o=n.prefixCls,a=n.className,u=(0,c.default)(o+"-agree",a);return i.createElement("div",(0,r.default)({},(0,f.default)(n),{className:u,style:t}),i.createElement(s.default,(0,r.default)({},n,{className:o+"-agree-label"})))}}]),t}(i.Component);t.default=y,y.defaultProps={prefixCls:"am-checkbox"},e.exports=t.default},894:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(3)),o=d(n(33)),a=d(n(5)),u=d(n(12)),l=d(n(6)),c=d(n(13)),i=d(n(15)),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),s=d(n(46)),p=d(n(668));function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},h=s.default.Item;function b(){}var v=function(e){function t(){return(0,a.default)(this,t),(0,l.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.listPrefixCls,a=(t.onChange,t.disabled),u=t.checkboxProps,l=t.onClick,c=y(t,["listPrefixCls","onChange","disabled","checkboxProps","onClick"]),s=c.prefixCls,d=c.className,v=c.children,O=(0,i.default)(s+"-item",d,(0,o.default)({},s+"-item-disabled",!0===a));a||(c.onClick=l||b);var m={};return["name","defaultChecked","checked","onChange","disabled"].forEach(function(t){t in e.props&&(m[t]=e.props[t])}),f.createElement(h,(0,r.default)({},c,{prefixCls:n,className:O,thumb:f.createElement(p.default,(0,r.default)({},u,m))}),v)}}]),t}(f.Component);t.default=v,v.defaultProps={prefixCls:"am-checkbox",listPrefixCls:"am-list",checkboxProps:{}},e.exports=t.default}}]);
//# sourceMappingURL=29.76256aca.chunk.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{658:function(e,t,n){var r=n(659);var o={shouldComponentUpdate:function(e,t){return function(e,t,n){return!r(e.props,t)||!r(e.state,n)}(this,e,t)}};e.exports=o},659:function(e,t,n){"use strict";var r=n(660);e.exports=function(e,t,n,o){var a=n?n.call(o,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var u=r(e),c=r(t),l=u.length;if(l!==c.length)return!1;o=o||null;for(var i=Object.prototype.hasOwnProperty.bind(t),f=0;f<l;f++){var s=u[f];if(!i(s))return!1;var p=e[s],d=t[s],y=n?n.call(o,p,d,s):void 0;if(!1===y||void 0===y&&p!==d)return!1}return!0}},660:function(e,t,n){var r=n(661),o=n(662),a=n(663),u=/^\d+$/,c=Object.prototype.hasOwnProperty,l=r(Object,"keys"),i=9007199254740991;var f,s=(f="length",function(e){return null==e?void 0:e[f]});function p(e,t){return e="number"==typeof e||u.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&e<t}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function y(e){for(var t=function(e){if(null==e)return[];h(e)||(e=Object(e));var t=e.length;t=t&&d(t)&&(a(e)||o(e))&&t||0;var n=e.constructor,r=-1,u="function"==typeof n&&n.prototype===e,l=Array(t),i=t>0;for(;++r<t;)l[r]=r+"";for(var f in e)i&&p(f,t)||"constructor"==f&&(u||!c.call(e,f))||l.push(f);return l}(e),n=t.length,r=n&&e.length,u=!!r&&d(r)&&(a(e)||o(e)),l=-1,i=[];++l<n;){var f=t[l];(u&&p(f,r)||c.call(e,f))&&i.push(f)}return i}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var b=l?function(e){var t,n=null==e?void 0:e.constructor;return"function"==typeof n&&n.prototype===e||"function"!=typeof e&&(null!=(t=e)&&d(s(t)))?y(e):h(e)?l(e):[]}:y;e.exports=b},661:function(e,t){var n="[object Function]",r=/^\[object .+?Constructor\]$/;var o=Object.prototype,a=Function.prototype.toString,u=o.hasOwnProperty,c=o.toString,l=RegExp("^"+a.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e,t){var o=null==e?void 0:e[t];return function(e){return null!=e&&(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&c.call(e)==n}(e)?l.test(a.call(e)):function(e){return!!e&&"object"==typeof e}(e)&&r.test(e))}(o)?o:void 0}},662:function(e,t){var n=9007199254740991,r="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]",u=Object.prototype,c=u.hasOwnProperty,l=u.toString,i=u.propertyIsEnumerable;e.exports=function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?l.call(e):"";return t==o||t==a}(e)}(e)}(e)&&c.call(e,"callee")&&(!i.call(e,"callee")||l.call(e)==r)}},663:function(e,t){var n="[object Function]",r=/^\[object .+?Constructor\]$/;function o(e){return!!e&&"object"==typeof e}var a=Object.prototype,u=Function.prototype.toString,c=a.hasOwnProperty,l=a.toString,i=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),f=function(e,t){var a=null==e?void 0:e[t];return function(e){if(null==e)return!1;if(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&l.call(e)==n}(e))return i.test(u.call(e));return o(e)&&r.test(e)}(a)?a:void 0}(Array,"isArray"),s=9007199254740991;var p=f||function(e){return o(e)&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}(e.length)&&"[object Array]"==l.call(e)};e.exports=p},702:function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r),a=n(32),u=n.n(a),c=n(71),l=n.n(c),i=n(5),f=n.n(i),s=n(12),p=n.n(s),d=n(6),y=n.n(d),h=n(13),b=n.n(h),v=n(0),m=n.n(v),O=n(2),g=n.n(O),j=n(658),C=n.n(j),k=n(15),x=n.n(k),P=function(e){function t(e){f()(this,t);var n=y()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));_.call(n);var r="checked"in e?e.checked:e.defaultChecked;return n.state={checked:r},n}return b()(t,e),p()(t,[{key:"componentWillReceiveProps",value:function(e){"checked"in e&&this.setState({checked:e.checked})}},{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return C.a.shouldComponentUpdate.apply(this,t)}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.className,a=t.style,c=t.name,i=t.type,f=t.disabled,s=t.readOnly,p=t.tabIndex,d=t.onClick,y=t.onFocus,h=t.onBlur,b=l()(t,["prefixCls","className","style","name","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur"]),v=Object.keys(b).reduce(function(e,t){return"aria-"!==t.substr(0,5)&&"data-"!==t.substr(0,5)&&"role"!==t||(e[t]=b[t]),e},{}),O=this.state.checked,g=x()(n,r,(e={},u()(e,n+"-checked",O),u()(e,n+"-disabled",f),e));return m.a.createElement("span",{className:g,style:a},m.a.createElement("input",o()({name:c,type:i,readOnly:s,disabled:f,tabIndex:p,className:n+"-input",checked:!!O,onClick:d,onFocus:y,onBlur:h,onChange:this.handleChange},v)),m.a.createElement("span",{className:n+"-inner"}))}}]),t}(m.a.Component);P.propTypes={prefixCls:g.a.string,className:g.a.string,style:g.a.object,name:g.a.string,type:g.a.string,defaultChecked:g.a.oneOfType([g.a.number,g.a.bool]),checked:g.a.oneOfType([g.a.number,g.a.bool]),disabled:g.a.bool,onFocus:g.a.func,onBlur:g.a.func,onChange:g.a.func,onClick:g.a.func,tabIndex:g.a.string,readOnly:g.a.bool},P.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){}};var _=function(){var e=this;this.handleChange=function(t){var n=e.props;n.disabled||("checked"in n||e.setState({checked:t.target.checked}),n.onChange({target:o()({},n,{checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()}}))}},w=P;n.d(t,"default",function(){return w})},730:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(3)),o=s(n(5)),a=s(n(12)),u=s(n(6)),c=s(n(13)),l=s(n(15)),i=s(n(702)),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0));function s(e){return e&&e.__esModule?e:{default:e}}var p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},d=function(e){function t(){return(0,o.default)(this,t),(0,u.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.style,o=p(e,["className","style"]),a=o.prefixCls,u=o.children,c=(0,l.default)(a+"-wrapper",t);"class"in o&&delete o.class;var s=f.createElement("label",{className:c,style:n},f.createElement(i.default,(0,r.default)({},o,{type:"radio"})),u);return this.props.wrapLabel?s:f.createElement(i.default,(0,r.default)({},this.props,{type:"radio"}))}}]),t}(f.Component);t.default=d,d.defaultProps={prefixCls:"am-radio",wrapLabel:!0},e.exports=t.default},884:function(e,t,n){"use strict";n(48),n(114),n(885)},885:function(e,t,n){},886:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(730)),o=a(n(887));function a(e){return e&&e.__esModule?e:{default:e}}r.default.RadioItem=o.default,t.default=r.default,e.exports=t.default},887:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(3)),o=d(n(32)),a=d(n(5)),u=d(n(12)),c=d(n(6)),l=d(n(13)),i=d(n(15)),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),s=d(n(46)),p=d(n(730));function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},h=s.default.Item;function b(){}var v=function(e){function t(){return(0,a.default)(this,t),(0,c.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.listPrefixCls,a=(t.onChange,t.disabled),u=t.radioProps,c=t.onClick,l=y(t,["listPrefixCls","onChange","disabled","radioProps","onClick"]),s=l.prefixCls,d=l.className,v=l.children,m=(0,i.default)(s+"-item",d,(0,o.default)({},s+"-item-disabled",!0===a));a||(l.onClick=c||b);var O={};return["name","defaultChecked","checked","onChange","disabled"].forEach(function(t){t in e.props&&(O[t]=e.props[t])}),f.createElement(h,(0,r.default)({},l,{prefixCls:n,className:m,extra:f.createElement(p.default,(0,r.default)({},u,O))}),v)}}]),t}(f.Component);t.default=v,v.defaultProps={prefixCls:"am-radio",listPrefixCls:"am-list",radioProps:{}},e.exports=t.default}}]);
//# sourceMappingURL=30.551081e6.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{658:function(e,t,n){var r=n(659);var o={shouldComponentUpdate:function(e,t){return function(e,t,n){return!r(e.props,t)||!r(e.state,n)}(this,e,t)}};e.exports=o},659:function(e,t,n){"use strict";var r=n(660);e.exports=function(e,t,n,o){var a=n?n.call(o,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var u=r(e),c=r(t),l=u.length;if(l!==c.length)return!1;o=o||null;for(var i=Object.prototype.hasOwnProperty.bind(t),f=0;f<l;f++){var s=u[f];if(!i(s))return!1;var p=e[s],d=t[s],y=n?n.call(o,p,d,s):void 0;if(!1===y||void 0===y&&p!==d)return!1}return!0}},660:function(e,t,n){var r=n(661),o=n(662),a=n(663),u=/^\d+$/,c=Object.prototype.hasOwnProperty,l=r(Object,"keys"),i=9007199254740991;var f,s=(f="length",function(e){return null==e?void 0:e[f]});function p(e,t){return e="number"==typeof e||u.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&e<t}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function y(e){for(var t=function(e){if(null==e)return[];h(e)||(e=Object(e));var t=e.length;t=t&&d(t)&&(a(e)||o(e))&&t||0;var n=e.constructor,r=-1,u="function"==typeof n&&n.prototype===e,l=Array(t),i=t>0;for(;++r<t;)l[r]=r+"";for(var f in e)i&&p(f,t)||"constructor"==f&&(u||!c.call(e,f))||l.push(f);return l}(e),n=t.length,r=n&&e.length,u=!!r&&d(r)&&(a(e)||o(e)),l=-1,i=[];++l<n;){var f=t[l];(u&&p(f,r)||c.call(e,f))&&i.push(f)}return i}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var b=l?function(e){var t,n=null==e?void 0:e.constructor;return"function"==typeof n&&n.prototype===e||"function"!=typeof e&&(null!=(t=e)&&d(s(t)))?y(e):h(e)?l(e):[]}:y;e.exports=b},661:function(e,t){var n="[object Function]",r=/^\[object .+?Constructor\]$/;var o=Object.prototype,a=Function.prototype.toString,u=o.hasOwnProperty,c=o.toString,l=RegExp("^"+a.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e,t){var o=null==e?void 0:e[t];return function(e){return null!=e&&(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&c.call(e)==n}(e)?l.test(a.call(e)):function(e){return!!e&&"object"==typeof e}(e)&&r.test(e))}(o)?o:void 0}},662:function(e,t){var n=9007199254740991,r="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]",u=Object.prototype,c=u.hasOwnProperty,l=u.toString,i=u.propertyIsEnumerable;e.exports=function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?l.call(e):"";return t==o||t==a}(e)}(e)}(e)&&c.call(e,"callee")&&(!i.call(e,"callee")||l.call(e)==r)}},663:function(e,t){var n="[object Function]",r=/^\[object .+?Constructor\]$/;function o(e){return!!e&&"object"==typeof e}var a=Object.prototype,u=Function.prototype.toString,c=a.hasOwnProperty,l=a.toString,i=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),f=function(e,t){var a=null==e?void 0:e[t];return function(e){if(null==e)return!1;if(function(e){return function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)&&l.call(e)==n}(e))return i.test(u.call(e));return o(e)&&r.test(e)}(a)?a:void 0}(Array,"isArray"),s=9007199254740991;var p=f||function(e){return o(e)&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}(e.length)&&"[object Array]"==l.call(e)};e.exports=p},702:function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r),a=n(33),u=n.n(a),c=n(71),l=n.n(c),i=n(5),f=n.n(i),s=n(12),p=n.n(s),d=n(6),y=n.n(d),h=n(13),b=n.n(h),v=n(0),m=n.n(v),O=n(2),g=n.n(O),j=n(658),C=n.n(j),k=n(15),x=n.n(k),P=function(e){function t(e){f()(this,t);var n=y()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));_.call(n);var r="checked"in e?e.checked:e.defaultChecked;return n.state={checked:r},n}return b()(t,e),p()(t,[{key:"componentWillReceiveProps",value:function(e){"checked"in e&&this.setState({checked:e.checked})}},{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return C.a.shouldComponentUpdate.apply(this,t)}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.className,a=t.style,c=t.name,i=t.type,f=t.disabled,s=t.readOnly,p=t.tabIndex,d=t.onClick,y=t.onFocus,h=t.onBlur,b=l()(t,["prefixCls","className","style","name","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur"]),v=Object.keys(b).reduce(function(e,t){return"aria-"!==t.substr(0,5)&&"data-"!==t.substr(0,5)&&"role"!==t||(e[t]=b[t]),e},{}),O=this.state.checked,g=x()(n,r,(e={},u()(e,n+"-checked",O),u()(e,n+"-disabled",f),e));return m.a.createElement("span",{className:g,style:a},m.a.createElement("input",o()({name:c,type:i,readOnly:s,disabled:f,tabIndex:p,className:n+"-input",checked:!!O,onClick:d,onFocus:y,onBlur:h,onChange:this.handleChange},v)),m.a.createElement("span",{className:n+"-inner"}))}}]),t}(m.a.Component);P.propTypes={prefixCls:g.a.string,className:g.a.string,style:g.a.object,name:g.a.string,type:g.a.string,defaultChecked:g.a.oneOfType([g.a.number,g.a.bool]),checked:g.a.oneOfType([g.a.number,g.a.bool]),disabled:g.a.bool,onFocus:g.a.func,onBlur:g.a.func,onChange:g.a.func,onClick:g.a.func,tabIndex:g.a.string,readOnly:g.a.bool},P.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){}};var _=function(){var e=this;this.handleChange=function(t){var n=e.props;n.disabled||("checked"in n||e.setState({checked:t.target.checked}),n.onChange({target:o()({},n,{checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()}}))}},w=P;n.d(t,"default",function(){return w})},730:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(3)),o=s(n(5)),a=s(n(12)),u=s(n(6)),c=s(n(13)),l=s(n(15)),i=s(n(702)),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0));function s(e){return e&&e.__esModule?e:{default:e}}var p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},d=function(e){function t(){return(0,o.default)(this,t),(0,u.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.style,o=p(e,["className","style"]),a=o.prefixCls,u=o.children,c=(0,l.default)(a+"-wrapper",t);"class"in o&&delete o.class;var s=f.createElement("label",{className:c,style:n},f.createElement(i.default,(0,r.default)({},o,{type:"radio"})),u);return this.props.wrapLabel?s:f.createElement(i.default,(0,r.default)({},this.props,{type:"radio"}))}}]),t}(f.Component);t.default=d,d.defaultProps={prefixCls:"am-radio",wrapLabel:!0},e.exports=t.default},884:function(e,t,n){"use strict";n(48),n(114),n(885)},885:function(e,t,n){},886:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(730)),o=a(n(887));function a(e){return e&&e.__esModule?e:{default:e}}r.default.RadioItem=o.default,t.default=r.default,e.exports=t.default},887:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(3)),o=d(n(33)),a=d(n(5)),u=d(n(12)),c=d(n(6)),l=d(n(13)),i=d(n(15)),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),s=d(n(46)),p=d(n(730));function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},h=s.default.Item;function b(){}var v=function(e){function t(){return(0,a.default)(this,t),(0,c.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.listPrefixCls,a=(t.onChange,t.disabled),u=t.radioProps,c=t.onClick,l=y(t,["listPrefixCls","onChange","disabled","radioProps","onClick"]),s=l.prefixCls,d=l.className,v=l.children,m=(0,i.default)(s+"-item",d,(0,o.default)({},s+"-item-disabled",!0===a));a||(l.onClick=c||b);var O={};return["name","defaultChecked","checked","onChange","disabled"].forEach(function(t){t in e.props&&(O[t]=e.props[t])}),f.createElement(h,(0,r.default)({},l,{prefixCls:n,className:m,extra:f.createElement(p.default,(0,r.default)({},u,O))}),v)}}]),t}(f.Component);t.default=v,v.defaultProps={prefixCls:"am-radio",listPrefixCls:"am-list",radioProps:{}},e.exports=t.default}}]);
//# sourceMappingURL=30.db405cf8.chunk.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{1119:function(t,e,i){"use strict";i(48),i(1120)},1120:function(t,e,i){},1121:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=p(i(32)),o=p(i(3)),s=p(i(5)),r=p(i(12)),a=p(i(6)),l=p(i(13)),u=p(i(15)),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(0)),d=p(i(1150));function p(t){return t&&t.__esModule?t:{default:t}}var h=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&(i[n[o]]=t[n[o]])}return i},f=function(t){function e(t){(0,s.default)(this,e);var i=(0,a.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.onChange=function(t){i.setState({selectedIndex:t},function(){i.props.afterChange&&i.props.afterChange(t)})},i.state={selectedIndex:i.props.selectedIndex},i}return(0,l.default)(e,t),(0,r.default)(e,[{key:"render",value:function(){var t=this.props,e=t.infinite,i=t.selectedIndex,s=t.beforeChange,r=(t.afterChange,t.dots),a=h(t,["infinite","selectedIndex","beforeChange","afterChange","dots"]),l=a.prefixCls,p=a.dotActiveStyle,f=a.dotStyle,g=a.className,v=a.vertical,S=(0,o.default)({},a,{wrapAround:e,slideIndex:i,beforeSlide:s}),y=[];r&&(y=[{component:function(t){for(var e=t.slideCount,i=t.slidesToScroll,o=t.currentSlide,s=[],r=0;r<e;r+=i)s.push(r);var a=s.map(function(t){var e=(0,u.default)(l+"-wrap-dot",(0,n.default)({},l+"-wrap-dot-active",t===o)),i=t===o?p:f;return c.createElement("div",{className:e,key:t},c.createElement("span",{style:i}))});return c.createElement("div",{className:l+"-wrap"},a)},position:"BottomCenter"}]);var m=(0,u.default)(l,g,(0,n.default)({},l+"-vertical",v));return c.createElement(d.default,(0,o.default)({},S,{className:m,decorators:y,afterSlide:this.onChange}))}}]),e}(c.Component);e.default=f,f.defaultProps={prefixCls:"am-carousel",dots:!0,arrows:!1,autoplay:!1,infinite:!1,cellAlign:"center",selectedIndex:0,dotStyle:{},dotActiveStyle:{}},t.exports=e.default},1122:function(t,e,i){var n;!function(){"use strict";var o=!("undefined"===typeof window||!window.document||!window.document.createElement),s={canUseDOM:o,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(n=function(){return s}.call(e,i,e,t))||(t.exports=n)}()},1123:function(t,e,i){(function(e){for(var n=i(1124),o="undefined"===typeof window?e:window,s=["moz","webkit"],r="AnimationFrame",a=o["request"+r],l=o["cancel"+r]||o["cancelRequest"+r],u=0;!a&&u<s.length;u++)a=o[s[u]+"Request"+r],l=o[s[u]+"Cancel"+r]||o[s[u]+"CancelRequest"+r];if(!a||!l){var c=0,d=0,p=[];a=function(t){if(0===p.length){var e=n(),i=Math.max(0,1e3/60-(e-c));c=i+e,setTimeout(function(){var t=p.slice(0);p.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(c)}catch(i){setTimeout(function(){throw i},0)}},Math.round(i))}return p.push({handle:++d,callback:t,cancelled:!1}),d},l=function(t){for(var e=0;e<p.length;e++)p[e].handle===t&&(p[e].cancelled=!0)}}t.exports=function(t){return a.call(o,t)},t.exports.cancel=function(){l.apply(o,arguments)},t.exports.polyfill=function(t){t||(t=o),t.requestAnimationFrame=a,t.cancelAnimationFrame=l}}).call(this,i(49))},1124:function(t,e,i){(function(e){(function(){var i,n,o,s,r,a;"undefined"!==typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!==typeof e&&null!==e&&e.hrtime?(t.exports=function(){return(i()-r)/1e6},n=e.hrtime,s=(i=function(){var t;return 1e9*(t=n())[0]+t[1]})(),a=1e9*e.uptime(),r=s-a):Date.now?(t.exports=function(){return Date.now()-o},o=Date.now()):(t.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,i(252))},1150:function(t,e,i){"use strict";i.r(e);var n=i(3),o=i.n(n),s=i(5),r=i.n(s),a=i(12),l=i.n(a),u=i(6),c=i.n(u),d=i(13),p=i.n(d),h=i(0),f=i.n(h),g=[{component:function(t){function e(){r()(this,e);var t=c()(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments));return t.handleClick=function(e){e.preventDefault(),t.props.previousSlide()},t}return p()(e,t),l()(e,[{key:"render",value:function(){return f.a.createElement("button",{style:this.getButtonStyles(0===this.props.currentSlide&&!this.props.wrapAround),onClick:this.handleClick},"PREV")}},{key:"getButtonStyles",value:function(t){return{border:0,background:"rgba(0,0,0,0.4)",color:"white",padding:10,outline:0,opacity:t?.3:1,cursor:"pointer"}}}]),e}(f.a.Component),position:"CenterLeft"},{component:function(t){function e(){r()(this,e);var t=c()(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments));return t.handleClick=function(e){e.preventDefault(),t.props.nextSlide&&t.props.nextSlide()},t}return p()(e,t),l()(e,[{key:"render",value:function(){return f.a.createElement("button",{style:this.getButtonStyles(this.props.currentSlide+this.props.slidesToScroll>=this.props.slideCount&&!this.props.wrapAround),onClick:this.handleClick},"NEXT")}},{key:"getButtonStyles",value:function(t){return{border:0,background:"rgba(0,0,0,0.4)",color:"white",padding:10,outline:0,opacity:t?.3:1,cursor:"pointer"}}}]),e}(f.a.Component),position:"CenterRight"},{component:function(t){function e(){return r()(this,e),c()(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p()(e,t),l()(e,[{key:"render",value:function(){var t=this,e=this.getIndexes(this.props.slideCount,this.props.slidesToScroll);return f.a.createElement("ul",{style:this.getListStyles()},e.map(function(e){return f.a.createElement("li",{style:t.getListItemStyles(),key:e},f.a.createElement("button",{style:t.getButtonStyles(t.props.currentSlide===e),onClick:t.props.goToSlide&&t.props.goToSlide.bind(null,e)},"\u2022"))}))}},{key:"getIndexes",value:function(t,e){for(var i=[],n=0;n<t;n+=e)i.push(n);return i}},{key:"getListStyles",value:function(){return{position:"relative",margin:0,top:-10,padding:0}}},{key:"getListItemStyles",value:function(){return{listStyleType:"none",display:"inline-block"}}},{key:"getButtonStyles",value:function(t){return{border:0,background:"transparent",color:"black",cursor:"pointer",padding:10,outline:0,fontSize:24,opacity:t?1:.5}}}]),e}(f.a.Component),position:"BottomCenter"}],v=i(1122),S=i.n(v),y=i(1123),m=i.n(y);var b={ADDITIVE:"ADDITIVE",DESTRUCTIVE:"DESTRUCTIVE"},w=function(t,e,i){null!==t&&"undefined"!==typeof t&&(t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i)},T=function(t,e,i){null!==t&&"undefined"!==typeof t&&(t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null)},k=function(t){function e(t){r()(this,e);var i=c()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i._rafCb=function(){var t=i.state;if(0!==t.tweenQueue.length){for(var e=Date.now(),n=[],o=0;o<t.tweenQueue.length;o++){var s=t.tweenQueue[o],r=s.initTime,a=s.config;e-r<a.duration?n.push(s):a.onEnd&&a.onEnd()}-1!==i._rafID&&(i.setState({tweenQueue:n}),i._rafID=m()(i._rafCb))}},i.handleClick=function(t){!0===i.clickSafe&&(t.preventDefault(),t.stopPropagation(),t.nativeEvent&&t.nativeEvent.stopPropagation())},i.autoplayIterator=function(){if(i.props.wrapAround)return i.nextSlide();i.state.currentSlide!==i.state.slideCount-i.state.slidesToShow?i.nextSlide():i.stopAutoplay()},i.goToSlide=function(t){var e=i.props,n=e.beforeSlide,o=e.afterSlide;if(t>=f.a.Children.count(i.props.children)||t<0){if(!i.props.wrapAround)return;if(t>=f.a.Children.count(i.props.children))return n(i.state.currentSlide,0),i.setState({currentSlide:0},function(){i.animateSlide(null,null,i.getTargetLeft(null,t),function(){i.animateSlide(null,.01),o(0),i.resetAutoplay(),i.setExternalData()})});var s=f.a.Children.count(i.props.children)-i.state.slidesToScroll;return n(i.state.currentSlide,s),i.setState({currentSlide:s},function(){i.animateSlide(null,null,i.getTargetLeft(null,t),function(){i.animateSlide(null,.01),o(s),i.resetAutoplay(),i.setExternalData()})})}n(i.state.currentSlide,t),i.setState({currentSlide:t},function(){i.animateSlide(),i.props.afterSlide(t),i.resetAutoplay(),i.setExternalData()})},i.nextSlide=function(){var t=f.a.Children.count(i.props.children),e=i.props.slidesToShow;if("auto"===i.props.slidesToScroll&&(e=i.state.slidesToScroll),!(i.state.currentSlide>=t-e)||i.props.wrapAround)if(i.props.wrapAround)i.goToSlide(i.state.currentSlide+i.state.slidesToScroll);else{if(1!==i.props.slideWidth)return i.goToSlide(i.state.currentSlide+i.state.slidesToScroll);i.goToSlide(Math.min(i.state.currentSlide+i.state.slidesToScroll,t-e))}},i.previousSlide=function(){i.state.currentSlide<=0&&!i.props.wrapAround||(i.props.wrapAround?i.goToSlide(i.state.currentSlide-i.state.slidesToScroll):i.goToSlide(Math.max(0,i.state.currentSlide-i.state.slidesToScroll)))},i.onResize=function(){i.setDimensions()},i.onReadyStateChange=function(){i.setDimensions()},i.state={currentSlide:i.props.slideIndex,dragging:!1,frameWidth:0,left:0,slideCount:0,slidesToScroll:i.props.slidesToScroll,slideWidth:0,top:0,tweenQueue:[]},i.touchObject={},i.clickSafe=!0,i}return p()(e,t),l()(e,[{key:"componentWillMount",value:function(){this.setInitialDimensions()}},{key:"componentDidMount",value:function(){this.setDimensions(),this.bindEvents(),this.setExternalData(),this.props.autoplay&&this.startAutoplay()}},{key:"componentWillReceiveProps",value:function(t){this.setState({slideCount:t.children.length}),this.setDimensions(t),this.props.slideIndex!==t.slideIndex&&t.slideIndex!==this.state.currentSlide&&this.goToSlide(t.slideIndex),this.props.autoplay!==t.autoplay&&(t.autoplay?this.startAutoplay():this.stopAutoplay())}},{key:"componentWillUnmount",value:function(){this.unbindEvents(),this.stopAutoplay(),m.a.cancel(this._rafID),this._rafID=-1}},{key:"tweenState",value:function(t,e){var i=this,n=e.easing,o=e.duration,s=e.delay,r=e.beginValue,a=e.endValue,l=e.onEnd,u=e.stackBehavior;this.setState(function(e){var c=e,d=void 0,p=void 0;if("string"===typeof t)d=t,p=t;else{for(var h=0;h<t.length-1;h++)c=c[t[h]];d=t[t.length-1],p=t.join("|")}var f={easing:n,duration:null==o?300:o,delay:null==s?0:s,beginValue:null==r?c[d]:r,endValue:a,onEnd:l,stackBehavior:u||"ADDITIVE"},g=e.tweenQueue;return f.stackBehavior===b.DESTRUCTIVE&&(g=e.tweenQueue.filter(function(t){return t.pathHash!==p})),g.push({pathHash:p,config:f,initTime:Date.now()+f.delay}),c[d]=f.endValue,1===g.length&&(i._rafID=m()(i._rafCb)),{tweenQueue:g}})}},{key:"getTweeningValue",value:function(t){var e=this.state,i=void 0,n=void 0;if("string"===typeof t)i=e[t],n=t;else{i=e;for(var o=0;o<t.length;o++)i=i[t[o]];n=t.join("|")}for(var s=Date.now(),r=0;r<e.tweenQueue.length;r++){var a=e.tweenQueue[r],l=a.pathHash,u=a.initTime,c=a.config;if(l===n){var d=s-u>c.duration?c.duration:Math.max(0,s-u);i+=(0===c.duration?c.endValue:c.easing(d,c.beginValue,c.endValue,c.duration))-c.endValue}}return i}},{key:"render",value:function(){var t=this,e=f.a.Children.count(this.props.children)>1?this.formatChildren(this.props.children):this.props.children;return f.a.createElement("div",{className:["slider",this.props.className||""].join(" "),ref:"slider",style:o()({},this.getSliderStyles(),this.props.style)},f.a.createElement("div",o()({className:"slider-frame",ref:"frame",style:this.getFrameStyles()},this.getTouchEvents(),this.getMouseEvents(),{onClick:this.handleClick}),f.a.createElement("ul",{className:"slider-list",ref:"list",style:this.getListStyles()},e)),this.props.decorators?this.props.decorators.map(function(e,i){return f.a.createElement("div",{style:o()({},t.getDecoratorStyles(e.position),e.style||{}),className:"slider-decorator-"+i,key:i},f.a.createElement(e.component,{currentSlide:t.state.currentSlide,slideCount:t.state.slideCount,frameWidth:t.state.frameWidth,slideWidth:t.state.slideWidth,slidesToScroll:t.state.slidesToScroll,cellSpacing:t.props.cellSpacing,slidesToShow:t.props.slidesToShow,wrapAround:t.props.wrapAround,nextSlide:t.nextSlide,previousSlide:t.previousSlide,goToSlide:t.goToSlide}))}):null,f.a.createElement("style",{type:"text/css",dangerouslySetInnerHTML:{__html:this.getStyleTagStyles()}}))}},{key:"getTouchEvents",value:function(){var t=this;return!1===this.props.swiping?null:{onTouchStart:function(e){t.touchObject={startX:e.touches[0].pageX,startY:e.touches[0].pageY},t.handleMouseOver()},onTouchMove:function(e){var i=t.swipeDirection(t.touchObject.startX,e.touches[0].pageX,t.touchObject.startY,e.touches[0].pageY);0!==i&&e.preventDefault();var n=t.props.vertical?Math.round(Math.sqrt(Math.pow(e.touches[0].pageY-t.touchObject.startY,2))):Math.round(Math.sqrt(Math.pow(e.touches[0].pageX-t.touchObject.startX,2)));t.touchObject={startX:t.touchObject.startX,startY:t.touchObject.startY,endX:e.touches[0].pageX,endY:e.touches[0].pageY,length:n,direction:i},t.setState({left:t.props.vertical?0:t.getTargetLeft(t.touchObject.length*t.touchObject.direction),top:t.props.vertical?t.getTargetLeft(t.touchObject.length*t.touchObject.direction):0})},onTouchEnd:function(e){t.handleSwipe(e),t.handleMouseOut()},onTouchCancel:function(e){t.handleSwipe(e)}}}},{key:"getMouseEvents",value:function(){var t=this;return!1===this.props.dragging?null:{onMouseOver:function(){t.handleMouseOver()},onMouseOut:function(){t.handleMouseOut()},onMouseDown:function(e){t.touchObject={startX:e.clientX,startY:e.clientY},t.setState({dragging:!0})},onMouseMove:function(e){if(t.state.dragging){var i=t.swipeDirection(t.touchObject.startX,e.clientX,t.touchObject.startY,e.clientY);0!==i&&e.preventDefault();var n=t.props.vertical?Math.round(Math.sqrt(Math.pow(e.clientY-t.touchObject.startY,2))):Math.round(Math.sqrt(Math.pow(e.clientX-t.touchObject.startX,2)));t.touchObject={startX:t.touchObject.startX,startY:t.touchObject.startY,endX:e.clientX,endY:e.clientY,length:n,direction:i},t.setState({left:t.props.vertical?0:t.getTargetLeft(t.touchObject.length*t.touchObject.direction),top:t.props.vertical?t.getTargetLeft(t.touchObject.length*t.touchObject.direction):0})}},onMouseUp:function(e){t.state.dragging&&t.handleSwipe(e)},onMouseLeave:function(e){t.state.dragging&&t.handleSwipe(e)}}}},{key:"handleMouseOver",value:function(){this.props.autoplay&&(this.autoplayPaused=!0,this.stopAutoplay())}},{key:"handleMouseOut",value:function(){this.props.autoplay&&this.autoplayPaused&&(this.startAutoplay(),this.autoplayPaused=null)}},{key:"handleSwipe",value:function(t){"undefined"!==typeof this.touchObject.length&&this.touchObject.length>44?this.clickSafe=!0:this.clickSafe=!1;var e=this.props,i=e.slidesToShow,n=e.slidesToScroll,o=e.swipeSpeed;"auto"===n&&(i=this.state.slidesToScroll),f.a.Children.count(this.props.children)>1&&this.touchObject.length>this.state.slideWidth/i/o?1===this.touchObject.direction?this.state.currentSlide>=f.a.Children.count(this.props.children)-i&&!this.props.wrapAround?this.animateSlide(this.props.edgeEasing):this.nextSlide():-1===this.touchObject.direction&&(this.state.currentSlide<=0&&!this.props.wrapAround?this.animateSlide(this.props.edgeEasing):this.previousSlide()):this.goToSlide(this.state.currentSlide),this.touchObject={},this.setState({dragging:!1})}},{key:"swipeDirection",value:function(t,e,i,n){var o=t-e,s=i-n,r=Math.atan2(s,o),a=Math.round(180*r/Math.PI);return a<0&&(a=360-Math.abs(a)),a<=45&&a>=0?1:a<=360&&a>=315?1:a>=135&&a<=225?-1:!0===this.props.vertical?a>=35&&a<=135?1:-1:0}},{key:"startAutoplay",value:function(){f.a.Children.count(this.props.children)<=1||(this.autoplayID=setInterval(this.autoplayIterator,this.props.autoplayInterval))}},{key:"resetAutoplay",value:function(){this.props.resetAutoplay&&this.props.autoplay&&!this.autoplayPaused&&(this.stopAutoplay(),this.startAutoplay())}},{key:"stopAutoplay",value:function(){this.autoplayID&&clearInterval(this.autoplayID)}},{key:"animateSlide",value:function(t,e,i,n){this.tweenState(this.props.vertical?"top":"left",{easing:t||this.props.easing,duration:e||this.props.speed,endValue:i||this.getTargetLeft(),delay:null,beginValue:null,onEnd:n||null,stackBehavior:b})}},{key:"getTargetLeft",value:function(t,e){var i=void 0,n=e||this.state.currentSlide,o=this.props.cellSpacing;switch(this.props.cellAlign){case"left":i=0,i-=o*n;break;case"center":i=(this.state.frameWidth-this.state.slideWidth)/2,i-=o*n;break;case"right":i=this.state.frameWidth-this.state.slideWidth,i-=o*n}var s=this.state.slideWidth*n;return this.state.currentSlide>0&&n+this.state.slidesToScroll>=this.state.slideCount&&1!==this.props.slideWidth&&!this.props.wrapAround&&"auto"===this.props.slidesToScroll&&(s=this.state.slideWidth*this.state.slideCount-this.state.frameWidth,i=0,i-=o*(this.state.slideCount-1)),-1*(s-(i-=t||0))}},{key:"bindEvents",value:function(){S.a.canUseDOM&&(w(window,"resize",this.onResize),w(document,"readystatechange",this.onReadyStateChange))}},{key:"unbindEvents",value:function(){S.a.canUseDOM&&(T(window,"resize",this.onResize),T(document,"readystatechange",this.onReadyStateChange))}},{key:"formatChildren",value:function(t){var e=this,i=this.props.vertical?this.getTweeningValue("top"):this.getTweeningValue("left");return f.a.Children.map(t,function(t,n){return f.a.createElement("li",{className:"slider-slide",style:e.getSlideStyles(n,i),key:n},t)})}},{key:"setInitialDimensions",value:function(){var t=this,e=this.props,i=e.vertical,n=e.initialSlideHeight,o=e.initialSlideWidth,s=e.slidesToShow,r=e.cellSpacing,a=e.children,l=i?n||0:o||0,u=n?n*s:0,c=u+r*(s-1);this.setState({slideHeight:u,frameWidth:i?c:"100%",slideCount:f.a.Children.count(a),slideWidth:l},function(){t.setLeft(),t.setExternalData()})}},{key:"setDimensions",value:function(t){var e,i,n=this,o=void 0,s=void 0,r=(t=t||this.props).slidesToScroll,a=this.refs.frame,l=a.childNodes[0].childNodes[0];l?(l.style.height="auto",o=this.props.vertical?l.offsetHeight*t.slidesToShow:l.offsetHeight):o=100,s="number"!==typeof t.slideWidth?parseInt(t.slideWidth,10):t.vertical?o/t.slidesToShow*t.slideWidth:a.offsetWidth/t.slidesToShow*t.slideWidth,t.vertical||(s-=t.cellSpacing*((100-100/t.slidesToShow)/100)),i=o+t.cellSpacing*(t.slidesToShow-1),e=t.vertical?i:a.offsetWidth,"auto"===t.slidesToScroll&&(r=Math.floor(e/(s+t.cellSpacing))),this.setState({slideHeight:o,frameWidth:e,slideWidth:s,slidesToScroll:r,left:t.vertical?0:this.getTargetLeft(),top:t.vertical?this.getTargetLeft():0},function(){n.setLeft()})}},{key:"setLeft",value:function(){this.setState({left:this.props.vertical?0:this.getTargetLeft(),top:this.props.vertical?this.getTargetLeft():0})}},{key:"setExternalData",value:function(){this.props.data&&this.props.data()}},{key:"getListStyles",value:function(){var t=this.state.slideWidth*f.a.Children.count(this.props.children),e=this.props.cellSpacing,i=e*f.a.Children.count(this.props.children),n="translate3d("+this.getTweeningValue("left")+"px, "+this.getTweeningValue("top")+"px, 0)";return{transform:n,WebkitTransform:n,msTransform:"translate("+this.getTweeningValue("left")+"px, "+this.getTweeningValue("top")+"px)",position:"relative",display:"block",margin:this.props.vertical?e/2*-1+"px 0px":"0px "+e/2*-1+"px",padding:0,height:this.props.vertical?t+i:this.state.slideHeight,width:this.props.vertical?"auto":t+i,cursor:!0===this.state.dragging?"pointer":"inherit",boxSizing:"border-box",MozBoxSizing:"border-box"}}},{key:"getFrameStyles",value:function(){return{position:"relative",display:"block",overflow:this.props.frameOverflow,height:this.props.vertical?this.state.frameWidth||"initial":"auto",margin:this.props.framePadding,padding:0,transform:"translate3d(0, 0, 0)",WebkitTransform:"translate3d(0, 0, 0)",msTransform:"translate(0, 0)",boxSizing:"border-box",MozBoxSizing:"border-box"}}},{key:"getSlideStyles",value:function(t,e){var i=this.getSlideTargetPosition(t,e),n=this.props.cellSpacing;return{position:"absolute",left:this.props.vertical?0:i,top:this.props.vertical?i:0,display:this.props.vertical?"block":"inline-block",listStyleType:"none",verticalAlign:"top",width:this.props.vertical?"100%":this.state.slideWidth,height:"auto",boxSizing:"border-box",MozBoxSizing:"border-box",marginLeft:this.props.vertical?"auto":n/2,marginRight:this.props.vertical?"auto":n/2,marginTop:this.props.vertical?n/2:"auto",marginBottom:this.props.vertical?n/2:"auto"}}},{key:"getSlideTargetPosition",value:function(t,e){var i=this.state.frameWidth/this.state.slideWidth,n=(this.state.slideWidth+this.props.cellSpacing)*t,o=(this.state.slideWidth+this.props.cellSpacing)*i*-1;if(this.props.wrapAround){var s=Math.ceil(e/this.state.slideWidth);if(this.state.slideCount-s<=t)return(this.state.slideWidth+this.props.cellSpacing)*(this.state.slideCount-t)*-1;var r=Math.ceil((Math.abs(e)-Math.abs(o))/this.state.slideWidth);if(1!==this.state.slideWidth&&(r=Math.ceil((Math.abs(e)-this.state.slideWidth)/this.state.slideWidth)),t<=r-1)return(this.state.slideWidth+this.props.cellSpacing)*(this.state.slideCount+t)}return n}},{key:"getSliderStyles",value:function(){return{position:"relative",display:"block",width:this.props.width,height:"auto",boxSizing:"border-box",MozBoxSizing:"border-box",visibility:this.state.slideWidth?"visible":"hidden"}}},{key:"getStyleTagStyles",value:function(){return".slider-slide > img {width: 100%; display: block;}"}},{key:"getDecoratorStyles",value:function(t){switch(t){case"TopLeft":return{position:"absolute",top:0,left:0};case"TopCenter":return{position:"absolute",top:0,left:"50%",transform:"translateX(-50%)",WebkitTransform:"translateX(-50%)",msTransform:"translateX(-50%)"};case"TopRight":return{position:"absolute",top:0,right:0};case"CenterLeft":return{position:"absolute",top:"50%",left:0,transform:"translateY(-50%)",WebkitTransform:"translateY(-50%)",msTransform:"translateY(-50%)"};case"CenterCenter":return{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",WebkitTransform:"translate(-50%, -50%)",msTransform:"translate(-50%, -50%)"};case"CenterRight":return{position:"absolute",top:"50%",right:0,transform:"translateY(-50%)",WebkitTransform:"translateY(-50%)",msTransform:"translateY(-50%)"};case"BottomLeft":return{position:"absolute",bottom:0,left:0};case"BottomCenter":return{position:"absolute",bottom:0,width:"100%",textAlign:"center"};case"BottomRight":return{position:"absolute",bottom:0,right:0};default:return{position:"absolute",top:0,left:0}}}}]),e}(f.a.Component);k.defaultProps={afterSlide:function(){},autoplay:!1,resetAutoplay:!0,swipeSpeed:12,autoplayInterval:3e3,beforeSlide:function(){},cellAlign:"left",cellSpacing:0,data:function(){},decorators:g,dragging:!0,easing:function(t,e,i,n){return(i-e)*Math.sqrt(1-(t=t/n-1)*t)+e},edgeEasing:function(t,e,i,n){return(i-e)*t/n+e},framePadding:"0px",frameOverflow:"hidden",slideIndex:0,slidesToScroll:1,slidesToShow:1,slideWidth:1,speed:500,swiping:!0,vertical:!1,width:"100%",wrapAround:!1,style:{}};var C=k;i.d(e,"default",function(){return C})}}]);
//# sourceMappingURL=31.1f9a1906.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{1119:function(t,e,i){"use strict";i(48),i(1120)},1120:function(t,e,i){},1121:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=p(i(33)),o=p(i(3)),s=p(i(5)),r=p(i(12)),a=p(i(6)),l=p(i(13)),u=p(i(15)),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(0)),d=p(i(1150));function p(t){return t&&t.__esModule?t:{default:t}}var h=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&(i[n[o]]=t[n[o]])}return i},f=function(t){function e(t){(0,s.default)(this,e);var i=(0,a.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.onChange=function(t){i.setState({selectedIndex:t},function(){i.props.afterChange&&i.props.afterChange(t)})},i.state={selectedIndex:i.props.selectedIndex},i}return(0,l.default)(e,t),(0,r.default)(e,[{key:"render",value:function(){var t=this.props,e=t.infinite,i=t.selectedIndex,s=t.beforeChange,r=(t.afterChange,t.dots),a=h(t,["infinite","selectedIndex","beforeChange","afterChange","dots"]),l=a.prefixCls,p=a.dotActiveStyle,f=a.dotStyle,g=a.className,v=a.vertical,S=(0,o.default)({},a,{wrapAround:e,slideIndex:i,beforeSlide:s}),y=[];r&&(y=[{component:function(t){for(var e=t.slideCount,i=t.slidesToScroll,o=t.currentSlide,s=[],r=0;r<e;r+=i)s.push(r);var a=s.map(function(t){var e=(0,u.default)(l+"-wrap-dot",(0,n.default)({},l+"-wrap-dot-active",t===o)),i=t===o?p:f;return c.createElement("div",{className:e,key:t},c.createElement("span",{style:i}))});return c.createElement("div",{className:l+"-wrap"},a)},position:"BottomCenter"}]);var m=(0,u.default)(l,g,(0,n.default)({},l+"-vertical",v));return c.createElement(d.default,(0,o.default)({},S,{className:m,decorators:y,afterSlide:this.onChange}))}}]),e}(c.Component);e.default=f,f.defaultProps={prefixCls:"am-carousel",dots:!0,arrows:!1,autoplay:!1,infinite:!1,cellAlign:"center",selectedIndex:0,dotStyle:{},dotActiveStyle:{}},t.exports=e.default},1122:function(t,e,i){var n;!function(){"use strict";var o=!("undefined"===typeof window||!window.document||!window.document.createElement),s={canUseDOM:o,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(n=function(){return s}.call(e,i,e,t))||(t.exports=n)}()},1123:function(t,e,i){(function(e){for(var n=i(1124),o="undefined"===typeof window?e:window,s=["moz","webkit"],r="AnimationFrame",a=o["request"+r],l=o["cancel"+r]||o["cancelRequest"+r],u=0;!a&&u<s.length;u++)a=o[s[u]+"Request"+r],l=o[s[u]+"Cancel"+r]||o[s[u]+"CancelRequest"+r];if(!a||!l){var c=0,d=0,p=[];a=function(t){if(0===p.length){var e=n(),i=Math.max(0,1e3/60-(e-c));c=i+e,setTimeout(function(){var t=p.slice(0);p.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(c)}catch(i){setTimeout(function(){throw i},0)}},Math.round(i))}return p.push({handle:++d,callback:t,cancelled:!1}),d},l=function(t){for(var e=0;e<p.length;e++)p[e].handle===t&&(p[e].cancelled=!0)}}t.exports=function(t){return a.call(o,t)},t.exports.cancel=function(){l.apply(o,arguments)},t.exports.polyfill=function(t){t||(t=o),t.requestAnimationFrame=a,t.cancelAnimationFrame=l}}).call(this,i(49))},1124:function(t,e,i){(function(e){(function(){var i,n,o,s,r,a;"undefined"!==typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!==typeof e&&null!==e&&e.hrtime?(t.exports=function(){return(i()-r)/1e6},n=e.hrtime,s=(i=function(){var t;return 1e9*(t=n())[0]+t[1]})(),a=1e9*e.uptime(),r=s-a):Date.now?(t.exports=function(){return Date.now()-o},o=Date.now()):(t.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,i(252))},1150:function(t,e,i){"use strict";i.r(e);var n=i(3),o=i.n(n),s=i(5),r=i.n(s),a=i(12),l=i.n(a),u=i(6),c=i.n(u),d=i(13),p=i.n(d),h=i(0),f=i.n(h),g=[{component:function(t){function e(){r()(this,e);var t=c()(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments));return t.handleClick=function(e){e.preventDefault(),t.props.previousSlide()},t}return p()(e,t),l()(e,[{key:"render",value:function(){return f.a.createElement("button",{style:this.getButtonStyles(0===this.props.currentSlide&&!this.props.wrapAround),onClick:this.handleClick},"PREV")}},{key:"getButtonStyles",value:function(t){return{border:0,background:"rgba(0,0,0,0.4)",color:"white",padding:10,outline:0,opacity:t?.3:1,cursor:"pointer"}}}]),e}(f.a.Component),position:"CenterLeft"},{component:function(t){function e(){r()(this,e);var t=c()(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments));return t.handleClick=function(e){e.preventDefault(),t.props.nextSlide&&t.props.nextSlide()},t}return p()(e,t),l()(e,[{key:"render",value:function(){return f.a.createElement("button",{style:this.getButtonStyles(this.props.currentSlide+this.props.slidesToScroll>=this.props.slideCount&&!this.props.wrapAround),onClick:this.handleClick},"NEXT")}},{key:"getButtonStyles",value:function(t){return{border:0,background:"rgba(0,0,0,0.4)",color:"white",padding:10,outline:0,opacity:t?.3:1,cursor:"pointer"}}}]),e}(f.a.Component),position:"CenterRight"},{component:function(t){function e(){return r()(this,e),c()(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p()(e,t),l()(e,[{key:"render",value:function(){var t=this,e=this.getIndexes(this.props.slideCount,this.props.slidesToScroll);return f.a.createElement("ul",{style:this.getListStyles()},e.map(function(e){return f.a.createElement("li",{style:t.getListItemStyles(),key:e},f.a.createElement("button",{style:t.getButtonStyles(t.props.currentSlide===e),onClick:t.props.goToSlide&&t.props.goToSlide.bind(null,e)},"\u2022"))}))}},{key:"getIndexes",value:function(t,e){for(var i=[],n=0;n<t;n+=e)i.push(n);return i}},{key:"getListStyles",value:function(){return{position:"relative",margin:0,top:-10,padding:0}}},{key:"getListItemStyles",value:function(){return{listStyleType:"none",display:"inline-block"}}},{key:"getButtonStyles",value:function(t){return{border:0,background:"transparent",color:"black",cursor:"pointer",padding:10,outline:0,fontSize:24,opacity:t?1:.5}}}]),e}(f.a.Component),position:"BottomCenter"}],v=i(1122),S=i.n(v),y=i(1123),m=i.n(y);var b={ADDITIVE:"ADDITIVE",DESTRUCTIVE:"DESTRUCTIVE"},w=function(t,e,i){null!==t&&"undefined"!==typeof t&&(t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i)},T=function(t,e,i){null!==t&&"undefined"!==typeof t&&(t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null)},k=function(t){function e(t){r()(this,e);var i=c()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i._rafCb=function(){var t=i.state;if(0!==t.tweenQueue.length){for(var e=Date.now(),n=[],o=0;o<t.tweenQueue.length;o++){var s=t.tweenQueue[o],r=s.initTime,a=s.config;e-r<a.duration?n.push(s):a.onEnd&&a.onEnd()}-1!==i._rafID&&(i.setState({tweenQueue:n}),i._rafID=m()(i._rafCb))}},i.handleClick=function(t){!0===i.clickSafe&&(t.preventDefault(),t.stopPropagation(),t.nativeEvent&&t.nativeEvent.stopPropagation())},i.autoplayIterator=function(){if(i.props.wrapAround)return i.nextSlide();i.state.currentSlide!==i.state.slideCount-i.state.slidesToShow?i.nextSlide():i.stopAutoplay()},i.goToSlide=function(t){var e=i.props,n=e.beforeSlide,o=e.afterSlide;if(t>=f.a.Children.count(i.props.children)||t<0){if(!i.props.wrapAround)return;if(t>=f.a.Children.count(i.props.children))return n(i.state.currentSlide,0),i.setState({currentSlide:0},function(){i.animateSlide(null,null,i.getTargetLeft(null,t),function(){i.animateSlide(null,.01),o(0),i.resetAutoplay(),i.setExternalData()})});var s=f.a.Children.count(i.props.children)-i.state.slidesToScroll;return n(i.state.currentSlide,s),i.setState({currentSlide:s},function(){i.animateSlide(null,null,i.getTargetLeft(null,t),function(){i.animateSlide(null,.01),o(s),i.resetAutoplay(),i.setExternalData()})})}n(i.state.currentSlide,t),i.setState({currentSlide:t},function(){i.animateSlide(),i.props.afterSlide(t),i.resetAutoplay(),i.setExternalData()})},i.nextSlide=function(){var t=f.a.Children.count(i.props.children),e=i.props.slidesToShow;if("auto"===i.props.slidesToScroll&&(e=i.state.slidesToScroll),!(i.state.currentSlide>=t-e)||i.props.wrapAround)if(i.props.wrapAround)i.goToSlide(i.state.currentSlide+i.state.slidesToScroll);else{if(1!==i.props.slideWidth)return i.goToSlide(i.state.currentSlide+i.state.slidesToScroll);i.goToSlide(Math.min(i.state.currentSlide+i.state.slidesToScroll,t-e))}},i.previousSlide=function(){i.state.currentSlide<=0&&!i.props.wrapAround||(i.props.wrapAround?i.goToSlide(i.state.currentSlide-i.state.slidesToScroll):i.goToSlide(Math.max(0,i.state.currentSlide-i.state.slidesToScroll)))},i.onResize=function(){i.setDimensions()},i.onReadyStateChange=function(){i.setDimensions()},i.state={currentSlide:i.props.slideIndex,dragging:!1,frameWidth:0,left:0,slideCount:0,slidesToScroll:i.props.slidesToScroll,slideWidth:0,top:0,tweenQueue:[]},i.touchObject={},i.clickSafe=!0,i}return p()(e,t),l()(e,[{key:"componentWillMount",value:function(){this.setInitialDimensions()}},{key:"componentDidMount",value:function(){this.setDimensions(),this.bindEvents(),this.setExternalData(),this.props.autoplay&&this.startAutoplay()}},{key:"componentWillReceiveProps",value:function(t){this.setState({slideCount:t.children.length}),this.setDimensions(t),this.props.slideIndex!==t.slideIndex&&t.slideIndex!==this.state.currentSlide&&this.goToSlide(t.slideIndex),this.props.autoplay!==t.autoplay&&(t.autoplay?this.startAutoplay():this.stopAutoplay())}},{key:"componentWillUnmount",value:function(){this.unbindEvents(),this.stopAutoplay(),m.a.cancel(this._rafID),this._rafID=-1}},{key:"tweenState",value:function(t,e){var i=this,n=e.easing,o=e.duration,s=e.delay,r=e.beginValue,a=e.endValue,l=e.onEnd,u=e.stackBehavior;this.setState(function(e){var c=e,d=void 0,p=void 0;if("string"===typeof t)d=t,p=t;else{for(var h=0;h<t.length-1;h++)c=c[t[h]];d=t[t.length-1],p=t.join("|")}var f={easing:n,duration:null==o?300:o,delay:null==s?0:s,beginValue:null==r?c[d]:r,endValue:a,onEnd:l,stackBehavior:u||"ADDITIVE"},g=e.tweenQueue;return f.stackBehavior===b.DESTRUCTIVE&&(g=e.tweenQueue.filter(function(t){return t.pathHash!==p})),g.push({pathHash:p,config:f,initTime:Date.now()+f.delay}),c[d]=f.endValue,1===g.length&&(i._rafID=m()(i._rafCb)),{tweenQueue:g}})}},{key:"getTweeningValue",value:function(t){var e=this.state,i=void 0,n=void 0;if("string"===typeof t)i=e[t],n=t;else{i=e;for(var o=0;o<t.length;o++)i=i[t[o]];n=t.join("|")}for(var s=Date.now(),r=0;r<e.tweenQueue.length;r++){var a=e.tweenQueue[r],l=a.pathHash,u=a.initTime,c=a.config;if(l===n){var d=s-u>c.duration?c.duration:Math.max(0,s-u);i+=(0===c.duration?c.endValue:c.easing(d,c.beginValue,c.endValue,c.duration))-c.endValue}}return i}},{key:"render",value:function(){var t=this,e=f.a.Children.count(this.props.children)>1?this.formatChildren(this.props.children):this.props.children;return f.a.createElement("div",{className:["slider",this.props.className||""].join(" "),ref:"slider",style:o()({},this.getSliderStyles(),this.props.style)},f.a.createElement("div",o()({className:"slider-frame",ref:"frame",style:this.getFrameStyles()},this.getTouchEvents(),this.getMouseEvents(),{onClick:this.handleClick}),f.a.createElement("ul",{className:"slider-list",ref:"list",style:this.getListStyles()},e)),this.props.decorators?this.props.decorators.map(function(e,i){return f.a.createElement("div",{style:o()({},t.getDecoratorStyles(e.position),e.style||{}),className:"slider-decorator-"+i,key:i},f.a.createElement(e.component,{currentSlide:t.state.currentSlide,slideCount:t.state.slideCount,frameWidth:t.state.frameWidth,slideWidth:t.state.slideWidth,slidesToScroll:t.state.slidesToScroll,cellSpacing:t.props.cellSpacing,slidesToShow:t.props.slidesToShow,wrapAround:t.props.wrapAround,nextSlide:t.nextSlide,previousSlide:t.previousSlide,goToSlide:t.goToSlide}))}):null,f.a.createElement("style",{type:"text/css",dangerouslySetInnerHTML:{__html:this.getStyleTagStyles()}}))}},{key:"getTouchEvents",value:function(){var t=this;return!1===this.props.swiping?null:{onTouchStart:function(e){t.touchObject={startX:e.touches[0].pageX,startY:e.touches[0].pageY},t.handleMouseOver()},onTouchMove:function(e){var i=t.swipeDirection(t.touchObject.startX,e.touches[0].pageX,t.touchObject.startY,e.touches[0].pageY);0!==i&&e.preventDefault();var n=t.props.vertical?Math.round(Math.sqrt(Math.pow(e.touches[0].pageY-t.touchObject.startY,2))):Math.round(Math.sqrt(Math.pow(e.touches[0].pageX-t.touchObject.startX,2)));t.touchObject={startX:t.touchObject.startX,startY:t.touchObject.startY,endX:e.touches[0].pageX,endY:e.touches[0].pageY,length:n,direction:i},t.setState({left:t.props.vertical?0:t.getTargetLeft(t.touchObject.length*t.touchObject.direction),top:t.props.vertical?t.getTargetLeft(t.touchObject.length*t.touchObject.direction):0})},onTouchEnd:function(e){t.handleSwipe(e),t.handleMouseOut()},onTouchCancel:function(e){t.handleSwipe(e)}}}},{key:"getMouseEvents",value:function(){var t=this;return!1===this.props.dragging?null:{onMouseOver:function(){t.handleMouseOver()},onMouseOut:function(){t.handleMouseOut()},onMouseDown:function(e){t.touchObject={startX:e.clientX,startY:e.clientY},t.setState({dragging:!0})},onMouseMove:function(e){if(t.state.dragging){var i=t.swipeDirection(t.touchObject.startX,e.clientX,t.touchObject.startY,e.clientY);0!==i&&e.preventDefault();var n=t.props.vertical?Math.round(Math.sqrt(Math.pow(e.clientY-t.touchObject.startY,2))):Math.round(Math.sqrt(Math.pow(e.clientX-t.touchObject.startX,2)));t.touchObject={startX:t.touchObject.startX,startY:t.touchObject.startY,endX:e.clientX,endY:e.clientY,length:n,direction:i},t.setState({left:t.props.vertical?0:t.getTargetLeft(t.touchObject.length*t.touchObject.direction),top:t.props.vertical?t.getTargetLeft(t.touchObject.length*t.touchObject.direction):0})}},onMouseUp:function(e){t.state.dragging&&t.handleSwipe(e)},onMouseLeave:function(e){t.state.dragging&&t.handleSwipe(e)}}}},{key:"handleMouseOver",value:function(){this.props.autoplay&&(this.autoplayPaused=!0,this.stopAutoplay())}},{key:"handleMouseOut",value:function(){this.props.autoplay&&this.autoplayPaused&&(this.startAutoplay(),this.autoplayPaused=null)}},{key:"handleSwipe",value:function(t){"undefined"!==typeof this.touchObject.length&&this.touchObject.length>44?this.clickSafe=!0:this.clickSafe=!1;var e=this.props,i=e.slidesToShow,n=e.slidesToScroll,o=e.swipeSpeed;"auto"===n&&(i=this.state.slidesToScroll),f.a.Children.count(this.props.children)>1&&this.touchObject.length>this.state.slideWidth/i/o?1===this.touchObject.direction?this.state.currentSlide>=f.a.Children.count(this.props.children)-i&&!this.props.wrapAround?this.animateSlide(this.props.edgeEasing):this.nextSlide():-1===this.touchObject.direction&&(this.state.currentSlide<=0&&!this.props.wrapAround?this.animateSlide(this.props.edgeEasing):this.previousSlide()):this.goToSlide(this.state.currentSlide),this.touchObject={},this.setState({dragging:!1})}},{key:"swipeDirection",value:function(t,e,i,n){var o=t-e,s=i-n,r=Math.atan2(s,o),a=Math.round(180*r/Math.PI);return a<0&&(a=360-Math.abs(a)),a<=45&&a>=0?1:a<=360&&a>=315?1:a>=135&&a<=225?-1:!0===this.props.vertical?a>=35&&a<=135?1:-1:0}},{key:"startAutoplay",value:function(){f.a.Children.count(this.props.children)<=1||(this.autoplayID=setInterval(this.autoplayIterator,this.props.autoplayInterval))}},{key:"resetAutoplay",value:function(){this.props.resetAutoplay&&this.props.autoplay&&!this.autoplayPaused&&(this.stopAutoplay(),this.startAutoplay())}},{key:"stopAutoplay",value:function(){this.autoplayID&&clearInterval(this.autoplayID)}},{key:"animateSlide",value:function(t,e,i,n){this.tweenState(this.props.vertical?"top":"left",{easing:t||this.props.easing,duration:e||this.props.speed,endValue:i||this.getTargetLeft(),delay:null,beginValue:null,onEnd:n||null,stackBehavior:b})}},{key:"getTargetLeft",value:function(t,e){var i=void 0,n=e||this.state.currentSlide,o=this.props.cellSpacing;switch(this.props.cellAlign){case"left":i=0,i-=o*n;break;case"center":i=(this.state.frameWidth-this.state.slideWidth)/2,i-=o*n;break;case"right":i=this.state.frameWidth-this.state.slideWidth,i-=o*n}var s=this.state.slideWidth*n;return this.state.currentSlide>0&&n+this.state.slidesToScroll>=this.state.slideCount&&1!==this.props.slideWidth&&!this.props.wrapAround&&"auto"===this.props.slidesToScroll&&(s=this.state.slideWidth*this.state.slideCount-this.state.frameWidth,i=0,i-=o*(this.state.slideCount-1)),-1*(s-(i-=t||0))}},{key:"bindEvents",value:function(){S.a.canUseDOM&&(w(window,"resize",this.onResize),w(document,"readystatechange",this.onReadyStateChange))}},{key:"unbindEvents",value:function(){S.a.canUseDOM&&(T(window,"resize",this.onResize),T(document,"readystatechange",this.onReadyStateChange))}},{key:"formatChildren",value:function(t){var e=this,i=this.props.vertical?this.getTweeningValue("top"):this.getTweeningValue("left");return f.a.Children.map(t,function(t,n){return f.a.createElement("li",{className:"slider-slide",style:e.getSlideStyles(n,i),key:n},t)})}},{key:"setInitialDimensions",value:function(){var t=this,e=this.props,i=e.vertical,n=e.initialSlideHeight,o=e.initialSlideWidth,s=e.slidesToShow,r=e.cellSpacing,a=e.children,l=i?n||0:o||0,u=n?n*s:0,c=u+r*(s-1);this.setState({slideHeight:u,frameWidth:i?c:"100%",slideCount:f.a.Children.count(a),slideWidth:l},function(){t.setLeft(),t.setExternalData()})}},{key:"setDimensions",value:function(t){var e,i,n=this,o=void 0,s=void 0,r=(t=t||this.props).slidesToScroll,a=this.refs.frame,l=a.childNodes[0].childNodes[0];l?(l.style.height="auto",o=this.props.vertical?l.offsetHeight*t.slidesToShow:l.offsetHeight):o=100,s="number"!==typeof t.slideWidth?parseInt(t.slideWidth,10):t.vertical?o/t.slidesToShow*t.slideWidth:a.offsetWidth/t.slidesToShow*t.slideWidth,t.vertical||(s-=t.cellSpacing*((100-100/t.slidesToShow)/100)),i=o+t.cellSpacing*(t.slidesToShow-1),e=t.vertical?i:a.offsetWidth,"auto"===t.slidesToScroll&&(r=Math.floor(e/(s+t.cellSpacing))),this.setState({slideHeight:o,frameWidth:e,slideWidth:s,slidesToScroll:r,left:t.vertical?0:this.getTargetLeft(),top:t.vertical?this.getTargetLeft():0},function(){n.setLeft()})}},{key:"setLeft",value:function(){this.setState({left:this.props.vertical?0:this.getTargetLeft(),top:this.props.vertical?this.getTargetLeft():0})}},{key:"setExternalData",value:function(){this.props.data&&this.props.data()}},{key:"getListStyles",value:function(){var t=this.state.slideWidth*f.a.Children.count(this.props.children),e=this.props.cellSpacing,i=e*f.a.Children.count(this.props.children),n="translate3d("+this.getTweeningValue("left")+"px, "+this.getTweeningValue("top")+"px, 0)";return{transform:n,WebkitTransform:n,msTransform:"translate("+this.getTweeningValue("left")+"px, "+this.getTweeningValue("top")+"px)",position:"relative",display:"block",margin:this.props.vertical?e/2*-1+"px 0px":"0px "+e/2*-1+"px",padding:0,height:this.props.vertical?t+i:this.state.slideHeight,width:this.props.vertical?"auto":t+i,cursor:!0===this.state.dragging?"pointer":"inherit",boxSizing:"border-box",MozBoxSizing:"border-box"}}},{key:"getFrameStyles",value:function(){return{position:"relative",display:"block",overflow:this.props.frameOverflow,height:this.props.vertical?this.state.frameWidth||"initial":"auto",margin:this.props.framePadding,padding:0,transform:"translate3d(0, 0, 0)",WebkitTransform:"translate3d(0, 0, 0)",msTransform:"translate(0, 0)",boxSizing:"border-box",MozBoxSizing:"border-box"}}},{key:"getSlideStyles",value:function(t,e){var i=this.getSlideTargetPosition(t,e),n=this.props.cellSpacing;return{position:"absolute",left:this.props.vertical?0:i,top:this.props.vertical?i:0,display:this.props.vertical?"block":"inline-block",listStyleType:"none",verticalAlign:"top",width:this.props.vertical?"100%":this.state.slideWidth,height:"auto",boxSizing:"border-box",MozBoxSizing:"border-box",marginLeft:this.props.vertical?"auto":n/2,marginRight:this.props.vertical?"auto":n/2,marginTop:this.props.vertical?n/2:"auto",marginBottom:this.props.vertical?n/2:"auto"}}},{key:"getSlideTargetPosition",value:function(t,e){var i=this.state.frameWidth/this.state.slideWidth,n=(this.state.slideWidth+this.props.cellSpacing)*t,o=(this.state.slideWidth+this.props.cellSpacing)*i*-1;if(this.props.wrapAround){var s=Math.ceil(e/this.state.slideWidth);if(this.state.slideCount-s<=t)return(this.state.slideWidth+this.props.cellSpacing)*(this.state.slideCount-t)*-1;var r=Math.ceil((Math.abs(e)-Math.abs(o))/this.state.slideWidth);if(1!==this.state.slideWidth&&(r=Math.ceil((Math.abs(e)-this.state.slideWidth)/this.state.slideWidth)),t<=r-1)return(this.state.slideWidth+this.props.cellSpacing)*(this.state.slideCount+t)}return n}},{key:"getSliderStyles",value:function(){return{position:"relative",display:"block",width:this.props.width,height:"auto",boxSizing:"border-box",MozBoxSizing:"border-box",visibility:this.state.slideWidth?"visible":"hidden"}}},{key:"getStyleTagStyles",value:function(){return".slider-slide > img {width: 100%; display: block;}"}},{key:"getDecoratorStyles",value:function(t){switch(t){case"TopLeft":return{position:"absolute",top:0,left:0};case"TopCenter":return{position:"absolute",top:0,left:"50%",transform:"translateX(-50%)",WebkitTransform:"translateX(-50%)",msTransform:"translateX(-50%)"};case"TopRight":return{position:"absolute",top:0,right:0};case"CenterLeft":return{position:"absolute",top:"50%",left:0,transform:"translateY(-50%)",WebkitTransform:"translateY(-50%)",msTransform:"translateY(-50%)"};case"CenterCenter":return{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",WebkitTransform:"translate(-50%, -50%)",msTransform:"translate(-50%, -50%)"};case"CenterRight":return{position:"absolute",top:"50%",right:0,transform:"translateY(-50%)",WebkitTransform:"translateY(-50%)",msTransform:"translateY(-50%)"};case"BottomLeft":return{position:"absolute",bottom:0,left:0};case"BottomCenter":return{position:"absolute",bottom:0,width:"100%",textAlign:"center"};case"BottomRight":return{position:"absolute",bottom:0,right:0};default:return{position:"absolute",top:0,left:0}}}}]),e}(f.a.Component);k.defaultProps={afterSlide:function(){},autoplay:!1,resetAutoplay:!0,swipeSpeed:12,autoplayInterval:3e3,beforeSlide:function(){},cellAlign:"left",cellSpacing:0,data:function(){},decorators:g,dragging:!0,easing:function(t,e,i,n){return(i-e)*Math.sqrt(1-(t=t/n-1)*t)+e},edgeEasing:function(t,e,i,n){return(i-e)*t/n+e},framePadding:"0px",frameOverflow:"hidden",slideIndex:0,slidesToScroll:1,slidesToShow:1,slideWidth:1,speed:500,swiping:!0,vertical:!1,width:"100%",wrapAround:!1,style:{}};var C=k;i.d(e,"default",function(){return C})}}]);
//# sourceMappingURL=31.804baf53.chunk.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{1158:function(a,t,e){"use strict";e.r(t);var s=e(24),i=(e(44),e(14)),n=e.n(i),r=e(7),c=e(8),l=e(11),o=e(9),m=e(10),u=e(0),d=e.n(u),g=(e(890),e(33)),h=e(4),p=e(16),b=e(52),E=e(664),v=e(154),f=e(624),j=e(23),N=e(20),y=function(a){function t(a){var i;return Object(r.a)(this,t),(i=Object(l.a)(this,Object(o.a)(t).call(this,a))).getBargainInfo=function(){h.c.get("".concat(API.home,"/m/bargain/info?bargaincode=").concat(Object(h.b)("bargaincode"),"&is_originator=").concat(Object(h.b)("is_originator"))).then(function(a){200===a.data.code?i.setState({data:a.data.data,isOriginator:a.data.data.is_originator,originatorUid:a.data.data.originator_uid,limitPeople:a.data.data.course.limit_people,bargainData:a.data.data.bargain,width:100*(a.data.data.bargain.bargain_price/a.data.data.bargain.total_price).toFixed(2)+"%"},function(){if(i.state.bargainData.expire_time){var a=1e3*i.state.bargainData.expire_time,t=Date.now();clearInterval(i.timer),i.timer=setInterval(function(){var e=new Date(a-=1e3),s=Object(v.differenceInSeconds)(e,t)%60,n=Object(v.differenceInMinutes)(e,t)%60,r=Object(v.differenceInHours)(e,t)%24,c=Object(v.differenceInDays)(e,t)%24;i.setState({hour:r,min:n,sec:s,day:c})},1e3)}}):n.a.info(a.data.msg,2)})},i.getBargainCourse=function(){h.c.get("".concat(API.home,"/m/bargain/courseList")).then(function(a){200===a.data.code?i.setState({courseList:a.data.data}):n.a.info(a.data.msg,2)})},i.getBargainRankList=function(a,t){var e={courseId:a,type:t};h.c.post("".concat(API.home,"/m/bargain/rankList"),e).then(function(a){if(200===a.data.code){var t=["\u5200\u795e","\u5200\u738b","\u5200\u9738"],e=a.data.data.out_list.map(function(a,e){return Object(s.a)({},a,{rank:t[e]})});i.setState({list:a.data.data.list,outList:e})}else n.a.info(a.data.msg,2)})},i.toCart=function(){var a={course_id:Object(h.b)("id")};h.c.post("".concat(API.home,"/m/cart/add"),a).then(function(a){200===a.data.code||15001===a.data.code?i.props.history.push("/shopcart"):n.a.info(a.data.msg,2)})},i.getMore=function(){i.setState({isShowMore:!0})},i.boxHide=function(a){i.setState({isShowMore:a})},i.toArtifact=function(){var a={courseId:Object(h.b)("id")};h.c.post("".concat(API.home,"/m/bargain/receiveLimit"),a).then(function(a){200===a.data.code?i.setState({isShowOverlay:!0,status:5}):n.a.info(a.data.msg,2)})},i.useArtifact=function(){i.toKanjia(Object(h.b)("id"),2,0)},i.toKanjia=function(a,t,e){var s={course_id:a,type:t,parent_uid:e};h.c.post("".concat(API.home,"/m/bargain/toBargain"),s).then(function(a){200===a.data.code?(i.setState({amount:a.data.data.amount}),2===t&&i.setState({isShowOverlay:!0,status:6}),1===a.data.data.is_success?i.setState({isShowOverlay:!0,status:4}):2===a.data.data.is_success?3===t?i.setState({isShowOverlay:!0,status:2}):4===t&&i.setState({isShowOverlay:!0,status:1,firendBaigainPrice:!1}):0===a.data.data.is_success&&(3===t?i.setState({isShowOverlay:!0,status:2}):4===t&&i.setState({isShowOverlay:!0,status:3})),i.getBargainInfo()):n.a.info(a.data.msg,2)})},i.friendBargainFirst=function(){i.toKanjia(Object(h.b)("id"),3,i.state.originatorUid)},i.friendBargainSecond=function(){i.toKanjia(Object(h.b)("id"),4,i.state.originatorUid)},i.shareFriendBargain=function(){i.setState({isShowOverlay:!0,status:7,isshowYindao:!!h.a.isWeixin})},i.close=function(){i.setState({isShowOverlay:!1,status:""})},i.state={isShowOverlay:!1,isOriginator:"",kanjiaIcon:e(623),courseList:[],data:"",bargainData:"",limitPeople:0,outList:[],list:[],width:"0",isShowMore:"",status:"",hour:"",min:"",sec:"",day:"",amount:"",firendBaigainPrice:!0,isshowYindao:!1,isLoaidng:!0},i}return Object(m.a)(t,a),Object(c.a)(t,[{key:"componentDidMount",value:function(){this.getBargainRankList(Object(h.b)("id"),1),this.getBargainCourse(),this.getBargainInfo()}},{key:"render",value:function(){var a,t,e,s=this;return 0===this.state.bargainData.is_artifact?a=d.a.createElement("div",null,"\u518d\u9080\u8bf7",d.a.createElement("span",{className:"indicator"},this.state.bargainData.invite_num),"\u4f4d\u597d\u53cb\u52a9\u529b\u5373\u53ef\u83b7\u5f97",d.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")):1===this.state.bargainData.is_artifact?(a=d.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",d.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),t=d.a.createElement("button",{className:"artifact-btn",onClick:this.toArtifact},"\u7acb\u5373\u9886\u53d6")):2===this.state.bargainData.is_artifact&&(a=d.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",d.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),t=d.a.createElement("button",{className:"artifact-btn",onClick:this.useArtifact},"\u7acb\u5373\u4f7f\u7528")),1!==this.state.isOriginator&&0===this.state.data.assist_status&&0===this.state.data.bargain_status?e=d.a.createElement("button",{className:"active-btn",onClick:this.friendBargainFirst},"\u5e2e\u597d\u53cb\u780d\u4e00\u5200"):1!==this.state.isOriginator&&1===this.state.data.assist_status?e=d.a.createElement("button",{className:"active-btn",onClick:this.friendBargainSecond},"\u518d\u780d\u4e00\u5200"):1!==this.state.isOriginator&&2===this.state.data.assist_status?e=d.a.createElement("button",{className:"invalid-btn"},"\u5df2\u5e2e\u597d\u53cb\u52a9\u529b"):1===this.state.data.bargain_status||2===this.state.data.bargain_status?e=d.a.createElement("button",{className:"invalid-btn"},"\u780d\u4ef7\u7ed3\u675f"):1===this.state.isOriginator&&0===this.state.data.bargain_status&&(e=d.a.createElement("button",{className:"active-btn",onClick:this.shareFriendBargain},"\u9080\u8bf7\u597d\u53cb\u780d\u4ef7")),d.a.createElement("div",{className:"bargain-middle-page"},d.a.createElement(g.e,{title:"\u780d\u4ef7\u8be6\u60c5",arrow:!0,cart:!0}),d.a.createElement("div",{className:"top"},d.a.createElement("div",{className:"bargain-area"},1!==this.state.isOriginator&&d.a.createElement("p",{className:"bargain-tip"},"\u4f60\u7684\u597d\u53cb\u53d1\u73b0\u4e00\u95e8\u7cbe\u54c1\u8bfe\u7a0b\uff0c\u5feb\u6765\u4e00\u8d77\u5e2e\u4ed6\u780d\u4ef7\uff1a"),d.a.createElement("ul",null,d.a.createElement(g.i,{info:d.a.createElement(S,{isOriginator:this.state.isOriginator,data:this.state.data,toCart:this.toCart})})),d.a.createElement("div",{className:"bargain-detail"},d.a.createElement("div",{className:"top"},d.a.createElement("div",null,"\u5df2\u780d",d.a.createElement("span",{className:"reduced-price"},this.state.bargainData.bargain_price,"\u5143")),0===this.state.data.bargain_status&&d.a.createElement("div",null,d.a.createElement("span",{className:"time hour"},String(this.state.hour).padStart(2,0))," :\xa0",d.a.createElement("span",{className:"time min"},String(this.state.min).padStart(2,0))," :\xa0",d.a.createElement("span",{className:"time sec"},String(this.state.sec).padStart(2,0)),d.a.createElement("span",{className:"inactive"}," \u540e\u780d\u4ef7\u7ed3\u675f")),1===this.state.data.bargain_status&&1===this.state.isOriginator&&d.a.createElement("span",{className:"inactive"},"\u780d\u4ef7\u7ed3\u675f")),d.a.createElement("div",{className:"middle"},d.a.createElement("span",{style:{width:this.state.width}})),1===this.state.isOriginator&&0===this.state.data.bargain_status&&d.a.createElement("div",null,a,t),1===this.state.isOriginator&&1===this.state.data.bargain_status&&d.a.createElement("div",null,"\u780d\u4ef7\u91d1\u989d\u5c06\u4e8e",d.a.createElement("span",{className:"time hour"},String(this.state.day).padStart(2,0)),d.a.createElement("span",{className:"unit"}," \u5929 "),d.a.createElement("span",{className:"time min"},String(this.state.hour).padStart(2,0)),d.a.createElement("span",{className:"unit"}," \u65f6 "),d.a.createElement("span",{className:"time sec"},String(this.state.min).padStart(2,0)),d.a.createElement("span",{className:"unit"},"\u5206"),"\u540e\u6e05\u96f6\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u652f\u4ed8"),d.a.createElement("div",{className:"button"},e))),d.a.createElement("div",{className:"bargain-records"},d.a.createElement("div",{className:"title"},"\u780d\u4ef7\u8bb0\u5f55"),d.a.createElement("ul",null,this.state.outList&&this.state.outList.length>0&&this.state.outList.map(function(a,t){return d.a.createElement("li",{key:t},d.a.createElement("div",{className:"left"},d.a.createElement("img",{className:"avatar",src:a.avatar_file,alt:""}),d.a.createElement("span",{className:"nickname"},a.user_name),d.a.createElement("span",{className:"rank-tag"},a.rank)),d.a.createElement("div",{className:"right"},d.a.createElement("img",{className:"kanjia-icon",src:s.state.kanjiaIcon,alt:""}),"\u780d\u6389",d.a.createElement("span",{className:"price"},a.amount)))})),d.a.createElement("div",{className:"more",onClick:this.getMore},"\u67e5\u770b\u66f4\u591a>>"))),d.a.createElement("div",{className:"bargain-course-list",id:"bargainCourse"},d.a.createElement("div",{className:"title-wrapper"},d.a.createElement("div",{className:"title"},"\u6211\u8981\u780d\u4ef7"),d.a.createElement("div",{className:"subtitle"},"\u9080\u8bf7",this.state.limitPeople,"\u4f4d\u4ee5\u4e0a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011")),d.a.createElement("ul",null,this.state.courseList&&this.state.courseList.length>0&&this.state.courseList.map(function(a,t){return d.a.createElement(g.d,{className:"text-overflow-2",key:t,id:a.course_id,img:a.image_name,title:a.course_title,bottom:d.a.createElement(A,{item:a,toCart:s.toCart})})}))),d.a.createElement(p.b,{to:"/preferential",className:"preferential"},"\u67e5\u770b\u66f4\u591a\u7cbe\u54c1\u8bfe\u7a0b >>"),d.a.createElement(E.a,{list:this.state.list,icon:this.state.kanjiaIcon,limitPeople:this.state.limitPeople,isShowMore:this.state.isShowMore,boxHide:this.boxHide}),this.state.isShowOverlay&&d.a.createElement(f.a,null,7===this.state.status&&d.a.createElement(L,{isshowYindao:this.state.isshowYindao,limitPeople:this.state.limitPeople,close:this.close}),1===this.state.status&&d.a.createElement(k,{money:this.state.amount,avatar:this.props.user.data.avatar,firendBaigainPrice:this.state.firendBaigainPrice}),2===this.state.status&&d.a.createElement(C,{bargainSecond:this.friendBargainSecond,money:this.state.amount}),3===this.state.status&&d.a.createElement(B,{close:this.close,money:this.state.amount}),4===this.state.status&&d.a.createElement(U,{close:this.close,limitPeople:this.state.limitPeople}),5===this.state.status&&d.a.createElement(w,{useArtifact:this.useArtifact}),6===this.state.status&&d.a.createElement(O,{toCart:this.toCart,money:this.state.amount,allMoney:this.state.bargainData.bargain_price}),7!==this.state.status&&d.a.createElement("i",{onClick:this.close,className:"iconfont iconiconfront-2 bargain-close"})))}}]),t}(u.Component);function S(a){var t=a.data&&a.data.course;return d.a.createElement("div",{className:"des"},d.a.createElement("div",{className:"course-title text-overflow-2"},t.course_title),d.a.createElement("div",{className:"price-bar"},d.a.createElement("span",{className:"discount-price"},"\uffe5",t.course_price),1===a.isOriginator&&d.a.createElement("button",{className:"purchase-btn",onClick:a.toCart},"\xa5",t.pay_price,"\u53bb\u652f\u4ed8")))}function A(a){var t;return t=2===a.item.bargain_status?d.a.createElement(p.b,{to:"/detail?id=".concat(a.item.course_id),className:"bargain"},"\u6211\u8981\u780d\u4ef7"):3===a.item.bargain_status?d.a.createElement(p.b,{to:"/play?id=".concat(a.item.course_id),className:"bargain"},"\u53bb\u5b66\u4e60"):d.a.createElement("div",{className:"btns"},1===a.item.bargain_status&&d.a.createElement("button",{className:"invalid"},"\u780d\u4ef7\u7ed3\u675f"),0===a.item.bargain_status&&d.a.createElement(p.b,{to:"/detail?id=".concat(a.item.course_id),className:"bargain-btn"},"\u7ee7\u7eed\u780d\u4ef7"),d.a.createElement("button",{onClick:a.toCart,className:"purchase-btn"},"\xa5",a.item.pay_price,"\u53bb\u652f\u4ed8")),d.a.createElement("div",{className:"course-bottom"},d.a.createElement("div",{className:"course-price"},d.a.createElement("span",{className:"discount-price"},"\xa5",a.item.price1),d.a.createElement("span",{className:"original-price"},"\xa5",a.item.price0)),t)}function k(a){return d.a.createElement("div",{className:"bargain-public-number"},d.a.createElement("img",{className:"avait",src:a.avatar,alt:""}),a.firendBaigainPrice&&d.a.createElement("p",{className:"status-title ff4"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",a.money,"\u5143\uff01"),d.a.createElement("p",{className:"status-dec"},"\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u53ef\u4ee5\u518d\u780d\u4e00\u5200\u54e6~"),d.a.createElement("img",{className:"public-number-img",src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png",alt:""}))}function C(a){return d.a.createElement("div",{className:"bargain-first"},d.a.createElement("img",{className:"top-img",src:e(667),alt:""}),d.a.createElement("p",{className:"status-title"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",d.a.createElement("span",{className:"ff4"},a.money,"\u5143"),"\uff01"),d.a.createElement("p",{className:"status-dec"},"\u4f60\u8fd8\u53ef\u4ee5\u5e2e\u6211\u518d\u780d\u4e00\u5200\u54e6~"),d.a.createElement("button",{className:"bargain-href",onClick:a.bargainSecond},"\u518d\u780d\u4e00\u5200"))}function B(a){return d.a.createElement("div",{className:"bargain-second"},d.a.createElement("img",{className:"top-img",src:e(667),alt:""}),d.a.createElement("p",{className:"status-title"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u5e2e\u597d\u53cb\u780d\u6389",d.a.createElement("span",{className:"ff4"},a.money,"\u5143"),"\uff01"),d.a.createElement("a",{className:"bargain-href",href:"#bargainCourse",onClick:a.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function U(a){return d.a.createElement("div",{className:"not-bargain"},d.a.createElement("img",{className:"middle-img",src:e(891),alt:""}),d.a.createElement("p",{className:"status-title"},"\u4f60\u7684\u597d\u53cb\u7528\u3010\u780d\u4ef7\u795e\u5668\u3011\u628a\u6211\u780d\u8499\u5708\u4e86",d.a.createElement("br",null),"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),d.a.createElement("p",{className:"status-dec"},"\u9080\u8bf7",a.limitPeople,"\u4f4d\u4ee5\u4e0a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011"),d.a.createElement("a",{className:"bargain-href",href:"#bargainCourse",onClick:a.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function w(a){return d.a.createElement("div",{className:"artifact-box"},d.a.createElement("p",{className:"top-tip"},"\u606d\u559c\u4f60\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011\uff01"),d.a.createElement("p",{className:"middle-tip"},"\u60a8\u53ef\u4ee5\u4f7f\u7528",d.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u518d\u780d\u4e00\u5200"),d.a.createElement("button",{className:"use-artifact",onClick:a.useArtifact},"\u7acb\u5373\u4f7f\u7528"))}function O(a){return d.a.createElement("div",{className:"use-artifact-box"},d.a.createElement("img",{className:"top-img",src:e(667),alt:""}),d.a.createElement("p",{className:"top-tip"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u780d\u6389\u4e86",a.money,"\u5143\uff01"),d.a.createElement("p",{className:"middle-tip"},"\u4f60\u5df2\u7ecf\u780d\u4e86",d.a.createElement("span",{className:"indicator"},a.allMoney,"\u5143"),"\u6ca1\u89c1\u8fc7\u4f60\u8fd9\u4e48\u80fd\u780d\u7684\u4eba..."),d.a.createElement("p",{className:"btm-tip"},"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),d.a.createElement("button",{className:"tubuy",onClick:a.toCart},"\u53bb\u652f\u4ed8"))}function L(a){return d.a.createElement("div",null,d.a.createElement("div",{className:"close-bargain-success",onClick:a.close}),d.a.createElement("div",{className:"bargain-success"},a.isshowYindao&&d.a.createElement("i",{className:"iconfont iconyindao"}),d.a.createElement("p",null,"\u5206\u4eab\u5230\u5fae\u4fe1\u7fa4\u9080\u8bf7\u66f4\u591a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7"),d.a.createElement("p",null,"\u8d85\u8fc7",a.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97",d.a.createElement("span",{className:"indicator",style:{color:"#FF4000"}},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u54e6")))}t.default=Object(j.d)(Object(N.b)(function(a){return{user:a.user}},null),b.g)(y)},623:function(a,t){a.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAA51BMVEUAAAD3yyr4zCr60jD61DT4zSz4zi360C770jL93jn94UH3yin4yyz4ziz4zi34zS361TX50i/50jD61DP72Dj61jP+4kH+4ED4zCv3zCz4zSz4zS350jL61jb61jT6zir50DH83Dz71DP83Dj+5ET2zDD50C77zyj93j/930H82zv3yir3yCj/6072xib3yyv/6kz2xiT/7lD/8FL2wyL2xCP/8VT/7E//8lb83T74zS32wiH/81b/6Er71zj94kT72zz50zP+5kj84EH/9Vj+5Uf61TX50TH83j/4zy//9Ff3xyb0vBpXStORAAAAK3RSTlMA8+yrk9q7gTsdBPfnysGyoJ+IhWhMFg3w5d7QvKSbmI9eWich+nxTRjARluH5lgAAAm5JREFUOMt1lddi4jAQRYVp6b1vspvdZKvG6pI7NjWQ7P9/T7BFQBBzXnjw0YyvxhJonZ1fzcODRuPgsNndQVvZPW9DCca4/Lk7e6rV/rUwIdiBcNy6+uz98DjgDYDffN/0WsTR3Kpf171j13MB3Vn38Fb0/cr7BpsdgeIl6uTD++16FDQhMQanu1okuv4JjpbAkMZm4JoEX9vGxFmNJ9Eoy1KGyeodaPJQelfUWZz0RpIJIYeEa0WAx7RaDrtz8Yw4TWIh/JIgm0b5hOayp6s8rbnoOQV5njK/QozGLJ+lr0NeFbhBaMeNzPsi8C1hL+E9IwcAlfkHdcGdbWSsxoTpFy+FEZlNoM/RsStC5NuKwYD1BybzBbMiv0df3NaQTM1H45hJwURmN/StjTx3KupFBkIGzJfFbFIWN2NSieCh/bURMynHPSl8EfmSlZULZR81UMMRk2nqh5P/UeiznJUvK8SMf4ie07hvAjPmhA8My6rs6VBji+eEIYTJQL5omvRNFZ6ZAMgi5R1qLieoopCFQ1Xu0kBW0UWs6aLIEeqSZWITCEF5uaQIfV+mWayW3c7sCG1jw8IiqeYwGYWSFW+cLsXL5UehpimTzL4TxMOoDwpWXmMPoUeySCzm81DUfudcu6ec6vLQ7gLYrWZm7Dx1AXhGc044xjpKWbU1dR5VTXu4MGCdj9hrrnEtBK4W1w7BfCZefcrrG6sLtOCUUB73KKe1om1sOQJMFKn39CFy6BBcD/CjPeRyuuXa0w9og4v9zyro/YuaG/wUr6uEw8kzquPp8dbe9fayv239RdvYu+x22vO/D6/dOb9cD/EONO7gZ+bVU9IAAAAASUVORK5CYII="},624:function(a,t,e){"use strict";var s=e(7),i=e(8),n=e(11),r=e(9),c=e(10),l=e(0),o=e.n(l),m=e(21),u=e.n(m),d=(e(666),document.body||document.documentElement),g=["touchmove","mousewheel"],h=function(a){function t(a){var e;return Object(s.a)(this,t),(e=Object(n.a)(this,Object(r.a)(t).call(this,a))).preventScroll=function(a){a.preventDefault()},e.overlayBox=null,e}return Object(c.a)(t,a),Object(i.a)(t,[{key:"componentDidMount",value:function(){var a=this;g.forEach(function(t){a.overlayBox.addEventListener(t,a.preventScroll,{passive:!1})})}},{key:"componentWillUnmount",value:function(){var a=this;g.forEach(function(t){a.overlayBox.removeEventListener(t,a.preventScroll)})}},{key:"render",value:function(){var a=this;return u.a.createPortal(o.a.createElement("div",{className:"overlay",ref:function(t){return a.overlayBox=t},style:{top:"".concat(window.scrollY,"px")}},this.props.children),d)}}]),t}(l.Component);t.a=h},664:function(a,t,e){"use strict";var s=e(7),i=e(8),n=e(11),r=e(9),c=e(10),l=e(0),o=e.n(l),m=(e(665),function(a){function t(a){var i;return Object(s.a)(this,t),(i=Object(n.a)(this,Object(r.a)(t).call(this,a))).closeMore=function(){i.props.boxHide(!1)},i.state={kanjiaIcon:e(623)},i}return Object(c.a)(t,a),Object(i.a)(t,[{key:"render",value:function(){return o.a.createElement("div",{className:"ranking-box"},this.props.isShowMore&&o.a.createElement(u,{list:this.props.list,limitPeople:this.props.limitPeople,closeMore:this.closeMore,img:this.props.icon}))}}]),t}(l.Component));function u(a){return o.a.createElement("div",{className:"moreMbc"},o.a.createElement("div",{className:"content"},o.a.createElement("div",{className:"title-box"},"\u597d\u53cb\u52a9\u529b\u8be6\u60c5"),o.a.createElement("ul",{className:"more-bargain-list"},a.list&&a.list.length>0&&a.list.map(function(t,e){return o.a.createElement("li",{key:e,className:"bargain-item"},o.a.createElement("img",{className:"avatar",src:t.avatar_file,alt:""}),o.a.createElement("p",{className:"name"},t.user_name),o.a.createElement("p",{className:"bargain-status"},o.a.createElement("img",{className:"kanjia-icon",src:a.img,alt:""}),"\u780d\u6389",o.a.createElement("span",{className:"price"},t.amount)))})),o.a.createElement("div",{className:"more-bargain-dec"},"\u8d85\u8fc7",a.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011")),o.a.createElement("i",{onClick:a.closeMore,className:"iconfont iconiconfront-2 close"}))}t.a=m},665:function(a,t,e){},666:function(a,t,e){},667:function(a,t,e){a.exports=e.p+"static/media/kanjia_cg_icon.81a489ac.png"},890:function(a,t,e){},891:function(a,t){a.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGUAAABmCAMAAADlNq9TAAACSVBMVEUAAABeTUZoSDp2QytSUlL/1jRSUlJhTEL/1jRSUlJ2QytVUE780jP/1jRSUlL/1jT/1jR1QyxSUlJSUlJ2Qyv/1jRmSj3/1jR2QytSUlL/1jR3RCv/1jT/1jT/1jT/1jRcTkj/1jSPXS3/1jT/1jT/1jT/1jR1QytSUlJ2QytS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HvxmG/uiDVEz3gnfKxNP6KzwcMws4dzIom2/AS/mApgcPRSZsaW7WZVF2eEvz1bqZ0VBKIrj+NkILhLdSBBpROZKhtoV7QyKmHmKw8GW81AudJfaX4Ji6MlmIqaUbveY9Vnd3ZffWdxwtduHWIoKAh3knY50FpfqdEHAQ9Yqo4toj7wpCDT4CF1lJ2Q1Kl0sjOhmO0dWG+4YyIkp7wdZLbjTYqdklLfhx5gVKjsq2iPHrnCx+DIhTdJIcjJmCygotyWidB2crc/vI3J8uKeiXER0CP4lREtkdEBghnJESXCT8pURCBjclk2Qs8jYig4iDkotD0FeEnMHq4GIr6BMvChU1jv2sxTro8yqWFmE7BQxzUOJ+XcRylnwiDHGd3HgsZqK7/GhgYyr4Bv0gWFMX+40TOAZvSG+YKhrUIpmOx2sRrU0KE8b9CfK04mZD0/TvqzupNz1FM9xzTZU1/YH9qfu9prOSPXG9Tr+UerDsaeOnGbP1S3bbNXggV9XIWYP5SLNCwAAAABJRU5ErkJggg=="}}]);
//# sourceMappingURL=BargainMiddlePage.9a184cbd.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{1158:function(a,t,e){"use strict";e.r(t);var s=e(24),i=(e(44),e(14)),n=e.n(i),r=e(7),c=e(8),l=e(11),o=e(9),m=e(10),u=e(0),d=e.n(u),g=(e(890),e(30)),h=e(4),p=e(16),b=e(52),E=e(664),v=e(154),f=e(624),j=e(23),N=e(20),y=function(a){function t(a){var i;return Object(r.a)(this,t),(i=Object(l.a)(this,Object(o.a)(t).call(this,a))).getBargainInfo=function(){h.c.get("".concat(API.home,"/m/bargain/info?bargaincode=").concat(Object(h.b)("bargaincode"),"&is_originator=").concat(Object(h.b)("is_originator"))).then(function(a){200===a.data.code?i.setState({data:a.data.data,isOriginator:a.data.data.is_originator,originatorUid:a.data.data.originator_uid,limitPeople:a.data.data.course.limit_people,bargainData:a.data.data.bargain,width:100*(a.data.data.bargain.bargain_price/a.data.data.bargain.total_price).toFixed(2)+"%"},function(){if(i.state.bargainData.expire_time){var a=1e3*i.state.bargainData.expire_time,t=Date.now();clearInterval(i.timer),i.timer=setInterval(function(){var e=new Date(a-=1e3),s=Object(v.differenceInSeconds)(e,t)%60,n=Object(v.differenceInMinutes)(e,t)%60,r=Object(v.differenceInHours)(e,t)%24,c=Object(v.differenceInDays)(e,t)%24;i.setState({hour:r,min:n,sec:s,day:c})},1e3)}}):n.a.info(a.data.msg,2)})},i.getBargainCourse=function(){h.c.get("".concat(API.home,"/m/bargain/courseList")).then(function(a){200===a.data.code?i.setState({courseList:a.data.data}):n.a.info(a.data.msg,2)})},i.getBargainRankList=function(a,t){var e={courseId:a,type:t};h.c.post("".concat(API.home,"/m/bargain/rankList"),e).then(function(a){if(200===a.data.code){var t=["\u5200\u795e","\u5200\u738b","\u5200\u9738"],e=a.data.data.out_list.map(function(a,e){return Object(s.a)({},a,{rank:t[e]})});i.setState({list:a.data.data.list,outList:e})}else n.a.info(a.data.msg,2)})},i.toCart=function(){var a={course_id:Object(h.b)("id")};h.c.post("".concat(API.home,"/m/cart/add"),a).then(function(a){200===a.data.code||15001===a.data.code?i.props.history.push("/shopcart"):n.a.info(a.data.msg,2)})},i.getMore=function(){i.setState({isShowMore:!0})},i.boxHide=function(a){i.setState({isShowMore:a})},i.toArtifact=function(){var a={courseId:Object(h.b)("id")};h.c.post("".concat(API.home,"/m/bargain/receiveLimit"),a).then(function(a){200===a.data.code?i.setState({isShowOverlay:!0,status:5}):n.a.info(a.data.msg,2)})},i.useArtifact=function(){i.toKanjia(Object(h.b)("id"),2,0)},i.toKanjia=function(a,t,e){var s={course_id:a,type:t,parent_uid:e};h.c.post("".concat(API.home,"/m/bargain/toBargain"),s).then(function(a){200===a.data.code?(i.setState({amount:a.data.data.amount}),2===t&&i.setState({isShowOverlay:!0,status:6}),1===a.data.data.is_success?i.setState({isShowOverlay:!0,status:4}):2===a.data.data.is_success?3===t?i.setState({isShowOverlay:!0,status:2}):4===t&&i.setState({isShowOverlay:!0,status:1,firendBaigainPrice:!1}):0===a.data.data.is_success&&(3===t?i.setState({isShowOverlay:!0,status:2}):4===t&&i.setState({isShowOverlay:!0,status:3})),i.getBargainInfo()):n.a.info(a.data.msg,2)})},i.friendBargainFirst=function(){i.toKanjia(Object(h.b)("id"),3,i.state.originatorUid)},i.friendBargainSecond=function(){i.toKanjia(Object(h.b)("id"),4,i.state.originatorUid)},i.shareFriendBargain=function(){i.setState({isShowOverlay:!0,status:7,isshowYindao:!!h.a.isWeixin})},i.close=function(){i.setState({isShowOverlay:!1,status:""})},i.state={isShowOverlay:!1,isOriginator:"",kanjiaIcon:e(623),courseList:[],data:"",bargainData:"",limitPeople:0,outList:[],list:[],width:"0",isShowMore:"",status:"",hour:"",min:"",sec:"",day:"",amount:"",firendBaigainPrice:!0,isshowYindao:!1,isLoaidng:!0},i}return Object(m.a)(t,a),Object(c.a)(t,[{key:"componentDidMount",value:function(){this.getBargainRankList(Object(h.b)("id"),1),this.getBargainCourse(),this.getBargainInfo()}},{key:"render",value:function(){var a,t,e,s=this;return 0===this.state.bargainData.is_artifact?a=d.a.createElement("div",null,"\u518d\u9080\u8bf7",d.a.createElement("span",{className:"indicator"},this.state.bargainData.invite_num),"\u4f4d\u597d\u53cb\u52a9\u529b\u5373\u53ef\u83b7\u5f97",d.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")):1===this.state.bargainData.is_artifact?(a=d.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",d.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),t=d.a.createElement("button",{className:"artifact-btn",onClick:this.toArtifact},"\u7acb\u5373\u9886\u53d6")):2===this.state.bargainData.is_artifact&&(a=d.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",d.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),t=d.a.createElement("button",{className:"artifact-btn",onClick:this.useArtifact},"\u7acb\u5373\u4f7f\u7528")),1!==this.state.isOriginator&&0===this.state.data.assist_status&&0===this.state.data.bargain_status?e=d.a.createElement("button",{className:"active-btn",onClick:this.friendBargainFirst},"\u5e2e\u597d\u53cb\u780d\u4e00\u5200"):1!==this.state.isOriginator&&1===this.state.data.assist_status?e=d.a.createElement("button",{className:"active-btn",onClick:this.friendBargainSecond},"\u518d\u780d\u4e00\u5200"):1!==this.state.isOriginator&&2===this.state.data.assist_status?e=d.a.createElement("button",{className:"invalid-btn"},"\u5df2\u5e2e\u597d\u53cb\u52a9\u529b"):1===this.state.data.bargain_status||2===this.state.data.bargain_status?e=d.a.createElement("button",{className:"invalid-btn"},"\u780d\u4ef7\u7ed3\u675f"):1===this.state.isOriginator&&0===this.state.data.bargain_status&&(e=d.a.createElement("button",{className:"active-btn",onClick:this.shareFriendBargain},"\u9080\u8bf7\u597d\u53cb\u780d\u4ef7")),d.a.createElement("div",{className:"bargain-middle-page"},d.a.createElement(g.e,{title:"\u780d\u4ef7\u8be6\u60c5",arrow:!0,cart:!0}),d.a.createElement("div",{className:"top"},d.a.createElement("div",{className:"bargain-area"},1!==this.state.isOriginator&&d.a.createElement("p",{className:"bargain-tip"},"\u4f60\u7684\u597d\u53cb\u53d1\u73b0\u4e00\u95e8\u7cbe\u54c1\u8bfe\u7a0b\uff0c\u5feb\u6765\u4e00\u8d77\u5e2e\u4ed6\u780d\u4ef7\uff1a"),d.a.createElement("ul",null,d.a.createElement(g.i,{info:d.a.createElement(S,{isOriginator:this.state.isOriginator,data:this.state.data,toCart:this.toCart})})),d.a.createElement("div",{className:"bargain-detail"},d.a.createElement("div",{className:"top"},d.a.createElement("div",null,"\u5df2\u780d",d.a.createElement("span",{className:"reduced-price"},this.state.bargainData.bargain_price,"\u5143")),0===this.state.data.bargain_status&&d.a.createElement("div",null,d.a.createElement("span",{className:"time hour"},String(this.state.hour).padStart(2,0))," :\xa0",d.a.createElement("span",{className:"time min"},String(this.state.min).padStart(2,0))," :\xa0",d.a.createElement("span",{className:"time sec"},String(this.state.sec).padStart(2,0)),d.a.createElement("span",{className:"inactive"}," \u540e\u780d\u4ef7\u7ed3\u675f")),1===this.state.data.bargain_status&&1===this.state.isOriginator&&d.a.createElement("span",{className:"inactive"},"\u780d\u4ef7\u7ed3\u675f")),d.a.createElement("div",{className:"middle"},d.a.createElement("span",{style:{width:this.state.width}})),1===this.state.isOriginator&&0===this.state.data.bargain_status&&d.a.createElement("div",null,a,t),1===this.state.isOriginator&&1===this.state.data.bargain_status&&d.a.createElement("div",null,"\u780d\u4ef7\u91d1\u989d\u5c06\u4e8e",d.a.createElement("span",{className:"time hour"},String(this.state.day).padStart(2,0)),d.a.createElement("span",{className:"unit"}," \u5929 "),d.a.createElement("span",{className:"time min"},String(this.state.hour).padStart(2,0)),d.a.createElement("span",{className:"unit"}," \u65f6 "),d.a.createElement("span",{className:"time sec"},String(this.state.min).padStart(2,0)),d.a.createElement("span",{className:"unit"},"\u5206"),"\u540e\u6e05\u96f6\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u652f\u4ed8"),d.a.createElement("div",{className:"button"},e))),d.a.createElement("div",{className:"bargain-records"},d.a.createElement("div",{className:"title"},"\u780d\u4ef7\u8bb0\u5f55"),d.a.createElement("ul",null,this.state.outList&&this.state.outList.length>0&&this.state.outList.map(function(a,t){return d.a.createElement("li",{key:t},d.a.createElement("div",{className:"left"},d.a.createElement("img",{className:"avatar",src:a.avatar_file,alt:""}),d.a.createElement("span",{className:"nickname"},a.user_name),d.a.createElement("span",{className:"rank-tag"},a.rank)),d.a.createElement("div",{className:"right"},d.a.createElement("img",{className:"kanjia-icon",src:s.state.kanjiaIcon,alt:""}),"\u780d\u6389",d.a.createElement("span",{className:"price"},a.amount)))})),d.a.createElement("div",{className:"more",onClick:this.getMore},"\u67e5\u770b\u66f4\u591a>>"))),d.a.createElement("div",{className:"bargain-course-list",id:"bargainCourse"},d.a.createElement("div",{className:"title-wrapper"},d.a.createElement("div",{className:"title"},"\u6211\u8981\u780d\u4ef7"),d.a.createElement("div",{className:"subtitle"},"\u9080\u8bf7",this.state.limitPeople,"\u4f4d\u4ee5\u4e0a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011")),d.a.createElement("ul",null,this.state.courseList&&this.state.courseList.length>0&&this.state.courseList.map(function(a,t){return d.a.createElement(g.d,{className:"text-overflow-2",key:t,id:a.course_id,img:a.image_name,title:a.course_title,bottom:d.a.createElement(A,{item:a,toCart:s.toCart})})}))),d.a.createElement(p.b,{to:"/preferential",className:"preferential"},"\u67e5\u770b\u66f4\u591a\u7cbe\u54c1\u8bfe\u7a0b >>"),d.a.createElement(E.a,{list:this.state.list,icon:this.state.kanjiaIcon,limitPeople:this.state.limitPeople,isShowMore:this.state.isShowMore,boxHide:this.boxHide}),this.state.isShowOverlay&&d.a.createElement(f.a,null,7===this.state.status&&d.a.createElement(L,{isshowYindao:this.state.isshowYindao,limitPeople:this.state.limitPeople,close:this.close}),1===this.state.status&&d.a.createElement(k,{money:this.state.amount,avatar:this.props.user.data.avatar,firendBaigainPrice:this.state.firendBaigainPrice}),2===this.state.status&&d.a.createElement(C,{bargainSecond:this.friendBargainSecond,money:this.state.amount}),3===this.state.status&&d.a.createElement(B,{close:this.close,money:this.state.amount}),4===this.state.status&&d.a.createElement(U,{close:this.close,limitPeople:this.state.limitPeople}),5===this.state.status&&d.a.createElement(w,{useArtifact:this.useArtifact}),6===this.state.status&&d.a.createElement(O,{toCart:this.toCart,money:this.state.amount,allMoney:this.state.bargainData.bargain_price}),7!==this.state.status&&d.a.createElement("i",{onClick:this.close,className:"iconfont iconiconfront-2 bargain-close"})))}}]),t}(u.Component);function S(a){var t=a.data&&a.data.course;return d.a.createElement("div",{className:"des"},d.a.createElement("div",{className:"course-title text-overflow-2"},t.course_title),d.a.createElement("div",{className:"price-bar"},d.a.createElement("span",{className:"discount-price"},"\uffe5",t.course_price),1===a.isOriginator&&d.a.createElement("button",{className:"purchase-btn",onClick:a.toCart},"\xa5",t.pay_price,"\u53bb\u652f\u4ed8")))}function A(a){var t;return t=2===a.item.bargain_status?d.a.createElement(p.b,{to:"/detail?id=".concat(a.item.course_id),className:"bargain"},"\u6211\u8981\u780d\u4ef7"):3===a.item.bargain_status?d.a.createElement(p.b,{to:"/play?id=".concat(a.item.course_id),className:"bargain"},"\u53bb\u5b66\u4e60"):d.a.createElement("div",{className:"btns"},1===a.item.bargain_status&&d.a.createElement("button",{className:"invalid"},"\u780d\u4ef7\u7ed3\u675f"),0===a.item.bargain_status&&d.a.createElement(p.b,{to:"/detail?id=".concat(a.item.course_id),className:"bargain-btn"},"\u7ee7\u7eed\u780d\u4ef7"),d.a.createElement("button",{onClick:a.toCart,className:"purchase-btn"},"\xa5",a.item.pay_price,"\u53bb\u652f\u4ed8")),d.a.createElement("div",{className:"course-bottom"},d.a.createElement("div",{className:"course-price"},d.a.createElement("span",{className:"discount-price"},"\xa5",a.item.price1),d.a.createElement("span",{className:"original-price"},"\xa5",a.item.price0)),t)}function k(a){return d.a.createElement("div",{className:"bargain-public-number"},d.a.createElement("img",{className:"avait",src:a.avatar,alt:""}),a.firendBaigainPrice&&d.a.createElement("p",{className:"status-title ff4"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",a.money,"\u5143\uff01"),d.a.createElement("p",{className:"status-dec"},"\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u53ef\u4ee5\u518d\u780d\u4e00\u5200\u54e6~"),d.a.createElement("img",{className:"public-number-img",src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png",alt:""}))}function C(a){return d.a.createElement("div",{className:"bargain-first"},d.a.createElement("img",{className:"top-img",src:e(667),alt:""}),d.a.createElement("p",{className:"status-title"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",d.a.createElement("span",{className:"ff4"},a.money,"\u5143"),"\uff01"),d.a.createElement("p",{className:"status-dec"},"\u4f60\u8fd8\u53ef\u4ee5\u5e2e\u6211\u518d\u780d\u4e00\u5200\u54e6~"),d.a.createElement("button",{className:"bargain-href",onClick:a.bargainSecond},"\u518d\u780d\u4e00\u5200"))}function B(a){return d.a.createElement("div",{className:"bargain-second"},d.a.createElement("img",{className:"top-img",src:e(667),alt:""}),d.a.createElement("p",{className:"status-title"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u5e2e\u597d\u53cb\u780d\u6389",d.a.createElement("span",{className:"ff4"},a.money,"\u5143"),"\uff01"),d.a.createElement("a",{className:"bargain-href",href:"#bargainCourse",onClick:a.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function U(a){return d.a.createElement("div",{className:"not-bargain"},d.a.createElement("img",{className:"middle-img",src:e(891),alt:""}),d.a.createElement("p",{className:"status-title"},"\u4f60\u7684\u597d\u53cb\u7528\u3010\u780d\u4ef7\u795e\u5668\u3011\u628a\u6211\u780d\u8499\u5708\u4e86",d.a.createElement("br",null),"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),d.a.createElement("p",{className:"status-dec"},"\u9080\u8bf7",a.limitPeople,"\u4f4d\u4ee5\u4e0a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011"),d.a.createElement("a",{className:"bargain-href",href:"#bargainCourse",onClick:a.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function w(a){return d.a.createElement("div",{className:"artifact-box"},d.a.createElement("p",{className:"top-tip"},"\u606d\u559c\u4f60\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011\uff01"),d.a.createElement("p",{className:"middle-tip"},"\u60a8\u53ef\u4ee5\u4f7f\u7528",d.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u518d\u780d\u4e00\u5200"),d.a.createElement("button",{className:"use-artifact",onClick:a.useArtifact},"\u7acb\u5373\u4f7f\u7528"))}function O(a){return d.a.createElement("div",{className:"use-artifact-box"},d.a.createElement("img",{className:"top-img",src:e(667),alt:""}),d.a.createElement("p",{className:"top-tip"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u780d\u6389\u4e86",a.money,"\u5143\uff01"),d.a.createElement("p",{className:"middle-tip"},"\u4f60\u5df2\u7ecf\u780d\u4e86",d.a.createElement("span",{className:"indicator"},a.allMoney,"\u5143"),"\u6ca1\u89c1\u8fc7\u4f60\u8fd9\u4e48\u80fd\u780d\u7684\u4eba..."),d.a.createElement("p",{className:"btm-tip"},"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),d.a.createElement("button",{className:"tubuy",onClick:a.toCart},"\u53bb\u652f\u4ed8"))}function L(a){return d.a.createElement("div",null,d.a.createElement("div",{className:"close-bargain-success",onClick:a.close}),d.a.createElement("div",{className:"bargain-success"},a.isshowYindao&&d.a.createElement("i",{className:"iconfont iconyindao"}),d.a.createElement("p",null,"\u5206\u4eab\u5230\u5fae\u4fe1\u7fa4\u9080\u8bf7\u66f4\u591a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7"),d.a.createElement("p",null,"\u8d85\u8fc7",a.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97",d.a.createElement("span",{className:"indicator",style:{color:"#FF4000"}},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u54e6")))}t.default=Object(j.d)(Object(N.b)(function(a){return{user:a.user}},null),b.g)(y)},623:function(a,t){a.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAA51BMVEUAAAD3yyr4zCr60jD61DT4zSz4zi360C770jL93jn94UH3yin4yyz4ziz4zi34zS361TX50i/50jD61DP72Dj61jP+4kH+4ED4zCv3zCz4zSz4zS350jL61jb61jT6zir50DH83Dz71DP83Dj+5ET2zDD50C77zyj93j/930H82zv3yir3yCj/6072xib3yyv/6kz2xiT/7lD/8FL2wyL2xCP/8VT/7E//8lb83T74zS32wi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d=(e(666),document.body||document.documentElement),g=["touchmove","mousewheel"],h=function(a){function t(a){var e;return Object(s.a)(this,t),(e=Object(n.a)(this,Object(r.a)(t).call(this,a))).preventScroll=function(a){a.preventDefault()},e.overlayBox=null,e}return Object(c.a)(t,a),Object(i.a)(t,[{key:"componentDidMount",value:function(){var a=this;g.forEach(function(t){a.overlayBox.addEventListener(t,a.preventScroll,{passive:!1})})}},{key:"componentWillUnmount",value:function(){var a=this;g.forEach(function(t){a.overlayBox.removeEventListener(t,a.preventScroll)})}},{key:"render",value:function(){var a=this;return u.a.createPortal(o.a.createElement("div",{className:"overlay",ref:function(t){return a.overlayBox=t},style:{top:"".concat(window.scrollY,"px")}},this.props.children),d)}}]),t}(l.Component);t.a=h},664:function(a,t,e){"use strict";var s=e(7),i=e(8),n=e(11),r=e(9),c=e(10),l=e(0),o=e.n(l),m=(e(665),function(a){function t(a){var i;return Object(s.a)(this,t),(i=Object(n.a)(this,Object(r.a)(t).call(this,a))).closeMore=function(){i.props.boxHide(!1)},i.state={kanjiaIcon:e(623)},i}return Object(c.a)(t,a),Object(i.a)(t,[{key:"render",value:function(){return o.a.createElement("div",{className:"ranking-box"},this.props.isShowMore&&o.a.createElement(u,{list:this.props.list,limitPeople:this.props.limitPeople,closeMore:this.closeMore,img:this.props.icon}))}}]),t}(l.Component));function u(a){return o.a.createElement("div",{className:"moreMbc"},o.a.createElement("div",{className:"content"},o.a.createElement("div",{className:"title-box"},"\u597d\u53cb\u52a9\u529b\u8be6\u60c5"),o.a.createElement("ul",{className:"more-bargain-list"},a.list&&a.list.length>0&&a.list.map(function(t,e){return o.a.createElement("li",{key:e,className:"bargain-item"},o.a.createElement("img",{className:"avatar",src:t.avatar_file,alt:""}),o.a.createElement("p",{className:"name"},t.user_name),o.a.createElement("p",{className:"bargain-status"},o.a.createElement("img",{className:"kanjia-icon",src:a.img,alt:""}),"\u780d\u6389",o.a.createElement("span",{className:"price"},t.amount)))})),o.a.createElement("div",{className:"more-bargain-dec"},"\u8d85\u8fc7",a.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011")),o.a.createElement("i",{onClick:a.closeMore,className:"iconfont iconiconfront-2 close"}))}t.a=m},665:function(a,t,e){},666:function(a,t,e){},667:function(a,t,e){a.exports=e.p+"static/media/kanjia_cg_icon.81a489ac.png"},890:function(a,t,e){},891:function(a,t){a.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGUAAABmCAMAAADlNq9TAAACSVBMVEUAAABeTUZoSDp2QytSUlL/1jRSUlJhTEL/1jRSUlJ2QytVUE780jP/1jRSUlL/1jT/1jR1QyxSUlJSUlJ2Qyv/1jRmSj3/1jR2QytSUlL/1jR3RCv/1jT/1jT/1jT/1jRcTkj/1jSPXS3/1jT/1jT/1jT/1jR1QytSUlJ2QytSUlJSUlL/1jRTUVD/1jR2Qyv/1jT/1jRSUlJ2QytSUlJ2Qyt8SixSUlL/1jT/1jRSUlL/1TR6Ryt2QytSUlJSUlJSUlJSUlL/1jT/1jR2Qyt2Qyv/1jT/1jR2Qyv/1jRSUlL/1jT/1jR2QyuUYy1+TCtyRC9SUlJ2Qyt2QyuTYS3dsTF2QyvovTK6jC9aTknKnjG8jjCKWSzzyTPNoDGldi5qSDiOXS3/1jR2QyvoVFRSUlLznJL+1DRXVlGVcUnqxjj40TWBdkmIe0igjUT+z0B7cUu6oUDKrj3yzDZrZU3Gqz7iwDn2zjX60TSwmkHuyTfvxTN7SCtfXFBbWVCNgEjStDznwjikdC6XZi2HVSxiXk+adkiYiEbdvDrWqjF/TCtmYU5vaE12bUyShEacikW1nkHitjLQojGlkkPTrDzZuTrHmTDDljC2iC+sfS6slkK9o0DHoT/OsTz2zDOebS6EUiy2kELApj/9yTfeszLarjHAkjDqXFPxg0imgUWuiETZtTvswTPovTKygy/0oIbxhmXveGDpWFTtbk33qj/0n3rqYVbsaFT2n0HBm0D5sj3huTq7jS/ykmzvekqfe0f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ZgL2Cjnb4+ah4wqmCHgLaUNtsNY8rCyAgXc9mxMHzL2Xg2GRL1nKEWpgmU/72LtmxYPddgoLA3uLSOtxsz8d0jjRHWotw+iDqPLxq9zZkoHCXeD9GBl86tqiThss2ZBhAnOs/ZDvFUZurnQM4a2o8uYzhHVLZ/BA1dtVH2T4W+bYbh4DQ0e1byC9k5PYa0jZqPVufV8w9IlSOEtFJd1JAUjGboLC0usL4RWWzLHXW+f9bo//sDeuqkLv6/OX0IvF7BpnqMJYPC0xGf7hNy11jIIwEERheBrBQtBGBBHBxlKwUzyCt3jNMrYBDXY2c4Itt9lyNycIKcSbqUEhEyxMYL8LTPEPb03KAUkcSVkgiR0pYyQxImWKFPakTZDChlpmSGBLLRt8mcqWD1egjzxTr7+kljU+7J0lBOESnV0jM0u0uYr/K/+NhZld7gM68+JsFOGQoTanttUAtUr4JcL6HlccHvxmG/uiDVEz3gnfKxNP6KzwcMws4dzIom2/AS/mApgcPRSZsaW7WZVF2eEvz1bqZ0VBKIrj+NkILhLdSBBpROZKhtoV7QyKmHmKw8GW81AudJfaX4Ji6MlmIqaUbveY9Vnd3ZffWdxwtduHWIoKAh3knY50FpfqdEHAQ9Yqo4toj7wpCDT4CF1lJ2Q1Kl0sjOhmO0dWG+4YyIkp7wdZLbjTYqdklLfhx5gVKjsq2iPHrnCx+DIhTdJIcjJmCygotyWidB2crc/vI3J8uKeiXER0CP4lREtkdEBghnJESXCT8pURCBjclk2Qs8jYig4iDkotD0FeEnMHq4GIr6BMvChU1jv2sxTro8yqWFmE7BQxzUOJ+XcRylnwiDHGd3HgsZqK7/GhgYyr4Bv0gWFMX+40TOAZvSG+YKhrUIpmOx2sRrU0KE8b9CfK04mZD0/TvqzupNz1FM9xzTZU1/YH9qfu9prOSPXG9Tr+UerDsaeOnGbP1S3bbNXggV9XIWYP5SLNCwAAAABJRU5ErkJggg=="}}]);
//# sourceMappingURL=BargainMiddlePage.5ad51000.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1145:function(e,t,a){},1146:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAMAAADNlS1EAAAA+VBMVEUAAADeP03XQVEDmP38MjMGl/rSQ1Uhi+QJlfj9MjIsh9sGl/o6gtD/MTEYj+zoOkTxNzw6gtAIlvn8MjNQeL+wUXGAZZgnieCAZJg3g9LJSF0rh9x5aJ6HYpPfPktDfsm8TGhec7ShV3wNk/PxNjxdc7ShV3y7TGdDfskgi+XePkt4Z52GYpM2g9PIR10Ok/PxNjyUXYdrbajoOkQXkOwXkOzoO0M3g9LJR13UQ1TePksXkO0Nk/Qhi+QshtzePkzxNjz5MzbnO0RqbamUXIivUXI2g9NDfslQeL9dc7R4aJ6GYpKiV328TGfJR13UQlPoOkNQeb7pOkQ6pR5tAAAAO3RSTlMABo85Of3w7JGRjO7u7u3t7ZGDg09PMBUV+vrz7+/q397X18/Pv7+1tKSjmZh9fHd2cnFmZTQ0KCgbEL1XwbEAAADqSURBVBjTXZHlssIwFAZpqVDc4bq7+wXa4nUB3v9h+HKAYZL9k52dZJI5yfBk61m2SEapZEi7pqoqq8YYNLbxyjTNN6zVEahu2vcA/EAqE1Ch1tEty3pgJg+BTDFv2/ZRhy6SNU2mi/4OHMd5yfDcu657JrSm5y29phAvfN+/EdrnFLT51j0OguBJ2PgchuFJl2/tGfgQNt5GUXQp8a01By2+SedxHN8Jh1+TJDn8J60VizWSnpam6W4mIM/sEXM67VPULaBDfieLxeoLAsoDUIa8Y/TX2+fkTFCHKPgkhRWqhUKORGlQ27MGJhAis32Nv3oAAAAASUVORK5CYII="},1164:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(7),c=a(8),r=a(11),o=a(9),l=a(10),m=a(0),u=a.n(m),d=a(70),p=(a(1145),a(4)),h=a(16),f=a(33),E=a(63),v=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).state={camp:[],employment:[],basics:[],advanced:[],special:[],isLoading:!0},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=this;p.c.get("".concat(API.home,"/m/course/classify/").concat(1)).then(function(t){200===t.data.code?(e.setState({isLoading:!1}),t.data.data.common.length>0&&e.setState({basics:t.data.data.common[0],advanced:t.data.data.common[1]||[]}),t.data.data.special.length>0&&e.setState({camp:t.data.data.special[0],employment:t.data.data.special[1]||[],special:t.data.data.special[2]||[]})):s.a.info(t.data.msg,2)})}},{key:"render",value:function(){return u.a.createElement("div",{className:"class-box"},u.a.createElement(f.e,{title:"\u5206\u7c7b",arrow:!1,cart:!1}),u.a.createElement(E.a,{isLoading:this.state.isLoading},u.a.createElement(b,{data:this.state.camp.list,title:this.state.camp.name,type:1}),u.a.createElement(b,{data:this.state.employment.list,title:this.state.employment.name,type:1}),u.a.createElement(b,{data:this.state.basics.list,title:this.state.basics.name,type:2}),u.a.createElement(b,{data:this.state.advanced.list,title:this.state.advanced.name,type:2}),u.a.createElement("div",{className:"vip"},this.state.special.list&&this.state.special.list.length>0&&this.state.special.list.map(function(e,t){return u.a.createElement(h.b,{key:t,to:"/detail?id=".concat(e.course_id)},u.a.createElement("img",{src:e.course_img,alt:""}))}))))}}]),t}(m.Component);function g(e){var t=e.data;return u.a.createElement("div",{className:"items-box"},t&&t.length>0&&t.map(function(e,t){return u.a.createElement(h.b,{to:"/detail?id=".concat(e.course_id),key:t,className:"item-banner"},u.a.createElement("img",{src:e.course_img,alt:""}),e.is_aist&&u.a.createElement("span",{className:"return_cash"}))}))}function x(e){return u.a.createElement("div",{className:"items-box"},e.data&&e.data.length>0&&e.data.map(function(e,t){return u.a.createElement(h.b,{to:"/courselist?id=".concat(e.c_id,"&name=").concat(e.c_name),key:t,className:"item-label"},e.c_name)}))}function b(e){return u.a.createElement("div",{className:"class-course"},u.a.createElement("p",{className:"course-items-title"},u.a.createElement("img",{src:a(1146),alt:""}),e.title),1===e.type&&u.a.createElement(g,{data:e.data}),2===e.type&&u.a.createElement(x,{data:e.data}))}t.default=Object(d.b)(v)},1165:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(7),c=a(8),r=a(11),o=a(9),l=a(10),m=a(0),u=a.n(m),d=a(4),p=(a(770),a(20)),h=a(771),f=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).close=function(){a.state.showCard?(a.setState({showCard:!1}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="static"):a.props.history.push("/detail?id=".concat(a.course_id))},a.checkOption=function(e){var t=a.state.numberList;a.answerList.map(function(t){return Number(t.questionId)===Number(e.ques_id)&&(t.answerId=e.opt_id),t}),t.push(e.ques_id),a.setState({currentQuestionOption:e.opt_id,numberList:t})},a.preQuestion=function(){var e=a.state.questionIndex;1!==e&&a.setState({questionIndex:e-1,currentExam:a.state.examList[e-2],currentQuestionOption:a.answerList[e-2].answerId})},a.nextQuestion=function(){var e=a.state.questionIndex;e!==a.state.examList.length?a.setState({questionIndex:e+1,currentExam:a.state.examList[e],currentQuestionOption:a.answerList[e].answerId}):a.setState({showCard:!0})},a.jumpItem=function(e,t){a.setState({showCard:!1,questionIndex:t+1,currentExam:a.state.examList[t],currentQuestionOption:a.answerList[t].answerId})},a.commit=function(){var e={};e.video_id=a.keshi_id,e.qid=a.qid,e.cost_time=a.time,e.uid=a.props.user.data.uid,e.answer_record=a.answerList,d.c.post("".concat(API.home,"/m/aist/submit"),e).then(function(e){200===e.data.code?a.props.history.push("/campResolve?keshi_id=".concat(a.keshi_id,"&qid=").concat(a.qid)):s.a.info(e.data.msg,2)})},a.showCard=function(){a.setState({showCard:!0}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="fixed"},a.getUseTime=function(e){var t,n,s;if(t="".concat(parseInt(e/3600)).padStart(2,0),n="".concat(parseInt((e-3600*t)/60)).padStart(2,0),s="".concat(parseInt(e-3600*t-60*n)).padStart(2,0),86400!==e)return e<3600?"".concat(n,":").concat(s):"".concat(t,":").concat(n,":").concat(s);clearInterval(a.useTimeInterval),a.useTimeInterval=null},a.state={examList:[],currentExam:{},currentQuestionOption:{},questionIndex:1,numberList:[],qtitle:"",useTime:"00:00",showCard:!1},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.keshi_id=Object(d.b)("keshi_id"),this.qidP=Object(d.b)("qid");var t=this;d.c.get("".concat(API.home,"/m/aist/get_questions/").concat(this.keshi_id,"/").concat(this.qidP)).then(function(a){if(4040!==a.data.code)if(200===a.data.code){var n=a.data.data;e.qid=n.id,e.course_id=n.course_id,e.setState({examList:n.list,qtitle:n.qtitle,currentExam:n.list[0]}),t.answerList=[],n.list.map(function(e){var a={};a.questionId=e.id,a.answerId=0,t.answerList.push(a)}),t.time=0,t.useTimeInterval=setInterval(function(){t.time+=1,t.setState({useTime:t.getUseTime(t.time)})},1e3)}else s.a.info(a.data.msg,2,function(){e.props.history.push("/")});else s.a.info(a.data.msg,2,function(){e.props.history.push("/passport")})})}},{key:"render",value:function(){var e=this,t=this.state,a=t.qtitle,n=t.currentExam,s=t.currentQuestionOption,i=t.questionIndex,c=t.examList,r=t.useTime,o=t.showCard,l=t.numberList;return u.a.createElement("div",{className:"camp-test-container"},u.a.createElement("div",{className:"fixed_container"},u.a.createElement(h.c,{time:r,showCardEve:this.showCard,close:this.close,showCard:o}),u.a.createElement(h.a,{qtitle:a,questionIndex:i,examList:c})),u.a.createElement(h.e,{questionIndex:i,checkOption:this.checkOption,currentExam:n,currentQuestionOption:s}),u.a.createElement(h.b,{preQuestion:this.preQuestion,nextQuestion:this.nextQuestion,questionIndex:i}),o&&u.a.createElement("div",{className:"test-card-container"},u.a.createElement("p",null,"\u8bfe\u540e\u7ec3\u4e60\uff1a".concat(a)),u.a.createElement("ul",{className:"test-item"},c.map(function(t,a){return u.a.createElement("li",{key:t.id,onClick:function(){e.jumpItem(t,a)},className:"layout-flex-center ".concat(l.includes(t.id)?"answered":"")},a+1)})),u.a.createElement("div",{className:"bottom_commit"},u.a.createElement("div",{onClick:this.commit,className:"commit_answer layout-flex-center"},"\u63d0\u4ea4\u5e76\u67e5\u770b\u7ed3\u679c"))))}}]),t}(m.Component);t.default=Object(p.b)(function(e){return{user:e.user}},null)(f)},1166:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(7),c=a(8),r=a(11),o=a(9),l=a(10),m=a(0),u=a.n(m),d=a(4),p=(a(770),a(771)),h=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).showCard=function(){a.setState({showCard:!0}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="fixed"},a.close=function(){a.state.showCard?(a.setState({showCard:!1}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="static"):a.props.history.push("/detail?id=".concat(a.course_id),{href:"/purchased"})},a.checkOption=function(){},a.preQuestion=function(){var e=a.state.questionIndex;1!==e&&a.setState({questionIndex:e-1,currentExam:a.state.examList[e-2],currentQuestionOption:a.answerList[e-2].answerId})},a.nextQuestion=function(){var e=a.state.questionIndex;e!==a.state.examList.length?a.setState({questionIndex:e+1,currentExam:a.state.examList[e],currentQuestionOption:a.answerList[e].answerId}):a.setState({showCard:!0})},a.jumpItem=function(e,t){a.setState({showCard:!1,questionIndex:t+1,currentExam:a.state.examList[t],currentQuestionOption:a.answerList[t].answerId})},a.formatTime=function(e){var t=e.split(":"),a="".concat(Number(t[1]),"\u5206").concat(t[2],"\u79d2");return 0!==Number(t[0])&&(a="".concat(Number(t[0]),"\u65f6").concat(a)),a},a.state={examList:[],currentExam:{},currentQuestionOption:{},questionIndex:1,numberList:[],qtitle:"",useTime:"00:00",showCard:!1,rightRate:0},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.keshi_id=Object(d.b)("keshi_id"),this.qidP=Object(d.b)("qid");var t=this;d.c.get("".concat(API.home,"/m/aist/analysis/").concat(this.keshi_id,"/").concat(this.qidP)).then(function(a){if(console.log(a),4040!==a.data.code)if(200===a.data.code){var n=a.data.data;e.course_id=n.course_id,t.answerList=[],e.rightNumber=0,n.list.map(function(a){1===a.compare&&e.rightNumber++;var n={};n.questionId=a.id,n.answerId=0,t.answerList.push(n)}),e.setState({examList:n.list,qtitle:n.qtitle,currentExam:n.list[0],useTime:n.cost_time,rightRate:(e.rightNumber/n.list.length*100).toFixed(0)})}else s.a.info(a.data.msg,2,function(){e.props.history.push("/")});else s.a.info(a.data.msg,2,function(){e.props.history.push("/passport")})})}},{key:"render",value:function(){var e=this,t=this.state,a=t.qtitle,n=t.currentExam,s=t.currentQuestionOption,i=t.questionIndex,c=t.examList,r=t.useTime,o=t.showCard,l=t.rightRate;return u.a.createElement("div",{className:"camp-test-container"},u.a.createElement("div",{className:"fixed_container"},u.a.createElement(p.c,{time:r,showCardEve:this.showCard,close:this.close,showCard:o}),u.a.createElement(p.a,{qtitle:a,questionIndex:i,examList:c})),u.a.createElement(p.e,{questionIndex:i,checkOption:this.checkOption,currentExam:n,currentQuestionOption:s},n&&n.options&&u.a.createElement(p.d,{currentExam:n})),u.a.createElement(p.b,{preQuestion:this.preQuestion,nextQuestion:this.nextQuestion,questionIndex:i}),o&&u.a.createElement("div",{className:"test-resolve-card-container"},u.a.createElement("div",{className:"camp-test-header layout-flex-between"},u.a.createElement("div",null,u.a.createElement("i",{onClick:this.close,className:"iconfont iconiconfront-77 icon-close"})),u.a.createElement("div",{className:"layout-flex-center camp-test-time"},u.a.createElement("span",{style:{fontSize:"17px",color:"#333333"}},"\u7ec3\u4e60\u62a5\u544a")),u.a.createElement("div",{className:"icon icon-order no_height"})),u.a.createElement("div",{className:"report-body"},u.a.createElement("div",{className:"right_rate"},u.a.createElement("span",{className:"rate"},"\u6b63\u786e\u7387"),u.a.createElement("div",{className:"percentage"},u.a.createElement("span",null,l),u.a.createElement("span",null,"%"))),u.a.createElement("p",{className:"use_total_time"},"\u7d2f\u8ba1\u7528\u65f6".concat(this.formatTime(r))),u.a.createElement("ul",{className:"right_wrong_li"},c.map(function(t,a){return u.a.createElement("li",{onClick:function(){e.jumpItem(t,a)},className:"layout-flex-center ".concat(t.answer_id===t.user_answer?"right":"wrong"," ").concat(0===t.user_answer?"noSelect":""),key:t.answer_id},a+1)}))),u.a.createElement("div",{className:"camp-report-bottom"},u.a.createElement("div",{className:"bottom_commit layout-flex-center"},u.a.createElement("div",{onClick:this.close,className:"commit_answer layout-flex-center"},"\u9898\u76ee\u89e3\u6790")))))}}]),t}(m.Component);t.default=h},770:function(e,t,a){},771:function(e,t,a){"use strict";a.d(t,"c",function(){return c}),a.d(t,"a",function(){return r}),a.d(t,"e",function(){return o}),a.d(t,"b",function(){return l}),a.d(t,"d",function(){return m});var n=a(0),s=a.n(n);function i(e){return e&&(e.includes("<img")&&(e=e.replace(/<img/g,"<img style='width: 100%'")),e=(e=(e=(e=(e=e.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/&amp;gt;/g,"")).replace(/&quot;/g,'"')).replace(/&amp;nbsp;/g,"")),e}function c(e){return s.a.createElement("div",{className:"camp-test-header layout-flex-between"},s.a.createElement("div",null,s.a.createElement("i",{onClick:e.close,className:"iconfont iconiconfront-77 icon-close"})),s.a.createElement("div",{className:"layout-flex-center camp-test-time"},s.a.createElement("i",{className:"icon icon-clock"}),s.a.createElement("span",null,e.time)),s.a.createElement("div",{onClick:e.showCardEve,className:"icon icon-order ".concat(e.showCard?"no_height":"")}))}function r(e){return s.a.createElement("div",{className:"layout-flex-between camp-test-title"},s.a.createElement("div",{className:"qtitle"},"\u8bfe\u540e\u7ec3\u4e60\uff1a".concat(e.qtitle)),s.a.createElement("div",{className:"qnumber"},"".concat(e.questionIndex,"/").concat(e.examList.length)))}function o(e){var t=e.questionIndex,a=e.currentExam,n=e.currentQuestionOption;return s.a.createElement("div",{className:"test-item-container"},s.a.createElement("div",{className:"ques item-title",dangerouslySetInnerHTML:{__html:"".concat(t,".").concat(i(a.ques))}}),s.a.createElement("ul",null,a.options&&a.options.map(function(t,c){return s.a.createElement("li",{key:c,onClick:function(){return e.checkOption(t)},className:"\n ".concat(n===t.opt_id?"option_checked":"","\n ").concat(0!==a.user_answer&&!a.user_answer||a.user_answer!==t.opt_id?"":"user_check","\n ").concat(0!==a.user_answer&&!a.user_answer||a.answer_id!==t.opt_id?"":"right_check","\n ")},s.a.createElement("span",{className:"letter"},String.fromCharCode(Number(c)+65)),s.a.createElement("span",{className:"des",dangerouslySetInnerHTML:{__html:i(t.des)}}))})),e.children)}function l(e){return s.a.createElement("div",{className:"layout-flex-around change_question_container"},s.a.createElement("div",{onClick:e.preQuestion,className:"change_button pre_question ".concat(1===e.questionIndex?"first_question":"")},"\u4e0a\u4e00\u9898"),s.a.createElement("div",{onClick:e.nextQuestion,className:"change_button next_question"},"\u4e0b\u4e00\u9898"))}function m(e){var t,a,n=e.currentExam,c=0===n.compare?"\u9519\u8bef":"\u6b63\u786e";return n.options.map(function(e,i){n.answer_id===e.opt_id&&(a=i),0!==n.user_answer&&n.user_answer===e.opt_id&&(t=s.a.createElement("span",null,"\u60a8\u7684\u7b54\u6848\u662f".concat(String.fromCharCode(Number(i)+65),"\uff0c")))}),0===n.user_answer&&(t=s.a.createElement("span",null,"\u60a8\u7684\u7b54\u6848\u662f\u7a7a\uff0c")),s.a.createElement("div",{className:"test-resolve"},s.a.createElement("div",{className:"isRight"},s.a.createElement("span",null,"\u6b63\u786e\u7b54\u6848\u662f".concat(String.fromCharCode(Number(a)+65),"\uff0c")),t,s.a.createElement("span",null,"\u56de\u7b54".concat(c,"\u3002"))),s.a.createElement("p",null,"\u89e3\u6790"),s.a.createElement("div",{className:"resolve-content",dangerouslySetInnerHTML:{__html:"".concat(i(n.analysis))}}))}}}]);
//# sourceMappingURL=Classify.dc10b929.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1145:function(e,t,a){},1146:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAMAAADNlS1EAAAA+VBMVEUAAADeP03XQVEDmP38MjMGl/rSQ1Uhi+QJlfj9MjIsh9sGl/o6gtD/MTEYj+zoOkTxNzw6gtAIlvn8MjNQeL+wUXGAZZgnieCAZJg3g9LJSF0rh9x5aJ6HYpPfPktDfsm8TGhec7ShV3wNk/PxNjxdc7ShV3y7TGdDfskgi+XePkt4Z52GYpM2g9PIR10Ok/PxNjyUXYdrbajoOkQXkOwXkOzoO0M3g9LJR13UQ1TePksXkO0Nk/Qhi+QshtzePkzxNjz5MzbnO0RqbamUXIivUXI2g9NDfslQeL9dc7R4aJ6GYpKiV328TGfJR13UQlPoOkNQeb7pOkQ6pR5tAAAAO3RSTlMABo85Of3w7JGRjO7u7u3t7ZGDg09PMBUV+vrz7+/q397X18/Pv7+1tKSjmZh9fHd2cnFmZTQ0KCgbEL1XwbEAAADqSURBVBjTXZHlssIwFAZpqVDc4bq7+wXa4nUB3v9h+HKAYZL9k52dZJI5yfBk61m2SEapZEi7pqoqq8YYNLbxyjTNN6zVEahu2vcA/EAqE1Ch1tEty3pgJg+BTDFv2/ZRhy6SNU2mi/4OHMd5yfDcu657JrSm5y29phAvfN+/EdrnFLT51j0OguBJ2PgchuFJl2/tGfgQNt5GUXQp8a01By2+SedxHN8Jh1+TJDn8J60VizWSnpam6W4mIM/sEXM67VPULaBDfieLxeoLAsoDUIa8Y/TX2+fkTFCHKPgkhRWqhUKORGlQ27MGJhAis32Nv3oAAAAASUVORK5CYII="},1164:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(7),c=a(8),r=a(11),o=a(9),l=a(10),m=a(0),u=a.n(m),d=a(70),p=(a(1145),a(4)),h=a(16),f=a(30),E=a(63),v=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).state={camp:[],employment:[],basics:[],advanced:[],special:[],isLoading:!0},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=this;p.c.get("".concat(API.home,"/m/course/classify/").concat(1)).then(function(t){200===t.data.code?(e.setState({isLoading:!1}),t.data.data.common.length>0&&e.setState({basics:t.data.data.common[0],advanced:t.data.data.common[1]||[]}),t.data.data.special.length>0&&e.setState({camp:t.data.data.special[0],employment:t.data.data.special[1]||[],special:t.data.data.special[2]||[]})):s.a.info(t.data.msg,2)})}},{key:"render",value:function(){return u.a.createElement("div",{className:"class-box"},u.a.createElement(f.e,{title:"\u5206\u7c7b",arrow:!1,cart:!1}),u.a.createElement(E.a,{isLoading:this.state.isLoading},u.a.createElement(b,{data:this.state.camp.list,title:this.state.camp.name,type:1}),u.a.createElement(b,{data:this.state.employment.list,title:this.state.employment.name,type:1}),u.a.createElement(b,{data:this.state.basics.list,title:this.state.basics.name,type:2}),u.a.createElement(b,{data:this.state.advanced.list,title:this.state.advanced.name,type:2}),u.a.createElement("div",{className:"vip"},this.state.special.list&&this.state.special.list.length>0&&this.state.special.list.map(function(e,t){return u.a.createElement(h.b,{key:t,to:"/detail?id=".concat(e.course_id)},u.a.createElement("img",{src:e.course_img,alt:""}))}))))}}]),t}(m.Component);function g(e){var t=e.data;return u.a.createElement("div",{className:"items-box"},t&&t.length>0&&t.map(function(e,t){return u.a.createElement(h.b,{to:"/detail?id=".concat(e.course_id),key:t,className:"item-banner"},u.a.createElement("img",{src:e.course_img,alt:""}),e.is_aist&&u.a.createElement("span",{className:"return_cash"}))}))}function x(e){return u.a.createElement("div",{className:"items-box"},e.data&&e.data.length>0&&e.data.map(function(e,t){return u.a.createElement(h.b,{to:"/courselist?id=".concat(e.c_id,"&name=").concat(e.c_name),key:t,className:"item-label"},e.c_name)}))}function b(e){return u.a.createElement("div",{className:"class-course"},u.a.createElement("p",{className:"course-items-title"},u.a.createElement("img",{src:a(1146),alt:""}),e.title),1===e.type&&u.a.createElement(g,{data:e.data}),2===e.type&&u.a.createElement(x,{data:e.data}))}t.default=Object(d.b)(v)},1165:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(7),c=a(8),r=a(11),o=a(9),l=a(10),m=a(0),u=a.n(m),d=a(4),p=(a(770),a(20)),h=a(771),f=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).close=function(){a.state.showCard?(a.setState({showCard:!1}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="static"):a.props.history.push("/detail?id=".concat(a.course_id))},a.checkOption=function(e){var t=a.state.numberList;a.answerList.map(function(t){return Number(t.questionId)===Number(e.ques_id)&&(t.answerId=e.opt_id),t}),t.push(e.ques_id),a.setState({currentQuestionOption:e.opt_id,numberList:t})},a.preQuestion=function(){var e=a.state.questionIndex;1!==e&&a.setState({questionIndex:e-1,currentExam:a.state.examList[e-2],currentQuestionOption:a.answerList[e-2].answerId})},a.nextQuestion=function(){var e=a.state.questionIndex;e!==a.state.examList.length?a.setState({questionIndex:e+1,currentExam:a.state.examList[e],currentQuestionOption:a.answerList[e].answerId}):a.setState({showCard:!0})},a.jumpItem=function(e,t){a.setState({showCard:!1,questionIndex:t+1,currentExam:a.state.examList[t],currentQuestionOption:a.answerList[t].answerId})},a.commit=function(){var e={};e.video_id=a.keshi_id,e.qid=a.qid,e.cost_time=a.time,e.uid=a.props.user.data.uid,e.answer_record=a.answerList,d.c.post("".concat(API.home,"/m/aist/submit"),e).then(function(e){200===e.data.code?a.props.history.push("/campResolve?keshi_id=".concat(a.keshi_id,"&qid=").concat(a.qid)):s.a.info(e.data.msg,2)})},a.showCard=function(){a.setState({showCard:!0}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="fixed"},a.getUseTime=function(e){var t,n,s;if(t="".concat(parseInt(e/3600)).padStart(2,0),n="".concat(parseInt((e-3600*t)/60)).padStart(2,0),s="".concat(parseInt(e-3600*t-60*n)).padStart(2,0),86400!==e)return e<3600?"".concat(n,":").concat(s):"".concat(t,":").concat(n,":").concat(s);clearInterval(a.useTimeInterval),a.useTimeInterval=null},a.state={examList:[],currentExam:{},currentQuestionOption:{},questionIndex:1,numberList:[],qtitle:"",useTime:"00:00",showCard:!1},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.keshi_id=Object(d.b)("keshi_id"),this.qidP=Object(d.b)("qid");var t=this;d.c.get("".concat(API.home,"/m/aist/get_questions/").concat(this.keshi_id,"/").concat(this.qidP)).then(function(a){if(4040!==a.data.code)if(200===a.data.code){var n=a.data.data;e.qid=n.id,e.course_id=n.course_id,e.setState({examList:n.list,qtitle:n.qtitle,currentExam:n.list[0]}),t.answerList=[],n.list.map(function(e){var a={};a.questionId=e.id,a.answerId=0,t.answerList.push(a)}),t.time=0,t.useTimeInterval=setInterval(function(){t.time+=1,t.setState({useTime:t.getUseTime(t.time)})},1e3)}else s.a.info(a.data.msg,2,function(){e.props.history.push("/")});else s.a.info(a.data.msg,2,function(){e.props.history.push("/passport")})})}},{key:"render",value:function(){var e=this,t=this.state,a=t.qtitle,n=t.currentExam,s=t.currentQuestionOption,i=t.questionIndex,c=t.examList,r=t.useTime,o=t.showCard,l=t.numberList;return u.a.createElement("div",{className:"camp-test-container"},u.a.createElement("div",{className:"fixed_container"},u.a.createElement(h.c,{time:r,showCardEve:this.showCard,close:this.close,showCard:o}),u.a.createElement(h.a,{qtitle:a,questionIndex:i,examList:c})),u.a.createElement(h.e,{questionIndex:i,checkOption:this.checkOption,currentExam:n,currentQuestionOption:s}),u.a.createElement(h.b,{preQuestion:this.preQuestion,nextQuestion:this.nextQuestion,questionIndex:i}),o&&u.a.createElement("div",{className:"test-card-container"},u.a.createElement("p",null,"\u8bfe\u540e\u7ec3\u4e60\uff1a".concat(a)),u.a.createElement("ul",{className:"test-item"},c.map(function(t,a){return u.a.createElement("li",{key:t.id,onClick:function(){e.jumpItem(t,a)},className:"layout-flex-center ".concat(l.includes(t.id)?"answered":"")},a+1)})),u.a.createElement("div",{className:"bottom_commit"},u.a.createElement("div",{onClick:this.commit,className:"commit_answer layout-flex-center"},"\u63d0\u4ea4\u5e76\u67e5\u770b\u7ed3\u679c"))))}}]),t}(m.Component);t.default=Object(p.b)(function(e){return{user:e.user}},null)(f)},1166:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(7),c=a(8),r=a(11),o=a(9),l=a(10),m=a(0),u=a.n(m),d=a(4),p=(a(770),a(771)),h=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).showCard=function(){a.setState({showCard:!0}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="fixed"},a.close=function(){a.state.showCard?(a.setState({showCard:!1}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="static"):a.props.history.push("/detail?id=".concat(a.course_id),{href:"/purchased"})},a.checkOption=function(){},a.preQuestion=function(){var e=a.state.questionIndex;1!==e&&a.setState({questionIndex:e-1,currentExam:a.state.examList[e-2],currentQuestionOption:a.answerList[e-2].answerId})},a.nextQuestion=function(){var e=a.state.questionIndex;e!==a.state.examList.length?a.setState({questionIndex:e+1,currentExam:a.state.examList[e],currentQuestionOption:a.answerList[e].answerId}):a.setState({showCard:!0})},a.jumpItem=function(e,t){a.setState({showCard:!1,questionIndex:t+1,currentExam:a.state.examList[t],currentQuestionOption:a.answerList[t].answerId})},a.formatTime=function(e){var t=e.split(":"),a="".concat(Number(t[1]),"\u5206").concat(t[2],"\u79d2");return 0!==Number(t[0])&&(a="".concat(Number(t[0]),"\u65f6").concat(a)),a},a.state={examList:[],currentExam:{},currentQuestionOption:{},questionIndex:1,numberList:[],qtitle:"",useTime:"00:00",showCard:!1,rightRate:0},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.keshi_id=Object(d.b)("keshi_id"),this.qidP=Object(d.b)("qid");var t=this;d.c.get("".concat(API.home,"/m/aist/analysis/").concat(this.keshi_id,"/").concat(this.qidP)).then(function(a){if(console.log(a),4040!==a.data.code)if(200===a.data.code){var n=a.data.data;e.course_id=n.course_id,t.answerList=[],e.rightNumber=0,n.list.map(function(a){1===a.compare&&e.rightNumber++;var n={};n.questionId=a.id,n.answerId=0,t.answerList.push(n)}),e.setState({examList:n.list,qtitle:n.qtitle,currentExam:n.list[0],useTime:n.cost_time,rightRate:(e.rightNumber/n.list.length*100).toFixed(0)})}else s.a.info(a.data.msg,2,function(){e.props.history.push("/")});else s.a.info(a.data.msg,2,function(){e.props.history.push("/passport")})})}},{key:"render",value:function(){var e=this,t=this.state,a=t.qtitle,n=t.currentExam,s=t.currentQuestionOption,i=t.questionIndex,c=t.examList,r=t.useTime,o=t.showCard,l=t.rightRate;return u.a.createElement("div",{className:"camp-test-container"},u.a.createElement("div",{className:"fixed_container"},u.a.createElement(p.c,{time:r,showCardEve:this.showCard,close:this.close,showCard:o}),u.a.createElement(p.a,{qtitle:a,questionIndex:i,examList:c})),u.a.createElement(p.e,{questionIndex:i,checkOption:this.checkOption,currentExam:n,currentQuestionOption:s},n&&n.options&&u.a.createElement(p.d,{currentExam:n})),u.a.createElement(p.b,{preQuestion:this.preQuestion,nextQuestion:this.nextQuestion,questionIndex:i}),o&&u.a.createElement("div",{className:"test-resolve-card-container"},u.a.createElement("div",{className:"camp-test-header layout-flex-between"},u.a.createElement("div",null,u.a.createElement("i",{onClick:this.close,className:"iconfont iconiconfront-77 icon-close"})),u.a.createElement("div",{className:"layout-flex-center camp-test-time"},u.a.createElement("span",{style:{fontSize:"17px",color:"#333333"}},"\u7ec3\u4e60\u62a5\u544a")),u.a.createElement("div",{className:"icon icon-order no_height"})),u.a.createElement("div",{className:"report-body"},u.a.createElement("div",{className:"right_rate"},u.a.createElement("span",{className:"rate"},"\u6b63\u786e\u7387"),u.a.createElement("div",{className:"percentage"},u.a.createElement("span",null,l),u.a.createElement("span",null,"%"))),u.a.createElement("p",{className:"use_total_time"},"\u7d2f\u8ba1\u7528\u65f6".concat(this.formatTime(r))),u.a.createElement("ul",{className:"right_wrong_li"},c.map(function(t,a){return u.a.createElement("li",{onClick:function(){e.jumpItem(t,a)},className:"layout-flex-center ".concat(t.answer_id===t.user_answer?"right":"wrong"," ").concat(0===t.user_answer?"noSelect":""),key:t.answer_id},a+1)}))),u.a.createElement("div",{className:"camp-report-bottom"},u.a.createElement("div",{className:"bottom_commit layout-flex-center"},u.a.createElement("div",{onClick:this.close,className:"commit_answer layout-flex-center"},"\u9898\u76ee\u89e3\u6790")))))}}]),t}(m.Component);t.default=h},770:function(e,t,a){},771:function(e,t,a){"use strict";a.d(t,"c",function(){return c}),a.d(t,"a",function(){return r}),a.d(t,"e",function(){return o}),a.d(t,"b",function(){return l}),a.d(t,"d",function(){return m});var n=a(0),s=a.n(n);function i(e){return e&&(e.includes("<img")&&(e=e.replace(/<img/g,"<img style='width: 100%'")),e=(e=(e=(e=(e=e.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/&amp;gt;/g,"")).replace(/&quot;/g,'"')).replace(/&amp;nbsp;/g,"")),e}function c(e){return s.a.createElement("div",{className:"camp-test-header layout-flex-between"},s.a.createElement("div",null,s.a.createElement("i",{onClick:e.close,className:"iconfont iconiconfront-77 icon-close"})),s.a.createElement("div",{className:"layout-flex-center camp-test-time"},s.a.createElement("i",{className:"icon icon-clock"}),s.a.createElement("span",null,e.time)),s.a.createElement("div",{onClick:e.showCardEve,className:"icon icon-order ".concat(e.showCard?"no_height":"")}))}function r(e){return s.a.createElement("div",{className:"layout-flex-between camp-test-title"},s.a.createElement("div",{className:"qtitle"},"\u8bfe\u540e\u7ec3\u4e60\uff1a".concat(e.qtitle)),s.a.createElement("div",{className:"qnumber"},"".concat(e.questionIndex,"/").concat(e.examList.length)))}function o(e){var t=e.questionIndex,a=e.currentExam,n=e.currentQuestionOption;return s.a.createElement("div",{className:"test-item-container"},s.a.createElement("div",{className:"ques item-title",dangerouslySetInnerHTML:{__html:"".concat(t,".").concat(i(a.ques))}}),s.a.createElement("ul",null,a.options&&a.options.map(function(t,c){return s.a.createElement("li",{key:c,onClick:function(){return e.checkOption(t)},className:"\n ".concat(n===t.opt_id?"option_checked":"","\n ").concat(0!==a.user_answer&&!a.user_answer||a.user_answer!==t.opt_id?"":"user_check","\n ").concat(0!==a.user_answer&&!a.user_answer||a.answer_id!==t.opt_id?"":"right_check","\n ")},s.a.createElement("span",{className:"letter"},String.fromCharCode(Number(c)+65)),s.a.createElement("span",{className:"des",dangerouslySetInnerHTML:{__html:i(t.des)}}))})),e.children)}function l(e){return s.a.createElement("div",{className:"layout-flex-around change_question_container"},s.a.createElement("div",{onClick:e.preQuestion,className:"change_button pre_question ".concat(1===e.questionIndex?"first_question":"")},"\u4e0a\u4e00\u9898"),s.a.createElement("div",{onClick:e.nextQuestion,className:"change_button next_question"},"\u4e0b\u4e00\u9898"))}function m(e){var t,a,n=e.currentExam,c=0===n.compare?"\u9519\u8bef":"\u6b63\u786e";return n.options.map(function(e,i){n.answer_id===e.opt_id&&(a=i),0!==n.user_answer&&n.user_answer===e.opt_id&&(t=s.a.createElement("span",null,"\u60a8\u7684\u7b54\u6848\u662f".concat(String.fromCharCode(Number(i)+65),"\uff0c")))}),0===n.user_answer&&(t=s.a.createElement("span",null,"\u60a8\u7684\u7b54\u6848\u662f\u7a7a\uff0c")),s.a.createElement("div",{className:"test-resolve"},s.a.createElement("div",{className:"isRight"},s.a.createElement("span",null,"\u6b63\u786e\u7b54\u6848\u662f".concat(String.fromCharCode(Number(a)+65),"\uff0c")),t,s.a.createElement("span",null,"\u56de\u7b54".concat(c,"\u3002"))),s.a.createElement("p",null,"\u89e3\u6790"),s.a.createElement("div",{className:"resolve-content",dangerouslySetInnerHTML:{__html:"".concat(i(n.analysis))}}))}}}]);
//# sourceMappingURL=Classify.da3edf64.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/classify/image/tips.png","components/classify/index.js","components/video/camp/campTest.js","components/video/camp/campResolve.js","components/video/camp/common/common.js"],"names":["module","exports","Classify","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","state","camp","employment","basics","advanced","special","isLoading","_this2","http","get","concat","API","home","then","res","data","code","setState","common","length","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_12__","title","arrow","cart","_common_Loading__WEBPACK_IMPORTED_MODULE_13__","ClassCourseBox","list","name","type","map","item","index","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","key","to","course_id","src","course_img","alt","Component","ClassCourseA","_ref","is_aist","ClassCourseB","c_id","c_name","require","WithTab","CampTest","close","showCard","body","document","getElementsByTagName","style","position","history","push","checkOption","checkItem","numberList","answerList","Number","questionId","ques_id","answerId","opt_id","currentQuestionOption","preQuestion","questionIndex","currentExam","examList","nextQuestion","jumpItem","commit","video_id","keshi_id","qid","cost_time","time","uid","user","answer_record","post","getUseTime","date","hours","minutes","seconds","parseInt","padStart","clearInterval","useTimeInterval","qtitle","useTime","getParam","qidP","id","obj","setInterval","_this3","_this$state","_common_common__WEBPACK_IMPORTED_MODULE_11__","showCardEve","onClick","includes","connect","CampResolve","href","formatTime","ary","split","str","rightRate","console","log","rightNumber","compare","toFixed","_common_common__WEBPACK_IMPORTED_MODULE_10__","options","fontSize","color","answer_id","user_answer","__webpack_require__","d","__webpack_exports__","Header","CampTitle","TestItem","ChangeQuestion","Resolve","react__WEBPACK_IMPORTED_MODULE_0__","react__WEBPACK_IMPORTED_MODULE_0___default","n","format","content","replace","dangerouslySetInnerHTML","__html","ques","String","fromCharCode","des","children","UserIndex","rightI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js","sourcesContent":["module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAMAAADNlS1EAAAA+VBMVEUAAADeP03XQVEDmP38MjMGl/rSQ1Uhi+QJlfj9MjIsh9sGl/o6gtD/MTEYj+zoOkTxNzw6gtAIlvn8MjNQeL+wUXGAZZgnieCAZJg3g9LJSF0rh9x5aJ6HYpPfPktDfsm8TGhec7ShV3wNk/PxNjxdc7ShV3y7TGdDfskgi+XePkt4Z52GYpM2g9PIR10Ok/PxNjyUXYdrbajoOkQXkOwXkOzoO0M3g9LJR13UQ1TePksXkO0Nk/Qhi+QshtzePkzxNjz5MzbnO0RqbamUXIivUXI2g9NDfslQeL9dc7R4aJ6GYpKiV328TGfJR13UQlPoOkNQeb7pOkQ6pR5tAAAAO3RSTlMABo85Of3w7JGRjO7u7u3t7ZGDg09PMBUV+vrz7+/q397X18/Pv7+1tKSjmZh9fHd2cnFmZTQ0KCgbEL1XwbEAAADqSURBVBjTXZHlssIwFAZpqVDc4bq7+wXa4nUB3v9h+HKAYZL9k52dZJI5yfBk61m2SEapZEi7pqoqq8YYNLbxyjTNN6zVEahu2vcA/EAqE1Ch1tEty3pgJg+BTDFv2/ZRhy6SNU2mi/4OHMd5yfDcu657JrSm5y29phAvfN+/EdrnFLT51j0OguBJ2PgchuFJl2/tGfgQNt5GUXQp8a01By2+SedxHN8Jh1+TJDn8J60VizWSnpam6W4mIM/sEXM67VPULaBDfieLxeoLAsoDUIa8Y/TX2+fkTFCHKPgkhRWqhUKORGlQ27MGJhAis32Nv3oAAAAASUVORK5CYII=\"","import React, {Component} from 'react';\nimport {WithTab} from '@/HOCs'\nimport './index.scss';\nimport {http} from \"@/utils\";\nimport {Link} from 'react-router-dom'\nimport {Toast} from 'antd-mobile'\nimport {HeaderBar} from \"@/common\"\nimport Loading from '@/common/Loading'\n\n\nclass Classify extends Component {\n constructor(props) {\n super(props)\n this.state = {\n camp: [],\n employment: [],\n basics: [],\n advanced: [],\n special: [],\n isLoading: true\n }\n }\n\n componentDidMount() {\n let data = 1\n http.get(`${API.home}/m/course/classify/${data}`,).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n isLoading: false\n })\n\n if (res.data.data.common.length > 0) {\n this.setState({\n basics: res.data.data.common[0],\n advanced: res.data.data.common[1] || [],\n })\n }\n if (res.data.data.special.length > 0) {\n this.setState({\n camp: res.data.data.special[0],\n employment: res.data.data.special[1] || [],\n special: res.data.data.special[2] || [],\n })\n \n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n\n render() {\n return (\n <div className='class-box'>\n <HeaderBar title='分类' arrow={false} cart={false}></HeaderBar>\n <Loading isLoading={this.state.isLoading}>\n <ClassCourseBox data={this.state.camp.list} title={this.state.camp.name} type={1}/>\n <ClassCourseBox data={this.state.employment.list} title={this.state.employment.name} type={1}/>\n <ClassCourseBox data={this.state.basics.list} title={this.state.basics.name} type={2}/>\n <ClassCourseBox data={this.state.advanced.list} title={this.state.advanced.name} type={2}/>\n <div className=\"vip\">\n {this.state.special.list && this.state.special.list.length > 0 && this.state.special.list.map((item, index) => {\n return (\n <Link key={index} to={`/detail?id=${item.course_id}`}>\n <img src={item.course_img} alt=\"\"/>\n </Link>\n )\n })\n }\n </div>\n </Loading>\n </div>\n )\n }\n}\n\n// 课程图片形式展示 点击图片直接跳转课程详情页面\nfunction ClassCourseA({data}) {\n return (\n <div className='items-box'>\n {\n data && data.length > 0 && data.map((item, index) => {\n return (\n <Link to={`/detail?id=${item.course_id}`} key={index} className='item-banner'>\n <img src={item.course_img} alt=\"\"/>\n {\n (item.is_aist &&\n <span className='return_cash'></span>)\n }\n </Link>\n )\n })\n }\n </div>\n )\n}\n\n// 课程标签的形式展示 点击标签跳转分类详情页面\nfunction ClassCourseB(props) {\n return (\n <div className='items-box'>\n {\n props.data && props.data.length > 0 && props.data.map((item, index) => {\n return (\n <Link to={`/courselist?id=${item.c_id}&name=${item.c_name}`} key={index} className='item-label'>\n {item.c_name}\n </Link>\n )\n })\n }\n </div>\n )\n}\n\nfunction ClassCourseBox(props) {\n return (\n <div className=\"class-course\">\n <p className='course-items-title'>\n <img src={require('./image/tips.png')} alt=\"\"/>\n {props.title}\n </p>\n {props.type === 1 &&\n <ClassCourseA data={props.data}/>\n }\n {props.type === 2 &&\n <ClassCourseB data={props.data}/>\n }\n </div>\n )\n}\n\nexport default WithTab(Classify);\n","import React, {Component} from 'react';\nimport {getParam, http, browser} from \"@/utils\";\nimport './camp.scss';\nimport {connect} from \"react-redux\";\nimport {Header, CampTitle, TestItem, ChangeQuestion} from './common/common';\nimport { Toast } from 'antd-mobile';\n\nclass CampTest extends Component {\n constructor(props) {\n super(props);\n this.state = {\n examList: [], // 问题列表\n currentExam: {}, // 当前要展示的问题\n currentQuestionOption: {}, // 切换题目时 用来存储当前问题的选项\n questionIndex: 1, // 第几个问题\n numberList: [],// 答题的题号\n qtitle: \"\",\n useTime: '00:00',\n showCard: false,\n }\n }\n componentDidMount() {\n this.keshi_id = getParam('keshi_id');\n this.qidP = getParam('qid');\n let _this = this;\n // 获取问题列表\n http.get(`${API.home}/m/aist/get_questions/${this.keshi_id}/${this.qidP}`).then(res => {\n if(res.data.code === 4040) {\n Toast.info(res.data.msg, 2, () => {\n this.props.history.push('/passport');\n });\n return;\n }else if(res.data.code !== 200){\n Toast.info(res.data.msg, 2, () => {\n this.props.history.push('/');\n });\n return;\n }\n let data = res.data.data;\n this.qid = data.id;\n this.course_id = data.course_id;\n this.setState({\n examList: data.list,\n qtitle: data.qtitle,\n currentExam: data.list[0],\n });\n _this.answerList = [];\n data.list.map(item => {\n let obj = {};\n obj.questionId = item.id;\n obj.answerId = 0;\n _this.answerList.push(obj);\n });\n _this.time = 0;\n _this.useTimeInterval = setInterval(function () {\n _this.time += 1;\n // _this.useTime = _this.getUseTime(_this.time);\n _this.setState({\n useTime: _this.getUseTime(_this.time)\n })\n }, 1000);\n });\n };\n // 关闭按钮\n close = () => {\n let isShow = this.state.showCard;\n if(isShow) {\n this.setState({\n showCard: false\n });\n this.body = document.getElementsByTagName('body')[0];\n this.body.style.position = 'static';\n } else {\n this.props.history.push(`/detail?id=${this.course_id}`)\n }\n };\n // 选择答案\n checkOption = (checkItem) => {\n let list = this.state.numberList;\n this.answerList.map(function (item) {\n if (Number(item.questionId) === Number(checkItem.ques_id)) {\n item.answerId = checkItem.opt_id;\n }\n return item;\n });\n list.push(checkItem.ques_id);\n this.setState({\n currentQuestionOption: checkItem.opt_id,\n numberList: list\n });\n };\n // 上一题\n preQuestion = () => {\n let index = this.state.questionIndex;\n if(index === 1) {\n return;\n }\n this.setState({\n questionIndex: index - 1,\n currentExam: this.state.examList[index - 2],\n currentQuestionOption: this.answerList[index - 2].answerId,\n });\n };\n // 下一题\n nextQuestion = () => {\n let index = this.state.questionIndex;\n if(index === this.state.examList.length) {\n this.setState({\n showCard: true\n });\n return;\n }\n this.setState({\n questionIndex: index + 1,\n currentExam: this.state.examList[index],\n currentQuestionOption: this.answerList[index].answerId,\n });\n };\n // 通过答题卡的卡号跳转到对应的题目\n jumpItem = (item, index) => {\n this.setState({\n showCard: false,\n questionIndex: index + 1,\n currentExam: this.state.examList[index],\n currentQuestionOption: this.answerList[index].answerId,\n })\n };\n // 提交\n commit = () => {\n let data = {};\n data.video_id = this.keshi_id;\n data.qid = this.qid;\n data.cost_time = this.time;\n data.uid = this.props.user.data.uid;\n data.answer_record = this.answerList;\n http.post(`${API.home}/m/aist/submit`, data).then((res) => {\n if(res.data.code === 200) {\n this.props.history.push(`/campResolve?keshi_id=${this.keshi_id}&qid=${this.qid}`)\n }else{\n Toast.info(res.data.msg, 2);\n }\n });\n };\n // 显示答题卡\n showCard = () => {\n this.setState({\n showCard: true\n });\n this.body = document.getElementsByTagName('body')[0];\n this.body.style.position = 'fixed';\n };\n // 答题用时的格式化\n getUseTime = (date) => {\n let hours = 0,\n minutes = 0,\n seconds = 0;\n hours = `${parseInt(date / (60 * 60))}`.padStart(2, 0);\n minutes = `${parseInt((date - hours * 3600) / 60)}`.padStart(2, 0);\n seconds = `${parseInt((date - hours * 3600 - minutes * 60))}`.padStart(2, 0);\n if (date === 3600 * 24) {\n clearInterval(this.useTimeInterval);\n this.useTimeInterval = null;\n } else {\n if (date < 3600) {\n return `${minutes}:${seconds}`\n } else {\n return `${hours}:${minutes}:${seconds}`\n }\n }\n };\n\n\n render() {\n let {qtitle, currentExam, currentQuestionOption, questionIndex, examList, useTime, showCard, numberList} = this.state;\n return (\n <div className='camp-test-container'>\n <div className={'fixed_container'}>\n {/*关闭按钮 时间 答题卡*/}\n <Header time={useTime} showCardEve={this.showCard} close={this.close} showCard={showCard} />\n\n {/*课后练习题 当前题目 题目总数*/}\n <CampTitle qtitle={qtitle} questionIndex={questionIndex} examList={examList}/>\n </div>\n\n {/*题目*/}\n <TestItem questionIndex={questionIndex} checkOption={this.checkOption} currentExam={currentExam} currentQuestionOption={currentQuestionOption} />\n {/*切换题目*/}\n <ChangeQuestion preQuestion={this.preQuestion} nextQuestion={this.nextQuestion} questionIndex={questionIndex} />\n {/* 答题卡 */}\n {\n showCard && (\n <div className='test-card-container' >\n <p>{`课后练习:${qtitle}`}</p>\n <ul className={'test-item'}>\n {\n examList.map((item, index) => {\n return <li key={item.id} onClick={() => {this.jumpItem(item, index)}} className={`layout-flex-center ${numberList.includes(item.id) ? 'answered' : ''}`}>{index + 1}</li>\n })\n }\n </ul>\n <div className={'bottom_commit'}>\n <div onClick={this.commit} className={'commit_answer layout-flex-center'}>提交并查看结果</div>\n </div>\n </div>\n )\n }\n\n </div>\n );\n }\n}\n\nexport default connect(\n state => ({user: state.user}),\n null\n)(CampTest)","import React, {Component} from 'react';\nimport {getParam, http, browser} from \"@/utils\";\nimport './camp.scss';\nimport {CampTitle, Header, TestItem, ChangeQuestion, Resolve} from './common/common';\nimport {Toast} from \"antd-mobile\";\n\nclass CampResolve extends Component {\n constructor(props) {\n super(props);\n this.state = {\n examList: [], // 问题列表\n currentExam: {}, // 当前要展示的问题\n currentQuestionOption: {}, // 切换题目时 用来存储当前问题的选项\n questionIndex: 1, // 第几个问题\n numberList: [],// 答题的题号\n qtitle: \"\",\n useTime: '00:00',\n showCard: false,\n rightRate: 0,\n }\n }\n showCard = () => {\n this.setState({\n showCard: true\n });\n this.body = document.getElementsByTagName('body')[0];\n this.body.style.position = 'fixed';\n };\n close = () => {\n let isShow = this.state.showCard;\n if(isShow) {\n this.setState({\n showCard: false\n });\n this.body = document.getElementsByTagName('body')[0];\n this.body.style.position = 'static';\n } else {\n this.props.history.push(`/detail?id=${this.course_id}`,{href: '/purchased'})\n }\n };\n componentDidMount() {\n this.keshi_id = getParam('keshi_id');\n this.qidP = getParam('qid');\n let _this = this;\n // 获取问题列表\n http.get(`${API.home}/m/aist/analysis/${this.keshi_id}/${this.qidP}`).then(res => {\n console.log(res);\n if(res.data.code === 4040) {\n Toast.info(res.data.msg, 2, () => {\n this.props.history.push('/passport');\n });\n return;\n }else if(res.data.code !== 200){\n Toast.info(res.data.msg, 2, () => {\n this.props.history.push('/');\n });\n return;\n }\n let data = res.data.data;\n this.course_id = data.course_id;\n _this.answerList = [];\n this.rightNumber = 0;\n data.list.map(item => {\n if(item.compare === 1) {\n this.rightNumber++;\n }\n let obj = {};\n obj.questionId = item.id;\n obj.answerId = 0;\n _this.answerList.push(obj);\n });\n this.setState({\n examList: data.list,\n qtitle: data.qtitle,\n currentExam: data.list[0],\n useTime: data.cost_time,\n rightRate: (this.rightNumber/data.list.length * 100).toFixed(0)\n });\n });\n };\n checkOption = () => {};\n preQuestion = () => {\n let index = this.state.questionIndex;\n if(index === 1) {\n return;\n }\n this.setState({\n questionIndex: index - 1,\n currentExam: this.state.examList[index - 2],\n currentQuestionOption: this.answerList[index - 2].answerId,\n });\n };\n nextQuestion = () => {\n let index = this.state.questionIndex;\n if(index === this.state.examList.length) {\n this.setState({\n showCard: true\n });\n return;\n }\n this.setState({\n questionIndex: index + 1,\n currentExam: this.state.examList[index],\n currentQuestionOption: this.answerList[index].answerId,\n });\n };\n // 通过答题卡的卡号跳转到对应的题目\n jumpItem = (item, index) => {\n this.setState({\n showCard: false,\n questionIndex: index + 1,\n currentExam: this.state.examList[index],\n currentQuestionOption: this.answerList[index].answerId,\n })\n };\n formatTime = (time) => {\n let ary = time.split(':');\n let str = `${Number(ary[1])}分${ary[2]}秒`;\n if(Number(ary[0]) !== 0) {\n str = `${Number(ary[0])}时${str}`\n }\n return str;\n };\n render() {\n let {qtitle, currentExam, currentQuestionOption, questionIndex, examList, useTime, showCard, rightRate} = this.state;\n return (\n <div className='camp-test-container'>\n <div className={'fixed_container'}>\n <Header time={useTime} showCardEve={this.showCard} close={this.close} showCard={showCard} />\n <CampTitle qtitle={qtitle} questionIndex={questionIndex} examList={examList}/>\n </div>\n <TestItem questionIndex={questionIndex} checkOption={this.checkOption} currentExam={currentExam} currentQuestionOption={currentQuestionOption} >\n {\n currentExam && currentExam.options && <Resolve currentExam={currentExam}/>\n }\n </TestItem>\n <ChangeQuestion preQuestion={this.preQuestion} nextQuestion={this.nextQuestion} questionIndex={questionIndex} />\n {\n showCard && (\n <div className='test-resolve-card-container' >\n <div className={'camp-test-header layout-flex-between'}>\n <div><i onClick={this.close} className={'iconfont iconiconfront-77 icon-close'} /></div>\n <div className='layout-flex-center camp-test-time'>\n <span style={{fontSize: '17px', color: '#333333'}}>{'练习报告'}</span>\n </div>\n <div className={`icon icon-order no_height`} />\n </div>\n\n <div className={'report-body'}>\n <div className={'right_rate'}>\n <span className={'rate'}>正确率</span>\n <div className={'percentage'}>\n <span>{rightRate}</span>\n <span>%</span>\n </div>\n </div>\n\n <p className={'use_total_time'}>{`累计用时${this.formatTime(useTime)}`}</p>\n\n <ul className={'right_wrong_li'}>\n {\n examList.map((item, index) => {\n return <li onClick={() => {this.jumpItem(item, index)}} className={`layout-flex-center ${item.answer_id === item.user_answer ? 'right' : 'wrong'} ${item.user_answer === 0 ? 'noSelect' : ''}`} key={item.answer_id}>{index + 1}</li>\n })\n }\n </ul>\n </div>\n\n <div className={'camp-report-bottom'}>\n <div className={'bottom_commit layout-flex-center'}>\n <div onClick={this.close} className={'commit_answer layout-flex-center'}>题目解析</div>\n </div>\n </div>\n </div>\n )\n }\n </div>\n );\n }\n}\n\nexport default CampResolve;","import React from 'react';\nfunction format(content) {\n if(content) {\n if(content.includes(\"<img\")) {\n content = content.replace(/<img/g, \"<img style='width: 100%'\");\n }\n content = content.replace(/&lt;/g , '<');\n content = content.replace(/&gt;/g , '>');\n content = content.replace(/&amp;gt;/g , '');\n content = content.replace(/&quot;/g , '\"');\n content = content.replace(/&amp;nbsp;/g , '');\n }\n return content;\n}\n\nfunction Header(props) {\n return (\n <div className='camp-test-header layout-flex-between'>\n <div><i onClick={props.close} className={'iconfont iconiconfront-77 icon-close'} /></div>\n <div className='layout-flex-center camp-test-time'>\n <i className='icon icon-clock' />\n <span>{props.time}</span>\n </div>\n <div onClick={props.showCardEve} className={`icon icon-order ${props.showCard ? 'no_height' : ''}`} />\n </div>\n );\n}\n\nfunction CampTitle(props) {\n return (\n <div className='layout-flex-between camp-test-title'>\n <div className='qtitle'>{`课后练习:${props.qtitle}`}</div>\n <div className='qnumber'>{`${props.questionIndex}/${props.examList.length}`}</div>\n </div>\n );\n}\n\nfunction TestItem(props) {\n let {questionIndex, currentExam, currentQuestionOption} = props;\n return (\n <div className='test-item-container'>\n <div className='ques item-title' dangerouslySetInnerHTML={{__html: `${questionIndex}.${format(currentExam.ques)}`}} />\n <ul>\n {\n currentExam.options && currentExam.options.map((item,index)=>{\n return (<li key={index}\n onClick={()=>props.checkOption(item)}\n className={`\n ${currentQuestionOption === item.opt_id ? 'option_checked' : ''}\n ${((currentExam.user_answer===0 || currentExam.user_answer) && currentExam.user_answer === item.opt_id) ? 'user_check' : ''}\n ${((currentExam.user_answer===0 || currentExam.user_answer) && currentExam.answer_id === item.opt_id) ? 'right_check' : ''}\n `}\n >\n <span className='letter'>{String.fromCharCode(Number(index) + 65)}</span>\n <span className='des' dangerouslySetInnerHTML={{__html: format(item.des)}} />\n </li>)\n })\n }\n </ul>\n {\n props.children\n }\n </div>\n );\n}\n\nfunction ChangeQuestion(props) {\n return (\n <div className={'layout-flex-around change_question_container'}>\n <div onClick={props.preQuestion} className={`change_button pre_question ${props.questionIndex === 1 ? 'first_question' : ''}`}>上一题</div>\n <div onClick={props.nextQuestion} className={`change_button next_question`}>下一题</div>\n </div>\n )\n}\n\nfunction Resolve(props) {\n let {currentExam} = props;\n let Test = currentExam.compare === 0 ? '错误' : '正确';\n let UserIndex, rightIndex;\n currentExam.options.map((item, index)=>{\n if(currentExam.answer_id === item.opt_id) {\n rightIndex = index;\n }\n if(currentExam.user_answer !== 0 && currentExam.user_answer === item.opt_id) {\n UserIndex = <span>{`您的答案是${String.fromCharCode(Number(index) + 65)},`}</span>;\n }\n });\n if(currentExam.user_answer === 0) {\n UserIndex = <span>{`您的答案是空,`}</span>;\n }\n return (\n <div className={'test-resolve'}>\n <div className={'isRight'}>\n <span>{`正确答案是${String.fromCharCode(Number(rightIndex) + 65)},`}</span>\n {UserIndex}\n <span>{`回答${Test}。`}</span>\n </div>\n <p>解析</p>\n <div className={'resolve-content'} dangerouslySetInnerHTML={{__html: `${format(currentExam.analysis)}`}} />\n </div>\n )\n}\n\nexport {\n Header,\n CampTitle,\n TestItem,\n ChangeQuestion,\n Resolve,\n};"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/classify/image/tips.png","components/classify/index.js","components/video/camp/campTest.js","components/video/camp/campResolve.js","components/video/camp/common/common.js"],"names":["module","exports","Classify","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","state","camp","employment","basics","advanced","special","isLoading","_this2","http","get","concat","API","home","then","res","data","code","setState","common","length","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_12__","title","arrow","cart","_common_Loading__WEBPACK_IMPORTED_MODULE_13__","ClassCourseBox","list","name","type","map","item","index","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","key","to","course_id","src","course_img","alt","Component","ClassCourseA","_ref","is_aist","ClassCourseB","c_id","c_name","require","WithTab","CampTest","close","showCard","body","document","getElementsByTagName","style","position","history","push","checkOption","checkItem","numberList","answerList","Number","questionId","ques_id","answerId","opt_id","currentQuestionOption","preQuestion","questionIndex","currentExam","examList","nextQuestion","jumpItem","commit","video_id","keshi_id","qid","cost_time","time","uid","user","answer_record","post","getUseTime","date","hours","minutes","seconds","parseInt","padStart","clearInterval","useTimeInterval","qtitle","useTime","getParam","qidP","id","obj","setInterval","_this3","_this$state","_common_common__WEBPACK_IMPORTED_MODULE_11__","showCardEve","onClick","includes","connect","CampResolve","href","formatTime","ary","split","str","rightRate","console","log","rightNumber","compare","toFixed","_common_common__WEBPACK_IMPORTED_MODULE_10__","options","fontSize","color","answer_id","user_answer","__webpack_require__","d","__webpack_exports__","Header","CampTitle","TestItem","ChangeQuestion","Resolve","react__WEBPACK_IMPORTED_MODULE_0__","react__WEBPACK_IMPORTED_MODULE_0___default","n","format","content","replace","dangerouslySetInnerHTML","__html","ques","String","fromCharCode","des","children","UserIndex","rightIndex","Test","analysis"],"mappings":"mGAAAA,EAAAC,QAAA,ogCCUMC,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAM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6HYpPfPktDfsm8TGhec7ShV3wNk/PxNjxdc7ShV3y7TGdDfskgi+XePkt4Z52GYpM2g9PIR10Ok/PxNjyUXYdrbajoOkQXkOwXkOzoO0M3g9LJR13UQ1TePksXkO0Nk/Qhi+QshtzePkzxNjz5MzbnO0RqbamUXIivUXI2g9NDfslQeL9dc7R4aJ6GYpKiV328TGfJR13UQlPoOkNQeb7pOkQ6pR5tAAAAO3RSTlMABo85Of3w7JGRjO7u7u3t7ZGDg09PMBUV+vrz7+/q397X18/Pv7+1tKSjmZh9fHd2cnFmZTQ0KCgbEL1XwbEAAADqSURBVBjTXZHlssIwFAZpqVDc4bq7+wXa4nUB3v9h+HKAYZL9k52dZJI5yfBk61m2SEapZEi7pqoqq8YYNLbxyjTNN6zVEahu2vcA/EAqE1Ch1tEty3pgJg+BTDFv2/ZRhy6SNU2mi/4OHMd5yfDcu657JrSm5y29phAvfN+/EdrnFLT51j0OguBJ2PgchuFJl2/tGfgQNt5GUXQp8a01By2+SedxHN8Jh1+TJDn8J60VizWSnpam6W4mIM/sEXM67VPULaBDfieLxeoLAsoDUIa8Y/TX2+fkTFCHKPgkhRWqhUKORGlQ27MGJhAis32Nv3oAAAAASUVORK5CYII=\"","import React, {Component} from 'react';\nimport {WithTab} from '@/HOCs'\nimport './index.scss';\nimport {http} from \"@/utils\";\nimport {Link} from 'react-router-dom'\nimport {Toast} from 'antd-mobile'\nimport {HeaderBar} from \"@/common\"\nimport Loading from '@/common/Loading'\n\n\nclass Classify extends Component {\n constructor(props) {\n super(props)\n this.state = {\n camp: [],\n employment: [],\n basics: [],\n advanced: [],\n special: [],\n isLoading: true\n }\n }\n\n componentDidMount() {\n let data = 1\n http.get(`${API.home}/m/course/classify/${data}`,).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n isLoading: false\n })\n\n if (res.data.data.common.length > 0) {\n this.setState({\n basics: res.data.data.common[0],\n advanced: res.data.data.common[1] || [],\n })\n }\n if (res.data.data.special.length > 0) {\n this.setState({\n camp: res.data.data.special[0],\n employment: res.data.data.special[1] || [],\n special: res.data.data.special[2] || [],\n })\n \n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n\n render() {\n return (\n <div className='class-box'>\n <HeaderBar title='分类' arrow={false} cart={false}></HeaderBar>\n <Loading isLoading={this.state.isLoading}>\n <ClassCourseBox data={this.state.camp.list} title={this.state.camp.name} type={1}/>\n <ClassCourseBox data={this.state.employment.list} title={this.state.employment.name} type={1}/>\n <ClassCourseBox data={this.state.basics.list} title={this.state.basics.name} type={2}/>\n <ClassCourseBox data={this.state.advanced.list} title={this.state.advanced.name} type={2}/>\n <div className=\"vip\">\n {this.state.special.list && this.state.special.list.length > 0 && this.state.special.list.map((item, index) => {\n return (\n <Link key={index} to={`/detail?id=${item.course_id}`}>\n <img src={item.course_img} alt=\"\"/>\n </Link>\n )\n })\n }\n </div>\n </Loading>\n </div>\n )\n }\n}\n\n// 课程图片形式展示 点击图片直接跳转课程详情页面\nfunction ClassCourseA({data}) {\n return (\n <div className='items-box'>\n {\n data && data.length > 0 && data.map((item, index) => {\n return (\n <Link to={`/detail?id=${item.course_id}`} key={index} className='item-banner'>\n <img src={item.course_img} alt=\"\"/>\n {\n (item.is_aist &&\n <span className='return_cash'></span>)\n }\n </Link>\n )\n })\n }\n </div>\n )\n}\n\n// 课程标签的形式展示 点击标签跳转分类详情页面\nfunction ClassCourseB(props) {\n return (\n <div className='items-box'>\n {\n props.data && props.data.length > 0 && props.data.map((item, index) => {\n return (\n <Link to={`/courselist?id=${item.c_id}&name=${item.c_name}`} key={index} className='item-label'>\n {item.c_name}\n </Link>\n )\n })\n }\n </div>\n )\n}\n\nfunction ClassCourseBox(props) {\n return (\n <div className=\"class-course\">\n <p className='course-items-title'>\n <img src={require('./image/tips.png')} alt=\"\"/>\n {props.title}\n </p>\n {props.type === 1 &&\n <ClassCourseA data={props.data}/>\n }\n {props.type === 2 &&\n <ClassCourseB data={props.data}/>\n }\n </div>\n )\n}\n\nexport default WithTab(Classify);\n","import React, {Component} from 'react';\nimport {getParam, http, browser} from \"@/utils\";\nimport './camp.scss';\nimport {connect} from \"react-redux\";\nimport {Header, CampTitle, TestItem, ChangeQuestion} from './common/common';\nimport { Toast } from 'antd-mobile';\n\nclass CampTest extends Component {\n constructor(props) {\n super(props);\n this.state = {\n examList: [], // 问题列表\n currentExam: {}, // 当前要展示的问题\n currentQuestionOption: {}, // 切换题目时 用来存储当前问题的选项\n questionIndex: 1, // 第几个问题\n numberList: [],// 答题的题号\n qtitle: \"\",\n useTime: '00:00',\n showCard: false,\n }\n }\n componentDidMount() {\n this.keshi_id = getParam('keshi_id');\n this.qidP = getParam('qid');\n let _this = this;\n // 获取问题列表\n http.get(`${API.home}/m/aist/get_questions/${this.keshi_id}/${this.qidP}`).then(res => {\n if(res.data.code === 4040) {\n Toast.info(res.data.msg, 2, () => {\n this.props.history.push('/passport');\n });\n return;\n }else if(res.data.code !== 200){\n Toast.info(res.data.msg, 2, () => {\n this.props.history.push('/');\n });\n return;\n }\n let data = res.data.data;\n this.qid = data.id;\n this.course_id = data.course_id;\n this.setState({\n examList: data.list,\n qtitle: data.qtitle,\n currentExam: data.list[0],\n });\n _this.answerList = [];\n data.list.map(item => {\n let obj = {};\n obj.questionId = item.id;\n obj.answerId = 0;\n _this.answerList.push(obj);\n });\n _this.time = 0;\n _this.useTimeInterval = setInterval(function () {\n _this.time += 1;\n // _this.useTime = _this.getUseTime(_this.time);\n _this.setState({\n useTime: _this.getUseTime(_this.time)\n })\n }, 1000);\n });\n };\n // 关闭按钮\n close = () => {\n let isShow = this.state.showCard;\n if(isShow) {\n this.setState({\n showCard: false\n });\n this.body = document.getElementsByTagName('body')[0];\n this.body.style.position = 'static';\n } else {\n this.props.history.push(`/detail?id=${this.course_id}`)\n }\n };\n // 选择答案\n checkOption = (checkItem) => {\n let list = this.state.numberList;\n this.answerList.map(function (item) {\n if (Number(item.questionId) === Number(checkItem.ques_id)) {\n item.answerId = checkItem.opt_id;\n }\n return item;\n });\n list.push(checkItem.ques_id);\n this.setState({\n currentQuestionOption: checkItem.opt_id,\n numberList: list\n });\n };\n // 上一题\n preQuestion = () => {\n let index = this.state.questionIndex;\n if(index === 1) {\n return;\n }\n this.setState({\n questionIndex: index - 1,\n currentExam: this.state.examList[index - 2],\n currentQuestionOption: this.answerList[index - 2].answerId,\n });\n };\n // 下一题\n nextQuestion = () => {\n let index = this.state.questionIndex;\n if(index === this.state.examList.length) {\n this.setState({\n showCard: true\n });\n return;\n }\n this.setState({\n questionIndex: index + 1,\n currentExam: this.state.examList[index],\n currentQuestionOption: this.answerList[index].answerId,\n });\n };\n // 通过答题卡的卡号跳转到对应的题目\n jumpItem = (item, index) => {\n this.setState({\n showCard: false,\n questionIndex: index + 1,\n currentExam: this.state.examList[index],\n currentQuestionOption: this.answerList[index].answerId,\n })\n };\n // 提交\n commit = () => {\n let data = {};\n data.video_id = this.keshi_id;\n data.qid = this.qid;\n data.cost_time = this.time;\n data.uid = this.props.user.data.uid;\n data.answer_record = this.answerList;\n http.post(`${API.home}/m/aist/submit`, data).then((res) => {\n if(res.data.code === 200) {\n this.props.history.push(`/campResolve?keshi_id=${this.keshi_id}&qid=${this.qid}`)\n }else{\n Toast.info(res.data.msg, 2);\n }\n });\n };\n // 显示答题卡\n showCard = () => {\n this.setState({\n showCard: true\n });\n this.body = document.getElementsByTagName('body')[0];\n this.body.style.position = 'fixed';\n };\n // 答题用时的格式化\n getUseTime = (date) => {\n let hours = 0,\n minutes = 0,\n seconds = 0;\n hours = `${parseInt(date / (60 * 60))}`.padStart(2, 0);\n minutes = `${parseInt((date - hours * 3600) / 60)}`.padStart(2, 0);\n seconds = `${parseInt((date - hours * 3600 - minutes * 60))}`.padStart(2, 0);\n if (date === 3600 * 24) {\n clearInterval(this.useTimeInterval);\n this.useTimeInterval = null;\n } else {\n if (date < 3600) {\n return `${minutes}:${seconds}`\n } else {\n return `${hours}:${minutes}:${seconds}`\n }\n }\n };\n\n\n render() {\n let {qtitle, currentExam, currentQuestionOption, questionIndex, examList, useTime, showCard, numberList} = this.state;\n return (\n <div className='camp-test-container'>\n <div className={'fixed_container'}>\n {/*关闭按钮 时间 答题卡*/}\n <Header time={useTime} showCardEve={this.showCard} close={this.close} showCard={showCard} />\n\n {/*课后练习题 当前题目 题目总数*/}\n <CampTitle qtitle={qtitle} questionIndex={questionIndex} examList={examList}/>\n </div>\n\n {/*题目*/}\n <TestItem questionIndex={questionIndex} checkOption={this.checkOption} currentExam={currentExam} currentQuestionOption={currentQuestionOption} />\n {/*切换题目*/}\n <ChangeQuestion preQuestion={this.preQuestion} nextQuestion={this.nextQuestion} questionIndex={questionIndex} />\n {/* 答题卡 */}\n {\n showCard && (\n <div className='test-card-container' >\n <p>{`课后练习:${qtitle}`}</p>\n <ul className={'test-item'}>\n {\n examList.map((item, index) => {\n return <li key={item.id} onClick={() => {this.jumpItem(item, index)}} className={`layout-flex-center ${numberList.includes(item.id) ? 'answered' : ''}`}>{index + 1}</li>\n })\n }\n </ul>\n <div className={'bottom_commit'}>\n <div onClick={this.commit} className={'commit_answer layout-flex-center'}>提交并查看结果</div>\n </div>\n </div>\n )\n }\n\n </div>\n );\n }\n}\n\nexport default connect(\n state => ({user: state.user}),\n null\n)(CampTest)","import React, {Component} from 'react';\nimport {getParam, http, browser} from \"@/utils\";\nimport './camp.scss';\nimport {CampTitle, Header, TestItem, ChangeQuestion, Resolve} from './common/common';\nimport {Toast} from \"antd-mobile\";\n\nclass CampResolve extends Component {\n constructor(props) {\n super(props);\n this.state = {\n examList: [], // 问题列表\n currentExam: {}, // 当前要展示的问题\n currentQuestionOption: {}, // 切换题目时 用来存储当前问题的选项\n questionIndex: 1, // 第几个问题\n numberList: [],// 答题的题号\n qtitle: \"\",\n useTime: '00:00',\n showCard: false,\n rightRate: 0,\n }\n }\n showCard = () => {\n this.setState({\n showCard: true\n });\n this.body = document.getElementsByTagName('body')[0];\n this.body.style.position = 'fixed';\n };\n close = () => {\n let isShow = this.state.showCard;\n if(isShow) {\n this.setState({\n showCard: false\n });\n this.body = document.getElementsByTagName('body')[0];\n this.body.style.position = 'static';\n } else {\n this.props.history.push(`/detail?id=${this.course_id}`,{href: '/purchased'})\n }\n };\n componentDidMount() {\n this.keshi_id = getParam('keshi_id');\n this.qidP = getParam('qid');\n let _this = this;\n // 获取问题列表\n http.get(`${API.home}/m/aist/analysis/${this.keshi_id}/${this.qidP}`).then(res => {\n console.log(res);\n if(res.data.code === 4040) {\n Toast.info(res.data.msg, 2, () => {\n this.props.history.push('/passport');\n });\n return;\n }else if(res.data.code !== 200){\n Toast.info(res.data.msg, 2, () => {\n this.props.history.push('/');\n });\n return;\n }\n let data = res.data.data;\n this.course_id = data.course_id;\n _this.answerList = [];\n this.rightNumber = 0;\n data.list.map(item => {\n if(item.compare === 1) {\n this.rightNumber++;\n }\n let obj = {};\n obj.questionId = item.id;\n obj.answerId = 0;\n _this.answerList.push(obj);\n });\n this.setState({\n examList: data.list,\n qtitle: data.qtitle,\n currentExam: data.list[0],\n useTime: data.cost_time,\n rightRate: (this.rightNumber/data.list.length * 100).toFixed(0)\n });\n });\n };\n checkOption = () => {};\n preQuestion = () => {\n let index = this.state.questionIndex;\n if(index === 1) {\n return;\n }\n this.setState({\n questionIndex: index - 1,\n currentExam: this.state.examList[index - 2],\n currentQuestionOption: this.answerList[index - 2].answerId,\n });\n };\n nextQuestion = () => {\n let index = this.state.questionIndex;\n if(index === this.state.examList.length) {\n this.setState({\n showCard: true\n });\n return;\n }\n this.setState({\n questionIndex: index + 1,\n currentExam: this.state.examList[index],\n currentQuestionOption: this.answerList[index].answerId,\n });\n };\n // 通过答题卡的卡号跳转到对应的题目\n jumpItem = (item, index) => {\n this.setState({\n showCard: false,\n questionIndex: index + 1,\n currentExam: this.state.examList[index],\n currentQuestionOption: this.answerList[index].answerId,\n })\n };\n formatTime = (time) => {\n let ary = time.split(':');\n let str = `${Number(ary[1])}分${ary[2]}秒`;\n if(Number(ary[0]) !== 0) {\n str = `${Number(ary[0])}时${str}`\n }\n return str;\n };\n render() {\n let {qtitle, currentExam, currentQuestionOption, questionIndex, examList, useTime, showCard, rightRate} = this.state;\n return (\n <div className='camp-test-container'>\n <div className={'fixed_container'}>\n <Header time={useTime} showCardEve={this.showCard} close={this.close} showCard={showCard} />\n <CampTitle qtitle={qtitle} questionIndex={questionIndex} examList={examList}/>\n </div>\n <TestItem questionIndex={questionIndex} checkOption={this.checkOption} currentExam={currentExam} currentQuestionOption={currentQuestionOption} >\n {\n currentExam && currentExam.options && <Resolve currentExam={currentExam}/>\n }\n </TestItem>\n <ChangeQuestion preQuestion={this.preQuestion} nextQuestion={this.nextQuestion} questionIndex={questionIndex} />\n {\n showCard && (\n <div className='test-resolve-card-container' >\n <div className={'camp-test-header layout-flex-between'}>\n <div><i onClick={this.close} className={'iconfont iconiconfront-77 icon-close'} /></div>\n <div className='layout-flex-center camp-test-time'>\n <span style={{fontSize: '17px', color: '#333333'}}>{'练习报告'}</span>\n </div>\n <div className={`icon icon-order no_height`} />\n </div>\n\n <div className={'report-body'}>\n <div className={'right_rate'}>\n <span className={'rate'}>正确率</span>\n <div className={'percentage'}>\n <span>{rightRate}</span>\n <span>%</span>\n </div>\n </div>\n\n <p className={'use_total_time'}>{`累计用时${this.formatTime(useTime)}`}</p>\n\n <ul className={'right_wrong_li'}>\n {\n examList.map((item, index) => {\n return <li onClick={() => {this.jumpItem(item, index)}} className={`layout-flex-center ${item.answer_id === item.user_answer ? 'right' : 'wrong'} ${item.user_answer === 0 ? 'noSelect' : ''}`} key={item.answer_id}>{index + 1}</li>\n })\n }\n </ul>\n </div>\n\n <div className={'camp-report-bottom'}>\n <div className={'bottom_commit layout-flex-center'}>\n <div onClick={this.close} className={'commit_answer layout-flex-center'}>题目解析</div>\n </div>\n </div>\n </div>\n )\n }\n </div>\n );\n }\n}\n\nexport default CampResolve;","import React from 'react';\nfunction format(content) {\n if(content) {\n if(content.includes(\"<img\")) {\n content = content.replace(/<img/g, \"<img style='width: 100%'\");\n }\n content = content.replace(/&lt;/g , '<');\n content = content.replace(/&gt;/g , '>');\n content = content.replace(/&amp;gt;/g , '');\n content = content.replace(/&quot;/g , '\"');\n content = content.replace(/&amp;nbsp;/g , '');\n }\n return content;\n}\n\nfunction Header(props) {\n return (\n <div className='camp-test-header layout-flex-between'>\n <div><i onClick={props.close} className={'iconfont iconiconfront-77 icon-close'} /></div>\n <div className='layout-flex-center camp-test-time'>\n <i className='icon icon-clock' />\n <span>{props.time}</span>\n </div>\n <div onClick={props.showCardEve} className={`icon icon-order ${props.showCard ? 'no_height' : ''}`} />\n </div>\n );\n}\n\nfunction CampTitle(props) {\n return (\n <div className='layout-flex-between camp-test-title'>\n <div className='qtitle'>{`课后练习:${props.qtitle}`}</div>\n <div className='qnumber'>{`${props.questionIndex}/${props.examList.length}`}</div>\n </div>\n );\n}\n\nfunction TestItem(props) {\n let {questionIndex, currentExam, currentQuestionOption} = props;\n return (\n <div className='test-item-container'>\n <div className='ques item-title' dangerouslySetInnerHTML={{__html: `${questionIndex}.${format(currentExam.ques)}`}} />\n <ul>\n {\n currentExam.options && currentExam.options.map((item,index)=>{\n return (<li key={index}\n onClick={()=>props.checkOption(item)}\n className={`\n ${currentQuestionOption === item.opt_id ? 'option_checked' : ''}\n ${((currentExam.user_answer===0 || currentExam.user_answer) && currentExam.user_answer === item.opt_id) ? 'user_check' : ''}\n ${((currentExam.user_answer===0 || currentExam.user_answer) && currentExam.answer_id === item.opt_id) ? 'right_check' : ''}\n `}\n >\n <span className='letter'>{String.fromCharCode(Number(index) + 65)}</span>\n <span className='des' dangerouslySetInnerHTML={{__html: format(item.des)}} />\n </li>)\n })\n }\n </ul>\n {\n props.children\n }\n </div>\n );\n}\n\nfunction ChangeQuestion(props) {\n return (\n <div className={'layout-flex-around change_question_container'}>\n <div onClick={props.preQuestion} className={`change_button pre_question ${props.questionIndex === 1 ? 'first_question' : ''}`}>上一题</div>\n <div onClick={props.nextQuestion} className={`change_button next_question`}>下一题</div>\n </div>\n )\n}\n\nfunction Resolve(props) {\n let {currentExam} = props;\n let Test = currentExam.compare === 0 ? '错误' : '正确';\n let UserIndex, rightIndex;\n currentExam.options.map((item, index)=>{\n if(currentExam.answer_id === item.opt_id) {\n rightIndex = index;\n }\n if(currentExam.user_answer !== 0 && currentExam.user_answer === item.opt_id) {\n UserIndex = <span>{`您的答案是${String.fromCharCode(Number(index) + 65)},`}</span>;\n }\n });\n if(currentExam.user_answer === 0) {\n UserIndex = <span>{`您的答案是空,`}</span>;\n }\n return (\n <div className={'test-resolve'}>\n <div className={'isRight'}>\n <span>{`正确答案是${String.fromCharCode(Number(rightIndex) + 65)},`}</span>\n {UserIndex}\n <span>{`回答${Test}。`}</span>\n </div>\n <p>解析</p>\n <div className={'resolve-content'} dangerouslySetInnerHTML={{__html: `${format(currentExam.analysis)}`}} />\n </div>\n )\n}\n\nexport {\n Header,\n CampTitle,\n TestItem,\n ChangeQuestion,\n Resolve,\n};"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1144:function(e,t,a){},1162:function(e,t,a){"use strict";a.r(t);a(254);var n=a(157),i=a.n(n),c=(a(152),a(34)),s=a.n(c),o=(a(44),a(14)),l=a.n(o),r=a(7),u=a(8),d=a(11),f=a(9),h=a(159),m=a(10),p=a(0),v=a.n(p),b=a(33),g=(a(1144),a(700)),y=a(4),C=a(16),E=a(63),w=function(e){function t(e){var a;return Object(r.a)(this,t),(a=Object(d.a)(this,Object(f.a)(t).call(this,e))).getTabs=function(){y.c.get("".concat(API.home,"/m/course/classify/").concat(0)).then(function(e){var t=Object(h.a)(t);if(200===e.data.code){if(e.data.data.common.length>0){var a=[{basics:[]},{advanced:[]}],n=[];["basics","advanced"].forEach(function(t,i){a[t]=e.data.data.common[i],e.data.data.common[i].list.forEach(function(e,t){n.push({title:e.c_name,id:e.c_id})})}),t.setState({arr:a,allClass:n})}}else l.a.info(e.data.msg,2)}).catch(function(e){console.log(e)})},a.getList=function(){y.c.get("".concat(API.home,"/m/course/list/").concat(Object(y.b)("id"))).then(function(e){200===e.data.code&&a.setState({data:e.data.data,isLoading:!1})})},a.ontabclick=function(e){a.props.history.push("/courselist?id=".concat(e.id,"&name=").concat(e.title)),a.getList(),a.setState({activeTab:decodeURIComponent(Object(y.b)("name"))})},a.pulldown=function(){a.setState(function(e){return{ispull:!e.ispull,display:e.ispull?"none":"block"}})},a.labelclick=function(e){a.props.history.push("/courselist?id=".concat(e.c_id,"&name=").concat(e.c_name)),a.getList(),a.setState(function(e){return{ispull:!e.ispull,display:e.ispull?"none":"block",activeTab:decodeURIComponent(Object(y.b)("name"))}})},a.state={ispull:!1,display:"none",arr:[{basics:[]},{advanced:[]}],allClass:[],data:[],activeTab:decodeURIComponent(Object(y.b)("name")),isLoading:!0},a}return Object(m.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.getTabs(),this.getList()}},{key:"render",value:function(){var e=this,t=v.a.createElement("i",{className:"iconfont iconiconfront-69 pull-down"}),a=v.a.createElement("i",{className:"iconfont iconiconfront-71 pull-down"}),n=this.state.allClass.findIndex(function(t){return t.title===e.state.activeTab});return v.a.createElement("div",{className:"class-child"},v.a.createElement(g.a,null),v.a.createElement(E.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"class-content"},v.a.createElement(s.a,null),v.a.createElement("div",{onClick:this.pulldown.bind(this)},this.state.ispull?a:t),v.a.createElement(i.a,{tabs:this.state.allClass,animated:!1,page:n,onChange:function(t){return e.ontabclick(t)}},v.a.createElement("div",{className:"tabs"},v.a.createElement("ul",null,this.state.data&&this.state.data.length>0&&this.state.data.map(function(e,t){var a=v.a.createElement("div",{className:"info"},v.a.createElement("p",{className:"title"},v.a.createElement(C.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),v.a.createElement("p",{className:"contact text-overflow-2"},e.desc),v.a.createElement("div",{className:"des"},!e.is_buy&&v.a.createElement("p",{className:"course-price"},v.a.createElement("span",{className:"new"},"\xa5",e.price1),v.a.createElement("span",{className:"old"},"\xa5",e.price0)),e.is_buy&&v.a.createElement("span",{className:"isbuy"},"\u5df2\u8d2d\u4e70"))),n=v.a.createElement("div",null,0===e.bargain_num&&0!==e.groupon_num&&v.a.createElement("p",{className:"course-status"},"\u62fc\u56e2\u51cf",e.groupon_num,"\u5143"),0!==e.bargain_num&&0===e.groupon_num&&v.a.createElement("p",{className:"course-status"},"\u780d\u4ef7\u51cf",e.bargain_num,"\u5143"),e.is_aist&&v.a.createElement("span",{className:"return_cash"}));return v.a.createElement(b.i,{key:t,status:n,img:e.image_name,id:e.course_id,info:a})})))),v.a.createElement(s.a,null)),v.a.createElement("div",{className:"mbc-box",style:{display:this.state.display}},this.state.arr.basics&&v.a.createElement("div",{className:"tabcontent"},v.a.createElement(_,{activeTab:this.state.activeTab,data:this.state.arr.basics.list,title:this.state.arr.basics.name,labelclick:this.labelclick}),v.a.createElement(_,{activeTab:this.state.activeTab,data:this.state.arr.advanced.list,title:this.state.arr.advanced.name,labelclick:this.labelclick})))))}}]),t}(p.Component);function _(e){return v.a.createElement("div",{className:"class-course"},v.a.createElement("p",{className:"course-items-title"},e.title),v.a.createElement("div",{className:"items-box"},e.data&&e.data.length>0&&e.data.map(function(t,a){return v.a.createElement("span",{className:e.activeTab===t.c_name?"active-label":"item-label",key:a,onClick:function(a){return e.labelclick(t)}},t.c_name)})))}t.default=w},577:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,a){return"aria-"!==a.substr(0,5)&&"data-"!==a.substr(0,5)&&"role"!==a||(t[a]=e[a]),t},{})},e.exports=t.default},582:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=a(3),c=(n=i)&&n.__esModule?n:{default:n};t.getComponentLocale=function(e,t,a,n){var i={};if(t&&t.antLocale&&t.antLocale[a])i=t.antLocale[a];else{var s=n();i=s.default||s}var o=(0,c.default)({},i);e.locale&&(o=(0,c.default)({},o,e.locale),e.locale.lang&&(o.lang=(0,c.default)({},i.lang,e.locale.lang)));return o},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},600:function(e,t,a){"use strict";a(48),a(601)},601:function(e,t,a){},602:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=b(a(3)),i=b(a(32)),c=b(a(5)),s=b(a(12)),o=b(a(6)),l=b(a(13)),r=b(a(15)),u=v(a(0)),d=v(a(2)),f=b(a(151)),h=b(a(577)),m=a(582),p=a(603);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}var g=function(e){function t(e){(0,c.default)(this,t);var a=(0,o.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));a.onSubmit=function(e){e.preventDefault(),a.props.onSubmit&&a.props.onSubmit(a.state.value||""),a.inputRef&&a.inputRef.blur()},a.onChange=function(e){a.state.focus||a.setState({focus:!0});var t=e.target.value;"value"in a.props||a.setState({value:t}),a.props.onChange&&a.props.onChange(t)},a.onFocus=function(){a.setState({focus:!0}),a.firstFocus=!0,a.props.onFocus&&a.props.onFocus()},a.onBlur=function(){var e;a.onBlurTimeout=(e=function(){a.blurFromOnClear||document.activeElement!==a.inputRef&&a.setState({focus:!1}),a.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),a.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),a.props.onBlur())},a.onClear=function(){a.doClear()},a.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];a.blurFromOnClear=e,"value"in a.props||a.setState({value:""}),a.props.onClear&&a.props.onClear(""),a.props.onChange&&a.props.onChange(""),e&&a.focus()},a.onCancel=function(){a.props.onCancel?a.props.onCancel(a.state.value||""):a.doClear(!1)},a.focus=function(){a.inputRef&&a.inputRef.focus()};var n=void 0;return n="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",a.state={value:n,focus:!1},a}return(0,l.default)(t,e),(0,s.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,c=this.props,s=c.prefixCls,o=c.showCancelButton,l=c.disabled,d=c.placeholder,p=c.className,v=c.style,b=c.maxLength,g=(0,m.getComponentLocale)(this.props,this.context,"SearchBar",function(){return a(604)}).cancelText,y=this.state,C=y.value,E=y.focus,w=(0,r.default)(s,p,(0,i.default)({},s+"-start",!!(E||C&&C.length>0))),_=(0,r.default)(s+"-clear",(0,i.default)({},s+"-clear-show",!!(E&&C&&C.length>0))),N=(0,r.default)(s+"-cancel",(e={},(0,i.default)(e,s+"-cancel-show",!!(o||E||C&&C.length>0)),(0,i.default)(e,s+"-cancel-anim",this.firstFocus),e));return u.createElement("form",{onSubmit:this.onSubmit,className:w,style:v,ref:function(e){return t.inputContainerRef=e},action:"#"},u.createElement("div",{className:s+"-input"},u.createElement("div",{className:s+"-synthetic-ph",ref:function(e){return t.syntheticPhRef=e}},u.createElement("span",{className:s+"-synthetic-ph-container",ref:function(e){return t.syntheticPhContainerRef=e}},u.createElement("i",{className:s+"-synthetic-ph-icon"}),u.createElement("span",{className:s+"-synthetic-ph-placeholder",style:{visibility:d&&!C?"visible":"hidden"}},d))),u.createElement("input",(0,n.default)({type:"search",className:s+"-value",value:C,disabled:l,placeholder:d,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:b},(0,h.default)(this.props))),u.createElement(f.default,{activeClassName:s+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:_}))),u.createElement("div",{className:N,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||g))}}]),t}(u.Component);t.default=g,g.defaultProps=p.defaultProps,g.contextTypes={antLocale:d.object},e.exports=t.default},603:function(e,t,a){"use strict";function n(){}Object.defineProperty(t,"__esModule",{value:!0});t.defaultProps={prefixCls:"am-search",placeholder:"",onSubmit:n,onChange:n,onFocus:n,onBlur:n,onClear:n,showCancelButton:!1,disabled:!1}},604:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},700:function(e,t,a){"use strict";a(600);var n=a(602),i=a.n(n),c=a(7),s=a(8),o=a(11),l=a(9),r=a(10),u=a(0),d=a.n(u),f=(a(701),function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return(a=Object(o.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(i)))).goShop=function(){location.replace("/shopcart")},a}return Object(r.a)(t,e),Object(s.a)(t,[{key:"toSearch",value:function(){window.location.href="/search"}},{key:"return",value:function(){window.location.href="/"}},{key:"render",value:function(){return d.a.createElement("div",{className:"preferential"},d.a.createElement("div",{className:"search-nav"},d.a.createElement("i",{className:"iconfont iconiconfront-68 return",onClick:this.return.bind(this)}),d.a.createElement(i.a,{placeholder:"\u641c\u7d22\u8bfe\u7a0b",cancelText:" ",onFocus:this.toSearch.bind(this),showCancelButton:!1}),d.a.createElement("i",{className:"iconfont icongouwuche-xianxing shopping-cart",onClick:this.goShop})))}}]),t}(u.Component));t.a=f},701:function(e,t,a){}}]);
//# sourceMappingURL=CourseList.50c6b061.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1144:function(e,t,a){},1162:function(e,t,a){"use strict";a.r(t);a(254);var n=a(157),i=a.n(n),c=(a(152),a(34)),s=a.n(c),o=(a(44),a(14)),l=a.n(o),r=a(7),u=a(8),d=a(11),f=a(9),h=a(159),m=a(10),p=a(0),v=a.n(p),b=a(30),g=(a(1144),a(700)),y=a(4),C=a(16),E=a(63),w=function(e){function t(e){var a;return Object(r.a)(this,t),(a=Object(d.a)(this,Object(f.a)(t).call(this,e))).getTabs=function(){y.c.get("".concat(API.home,"/m/course/classify/").concat(0)).then(function(e){var t=Object(h.a)(t);if(200===e.data.code){if(e.data.data.common.length>0){var a=[{basics:[]},{advanced:[]}],n=[];["basics","advanced"].forEach(function(t,i){a[t]=e.data.data.common[i],e.data.data.common[i].list.forEach(function(e,t){n.push({title:e.c_name,id:e.c_id})})}),t.setState({arr:a,allClass:n})}}else l.a.info(e.data.msg,2)}).catch(function(e){console.log(e)})},a.getList=function(){y.c.get("".concat(API.home,"/m/course/list/").concat(Object(y.b)("id"))).then(function(e){200===e.data.code&&a.setState({data:e.data.data,isLoading:!1})})},a.ontabclick=function(e){a.props.history.push("/courselist?id=".concat(e.id,"&name=").concat(e.title)),a.getList(),a.setState({activeTab:decodeURIComponent(Object(y.b)("name"))})},a.pulldown=function(){a.setState(function(e){return{ispull:!e.ispull,display:e.ispull?"none":"block"}})},a.labelclick=function(e){a.props.history.push("/courselist?id=".concat(e.c_id,"&name=").concat(e.c_name)),a.getList(),a.setState(function(e){return{ispull:!e.ispull,display:e.ispull?"none":"block",activeTab:decodeURIComponent(Object(y.b)("name"))}})},a.state={ispull:!1,display:"none",arr:[{basics:[]},{advanced:[]}],allClass:[],data:[],activeTab:decodeURIComponent(Object(y.b)("name")),isLoading:!0},a}return Object(m.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.getTabs(),this.getList()}},{key:"render",value:function(){var e=this,t=v.a.createElement("i",{className:"iconfont iconiconfront-69 pull-down"}),a=v.a.createElement("i",{className:"iconfont iconiconfront-71 pull-down"}),n=this.state.allClass.findIndex(function(t){return t.title===e.state.activeTab});return v.a.createElement("div",{className:"class-child"},v.a.createElement(g.a,null),v.a.createElement(E.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"class-content"},v.a.createElement(s.a,null),v.a.createElement("div",{onClick:this.pulldown.bind(this)},this.state.ispull?a:t),v.a.createElement(i.a,{tabs:this.state.allClass,animated:!1,page:n,onChange:function(t){return e.ontabclick(t)}},v.a.createElement("div",{className:"tabs"},v.a.createElement("ul",null,this.state.data&&this.state.data.length>0&&this.state.data.map(function(e,t){var a=v.a.createElement("div",{className:"info"},v.a.createElement("p",{className:"title"},v.a.createElement(C.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),v.a.createElement("p",{className:"contact text-overflow-2"},e.desc),v.a.createElement("div",{className:"des"},!e.is_buy&&v.a.createElement("p",{className:"course-price"},v.a.createElement("span",{className:"new"},"\xa5",e.price1),v.a.createElement("span",{className:"old"},"\xa5",e.price0)),e.is_buy&&v.a.createElement("span",{className:"isbuy"},"\u5df2\u8d2d\u4e70"))),n=v.a.createElement("div",null,0===e.bargain_num&&0!==e.groupon_num&&v.a.createElement("p",{className:"course-status"},"\u62fc\u56e2\u51cf",e.groupon_num,"\u5143"),0!==e.bargain_num&&0===e.groupon_num&&v.a.createElement("p",{className:"course-status"},"\u780d\u4ef7\u51cf",e.bargain_num,"\u5143"),e.is_aist&&v.a.createElement("span",{className:"return_cash"}));return v.a.createElement(b.i,{key:t,status:n,img:e.image_name,id:e.course_id,info:a})})))),v.a.createElement(s.a,null)),v.a.createElement("div",{className:"mbc-box",style:{display:this.state.display}},this.state.arr.basics&&v.a.createElement("div",{className:"tabcontent"},v.a.createElement(_,{activeTab:this.state.activeTab,data:this.state.arr.basics.list,title:this.state.arr.basics.name,labelclick:this.labelclick}),v.a.createElement(_,{activeTab:this.state.activeTab,data:this.state.arr.advanced.list,title:this.state.arr.advanced.name,labelclick:this.labelclick})))))}}]),t}(p.Component);function _(e){return v.a.createElement("div",{className:"class-course"},v.a.createElement("p",{className:"course-items-title"},e.title),v.a.createElement("div",{className:"items-box"},e.data&&e.data.length>0&&e.data.map(function(t,a){return v.a.createElement("span",{className:e.activeTab===t.c_name?"active-label":"item-label",key:a,onClick:function(a){return e.labelclick(t)}},t.c_name)})))}t.default=w},577:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,a){return"aria-"!==a.substr(0,5)&&"data-"!==a.substr(0,5)&&"role"!==a||(t[a]=e[a]),t},{})},e.exports=t.default},582:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=a(3),c=(n=i)&&n.__esModule?n:{default:n};t.getComponentLocale=function(e,t,a,n){var i={};if(t&&t.antLocale&&t.antLocale[a])i=t.antLocale[a];else{var s=n();i=s.default||s}var o=(0,c.default)({},i);e.locale&&(o=(0,c.default)({},o,e.locale),e.locale.lang&&(o.lang=(0,c.default)({},i.lang,e.locale.lang)));return o},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},600:function(e,t,a){"use strict";a(48),a(601)},601:function(e,t,a){},602:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=b(a(3)),i=b(a(33)),c=b(a(5)),s=b(a(12)),o=b(a(6)),l=b(a(13)),r=b(a(15)),u=v(a(0)),d=v(a(2)),f=b(a(151)),h=b(a(577)),m=a(582),p=a(603);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}var g=function(e){function t(e){(0,c.default)(this,t);var a=(0,o.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));a.onSubmit=function(e){e.preventDefault(),a.props.onSubmit&&a.props.onSubmit(a.state.value||""),a.inputRef&&a.inputRef.blur()},a.onChange=function(e){a.state.focus||a.setState({focus:!0});var t=e.target.value;"value"in a.props||a.setState({value:t}),a.props.onChange&&a.props.onChange(t)},a.onFocus=function(){a.setState({focus:!0}),a.firstFocus=!0,a.props.onFocus&&a.props.onFocus()},a.onBlur=function(){var e;a.onBlurTimeout=(e=function(){a.blurFromOnClear||document.activeElement!==a.inputRef&&a.setState({focus:!1}),a.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),a.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),a.props.onBlur())},a.onClear=function(){a.doClear()},a.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];a.blurFromOnClear=e,"value"in a.props||a.setState({value:""}),a.props.onClear&&a.props.onClear(""),a.props.onChange&&a.props.onChange(""),e&&a.focus()},a.onCancel=function(){a.props.onCancel?a.props.onCancel(a.state.value||""):a.doClear(!1)},a.focus=function(){a.inputRef&&a.inputRef.focus()};var n=void 0;return n="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",a.state={value:n,focus:!1},a}return(0,l.default)(t,e),(0,s.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,c=this.props,s=c.prefixCls,o=c.showCancelButton,l=c.disabled,d=c.placeholder,p=c.className,v=c.style,b=c.maxLength,g=(0,m.getComponentLocale)(this.props,this.context,"SearchBar",function(){return a(604)}).cancelText,y=this.state,C=y.value,E=y.focus,w=(0,r.default)(s,p,(0,i.default)({},s+"-start",!!(E||C&&C.length>0))),_=(0,r.default)(s+"-clear",(0,i.default)({},s+"-clear-show",!!(E&&C&&C.length>0))),N=(0,r.default)(s+"-cancel",(e={},(0,i.default)(e,s+"-cancel-show",!!(o||E||C&&C.length>0)),(0,i.default)(e,s+"-cancel-anim",this.firstFocus),e));return u.createElement("form",{onSubmit:this.onSubmit,className:w,style:v,ref:function(e){return t.inputContainerRef=e},action:"#"},u.createElement("div",{className:s+"-input"},u.createElement("div",{className:s+"-synthetic-ph",ref:function(e){return t.syntheticPhRef=e}},u.createElement("span",{className:s+"-synthetic-ph-container",ref:function(e){return t.syntheticPhContainerRef=e}},u.createElement("i",{className:s+"-synthetic-ph-icon"}),u.createElement("span",{className:s+"-synthetic-ph-placeholder",style:{visibility:d&&!C?"visible":"hidden"}},d))),u.createElement("input",(0,n.default)({type:"search",className:s+"-value",value:C,disabled:l,placeholder:d,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:b},(0,h.default)(this.props))),u.createElement(f.default,{activeClassName:s+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:_}))),u.createElement("div",{className:N,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||g))}}]),t}(u.Component);t.default=g,g.defaultProps=p.defaultProps,g.contextTypes={antLocale:d.object},e.exports=t.default},603:function(e,t,a){"use strict";function n(){}Object.defineProperty(t,"__esModule",{value:!0});t.defaultProps={prefixCls:"am-search",placeholder:"",onSubmit:n,onChange:n,onFocus:n,onBlur:n,onClear:n,showCancelButton:!1,disabled:!1}},604:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},700:function(e,t,a){"use strict";a(600);var n=a(602),i=a.n(n),c=a(7),s=a(8),o=a(11),l=a(9),r=a(10),u=a(0),d=a.n(u),f=(a(701),function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return(a=Object(o.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(i)))).goShop=function(){location.replace("/shopcart")},a}return Object(r.a)(t,e),Object(s.a)(t,[{key:"toSearch",value:function(){window.location.href="/search"}},{key:"return",value:function(){window.location.href="/"}},{key:"render",value:function(){return d.a.createElement("div",{className:"preferential"},d.a.createElement("div",{className:"search-nav"},d.a.createElement("i",{className:"iconfont iconiconfront-68 return",onClick:this.return.bind(this)}),d.a.createElement(i.a,{placeholder:"\u641c\u7d22\u8bfe\u7a0b",cancelText:" ",onFocus:this.toSearch.bind(this),showCancelButton:!1}),d.a.createElement("i",{className:"iconfont icongouwuche-xianxing shopping-cart",onClick:this.goShop})))}}]),t}(u.Component));t.a=f},701:function(e,t,a){}}]);
//# sourceMappingURL=CourseList.da982f82.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/classify/courselist.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","common/HeaderSearch/index.js"],"names":["Classify","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_9__","call","getTabs","http","get","concat","API","home","then","res","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_10__","data","code","common","length","arr2","basics","advanced","arr3","forEach","item","index","list","push","title","c_name","id","c_id","setState","arr","allClass","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_5___default","a","info","msg","catch","err","console","log","getList","getParam","isLoading","ontabclick","tab","history","activeTab","decodeURIComponent","pulldown","status","ispull","display","labelclick","state","_this2","bottom","react__WEBPACK_IMPORTED_MODULE_12___default","createElement","className","top","page","findIndex","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_15__","_common_Loading__WEBPACK_IMPORTED_MODULE_18__","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_3___default","onClick","bind","antd_mobile_lib_tabs__WEBPACK_IMPORTED_MODULE_1___default","tabs","animated","onChange","map","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_17__","to","course_id","course_title","desc","is_buy","price1","price0","bargain_num","groupon_num","is_aist","_common__WEBPACK_IMPORTED_MODULE_13__","key","img","image_name","style","ClassCourse","name","Component","e","defineProperty","exports","value","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","preventDefault","inputRef","blur","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","document","activeElement","window","requestAnimationFrame","setTimeout","body","scrollTop","onClear","doClear","arguments","undefined","onCancel","defaultValue","rightBtnRef","initBtn","getComputedStyle","rightBtnInitMarginleft","marginLeft","componentDidUpdate","syntheticPhRef","inputContainerRef","indexOf","prefixCls","syntheticPhContainerRef","realWidth","getBoundingClientRect","width","Math","ceil","showCancelButton","marginRight","offsetWidth","parseInt","nextProps","nextFrameId","cancelAnimationFrame","clearTimeout","_classnames3","_props","disabled","placeholder","maxLength","cancelText","_state","wrapCls","clearCls","cancelCls","ref","el","action","visibility","type","activeClassName","defaultProps","contextTypes","object","noop","HeaderBar","goShop","location","replace","href","react__WEBPACK_IMPORTED_MODULE_7___default","return","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","toSearch"],"mappings":"yTAWMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAmBVQ,QAAU,WAENC,IAAKC,IAAL,GAAAC,OAAYC,IAAIC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,cAAA,OACPC,UAAA4I,EACArI,QAAAlE,KAAAoK,SACAoC,IAAA,SAAAC,GACA,OAAAlJ,EAAA+G,YAAAmC,IAEOzM,KAAAJ,MAAAuM,oBAGP1D,EA7QA,CA8QCV,EAAAnC,WAEDG,EAAA,QAAA0C,EACAA,EAAAqE,aAAAzE,EAAAyE,aACArE,EAAAsE,aAAA,CACA9F,UAAAgB,EAAA+E,QAEA3G,EAAAN,UAAA,0CC5WA,SAAAkH,KAJAnN,OAAAgG,eAAAC,EAAA,cACAC,OAAA,IAKAD,EAAA+G,aAAA,CACA/B,UAAA,YACAkB,YAAA,GACApD,SAAAoE,EACA1I,SAAA0I,EACA9D,QAAA8D,EACA5D,OAAA4D,EACAjD,QAAAiD,EACA3B,kBAAA,EACAU,UAAA,qCCfAlM,OAAAgG,eAAAC,EAAA,cACAC,OAAA,IAEAD,EAAA,SACAoG,WAAA,gBAEA9F,EAAAN,UAAA,4HCJMmH,qNASFC,OAAS,WACLC,SAASC,QAAQ,wFARjB1D,OAAOyD,SAASE,KAAO,2CAIvB3D,OAAOyD,SAASE,KAAO,qCASvB,OACIC,EAAArL,EAAAwB,cAAA,OAAKC,UAAU,gBACX4J,EAAArL,EAAAwB,cAAA,OAAKC,UAAU,cACX4J,EAAArL,EAAAwB,cAAA,KAAGC,UAAW,mCAAoCO,QAASlE,KAAKwN,OAAOrJ,KAAKnE,QAC5EuN,EAAArL,EAAAwB,cAAA+J,EAAAvL,EAAA,CACI+J,YAAY,2BACZE,WAAY,IACZhD,QAASnJ,KAAK0N,SAASvJ,KAAKnE,MAC5BsL,kBAAkB,IAEtBiC,EAAArL,EAAAwB,cAAA,KAAGC,UAAW,+CAAgDO,QAASlE,KAAKmN,kBAzBxEvH,cAiCTsH","file":"static/js/CourseList.50c6b061.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport {VList} from '../../common'\nimport {Tabs, WhiteSpace} from 'antd-mobile'\nimport './courselist.scss'\nimport HeaderSearch from '../../common/HeaderSearch/index'\nimport {http, api, getParam} from \"@/utils\"\nimport {Toast} from 'antd-mobile'\nimport {Link} from 'react-router-dom'\nimport Loading from '@/common/Loading'\n\n\nclass Classify extends Component {\n constructor(props) {\n super(props)\n this.state = {\n ispull: false,\n display: 'none',\n arr: [{basics: []}, {advanced: []}],\n allClass: [],\n data: [],\n activeTab: decodeURIComponent(getParam('name')),\n isLoading: true\n }\n\n }\n\n componentDidMount() {\n this.getTabs()\n this.getList()\n }\n\n // 获取tabs接口\n getTabs = () => {\n let data = 0\n http.get(`${API.home}/m/course/classify/${data}`)\n .then((res) => {\n const _this = this\n if (res.data.code === 200) {\n if (res.data.data.common.length > 0) {\n let arr = ['basics', 'advanced']\n let arr2 = [{basics: []}, {advanced: []}]\n let arr3 = []\n arr.forEach(function (item, index) {\n arr2[item] = res.data.data.common[index]\n res.data.data.common[index].list.forEach(function (item, index) {\n arr3.push({'title': item.c_name, 'id': item.c_id})\n })\n })\n _this.setState({\n arr: arr2,\n allClass: arr3\n })\n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n .catch(err => {\n console.log(err)\n })\n }\n\n // 获取课程接口\n getList = () => {\n http.get(`${API.home}/m/course/list/${getParam('id')}`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n data: res.data.data,\n isLoading: false\n })\n }\n })\n }\n\n\n // 点击横向滚动tab查询\n ontabclick = (tab) => {\n this.props.history.push(`/courselist?id=${tab.id}&name=${tab.title}`)\n this.getList()\n this.setState({\n activeTab: decodeURIComponent(getParam('name'))\n });\n }\n\n // 上下展示\n pulldown = () => {\n this.setState(status => ({\n ispull: !status.ispull,\n display: status.ispull ? 'none' : 'block'\n }));\n }\n\n // 弹窗里面tab点击查询\n labelclick = (item) => {\n this.props.history.push(`/courselist?id=${item.c_id}&name=${item.c_name}`)\n this.getList()\n this.setState(status => ({\n ispull: !status.ispull,\n display: status.ispull ? 'none' : 'block',\n activeTab: decodeURIComponent(getParam('name'))\n }))\n }\n\n render() {\n const bottom = (\n <i className={'iconfont iconiconfront-69 pull-down'}></i>\n )\n const top = (\n <i className={'iconfont iconiconfront-71 pull-down'}></i>\n )\n\n let page = this.state.allClass.findIndex((item) => item.title === this.state.activeTab)\n\n return (\n <div className='class-child'>\n <HeaderSearch></HeaderSearch>\n <Loading isLoading={this.state.isLoading}>\n <div className='class-content'>\n <WhiteSpace/>\n <div onClick={this.pulldown.bind(this)}>\n {this.state.ispull ? top : bottom}\n </div>\n <Tabs\n tabs={this.state.allClass}\n animated={false}\n page={page}\n onChange={(tab) => this.ontabclick(tab)}\n >\n <div className='tabs'>\n <ul>\n {this.state.data && this.state.data.length > 0 && this.state.data.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${item.course_id}`}>\n {item.course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{item.desc}</p>\n <div className='des'>\n {!item.is_buy && <p className=\"course-price\">\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n }\n {item.is_buy &&\n <span className=\"isbuy\">已购买</span>\n }\n </div>\n </div>\n )\n const status = (\n <div>\n {item.bargain_num === 0 && item.groupon_num !== 0 &&\n <p className='course-status'>拼团减{item.groupon_num}元</p>\n }\n {item.bargain_num !== 0 && item.groupon_num === 0 &&\n <p className='course-status'>砍价减{item.bargain_num}元</p>\n }\n {\n item.is_aist && <span className='return_cash'></span>\n }\n </div>\n )\n return (\n <VList key={index} status={status}\n img={item.image_name} id={item.course_id}\n info={Info}></VList>\n )\n })}\n </ul>\n </div>\n </Tabs>\n <WhiteSpace/>\n </div>\n <div className='mbc-box' style={{display: this.state.display}}>\n {\n this.state.arr.basics &&\n <div className=\"tabcontent\">\n <ClassCourse activeTab={this.state.activeTab} data={this.state.arr.basics.list}\n title={this.state.arr.basics.name} labelclick={this.labelclick}/>\n <ClassCourse activeTab={this.state.activeTab} data={this.state.arr.advanced.list}\n title={this.state.arr.advanced.name} labelclick={this.labelclick}/>\n </div>\n }\n </div>\n </Loading>\n </div>\n )\n }\n\n}\n\nfunction ClassCourse(props) {\n return (\n <div className=\"class-course\">\n <p className='course-items-title'>{props.title}</p>\n <div className='items-box'>\n {\n props.data && props.data.length > 0 && props.data.map((item, index) => {\n return (\n <span className={props.activeTab === item.c_name ? 'active-label' : 'item-label'}\n key={index} onClick={e => props.labelclick(item)}>{item.c_name}</span>\n )\n })\n }\n </div>\n </div>\n )\n}\n\nexport default Classify;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, {Component} from 'react'\nimport {SearchBar} from 'antd-mobile'\nimport './index.scss'\n\nclass HeaderBar extends Component {\n toSearch() {\n window.location.href = '/search'\n }\n\n return() {\n window.location.href = '/'\n }\n\n goShop = () => {\n location.replace('/shopcart');\n }\n\n\n render() {\n return (\n <div className='preferential'>\n <div className=\"search-nav\">\n <i className={'iconfont iconiconfront-68 return'} onClick={this.return.bind(this)}></i>\n <SearchBar\n placeholder=\"搜索课程\"\n cancelText={\" \"}\n onFocus={this.toSearch.bind(this)}\n showCancelButton={false}\n />\n <i className={'iconfont icongouwuche-xianxing shopping-cart'} onClick={this.goShop}></i>\n </div>\n </div>\n )\n }\n\n}\n\nexport default HeaderBar\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/classify/courselist.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","common/HeaderSearch/index.js"],"names":["Classify","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_9__","call","getTabs","http","get","concat","API","home","then","res","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_10__","data","code","common","length","arr2","basics","advanced","arr3","forEach","item","index","list","push","title","c_name","id","c_id","setState","arr","allClass","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_5___default","a","info","msg","catch","err","console","log","getList","getParam","isLoading","ontabclick","tab","history","activeTab","decodeURIComponent","pulldown","status","ispull","display","labelclick","state","_this2","bottom","react__WEBPACK_IMPORTED_MODULE_12___default","createElement","className","top","page","findIndex","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_15__","_common_Loading__WEBPACK_IMPORTED_MODULE_18__","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_3___default","onClick","bind","antd_mobile_lib_tabs__WEBPACK_IMPORTED_MODULE_1___default","tabs","animated","onChange","map","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_17__","to","course_id","course_title","desc","is_buy","price1","price0","bargain_num","groupon_num","is_aist","_common__WEBPACK_IMPORTED_MODULE_13__","key","img","image_name","style","ClassCourse","name","Component","e","defineProperty","exports","value","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","preventDefault","inputRef","blur","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","document","activeElement","window","requestAnimationFrame","setTimeout","body","scrollTop","onClear","doClear","arguments","undefined","onCancel","defaultValue","rightBtnRef","initBtn","getComputedStyle","rightBtnInitMarginleft","marginLeft","componentDidUpdate","syntheticPhRef","inputContainerRef","indexOf","prefixCls","syntheticPhContainerRef","realWidth","getBoundingClientRect","width","Math","ceil","showCancelButton","marginRight","offsetWidth","parseInt","nextProps","nextFrameId","cancelAnimationFrame","clearTimeout","_classnames3","_props","disabled","placeholder","maxLength","cancelText","_state","wrapCls","clearCls","cancelCls","ref","el","action","visibility","type","activeClassName","defaultProps","contextTypes","object","noop","HeaderBar","goShop","location","replace","href","react__WEBPACK_IMPORTED_MODULE_7___default","return","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","toSearch"],"mappings":"yTAWMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAA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,EAAArE,cAAA,KACPQ,QAAAlE,KAAAgK,QACArG,UAAA2I,MACOvE,EAAArE,cAAA,OACPC,UAAA4I,EACArI,QAAAlE,KAAAoK,SACAoC,IAAA,SAAAC,GACA,OAAAlJ,EAAA+G,YAAAmC,IAEOzM,KAAAJ,MAAAuM,oBAGP1D,EA7QA,CA8QCV,EAAAnC,WAEDG,EAAA,QAAA0C,EACAA,EAAAqE,aAAAzE,EAAAyE,aACArE,EAAAsE,aAAA,CACA9F,UAAAgB,EAAA+E,QAEA3G,EAAAN,UAAA,0CC5WA,SAAAkH,KAJAnN,OAAAgG,eAAAC,EAAA,cACAC,OAAA,IAKAD,EAAA+G,aAAA,CACA/B,UAAA,YACAkB,YAAA,GACApD,SAAAoE,EACA1I,SAAA0I,EACA9D,QAAA8D,EACA5D,OAAA4D,EACAjD,QAAAiD,EACA3B,kBAAA,EACAU,UAAA,qCCfAlM,OAAAgG,eAAAC,EAAA,cACAC,OAAA,IAEAD,EAAA,SACAoG,WAAA,gBAEA9F,EAAAN,UAAA,4HCJMmH,qNASFC,OAAS,WACLC,SAASC,QAAQ,wFARjB1D,OAAOyD,SAASE,KAAO,2CAIvB3D,OAAOyD,SAASE,KAAO,qCASvB,OACIC,EAAArL,EAAAwB,cAAA,OAAKC,UAAU,gBACX4J,EAAArL,EAAAwB,cAAA,OAAKC,UAAU,cACX4J,EAAArL,EAAAwB,cAAA,KAAGC,UAAW,mCAAoCO,QAASlE,KAAKwN,OAAOrJ,KAAKnE,QAC5EuN,EAAArL,EAAAwB,cAAA+J,EAAAvL,EAAA,CACI+J,YAAY,2BACZE,WAAY,IACZhD,QAASnJ,KAAK0N,SAASvJ,KAAKnE,MAC5BsL,kBAAkB,IAEtBiC,EAAArL,EAAAwB,cAAA,KAAGC,UAAW,+CAAgDO,QAASlE,KAAKmN,kBAzBxEvH,cAiCTsH","file":"static/js/CourseList.da982f82.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport {VList} from '../../common'\nimport {Tabs, WhiteSpace} from 'antd-mobile'\nimport './courselist.scss'\nimport HeaderSearch from '../../common/HeaderSearch/index'\nimport {http, api, getParam} from \"@/utils\"\nimport {Toast} from 'antd-mobile'\nimport {Link} from 'react-router-dom'\nimport Loading from '@/common/Loading'\n\n\nclass Classify extends Component {\n constructor(props) {\n super(props)\n this.state = {\n ispull: false,\n display: 'none',\n arr: [{basics: []}, {advanced: []}],\n allClass: [],\n data: [],\n activeTab: decodeURIComponent(getParam('name')),\n isLoading: true\n }\n\n }\n\n componentDidMount() {\n this.getTabs()\n this.getList()\n }\n\n // 获取tabs接口\n getTabs = () => {\n let data = 0\n http.get(`${API.home}/m/course/classify/${data}`)\n .then((res) => {\n const _this = this\n if (res.data.code === 200) {\n if (res.data.data.common.length > 0) {\n let arr = ['basics', 'advanced']\n let arr2 = [{basics: []}, {advanced: []}]\n let arr3 = []\n arr.forEach(function (item, index) {\n arr2[item] = res.data.data.common[index]\n res.data.data.common[index].list.forEach(function (item, index) {\n arr3.push({'title': item.c_name, 'id': item.c_id})\n })\n })\n _this.setState({\n arr: arr2,\n allClass: arr3\n })\n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n .catch(err => {\n console.log(err)\n })\n }\n\n // 获取课程接口\n getList = () => {\n http.get(`${API.home}/m/course/list/${getParam('id')}`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n data: res.data.data,\n isLoading: false\n })\n }\n })\n }\n\n\n // 点击横向滚动tab查询\n ontabclick = (tab) => {\n this.props.history.push(`/courselist?id=${tab.id}&name=${tab.title}`)\n this.getList()\n this.setState({\n activeTab: decodeURIComponent(getParam('name'))\n });\n }\n\n // 上下展示\n pulldown = () => {\n this.setState(status => ({\n ispull: !status.ispull,\n display: status.ispull ? 'none' : 'block'\n }));\n }\n\n // 弹窗里面tab点击查询\n labelclick = (item) => {\n this.props.history.push(`/courselist?id=${item.c_id}&name=${item.c_name}`)\n this.getList()\n this.setState(status => ({\n ispull: !status.ispull,\n display: status.ispull ? 'none' : 'block',\n activeTab: decodeURIComponent(getParam('name'))\n }))\n }\n\n render() {\n const bottom = (\n <i className={'iconfont iconiconfront-69 pull-down'}></i>\n )\n const top = (\n <i className={'iconfont iconiconfront-71 pull-down'}></i>\n )\n\n let page = this.state.allClass.findIndex((item) => item.title === this.state.activeTab)\n\n return (\n <div className='class-child'>\n <HeaderSearch></HeaderSearch>\n <Loading isLoading={this.state.isLoading}>\n <div className='class-content'>\n <WhiteSpace/>\n <div onClick={this.pulldown.bind(this)}>\n {this.state.ispull ? top : bottom}\n </div>\n <Tabs\n tabs={this.state.allClass}\n animated={false}\n page={page}\n onChange={(tab) => this.ontabclick(tab)}\n >\n <div className='tabs'>\n <ul>\n {this.state.data && this.state.data.length > 0 && this.state.data.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${item.course_id}`}>\n {item.course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{item.desc}</p>\n <div className='des'>\n {!item.is_buy && <p className=\"course-price\">\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n }\n {item.is_buy &&\n <span className=\"isbuy\">已购买</span>\n }\n </div>\n </div>\n )\n const status = (\n <div>\n {item.bargain_num === 0 && item.groupon_num !== 0 &&\n <p className='course-status'>拼团减{item.groupon_num}元</p>\n }\n {item.bargain_num !== 0 && item.groupon_num === 0 &&\n <p className='course-status'>砍价减{item.bargain_num}元</p>\n }\n {\n item.is_aist && <span className='return_cash'></span>\n }\n </div>\n )\n return (\n <VList key={index} status={status}\n img={item.image_name} id={item.course_id}\n info={Info}></VList>\n )\n })}\n </ul>\n </div>\n </Tabs>\n <WhiteSpace/>\n </div>\n <div className='mbc-box' style={{display: this.state.display}}>\n {\n this.state.arr.basics &&\n <div className=\"tabcontent\">\n <ClassCourse activeTab={this.state.activeTab} data={this.state.arr.basics.list}\n title={this.state.arr.basics.name} labelclick={this.labelclick}/>\n <ClassCourse activeTab={this.state.activeTab} data={this.state.arr.advanced.list}\n title={this.state.arr.advanced.name} labelclick={this.labelclick}/>\n </div>\n }\n </div>\n </Loading>\n </div>\n )\n }\n\n}\n\nfunction ClassCourse(props) {\n return (\n <div className=\"class-course\">\n <p className='course-items-title'>{props.title}</p>\n <div className='items-box'>\n {\n props.data && props.data.length > 0 && props.data.map((item, index) => {\n return (\n <span className={props.activeTab === item.c_name ? 'active-label' : 'item-label'}\n key={index} onClick={e => props.labelclick(item)}>{item.c_name}</span>\n )\n })\n }\n </div>\n </div>\n )\n}\n\nexport default Classify;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, {Component} from 'react'\nimport {SearchBar} from 'antd-mobile'\nimport './index.scss'\n\nclass HeaderBar extends Component {\n toSearch() {\n window.location.href = '/search'\n }\n\n return() {\n window.location.href = '/'\n }\n\n goShop = () => {\n location.replace('/shopcart');\n }\n\n\n render() {\n return (\n <div className='preferential'>\n <div className=\"search-nav\">\n <i className={'iconfont iconiconfront-68 return'} onClick={this.return.bind(this)}></i>\n <SearchBar\n placeholder=\"搜索课程\"\n cancelText={\" \"}\n onFocus={this.toSearch.bind(this)}\n showCancelButton={false}\n />\n <i className={'iconfont icongouwuche-xianxing shopping-cart'} onClick={this.goShop}></i>\n </div>\n </div>\n )\n }\n\n}\n\nexport default HeaderBar\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{1173:function(e,t,a){"use strict";a.r(t);var n=a(7),s=a(8),c=a(11),o=a(9),r=a(10),i=a(0),l=a.n(i),m=(a(896),a(15)),u=a.n(m),h=a(33),p=(a(897),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("button",{className:"right"},"\u5728APP\u6253\u5f00"))}),w=a(4),d=a(898);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(o.a)(t).call(this,e))).showAnswer=function(){a.setState({isShowAnswer:!a.state.isShowAnswer})},a.state={isShowAnswer:!1,questionData:{}},a}return Object(r.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,o=t.category,r=e.isShowAnswer;return l.a.createElement("div",{className:"examination"},l.a.createElement("div",{className:"question-container"},l.a.createElement("div",{className:"topic"},l.a.createElement(h.h,{className:"category-tag"},o),l.a.createElement("span",{dangerouslySetInnerHTML:{__html:a}})),1===n&&l.a.createElement(E,{className:"options",options:s,showCorrect:this.state.isShowAnswer}),!r&&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"})))),r&&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}})}))})},896:function(e,t,a){},897:function(e,t,a){}}]);
//# sourceMappingURL=Examination.539d70c4.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{1173:function(e,t,a){"use strict";a.r(t);var n=a(7),s=a(8),c=a(11),o=a(9),r=a(10),i=a(0),l=a.n(i),m=(a(896),a(15)),u=a.n(m),h=a(30),p=(a(897),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("button",{className:"right"},"\u5728APP\u6253\u5f00"))}),w=a(4),d=a(898);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(o.a)(t).call(this,e))).showAnswer=function(){a.setState({isShowAnswer:!a.state.isShowAnswer})},a.state={isShowAnswer:!1,questionData:{}},a}return Object(r.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,o=t.category,r=e.isShowAnswer;return l.a.createElement("div",{className:"examination"},l.a.createElement("div",{className:"question-container"},l.a.createElement("div",{className:"topic"},l.a.createElement(h.h,{className:"category-tag"},o),l.a.createElement("span",{dangerouslySetInnerHTML:{__html:a}})),1===n&&l.a.createElement(E,{className:"options",options:s,showCorrect:this.state.isShowAnswer}),!r&&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"})))),r&&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}})}))})},896:function(e,t,a){},897:function(e,t,a){}}]);
//# sourceMappingURL=Examination.954a0197.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/examination/OpenApp/index.js","components/examination/index.js"],"names":["OpenApp","react_default","a","createElement","className","Examination","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","showAnswer","setState","isShowAnswer","state","questionData","_this2","http","get","concat","API","home","then","res","_res$data","data","code","newData","assign","analysis","length","split","_this$state","_this$state$questionD","ques","type_id","options","category","common","dangerouslySetInnerHTML","__html","MultiChoice","showCorrect","onClick","Answer","content","components_examination_OpenApp","PureComponent","React","memo","_ref","map","item","index","key","classnames","active","is_ans","String","fromCharCode","des","_ref2","scale"],"mappings":"6LAYeA,UATC,WACZ,OACIC,EAAAC,EAAAC,cAAA,OAAKC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,UAAU,UAAUmC,QAASA,EAC7BM,YAAanC,KAAKO,MAAMD,gBAIrDA,GAEGf,EAAAC,EAAAC,cAAA,OAAKC,UAAU,cAAc0C,QAASpC,KAAKI,YACvCb,EAAAC,EAAAC,cAAA,uCAAUF,EAAAC,EAAAC,cAAA,KAAGC,UAAU,iCAMnCY,GAAgBf,EAAAC,EAAAC,cAAC4C,EAAD,CAAQC,QAAShB,EAAUhB,cAAY,IAE3Df,EAAAC,EAAAC,cAAC8C,EAAD,cA1DyBC,iBAgEnCN,EAAcO,IAAMC,KAAK,SAAAC,GAA4B,IAA1Bd,EAA0Bc,EAA1Bd,QAASM,EAAiBQ,EAAjBR,YACtC,OACI5C,EAAAC,EAAAC,cAAA,MAAIC,UAAU,WAENmC,EAAQe,IAAI,SAACC,EAAMC,GAAP,OACRvD,EAAAC,EAAAC,cAAA,MAAIsD,IAAKD,EAAOpD,UAAWsD,IAAW,SAAU,CAACC,OAA0B,IAAhBJ,EAAKK,QAAgBf,KAC5E5C,EAAAC,EAAAC,cAAA,QAAMC,UAAU,YAAYyD,OAAOC,aAAa,GAAKN,IACpDD,EAAKQ,UAQxBhB,EAASI,IAAMC,KAAK,SAAAY,GAA6B,IAA3BhB,EAA2BgB,EAA3BhB,QAAShC,EAAkBgD,EAAlBhD,aACjC,OACIf,EAAAC,EAAAC,cAAA,OAAKC,UAAWsD,IAAW,SAAU,CAACO,MAAOjD,KACzCf,EAAAC,EAAAC,cAAA,KAAGC,UAAU,UAAb,gBACC4C,EAAQf,OAAO,GAAKe,EAAQM,IAAI,SAACC,EAAMC,GAAP,OAAiBvD,EAAAC,EAAAC,cAAA,KAAGsD,IAAKD,EAAOpD,UAAU,UAAUsC,wBAAyB,CAACC,OAAQY","file":"static/js/Examination.539d70c4.chunk.js","sourcesContent":["import React from 'react'\nimport './index.scss'\n\nconst OpenApp = () => {\n return (\n <div className='open-app'>\n <p className='left'>更多试题请前往App查看</p>\n <button className='right'>在APP打开</button>\n </div>\n )\n}\n\nexport default OpenApp","import React, { PureComponent } from 'react'\nimport './examination.scss'\nimport classnames from 'classnames'\n\nimport { Tag } from '../../common'\nimport OpenApp from './OpenApp'\nimport { http, html, htmlDecode} from '@/utils'\nimport { config } from 'rxjs';\nimport { Object } from 'core-js';\n\n\nexport default class Examination extends PureComponent {\n\n constructor(props) {\n super(props)\n this.state = {\n isShowAnswer: false,\n questionData: {}\n }\n }\n\n componentDidMount() {\n http.get(`${API.home}/m/dailyQuestion`)\n .then(res => {\n const { data: { data, code } } = res;\n if(code === 200) {\n const newData = Object.assign(data, {analysis: data.analysis.length> 0? data.analysis.split('\\n'): []})\n this.setState({\n questionData: newData\n })\n }\n })\n }\n\n showAnswer = () => {\n this.setState({isShowAnswer: !this.state.isShowAnswer})\n }\n\n render() {\n let {\n questionData: {\n ques, type_id, options, analysis, category\n },\n isShowAnswer\n } = this.state\n return (\n <div className='examination'>\n <div className=\"question-container\">\n <div className=\"topic\">\n <Tag className='category-tag'>{category}</Tag>\n <span dangerouslySetInnerHTML={{__html: ques}}/>\n </div>\n {\n type_id === 1 && <MultiChoice className='options' options={options}\n showCorrect={this.state.isShowAnswer}\n />\n }\n {\n !isShowAnswer &&\n (\n <div className=\"show-answer\" onClick={this.showAnswer}>\n <span>查看解析<i className='iconfont iconiconfront-69'></i></span>\n </div>\n )\n }\n </div>\n {\n isShowAnswer && <Answer content={analysis} isShowAnswer/>\n }\n <OpenApp/>\n </div>\n )\n }\n}\n\nconst MultiChoice = React.memo(({options, showCorrect}) => {\n return (\n <ul className='options'>\n {\n options.map((item, index) => (\n <li key={index} className={classnames('option', {'active': item.is_ans === 1 && showCorrect})}>\n <span className=\"alphabet\">{String.fromCharCode(65 + index)}</span>\n {item.des}\n </li>\n ))\n }\n </ul>\n )\n})\n\nconst Answer = React.memo(({content, isShowAnswer}) => {\n return (\n <div className={classnames('answer', {scale: isShowAnswer})}>\n <p className='legend'>解析</p>\n {content.length>0 && content.map((item, index) => <p key={index} className='content' dangerouslySetInnerHTML={{__html: item}}/>)}\n </div>\n )\n})\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/examination/OpenApp/index.js","components/examination/index.js"],"names":["OpenApp","react_default","a","createElement","className","Examination","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","showAnswer","setState","isShowAnswer","state","questionData","_this2","http","get","concat","API","home","then","res","_res$data","data","code","newData","assign","analysis","length","split","_this$state","_this$state$questionD","ques","type_id","options","category","common","dangerouslySetInnerHTML","__html","MultiChoice","showCorrect","onClick","Answer","content","components_examination_OpenApp","PureComponent","React","memo","_ref","map","item","index","key","classnames","active","is_ans","String","fromCharCode","des","_ref2","scale"],"mappings":"6LAYeA,UATC,WACZ,OACIC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,YACXH,EAAAC,EAAAC,cAAA,KAAGC,UAAU,QAAb,6DACAH,EAAAC,EAAAC,cAAA,UAAQC,UAAU,SAAlB,sFCISC,cAEjB,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAoBVQ,WAAa,WACTP,EAAKQ,SAAS,CAACC,cAAeT,EAAKU,MAAMD,gBApBzCT,EAAKU,MAAQ,CACTD,cAAc,EACdE,aAAc,IAJHX,mFAQC,IAAAY,EAAAT,KAChBU,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,qBACKC,KAAK,SAAAC,GAAO,IAAAC,EACwBD,EAAzBE,KAAQA,EADPD,EACOC,KAChB,GAAY,MAFHD,EACaE,KACL,CACb,IAAMC,EAAUtB,SAAOuB,OAAOH,EAAM,CAACI,SAAUJ,EAAKI,SAASC,OAAQ,EAAGL,EAAKI,SAASE,MAAM,MAAO,KACnGf,EAAKJ,SAAS,CACVG,aAAcY,wCAUzB,IAAAK,EAMDzB,KAAKO,M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2BgB,EAA3BhB,QAAShC,EAAkBgD,EAAlBhD,aACjC,OACIf,EAAAC,EAAAC,cAAA,OAAKC,UAAWsD,IAAW,SAAU,CAACO,MAAOjD,KACzCf,EAAAC,EAAAC,cAAA,KAAGC,UAAU,UAAb,gBACC4C,EAAQf,OAAO,GAAKe,EAAQM,IAAI,SAACC,EAAMC,GAAP,OAAiBvD,EAAAC,EAAAC,cAAA,KAAGsD,IAAKD,EAAOpD,UAAU,UAAUsC,wBAAyB,CAACC,OAAQY","file":"static/js/Examination.954a0197.chunk.js","sourcesContent":["import React from 'react'\nimport './index.scss'\n\nconst OpenApp = () => {\n return (\n <div className='open-app'>\n <p className='left'>更多试题请前往App查看</p>\n <button className='right'>在APP打开</button>\n </div>\n )\n}\n\nexport default OpenApp","import React, { PureComponent } from 'react'\nimport './examination.scss'\nimport classnames from 'classnames'\n\nimport { Tag } from '../../common'\nimport OpenApp from './OpenApp'\nimport { http, html, htmlDecode} from '@/utils'\nimport { config } from 'rxjs';\nimport { Object } from 'core-js';\n\n\nexport default class Examination extends PureComponent {\n\n constructor(props) {\n super(props)\n this.state = {\n isShowAnswer: false,\n questionData: {}\n }\n }\n\n componentDidMount() {\n http.get(`${API.home}/m/dailyQuestion`)\n .then(res => {\n const { data: { data, code } } = res;\n if(code === 200) {\n const newData = Object.assign(data, {analysis: data.analysis.length> 0? data.analysis.split('\\n'): []})\n this.setState({\n questionData: newData\n })\n }\n })\n }\n\n showAnswer = () => {\n this.setState({isShowAnswer: !this.state.isShowAnswer})\n }\n\n render() {\n let {\n questionData: {\n ques, type_id, options, analysis, category\n },\n isShowAnswer\n } = this.state\n return (\n <div className='examination'>\n <div className=\"question-container\">\n <div className=\"topic\">\n <Tag className='category-tag'>{category}</Tag>\n <span dangerouslySetInnerHTML={{__html: ques}}/>\n </div>\n {\n type_id === 1 && <MultiChoice className='options' options={options}\n showCorrect={this.state.isShowAnswer}\n />\n }\n {\n !isShowAnswer &&\n (\n <div className=\"show-answer\" onClick={this.showAnswer}>\n <span>查看解析<i className='iconfont iconiconfront-69'></i></span>\n </div>\n )\n }\n </div>\n {\n isShowAnswer && <Answer content={analysis} isShowAnswer/>\n }\n <OpenApp/>\n </div>\n )\n }\n}\n\nconst MultiChoice = React.memo(({options, showCorrect}) => {\n return (\n <ul className='options'>\n {\n options.map((item, index) => (\n <li key={index} className={classnames('option', {'active': item.is_ans === 1 && showCorrect})}>\n <span className=\"alphabet\">{String.fromCharCode(65 + index)}</span>\n {item.des}\n </li>\n ))\n }\n </ul>\n )\n})\n\nconst Answer = React.memo(({content, isShowAnswer}) => {\n return (\n <div className={classnames('answer', {scale: isShowAnswer})}>\n <p className='legend'>解析</p>\n {content.length>0 && content.map((item, index) => <p key={index} className='content' dangerouslySetInnerHTML={{__html: item}}/>)}\n </div>\n )\n})\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{1163:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(7),c=a(8),o=a(11),l=a(9),r=a(10),u=a(0),m=a.n(u),d=(a(257),a(20)),h=a(4),p=a(33),v=a(35),f=a(23),b=a(70),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.50ccc0c5.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{1163:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(7),c=a(8),o=a(11),l=a(9),r=a(10),u=a(0),m=a.n(u),d=(a(257),a(20)),h=a(4),p=a(30),v=a(35),f=a(23),b=a(70),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.e7408258.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/my/edit.js"],"names":["MyEdut","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","toEditName","name","setState","isShow","value","cancle","handleChange","e","target","outLogin","logout","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","history","push","submit","state","length","data","user_name","http","post","concat","API","home","then","res","code","updateUser","username","msg","user","avatar","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_11__","title","arrow","cart","src","alt","onClick","bind","type","placeholder","onChange","PureComponent","compose","connect","WithFullSize"],"mappings":"0OAUMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAQVQ,WAAa,SAACC,GACVR,EAAKS,SAAS,CACVC,QAAQ,EACRC,MAAOH,KAZIR,EAgBnBY,OAAS,WACLZ,EAAKS,SAAS,CACVC,QAAQ,KAlBGV,EAuBnBa,aAAe,SAACC,GACZd,EAAKS,SAAS,CACVE,MAAOG,EAAEC,OAAOJ,SAzBLX,EA6BnBgB,SAAW,WACPhB,EAAKD,MAAMkB,SACXC,EAAAC,EAAMC,KAAK,qBAAO,GAClBpB,EAAKD,M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AAA,OAAKC,UAAU,YAAYO,QAAS/C,KAAKa,UAAzC,4BAKIb,KAAKqB,MAAMd,QACX+B,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,YACXF,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,gBACXF,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,cAAf,4BACAF,EAAAtB,EAAAuB,cAAA,SAAOU,KAAK,OAAOC,YAAY,mFACxB1C,MAAOR,KAAKqB,MAAMb,MAClB2C,SAAUnD,KAAKU,aAAasC,KAAKhD,QAExCsC,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,YACXF,EAAAtB,EAAAuB,cAAA,UAAQC,UAAU,SAASO,QAAS/C,KAAKS,QAAzC,gBACA6B,EAAAtB,EAAAuB,cAAA,UAAQC,UAAU,SAASO,QAAS/C,KAAKoB,QAAzC,2BA7FXgC,iBAwGNC,sBACXC,YACI,SAAAjC,GAAK,MAAK,CAACe,KAAMf,EAAMe,OACvB,CAACtB,WAAQmB,iBAEbsB,IALWF,CAMb1D","file":"static/js/MyEdit.50ccc0c5.chunk.js","sourcesContent":["import React, {PureComponent} from 'react'\nimport './index.scss'\nimport {connect} from \"react-redux\"\nimport {Toast} from 'antd-mobile'\nimport {api, http} from \"@/utils\"\nimport {HeaderBar} from \"@/common\"\nimport {logout, updateUser} from '@/store/userAction'\nimport {compose} from \"redux\";\nimport {WithFullSize} from '@/HOCs'\n\nclass MyEdut extends PureComponent {\n constructor(props) {\n super(props)\n this.state = {\n isShow: false,\n value: ''\n }\n }\n\n // 点击编辑\n toEditName = (name) => {\n this.setState({\n isShow: true,\n value: name\n })\n }\n // 取消\n cancle = () => {\n this.setState({\n isShow: false\n })\n }\n\n // 获取input的值\n handleChange = (e) => {\n this.setState({\n value: e.target.value\n })\n }\n // 退出登录\n outLogin = () => {\n this.props.logout()\n Toast.info('已退出', 2)\n this.props.history.push('/my')\n }\n\n // 确定修改\n submit = () => {\n if (this.state.value.length > 12) {\n Toast.info('不超过12个字符', 2)\n } else if (this.state.value.length === 0) {\n Toast.info('请输入昵称', 2)\n } else {\n let data = {\n user_name: this.state.value\n }\n http.post(`${API.home}/m/user_info/update`, data).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n isShow: false\n })\n this.props.updateUser({data: {username: this.state.value}})\n Toast.info('修改成功', 2)\n } else if (res.data.code === 4008) {\n this.setState({\n isShow: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n }\n\n render() {\n const {user} = this.props\n const username = user && user.data && user.data.username\n const avatar = user && user.data && user.data.avatar\n return (\n <div className=\"edit-name\">\n <HeaderBar title='账号' arrow={true} cart={false}></HeaderBar>\n\n <div className='my-mess'>\n <img src={avatar} alt=\"\"/>\n <span className=\"name\">{username}</span>\n <span onClick={this.toEditName.bind(this, username)} className=\"edit\">编辑</span>\n </div>\n <div className=\"out-login\" onClick={this.outLogin}>\n 退出登录\n </div>\n\n {\n this.state.isShow &&\n <div className=\"edit-mbc\">\n <div className=\"edit-content\">\n <div className=\"edit-title\">修改昵称</div>\n <input type=\"text\" placeholder='请输入昵称(不超过12个字符)'\n value={this.state.value}\n onChange={this.handleChange.bind(this)}\n />\n <div className=\"edit-btn\">\n <button className='cancle' onClick={this.cancle}>取消</button>\n <button className='submit' onClick={this.submit}>确认</button>\n </div>\n </div>\n </div>\n }\n </div>\n )\n }\n\n}\n\nexport default compose(\n connect(\n state => ({user: state.user}),\n {logout, updateUser}\n ),\n WithFullSize\n)(MyEdut)\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/my/edit.js"],"names":["MyEdut","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","toEditName","name","setState","isShow","value","cancle","handleChange","e","target","outLogin","logout","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","history","push","submit","state","length","data","user_name","http","post","concat","API","home","then","res","code","updateUser","username","msg","user","avatar","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_11__","title","arrow","cart","src","alt","onClick","bind","type","placeholder","onChange","PureComponent","compose","connect","WithFullSize"],"mappings":"0OAUMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAQVQ,WAAa,SAACC,GACVR,EAAKS,SAAS,CACVC,QAAQ,EACRC,MAAOH,KAZIR,EAgBnBY,OAAS,WACLZ,EAAKS,SAAS,CACVC,QAAQ,KAlBGV,EAuBnBa,aAAe,SAACC,GACZd,EAAKS,SAAS,CACVE,MAAOG,EAAEC,OAAOJ,SAzBLX,EA6BnBgB,SAAW,WACPhB,EAAKD,MAAMkB,SACXC,EAAAC,EAAMC,KAAK,qBAAO,GAClBpB,EAAKD,MAAMsB,QAAQC,KAAK,QAhCTtB,EAoCnBuB,OAAS,WACL,GAAIvB,EAAKwB,MAAMb,MAAMc,OAAS,GAC1BP,EAAAC,EAAMC,KAAK,yCAAY,QACpB,GAAgC,IAA5BpB,EAAKwB,MAAMb,MAAMc,OACxBP,EAAAC,EAAMC,KAAK,iCAAS,OACjB,CACH,IAAIM,EAAO,CACPC,UAAW3B,EAAKwB,MAAMb,OAE1BiB,IAAKC,KAAL,GAAAC,OAAaC,IAAIC,KAAjB,uBAA4CN,GAAMO,KAAK,SAACC,GAC9B,MAAlBA,EAAIR,KAA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OAAKC,UAAU,YACXF,EAAAtB,EAAAuB,cAAA,UAAQC,UAAU,SAASO,QAAS/C,KAAKS,QAAzC,gBACA6B,EAAAtB,EAAAuB,cAAA,UAAQC,UAAU,SAASO,QAAS/C,KAAKoB,QAAzC,2BA7FXgC,iBAwGNC,sBACXC,YACI,SAAAjC,GAAK,MAAK,CAACe,KAAMf,EAAMe,OACvB,CAACtB,WAAQmB,iBAEbsB,IALWF,CAMb1D","file":"static/js/MyEdit.e7408258.chunk.js","sourcesContent":["import React, {PureComponent} from 'react'\nimport './index.scss'\nimport {connect} from \"react-redux\"\nimport {Toast} from 'antd-mobile'\nimport {api, http} from \"@/utils\"\nimport {HeaderBar} from \"@/common\"\nimport {logout, updateUser} from '@/store/userAction'\nimport {compose} from \"redux\";\nimport {WithFullSize} from '@/HOCs'\n\nclass MyEdut extends PureComponent {\n constructor(props) {\n super(props)\n this.state = {\n isShow: false,\n value: ''\n }\n }\n\n // 点击编辑\n toEditName = (name) => {\n this.setState({\n isShow: true,\n value: name\n })\n }\n // 取消\n cancle = () => {\n this.setState({\n isShow: false\n })\n }\n\n // 获取input的值\n handleChange = (e) => {\n this.setState({\n value: e.target.value\n })\n }\n // 退出登录\n outLogin = () => {\n this.props.logout()\n Toast.info('已退出', 2)\n this.props.history.push('/my')\n }\n\n // 确定修改\n submit = () => {\n if (this.state.value.length > 12) {\n Toast.info('不超过12个字符', 2)\n } else if (this.state.value.length === 0) {\n Toast.info('请输入昵称', 2)\n } else {\n let data = {\n user_name: this.state.value\n }\n http.post(`${API.home}/m/user_info/update`, data).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n isShow: false\n })\n this.props.updateUser({data: {username: this.state.value}})\n Toast.info('修改成功', 2)\n } else if (res.data.code === 4008) {\n this.setState({\n isShow: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n }\n\n render() {\n const {user} = this.props\n const username = user && user.data && user.data.username\n const avatar = user && user.data && user.data.avatar\n return (\n <div className=\"edit-name\">\n <HeaderBar title='账号' arrow={true} cart={false}></HeaderBar>\n\n <div className='my-mess'>\n <img src={avatar} alt=\"\"/>\n <span className=\"name\">{username}</span>\n <span onClick={this.toEditName.bind(this, username)} className=\"edit\">编辑</span>\n </div>\n <div className=\"out-login\" onClick={this.outLogin}>\n 退出登录\n </div>\n\n {\n this.state.isShow &&\n <div className=\"edit-mbc\">\n <div className=\"edit-content\">\n <div className=\"edit-title\">修改昵称</div>\n <input type=\"text\" placeholder='请输入昵称(不超过12个字符)'\n value={this.state.value}\n onChange={this.handleChange.bind(this)}\n />\n <div className=\"edit-btn\">\n <button className='cancle' onClick={this.cancle}>取消</button>\n <button className='submit' onClick={this.submit}>确认</button>\n </div>\n </div>\n </div>\n }\n </div>\n )\n }\n\n}\n\nexport default compose(\n connect(\n state => ({user: state.user}),\n {logout, updateUser}\n ),\n WithFullSize\n)(MyEdut)\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{1143:function(e,t,a){},1161:function(e,t,a){"use strict";a.r(t);a(153);var o=a(74),c=a.n(o),r=a(24),n=(a(44),a(14)),s=a.n(n),i=a(7),l=a(8),d=a(11),p=a(9),m=a(10),u=(a(88),a(26)),f=a.n(u),h=(a(114),a(46)),b=a.n(h),g=a(0),E=a.n(g),v=a(33),y=a(16),x=a(4),N=a(40),O=(a(1143),b.a.Item);function j(e){console.log(e);var t=e.list;return E.a.createElement("div",null,t.map(function(t,a){t.is_coupon;var o=t.course_id,c=t.image_name,r=t.price1,n=t.price0,s=t.simpledescription,i=t.course_title,l=t.coupon_num,d=t.coupon_desc,p=E.a.createElement("span",{className:"order-newprice"},"\xa5",r);e.locationState&&e.locationState.group&&(p=E.a.createElement("span",{className:"order-newprice"},"\xa5",e.groupPrice));var m=E.a.createElement("div",{className:"order-info"},E.a.createElement(y.b,{to:"/detail?id=".concat(o)},E.a.createElement("p",{className:"order-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},i)),E.a.createElement("p",{className:"order-content",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:"2",wordBreak:"break-all",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box"}},s),E.a.createElement("p",{className:"order-des"},p,E.a.createElement("span",{className:"order-price"},"\xa5",n)));return E.a.createElement(v.g,Object.assign({},t,{src:c,id:o,key:a,info:m,isaist:e.isaist}),e.locationState&&(e.locationState.type||e.locationState.simple)?E.a.createElement("div",{className:"order-prefer"},E.a.createElement(b.a,{key:a},E.a.createElement(O,{arrow:"horizontal",onClick:function(){}},E.a.createElement(y.b,{to:{pathname:"/coupons",search:"?id=".concat(o),state:{from:"/order"}}},E.a.createElement(f.a,{justify:"between"},E.a.createElement("span",{style:{color:"#333",fontSize:"15px"}},"\u4f18\u60e0\u5238"),E.a.createElement("span",{style:{fontSize:"14px",color:"#999999"}},d||(0===l?"\u65e0":"".concat(l,"\u5f20\u53ef\u7528")))))))):null)}))}var S=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(d.a)(this,Object(p.a)(t).call(this,e))).submitOrder=function(){if(0!==a.state.orderList.length)if(a.state.perfect||s.a.info("\u8bf7\u5b8c\u5584\u62a5\u540d\u4fe1\u606f\uff01"),a.props.location.state&&1===a.props.location.state.group)x.c.post("".concat(API["base-api"],"/pdd/m"),{course_id:Object(x.b)("id")}).then(function(e){console.log(e.data.data),200===e.data.errno?(sessionStorage.removeItem("orderUseCacheObj"),a.props.history.replace("/payorder?oid=".concat(e.data.data.oid))):s.a.info(e.data.msg,2)});else{var e="".concat(API["base-api"],"/m/v34/cart/order?ischeck=").concat(a.state.useBalance);a.props.location.state&&1===a.props.location.state.type&&(e+="&type=1"),x.c.get(e).then(function(e){console.log(e),0===e.data.errno?(sessionStorage.removeItem("orderUseCacheObj"),a.props.history.replace("/payorder?oid=".concat(e.data.data.order_id))):s.a.info(e.data.msg,2)})}else s.a.info("\u6ca1\u6709\u8981\u63d0\u4ea4\u7684\u8ba2\u5355\uff01")},a.useBalance=function(){var e=a.state.useBalance;a.setState({useBalance:!e}),e?sessionStorage.removeItem("orderUseCacheObj"):(a.cacheObj=Object(r.a)({},a.state),sessionStorage.setItem("orderUseCacheObj",JSON.stringify(a.state))),a.computedMoney(e)},a.computedMoney=function(e){var t=parseFloat(a.cacheObj.total),o=parseFloat(a.cacheObj.user_account),c=a.state.discount;e?a.setState({offset:a.cacheObj.offset,total:a.cacheObj.total,discount:a.cacheObj.discount}):t>o?a.setState({offset:o.toFixed(2),total:(t-o).toFixed(2),discount:(o+parseFloat(c)).toFixed(2)}):a.setState({offset:t.toFixed(2),total:0,discount:(t+parseFloat(c)).toFixed(2)})},a.computedMoneyByCache=function(){var e=parseFloat(a.cacheObj.total),t=parseFloat(a.cacheObj.user_account),o=parseFloat(a.cacheObj.discount);e>t?a.setState({offset:t.toFixed(2),total:(e-t).toFixed(2),discount:(o+t).toFixed(2)}):a.setState({offset:e.toFixed(2),total:0,discount:e.toFixed(2)})},a.showInfo=function(){a.setState(function(e){return{info:!e.info}})},a.publicGetData=function(e){var t=e.data.data,o=t.course,c=t.total,r=t.user_account,n=t.user_info,s=t.discount;a.props.location.state&&1===a.props.location.state.group&&(c=a.groupPrice),a.cacheObj={perfect:n,orderList:o,user_account:r,total:c,discount:s},a.setState({perfect:n,orderList:o,user_account:r,total:c,discount:s})},a.publicLocalStorage=function(){"PUSH"===a.props.history.action?sessionStorage.removeItem("orderUseCacheObj"):null!==sessionStorage.getItem("orderUseCacheObj")&&(a.setState({useBalance:!0}),a.computedMoneyByCache())},a.state={perfect:a.props.location.state,user_account:0,total:0,discount:0,useBalance:!1,orderList:[],info:!1,offset:0},a}return Object(m.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){var e=this;console.log(this.props.location.state),this.props.location.state&&1===this.props.location.state.type?x.c.get("".concat(API["base-api"],"/m/order/preorder?type=1")).then(function(t){200===t.data.errno?(e.publicGetData(t),e.publicLocalStorage()):s.a.info(t.data.msg,2)}):!this.props.location.state||1!==this.props.location.state.simple&&1!==this.props.location.state.bargain?this.props.location.state&&1===this.props.location.state.group?Promise.all([x.c.get("".concat(API["base-api"],"/m/order/preorder")),x.c.get("".concat(API.home,"/m/course/detail/").concat(Object(x.b)("id")))]).then(function(t){console.log(t);var a=t[0],o=t[1];console.log(a.data),console.log(o.data),200===a.data.errno&&200===o.data.code?(e.groupPrice=o.data.data.course_info.pdd_group_info.price,0===a.data.data.course.length&&a.data.data.course.push(o.data.data.course_info),e.publicGetData(a),e.publicLocalStorage()):s.a.info(a.data.msg,2)}):x.c.get("".concat(API["base-api"],"/m/order/preorder")).then(function(t){console.log("\u4e3a\u4e86\u9a8c\u8bc1\u4ec0\u4e48\u6761\u4ef6\u4e0b\u4f1a\u8d70\u8fd9\u6bb5\u4ee3\u7801"),200===t.data.errno?(e.publicGetData(t),e.publicLocalStorage()):s.a.info(t.data.msg,2)}):x.c.get("".concat(API["base-api"],"/m/order/preorder")).then(function(t){200===t.data.errno?(e.publicGetData(t),e.publicLocalStorage()):s.a.info(t.data.msg,2)})}},{key:"render",value:function(){var e=this.state,t=e.perfect,a=e.orderList,o=e.user_account,n=e.total,s=e.discount,i=e.useBalance,l=e.info,d=e.offset;return E.a.createElement("div",{className:"order-wrapper"},E.a.createElement(f.a,null,E.a.createElement(f.a.Item,null,E.a.createElement(v.e,{title:"\u8bfe\u7a0b\u62a5\u540d",arrow:!0}),!this.state.perfect&&E.a.createElement(y.b,{to:{pathname:"/orderinfo",state:{type:this.props.location.state?this.props.location.state.type:null,id:Object(x.b)("id")}},className:"order-information"},E.a.createElement("i",{className:"iconfont iconiconfront-6 order-addsize"}),E.a.createElement("div",{className:"order-infotext"},"\u5b8c\u5584\u62a5\u540d\u4fe1\u606f"),E.a.createElement("i",{className:"iconfont iconiconfront-70 order-next"})),this.state.perfect&&E.a.createElement("div",{className:"order-information2"},E.a.createElement(c.a,null,E.a.createElement(y.b,{to:{pathname:"/orderinfo",state:Object(r.a)({},this.state.perfect,this.props.location.state,{id:Object(x.b)("id")})}},E.a.createElement(f.a,{align:"center",justify:"between",style:{height:"80px"}},E.a.createElement("i",{className:"iconfont iconiconfront-20 user-icon"}),E.a.createElement(f.a,{direction:"column",justify:"between",align:"start",className:"order-cell"},E.a.createElement("div",{className:"name"},"\u59d3\u540d\uff1a".concat(t.real_name)),E.a.createElement("div",null,"\u7535\u8bdd\uff1a".concat(t.cellphone))),E.a.createElement(f.a,{align:"start",className:"order-cell"},E.a.createElement("div",null,"QQ\uff1a".concat(t.qq))))))),E.a.createElement("div",{className:"order-list"},E.a.createElement(j,{list:a,compute:this.computedMoney,courseId:Object(x.b)("id"),locationState:this.props.location.state,groupPrice:this.groupPrice})),E.a.createElement("div",{className:"order-balance"},E.a.createElement(b.a,null,E.a.createElement(O,{className:"order-prefer-text"},E.a.createElement(f.a,{justify:"between"},E.a.createElement(f.a,{align:"center"},E.a.createElement("span",null,"\u4f59\u989d\u62b5\u6263"),E.a.createElement("span",{className:"order-balanceprice"}," (\u4f59\u989d: ",E.a.createElement("i",{className:"order-money"},"".concat(o,"\u5143")),")"),E.a.createElement("i",{className:"iconfont iconiconfront-22 question-mark",onClick:this.showInfo})),E.a.createElement(f.a,null,i?E.a.createElement(E.a.Fragment,null,E.a.createElement("span",{style:{color:"#FF2121",fontSize:"15px",marginRight:"6px"}},"-".concat(d)),E.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 balance-used",onClick:Object(N.throttle)(this.useBalance,600)})):E.a.createElement("i",{className:"circle-icon",onClick:Object(N.throttle)(this.useBalance,600)})))))),E.a.createElement("div",{className:"order-bar"},E.a.createElement("div",{className:"order-course"},E.a.createElement("span",{className:"order-course-text"},"".concat(a.length,"\u95e8\u8bfe\u7a0b"))),E.a.createElement("div",{className:"order-bar-text"},E.a.createElement("div",{className:"order-amount"},E.a.createElement("span",{className:"order-amount-title"},"\u5408\u8ba1:"),E.a.createElement("span",{className:"order-amount-price"},"\uffe5".concat(n))),E.a.createElement("div",{className:"order-preprice"},E.a.createElement("span",{className:"order-preprice-title"},"\u5df2\u4f18\u60e0:"),E.a.createElement("span",{className:"order-preprice-price"},"\xa5".concat(s)))),t?E.a.createElement("button",{type:"button",className:"order-button has-info"},E.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355")):E.a.createElement("button",{type:"button",className:"order-button"},E.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355"))))),l?E.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",zIndex:"99"}},E.a.createElement("div",{style:{padding:"20px",backgroundColor:"#FFF",width:"300px",height:"170px",margin:"0 auto",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},E.a.createElement(f.a,{direction:"column",justify:"between",align:"center",style:{height:"100%"}},E.a.createElement("p",{style:{fontSize:"16px",color:"#333333"}},"\u4f59\u989d\u62b5\u6263\u8bf4\u660e"),E.a.createElement("p",{style:{lineHeight:"20px",fontSize:"13px",color:"#666666"}},"\u5206\u9500\u8bfe\u7a0b\u6216\u8005\u53c2\u4e0e\u4e03\u6708\u5728\u7ebf\u7684\u76f8\u5173\u6d3b\u52a8\uff0c\u53ef\u83b7\u5f97\u8d44\u91d1\u5956\u52b1\u3002\u8d26\u6237\u8d44\u91d1\u53ef\u76f4\u63a5\u63d0\u73b0\uff0c\u4e5f\u53ef\u62b5\u6263\u8bfe\u7a0b\u8d39\u7528\u3002"),E.a.createElement("div",{onClick:this.showInfo,style:{width:"260px",height:"30px",lineHeight:"30px",textAlign:"center",borderRadius:"3px",border:"1px solid #0099FF",color:"#0099FF",fontSize:"15px"}},"\u77e5\u9053\u4e86")))):null)}}]),t}(g.Component);t.default=S}}]);
//# sourceMappingURL=Order.0269088f.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/order/index.js"],"names":["Item","antd_mobile_lib_list__WEBPACK_IMPORTED_MODULE_13___default","a","OrderList","props","console","log","listData","list","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","map","item","index","is_coupon","course_id","image_name","price1","price0","simpledescription","course_title","coupon_num","coupon_desc","NewPrice","className","locationState","group","groupPrice","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_16__","to","concat","style","overflow","textOverflow","whiteSpace","WebkitBoxOrient","WebkitLineClamp","wordBreak","display","_common_index__WEBPACK_IMPORTED_MODULE_15__","Object","assign","src","id","key","info","isaist","type","simple","arrow","onClick","pathname","search","state","from","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_11___default","justify","color","fontSize","Order","_this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_5__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8__","call","submitOrder","orderList","length","perfect","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_4___default","location","http","post","API","getParam","then","res","data","errno","sessionStorage","removeItem","history","replace","oid","msg","url","useBalance","get","order_id","useBalanceFlag","setState","cacheObj","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__","setItem","JSON","stringify","computedMoney","totalSale","parseFloat","total","userAccount","user_account","discount","offset","toFixed","computedMoneyByCache","showInfo","prevState","publicGetData","_res$data$data","course","user_info","publicLocalStorage","action","getItem","_this2","bargain","Promise","all","home","resList","courseInfo","orderInfo","code","course_info","pdd_group_info","price","push","_this$state","title","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_1___default","align","height","direction","real_name","cellphone","qq","compute","courseId","Fragment","marginRight","throttle","position","top","left","width","backgroundColor","zIndex","padding","margin","transform","lineHeight","textAlign","borderRadius","border","Component"],"mappings":"6TAUMA,WAAOC,EAAAC,EAAKF,MAElB,SAASG,EAAUC,GACjBC,QAAQC,IAAIF,GACZ,IAAMG,EAAWH,EAAMI,KACvB,OACEC,EAAAP,EAAAQ,cAAA,WAEIH,EAASI,IAAI,SAACC,EAAMC,GACoGD,EAA9GE,UADoB,IACTC,EAAmGH,EAAnGG,UAAWC,EAAwFJ,EAAxFI,WAAYC,EAA4EL,EAA5EK,OAAQC,EAAoEN,EAApEM,OAAQC,EAA4DP,EAA5DO,kBAAmBC,EAAyCR,EAAzCQ,aAAcC,EAA2BT,EAA3BS,WAAYC,EAAeV,EAAfU,YACnGC,EAAYd,EAAAP,EAAAQ,cAAA,QAAMc,UAAU,kBAAhB,OAAmCP,GAChDb,EAAMqB,eAAiBrB,EAAMqB,cAAcC,QAC5CH,EAAYd,EAAAP,EAAAQ,cAAA,QAAMc,UAAU,kBAAhB,OAAmCpB,EAAMuB,aAEvD,IAAMC,EACJnB,EAAAP,EAAAQ,cAAA,OAAKc,UAAU,cACbf,EAAAP,EAAAQ,cAACmB,EAAA,EAAD,CAAMC,GAAE,cAAAC,OAAgBhB,IAAaN,EAAAP,EAAAQ,cAAA,KAAGc,UAAU,cAAcQ,MAAO,CAAEC,SAAU,SAAUC,aAAc,WAAYC,WAAY,WAAaf,IAChJX,EAAAP,EAAAQ,cAAA,KAAGc,UAAU,gBAAgBQ,MAAO,CAAEI,gBAAiB,WAAYC,gBAAiB,IAAKC,UAAW,YAAaL,SAAU,SAAUC,aAAc,WAAYK,QAAS,gBAAkBpB,GAC1LV,EAAAP,EAAAQ,cAAA,KAAGc,UAAU,aAKVD,EACDd,EAAAP,EAAAQ,cAAA,QAAMc,UAAU,eAAhB,OAAgCN,KAKtC,OACET,EAAAP,EAAAQ,cAAC8B,EAAA,EAADC,OAAAC,OAAA,GAAe9B,EAAf,CAAqB+B,IAAK3B,EAAY4B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AAqBlG,MAAO,UAAWC,SAAU,SAA7L,yBAIJ,aAzXMkG,aAkYLjG","file":"static/js/Order.0269088f.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, NavBar, List, WingBlank, Toast } from 'antd-mobile';\nimport { OrderItem } from '@/common/index';\nimport { Link } from 'react-router-dom';\nimport { http, getParam } from \"@/utils\";\nimport { throttle } from 'lodash';\nimport {HeaderBar} from '../../common';\n\nimport \"./order.scss\"\n\nconst Item = List.Item;\n\nfunction OrderList(props) {\n console.log(props);\n const listData = props.list;\n return (\n <div>\n {\n listData.map((item, index) => {\n const { is_coupon, course_id, image_name, price1, price0, simpledescription, course_title, coupon_num, coupon_desc} = item;\n let NewPrice = (<span className='order-newprice'>¥{price1}</span>);\n if(props.locationState && props.locationState.group) {\n NewPrice = (<span className='order-newprice'>¥{props.groupPrice}</span>);\n }\n const Info = (\n <div className=\"order-info\">\n <Link to={`/detail?id=${course_id}`}><p className='order-title' style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{course_title}</p></Link>\n <p className='order-content' style={{ WebkitBoxOrient: 'vertical', WebkitLineClamp: '2', wordBreak: 'break-all', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box' }}>{simpledescription}</p>\n <p className='order-des'>\n {/*// 这里根据类型判断 来显示什么价格 拼团还是砍价 还是特训营*/ }\n {/*{*/}\n {/* props.courseId === undefined ? (<span className='order-newprice'>¥{price1}</span>) : (<span className='order-newprice'>¥{price0}</span>)*/}\n {/*}*/}\n {NewPrice}\n <span className='order-price'>¥{price0}</span>\n </p>\n </div>\n );\n\n return (\n <OrderItem {...item} src={image_name} id={course_id} key={index} info={Info} isaist={props.isaist}>\n {\n (props.locationState && (props.locationState.type || props.locationState.simple)) ? (\n <div className=\"order-prefer\">\n <List key={index}>\n <Item\n arrow=\"horizontal\"\n onClick={() => { }}\n >\n <Link to={{\n pathname: `/coupons`,\n search: `?id=${course_id}`,\n state: {\n from: '/order'\n }}}>\n {/* <Link to='coupons' query={{id: course_id}} state={{from: '/order'}}> */}\n <Flex justify='between'>\n <span style={{ color: '#333', fontSize: '15px' }}>优惠券</span>\n <span style={{ fontSize: '14px', color: '#999999' }}>{!coupon_desc ? (coupon_num === 0 ? '无' : `${coupon_num}张可用`) : (coupon_desc)}</span>\n </Flex>\n </Link>\n </Item>\n </List>\n </div>\n ) : null\n }\n\n </OrderItem>\n )\n })\n }\n </div>\n );\n}\n\nclass Order extends Component {\n constructor(props) {\n super(props);\n this.state = {\n perfect: this.props.location.state,\n user_account: 0.00, // 账户余额\n total: 0.00, // 需要支付总金额\n discount: 0.00, //\n useBalance: false,\n orderList: [],\n info: false,\n offset: 0,\n };\n }\n // 提交订单\n submitOrder = () => {\n if (this.state.orderList.length === 0) {\n Toast.info('没有要提交的订单!');\n return;\n }\n if (!this.state.perfect) {\n Toast.info('请完善报名信息!');\n }\n if(this.props.location.state && this.props.location.state.group === 1) {\n http.post(`${API['base-api']}/pdd/m`, {course_id: getParam(\"id\")}).then(res => {\n console.log(res.data.data);\n if(res.data.errno === 200) {\n sessionStorage.removeItem('orderUseCacheObj');\n this.props.history.replace(`/payorder?oid=${res.data.data.oid}`);\n }else {\n Toast.info(res.data.msg, 2);\n return;\n }\n });\n }else{\n let url = `${API['base-api']}/m/v34/cart/order?ischeck=${this.state.useBalance}`;\n if(this.props.location.state && this.props.location.state.type === 1) {\n url += '&type=1'\n }\n http.get(url).then(res => {\n console.log(res);\n if(res.data.errno !== 0) {\n Toast.info(res.data.msg, 2);\n return;\n }\n sessionStorage.removeItem('orderUseCacheObj');\n this.props.history.replace(`/payorder?oid=${res.data.data.order_id}`);\n });\n }\n\n }\n // 勾选取消勾选 是否使用余额\n useBalance = () => {\n let useBalanceFlag = this.state.useBalance;\n this.setState({\n useBalance: !useBalanceFlag\n });\n if (!useBalanceFlag) {\n this.cacheObj = {\n ...this.state\n };\n sessionStorage.setItem('orderUseCacheObj', JSON.stringify(this.state));\n }else{\n sessionStorage.removeItem('orderUseCacheObj');\n }\n this.computedMoney(useBalanceFlag);\n }\n // 勾选取消勾选时:计算金额、优惠金额、优惠券等\n computedMoney = (useBalanceFlag) => {\n let totalSale = parseFloat(this.cacheObj.total),\n userAccount = parseFloat(this.cacheObj.user_account);\n const { discount } = this.state;\n if (!useBalanceFlag) {\n if (totalSale > userAccount) {\n this.setState({\n offset: userAccount.toFixed(2),\n total: (totalSale - userAccount).toFixed(2),\n discount: (userAccount + parseFloat(discount)).toFixed(2),\n });\n } else {\n this.setState({\n offset: totalSale.toFixed(2),\n total: 0,\n discount: (totalSale + parseFloat(discount)).toFixed(2),\n });\n }\n } else {\n this.setState({\n offset: this.cacheObj.offset,\n total: this.cacheObj.total,\n discount: this.cacheObj.discount,\n });\n }\n };\n // 选择优惠券返回时根据是否勾选计算\n computedMoneyByCache = () => {\n let totalSale = parseFloat(this.cacheObj.total),\n userAccount = parseFloat(this.cacheObj.user_account),\n discount = parseFloat(this.cacheObj.discount);\n if(totalSale > userAccount) {\n this.setState({\n offset: userAccount.toFixed(2),\n total: (totalSale - userAccount).toFixed(2),\n discount: (discount + userAccount).toFixed(2),\n });\n }else{\n this.setState({\n offset: totalSale.toFixed(2),\n total: 0,\n discount: totalSale.toFixed(2),\n });\n }\n };\n // 展示余额抵扣规则\n showInfo = () => {\n this.setState((prevState) => ({\n info: !prevState.info\n }));\n };\n // 公共方法 存储数据\n publicGetData = (res) => {\n let { course, total, user_account, user_info, discount } = res.data.data;\n if(this.props.location.state && this.props.location.state.group === 1) {\n total = this.groupPrice;\n }\n this.cacheObj = {\n perfect: user_info,\n orderList: course,\n user_account,\n total,\n discount,\n };\n this.setState({\n perfect: user_info,\n orderList: course,\n user_account,\n total,\n discount,\n });\n };\n // 公共方法 本地存储\n publicLocalStorage = () => {\n if(this.props.history.action === 'PUSH') {\n sessionStorage.removeItem('orderUseCacheObj');\n } else{\n const cacheObj = sessionStorage.getItem('orderUseCacheObj');\n if(cacheObj !== null) {\n this.setState({\n useBalance: true\n });\n this.computedMoneyByCache();\n }\n }\n };\n componentDidMount() {\n let _this = this;\n console.log(this.props.location.state);\n\n // type: 1,返现课程,simple: 1,正常购买\n if(this.props.location.state && this.props.location.state.type === 1) {\n http.get(`${API['base-api']}/m/order/preorder?type=1`).then((res) => {\n if(res.data.errno === 200) {\n this.publicGetData(res);\n this.publicLocalStorage();\n }else{\n Toast.info(res.data.msg, 2);\n }\n })\n } else if (this.props.location.state && (this.props.location.state.simple === 1 || this.props.location.state.bargain === 1)) {\n // 普通课程立即报名 不带 type = 1\n http.get(`${API['base-api']}/m/order/preorder`).then(res => {\n if(res.data.errno === 200) {\n this.publicGetData(res);\n this.publicLocalStorage();\n }else{\n Toast.info(res.data.msg, 2);\n }\n });\n } else if (this.props.location.state && this.props.location.state.group === 1){\n // 获取一键开团的课程\n Promise.all([http.get(`${API['base-api']}/m/order/preorder`), http.get(`${API.home}/m/course/detail/${getParam('id')}`)]).then(resList => {\n console.log(resList);\n let courseInfo = resList[0],\n orderInfo = resList[1];\n console.log(courseInfo.data);\n console.log(orderInfo.data);\n if(courseInfo.data.errno === 200) {\n\n }else{\n Toast.info(courseInfo.data.msg, 2);\n return;\n }\n if(orderInfo.data.code === 200) {\n\n }else{\n Toast.info(courseInfo.data.msg, 2);\n return;\n }\n this.groupPrice = orderInfo.data.data.course_info.pdd_group_info.price;\n if(courseInfo.data.data.course.length === 0) {\n courseInfo.data.data.course.push(orderInfo.data.data.course_info)\n }\n this.publicGetData(courseInfo);\n this.publicLocalStorage();\n });\n }\n else{\n http.get(`${API['base-api']}/m/order/preorder`).then((res) => {\n console.log('为了验证什么条件下会走这段代码');\n if (res.data.errno !== 200) {\n Toast.info(res.data.msg, 2);\n return;\n }\n\n this.publicGetData(res);\n this.publicLocalStorage();\n })\n }\n // else {\n // if(getParam('id')) {\n // Promise.all([http.get(`${API.home}/m/del_cart_order/${getParam('id')}`), http.get(`${API['base-api']}/m/order/preorder`)]).then(res => {\n // console.log(res);\n // let preorder = res[1],\n // orderList = preorder.data.data.course;\n // if(preorder.data.errno !== 200) {\n // Toast.info(preorder.data.msg, 2);\n // return;\n // }\n //\n // this.publicGetData(preorder);\n // this.publicLocalStorage();\n // })\n // }else{\n // http.get(`${API['base-api']}/m/order/preorder`).then((res) => {\n // console.log('为了验证什么条件下会走这段代码');\n // if (res.data.errno !== 200) {\n // Toast.info(res.data.msg, 2);\n // return;\n // }\n //\n // this.publicGetData(res);\n // this.publicLocalStorage();\n // })\n // }\n // }\n };\n render() {\n const {\n perfect,\n orderList,\n user_account,\n total,\n discount,\n useBalance,\n info,\n offset,\n } = this.state;\n\n return (\n <div className=\"order-wrapper\">\n <Flex>\n <Flex.Item>\n <HeaderBar title='课程报名' arrow={true} />\n {\n !this.state.perfect &&\n <Link to={{\n pathname: '/orderinfo',\n state: {type: this.props.location.state ? this.props.location.state.type : null, id: getParam('id')}\n }}\n className=\"order-information\">\n <i className=\"iconfont iconiconfront-6 order-addsize\" />\n <div className=\"order-infotext\">完善报名信息</div>\n <i className=\"iconfont iconiconfront-70 order-next\" />\n </Link>\n }\n {\n this.state.perfect &&\n <div className=\"order-information2\">\n <WingBlank>\n <Link to={{\n pathname: '/orderinfo',\n state: {\n ...this.state.perfect,\n ...this.props.location.state,\n id: getParam('id')\n }\n }\n } >\n <Flex align='center' justify='between' style={{ height: '80px' }}>\n <i className=\"iconfont iconiconfront-20 user-icon\"></i>\n\n <Flex direction='column' justify='between' align='start' className=\"order-cell\">\n <div className=\"name\">{`姓名:${perfect.real_name}`}</div>\n <div>{`电话:${perfect.cellphone}`}</div>\n </Flex>\n\n <Flex align='start' className=\"order-cell\">\n <div>{`QQ:${perfect.qq}`}</div>\n </Flex>\n\n </Flex>\n </Link>\n </WingBlank>\n </div>\n }\n <div className=\"order-list\">\n <OrderList list={orderList} compute={this.computedMoney} courseId={getParam('id')} locationState={this.props.location.state} groupPrice={this.groupPrice}/>\n </div>\n <div className=\"order-balance\">\n <List>\n <Item\n className=\"order-prefer-text\"\n >\n <Flex justify='between'>\n <Flex align='center'>\n <span>余额抵扣</span>\n <span className=\"order-balanceprice\"> (余额: <i className=\"order-money\">{`${user_account}元`}</i>)</span>\n <i className=\"iconfont iconiconfront-22 question-mark\" onClick={this.showInfo}></i>\n </Flex>\n\n <Flex>\n {\n useBalance ? (\n <>\n <span style={{ color: '#FF2121', fontSize: '15px', marginRight: \"6px\" }}>{`-${offset}`}</span>\n <i className={`iconfont icondanseshixintubiao-5 balance-used`} onClick={throttle(this.useBalance, 600)}></i>\n </>\n ) : (\n <i className='circle-icon' onClick={throttle(this.useBalance, 600)}></i>\n )\n }\n </Flex>\n </Flex>\n </Item>\n </List>\n </div>\n <div className=\"order-bar\">\n <div className=\"order-course\">\n <span className=\"order-course-text\">{`${orderList.length}门课程`}</span>\n </div>\n <div className=\"order-bar-text\">\n <div className=\"order-amount\">\n <span className=\"order-amount-title\">合计:</span>\n <span className=\"order-amount-price\">{`¥${total}`}</span>\n </div>\n <div className=\"order-preprice\">\n <span className=\"order-preprice-title\">已优惠:</span>\n <span className=\"order-preprice-price\">{`¥${discount}`}</span>\n </div>\n </div>\n {\n perfect ? (\n\n <button type=\"button\" className=\"order-button has-info\">\n <span className=\"order-button-text\" onClick={this.submitOrder}>提交订单</span>\n </button>\n ) : (\n\n <button type=\"button\" className=\"order-button\">\n <span className=\"order-button-text\" onClick={this.submitOrder}>提交订单</span>\n </button>\n )\n }\n </div>\n </Flex.Item>\n </Flex>\n {\n info ? (\n <div style={{ position: 'fixed', top: 0, left: 0, width: '100%', height: '100%', backgroundColor: 'rgba(0, 0, 0, 0.8)', zIndex: '99' }}>\n <div style={{ padding: '20px', backgroundColor: '#FFF', width: '300px', height: '170px', margin: '0 auto', position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }}>\n <Flex direction='column' justify='between' align='center' style={{ height: '100%' }}>\n <p style={{ fontSize: '16px', color: '#333333' }}>余额抵扣说明</p>\n <p style={{ lineHeight: '20px', fontSize: '13px', color: '#666666' }}>分销课程或者参与七月在线的相关活动,可获得资金奖励。账户资金可直接提现,也可抵扣课程费用。</p>\n <div onClick={this.showInfo} style={{ width: '260px', height: '30px', lineHeight: '30px', textAlign: 'center', borderRadius: '3px', border: '1px solid #0099FF', color: '#0099FF', fontSize: '15px' }}>知道了</div>\n </Flex>\n </div>\n </div>\n ) : null\n }\n </div>\n\n )\n }\n\n}\n\nexport default Order;"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{1143:function(e,t,a){},1161:function(e,t,a){"use strict";a.r(t);a(153);var o=a(74),c=a.n(o),r=a(24),n=(a(44),a(14)),s=a.n(n),i=a(7),l=a(8),d=a(11),p=a(9),m=a(10),u=(a(88),a(26)),f=a.n(u),h=(a(114),a(46)),b=a.n(h),g=a(0),E=a.n(g),v=a(30),y=a(16),x=a(4),N=a(40),O=(a(1143),b.a.Item);function j(e){console.log(e);var t=e.list;return E.a.createElement("div",null,t.map(function(t,a){t.is_coupon;var o=t.course_id,c=t.image_name,r=t.price1,n=t.price0,s=t.simpledescription,i=t.course_title,l=t.coupon_num,d=t.coupon_desc,p=E.a.createElement("span",{className:"order-newprice"},"\xa5",r);e.locationState&&e.locationState.group&&(p=E.a.createElement("span",{className:"order-newprice"},"\xa5",e.groupPrice));var m=E.a.createElement("div",{className:"order-info"},E.a.createElement(y.b,{to:"/detail?id=".concat(o)},E.a.createElement("p",{className:"order-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},i)),E.a.createElement("p",{className:"order-content",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:"2",wordBreak:"break-all",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box"}},s),E.a.createElement("p",{className:"order-des"},p,E.a.createElement("span",{className:"order-price"},"\xa5",n)));return E.a.createElement(v.g,Object.assign({},t,{src:c,id:o,key:a,info:m,isaist:e.isaist}),e.locationState&&(e.locationState.type||e.locationState.simple)?E.a.createElement("div",{className:"order-prefer"},E.a.createElement(b.a,{key:a},E.a.createElement(O,{arrow:"horizontal",onClick:function(){}},E.a.createElement(y.b,{to:{pathname:"/coupons",search:"?id=".concat(o),state:{from:"/order"}}},E.a.createElement(f.a,{justify:"between"},E.a.createElement("span",{style:{color:"#333",fontSize:"15px"}},"\u4f18\u60e0\u5238"),E.a.createElement("span",{style:{fontSize:"14px",color:"#999999"}},d||(0===l?"\u65e0":"".concat(l,"\u5f20\u53ef\u7528")))))))):null)}))}var S=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(d.a)(this,Object(p.a)(t).call(this,e))).submitOrder=function(){if(0!==a.state.orderList.length)if(a.state.perfect||s.a.info("\u8bf7\u5b8c\u5584\u62a5\u540d\u4fe1\u606f\uff01"),a.props.location.state&&1===a.props.location.state.group)x.c.post("".concat(API["base-api"],"/pdd/m"),{course_id:Object(x.b)("id")}).then(function(e){console.log(e.data.data),200===e.data.errno?(sessionStorage.removeItem("orderUseCacheObj"),a.props.history.replace("/payorder?oid=".concat(e.data.data.oid))):s.a.info(e.data.msg,2)});else{var e="".concat(API["base-api"],"/m/v34/cart/order?ischeck=").concat(a.state.useBalance);a.props.location.state&&1===a.props.location.state.type&&(e+="&type=1"),x.c.get(e).then(function(e){console.log(e),0===e.data.errno?(sessionStorage.removeItem("orderUseCacheObj"),a.props.history.replace("/payorder?oid=".concat(e.data.data.order_id))):s.a.info(e.data.msg,2)})}else s.a.info("\u6ca1\u6709\u8981\u63d0\u4ea4\u7684\u8ba2\u5355\uff01")},a.useBalance=function(){var e=a.state.useBalance;a.setState({useBalance:!e}),e?sessionStorage.removeItem("orderUseCacheObj"):(a.cacheObj=Object(r.a)({},a.state),sessionStorage.setItem("orderUseCacheObj",JSON.stringify(a.state))),a.computedMoney(e)},a.computedMoney=function(e){var t=parseFloat(a.cacheObj.total),o=parseFloat(a.cacheObj.user_account),c=a.state.discount;e?a.setState({offset:a.cacheObj.offset,total:a.cacheObj.total,discount:a.cacheObj.discount}):t>o?a.setState({offset:o.toFixed(2),total:(t-o).toFixed(2),discount:(o+parseFloat(c)).toFixed(2)}):a.setState({offset:t.toFixed(2),total:0,discount:(t+parseFloat(c)).toFixed(2)})},a.computedMoneyByCache=function(){var e=parseFloat(a.cacheObj.total),t=parseFloat(a.cacheObj.user_account),o=parseFloat(a.cacheObj.discount);e>t?a.setState({offset:t.toFixed(2),total:(e-t).toFixed(2),discount:(o+t).toFixed(2)}):a.setState({offset:e.toFixed(2),total:0,discount:e.toFixed(2)})},a.showInfo=function(){a.setState(function(e){return{info:!e.info}})},a.publicGetData=function(e){var t=e.data.data,o=t.course,c=t.total,r=t.user_account,n=t.user_info,s=t.discount;a.props.location.state&&1===a.props.location.state.group&&(c=a.groupPrice),a.cacheObj={perfect:n,orderList:o,user_account:r,total:c,discount:s},a.setState({perfect:n,orderList:o,user_account:r,total:c,discount:s})},a.publicLocalStorage=function(){"PUSH"===a.props.history.action?sessionStorage.removeItem("orderUseCacheObj"):null!==sessionStorage.getItem("orderUseCacheObj")&&(a.setState({useBalance:!0}),a.computedMoneyByCache())},a.state={perfect:a.props.location.state,user_account:0,total:0,discount:0,useBalance:!1,orderList:[],info:!1,offset:0},a}return Object(m.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){var e=this;console.log(this.props.location.state),this.props.location.state&&1===this.props.location.state.type?x.c.get("".concat(API.home,"/m/order/preorder?type=1")).then(function(t){200===t.data.errno?(e.publicGetData(t),e.publicLocalStorage()):s.a.info(t.data.msg,2)}):!this.props.location.state||1!==this.props.location.state.simple&&1!==this.props.location.state.bargain?this.props.location.state&&1===this.props.location.state.group?Promise.all([x.c.get("".concat(API.home,"/m/del_cart_order/").concat(Object(x.b)("id"))),x.c.get("".concat(API.home,"/m/order/preorder")),x.c.get("".concat(API.home,"/m/course/detail/").concat(Object(x.b)("id")))]).then(function(t){console.log(t);var a=t[1],o=t[2];console.log(a.data),console.log(o.data),200===a.data.code&&200===o.data.code?(e.groupPrice=o.data.data.course_info.pdd_group_info.price,0===a.data.data.course.length&&a.data.data.course.push(o.data.data.course_info),e.publicGetData(a),e.publicLocalStorage()):s.a.info(a.data.msg,2)}):x.c.get("".concat(API.home,"/m/order/preorder")).then(function(t){console.log("\u4e3a\u4e86\u9a8c\u8bc1\u4ec0\u4e48\u6761\u4ef6\u4e0b\u4f1a\u8d70\u8fd9\u6bb5\u4ee3\u7801"),200===t.data.errno?(e.publicGetData(t),e.publicLocalStorage()):s.a.info(t.data.msg,2)}):x.c.get("".concat(API.home,"/m/order/preorder")).then(function(t){200===t.data.errno?(e.publicGetData(t),e.publicLocalStorage()):s.a.info(t.data.msg,2)})}},{key:"render",value:function(){var e=this.state,t=e.perfect,a=e.orderList,o=e.user_account,n=e.total,s=e.discount,i=e.useBalance,l=e.info,d=e.offset;return E.a.createElement("div",{className:"order-wrapper"},E.a.createElement(f.a,null,E.a.createElement(f.a.Item,null,E.a.createElement(v.e,{title:"\u8bfe\u7a0b\u62a5\u540d",arrow:!0}),!this.state.perfect&&E.a.createElement(y.b,{to:{pathname:"/orderinfo",state:{type:this.props.location.state?this.props.location.state.type:null,id:Object(x.b)("id")}},className:"order-information"},E.a.createElement("i",{className:"iconfont iconiconfront-6 order-addsize"}),E.a.createElement("div",{className:"order-infotext"},"\u5b8c\u5584\u62a5\u540d\u4fe1\u606f"),E.a.createElement("i",{className:"iconfont iconiconfront-70 order-next"})),this.state.perfect&&E.a.createElement("div",{className:"order-information2"},E.a.createElement(c.a,null,E.a.createElement(y.b,{to:{pathname:"/orderinfo",state:Object(r.a)({},this.state.perfect,this.props.location.state,{id:Object(x.b)("id")})}},E.a.createElement(f.a,{align:"center",justify:"between",style:{height:"80px"}},E.a.createElement("i",{className:"iconfont iconiconfront-20 user-icon"}),E.a.createElement(f.a,{direction:"column",justify:"between",align:"start",className:"order-cell"},E.a.createElement("div",{className:"name"},"\u59d3\u540d\uff1a".concat(t.real_name)),E.a.createElement("div",null,"\u7535\u8bdd\uff1a".concat(t.cellphone))),E.a.createElement(f.a,{align:"start",className:"order-cell"},E.a.createElement("div",null,"QQ\uff1a".concat(t.qq))))))),E.a.createElement("div",{className:"order-list"},E.a.createElement(j,{list:a,compute:this.computedMoney,courseId:Object(x.b)("id"),locationState:this.props.location.state,groupPrice:this.groupPrice})),E.a.createElement("div",{className:"order-balance"},E.a.createElement(b.a,null,E.a.createElement(O,{className:"order-prefer-text"},E.a.createElement(f.a,{justify:"between"},E.a.createElement(f.a,{align:"center"},E.a.createElement("span",null,"\u4f59\u989d\u62b5\u6263"),E.a.createElement("span",{className:"order-balanceprice"}," (\u4f59\u989d: ",E.a.createElement("i",{className:"order-money"},"".concat(o,"\u5143")),")"),E.a.createElement("i",{className:"iconfont iconiconfront-22 question-mark",onClick:this.showInfo})),E.a.createElement(f.a,null,i?E.a.createElement(E.a.Fragment,null,E.a.createElement("span",{style:{color:"#FF2121",fontSize:"15px",marginRight:"6px"}},"-".concat(d)),E.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 balance-used",onClick:Object(N.throttle)(this.useBalance,600)})):E.a.createElement("i",{className:"circle-icon",onClick:Object(N.throttle)(this.useBalance,600)})))))),E.a.createElement("div",{className:"order-bar"},E.a.createElement("div",{className:"order-course"},E.a.createElement("span",{className:"order-course-text"},"".concat(a.length,"\u95e8\u8bfe\u7a0b"))),E.a.createElement("div",{className:"order-bar-text"},E.a.createElement("div",{className:"order-amount"},E.a.createElement("span",{className:"order-amount-title"},"\u5408\u8ba1:"),E.a.createElement("span",{className:"order-amount-price"},"\uffe5".concat(n))),E.a.createElement("div",{className:"order-preprice"},E.a.createElement("span",{className:"order-preprice-title"},"\u5df2\u4f18\u60e0:"),E.a.createElement("span",{className:"order-preprice-price"},"\xa5".concat(s)))),t?E.a.createElement("button",{type:"button",className:"order-button has-info"},E.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355")):E.a.createElement("button",{type:"button",className:"order-button"},E.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355"))))),l?E.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",zIndex:"99"}},E.a.createElement("div",{style:{padding:"20px",backgroundColor:"#FFF",width:"300px",height:"170px",margin:"0 auto",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},E.a.createElement(f.a,{direction:"column",justify:"between",align:"center",style:{height:"100%"}},E.a.createElement("p",{style:{fontSize:"16px",color:"#333333"}},"\u4f59\u989d\u62b5\u6263\u8bf4\u660e"),E.a.createElement("p",{style:{lineHeight:"20px",fontSize:"13px",color:"#666666"}},"\u5206\u9500\u8bfe\u7a0b\u6216\u8005\u53c2\u4e0e\u4e03\u6708\u5728\u7ebf\u7684\u76f8\u5173\u6d3b\u52a8\uff0c\u53ef\u83b7\u5f97\u8d44\u91d1\u5956\u52b1\u3002\u8d26\u6237\u8d44\u91d1\u53ef\u76f4\u63a5\u63d0\u73b0\uff0c\u4e5f\u53ef\u62b5\u6263\u8bfe\u7a0b\u8d39\u7528\u3002"),E.a.createElement("div",{onClick:this.showInfo,style:{width:"260px",height:"30px",lineHeight:"30px",textAlign:"center",borderRadius:"3px",border:"1px solid #0099FF",color:"#0099FF",fontSize:"15px"}},"\u77e5\u9053\u4e86")))):null)}}]),t}(g.Component);t.default=S}}]);
//# sourceMappingURL=Order.a3016da1.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/order/index.js"],"names":["Item","antd_mobile_lib_list__WEBPACK_IMPORTED_MODULE_13___default","a","OrderList","props","console","log","listData","list","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","map","item","index","is_coupon","course_id","image_name","price1","price0","simpledescription","course_title","coupon_num","coupon_desc","NewPrice","className","locationState","group","groupPrice","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_16__","to","concat","style","overflow","textOverflow","whiteSpace","WebkitBoxOrient","WebkitLineClamp","wordBreak","display","_common_index__WEBPACK_IMPORTED_MODULE_15__","Object","assign","src","id","key","info","isaist","type","simple","arrow","onClick","pathname","search","state","from","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_11___default","justify","color","fontSize","Order","_this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_5__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8__","call","submitOrder","orderList","length","perfect","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_4___default","location","http","post","API","getParam","then","res","data","errno","sessionStorage","removeItem","history","replace","oid","msg","url","useBalance","get","order_id","useBalanceFlag","setState","cacheObj","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__","setItem","JSON","stringify","computedMoney","totalSale","parseFloat","total","userAccount","user_account","discount","offset","toFixed","computedMoneyByCache","showInfo","prevState","publicGetData","_res$data$data","course","user_info","publicLocalStorage","action","getItem","_this2","home","bargain","Promise","all","resList","courseInfo","orderInfo","code","course_info","pdd_group_info","price","push","_this$state","title","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_1___default","align","height","direction","real_name","cellphone","qq","compute","courseId","Fragment","marginRight","throttle","position","top","left","width","backgroundColor","zIndex","padding","margin","transform","lineHeight","textAlign","borderRadius","border","Component"],"mappings":"6TAUMA,WAAOC,EAAAC,EAAKF,MAElB,SAASG,EAAUC,GACjBC,QAAQC,IAAIF,GACZ,IAAMG,EAAWH,EAAMI,KACvB,OACEC,EAAAP,EAAAQ,cAAA,WAEIH,EAASI,IAAI,SAACC,EAAMC,GACoGD,EAA9GE,UADoB,IACTC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A4CyE,MAI9ClC,EAEE7D,EAAAP,EAAAQ,cAAA,UAAQsC,KAAK,SAASxB,UAAU,yBAC9Bf,EAAAP,EAAAQ,cAAA,QAAMc,UAAU,oBAAoB2B,QAASY,KAAKI,aAAlD,6BAIA1D,EAAAP,EAAAQ,cAAA,UAAQsC,KAAK,SAASxB,UAAU,gBAC9Bf,EAAAP,EAAAQ,cAAA,QAAMc,UAAU,oBAAoB2B,QAASY,KAAKI,aAAlD,gCAQZrB,EACErC,EAAAP,EAAAQ,cAAA,OAAKsB,MAAO,CAAEgH,SAAU,QAASC,IAAK,EAAGC,KAAM,EAAGC,MAAO,OAAQb,OAAQ,OAAQc,gBAAiB,qBAAsBC,OAAQ,OAC9H5I,EAAAP,EAAAQ,cAAA,OAAKsB,MAAO,CAAEsH,QAAS,OAAQF,gBAAiB,OAAQD,MAAO,QAASb,OAAQ,QAASiB,OAAQ,SAAUP,SAAU,WAAYE,KAAM,MAAOD,IAAK,MAAOO,UAAW,0BACnK/I,EAAAP,EAAAQ,cAAA8C,EAAAtD,EAAA,CAAMqI,UAAU,SAAS9E,QAAQ,UAAU4E,MAAM,SAASrG,MAAO,CAAEsG,OAAQ,SACzE7H,EAAAP,EAAAQ,cAAA,KAAGsB,MAAO,CAAE2B,SAAU,OAAQD,MAAO,YAArC,wCACAjD,EAAAP,EAAAQ,cAAA,KAAGsB,MAAO,CAAEyH,WAAY,OAAQ9F,SAAU,OAAQD,MAAO,YAAzD,kRACAjD,EAAAP,EAAAQ,cAAA,OAAKyC,QAASY,KAAK6C,SAAU5E,MAAO,CAAEmH,MAAO,QAASb,OAAQ,OAAQmB,WAAY,OAAQC,UAAW,SAAUC,aAAc,MAAOC,OAAQ,oBAAqBlG,MAAO,UAAWC,SAAU,SAA7L,yBAIJ,aAzXMkG,aAkYLjG","file":"static/js/Order.a3016da1.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, NavBar, List, WingBlank, Toast } from 'antd-mobile';\nimport { OrderItem } from '@/common/index';\nimport { Link } from 'react-router-dom';\nimport { http, getParam } from \"@/utils\";\nimport { throttle } from 'lodash';\nimport {HeaderBar} from '../../common';\n\nimport \"./order.scss\"\n\nconst Item = List.Item;\n\nfunction OrderList(props) {\n console.log(props);\n const listData = props.list;\n return (\n <div>\n {\n listData.map((item, index) => {\n const { is_coupon, course_id, image_name, price1, price0, simpledescription, course_title, coupon_num, coupon_desc} = item;\n let NewPrice = (<span className='order-newprice'>¥{price1}</span>);\n if(props.locationState && props.locationState.group) {\n NewPrice = (<span className='order-newprice'>¥{props.groupPrice}</span>);\n }\n const Info = (\n <div className=\"order-info\">\n <Link to={`/detail?id=${course_id}`}><p className='order-title' style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{course_title}</p></Link>\n <p className='order-content' style={{ WebkitBoxOrient: 'vertical', WebkitLineClamp: '2', wordBreak: 'break-all', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box' }}>{simpledescription}</p>\n <p className='order-des'>\n {/*// 这里根据类型判断 来显示什么价格 拼团还是砍价 还是特训营*/ }\n {/*{*/}\n {/* props.courseId === undefined ? (<span className='order-newprice'>¥{price1}</span>) : (<span className='order-newprice'>¥{price0}</span>)*/}\n {/*}*/}\n {NewPrice}\n <span className='order-price'>¥{price0}</span>\n </p>\n </div>\n );\n\n return (\n <OrderItem {...item} src={image_name} id={course_id} key={index} info={Info} isaist={props.isaist}>\n {\n (props.locationState && (props.locationState.type || props.locationState.simple)) ? (\n <div className=\"order-prefer\">\n <List key={index}>\n <Item\n arrow=\"horizontal\"\n onClick={() => { }}\n >\n <Link to={{\n pathname: `/coupons`,\n search: `?id=${course_id}`,\n state: {\n from: '/order'\n }}}>\n {/* <Link to='coupons' query={{id: course_id}} state={{from: '/order'}}> */}\n <Flex justify='between'>\n <span style={{ color: '#333', fontSize: '15px' }}>优惠券</span>\n <span style={{ fontSize: '14px', color: '#999999' }}>{!coupon_desc ? (coupon_num === 0 ? '无' : `${coupon_num}张可用`) : (coupon_desc)}</span>\n </Flex>\n </Link>\n </Item>\n </List>\n </div>\n ) : null\n }\n\n </OrderItem>\n )\n })\n }\n </div>\n );\n}\n\nclass Order extends Component {\n constructor(props) {\n super(props);\n this.state = {\n perfect: this.props.location.state,\n user_account: 0.00, // 账户余额\n total: 0.00, // 需要支付总金额\n discount: 0.00, //\n useBalance: false,\n orderList: [],\n info: false,\n offset: 0,\n };\n }\n // 提交订单\n submitOrder = () => {\n if (this.state.orderList.length === 0) {\n Toast.info('没有要提交的订单!');\n return;\n }\n if (!this.state.perfect) {\n Toast.info('请完善报名信息!');\n }\n if(this.props.location.state && this.props.location.state.group === 1) {\n http.post(`${API['base-api']}/pdd/m`, {course_id: getParam(\"id\")}).then(res => {\n console.log(res.data.data);\n if(res.data.errno === 200) {\n sessionStorage.removeItem('orderUseCacheObj');\n this.props.history.replace(`/payorder?oid=${res.data.data.oid}`);\n }else {\n Toast.info(res.data.msg, 2);\n return;\n }\n });\n }else{\n let url = `${API['base-api']}/m/v34/cart/order?ischeck=${this.state.useBalance}`;\n if(this.props.location.state && this.props.location.state.type === 1) {\n url += '&type=1'\n }\n http.get(url).then(res => {\n console.log(res);\n if(res.data.errno !== 0) {\n Toast.info(res.data.msg, 2);\n return;\n }\n sessionStorage.removeItem('orderUseCacheObj');\n this.props.history.replace(`/payorder?oid=${res.data.data.order_id}`);\n });\n }\n\n }\n // 勾选取消勾选 是否使用余额\n useBalance = () => {\n let useBalanceFlag = this.state.useBalance;\n this.setState({\n useBalance: !useBalanceFlag\n });\n if (!useBalanceFlag) {\n this.cacheObj = {\n ...this.state\n };\n sessionStorage.setItem('orderUseCacheObj', JSON.stringify(this.state));\n }else{\n sessionStorage.removeItem('orderUseCacheObj');\n }\n this.computedMoney(useBalanceFlag);\n }\n // 勾选取消勾选时:计算金额、优惠金额、优惠券等\n computedMoney = (useBalanceFlag) => {\n let totalSale = parseFloat(this.cacheObj.total),\n userAccount = parseFloat(this.cacheObj.user_account);\n const { discount } = this.state;\n if (!useBalanceFlag) {\n if (totalSale > userAccount) {\n this.setState({\n offset: userAccount.toFixed(2),\n total: (totalSale - userAccount).toFixed(2),\n discount: (userAccount + parseFloat(discount)).toFixed(2),\n });\n } else {\n this.setState({\n offset: totalSale.toFixed(2),\n total: 0,\n discount: (totalSale + parseFloat(discount)).toFixed(2),\n });\n }\n } else {\n this.setState({\n offset: this.cacheObj.offset,\n total: this.cacheObj.total,\n discount: this.cacheObj.discount,\n });\n }\n };\n // 选择优惠券返回时根据是否勾选计算\n computedMoneyByCache = () => {\n let totalSale = parseFloat(this.cacheObj.total),\n userAccount = parseFloat(this.cacheObj.user_account),\n discount = parseFloat(this.cacheObj.discount);\n if(totalSale > userAccount) {\n this.setState({\n offset: userAccount.toFixed(2),\n total: (totalSale - userAccount).toFixed(2),\n discount: (discount + userAccount).toFixed(2),\n });\n }else{\n this.setState({\n offset: totalSale.toFixed(2),\n total: 0,\n discount: totalSale.toFixed(2),\n });\n }\n };\n // 展示余额抵扣规则\n showInfo = () => {\n this.setState((prevState) => ({\n info: !prevState.info\n }));\n };\n // 公共方法 存储数据\n publicGetData = (res) => {\n let { course, total, user_account, user_info, discount } = res.data.data;\n if(this.props.location.state && this.props.location.state.group === 1) {\n total = this.groupPrice;\n }\n this.cacheObj = {\n perfect: user_info,\n orderList: course,\n user_account,\n total,\n discount,\n };\n this.setState({\n perfect: user_info,\n orderList: course,\n user_account,\n total,\n discount,\n });\n };\n // 公共方法 本地存储\n publicLocalStorage = () => {\n if(this.props.history.action === 'PUSH') {\n sessionStorage.removeItem('orderUseCacheObj');\n } else{\n const cacheObj = sessionStorage.getItem('orderUseCacheObj');\n if(cacheObj !== null) {\n this.setState({\n useBalance: true\n });\n this.computedMoneyByCache();\n }\n }\n };\n componentDidMount() {\n let _this = this;\n console.log(this.props.location.state);\n\n // type: 1,返现课程,simple: 1,正常购买\n if(this.props.location.state && this.props.location.state.type === 1) {\n http.get(`${API.home}/m/order/preorder?type=1`).then((res) => {\n if(res.data.errno === 200) {\n this.publicGetData(res);\n this.publicLocalStorage();\n }else{\n Toast.info(res.data.msg, 2);\n }\n })\n } else if (this.props.location.state && (this.props.location.state.simple === 1 || this.props.location.state.bargain === 1)) {\n // 普通课程立即报名 不带 type = 1\n http.get(`${API.home}/m/order/preorder`).then(res => {\n if(res.data.errno === 200) {\n this.publicGetData(res);\n this.publicLocalStorage();\n }else{\n Toast.info(res.data.msg, 2);\n }\n });\n } else if (this.props.location.state && this.props.location.state.group === 1){\n // 获取一键开团的课程\n Promise.all([http.get(`${API.home}/m/del_cart_order/${getParam('id')}`),http.get(`${API.home}/m/order/preorder`), http.get(`${API.home}/m/course/detail/${getParam('id')}`)]).then(resList => {\n console.log(resList);\n let courseInfo = resList[1],\n orderInfo = resList[2];\n console.log(courseInfo.data);\n console.log(orderInfo.data);\n if(courseInfo.data.code === 200) {\n\n }else{\n Toast.info(courseInfo.data.msg, 2);\n return;\n }\n if(orderInfo.data.code === 200) {\n\n }else{\n Toast.info(courseInfo.data.msg, 2);\n return;\n }\n this.groupPrice = orderInfo.data.data.course_info.pdd_group_info.price;\n if(courseInfo.data.data.course.length === 0) {\n courseInfo.data.data.course.push(orderInfo.data.data.course_info)\n }\n this.publicGetData(courseInfo);\n this.publicLocalStorage();\n });\n }\n else{\n http.get(`${API.home}/m/order/preorder`).then((res) => {\n console.log('为了验证什么条件下会走这段代码');\n if (res.data.errno !== 200) {\n Toast.info(res.data.msg, 2);\n return;\n }\n\n this.publicGetData(res);\n this.publicLocalStorage();\n })\n }\n // else {\n // if(getParam('id')) {\n // Promise.all([http.get(`${API.home}/m/del_cart_order/${getParam('id')}`), http.get(`${API.home}/m/order/preorder`)]).then(res => {\n // console.log(res);\n // let preorder = res[1],\n // orderList = preorder.data.data.course;\n // if(preorder.data.errno !== 200) {\n // Toast.info(preorder.data.msg, 2);\n // return;\n // }\n //\n // this.publicGetData(preorder);\n // this.publicLocalStorage();\n // })\n // }else{\n // http.get(`${API.home}/m/order/preorder`).then((res) => {\n // console.log('为了验证什么条件下会走这段代码');\n // if (res.data.errno !== 200) {\n // Toast.info(res.data.msg, 2);\n // return;\n // }\n //\n // this.publicGetData(res);\n // this.publicLocalStorage();\n // })\n // }\n // }\n };\n render() {\n const {\n perfect,\n orderList,\n user_account,\n total,\n discount,\n useBalance,\n info,\n offset,\n } = this.state;\n\n return (\n <div className=\"order-wrapper\">\n <Flex>\n <Flex.Item>\n <HeaderBar title='课程报名' arrow={true} />\n {\n !this.state.perfect &&\n <Link to={{\n pathname: '/orderinfo',\n state: {type: this.props.location.state ? this.props.location.state.type : null, id: getParam('id')}\n }}\n className=\"order-information\">\n <i className=\"iconfont iconiconfront-6 order-addsize\" />\n <div className=\"order-infotext\">完善报名信息</div>\n <i className=\"iconfont iconiconfront-70 order-next\" />\n </Link>\n }\n {\n this.state.perfect &&\n <div className=\"order-information2\">\n <WingBlank>\n <Link to={{\n pathname: '/orderinfo',\n state: {\n ...this.state.perfect,\n ...this.props.location.state,\n id: getParam('id')\n }\n }\n } >\n <Flex align='center' justify='between' style={{ height: '80px' }}>\n <i className=\"iconfont iconiconfront-20 user-icon\"></i>\n\n <Flex direction='column' justify='between' align='start' className=\"order-cell\">\n <div className=\"name\">{`姓名:${perfect.real_name}`}</div>\n <div>{`电话:${perfect.cellphone}`}</div>\n </Flex>\n\n <Flex align='start' className=\"order-cell\">\n <div>{`QQ:${perfect.qq}`}</div>\n </Flex>\n\n </Flex>\n </Link>\n </WingBlank>\n </div>\n }\n <div className=\"order-list\">\n <OrderList list={orderList} compute={this.computedMoney} courseId={getParam('id')} locationState={this.props.location.state} groupPrice={this.groupPrice}/>\n </div>\n <div className=\"order-balance\">\n <List>\n <Item\n className=\"order-prefer-text\"\n >\n <Flex justify='between'>\n <Flex align='center'>\n <span>余额抵扣</span>\n <span className=\"order-balanceprice\"> (余额: <i className=\"order-money\">{`${user_account}元`}</i>)</span>\n <i className=\"iconfont iconiconfront-22 question-mark\" onClick={this.showInfo}></i>\n </Flex>\n\n <Flex>\n {\n useBalance ? (\n <>\n <span style={{ color: '#FF2121', fontSize: '15px', marginRight: \"6px\" }}>{`-${offset}`}</span>\n <i className={`iconfont icondanseshixintubiao-5 balance-used`} onClick={throttle(this.useBalance, 600)}></i>\n </>\n ) : (\n <i className='circle-icon' onClick={throttle(this.useBalance, 600)}></i>\n )\n }\n </Flex>\n </Flex>\n </Item>\n </List>\n </div>\n <div className=\"order-bar\">\n <div className=\"order-course\">\n <span className=\"order-course-text\">{`${orderList.length}门课程`}</span>\n </div>\n <div className=\"order-bar-text\">\n <div className=\"order-amount\">\n <span className=\"order-amount-title\">合计:</span>\n <span className=\"order-amount-price\">{`¥${total}`}</span>\n </div>\n <div className=\"order-preprice\">\n <span className=\"order-preprice-title\">已优惠:</span>\n <span className=\"order-preprice-price\">{`¥${discount}`}</span>\n </div>\n </div>\n {\n perfect ? (\n\n <button type=\"button\" className=\"order-button has-info\">\n <span className=\"order-button-text\" onClick={this.submitOrder}>提交订单</span>\n </button>\n ) : (\n\n <button type=\"button\" className=\"order-button\">\n <span className=\"order-button-text\" onClick={this.submitOrder}>提交订单</span>\n </button>\n )\n }\n </div>\n </Flex.Item>\n </Flex>\n {\n info ? (\n <div style={{ position: 'fixed', top: 0, left: 0, width: '100%', height: '100%', backgroundColor: 'rgba(0, 0, 0, 0.8)', zIndex: '99' }}>\n <div style={{ padding: '20px', backgroundColor: '#FFF', width: '300px', height: '170px', margin: '0 auto', position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }}>\n <Flex direction='column' justify='between' align='center' style={{ height: '100%' }}>\n <p style={{ fontSize: '16px', color: '#333333' }}>余额抵扣说明</p>\n <p style={{ lineHeight: '20px', fontSize: '13px', color: '#666666' }}>分销课程或者参与七月在线的相关活动,可获得资金奖励。账户资金可直接提现,也可抵扣课程费用。</p>\n <div onClick={this.showInfo} style={{ width: '260px', height: '30px', lineHeight: '30px', textAlign: 'center', borderRadius: '3px', border: '1px solid #0099FF', color: '#0099FF', fontSize: '15px' }}>知道了</div>\n </Flex>\n </div>\n </div>\n ) : null\n }\n </div>\n\n )\n }\n\n}\n\nexport default Order;"],"sourceRoot":""}
\ 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(7),r=a(8),t=a(11),l=a(9),i=a(10),c=(a(44),a(14)),s=a.n(c),p=a(24),u=(a(153),a(74)),d=a.n(u),f=(a(1131),a(1133)),h=a.n(f),m=(a(1134),a(1136)),v=a.n(m),b=a(0),g=a.n(b),q=a(18),E=a(33),j=a(4),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.08abf5d9.chunk.js.map
\ 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(7),r=a(8),t=a(11),l=a(9),i=a(10),c=(a(44),a(14)),s=a.n(c),p=a(24),u=(a(153),a(74)),d=a.n(u),f=(a(1131),a(1133)),h=a.n(f),m=(a(1134),a(1136)),v=a.n(m),b=a(0),g=a.n(b),q=a(18),E=a(30),j=a(4),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.c503b1f0.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/order/orderinfo.js"],"names":["MyForm","withFormik","mapPropsToValues","props","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_7__","userInfo","validate","values","handleSubmit","FormBag","real_name","cellphone","qq","concat","replace","length","test","same","pathName","id","console","log","http","post","API","then","res","data","errno","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_6___default","a","info","undefined","history","msg","_ref","setFieldValue","errors","touched","handleBlur","isSubmitting","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","antd_mobile_lib_input_item__WEBPACK_IMPORTED_MODULE_13___default","clear","name","onChange","value","placeholder","type","maxLength","style","marginTop","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_9___default","antd_mobile_lib_button__WEBPACK_IMPORTED_MODULE_11___default","onClick","Orderinfo","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__","call","_common__WEBPACK_IMPORTED_MODULE_16__","title","arrow","location","state","Component"],"mappings":"uSAgDMA,EAASC,YAAW,CACtBC,iBAAkB,SAAAC,GAAK,OAAAC,OAAAC,EAAA,EAAAD,CAAA,GAAUD,EAAMG,WACvCC,SAAU,SAACC,EAAQL,GAEf,MADe,IAGnBM,aAAc,SACVD,EACAE,GACC,IACMC,EAA4BH,EAA5BG,UAAWC,EAAiBJ,EAAjBI,UAAWC,EAAML,EAANK,GAC7B,GAAKF,EAGC,GAAoD,IAAhD,GAAAG,OAAIH,GAAaI,QAAQ,OAAQ,IAAIC,OAI/C,GAAKJ,EAGE,GAAK,WAAWK,KAAK,GAAAH,OAAIF,GAAaG,QAAQ,OAAQ,KAI7D,GAAKF,EAGE,GAAK,UAAUI,KAAKJ,GAApB,CAIP,IAAIK,EAAO,EACX,GAAGR,EAAQP,MAAMG,SAAU,CACvB,IAAMA,EAAWI,EAAQP,MAAMG,SAC5BA,EAASK,YAAcA,IACtBO,GAAQ,GAETZ,EAASM,YAAcA,IACtBM,GAAQ,GAETZ,EAASO,KAAOA,IACfK,GAAQ,GAGhB,IAAIC,EAAW,SACZT,EAAQP,MAAMG,SAASc,KACtBD,EAAWA,EAAW,OAAST,EAAQP,MAAMG,SAASc,IAE1DC,QAAQC,IAAId,GACA,IAATU,EASHK,IAAKC,KAAL,GAAAV,OAAaW,IAAI,YAAjB,yBAAqD,CAACd,UAAWH,EAAOG,U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ANlB,gBAQA8B,EAAAX,EAAAY,cAAAC,EAAAb,EAAA,CACIc,OAAK,EACLC,KAAK,KACLG,YAAY,+CACZE,UAAU,KACVJ,SAAU,SAACC,GAAD,OAAWX,EAAc,KAAMW,IACzCA,MAAOxC,EAAOK,IANlB,MASA6B,EAAAX,EAAAY,cAAA,OAAKS,MAAO,CAAEC,UAAW,SACrBX,EAAAX,EAAAY,cAAAW,EAAAvB,EAAA,KACIW,EAAAX,EAAAY,cAAAY,EAAAxB,EAAA,CAAQmB,KAAK,UAAUM,QAAS/C,GAAhC,qBAkFdgD,cACF,SAAAA,EAAYtD,GAAQ,OAAAC,OAAAsD,EAAA,EAAAtD,CAAAuD,KAAAF,GAAArD,OAAAwD,EAAA,EAAAxD,CAAAuD,KAAAvD,OAAAyD,EAAA,EAAAzD,CAAAqD,GAAAK,KAAAH,KACVxD,0EAIN,OACIuC,EAAAX,EAAAY,cAAA,WACID,EAAAX,EAAAY,cAACoB,EAAA,EAAD,CAAWC,MAAM,2BAAOC,OAAO,IAC/BvB,EAAAX,EAAAY,cAAC3C,EAAD,CAAQkC,QAASyB,KAAKxD,MAAM+B,QAAS5B,SAAUqD,KAAKxD,MAAM+D,SAASC,gBAT3DC,aAgBTX","file":"static/js/Orderinfo.08abf5d9.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, NavBar, List, InputItem, Button, WhiteSpace, WingBlank, Toast } from 'antd-mobile';\nimport { Formik, Field, Form, withFormik } from 'formik';\nimport {HeaderBar} from '../../common';\nimport { http } from \"@/utils\";\n\nconst InnerForm = ({\n values,\n errors,\n touched,\n setFieldValue,\n handleBlur,\n handleSubmit,\n isSubmitting,\n}) => (\n <form>\n <InputItem\n clear\n name=\"real_name\"\n onChange={(value) => setFieldValue('real_name', value)}\n placeholder=\"请输入您的真实姓名\"\n value={values.real_name}\n >姓名</InputItem>\n <InputItem\n clear\n type='phone'\n name='cellphone'\n placeholder=\"请输入您的手机号码\"\n onChange={(value) => setFieldValue('cellphone', value)}\n value={values.cellphone}\n >电话</InputItem>\n <InputItem\n clear\n name='qq'\n placeholder=\"请输入您的QQ号码\"\n maxLength='15'\n onChange={(value) => setFieldValue('qq', value)}\n value={values.qq}\n >QQ</InputItem>\n\n <div style={{ marginTop: '21px' }}>\n <WingBlank>\n <Button type='primary' onClick={handleSubmit}>确认</Button>\n </WingBlank>\n </div>\n </form>\n );\n\nconst MyForm = withFormik({\n mapPropsToValues: props => ({ ...props.userInfo }),\n validate: (values, props) => {\n const errors = {};\n return errors;\n },\n handleSubmit: (\n values,\n FormBag\n ) => {\n const {real_name, cellphone, qq} = values;\n if (!real_name) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }else if ((`${real_name}`).replace(/\\s+/g, '').length === 0) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }\n if (!cellphone) {\n Toast.info('请输入手机号!', undefined, undefined, false);\n return;\n } else if (!/1\\d{10}/g.test((`${cellphone}`).replace(/\\s+/g, ''))) {\n Toast.info('请输入正确的手机号!', undefined, undefined, false);\n return;\n }\n if (!qq) {\n Toast.info('请输入QQ号!', undefined, undefined, false);\n return;\n } else if (!/\\d{5,}/g.test(qq)) {\n Toast.info('请输入正确QQ号!', undefined, undefined, false);\n return;\n }\n let same = 0;\n if(FormBag.props.userInfo) {\n const userInfo = FormBag.props.userInfo;\n if(userInfo.real_name === real_name) {\n same += 1;\n }\n if(userInfo.cellphone === cellphone) {\n same += 1;\n }\n if(userInfo.qq === qq) {\n same += 1;\n }\n }\n let pathName = '/order';\n if(FormBag.props.userInfo.id) {\n pathName = pathName + '?id=' + FormBag.props.userInfo.id;\n }\n console.log(values);\n if(same === 3) {\n FormBag.props.history.replace(\n pathName,\n {\n ...values,\n }\n );\n return;\n }\n http.post(`${API['base-api']}/m/order/saveUserInfo`, {real_name: values.real_name, cellphone: (`${values.cellphone}`).replace(/\\s+/g, ''), qq: values.qq}).then(res=>{\n console.log(res);\n if(res.data.errno !== 200) {\n Toast.info(res.data.msg, undefined, undefined, false);\n return;\n }\n Toast.info('保存成功!', undefined, undefined, false);\n FormBag.props.history.replace(\n pathName,\n {\n ...values,\n }\n );\n });\n },\n})(InnerForm);\n\nclass Orderinfo extends Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n <div>\n <HeaderBar title='报名信息' arrow={true}></HeaderBar>\n <MyForm history={this.props.history} userInfo={this.props.location.state}/>\n </div>\n )\n }\n\n};\n\nexport default Orderinfo;"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/order/orderinfo.js"],"names":["MyForm","withFormik","mapPropsToValues","props","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_7__","userInfo","validate","values","handleSubmit","FormBag","real_name","cellphone","qq","concat","replace","length","test","same","pathName","id","console","log","http","post","API","then","res","data","errno","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_6___default","a","info","undefined","history","msg","_ref","setFieldValue","errors","touched","handleBlur","isSubmitting","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","antd_mobile_lib_input_item__WEBPACK_IMPORTED_MODULE_13___default","clear","name","onChange","value","placeholder","type","maxLength","style","marginTop","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_9___default","antd_mobile_lib_button__WEBPACK_IMPORTED_MODULE_11___default","onClick","Orderinfo","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__","call","_common__WEBPACK_IMPORTED_MODULE_16__","title","arrow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GAAQ,OAAAC,OAAAsD,EAAA,EAAAtD,CAAAuD,KAAAF,GAAArD,OAAAwD,EAAA,EAAAxD,CAAAuD,KAAAvD,OAAAyD,EAAA,EAAAzD,CAAAqD,GAAAK,KAAAH,KACVxD,0EAIN,OACIuC,EAAAX,EAAAY,cAAA,WACID,EAAAX,EAAAY,cAACoB,EAAA,EAAD,CAAWC,MAAM,2BAAOC,OAAO,IAC/BvB,EAAAX,EAAAY,cAAC3C,EAAD,CAAQkC,QAASyB,KAAKxD,MAAM+B,QAAS5B,SAAUqD,KAAKxD,MAAM+D,SAASC,gBAT3DC,aAgBTX","file":"static/js/Orderinfo.c503b1f0.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, NavBar, List, InputItem, Button, WhiteSpace, WingBlank, Toast } from 'antd-mobile';\nimport { Formik, Field, Form, withFormik } from 'formik';\nimport {HeaderBar} from '../../common';\nimport { http } from \"@/utils\";\n\nconst InnerForm = ({\n values,\n errors,\n touched,\n setFieldValue,\n handleBlur,\n handleSubmit,\n isSubmitting,\n}) => (\n <form>\n <InputItem\n clear\n name=\"real_name\"\n onChange={(value) => setFieldValue('real_name', value)}\n placeholder=\"请输入您的真实姓名\"\n value={values.real_name}\n >姓名</InputItem>\n <InputItem\n clear\n type='phone'\n name='cellphone'\n placeholder=\"请输入您的手机号码\"\n onChange={(value) => setFieldValue('cellphone', value)}\n value={values.cellphone}\n >电话</InputItem>\n <InputItem\n clear\n name='qq'\n placeholder=\"请输入您的QQ号码\"\n maxLength='15'\n onChange={(value) => setFieldValue('qq', value)}\n value={values.qq}\n >QQ</InputItem>\n\n <div style={{ marginTop: '21px' }}>\n <WingBlank>\n <Button type='primary' onClick={handleSubmit}>确认</Button>\n </WingBlank>\n </div>\n </form>\n );\n\nconst MyForm = withFormik({\n mapPropsToValues: props => ({ ...props.userInfo }),\n validate: (values, props) => {\n const errors = {};\n return errors;\n },\n handleSubmit: (\n values,\n FormBag\n ) => {\n const {real_name, cellphone, qq} = values;\n if (!real_name) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }else if ((`${real_name}`).replace(/\\s+/g, '').length === 0) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }\n if (!cellphone) {\n Toast.info('请输入手机号!', undefined, undefined, false);\n return;\n } else if (!/1\\d{10}/g.test((`${cellphone}`).replace(/\\s+/g, ''))) {\n Toast.info('请输入正确的手机号!', undefined, undefined, false);\n return;\n }\n if (!qq) {\n Toast.info('请输入QQ号!', undefined, undefined, false);\n return;\n } else if (!/\\d{5,}/g.test(qq)) {\n Toast.info('请输入正确QQ号!', undefined, undefined, false);\n return;\n }\n let same = 0;\n if(FormBag.props.userInfo) {\n const userInfo = FormBag.props.userInfo;\n if(userInfo.real_name === real_name) {\n same += 1;\n }\n if(userInfo.cellphone === cellphone) {\n same += 1;\n }\n if(userInfo.qq === qq) {\n same += 1;\n }\n }\n let pathName = '/order';\n if(FormBag.props.userInfo.id) {\n pathName = pathName + '?id=' + FormBag.props.userInfo.id;\n }\n console.log(values);\n if(same === 3) {\n FormBag.props.history.replace(\n pathName,\n {\n ...values,\n }\n );\n return;\n }\n http.post(`${API['base-api']}/m/order/saveUserInfo`, {real_name: values.real_name, cellphone: (`${values.cellphone}`).replace(/\\s+/g, ''), qq: values.qq}).then(res=>{\n console.log(res);\n if(res.data.errno !== 200) {\n Toast.info(res.data.msg, undefined, undefined, false);\n return;\n }\n Toast.info('保存成功!', undefined, undefined, false);\n FormBag.props.history.replace(\n pathName,\n {\n ...values,\n }\n );\n });\n },\n})(InnerForm);\n\nclass Orderinfo extends Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n <div>\n <HeaderBar title='报名信息' arrow={true}></HeaderBar>\n <MyForm history={this.props.history} userInfo={this.props.location.state}/>\n </div>\n )\n }\n\n};\n\nexport default Orderinfo;"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{1156:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return R});t(153);var n=t(74),i=t.n(n),o=(t(88),t(26)),c=t.n(o),r=(t(152),t(34)),l=t.n(r),s=(t(44),t(14)),d=t.n(s),u=t(7),p=t(8),m=t(11),y=t(9),g=t(10),f=(t(884),t(886)),h=t.n(f),b=(t(114),t(46)),v=t.n(b),w=t(0),E=t.n(w),x=t(4),k=t(33),N=t(16),_=(t(888),v.a.Item.Brief,h.a.RadioItem),S=[{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconzhifubaox-"},{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}],R=function(e){function a(e){var t;return Object(u.a)(this,a),(t=Object(m.a)(this,Object(y.a)(a).call(this,e))).onChange=function(e){t.setState({payType:e,checkPeriod:!1}),2===e&&t.setState({huabei:!0})},t.checkStaging=function(e){console.log(e),t.setState({huabei:!1,stageNumber:e.value,singleMoney:e.everyTotal,periodNumber:e.stage,checkPeriod:!0})},t.print=function(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];console.log(a)},t.pay=function(){var e=t.state,a=e.payType,n=e.orderId;0===a?t.alipayPay(n):1===a&&t.weixinPay(n)},t.weixinPay=function(e){Object(x.e)()?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb").toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":x.c.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(e){console.log(e),0===e.data.errno?window.location.href=e.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1").toLowerCase():d.a.info(e.data.msg,2)})},t.isweixinPay=function(){var e=Object(x.b)("code");if(e){if(void 0===Object(x.b)("oid"))return;x.c.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(x.b)("oid"),"/code/").concat(e)).then(function(e){if(0===e.data.errno){var a=e.data.data;t.onBridgeReady(a),"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",t.onBridgeReady,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",t.onBridgeReady),document.attachEvent("onWeixinJSBridgeReady",t.onBridgeReady)):t.onBridgeReady()}else d.a.info(e.data.msg,2)})}},t.payCallback=function(){},t.onBridgeReady=function(e){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.appId,timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.paySign},function(e){"get_brand_wcpay_request:ok"==e.err_msg?this.payCallback():alert("\u652f\u4ed8\u5931\u8d25")})},t.alipayPay=function(e){x.c.get("".concat(API["base-api"],"/pay/alipay/wap_charge/oid/").concat(e)).then(function(e){0===e.data.errno?window.location=e.data.data.url:d.a.info(e.data.msg,2)})},t.huabeiPay=function(e){var a=t.state,n=(a.singleMoney,a.periodNumber);console.log("\u82b1\u5457\u5206\u671f\u652f\u4ed8"),x.c.get("/pay/alipay/wap_charge/oid/".concat(e,"/plat/{plat} /hb_num/").concat(n)).then(function(e){console.log(e),0===e.data.errno?window.location=e.data.data.url:d.a.info(e.data.msg,2)})},t.state={pay_amount:0,payType:0,stageNumber:0,checkPeriod:!1,singleMoney:0,periodNumber:0,orderId:Object(x.b)("oid"),huabei:!1,fenqiList:[{value:"zhifubao",qishu:"3",lilv:"2.30%",everyMoney:300,feiyong:2.3},{value:"weixin",qishu:"6",lilv:"4.50%",everyMoney:150,feiyong:4.5},{value:"huabei",qishu:"9",lilv:"7.50%",everyMoney:100,feiyong:7.5}],categoryList:[]},t}return Object(g.a)(a,e),Object(p.a)(a,[{key:"componentDidMount",value:function(){var e=this;x.c.post("".concat(API["base-api"],"/m/order/detail"),{order_id:this.state.orderId}).then(function(a){if(console.log(a),200===a.data.errno){var t=a.data.data,n=t.course,i=t.pay_amount,o=[];[1,2,3].map(function(e){var a={};a.value=e,1===e?(a.stage=3,a.moneyRate="2.30%",a.rate=.023,a.periodic=(i/3).toFixed(2)):2===e?(a.stage=6,a.moneyRate="4.50%",a.rate=.045,a.periodic=(i/6).toFixed(2)):(a.stage=12,a.moneyRate="7.50%",a.rate=.075,a.periodic=(i/9).toFixed(2)),a.serviceFee=(i*a.rate/a.stage).toFixed(2),a.everyTotal=(parseFloat(a.periodic)+parseFloat(a.serviceFee)).toFixed(2),o.push(a)}),console.log(o),e.setState({pay_amount:i,categoryList:n,fenqiList:o})}else d.a.info(a.data.msg,2)}),(1===Object(x.b)("is_class")||Object(x.b)("weixinpay"))&&this.payCallback(),Object(x.e)()&&this.isweixinPay()}},{key:"render",value:function(){var e=this,a=this.state,t=a.orderId,n=a.pay_amount,o=a.payType,r=a.checkPeriod,s=a.singleMoney,d=a.periodNumber,u=a.huabei,p=a.fenqiList,m=a.categoryList,y=a.stageNumber;return E.a.createElement("div",{className:"pay-order"},E.a.createElement(k.e,{title:"\u786e\u8ba4\u652f\u4ed8",arrow:!0}),E.a.createElement(l.a,{size:"sm"}),E.a.createElement("div",{className:"order-number"},E.a.createElement(i.a,null,E.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},E.a.createElement("span",null,"\u8ba2\u5355\u53f7"),E.a.createElement("span",{className:"number"},t)))),E.a.createElement(l.a,{size:"md"}),m.map(function(a,t){var n=E.a.createElement("div",{className:"order-info"},E.a.createElement("p",{className:"order-title text-overflow-one"},E.a.createElement(N.b,{to:"/detail?id=".concat(a.course_id)},a.course_title)),E.a.createElement("p",{className:"order-content text-overflow-2"},a.simpledescription),E.a.createElement("p",{className:"order-des"},E.a.createElement("span",{className:"order-newprice"},"\xa5",a.price1),E.a.createElement("span",{className:"order-price"},"\xa5",a.price0)));return E.a.createElement(k.i,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),E.a.createElement(l.a,{size:"md"}),E.a.createElement("div",{className:"order-number"},E.a.createElement(i.a,null,E.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},E.a.createElement("span",null,"\u652f\u4ed8\u91d1\u989d"),E.a.createElement("span",{className:"money"},"\uffe5".concat(n))))),E.a.createElement(l.a,{size:"md"}),E.a.createElement(v.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},S.map(function(a){return E.a.createElement(_,{thumb:E.a.createElement("i",{className:"iconfont ".concat(a.icon," ").concat(o===a.value?"checked":"")}),key:a.value,checked:o===a.value,onChange:function(){return e.onChange(a.value)}},2===a.value?E.a.createElement(c.a,{direction:"column",align:"start",style:{width:"100%",marginTop:"6px"}},E.a.createElement(c.a,{direction:"row",justify:"between",style:{width:"100%",paddingRight:"30px"}},E.a.createElement("span",{style:{color:"#555555",fontSize:"14px"}},a.label),r?E.a.createElement("span",{style:{color:"#333333",fontSize:"12px"}},"".concat(s,"\u5143 \xd7 ").concat(d,"\u671f")):null),E.a.createElement(c.a,{justify:"start"},E.a.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\u652f\u4ed8\u4e0a\u9650\u53d7\u9650\u4e8e\u60a8\u7684\u82b1\u5457\u989d\u5ea6"))):a.label)})),E.a.createElement("div",{className:"pay-tip"},"\u8bf7\u572815\u5206\u949f\u5185\u5b8c\u6210\u652f\u4ed8\uff0c\u5426\u5219\u5c4a\u65f6\u7cfb\u7edf\u5c06\u5173\u95ed\u8be5\u8ba2\u5355\u3002"),E.a.createElement("div",{className:"pay-button",onClick:this.pay},"\u786e\u8ba4\u652f\u4ed8"),u?E.a.createElement("div",{className:"check-staging"},E.a.createElement("div",{className:"container"},E.a.createElement("p",{className:"check-title"},"\u8bf7\u9009\u62e9\u5206\u671f"),p.map(function(a){return E.a.createElement(_,{key:a.value,checked:y===a.value,onChange:function(){return e.checkStaging(a)}},"".concat(a.everyTotal,"\u5143 \xd7 ").concat(a.stage,"\u671f"),E.a.createElement(v.a.Item.Brief,null,"\u624b\u7eed\u8d39".concat(a.serviceFee,"\u5143/\u671f\uff0c\u8d39\u7387").concat(a.moneyRate)))}))):null)}}]),a}(w.Component)},888:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.bb4ece84.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/order/payOrder/PayOrder.js"],"names":["RadioItem","antd_mobile_lib_list__WEBPACK_IMPORTED_MODULE_16___default","a","Item","Brief","antd_mobile_lib_radio__WEBPACK_IMPORTED_MODULE_14___default","mockData","value","label","icon","PayOrder","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_8__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_10__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_11__","call","onChange","setState","payType","checkPeriod","huabei","checkStaging","item","console","log","stageNumber","singleMoney","everyTotal","periodNumber","stage","print","_len","arguments","length","e","Array","_key","pay","_this$state","state","orderId","alipayPay","weixinPay","is_weixin","window","location","href","encodeURIComponent","toLowerCase","http","get","concat","API","then","res","data","errno","url","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_7___default","info","msg","isweixinPay","weixin_code","getParam","undefined","onBridgeReady","WeixinJSBridge","document","addEventListener","attachEvent","payCallback","invoke","appId","timeStamp","nonceStr","package","signType","paySign","err_msg","alert","huabeiPay","_this$state2","pay_amount","fenqiList","qishu","lilv","everyMoney","feiyong","categoryList","_this2","post","order_id","_res$data$data","course","map","obj","moneyRate","rate","periodic","toFixed","serviceFee","parseFloat","push","_this3","_this$state3","react__WEBPACK_IMPORTED_MODULE_17___default","createElement","className","_common_index__WEBPACK_IMPORTED_MODULE_19__","title","arrow","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_5___default","size","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_1___default","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_3___default","justify","align","style","height","index","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_20__","to","course_id","course_title","simpledescription","price1","price0","handleClick","key","img","image_name","id","renderHeader","i","thumb","checked","direction","width","marginTop","paddingRight","color","fontSize","onClick","Component"],"mappings":"iXAUMA,UAFOC,EAAAC,EAAKC,KACCC,MACDC,EAAAH,EAAMF,WAEpBM,EAAW,CACX,CAAEC,MAAO,EAAGC,MAAO,qBAAOC,KAAM,kBAChC,CAAEF,MAAO,EAAGC,MAAO,2BAAQC,KAAM,oBAIhBC,cACjB,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAkBVQ,SAAW,SAACZ,GACRK,EAAKQ,SAAS,CACVC,QAASd,EACTe,aAAa,IAEH,IAAVf,GACAK,EAAKQ,SAAS,CACVG,QAAQ,KA1BDX,EA8BnBY,aAAe,SAACC,GACZC,QAAQC,IAAIF,GACZb,EAAKQ,SAAS,CACVG,QAAQ,EACRK,YAAaH,EAAKlB,MAClBsB,YAAaJ,EAAKK,WAClBC,aAAcN,EAAKO,MACnBV,aAAa,KArCFV,EAwCnBqB,MAAQ,WAAU,QAAAC,EAAAC,UAAAC,OAANC,EAAM,IAAAC,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAANF,EAAME,GAAAJ,UAAAI,GACdb,QAAQC,IAAIU,IAzCGzB,EA4CnB4B,IAAM,WAAM,IAAAC,EACmB7B,EAAK8B,MAAzBrB,EADCoB,EACDpB,QAASsB,EADRF,EACQE,QACD,IAAZtB,EACCT,EAAKgC,UAAUD,GACI,IAAZtB,GACPT,EAAKiC,UAAUF,IAjDJ/B,EAwDnBiC,UAAY,SAACF,GAELG,cACAC,OAAOC,SAASC,KAAO,6FAA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UAAWC,SAAU,SAA3C,oFAGPR,EAAEjI,UAKvBoG,EAAA1G,EAAA2G,cAAA,OAAKC,UAAU,WAAf,gJAEAF,EAAA1G,EAAA2G,cAAA,OAAKC,UAAU,aAAaoC,QAASnI,KAAKyB,KAA1C,4BAGIjB,EACIqF,EAAA1G,EAAA2G,cAAA,OAAKC,UAAU,iBACXF,EAAA1G,EAAA2G,cAAA,OAAKC,UAAU,aACXF,EAAA1G,EAAA2G,cAAA,KAAGC,UAAU,eAAb,kCACCxB,EAAUW,IAAI,SAAAwC,GAAC,OACZ7B,EAAA1G,EAAA2G,cAAC7G,EAAD,CACIoI,IAAKK,EAAElI,MACPoI,QAAS/G,IAAgB6G,EAAElI,MAC3BY,SAAU,kBAAMuF,EAAKlF,aAAaiH,KAHtC,GAAAnF,OAIQmF,EAAE3G,WAJV,gBAAAwB,OAI2BmF,EAAEzG,MAJ7B,UAKI4E,EAAA1G,EAAA2G,cAAA5G,EAAAC,EAAMC,KAAKC,MAAX,0BAAAkD,OAAwBmF,EAAElC,WAA1B,mCAAAjD,OAA6CmF,EAAEtC,iBAK/D,aAtScgD","file":"static/js/PayOrder.bb4ece84.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport {Flex, WingBlank, WhiteSpace, List, Radio, Toast} from 'antd-mobile';\nimport {http, getParam, is_weixin } from '@/utils';\nimport { OrderItem, HeaderBar } from '@/common/index';\nimport { Link } from 'react-router-dom';\nimport './PayOrder.scss';\nimport { VList } from '@/common';\n\nconst Item = List.Item;\nconst Brief = Item.Brief;\nconst RadioItem = Radio.RadioItem;\n\nlet mockData = [\n { value: 0, label: '支付宝', icon: 'iconzhifubaox-' },\n { value: 1, label: '微信支付', icon: 'iconweixinzhifu' },\n // { value: 2, label: '花呗分期', icon: 'iconhuabei' },\n];\n\nexport default class PayOrder extends Component {\n constructor(props) {\n super(props);\n this.state = {\n pay_amount: 0,\n payType: 0,\n stageNumber: 0,\n checkPeriod: false,\n singleMoney: 0,\n periodNumber: 0,\n orderId: getParam('oid'),\n huabei: false,\n fenqiList: [\n { value: 'zhifubao', qishu: '3', lilv: '2.30%', everyMoney: 300, feiyong: 2.3 },\n { value: 'weixin', qishu: '6', lilv: '4.50%', everyMoney: 150, feiyong: 4.5 },\n { value: 'huabei', qishu: '9', lilv: '7.50%', everyMoney: 100, feiyong: 7.5 },\n ],\n categoryList: [],\n }\n }\n onChange = (value) => {\n this.setState({\n payType: value,\n checkPeriod: false,\n });\n if (value === 2) {\n this.setState({\n huabei: true,\n });\n }\n };\n checkStaging = (item) => {\n console.log(item);\n this.setState({\n huabei: false,\n stageNumber: item.value,\n singleMoney: item.everyTotal,\n periodNumber: item.stage,\n checkPeriod: true,\n });\n }\n print = (...e) => {\n console.log(e);\n };\n // 确定购买\n pay = () => {\n const {payType, orderId} = this.state;\n if(payType === 0) {\n this.alipayPay(orderId)\n } else if (payType === 1) {\n this.weixinPay(orderId)\n }\n // else { // 花呗分期暂时不做\n // this.huabeiPay(orderId)\n // }\n }\n // 微信支付\n weixinPay = (orderId) => {\n // 微信内部-支付\n if (is_weixin()) {\n window.location.href = \"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=\" + encodeURIComponent(window.location.href + \"&aa=bb\").toLowerCase() + \"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect\";\n } else {\n // 微信外部-支付\n http.get(`${API['base-api']}/pay/wxpay/wap_charge/oid/${orderId}`).then((res) => {\n console.log(res);\n if (res.data.errno === 0) {\n window.location.href = res.data.data.url + \"&redirect_url=\" + encodeURIComponent(window.location.href + \"&weixinpay=1\").toLowerCase();\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n // 微信内部支付\n isweixinPay = () => {\n let weixin_code = getParam('code')\n if (weixin_code) {\n if (getParam('oid') === undefined) {\n return\n } else {\n http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => {\n if (res.data.errno === 0) {\n const data = res.data.data\n this.onBridgeReady(data)\n if (typeof WeixinJSBridge == \"undefined\") {\n if (document.addEventListener) {\n document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady, false)\n } else if (document.attachEvent) {\n document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady)\n document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady)\n }\n } else {\n this.onBridgeReady()\n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n }\n // 支付完成之后获取状态\n payCallback = () => {\n // 调到已购课程 /purchased 不需要传递任何参数\n }\n\n onBridgeReady = (data) => {\n WeixinJSBridge.invoke(\n 'getBrandWCPayRequest', {\n \"appId\": data.appId, //公众号名称,由商户传入\n \"timeStamp\": data.timeStamp, //时间戳,自1970年以来的秒数\n \"nonceStr\": data.nonceStr, //随机串\n \"package\": data.package,\n \"signType\": data.signType, //微信签名方式:\n \"paySign\": data.paySign //微信签名\n },\n function (res) {\n if (res.err_msg == \"get_brand_wcpay_request:ok\") {\n this.payCallback()\n } else {\n alert('支付失败')\n }\n }\n )\n }\n // 支付宝支付\n alipayPay = (orderId) => {\n http.get(`${API['base-api']}/pay/alipay/wap_charge/oid/${orderId}`).then((res) => {\n if (res.data.errno === 0) {\n window.location = res.data.data.url;\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // 花呗分期 暂时不做\n huabeiPay = (orderId) => {\n const {singleMoney, periodNumber} = this.state;\n\n console.log('花呗分期支付');\n http.get(`/pay/alipay/wap_charge/oid/${orderId}/plat/{plat} /hb_num/${periodNumber}`).then(res=>{\n console.log(res);\n if (res.data.errno === 0) {\n window.location = res.data.data.url;\n } else {\n Toast.info(res.data.msg, 2)\n }\n });\n }\n\n componentDidMount() {\n http.post(`${API['base-api']}/m/order/detail`, { order_id: this.state.orderId }).then((res) => {\n console.log(res);\n if (res.data.errno !== 200) {\n Toast.info(res.data.msg, 2);\n return;\n }\n const { course, pay_amount } = res.data.data;\n const fenqiList = [];\n [1, 2, 3].map((item)=>{\n let obj = {};\n obj.value = item;\n if(item === 1) {\n obj.stage = 3; //期数\n obj.moneyRate = '2.30%'; // 分期费率展示\n obj.rate = 0.023; // 分期费率计算\n obj.periodic = (pay_amount/3).toFixed(2); // 每期本金\n } else if (item === 2) {\n obj.stage = 6; //期数\n obj.moneyRate = '4.50%'; // 分期费率展示\n obj.rate = 0.045; // 分期费率计算\n obj.periodic = (pay_amount/6).toFixed(2); // 每期本金\n } else {\n obj.stage = 12; //期数\n obj.moneyRate = '7.50%'; // 分期费率展示\n obj.rate = 0.075; // 分期费率计算\n obj.periodic = (pay_amount/9).toFixed(2); // 每期本金\n }\n obj.serviceFee = ((pay_amount * obj.rate) / obj.stage).toFixed(2); // 每期的手续费 = 总金额 * 费率 / 期数\n obj.everyTotal = (parseFloat(obj.periodic) + parseFloat(obj.serviceFee)).toFixed(2);// 每期总费用 = 每期本金 + 每期手续费\n fenqiList.push(obj);\n });\n console.log(fenqiList);\n // { value: 'zhifubao', qishu: '3', lilv: '2.30%', everyMoney: 300, feiyong: 2.3 },\n // { value: 'weixin', qishu: '6', lilv: '4.50%', everyMoney: 150, feiyong: 4.5 },\n // { value: 'huabei', qishu: '9', lilv: '7.50%', everyMoney: 100, feiyong: 7.5 },\n this.setState({\n pay_amount,\n categoryList: course,\n fenqiList,\n });\n });\n if (getParam('is_class') === 1 || getParam('weixinpay')) {\n this.payCallback()\n }\n if (is_weixin()) {\n this.isweixinPay()\n }\n }\n render() {\n const { orderId, pay_amount, payType, checkPeriod, singleMoney, periodNumber, huabei, fenqiList, categoryList, stageNumber } = this.state;\n return (\n <div className='pay-order'>\n <HeaderBar title='确认支付' arrow={true}></HeaderBar>\n <WhiteSpace size='sm'></WhiteSpace>\n <div className='order-number'>\n <WingBlank>\n <Flex justify='between' align='center' style={{ height: '44px' }}>\n <span>订单号</span>\n <span className='number'>{orderId}</span>\n </Flex>\n </WingBlank>\n </div>\n <WhiteSpace size='md'></WhiteSpace>\n {\n categoryList.map((item, index) => {\n const Info = (\n <div className=\"order-info\">\n <p className='order-title text-overflow-one'>\n <Link to={`/detail?id=${item.course_id}`}>{item.course_title}</Link>\n </p>\n <p className='order-content text-overflow-2'>{item.simpledescription}</p>\n <p className='order-des'>\n <span className='order-newprice'>¥{item.price1}</span>\n <span className='order-price'>¥{item.price0}</span>\n </p>\n </div>\n )\n return (\n <VList handleClick={this.print} key={index} img={item.image_name}\n id={item.course_id}\n info={Info}></VList>\n )\n })\n }\n <WhiteSpace size='md'></WhiteSpace>\n <div className='order-number'>\n <WingBlank>\n <Flex justify='between' align='center' style={{ height: '44px' }}>\n <span>支付金额</span>\n <span className='money'>{`¥${pay_amount}`}</span>\n </Flex>\n </WingBlank>\n </div>\n\n <WhiteSpace size='md'></WhiteSpace>\n <List renderHeader={() => '支付方式'} className='pay-type-list'>\n {mockData.map(i => (\n <RadioItem\n thumb={<i className={`iconfont ${i.icon} ${payType === i.value ? 'checked' : ''}`}></i>}\n key={i.value}\n checked={payType === i.value}\n onChange={() => this.onChange(i.value)}>\n {/* {i.label} */}\n {\n i.value === 2 ? (\n <Flex direction='column' align='start' style={{ width: '100%', marginTop: '6px' }}>\n <Flex direction='row' justify='between' style={{ width: '100%', paddingRight: '30px' }}>\n <span style={{ color: '#555555', fontSize: '14px' }}>{i.label}</span>\n {\n checkPeriod ? (\n <span style={{ color: '#333333', fontSize: '12px' }}>{`${singleMoney}元 × ${periodNumber}期`}</span>\n ) : null\n }\n </Flex>\n <Flex justify='start'>\n <span style={{ color: '#999999', fontSize: '12px' }}>支付上限受限于您的花呗额度</span>\n </Flex>\n </Flex>\n ) : (i.label)\n }\n </RadioItem>\n ))}\n </List>\n <div className='pay-tip'>请在15分钟内完成支付,否则届时系统将关闭该订单。</div>\n\n <div className='pay-button' onClick={this.pay}>确认支付</div>\n\n {\n huabei ? (\n <div className='check-staging'>\n <div className='container'>\n <p className='check-title'>请选择分期</p>\n {fenqiList.map(i => (\n <RadioItem\n key={i.value}\n checked={stageNumber === i.value}\n onChange={() => this.checkStaging(i)}>\n {`${i.everyTotal}元 × ${i.stage}期`}\n <List.Item.Brief>{`手续费${i.serviceFee}元/期,费率${i.moneyRate}`}</List.Item.Brief>\n </RadioItem>\n ))}\n </div>\n </div>\n ) : null\n }\n </div>\n )\n }\n}\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{1156:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return R});t(153);var n=t(74),i=t.n(n),o=(t(88),t(26)),c=t.n(o),r=(t(152),t(34)),l=t.n(r),s=(t(44),t(14)),d=t.n(s),u=t(7),p=t(8),m=t(11),y=t(9),g=t(10),h=(t(884),t(886)),f=t.n(h),b=(t(114),t(46)),v=t.n(b),w=t(0),E=t.n(w),x=t(4),k=t(30),N=t(16),_=(t(888),v.a.Item.Brief,f.a.RadioItem),S=[{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconzhifubaox-"},{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}],R=function(e){function a(e){var t;return Object(u.a)(this,a),(t=Object(m.a)(this,Object(y.a)(a).call(this,e))).onChange=function(e){t.setState({payType:e,checkPeriod:!1}),2===e&&t.setState({huabei:!0})},t.checkStaging=function(e){console.log(e),t.setState({huabei:!1,stageNumber:e.value,singleMoney:e.everyTotal,periodNumber:e.stage,checkPeriod:!0})},t.print=function(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];console.log(a)},t.pay=function(){var e=t.state,a=e.payType,n=e.orderId;0===a?t.alipayPay(n):1===a&&t.weixinPay(n)},t.weixinPay=function(e){Object(x.e)()?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb").toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":x.c.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(e){console.log(e),0===e.data.errno?window.location.href=e.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1").toLowerCase():d.a.info(e.data.msg,2)})},t.isweixinPay=function(){var e=Object(x.b)("code");if(e){if(void 0===Object(x.b)("oid"))return;x.c.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(x.b)("oid"),"/code/").concat(e)).then(function(e){if(0===e.data.errno){var a=e.data.data;t.onBridgeReady(a),"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",t.onBridgeReady,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",t.onBridgeReady),document.attachEvent("onWeixinJSBridgeReady",t.onBridgeReady)):t.onBridgeReady()}else d.a.info(e.data.msg,2)})}},t.payCallback=function(){},t.onBridgeReady=function(e){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.appId,timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.paySign},function(e){"get_brand_wcpay_request:ok"==e.err_msg?this.payCallback():alert("\u652f\u4ed8\u5931\u8d25")})},t.alipayPay=function(e){x.c.get("".concat(API["base-api"],"/pay/alipay/wap_charge/oid/").concat(e)).then(function(e){0===e.data.errno?window.location=e.data.data.url:d.a.info(e.data.msg,2)})},t.huabeiPay=function(e){var a=t.state,n=(a.singleMoney,a.periodNumber);console.log("\u82b1\u5457\u5206\u671f\u652f\u4ed8"),x.c.get("/pay/alipay/wap_charge/oid/".concat(e,"/plat/{plat} /hb_num/").concat(n)).then(function(e){console.log(e),0===e.data.errno?window.location=e.data.data.url:d.a.info(e.data.msg,2)})},t.state={pay_amount:0,payType:0,stageNumber:0,checkPeriod:!1,singleMoney:0,periodNumber:0,orderId:Object(x.b)("oid"),huabei:!1,fenqiList:[{value:"zhifubao",qishu:"3",lilv:"2.30%",everyMoney:300,feiyong:2.3},{value:"weixin",qishu:"6",lilv:"4.50%",everyMoney:150,feiyong:4.5},{value:"huabei",qishu:"9",lilv:"7.50%",everyMoney:100,feiyong:7.5}],categoryList:[]},t}return Object(g.a)(a,e),Object(p.a)(a,[{key:"componentDidMount",value:function(){var e=this;x.c.post("".concat(API.home,"/m/order/detail"),{order_id:this.state.orderId}).then(function(a){if(console.log(a),200===a.data.code){var t=a.data.data,n=t.course,i=t.pay_amount,o=[];[1,2,3].map(function(e){var a={};a.value=e,1===e?(a.stage=3,a.moneyRate="2.30%",a.rate=.023,a.periodic=(i/3).toFixed(2)):2===e?(a.stage=6,a.moneyRate="4.50%",a.rate=.045,a.periodic=(i/6).toFixed(2)):(a.stage=12,a.moneyRate="7.50%",a.rate=.075,a.periodic=(i/9).toFixed(2)),a.serviceFee=(i*a.rate/a.stage).toFixed(2),a.everyTotal=(parseFloat(a.periodic)+parseFloat(a.serviceFee)).toFixed(2),o.push(a)}),console.log(o),e.setState({pay_amount:i,categoryList:n,fenqiList:o})}else d.a.info(a.data.msg,2)}),(1===Object(x.b)("is_class")||Object(x.b)("weixinpay"))&&this.payCallback(),Object(x.e)()&&this.isweixinPay()}},{key:"render",value:function(){var e=this,a=this.state,t=a.orderId,n=a.pay_amount,o=a.payType,r=a.checkPeriod,s=a.singleMoney,d=a.periodNumber,u=a.huabei,p=a.fenqiList,m=a.categoryList,y=a.stageNumber;return E.a.createElement("div",{className:"pay-order"},E.a.createElement(k.e,{title:"\u786e\u8ba4\u652f\u4ed8",arrow:!0}),E.a.createElement(l.a,{size:"sm"}),E.a.createElement("div",{className:"order-number"},E.a.createElement(i.a,null,E.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},E.a.createElement("span",null,"\u8ba2\u5355\u53f7"),E.a.createElement("span",{className:"number"},t)))),E.a.createElement(l.a,{size:"md"}),m.map(function(a,t){var n=E.a.createElement("div",{className:"order-info"},E.a.createElement("p",{className:"order-title text-overflow-one"},E.a.createElement(N.b,{to:"/detail?id=".concat(a.course_id)},a.course_title)),E.a.createElement("p",{className:"order-content text-overflow-2"},a.simpledescription),E.a.createElement("p",{className:"order-des"},E.a.createElement("span",{className:"order-newprice"},"\xa5",a.price1),E.a.createElement("span",{className:"order-price"},"\xa5",a.price0)));return E.a.createElement(k.i,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),E.a.createElement(l.a,{size:"md"}),E.a.createElement("div",{className:"order-number"},E.a.createElement(i.a,null,E.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},E.a.createElement("span",null,"\u652f\u4ed8\u91d1\u989d"),E.a.createElement("span",{className:"money"},"\uffe5".concat(n))))),E.a.createElement(l.a,{size:"md"}),E.a.createElement(v.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},S.map(function(a){return E.a.createElement(_,{thumb:E.a.createElement("i",{className:"iconfont ".concat(a.icon," ").concat(o===a.value?"checked":"")}),key:a.value,checked:o===a.value,onChange:function(){return e.onChange(a.value)}},2===a.value?E.a.createElement(c.a,{direction:"column",align:"start",style:{width:"100%",marginTop:"6px"}},E.a.createElement(c.a,{direction:"row",justify:"between",style:{width:"100%",paddingRight:"30px"}},E.a.createElement("span",{style:{color:"#555555",fontSize:"14px"}},a.label),r?E.a.createElement("span",{style:{color:"#333333",fontSize:"12px"}},"".concat(s,"\u5143 \xd7 ").concat(d,"\u671f")):null),E.a.createElement(c.a,{justify:"start"},E.a.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\u652f\u4ed8\u4e0a\u9650\u53d7\u9650\u4e8e\u60a8\u7684\u82b1\u5457\u989d\u5ea6"))):a.label)})),E.a.createElement("div",{className:"pay-tip"},"\u8bf7\u572815\u5206\u949f\u5185\u5b8c\u6210\u652f\u4ed8\uff0c\u5426\u5219\u5c4a\u65f6\u7cfb\u7edf\u5c06\u5173\u95ed\u8be5\u8ba2\u5355\u3002"),E.a.createElement("div",{className:"pay-button",onClick:this.pay},"\u786e\u8ba4\u652f\u4ed8"),u?E.a.createElement("div",{className:"check-staging"},E.a.createElement("div",{className:"container"},E.a.createElement("p",{className:"check-title"},"\u8bf7\u9009\u62e9\u5206\u671f"),p.map(function(a){return E.a.createElement(_,{key:a.value,checked:y===a.value,onChange:function(){return e.checkStaging(a)}},"".concat(a.everyTotal,"\u5143 \xd7 ").concat(a.stage,"\u671f"),E.a.createElement(v.a.Item.Brief,null,"\u624b\u7eed\u8d39".concat(a.serviceFee,"\u5143/\u671f\uff0c\u8d39\u7387").concat(a.moneyRate)))}))):null)}}]),a}(w.Component)},888:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.c84e2bbe.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/order/payOrder/PayOrder.js"],"names":["RadioItem","antd_mobile_lib_list__WEBPACK_IMPORTED_MODULE_16___default","a","Item","Brief","antd_mobile_lib_radio__WEBPACK_IMPORTED_MODULE_14___default","mockData","value","label","icon","PayOrder","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_8__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_10__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_11__","call","onChange","setState","payType","checkPeriod","huabei","checkStaging","item","console","log","stageNumber","singleMoney","everyTotal","periodNumber","stage","print","_len","arguments","length","e","Array","_key","pay","_this$state","state","orderId","alipayPay","weixinPay","is_weixin","window","location","href","encodeURIComponent","toLowerCase","http","get","concat","API","then","res","data","errno","url","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_7___default","info","msg","isweixinPay","weixin_code","getParam","undefined","onBridgeReady","WeixinJSBridge","document","addEventListener","attachEvent","payCallback","invoke","appId","timeStamp","nonceStr","package","signType","paySign","err_msg","alert","huabeiPay","_this$state2","pay_amount","fenqiList","qishu","lilv","everyMoney","feiyong","categoryList","_this2","post","home","order_id","code","_res$data$data","course","map","obj","moneyRate","rate","periodic","toFixed","serviceFee","parseFloat","push","_this3","_this$state3","react__WEBPACK_IMPORTED_MODULE_17___default","createElement","className","_common_index__WEBPACK_IMPORTED_MODULE_19__","title","arrow","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_5___default","size","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_1___default","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_3___default","justify","align","style","height","index","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_20__","to","course_id","course_title","simpledescription","price1","price0","handleClick","key","img","image_name","id","renderHeader","i","thumb","checked","direction","width","marginTop","paddingRight","color","fontSize","onClick","Component"],"mappings":"iXAUMA,UAFOC,EAAAC,EAAKC,KACCC,MACDC,EAAAH,EAAMF,WAEpBM,EAAW,CACX,CAAEC,MAAO,EAAGC,MAAO,qBAAOC,KAAM,kBAChC,CAAEF,MAAO,EAAGC,MAAO,2BAAQC,KAAM,oBAIhBC,cACjB,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAkBVQ,SAAW,SAACZ,GACRK,EAAKQ,SAAS,CACVC,QAASd,EACTe,aAAa,IAEH,IAAVf,GACAK,EAAKQ,SAAS,CACVG,QAAQ,KA1BDX,EA8BnBY,aAAe,SAACC,GACZC,QAAQC,IAAIF,GACZb,EAAKQ,SAAS,CACVG,QAAQ,EACRK,YAAaH,EAAKlB,MAClBsB,YAAaJ,EAAKK,WAClBC,aAAcN,EAAKO,MACnBV,aAAa,KArCFV,EAwCnBqB,MAAQ,WAAU,QAAAC,EAAAC,UAAAC,OAANC,EAAM,IAAAC,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAANF,EAAME,GAAAJ,UA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nI,OAEpDc,EACIwF,EAAA5G,EAAA6G,cAAA,QAAMW,MAAO,CAAEwB,MAAO,UAAWC,SAAU,SAA3C,GAAA7F,OAAyDzB,EAAzD,gBAAAyB,OAA2EvB,EAA3E,WACA,MAGZ+E,EAAA5G,EAAA6G,cAAAQ,EAAArH,EAAA,CAAMsH,QAAQ,SACVV,EAAA5G,EAAA6G,cAAA,QAAMW,MAAO,CAAEwB,MAAO,UAAWC,SAAU,SAA3C,oFAGPR,EAAEnI,UAKvBsG,EAAA5G,EAAA6G,cAAA,OAAKC,UAAU,WAAf,gJAEAF,EAAA5G,EAAA6G,cAAA,OAAKC,UAAU,aAAaoC,QAASrI,KAAKyB,KAA1C,4BAGIjB,EACIuF,EAAA5G,EAAA6G,cAAA,OAAKC,UAAU,iBACXF,EAAA5G,EAAA6G,cAAA,OAAKC,UAAU,aACXF,EAAA5G,EAAA6G,cAAA,KAAGC,UAAU,eAAb,kCACC1B,EAAUa,IAAI,SAAAwC,GAAC,OACZ7B,EAAA5G,EAAA6G,cAAC/G,EAAD,CACIsI,IAAKK,EAAEpI,MACPsI,QAASjH,IAAgB+G,EAAEpI,MAC3BY,SAAU,kBAAMyF,EAAKpF,aAAamH,KAHtC,GAAArF,OAIQqF,EAAE7G,WAJV,gBAAAwB,OAI2BqF,EAAE3G,MAJ7B,UAKI8E,EAAA5G,EAAA6G,cAAA9G,EAAAC,EAAMC,KAAKC,MAAX,0BAAAkD,OAAwBqF,EAAElC,WAA1B,mCAAAnD,OAA6CqF,EAAEtC,iBAK/D,aAtScgD","file":"static/js/PayOrder.c84e2bbe.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport {Flex, WingBlank, WhiteSpace, List, Radio, Toast} from 'antd-mobile';\nimport {http, getParam, is_weixin } from '@/utils';\nimport { OrderItem, HeaderBar } from '@/common/index';\nimport { Link } from 'react-router-dom';\nimport './PayOrder.scss';\nimport { VList } from '@/common';\n\nconst Item = List.Item;\nconst Brief = Item.Brief;\nconst RadioItem = Radio.RadioItem;\n\nlet mockData = [\n { value: 0, label: '支付宝', icon: 'iconzhifubaox-' },\n { value: 1, label: '微信支付', icon: 'iconweixinzhifu' },\n // { value: 2, label: '花呗分期', icon: 'iconhuabei' },\n];\n\nexport default class PayOrder extends Component {\n constructor(props) {\n super(props);\n this.state = {\n pay_amount: 0,\n payType: 0,\n stageNumber: 0,\n checkPeriod: false,\n singleMoney: 0,\n periodNumber: 0,\n orderId: getParam('oid'),\n huabei: false,\n fenqiList: [\n { value: 'zhifubao', qishu: '3', lilv: '2.30%', everyMoney: 300, feiyong: 2.3 },\n { value: 'weixin', qishu: '6', lilv: '4.50%', everyMoney: 150, feiyong: 4.5 },\n { value: 'huabei', qishu: '9', lilv: '7.50%', everyMoney: 100, feiyong: 7.5 },\n ],\n categoryList: [],\n }\n }\n onChange = (value) => {\n this.setState({\n payType: value,\n checkPeriod: false,\n });\n if (value === 2) {\n this.setState({\n huabei: true,\n });\n }\n };\n checkStaging = (item) => {\n console.log(item);\n this.setState({\n huabei: false,\n stageNumber: item.value,\n singleMoney: item.everyTotal,\n periodNumber: item.stage,\n checkPeriod: true,\n });\n }\n print = (...e) => {\n console.log(e);\n };\n // 确定购买\n pay = () => {\n const {payType, orderId} = this.state;\n if(payType === 0) {\n this.alipayPay(orderId)\n } else if (payType === 1) {\n this.weixinPay(orderId)\n }\n // else { // 花呗分期暂时不做\n // this.huabeiPay(orderId)\n // }\n }\n // 微信支付\n weixinPay = (orderId) => {\n // 微信内部-支付\n if (is_weixin()) {\n window.location.href = \"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=\" + encodeURIComponent(window.location.href + \"&aa=bb\").toLowerCase() + \"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect\";\n } else {\n // 微信外部-支付\n http.get(`${API['base-api']}/pay/wxpay/wap_charge/oid/${orderId}`).then((res) => {\n console.log(res);\n if (res.data.errno === 0) {\n window.location.href = res.data.data.url + \"&redirect_url=\" + encodeURIComponent(window.location.href + \"&weixinpay=1\").toLowerCase();\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n // 微信内部支付\n isweixinPay = () => {\n let weixin_code = getParam('code')\n if (weixin_code) {\n if (getParam('oid') === undefined) {\n return\n } else {\n http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => {\n if (res.data.errno === 0) {\n const data = res.data.data\n this.onBridgeReady(data)\n if (typeof WeixinJSBridge == \"undefined\") {\n if (document.addEventListener) {\n document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady, false)\n } else if (document.attachEvent) {\n document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady)\n document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady)\n }\n } else {\n this.onBridgeReady()\n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n }\n // 支付完成之后获取状态\n payCallback = () => {\n // 调到已购课程 /purchased 不需要传递任何参数\n }\n\n onBridgeReady = (data) => {\n WeixinJSBridge.invoke(\n 'getBrandWCPayRequest', {\n \"appId\": data.appId, //公众号名称,由商户传入\n \"timeStamp\": data.timeStamp, //时间戳,自1970年以来的秒数\n \"nonceStr\": data.nonceStr, //随机串\n \"package\": data.package,\n \"signType\": data.signType, //微信签名方式:\n \"paySign\": data.paySign //微信签名\n },\n function (res) {\n if (res.err_msg == \"get_brand_wcpay_request:ok\") {\n this.payCallback()\n } else {\n alert('支付失败')\n }\n }\n )\n }\n // 支付宝支付\n alipayPay = (orderId) => {\n http.get(`${API['base-api']}/pay/alipay/wap_charge/oid/${orderId}`).then((res) => {\n if (res.data.errno === 0) {\n window.location = res.data.data.url;\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // 花呗分期 暂时不做\n huabeiPay = (orderId) => {\n const {singleMoney, periodNumber} = this.state;\n\n console.log('花呗分期支付');\n http.get(`/pay/alipay/wap_charge/oid/${orderId}/plat/{plat} /hb_num/${periodNumber}`).then(res=>{\n console.log(res);\n if (res.data.errno === 0) {\n window.location = res.data.data.url;\n } else {\n Toast.info(res.data.msg, 2)\n }\n });\n }\n\n componentDidMount() {\n http.post(`${API.home}/m/order/detail`, { order_id: this.state.orderId }).then((res) => {\n console.log(res);\n if (res.data.code !== 200) {\n Toast.info(res.data.msg, 2);\n return;\n }\n const { course, pay_amount } = res.data.data;\n const fenqiList = [];\n [1, 2, 3].map((item)=>{\n let obj = {};\n obj.value = item;\n if(item === 1) {\n obj.stage = 3; //期数\n obj.moneyRate = '2.30%'; // 分期费率展示\n obj.rate = 0.023; // 分期费率计算\n obj.periodic = (pay_amount/3).toFixed(2); // 每期本金\n } else if (item === 2) {\n obj.stage = 6; //期数\n obj.moneyRate = '4.50%'; // 分期费率展示\n obj.rate = 0.045; // 分期费率计算\n obj.periodic = (pay_amount/6).toFixed(2); // 每期本金\n } else {\n obj.stage = 12; //期数\n obj.moneyRate = '7.50%'; // 分期费率展示\n obj.rate = 0.075; // 分期费率计算\n obj.periodic = (pay_amount/9).toFixed(2); // 每期本金\n }\n obj.serviceFee = ((pay_amount * obj.rate) / obj.stage).toFixed(2); // 每期的手续费 = 总金额 * 费率 / 期数\n obj.everyTotal = (parseFloat(obj.periodic) + parseFloat(obj.serviceFee)).toFixed(2);// 每期总费用 = 每期本金 + 每期手续费\n fenqiList.push(obj);\n });\n console.log(fenqiList);\n // { value: 'zhifubao', qishu: '3', lilv: '2.30%', everyMoney: 300, feiyong: 2.3 },\n // { value: 'weixin', qishu: '6', lilv: '4.50%', everyMoney: 150, feiyong: 4.5 },\n // { value: 'huabei', qishu: '9', lilv: '7.50%', everyMoney: 100, feiyong: 7.5 },\n this.setState({\n pay_amount,\n categoryList: course,\n fenqiList,\n });\n });\n if (getParam('is_class') === 1 || getParam('weixinpay')) {\n this.payCallback()\n }\n if (is_weixin()) {\n this.isweixinPay()\n }\n }\n render() {\n const { orderId, pay_amount, payType, checkPeriod, singleMoney, periodNumber, huabei, fenqiList, categoryList, stageNumber } = this.state;\n return (\n <div className='pay-order'>\n <HeaderBar title='确认支付' arrow={true}></HeaderBar>\n <WhiteSpace size='sm'></WhiteSpace>\n <div className='order-number'>\n <WingBlank>\n <Flex justify='between' align='center' style={{ height: '44px' }}>\n <span>订单号</span>\n <span className='number'>{orderId}</span>\n </Flex>\n </WingBlank>\n </div>\n <WhiteSpace size='md'></WhiteSpace>\n {\n categoryList.map((item, index) => {\n const Info = (\n <div className=\"order-info\">\n <p className='order-title text-overflow-one'>\n <Link to={`/detail?id=${item.course_id}`}>{item.course_title}</Link>\n </p>\n <p className='order-content text-overflow-2'>{item.simpledescription}</p>\n <p className='order-des'>\n <span className='order-newprice'>¥{item.price1}</span>\n <span className='order-price'>¥{item.price0}</span>\n </p>\n </div>\n )\n return (\n <VList handleClick={this.print} key={index} img={item.image_name}\n id={item.course_id}\n info={Info}></VList>\n )\n })\n }\n <WhiteSpace size='md'></WhiteSpace>\n <div className='order-number'>\n <WingBlank>\n <Flex justify='between' align='center' style={{ height: '44px' }}>\n <span>支付金额</span>\n <span className='money'>{`¥${pay_amount}`}</span>\n </Flex>\n </WingBlank>\n </div>\n\n <WhiteSpace size='md'></WhiteSpace>\n <List renderHeader={() => '支付方式'} className='pay-type-list'>\n {mockData.map(i => (\n <RadioItem\n thumb={<i className={`iconfont ${i.icon} ${payType === i.value ? 'checked' : ''}`}></i>}\n key={i.value}\n checked={payType === i.value}\n onChange={() => this.onChange(i.value)}>\n {/* {i.label} */}\n {\n i.value === 2 ? (\n <Flex direction='column' align='start' style={{ width: '100%', marginTop: '6px' }}>\n <Flex direction='row' justify='between' style={{ width: '100%', paddingRight: '30px' }}>\n <span style={{ color: '#555555', fontSize: '14px' }}>{i.label}</span>\n {\n checkPeriod ? (\n <span style={{ color: '#333333', fontSize: '12px' }}>{`${singleMoney}元 × ${periodNumber}期`}</span>\n ) : null\n }\n </Flex>\n <Flex justify='start'>\n <span style={{ color: '#999999', fontSize: '12px' }}>支付上限受限于您的花呗额度</span>\n </Flex>\n </Flex>\n ) : (i.label)\n }\n </RadioItem>\n ))}\n </List>\n <div className='pay-tip'>请在15分钟内完成支付,否则届时系统将关闭该订单。</div>\n\n <div className='pay-button' onClick={this.pay}>确认支付</div>\n\n {\n huabei ? (\n <div className='check-staging'>\n <div className='container'>\n <p className='check-title'>请选择分期</p>\n {fenqiList.map(i => (\n <RadioItem\n key={i.value}\n checked={stageNumber === i.value}\n onChange={() => this.checkStaging(i)}>\n {`${i.everyTotal}元 × ${i.stage}期`}\n <List.Item.Brief>{`手续费${i.serviceFee}元/期,费率${i.moneyRate}`}</List.Item.Brief>\n </RadioItem>\n ))}\n </div>\n </div>\n ) : null\n }\n </div>\n )\n }\n}\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{1130:function(e,t,a){},1159:function(e,t,a){"use strict";a.r(t);a(254);var n=a(157),o=a.n(n),i=(a(152),a(34)),c=a.n(i),s=(a(44),a(14)),r=a.n(s),l=a(7),u=a(8),f=a(11),h=a(9),d=a(10),p=a(0),m=a.n(p),v=a(33),g=(a(1130),a(700)),b=a(4),C=a(16),y=a(63),w=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(f.a)(this,Object(h.a)(t).call(this,e))).specialSale=function(){b.c.get("".concat(API.home,"/m/home/weekDiscounts")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data,isLoading:!1}):r.a.info(e.data.msg,2)})},a.bargain=function(){b.c.get("".concat(API.home,"/m/home/bargainZone")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data}):r.a.info(e.data.msg,2)})},a.group=function(){b.c.get("".concat(API.home,"/m/home/grouponList")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data}):r.a.info(e.data.msg,2)})},a.ontabclick=function(e,t){switch(a.state.courseStatus=t,t){case 0:a.specialSale();break;case 1:a.bargain();break;default:a.group()}},a.state={dataList:[],courseStatus:0,isLoading:!0},a}return Object(d.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.specialSale()}},{key:"render",value:function(){var e=this;return m.a.createElement("div",{className:"preferential"},m.a.createElement(g.a,null),m.a.createElement(y.a,{isLoading:this.state.isLoading},m.a.createElement("div",{className:"class-content"},m.a.createElement(c.a,null),m.a.createElement(o.a,{tabs:[{title:"\u9650\u65f6\u7279\u60e0"},{title:"\u780d\u4ef7\u4e13\u533a"},{title:"\u4e00\u952e\u62fc\u56e2"}],animated:!1,onChange:function(t,a){return e.ontabclick(t,a)}},m.a.createElement("div",{className:"tabs"},m.a.createElement("ul",null,this.state.dataList.map(function(t,a){var n=m.a.createElement("div",{className:"info"},m.a.createElement("p",{className:"title"},m.a.createElement(C.b,{to:"/detail?id=".concat(t.course_id)},t.course_title)),m.a.createElement("p",{className:"contact text-overflow-2"},t.course_desc),m.a.createElement("div",{className:"des"},!t.is_buy&&m.a.createElement("p",{className:"course-price"},0===e.state.courseStatus&&m.a.createElement("span",{className:"price"},"\u7279\u60e0\u4ef7\uff1a"),m.a.createElement("span",{className:"new"},"\xa5",t.price1),m.a.createElement("span",{className:"old"},"\xa5",t.price0)),t.is_buy&&m.a.createElement("a",{href:"/#",className:"isbuy"},"\u5df2\u8d2d\u4e70"))),o=m.a.createElement("div",null,1===e.state.courseStatus&&m.a.createElement("p",{className:"course-status"},"\u780d\u4ef7\u51cf",t.price1,"\u5143"),2===e.state.courseStatus&&m.a.createElement("p",{className:"course-status"},"\u62fc\u56e2\u51cf",t.price,"\u5143"),t.is_aist&&m.a.createElement("span",{className:"return_cash"}));return m.a.createElement(v.i,{key:a,img:t.image_name,id:t.course_id,status:o,info:n})})))),m.a.createElement(c.a,null))))}}]),t}(p.Component);t.default=w},577:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,a){return"aria-"!==a.substr(0,5)&&"data-"!==a.substr(0,5)&&"role"!==a||(t[a]=e[a]),t},{})},e.exports=t.default},582:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=a(3),i=(n=o)&&n.__esModule?n:{default:n};t.getComponentLocale=function(e,t,a,n){var o={};if(t&&t.antLocale&&t.antLocale[a])o=t.antLocale[a];else{var c=n();o=c.default||c}var s=(0,i.default)({},o);e.locale&&(s=(0,i.default)({},s,e.locale),e.locale.lang&&(s.lang=(0,i.default)({},o.lang,e.locale.lang)));return s},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},600:function(e,t,a){"use strict";a(48),a(601)},601:function(e,t,a){},602:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=g(a(3)),o=g(a(32)),i=g(a(5)),c=g(a(12)),s=g(a(6)),r=g(a(13)),l=g(a(15)),u=v(a(0)),f=v(a(2)),h=g(a(151)),d=g(a(577)),p=a(582),m=a(603);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}var b=function(e){function t(e){(0,i.default)(this,t);var a=(0,s.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));a.onSubmit=function(e){e.preventDefault(),a.props.onSubmit&&a.props.onSubmit(a.state.value||""),a.inputRef&&a.inputRef.blur()},a.onChange=function(e){a.state.focus||a.setState({focus:!0});var t=e.target.value;"value"in a.props||a.setState({value:t}),a.props.onChange&&a.props.onChange(t)},a.onFocus=function(){a.setState({focus:!0}),a.firstFocus=!0,a.props.onFocus&&a.props.onFocus()},a.onBlur=function(){var e;a.onBlurTimeout=(e=function(){a.blurFromOnClear||document.activeElement!==a.inputRef&&a.setState({focus:!1}),a.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),a.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),a.props.onBlur())},a.onClear=function(){a.doClear()},a.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];a.blurFromOnClear=e,"value"in a.props||a.setState({value:""}),a.props.onClear&&a.props.onClear(""),a.props.onChange&&a.props.onChange(""),e&&a.focus()},a.onCancel=function(){a.props.onCancel?a.props.onCancel(a.state.value||""):a.doClear(!1)},a.focus=function(){a.inputRef&&a.inputRef.focus()};var n=void 0;return n="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",a.state={value:n,focus:!1},a}return(0,r.default)(t,e),(0,c.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,i=this.props,c=i.prefixCls,s=i.showCancelButton,r=i.disabled,f=i.placeholder,m=i.className,v=i.style,g=i.maxLength,b=(0,p.getComponentLocale)(this.props,this.context,"SearchBar",function(){return a(604)}).cancelText,C=this.state,y=C.value,w=C.focus,E=(0,l.default)(c,m,(0,o.default)({},c+"-start",!!(w||y&&y.length>0))),N=(0,l.default)(c+"-clear",(0,o.default)({},c+"-clear-show",!!(w&&y&&y.length>0))),S=(0,l.default)(c+"-cancel",(e={},(0,o.default)(e,c+"-cancel-show",!!(s||w||y&&y.length>0)),(0,o.default)(e,c+"-cancel-anim",this.firstFocus),e));return u.createElement("form",{onSubmit:this.onSubmit,className:E,style:v,ref:function(e){return t.inputContainerRef=e},action:"#"},u.createElement("div",{className:c+"-input"},u.createElement("div",{className:c+"-synthetic-ph",ref:function(e){return t.syntheticPhRef=e}},u.createElement("span",{className:c+"-synthetic-ph-container",ref:function(e){return t.syntheticPhContainerRef=e}},u.createElement("i",{className:c+"-synthetic-ph-icon"}),u.createElement("span",{className:c+"-synthetic-ph-placeholder",style:{visibility:f&&!y?"visible":"hidden"}},f))),u.createElement("input",(0,n.default)({type:"search",className:c+"-value",value:y,disabled:r,placeholder:f,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:g},(0,d.default)(this.props))),u.createElement(h.default,{activeClassName:c+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:N}))),u.createElement("div",{className:S,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||b))}}]),t}(u.Component);t.default=b,b.defaultProps=m.defaultProps,b.contextTypes={antLocale:f.object},e.exports=t.default},603:function(e,t,a){"use strict";function n(){}Object.defineProperty(t,"__esModule",{value:!0});t.defaultProps={prefixCls:"am-search",placeholder:"",onSubmit:n,onChange:n,onFocus:n,onBlur:n,onClear:n,showCancelButton:!1,disabled:!1}},604:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},700:function(e,t,a){"use strict";a(600);var n=a(602),o=a.n(n),i=a(7),c=a(8),s=a(11),r=a(9),l=a(10),u=a(0),f=a.n(u),h=(a(701),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(s.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(o)))).goShop=function(){location.replace("/shopcart")},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"toSearch",value:function(){window.location.href="/search"}},{key:"return",value:function(){window.location.href="/"}},{key:"render",value:function(){return f.a.createElement("div",{className:"preferential"},f.a.createElement("div",{className:"search-nav"},f.a.createElement("i",{className:"iconfont iconiconfront-68 return",onClick:this.return.bind(this)}),f.a.createElement(o.a,{placeholder:"\u641c\u7d22\u8bfe\u7a0b",cancelText:" ",onFocus:this.toSearch.bind(this),showCancelButton:!1}),f.a.createElement("i",{className:"iconfont icongouwuche-xianxing shopping-cart",onClick:this.goShop})))}}]),t}(u.Component));t.a=h},701:function(e,t,a){}}]);
//# sourceMappingURL=Preferential.c423e386.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{1130:function(e,t,a){},1159:function(e,t,a){"use strict";a.r(t);a(254);var n=a(157),o=a.n(n),i=(a(152),a(34)),c=a.n(i),s=(a(44),a(14)),r=a.n(s),l=a(7),u=a(8),f=a(11),h=a(9),d=a(10),p=a(0),m=a.n(p),v=a(30),g=(a(1130),a(700)),b=a(4),C=a(16),y=a(63),w=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(f.a)(this,Object(h.a)(t).call(this,e))).specialSale=function(){b.c.get("".concat(API.home,"/m/home/weekDiscounts")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data,isLoading:!1}):r.a.info(e.data.msg,2)})},a.bargain=function(){b.c.get("".concat(API.home,"/m/home/bargainZone")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data}):r.a.info(e.data.msg,2)})},a.group=function(){b.c.get("".concat(API.home,"/m/home/grouponList")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data}):r.a.info(e.data.msg,2)})},a.ontabclick=function(e,t){switch(a.state.courseStatus=t,t){case 0:a.specialSale();break;case 1:a.bargain();break;default:a.group()}},a.state={dataList:[],courseStatus:0,isLoading:!0},a}return Object(d.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.specialSale()}},{key:"render",value:function(){var e=this;return m.a.createElement("div",{className:"preferential"},m.a.createElement(g.a,null),m.a.createElement(y.a,{isLoading:this.state.isLoading},m.a.createElement("div",{className:"class-content"},m.a.createElement(c.a,null),m.a.createElement(o.a,{tabs:[{title:"\u9650\u65f6\u7279\u60e0"},{title:"\u780d\u4ef7\u4e13\u533a"},{title:"\u4e00\u952e\u62fc\u56e2"}],animated:!1,onChange:function(t,a){return e.ontabclick(t,a)}},m.a.createElement("div",{className:"tabs"},m.a.createElement("ul",null,this.state.dataList.map(function(t,a){var n=m.a.createElement("div",{className:"info"},m.a.createElement("p",{className:"title"},m.a.createElement(C.b,{to:"/detail?id=".concat(t.course_id)},t.course_title)),m.a.createElement("p",{className:"contact text-overflow-2"},t.course_desc),m.a.createElement("div",{className:"des"},!t.is_buy&&m.a.createElement("p",{className:"course-price"},0===e.state.courseStatus&&m.a.createElement("span",{className:"price"},"\u7279\u60e0\u4ef7\uff1a"),m.a.createElement("span",{className:"new"},"\xa5",t.price1),m.a.createElement("span",{className:"old"},"\xa5",t.price0)),t.is_buy&&m.a.createElement("a",{href:"/#",className:"isbuy"},"\u5df2\u8d2d\u4e70"))),o=m.a.createElement("div",null,1===e.state.courseStatus&&m.a.createElement("p",{className:"course-status"},"\u780d\u4ef7\u51cf",t.price1,"\u5143"),2===e.state.courseStatus&&m.a.createElement("p",{className:"course-status"},"\u62fc\u56e2\u51cf",t.price,"\u5143"),t.is_aist&&m.a.createElement("span",{className:"return_cash"}));return m.a.createElement(v.i,{key:a,img:t.image_name,id:t.course_id,status:o,info:n})})))),m.a.createElement(c.a,null))))}}]),t}(p.Component);t.default=w},577:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,a){return"aria-"!==a.substr(0,5)&&"data-"!==a.substr(0,5)&&"role"!==a||(t[a]=e[a]),t},{})},e.exports=t.default},582:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=a(3),i=(n=o)&&n.__esModule?n:{default:n};t.getComponentLocale=function(e,t,a,n){var o={};if(t&&t.antLocale&&t.antLocale[a])o=t.antLocale[a];else{var c=n();o=c.default||c}var s=(0,i.default)({},o);e.locale&&(s=(0,i.default)({},s,e.locale),e.locale.lang&&(s.lang=(0,i.default)({},o.lang,e.locale.lang)));return s},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},600:function(e,t,a){"use strict";a(48),a(601)},601:function(e,t,a){},602:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=g(a(3)),o=g(a(33)),i=g(a(5)),c=g(a(12)),s=g(a(6)),r=g(a(13)),l=g(a(15)),u=v(a(0)),f=v(a(2)),h=g(a(151)),d=g(a(577)),p=a(582),m=a(603);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}var b=function(e){function t(e){(0,i.default)(this,t);var a=(0,s.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));a.onSubmit=function(e){e.preventDefault(),a.props.onSubmit&&a.props.onSubmit(a.state.value||""),a.inputRef&&a.inputRef.blur()},a.onChange=function(e){a.state.focus||a.setState({focus:!0});var t=e.target.value;"value"in a.props||a.setState({value:t}),a.props.onChange&&a.props.onChange(t)},a.onFocus=function(){a.setState({focus:!0}),a.firstFocus=!0,a.props.onFocus&&a.props.onFocus()},a.onBlur=function(){var e;a.onBlurTimeout=(e=function(){a.blurFromOnClear||document.activeElement!==a.inputRef&&a.setState({focus:!1}),a.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),a.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),a.props.onBlur())},a.onClear=function(){a.doClear()},a.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];a.blurFromOnClear=e,"value"in a.props||a.setState({value:""}),a.props.onClear&&a.props.onClear(""),a.props.onChange&&a.props.onChange(""),e&&a.focus()},a.onCancel=function(){a.props.onCancel?a.props.onCancel(a.state.value||""):a.doClear(!1)},a.focus=function(){a.inputRef&&a.inputRef.focus()};var n=void 0;return n="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",a.state={value:n,focus:!1},a}return(0,r.default)(t,e),(0,c.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,i=this.props,c=i.prefixCls,s=i.showCancelButton,r=i.disabled,f=i.placeholder,m=i.className,v=i.style,g=i.maxLength,b=(0,p.getComponentLocale)(this.props,this.context,"SearchBar",function(){return a(604)}).cancelText,C=this.state,y=C.value,w=C.focus,E=(0,l.default)(c,m,(0,o.default)({},c+"-start",!!(w||y&&y.length>0))),N=(0,l.default)(c+"-clear",(0,o.default)({},c+"-clear-show",!!(w&&y&&y.length>0))),S=(0,l.default)(c+"-cancel",(e={},(0,o.default)(e,c+"-cancel-show",!!(s||w||y&&y.length>0)),(0,o.default)(e,c+"-cancel-anim",this.firstFocus),e));return u.createElement("form",{onSubmit:this.onSubmit,className:E,style:v,ref:function(e){return t.inputContainerRef=e},action:"#"},u.createElement("div",{className:c+"-input"},u.createElement("div",{className:c+"-synthetic-ph",ref:function(e){return t.syntheticPhRef=e}},u.createElement("span",{className:c+"-synthetic-ph-container",ref:function(e){return t.syntheticPhContainerRef=e}},u.createElement("i",{className:c+"-synthetic-ph-icon"}),u.createElement("span",{className:c+"-synthetic-ph-placeholder",style:{visibility:f&&!y?"visible":"hidden"}},f))),u.createElement("input",(0,n.default)({type:"search",className:c+"-value",value:y,disabled:r,placeholder:f,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:g},(0,d.default)(this.props))),u.createElement(h.default,{activeClassName:c+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:N}))),u.createElement("div",{className:S,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||b))}}]),t}(u.Component);t.default=b,b.defaultProps=m.defaultProps,b.contextTypes={antLocale:f.object},e.exports=t.default},603:function(e,t,a){"use strict";function n(){}Object.defineProperty(t,"__esModule",{value:!0});t.defaultProps={prefixCls:"am-search",placeholder:"",onSubmit:n,onChange:n,onFocus:n,onBlur:n,onClear:n,showCancelButton:!1,disabled:!1}},604:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},700:function(e,t,a){"use strict";a(600);var n=a(602),o=a.n(n),i=a(7),c=a(8),s=a(11),r=a(9),l=a(10),u=a(0),f=a.n(u),h=(a(701),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(s.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(o)))).goShop=function(){location.replace("/shopcart")},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"toSearch",value:function(){window.location.href="/search"}},{key:"return",value:function(){window.location.href="/"}},{key:"render",value:function(){return f.a.createElement("div",{className:"preferential"},f.a.createElement("div",{className:"search-nav"},f.a.createElement("i",{className:"iconfont iconiconfront-68 return",onClick:this.return.bind(this)}),f.a.createElement(o.a,{placeholder:"\u641c\u7d22\u8bfe\u7a0b",cancelText:" ",onFocus:this.toSearch.bind(this),showCancelButton:!1}),f.a.createElement("i",{className:"iconfont icongouwuche-xianxing shopping-cart",onClick:this.goShop})))}}]),t}(u.Component));t.a=h},701:function(e,t,a){}}]);
//# sourceMappingURL=Preferential.5d20f031.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/preferential/index.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","common/HeaderSearch/index.js"],"names":["Preferential","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_9__","call","specialSale","http","get","concat","API","home","then","res","data","code","setState","dataList","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_5___default","a","info","msg","bargain","group","ontabclick","tab","index","state","courseStatus","_this2","react__WEBPACK_IMPORTED_MODULE_11___default","createElement","className","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_14__","_common_Loading__WEBPACK_IMPORTED_MODULE_17__","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_3___default","antd_mobile_lib_tabs__WEBPACK_IMPORTED_MODULE_1___default","tabs","title","animated","onChange","map","item","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_16__","to","course_id","course_title","course_desc","is_buy","price1","price0","href","status","price","is_aist","_common__WEBPACK_IMPORTED_MODULE_12__","key","img","image_name","id","Component","defineProperty","exports","value","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","e","preventDefault","inputRef","blur","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","document","activeElement","window","requestAnimationFrame","setTimeout","body","scrollTop","onClear","doClear","arguments","length","undefined","onCancel","defaultValue","rightBtnRef","initBtn","getComputedStyle","rightBtnInitMarginleft","marginLeft","componentDidUpdate","syntheticPhRef","inputContainerRef","indexOf","prefixCls","syntheticPhContainerRef","realWidth","getBoundingClientRect","width","style","Math","ceil","showCancelButton","marginRight","offsetWidth","parseInt","nextProps","nextFrameId","cancelAnimationFrame","clearTimeout","_classnames3","_props","disabled","placeholder","maxLength","cancelText","_state","wrapCls","clearCls","cancelCls","ref","el","action","visibility","type","activeClassName","onClick","defaultProps","contextTypes","object","noop","HeaderBar","goShop","location","replace","react__WEBPACK_IMPORTED_MODULE_7___default","return","bind","antd_mobile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,KAAO,2CAIvBwE,OAAO4D,SAASpI,KAAO,qCASvB,OACIsI,EAAAvK,EAAAY,cAAA,OAAKC,UAAU,gBACX0J,EAAAvK,EAAAY,cAAA,OAAKC,UAAU,cACX0J,EAAAvK,EAAAY,cAAA,KAAGC,UAAW,mCAAoCiJ,QAAShL,KAAK0L,OAAOC,KAAK3L,QAC5EyL,EAAAvK,EAAAY,cAAA8J,EAAA1K,EAAA,CACIiJ,YAAY,2BACZE,WAAY,IACZlD,QAASnH,KAAK6L,SAASF,KAAK3L,MAC5BwJ,kBAAkB,IAEtBiC,EAAAvK,EAAAY,cAAA,KAAGC,UAAW,+CAAgDiJ,QAAShL,KAAKsL,kBAzBxE1H,cAiCTyH","file":"static/js/Preferential.c423e386.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport {VList} from '../../common'\nimport {Tabs, WhiteSpace, Toast} from 'antd-mobile'\nimport './index.scss'\nimport HeaderSearch from '../../common/HeaderSearch/index'\nimport {http} from \"@/utils\"\nimport {Link} from 'react-router-dom'\nimport Loading from '@/common/Loading'\n\nclass Preferential extends Component {\n constructor(props) {\n super(props)\n this.state = {\n dataList: [],\n courseStatus: 0,\n isLoading: true\n }\n }\n\n componentDidMount() {\n this.specialSale()\n }\n\n // 限时特惠\n specialSale = () => {\n http.get(`${API.home}/m/home/weekDiscounts`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data,\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n // 砍价专区\n bargain = () => {\n http.get(`${API.home}/m/home/bargainZone`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // 一键拼团\n group = () => {\n http.get(`${API.home}/m/home/grouponList`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // tab 切换\n ontabclick = (tab, index) => {\n this.state.courseStatus = index\n switch (index) {\n case 0:\n this.specialSale()\n break\n case 1:\n this.bargain()\n break\n default:\n this.group()\n }\n }\n\n\n render() {\n const tabs = [\n {title: '限时特惠'},\n {title: '砍价专区'},\n {title: '一键拼团'}\n ]\n return (\n <div className='preferential'>\n <HeaderSearch></HeaderSearch>\n <Loading isLoading={this.state.isLoading}>\n <div className='class-content'>\n <WhiteSpace/>\n\n <Tabs\n tabs={tabs}\n animated={false}\n onChange={(tab, index) => this.ontabclick(tab, index)}\n >\n <div className='tabs'>\n <ul>\n {this.state.dataList.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${item.course_id}`}>\n {item.course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{item.course_desc}</p>\n <div className='des'>\n {!item.is_buy &&\n <p className=\"course-price\">\n {this.state.courseStatus === 0 &&\n <span className='price'>特惠价:</span>\n }\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n }\n {item.is_buy &&\n <a href=\"/#\" className=\"isbuy\">已购买</a>\n }\n </div>\n </div>\n )\n const status = (\n <div>\n {this.state.courseStatus === 1 &&\n <p className='course-status'>砍价减{item.price1}元</p>\n }\n {this.state.courseStatus === 2 &&\n <p className='course-status'>拼团减{item.price}元</p>\n }\n {\n item.is_aist && <span className='return_cash'></span>\n }\n </div>\n )\n return (\n <VList key={index} img={item.image_name}\n id={item.course_id} status={status}\n info={Info}></VList>\n )\n })}\n </ul>\n\n </div>\n </Tabs>\n <WhiteSpace/>\n </div>\n </Loading>\n </div>\n )\n }\n\n}\n\nexport default Preferential\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, {Component} from 'react'\nimport {SearchBar} from 'antd-mobile'\nimport './index.scss'\n\nclass HeaderBar extends Component {\n toSearch() {\n window.location.href = '/search'\n }\n\n return() {\n window.location.href = '/'\n }\n\n goShop = () => {\n location.replace('/shopcart');\n }\n\n\n render() {\n return (\n <div className='preferential'>\n <div className=\"search-nav\">\n <i className={'iconfont iconiconfront-68 return'} onClick={this.return.bind(this)}></i>\n <SearchBar\n placeholder=\"搜索课程\"\n cancelText={\" \"}\n onFocus={this.toSearch.bind(this)}\n showCancelButton={false}\n />\n <i className={'iconfont icongouwuche-xianxing shopping-cart'} onClick={this.goShop}></i>\n </div>\n </div>\n )\n }\n\n}\n\nexport default HeaderBar\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/preferential/index.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","common/HeaderSearch/index.js"],"names":["Preferential","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_9__","call","specialSale","http","get","concat","API","home","then","res","data","code","setState","dataList","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_5___default","a","info","msg","bargain","group","ontabclick","tab","index","state","courseStatus","_this2","react__WEBPACK_IMPORTED_MODULE_11___default","createElement","className","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_14__","_common_Loading__WEBPACK_IMPORTED_MODULE_17__","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_3___default","antd_mobile_lib_tabs__WEBPACK_IMPORTED_MODULE_1___default","tabs","title","animated","onChange","map","item","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_16__","to","course_id","course_title","course_desc","is_buy","price1","price0","href","status","price","is_aist","_common__WEBPACK_IMPORTED_MODULE_12__","key","img","image_name","id","Component","defineProperty","exports","value","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","e","preventDefault","inputRef","blur","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","document","activeElement","window","requestAnimationFrame","setTimeout","body","scrollTop","onClear","doClear","arguments","length","undefined","onCancel","defaultValue","rightBtnRef","initBtn","getComputedStyle","rightBtnInitMarginleft","marginLeft","componentDidUpdate","syntheticPhRef","inputContainerRef","indexOf","prefixCls","syntheticPhContainerRef","realWidth","getBoundingClientRect","width","style","Math","ceil","showCancelButton","marginRight","offsetWidth","parseInt","nextProps","nextFrameId","cancelAnimationFrame","clearTimeout","_classnames3","_props","disabled","placeholder","maxLength","cancelText","_state","wrapCls","clearCls","cancelCls","ref","el","action","visibility","type","activeClassName","onClick","defaultProps","contextTypes","object","noop","HeaderBar","goShop","location","replace","react__WEBPACK_IMPORTED_MODULE_7___default","return","bind","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","toSearch"],"mappings":"gTASMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAaVQ,YAAc,WACVC,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,0BAA6CC,KAAK,SAACC,GACzB,MAAlBA,EAAIC,KAAKC,KACThB,EAAKiB,SAAS,CACVC,SAAUJ,EAAIC,KAAKA,KACnBI,WAAW,IAGfC,EAAAC,EAAMC,KAAKR,EAAIC,KAAKQ,IAAK,MAtBlBvB,EA4BnBwB,QAAU,WACNhB,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,wBAA2CC,KAAK,SAACC,GACvB,MAAlBA,EAAIC,KAAKC,KACThB,EAAKiB,SAAS,CACVC,SAAUJ,EAAIC,KAAKA,OAGvBK,EAAAC,EAAMC,KAAKR,EAAIC,KAAKQ,IAAK,MAnClBvB,EAwCnByB,MAAQ,WACJjB,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,wBAA2CC,KAAK,SAACC,GACvB,MAAlBA,EAAIC,KAAKC,KACThB,EAAKiB,SAAS,CACVC,SAAUJ,EAAIC,KAAKA,OAGvBK,EAAAC,EAAMC,KAAKR,EAAIC,KAAKQ,IAAK,MA/ClBvB,EAoDnB0B,WAAa,SAACC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,YACAmB,YAAA,GACAvD,SAAAwE,EACA7I,SAAA6I,EACAjE,QAAAiE,EACA/D,OAAA+D,EACApD,QAAAoD,EACA5B,kBAAA,EACAU,UAAA,qCCfApK,OAAA+D,eAAAC,EAAA,cACAC,OAAA,IAEAD,EAAA,SACAuG,WAAA,gBAEAjG,EAAAN,UAAA,4HCJMuH,qNASFC,OAAS,WACLC,SAASC,QAAQ,wFARjB7D,OAAO4D,SAASpI,KAAO,2CAIvBwE,OAAO4D,SAASpI,KAAO,qCASvB,OACIsI,EAAAvK,EAAAY,cAAA,OAAKC,UAAU,gBACX0J,EAAAvK,EAAAY,cAAA,OAAKC,UAAU,cACX0J,EAAAvK,EAAAY,cAAA,KAAGC,UAAW,mCAAoCiJ,QAAShL,KAAK0L,OAAOC,KAAK3L,QAC5EyL,EAAAvK,EAAAY,cAAA8J,EAAA1K,EAAA,CACIiJ,YAAY,2BACZE,WAAY,IACZlD,QAASnH,KAAK6L,SAASF,KAAK3L,MAC5BwJ,kBAAkB,IAEtBiC,EAAAvK,EAAAY,cAAA,KAAGC,UAAW,+CAAgDiJ,QAAShL,KAAKsL,kBAzBxE1H,cAiCTyH","file":"static/js/Preferential.5d20f031.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport {VList} from '../../common'\nimport {Tabs, WhiteSpace, Toast} from 'antd-mobile'\nimport './index.scss'\nimport HeaderSearch from '../../common/HeaderSearch/index'\nimport {http} from \"@/utils\"\nimport {Link} from 'react-router-dom'\nimport Loading from '@/common/Loading'\n\nclass Preferential extends Component {\n constructor(props) {\n super(props)\n this.state = {\n dataList: [],\n courseStatus: 0,\n isLoading: true\n }\n }\n\n componentDidMount() {\n this.specialSale()\n }\n\n // 限时特惠\n specialSale = () => {\n http.get(`${API.home}/m/home/weekDiscounts`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data,\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n // 砍价专区\n bargain = () => {\n http.get(`${API.home}/m/home/bargainZone`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // 一键拼团\n group = () => {\n http.get(`${API.home}/m/home/grouponList`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // tab 切换\n ontabclick = (tab, index) => {\n this.state.courseStatus = index\n switch (index) {\n case 0:\n this.specialSale()\n break\n case 1:\n this.bargain()\n break\n default:\n this.group()\n }\n }\n\n\n render() {\n const tabs = [\n {title: '限时特惠'},\n {title: '砍价专区'},\n {title: '一键拼团'}\n ]\n return (\n <div className='preferential'>\n <HeaderSearch></HeaderSearch>\n <Loading isLoading={this.state.isLoading}>\n <div className='class-content'>\n <WhiteSpace/>\n\n <Tabs\n tabs={tabs}\n animated={false}\n onChange={(tab, index) => this.ontabclick(tab, index)}\n >\n <div className='tabs'>\n <ul>\n {this.state.dataList.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${item.course_id}`}>\n {item.course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{item.course_desc}</p>\n <div className='des'>\n {!item.is_buy &&\n <p className=\"course-price\">\n {this.state.courseStatus === 0 &&\n <span className='price'>特惠价:</span>\n }\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n }\n {item.is_buy &&\n <a href=\"/#\" className=\"isbuy\">已购买</a>\n }\n </div>\n </div>\n )\n const status = (\n <div>\n {this.state.courseStatus === 1 &&\n <p className='course-status'>砍价减{item.price1}元</p>\n }\n {this.state.courseStatus === 2 &&\n <p className='course-status'>拼团减{item.price}元</p>\n }\n {\n item.is_aist && <span className='return_cash'></span>\n }\n </div>\n )\n return (\n <VList key={index} img={item.image_name}\n id={item.course_id} status={status}\n info={Info}></VList>\n )\n })}\n </ul>\n\n </div>\n </Tabs>\n <WhiteSpace/>\n </div>\n </Loading>\n </div>\n )\n }\n\n}\n\nexport default Preferential\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, {Component} from 'react'\nimport {SearchBar} from 'antd-mobile'\nimport './index.scss'\n\nclass HeaderBar extends Component {\n toSearch() {\n window.location.href = '/search'\n }\n\n return() {\n window.location.href = '/'\n }\n\n goShop = () => {\n location.replace('/shopcart');\n }\n\n\n render() {\n return (\n <div className='preferential'>\n <div className=\"search-nav\">\n <i className={'iconfont iconiconfront-68 return'} onClick={this.return.bind(this)}></i>\n <SearchBar\n placeholder=\"搜索课程\"\n cancelText={\" \"}\n onFocus={this.toSearch.bind(this)}\n showCancelButton={false}\n />\n <i className={'iconfont icongouwuche-xianxing shopping-cart'} onClick={this.goShop}></i>\n </div>\n </div>\n )\n }\n\n}\n\nexport default HeaderBar\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{1126:function(e,t,n){},1127:function(e,t,n){},1175:function(e,t,n){"use strict";n.r(t);var a=n(7),o=n(8),r=n(11),c=n(9),s=n(10),i=n(0),l=n.n(i),u=n(698),h=n(160),f=n(4),p=(n(1126),n(44),n(14)),d=n.n(p),m=(n(1127),n(33)),v=n(52),g=function(e){function t(){var e,n;Object(a.a)(this,t);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(n=Object(r.a)(this,(e=Object(c.a)(t)).call.apply(e,[this].concat(s)))).state={courses:[]},n.handleClick=function(e){n.props.history.push("/detail?id=".concat(e))},n}return Object(s.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){var e=this;f.c.get("".concat(API["search-api"],"/search_hot_word")).then(function(t){0===t.data.errno?e.setState({courses:t.data.data.info.courses}):d.a.info(t.data.msg)})}},{key:"render",value:function(){var e=this,t=this.state.courses;return l.a.createElement("div",{className:"recommendation"},l.a.createElement("div",{className:"title"},"\u63a8\u8350\u8bfe\u7a0b"),l.a.createElement("div",{className:"courses"},t.length>0&&t.map(function(t,n){var a=l.a.createElement("div",{className:"bottom"},l.a.createElement("span",{className:"price"},"\xa5",t.price1),l.a.createElement("span",{className:"old-price"},"\xa5",t.price0));return l.a.createElement(m.d,{className:"text-overflow-2",key:t.course_id,id:t.course_id,img:t.image_name,title:t.course_title,bottom:a,handleClick:e.handleClick})})))}}]),t}(i.Component),y=Object(v.g)(g),C=function(e){var t=e.item;return l.a.createElement("div",{className:"bottom"},l.a.createElement("span",{className:"price"},"\xa5",t.price1),l.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},b=function(e){function t(){var e,n;Object(a.a)(this,t);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(n=Object(r.a)(this,(e=Object(c.a)(t)).call.apply(e,[this].concat(s)))).state={courseList:[],value:"",searchHistory:JSON.parse(localStorage.getItem("searchHistory"))||[]},n.getCourses=function(e){f.c.get("".concat(API["search-api"],"/search/").concat(e,"?type=course&page=1")).then(function(e){var t=e.data;0===t.errno&&n.setState({courseList:t.data.info.search_data.course})})},n.handleClick=function(e){n.props.history.push("/detail?id=".concat(e))},n.handleSearch=function(){n.state.value&&n.getCourses(n.state.value)},n.handleChange=function(e){n.setState({value:e})},n}return Object(s.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){this.getCourses(Object(f.b)("word"))}},{key:"render",value:function(){var e=this,t=this.state.courseList;return l.a.createElement("div",{className:"search-result"},l.a.createElement(u.a,{handleSearch:this.handleSearch,value:this.state.value,handleChange:this.handleChange,searchHistory:this.state.searchHistory}),t&&t.length>0?l.a.createElement("ul",null,t.map(function(t){var n=l.a.createElement("div",{className:"info"},l.a.createElement("p",{className:"title"},t.course_title),l.a.createElement("p",{className:"des"},t.simpledescription),l.a.createElement(C,{item:t})),a=t.bargain_num||t.groupon_num?l.a.createElement("div",{className:"status"},0===t.bargain_num?"\u780d\u4ef7\u51cf".concat(t.groupon_num,"\u5143"):"\u62fc\u56e2\u51cf".concat(t.bargain_num,"\u5143")):null;return l.a.createElement(h.a,{img:t.image_name,handleClick:e.handleClick,key:t.course_id,info:n,id:t.course_id,status:a})})):l.a.createElement("div",{className:"empty"},"\u62b1\u6b49\uff01\u6ca1\u6709\u641c\u5230\u76f8\u5173\u5185\u5bb9"),l.a.createElement(y,null))}}]),t}(i.PureComponent);t.default=b},577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,n){return"aria-"!==n.substr(0,5)&&"data-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t},{})},e.exports=t.default},582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(3),r=(a=o)&&a.__esModule?a:{default:a};t.getComponentLocale=function(e,t,n,a){var o={};if(t&&t.antLocale&&t.antLocale[n])o=t.antLocale[n];else{var c=a();o=c.default||c}var s=(0,r.default)({},o);e.locale&&(s=(0,r.default)({},s,e.locale),e.locale.lang&&(s.lang=(0,r.default)({},o.lang,e.locale.lang)));return s},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},600:function(e,t,n){"use strict";n(48),n(601)},601:function(e,t,n){},602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=g(n(3)),o=g(n(32)),r=g(n(5)),c=g(n(12)),s=g(n(6)),i=g(n(13)),l=g(n(15)),u=v(n(0)),h=v(n(2)),f=g(n(151)),p=g(n(577)),d=n(582),m=n(603);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){(0,r.default)(this,t);var n=(0,s.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onSubmit=function(e){e.preventDefault(),n.props.onSubmit&&n.props.onSubmit(n.state.value||""),n.inputRef&&n.inputRef.blur()},n.onChange=function(e){n.state.focus||n.setState({focus:!0});var t=e.target.value;"value"in n.props||n.setState({value:t}),n.props.onChange&&n.props.onChange(t)},n.onFocus=function(){n.setState({focus:!0}),n.firstFocus=!0,n.props.onFocus&&n.props.onFocus()},n.onBlur=function(){var e;n.onBlurTimeout=(e=function(){n.blurFromOnClear||document.activeElement!==n.inputRef&&n.setState({focus:!1}),n.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),n.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),n.props.onBlur())},n.onClear=function(){n.doClear()},n.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.blurFromOnClear=e,"value"in n.props||n.setState({value:""}),n.props.onClear&&n.props.onClear(""),n.props.onChange&&n.props.onChange(""),e&&n.focus()},n.onCancel=function(){n.props.onCancel?n.props.onCancel(n.state.value||""):n.doClear(!1)},n.focus=function(){n.inputRef&&n.inputRef.focus()};var a=void 0;return a="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",n.state={value:a,focus:!1},n}return(0,i.default)(t,e),(0,c.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,r=this.props,c=r.prefixCls,s=r.showCancelButton,i=r.disabled,h=r.placeholder,m=r.className,v=r.style,g=r.maxLength,y=(0,d.getComponentLocale)(this.props,this.context,"SearchBar",function(){return n(604)}).cancelText,C=this.state,b=C.value,w=C.focus,E=(0,l.default)(c,m,(0,o.default)({},c+"-start",!!(w||b&&b.length>0))),N=(0,l.default)(c+"-clear",(0,o.default)({},c+"-clear-show",!!(w&&b&&b.length>0))),_=(0,l.default)(c+"-cancel",(e={},(0,o.default)(e,c+"-cancel-show",!!(s||w||b&&b.length>0)),(0,o.default)(e,c+"-cancel-anim",this.firstFocus),e));return u.createElement("form",{onSubmit:this.onSubmit,className:E,style:v,ref:function(e){return t.inputContainerRef=e},action:"#"},u.createElement("div",{className:c+"-input"},u.createElement("div",{className:c+"-synthetic-ph",ref:function(e){return t.syntheticPhRef=e}},u.createElement("span",{className:c+"-synthetic-ph-container",ref:function(e){return t.syntheticPhContainerRef=e}},u.createElement("i",{className:c+"-synthetic-ph-icon"}),u.createElement("span",{className:c+"-synthetic-ph-placeholder",style:{visibility:h&&!b?"visible":"hidden"}},h))),u.createElement("input",(0,a.default)({type:"search",className:c+"-value",value:b,disabled:i,placeholder:h,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:g},(0,p.default)(this.props))),u.createElement(f.default,{activeClassName:c+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:N}))),u.createElement("div",{className:_,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||y))}}]),t}(u.Component);t.default=y,y.defaultProps=m.defaultProps,y.contextTypes={antLocale:h.object},e.exports=t.default},603:function(e,t,n){"use strict";function a(){}Object.defineProperty(t,"__esModule",{value:!0});t.defaultProps={prefixCls:"am-search",placeholder:"",onSubmit:a,onChange:a,onFocus:a,onBlur:a,onClear:a,showCancelButton:!1,disabled:!1}},604:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},698:function(e,t,n){"use strict";n(600);var a=n(602),o=n.n(a),r=n(115),c=n(7),s=n(8),i=n(11),l=n(9),u=n(10),h=n(0),f=n.n(h),p=n(52),d=(n(699),function(e){function t(){var e,n;Object(c.a)(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(n=Object(i.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(o)))).returnPage=function(){n.props.history.go(-1)},n.search=function(){n.storeKeyword(),n.props.handleSearch()},n.storeKeyword=function(){var e=n.props,t=e.searchHistory,a=void 0===t?[]:t,o=e.value;o&&localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(r.a)(a),[o])))},n}return Object(u.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.refs.search.focus()}},{key:"render",value:function(){return f.a.createElement("div",{className:"search-head"},f.a.createElement("div",{className:"left",onClick:this.returnPage},f.a.createElement("i",{className:"iconfont iconiconfront-68"})),f.a.createElement("div",{className:"center"},f.a.createElement(o.a,{value:this.props.value,showCancelButton:!0,cancelText:" ",ref:"search",focus:!0,onChange:this.props.handleChange,placeholder:"\u641c\u7d22\u8bfe\u7a0b"})),f.a.createElement("div",{className:"right right-btn",onClick:this.search},f.a.createElement("div",{className:"submit-btn"},"\u641c\u7d22")))}}]),t}(h.PureComponent));t.a=Object(p.g)(d)},699:function(e,t,n){}}]);
//# sourceMappingURL=SearchResult.8322516d.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{1126:function(e,t,n){},1127:function(e,t,n){},1175:function(e,t,n){"use strict";n.r(t);var a=n(7),o=n(8),r=n(11),c=n(9),s=n(10),i=n(0),l=n.n(i),u=n(698),h=n(160),f=n(4),p=(n(1126),n(44),n(14)),d=n.n(p),m=(n(1127),n(30)),v=n(52),g=function(e){function t(){var e,n;Object(a.a)(this,t);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(n=Object(r.a)(this,(e=Object(c.a)(t)).call.apply(e,[this].concat(s)))).state={courses:[]},n.handleClick=function(e){n.props.history.push("/detail?id=".concat(e))},n}return Object(s.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){var e=this;f.c.get("".concat(API["search-api"],"/search_hot_word")).then(function(t){0===t.data.errno?e.setState({courses:t.data.data.info.courses}):d.a.info(t.data.msg)})}},{key:"render",value:function(){var e=this,t=this.state.courses;return l.a.createElement("div",{className:"recommendation"},l.a.createElement("div",{className:"title"},"\u63a8\u8350\u8bfe\u7a0b"),l.a.createElement("div",{className:"courses"},t.length>0&&t.map(function(t,n){var a=l.a.createElement("div",{className:"bottom"},l.a.createElement("span",{className:"price"},"\xa5",t.price1),l.a.createElement("span",{className:"old-price"},"\xa5",t.price0));return l.a.createElement(m.d,{className:"text-overflow-2",key:t.course_id,id:t.course_id,img:t.image_name,title:t.course_title,bottom:a,handleClick:e.handleClick})})))}}]),t}(i.Component),y=Object(v.g)(g),C=function(e){var t=e.item;return l.a.createElement("div",{className:"bottom"},l.a.createElement("span",{className:"price"},"\xa5",t.price1),l.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},b=function(e){function t(){var e,n;Object(a.a)(this,t);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(n=Object(r.a)(this,(e=Object(c.a)(t)).call.apply(e,[this].concat(s)))).state={courseList:[],value:"",searchHistory:JSON.parse(localStorage.getItem("searchHistory"))||[]},n.getCourses=function(e){f.c.get("".concat(API["search-api"],"/search/").concat(e,"?type=course&page=1")).then(function(e){var t=e.data;0===t.errno&&n.setState({courseList:t.data.info.search_data.course})})},n.handleClick=function(e){n.props.history.push("/detail?id=".concat(e))},n.handleSearch=function(){n.state.value&&n.getCourses(n.state.value)},n.handleChange=function(e){n.setState({value:e})},n}return Object(s.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){this.getCourses(Object(f.b)("word"))}},{key:"render",value:function(){var e=this,t=this.state.courseList;return l.a.createElement("div",{className:"search-result"},l.a.createElement(u.a,{handleSearch:this.handleSearch,value:this.state.value,handleChange:this.handleChange,searchHistory:this.state.searchHistory}),t&&t.length>0?l.a.createElement("ul",null,t.map(function(t){var n=l.a.createElement("div",{className:"info"},l.a.createElement("p",{className:"title"},t.course_title),l.a.createElement("p",{className:"des"},t.simpledescription),l.a.createElement(C,{item:t})),a=t.bargain_num||t.groupon_num?l.a.createElement("div",{className:"status"},0===t.bargain_num?"\u780d\u4ef7\u51cf".concat(t.groupon_num,"\u5143"):"\u62fc\u56e2\u51cf".concat(t.bargain_num,"\u5143")):null;return l.a.createElement(h.a,{img:t.image_name,handleClick:e.handleClick,key:t.course_id,info:n,id:t.course_id,status:a})})):l.a.createElement("div",{className:"empty"},"\u62b1\u6b49\uff01\u6ca1\u6709\u641c\u5230\u76f8\u5173\u5185\u5bb9"),l.a.createElement(y,null))}}]),t}(i.PureComponent);t.default=b},577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,n){return"aria-"!==n.substr(0,5)&&"data-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t},{})},e.exports=t.default},582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(3),r=(a=o)&&a.__esModule?a:{default:a};t.getComponentLocale=function(e,t,n,a){var o={};if(t&&t.antLocale&&t.antLocale[n])o=t.antLocale[n];else{var c=a();o=c.default||c}var s=(0,r.default)({},o);e.locale&&(s=(0,r.default)({},s,e.locale),e.locale.lang&&(s.lang=(0,r.default)({},o.lang,e.locale.lang)));return s},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},600:function(e,t,n){"use strict";n(48),n(601)},601:function(e,t,n){},602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=g(n(3)),o=g(n(33)),r=g(n(5)),c=g(n(12)),s=g(n(6)),i=g(n(13)),l=g(n(15)),u=v(n(0)),h=v(n(2)),f=g(n(151)),p=g(n(577)),d=n(582),m=n(603);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){(0,r.default)(this,t);var n=(0,s.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onSubmit=function(e){e.preventDefault(),n.props.onSubmit&&n.props.onSubmit(n.state.value||""),n.inputRef&&n.inputRef.blur()},n.onChange=function(e){n.state.focus||n.setState({focus:!0});var t=e.target.value;"value"in n.props||n.setState({value:t}),n.props.onChange&&n.props.onChange(t)},n.onFocus=function(){n.setState({focus:!0}),n.firstFocus=!0,n.props.onFocus&&n.props.onFocus()},n.onBlur=function(){var e;n.onBlurTimeout=(e=function(){n.blurFromOnClear||document.activeElement!==n.inputRef&&n.setState({focus:!1}),n.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),n.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),n.props.onBlur())},n.onClear=function(){n.doClear()},n.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.blurFromOnClear=e,"value"in n.props||n.setState({value:""}),n.props.onClear&&n.props.onClear(""),n.props.onChange&&n.props.onChange(""),e&&n.focus()},n.onCancel=function(){n.props.onCancel?n.props.onCancel(n.state.value||""):n.doClear(!1)},n.focus=function(){n.inputRef&&n.inputRef.focus()};var a=void 0;return a="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",n.state={value:a,focus:!1},n}return(0,i.default)(t,e),(0,c.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,r=this.props,c=r.prefixCls,s=r.showCancelButton,i=r.disabled,h=r.placeholder,m=r.className,v=r.style,g=r.maxLength,y=(0,d.getComponentLocale)(this.props,this.context,"SearchBar",function(){return n(604)}).cancelText,C=this.state,b=C.value,w=C.focus,E=(0,l.default)(c,m,(0,o.default)({},c+"-start",!!(w||b&&b.length>0))),N=(0,l.default)(c+"-clear",(0,o.default)({},c+"-clear-show",!!(w&&b&&b.length>0))),_=(0,l.default)(c+"-cancel",(e={},(0,o.default)(e,c+"-cancel-show",!!(s||w||b&&b.length>0)),(0,o.default)(e,c+"-cancel-anim",this.firstFocus),e));return u.createElement("form",{onSubmit:this.onSubmit,className:E,style:v,ref:function(e){return t.inputContainerRef=e},action:"#"},u.createElement("div",{className:c+"-input"},u.createElement("div",{className:c+"-synthetic-ph",ref:function(e){return t.syntheticPhRef=e}},u.createElement("span",{className:c+"-synthetic-ph-container",ref:function(e){return t.syntheticPhContainerRef=e}},u.createElement("i",{className:c+"-synthetic-ph-icon"}),u.createElement("span",{className:c+"-synthetic-ph-placeholder",style:{visibility:h&&!b?"visible":"hidden"}},h))),u.createElement("input",(0,a.default)({type:"search",className:c+"-value",value:b,disabled:i,placeholder:h,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:g},(0,p.default)(this.props))),u.createElement(f.default,{activeClassName:c+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:N}))),u.createElement("div",{className:_,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||y))}}]),t}(u.Component);t.default=y,y.defaultProps=m.defaultProps,y.contextTypes={antLocale:h.object},e.exports=t.default},603:function(e,t,n){"use strict";function a(){}Object.defineProperty(t,"__esModule",{value:!0});t.defaultProps={prefixCls:"am-search",placeholder:"",onSubmit:a,onChange:a,onFocus:a,onBlur:a,onClear:a,showCancelButton:!1,disabled:!1}},604:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},698:function(e,t,n){"use strict";n(600);var a=n(602),o=n.n(a),r=n(115),c=n(7),s=n(8),i=n(11),l=n(9),u=n(10),h=n(0),f=n.n(h),p=n(52),d=(n(699),function(e){function t(){var e,n;Object(c.a)(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(n=Object(i.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(o)))).returnPage=function(){n.props.history.go(-1)},n.search=function(){n.storeKeyword(),n.props.handleSearch()},n.storeKeyword=function(){var e=n.props,t=e.searchHistory,a=void 0===t?[]:t,o=e.value;o&&localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(r.a)(a),[o])))},n}return Object(u.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.refs.search.focus()}},{key:"render",value:function(){return f.a.createElement("div",{className:"search-head"},f.a.createElement("div",{className:"left",onClick:this.returnPage},f.a.createElement("i",{className:"iconfont iconiconfront-68"})),f.a.createElement("div",{className:"center"},f.a.createElement(o.a,{value:this.props.value,showCancelButton:!0,cancelText:" ",ref:"search",focus:!0,onChange:this.props.handleChange,placeholder:"\u641c\u7d22\u8bfe\u7a0b"})),f.a.createElement("div",{className:"right right-btn",onClick:this.search},f.a.createElement("div",{className:"submit-btn"},"\u641c\u7d22")))}}]),t}(h.PureComponent));t.a=Object(p.g)(d)},699:function(e,t,n){}}]);
//# sourceMappingURL=SearchResult.e678ace6.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/search/recommendation/index.js","components/search/search-result.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","components/search/searchHead.js"],"names":["Recommendation","state","courses","handleClick","id","_this","props","history","push","concat","_this2","this","http","get","API","then","res","data","errno","setState","info","toast_default","a","msg","_this3","react_default","createElement","className","length","map","item","index","Bottom","common","key","img","title","bottom","Component","withRouter","_ref","price1","price0","SearchResult","courseList","value","searchHistory","JSON","parse","localStorage","getItem","getCourses","word","course","handleSearch","handleChange","getParam","searchHead","Info","course_title","simpledescription","search_result_Bottom","status","VList","image_name","course_id","search_recommendation","PureComponent","Object","defineProperty","exports","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","call","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","e","preventDefault","inputRef","blur","onChange","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","document","activeElement","window","requestAnimationFrame","setTimeout","body","scrollTop","onClear","doClear","arguments","undefined","onCancel","defaultValue","rightBtnRef","initBtn","getComputedStyle","rightBtnInitMarginleft","marginLeft","componentDidUpdate","syntheticPhRef","inputContainerRef","indexOf","prefixCls","syntheticPhContainerRef","realWidth","getBoundingClientRect","width","style","Math","ceil","showCancelButton","marginRight","offsetWidth","parseInt","nextProps","nextFrameId","cancelAnimationFrame","clearTimeout","_classnames3","_props","disabled","placeholder","maxLength","cancelText","_state","wrapCls","clearCls","cancelCls","ref","el","action","visibility","type","activeClassName","onClick","defaultProps","contextTypes","object","noop","SearchHead","returnPage","go","search","storeKeyword","_this$props","_this$props$searchHis","setItem","stringify","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toCons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O3BC,OAAS,WACL3L,EAAK4L,eACL5L,EAAKC,MAAMgD,kBAGf2I,aAAe,WAAM,IAAAC,EACiB7L,EAAKC,MADtB6L,EAAAD,EACZpJ,qBADY,IAAAqJ,EACI,GADJA,EACQtJ,EADRqJ,EACQrJ,MACzBA,GAASI,aAAamJ,QAAQ,gBAAiBrJ,KAAKsJ,UAAL,GAAA5L,OAAA2D,OAAAkI,EAAA,EAAAlI,CAAmBtB,GAAnB,CAAkCD,0FAVjFlC,KAAK4L,KAAKP,OAAOtE,yCAejB,OACI8E,EAAAlL,EAAAI,cAAA,OAAKC,UAAU,eAEX6K,EAAAlL,EAAAI,cAAA,OAAKC,UAAU,OAAO6J,QAAS7K,KAAKmL,YAChCU,EAAAlL,EAAAI,cAAA,KAAGC,UAAU,+BAGjB6K,EAAAlL,EAAAI,cAAA,OAAKC,UAAU,UACX6K,EAAAlL,EAAAI,cAAA+K,EAAAnL,EAAA,CACIuB,MAAOlC,KAAKL,MAAMuC,MAClBmH,kBAAgB,EAChBa,WAAY,IACZK,IAAI,SACJxD,OAAO,EACPD,SAAU9G,KAAKL,MAAMiD,aACrBoH,YAAY,8BAEpB6B,EAAAlL,EAAAI,cAAA,OAAKC,UAAU,kBAAkB6J,QAAS7K,KAAKqL,QAC3CQ,EAAAlL,EAAAI,cAAA,OAAKC,UAAU,cAAf,yBAxCKwC,kBAgDV5B,gBAAWsJ","file":"static/js/SearchResult.8322516d.chunk.js","sourcesContent":["import React, { Component } from \"react\";\nimport './recommendation.scss'\nimport { Course } from \"@/common\";\nimport { api, http } from \"@/utils\";\nimport { Toast } from 'antd-mobile'\nimport {withRouter} from 'react-router-dom'\n\nclass Recommendation extends Component {\n\n state = {\n courses: []\n }\n\n componentDidMount() {\n http.get(`${API['search-api']}/search_hot_word`)\n .then(res => {\n if (res.data.errno === 0) {\n this.setState({\n courses: res.data.data.info.courses\n })\n } else {\n Toast.info(res.data.msg)\n }\n\n })\n\n }\n\n handleClick = (id) => {\n this.props.history.push(`/detail?id=${id}`)\n }\n\n\n\n render() {\n const {courses} = this.state\n return (\n <div className=\"recommendation\">\n <div className=\"title\">推荐课程</div>\n <div className=\"courses\">\n {\n courses.length > 0 &&\n courses.map((item, index) => {\n const Bottom = (\n <div className='bottom'>\n <span className='price'>¥{item['price1']}</span>\n <span className='old-price'>¥{item['price0']}</span>\n\n </div>\n )\n return (\n <Course\n className={'text-overflow-2'}\n key={item['course_id']}\n id={item['course_id']}\n img={item['image_name']}\n title={item['course_title']}\n bottom={Bottom}\n handleClick={this.handleClick}\n />\n )\n })\n }\n\n </div>\n </div>\n )\n }\n}\n\nexport default withRouter(Recommendation)\n","import React, { PureComponent } from 'react';\nimport SearchHeader from './searchHead'\nimport VList from '@/common/VList'\nimport { http, getParam } from '@/utils'\nimport './search-result.scss'\nimport Recommendation from './recommendation'\n\nconst Bottom = ({item}) => {\n return (\n <div className='bottom'>\n <span className='price'>¥{item.price1}</span>\n <span className='stale-price'>¥{item.price0}</span>\n </div>\n )\n}\n\nclass SearchResult extends PureComponent {\n\n state = {\n courseList: [],\n value: '',\n searchHistory: JSON.parse(localStorage.getItem('searchHistory')) || []\n }\n\n componentDidMount() {\n this.getCourses(getParam('word'))\n }\n\n\n getCourses = (word) => {\n http.get(`${API['search-api']}/search/${word}?type=course&page=1`)\n .then(res => {\n const data = res.data\n\n if (data.errno === 0) {\n this.setState({\n courseList: data.data.info['search_data'].course\n });\n }\n })\n }\n\n handleClick = id => {\n this.props.history.push(`/detail?id=${id}`)\n }\n\n handleSearch = () => {\n this.state.value && this.getCourses(this.state.value)\n }\n\n handleChange = value => {\n this.setState({value})\n }\n\n\n render() {\n const {courseList} = this.state\n\n return (\n <div className='search-result'>\n <SearchHeader\n handleSearch={this.handleSearch}\n value={this.state.value}\n handleChange={this.handleChange}\n searchHistory={this.state.searchHistory}\n />\n {\n\n courseList && courseList.length > 0 ?\n <ul>\n {\n courseList.map(item => {\n const Info = (\n <div className=\"info\">\n <p className='title'>{item.course_title}</p>\n <p className='des'>{item.simpledescription}</p>\n <Bottom\n item={item}\n />\n </div>\n )\n const status = (\n (item['bargain_num'] || item['groupon_num']) ?\n <div\n className='status'>\n {\n item['bargain_num'] === 0 ? `砍价减${item['groupon_num']}元` : `拼团减${item['bargain_num']}元`\n }\n </div>\n : null\n )\n return (\n <VList img={item.image_name}\n handleClick={this.handleClick}\n key={item.course_id}\n info={Info}\n id={item['course_id']}\n status={status}\n />\n )\n })\n }\n </ul>\n : <div className=\"empty\">\n 抱歉!没有搜到相关内容\n </div>\n\n }\n <Recommendation/>\n </div>\n );\n }\n}\n\n\nexport default SearchResult;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, { PureComponent } from 'react'\nimport { SearchBar } from 'antd-mobile'\nimport { withRouter } from 'react-router-dom'\n\nimport './search_header.scss'\n\nclass SearchHead extends PureComponent {\n\n returnPage = () => {\n this.props.history.go(-1)\n }\n\n componentDidMount() {\n this.refs.search.focus();\n }\n\n search = () => {\n this.storeKeyword()\n this.props.handleSearch()\n }\n\n storeKeyword = () => {\n let {searchHistory = [], value} = this.props\n value && localStorage.setItem('searchHistory', JSON.stringify([...searchHistory, value]))\n }\n\n\n render() {\n return (\n <div className=\"search-head\">\n\n <div className=\"left\" onClick={this.returnPage}>\n <i className=\"iconfont iconiconfront-68\"/>\n </div>\n\n <div className=\"center\">\n <SearchBar\n value={this.props.value}\n showCancelButton\n cancelText={\" \"}\n ref=\"search\"\n focus={true}\n onChange={this.props.handleChange}\n placeholder=\"搜索课程\"/>\n </div>\n <div className=\"right right-btn\" onClick={this.search}>\n <div className=\"submit-btn\">搜索\n </div>\n </div>\n </div>\n )\n }\n}\n\nexport default withRouter(SearchHead)"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/search/recommendation/index.js","components/search/search-result.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","components/search/searchHead.js"],"names":["Recommendation","state","courses","handleClick","id","_this","props","history","push","concat","_this2","this","http","get","API","then","res","data","errno","setState","info","toast_default","a","msg","_this3","react_default","createElement","className","length","map","item","index","Bottom","common","key","img","title","bottom","Component","withRouter","_ref","price1","price0","SearchResult","courseList","value","searchHistory","JSON","parse","localStorage","getItem","getCourses","word","course","handleSearch","handleChange","getParam","searchHead","Info","course_title","simpledescription","search_result_Bottom","status","VList","image_name","course_id","search_recommendation","PureComponent","Object","defineProperty","exports","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","call","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","e","preventDefault","inputRef","blur","onChange","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","document","activeElement","window","requestAnimationFrame","setTimeout","body","scrollTop","onClear","doClear","arguments","undefined","onCancel","defaultValue","rightBtnRef","initBtn","getComputedStyle","rightBtnInitMarginleft","marginLeft","componentDidUpdate","syntheticPhRef","inputContainerRef","indexOf","prefixCls","syntheticPhContainerRef","realWidth","getBoundingClientRect","width","style","Math","ceil","showCancelButton","marginRight","offsetWidth","parseInt","nextProps","nextFrameId","cancelAnimationFrame","clearTimeout","_classnames3","_props","disabled","placeholder","maxLength","cancelText","_state","wrapCls","clearCls","cancelCls","ref","el","action","visibility","type","activeClassName","onClick","defaultProps","contextTypes","object","noop","SearchHead","returnPage","go","search","storeKeyword","_this$props","_this$props$searchHis","setItem","stringify","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__","refs","react__WEBPACK_IMPORTED_MODULE_8___default","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default"],"mappings":"8RAOMA,6MAEFC,MAAQ,CACJC,QAAS,MAkBbC,YAAc,SAACC,GACXC,EAAKC,MAAMC,QAAQC,KAAnB,cAAAC,OAAsCL,wFAhBtB,IAAAM,EAAAC,KAChBC,IAAKC,IAAL,GAAAJ,OAAYK,IAAI,cAAhB,qBACKC,KAAK,SAAAC,GACqB,IAAnBA,EAAIC,KAAKC,MACTR,EAAKS,SAAS,CACVjB,QAASc,EAAIC,KAAKA,KAAKG,KAAKlB,UAGhCmB,EAAAC,EAAMF,KAAKJ,EAAIC,KAAKM,wCAa3B,IAAAC,EAAAb,KACET,EAAWS,KAAKV,MAAhBC,QACP,OACIuB,EAAAH,EAAAI,cAAA,OAAKC,UAAU,kBACXF,EAAAH,EAAAI,cAAA,OAAKC,UAAU,SAAf,4BACAF,EAAAH,EA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BAAgB,EAChBa,WAAY,IACZK,IAAI,SACJxD,OAAO,EACPD,SAAU9G,KAAKL,MAAMiD,aACrBoH,YAAY,8BAEpB6B,EAAAlL,EAAAI,cAAA,OAAKC,UAAU,kBAAkB6J,QAAS7K,KAAKqL,QAC3CQ,EAAAlL,EAAAI,cAAA,OAAKC,UAAU,cAAf,yBAxCKwC,kBAgDV5B,gBAAWsJ","file":"static/js/SearchResult.e678ace6.chunk.js","sourcesContent":["import React, { Component } from \"react\";\nimport './recommendation.scss'\nimport { Course } from \"@/common\";\nimport { api, http } from \"@/utils\";\nimport { Toast } from 'antd-mobile'\nimport {withRouter} from 'react-router-dom'\n\nclass Recommendation extends Component {\n\n state = {\n courses: []\n }\n\n componentDidMount() {\n http.get(`${API['search-api']}/search_hot_word`)\n .then(res => {\n if (res.data.errno === 0) {\n this.setState({\n courses: res.data.data.info.courses\n })\n } else {\n Toast.info(res.data.msg)\n }\n\n })\n\n }\n\n handleClick = (id) => {\n this.props.history.push(`/detail?id=${id}`)\n }\n\n\n\n render() {\n const {courses} = this.state\n return (\n <div className=\"recommendation\">\n <div className=\"title\">推荐课程</div>\n <div className=\"courses\">\n {\n courses.length > 0 &&\n courses.map((item, index) => {\n const Bottom = (\n <div className='bottom'>\n <span className='price'>¥{item['price1']}</span>\n <span className='old-price'>¥{item['price0']}</span>\n\n </div>\n )\n return (\n <Course\n className={'text-overflow-2'}\n key={item['course_id']}\n id={item['course_id']}\n img={item['image_name']}\n title={item['course_title']}\n bottom={Bottom}\n handleClick={this.handleClick}\n />\n )\n })\n }\n\n </div>\n </div>\n )\n }\n}\n\nexport default withRouter(Recommendation)\n","import React, { PureComponent } from 'react';\nimport SearchHeader from './searchHead'\nimport VList from '@/common/VList'\nimport { http, getParam } from '@/utils'\nimport './search-result.scss'\nimport Recommendation from './recommendation'\n\nconst Bottom = ({item}) => {\n return (\n <div className='bottom'>\n <span className='price'>¥{item.price1}</span>\n <span className='stale-price'>¥{item.price0}</span>\n </div>\n )\n}\n\nclass SearchResult extends PureComponent {\n\n state = {\n courseList: [],\n value: '',\n searchHistory: JSON.parse(localStorage.getItem('searchHistory')) || []\n }\n\n componentDidMount() {\n this.getCourses(getParam('word'))\n }\n\n\n getCourses = (word) => {\n http.get(`${API['search-api']}/search/${word}?type=course&page=1`)\n .then(res => {\n const data = res.data\n\n if (data.errno === 0) {\n this.setState({\n courseList: data.data.info['search_data'].course\n });\n }\n })\n }\n\n handleClick = id => {\n this.props.history.push(`/detail?id=${id}`)\n }\n\n handleSearch = () => {\n this.state.value && this.getCourses(this.state.value)\n }\n\n handleChange = value => {\n this.setState({value})\n }\n\n\n render() {\n const {courseList} = this.state\n\n return (\n <div className='search-result'>\n <SearchHeader\n handleSearch={this.handleSearch}\n value={this.state.value}\n handleChange={this.handleChange}\n searchHistory={this.state.searchHistory}\n />\n {\n\n courseList && courseList.length > 0 ?\n <ul>\n {\n courseList.map(item => {\n const Info = (\n <div className=\"info\">\n <p className='title'>{item.course_title}</p>\n <p className='des'>{item.simpledescription}</p>\n <Bottom\n item={item}\n />\n </div>\n )\n const status = (\n (item['bargain_num'] || item['groupon_num']) ?\n <div\n className='status'>\n {\n item['bargain_num'] === 0 ? `砍价减${item['groupon_num']}元` : `拼团减${item['bargain_num']}元`\n }\n </div>\n : null\n )\n return (\n <VList img={item.image_name}\n handleClick={this.handleClick}\n key={item.course_id}\n info={Info}\n id={item['course_id']}\n status={status}\n />\n )\n })\n }\n </ul>\n : <div className=\"empty\">\n 抱歉!没有搜到相关内容\n </div>\n\n }\n <Recommendation/>\n </div>\n );\n }\n}\n\n\nexport default SearchResult;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, { PureComponent } from 'react'\nimport { SearchBar } from 'antd-mobile'\nimport { withRouter } from 'react-router-dom'\n\nimport './search_header.scss'\n\nclass SearchHead extends PureComponent {\n\n returnPage = () => {\n this.props.history.go(-1)\n }\n\n componentDidMount() {\n this.refs.search.focus();\n }\n\n search = () => {\n this.storeKeyword()\n this.props.handleSearch()\n }\n\n storeKeyword = () => {\n let {searchHistory = [], value} = this.props\n value && localStorage.setItem('searchHistory', JSON.stringify([...searchHistory, value]))\n }\n\n\n render() {\n return (\n <div className=\"search-head\">\n\n <div className=\"left\" onClick={this.returnPage}>\n <i className=\"iconfont iconiconfront-68\"/>\n </div>\n\n <div className=\"center\">\n <SearchBar\n value={this.props.value}\n showCancelButton\n cancelText={\" \"}\n ref=\"search\"\n focus={true}\n onChange={this.props.handleChange}\n placeholder=\"搜索课程\"/>\n </div>\n <div className=\"right right-btn\" onClick={this.search}>\n <div className=\"submit-btn\">搜索\n </div>\n </div>\n </div>\n )\n }\n}\n\nexport default withRouter(SearchHead)"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{1172:function(e,t,a){"use strict";a.r(t);a(731);var c=a(732),n=a.n(c),r=a(24),s=(a(44),a(14)),i=a.n(s),o=a(7),l=a(8),u=a(11),d=a(9),h=a(10),m=(a(253),a(98)),p=a.n(m),f=a(0),v=a.n(f),g=a(20),E=a(33),k=a(63),b=a(16),N=a(155),j=function(e){function t(e){var a;return Object(o.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"},v.a.createElement(b.b,{to:"/detail?id=".concat(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})))}}]),t}(f.Component),O=function(e){function t(){return Object(o.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(j,{index:a,changeStock:function(t,a){e.props.changeStock(t,a)},checkChange:function(t,a){e.props.checkChange(t,a)},key:a,item:t})}):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(895),a(15)),C=a.n(y),I=a(4),w=p.a.alert,S=function(e){function t(e){var a;return Object(o.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}):i.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,"]")):i.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():i.a.info(e.data.msg,2)})}}])},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(E.e,{title:"\u8d2d\u7269\u8f66",arrow:!0,cart:!1,delete:!0,toDelete:this.todelete}),v.a.createElement(k.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"cart-body"},v.a.createElement(O,{checkChange:this.checkChange.bind(this),data:this.state.data}),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:C()({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)},895:function(e,t,a){}}]);
//# sourceMappingURL=ShopCart.9e1ecb82.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{1172:function(e,t,a){"use strict";a.r(t);a(731);var c=a(732),n=a.n(c),r=a(24),s=(a(44),a(14)),i=a.n(s),o=a(7),l=a(8),u=a(11),d=a(9),h=a(10),m=(a(253),a(98)),p=a.n(m),f=a(0),v=a.n(f),g=a(20),E=a(30),k=a(63),b=a(16),N=a(155),j=function(e){function t(e){var a;return Object(o.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"},v.a.createElement(b.b,{to:"/detail?id=".concat(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})))}}]),t}(f.Component),O=function(e){function t(){return Object(o.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(j,{index:a,changeStock:function(t,a){e.props.changeStock(t,a)},checkChange:function(t,a){e.props.checkChange(t,a)},key:a,item:t})}):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(895),a(15)),C=a.n(y),I=a(4),w=p.a.alert,S=function(e){function t(e){var a;return Object(o.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}):i.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,"]")):i.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():i.a.info(e.data.msg,2)})}}])},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(E.e,{title:"\u8d2d\u7269\u8f66",arrow:!0,cart:!1,delete:!0,toDelete:this.todelete}),v.a.createElement(k.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"cart-body"},v.a.createElement(O,{checkChange:this.checkChange.bind(this),data:this.state.data}),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:C()({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)},895:function(e,t,a){}}]);
//# sourceMappingURL=ShopCart.4f1c3903.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/shopCart/cartItem.js","components/shopCart/cartList.js","components/shopCart/index.js"],"names":["CartItem","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","state","val","item","value","e","id","checked","target","checkChange","_this2","Info","react_default","a","createElement","className","react_router_dom","to","concat","course_id","course_title","simpledescription","price1","price0","checkbox_default","check","onChange","OrderList","info","src","image_name","Component","cartList","data","length","map","index","cartItem","changeStock","key","alert","modal_default","Cart","getList","http","get","API","home","then","res","code","setState","courses","isLoading","toast_default","msg","tobuy","console","log","courseIdarr","errno","history","push","todelete","text","onPress","course_ids","post","checkedNum","allPrice","cartNmu","newData","i","objectSpread","calc","arr","forEach","parseFloat","_this3","style","overflow","common","title","arrow","cart","delete","toDelete","Loading","shopCart_cartList","bind","allChange","classnames","active","onClick","connect"],"mappings":"yRAmDeA,cA3CX,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KACDQ,MAAQ,CACTC,IAAKT,EAAMU,KAAKC,OAHLV,wEAOVW,EAAGC,GACR,IAAIC,EAAUF,EAAEG,OAAOD,QACvBV,KAAKJ,MAAMgB,YAAYH,EAAIC,oCAGtB,IAAAG,EAAAb,KACDM,EAAON,KAAKJ,MAAMU,KAChBQ,EACFC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,cACXH,EAAAC,EAAAC,cAAA,KAAGC,UAAU,iCACTH,EAAAC,EAAAC,cAACE,EAAA,EAAD,CAAMC,GAAE,cAAAC,OAAgBf,EAAKgB,YAAchB,EAAKiB,eAEpDR,EAAAC,EAAAC,cAAA,KAAGC,UAAU,iCAA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pE,EAAAC,EAAAC,cAACmE,EAAA,EAAD,CAAWC,MAAM,qBAAMC,OAAO,EAAMC,MAAM,EAAOC,QAAQ,EAAMC,SAAUzF,KAAKkE,WAE9EnD,EAAAC,EAAAC,cAACyE,EAAA,EAAD,CAASlC,UAAWxD,KAAKI,MAAMoD,WAC3BzC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,aACXH,EAAAC,EAAAC,cAAC0E,EAAD,CAAU/E,YAAaZ,KAAKY,YAAYgF,KAAK5F,MAAOoC,KAAMpC,KAAKI,MAAMgC,OAErErB,EAAAC,EAAAC,cAAA,OAAKC,UAAU,eACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,cACXH,EAAAC,EAAAC,cAAAU,EAAAX,EAAA,CAAUa,SAAU,SAACrB,GACjByE,EAAKY,UAAUrF,MAEnBO,EAAAC,EAAAC,cAAA,4BAEJF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,aACXH,EAAAC,EAAAC,cAAA,SACIF,EAAAC,EAAAC,cAAA,kCACAF,EAAAC,EAAAC,cAAA,qBAAQjB,KAAKI,MAAMoE,YAG3BzD,EAAAC,EAAAC,cAAA,OAAKC,UAAW4E,IAAW,CACvBC,OAAU/F,KAAKI,MAAMmE,WAAa,IAClCyB,QAAS,WACLf,EAAK7E,MAAMmE,WAAa,GACxBU,EAAKtB,UAJb,eAOM5C,EAAAC,EAAAC,cAAA,kBAAUjB,KAAKI,MAAMmE,WAArB,mBAxLfrC,aAqMJ+D,wBAAUpD","file":"static/js/ShopCart.9e1ecb82.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Checkbox } from 'antd-mobile';\nimport OrderList from '@/common/OrderList';\nimport {Link} from \"react-router-dom\";\n\n\nclass CartItem extends Component {\n // 构造函数\n constructor(props) {\n super(props)\n this.state = {\n val: props.item.value\n }\n }\n // 改变选择\n onChange(e, id) {\n let checked = e.target.checked\n this.props.checkChange(id, checked)\n }\n\n render() {\n let item = this.props.item\n const Info = (\n <div className=\"order-info\">\n <p className='order-title text-overflow-one'>\n <Link to={`/detail?id=${item.course_id}`}>{item.course_title}</Link>\n </p>\n <p className='order-content text-overflow-2'>{item.simpledescription}</p>\n <p className='order-des'>\n <span className='order-newprice'>¥{item.price1}</span>\n <span className='order-price'>¥{item.price0}</span>\n </p>\n </div>\n )\n\n return (\n <div className=\"cart-c-item\" >\n <div className=\"cart-c-check\">\n <Checkbox checked={item.check} onChange={(e) => {\n this.onChange(e, item.course_id)\n }} />\n </div>\n\n <div className=\"card-wrap\">\n <OrderList info={Info} src={item.image_name} id={item.course_id}></OrderList>\n </div>\n </div>\n\n )\n }\n}\nexport default CartItem;","import React, {Component} from 'react'\nimport {Link} from 'react-router-dom'\nimport CartItem from './cartItem'\nclass cartList extends Component {\n render() {\n return (\n <div className=\"cart-main\">\n {/* 遍历购物车商品列表 */}\n <div className=\"cart-c-body\">\n {\n this.props.data.length > 0 ?\n this.props.data.map((item, index) => {\n return (\n <CartItem\n index={index}\n changeStock={(id, val) => {\n this.props.changeStock(id, val)\n }}\n checkChange={(id, val) => {\n this.props.checkChange(id, val)\n }}\n key={index} item={item}/>\n )\n })\n : <div className=\"cart-tip\">\n <p className='cart-mess'>这里是空的,快去逛逛吧~</p>\n <Link to='/classify'>去逛逛</Link>\n </div>\n }\n </div>\n </div>\n )\n }\n}\n\nexport default cartList;","import React, {Component} from 'react'\nimport {connect} from 'react-redux'\nimport {Checkbox, Modal, Toast} from 'antd-mobile'\nimport {HeaderBar} from '../../common'\nimport Loading from '@/common/Loading'\nimport ShopCart from './cartList.js'\nimport './card.scss'\nimport classnames from 'classnames'\nimport {api, http} from \"@/utils\";\n\nconst alert = Modal.alert;\n\nclass Cart extends Component {\n constructor(props) {\n super(props)\n this.state = {\n data: [],\n checkedNum: 0,\n allPrice: 0,\n cartNmu: 0,\n courseIdarr: [], // 选中的课程id\n isLoading: true\n }\n\n }\n\n\n componentDidMount() {\n this.getList()\n }\n\n // 获取课程列表\n getList = () => {\n http.get(`${API.home}/m/cart/list`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n data: res.data.data.courses,\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n\n //全选\n allChange(e) {\n let checked = e.target.checked\n let newData = this.state.data.map((item, i) => {\n return {\n ...item,\n check: checked\n }\n })\n this.setState({\n data: newData\n })\n this.calc(newData)\n\n if (checked) {\n let arr = []\n newData.map((item, i) => {\n arr.push(item.course_id)\n })\n this.setState({\n courseIdarr: arr\n })\n\n } else {\n this.setState({\n courseIdarr: []\n })\n }\n\n }\n\n //点击\n checkChange(id, check) {\n let newData = this.state.data.map((item, i) => {\n if (item.course_id === id) {\n return {\n ...item,\n check: check\n }\n } else {\n return item;\n }\n })\n this.setState({\n data: newData\n })\n this.calc(newData)\n let arr = []\n newData.forEach((item, i) => {\n if (item.check) {\n arr.push(item.course_id)\n this.setState({\n courseIdarr: arr\n })\n } else {\n this.setState({\n courseIdarr: arr\n })\n }\n })\n }\n\n //计算总价\n calc(newData) {\n let allPrice = 0;\n let checkedNum = 0;\n let cartNmu = 0;\n let arr = []\n newData.forEach((item, i) => {\n if (item.check) {\n arr.push(item)\n cartNmu += 1;\n checkedNum = arr.length;\n allPrice += parseFloat(item.price1);\n }\n })\n this.setState({\n checkedNum,\n allPrice,\n cartNmu\n })\n }\n\n // 去结算\n tobuy = () => {\n console.log(this.state.courseIdarr);\n http.get(`${API['base-api']}/m/cart/addtopreorder/[${this.state.courseIdarr}]`).then((res) => {\n if (res.data.errno == 0) {\n this.props.history.push(`/order?id=[${this.state.courseIdarr}]`)\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n\n\n // 删除\n todelete = () => {\n if (this.state.courseIdarr.length > 0) {\n alert('', '确定从购物车中删除?', [\n {text: '取消', onPress: () => console.log('cancel')},\n {\n text: '确认',\n onPress: () => {\n let data = {\n course_ids: this.state.courseIdarr\n }\n http.post(`${API.home}/m/cart/remove`, data).then((res) => {\n if (res.data.code === 200) {\n this.getList()\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n }\n ])\n }\n\n }\n\n\n render() {\n return (\n <div className=\"cart-page\" style={{overflow: 'hidden'}}>\n <HeaderBar title='购物车' arrow={true} cart={false} delete={true} toDelete={this.todelete}></HeaderBar>\n\n <Loading isLoading={this.state.isLoading}>\n <div className=\"cart-body\">\n <ShopCart checkChange={this.checkChange.bind(this)} data={this.state.data}/>\n\n <div className=\"cart-footer\">\n <div className=\"cart-label\">\n <Checkbox onChange={(e) => {\n this.allChange(e)\n }}/>\n <div>全选</div>\n </div>\n <div className=\"all-pirce\">\n <p>\n <span>合计:</span>\n <span>¥{this.state.allPrice}</span>\n </p>\n </div>\n <div className={classnames({\n 'active': this.state.checkedNum > 0\n })} onClick={() => {\n if (this.state.checkedNum > 0) {\n this.tobuy()\n }\n }}>\n 结算<span> ( {this.state.checkedNum} ) </span>\n </div>\n </div>\n\n </div>\n </Loading>\n\n\n </div>\n )\n }\n}\n\nexport default connect()(Cart)"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/shopCart/cartItem.js","components/shopCart/cartList.js","components/shopCart/index.js"],"names":["CartItem","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","state","val","item","value","e","id","checked","target","checkChange","_this2","Info","react_default","a","createElement","className","react_router_dom","to","concat","course_id","course_title","simpledescription","price1","price0","checkbox_default","check","onChange","OrderList","info","src","image_name","Component","cartList","data","length","map","index","cartItem","changeStock","key","alert","modal_default","Cart","getList","http","get","API","home","then","res","code","setState","courses","isLoading","toast_default","msg","tobuy","console","log","courseIdarr","errno","history","push","todelete","text","onPress","course_ids","post","checkedNum","allPrice","cartNmu","newData","i","objectSpread","calc","arr","forEach","parseFloat","_this3","style","overflow","common","title","arrow","cart","delete","toDelete","Loading","shopCart_cartList","bind","allChange","classnames","active","onClick","connect"],"mappings":"yRAmDeA,cA3CX,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAA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AC,cAAA,OAAKC,UAAW4E,IAAW,CACvBC,OAAU/F,KAAKI,MAAMmE,WAAa,IAClCyB,QAAS,WACLf,EAAK7E,MAAMmE,WAAa,GACxBU,EAAKtB,UAJb,eAOM5C,EAAAC,EAAAC,cAAA,kBAAUjB,KAAKI,MAAMmE,WAArB,mBAxLfrC,aAqMJ+D,wBAAUpD","file":"static/js/ShopCart.4f1c3903.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Checkbox } from 'antd-mobile';\nimport OrderList from '@/common/OrderList';\nimport {Link} from \"react-router-dom\";\n\n\nclass CartItem extends Component {\n // 构造函数\n constructor(props) {\n super(props)\n this.state = {\n val: props.item.value\n }\n }\n // 改变选择\n onChange(e, id) {\n let checked = e.target.checked\n this.props.checkChange(id, checked)\n }\n\n render() {\n let item = this.props.item\n const Info = (\n <div className=\"order-info\">\n <p className='order-title text-overflow-one'>\n <Link to={`/detail?id=${item.course_id}`}>{item.course_title}</Link>\n </p>\n <p className='order-content text-overflow-2'>{item.simpledescription}</p>\n <p className='order-des'>\n <span className='order-newprice'>¥{item.price1}</span>\n <span className='order-price'>¥{item.price0}</span>\n </p>\n </div>\n )\n\n return (\n <div className=\"cart-c-item\" >\n <div className=\"cart-c-check\">\n <Checkbox checked={item.check} onChange={(e) => {\n this.onChange(e, item.course_id)\n }} />\n </div>\n\n <div className=\"card-wrap\">\n <OrderList info={Info} src={item.image_name} id={item.course_id}></OrderList>\n </div>\n </div>\n\n )\n }\n}\nexport default CartItem;","import React, {Component} from 'react'\nimport {Link} from 'react-router-dom'\nimport CartItem from './cartItem'\nclass cartList extends Component {\n render() {\n return (\n <div className=\"cart-main\">\n {/* 遍历购物车商品列表 */}\n <div className=\"cart-c-body\">\n {\n this.props.data.length > 0 ?\n this.props.data.map((item, index) => {\n return (\n <CartItem\n index={index}\n changeStock={(id, val) => {\n this.props.changeStock(id, val)\n }}\n checkChange={(id, val) => {\n this.props.checkChange(id, val)\n }}\n key={index} item={item}/>\n )\n })\n : <div className=\"cart-tip\">\n <p className='cart-mess'>这里是空的,快去逛逛吧~</p>\n <Link to='/classify'>去逛逛</Link>\n </div>\n }\n </div>\n </div>\n )\n }\n}\n\nexport default cartList;","import React, {Component} from 'react'\nimport {connect} from 'react-redux'\nimport {Checkbox, Modal, Toast} from 'antd-mobile'\nimport {HeaderBar} from '../../common'\nimport Loading from '@/common/Loading'\nimport ShopCart from './cartList.js'\nimport './card.scss'\nimport classnames from 'classnames'\nimport {api, http} from \"@/utils\";\n\nconst alert = Modal.alert;\n\nclass Cart extends Component {\n constructor(props) {\n super(props)\n this.state = {\n data: [],\n checkedNum: 0,\n allPrice: 0,\n cartNmu: 0,\n courseIdarr: [], // 选中的课程id\n isLoading: true\n }\n\n }\n\n\n componentDidMount() {\n this.getList()\n }\n\n // 获取课程列表\n getList = () => {\n http.get(`${API.home}/m/cart/list`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n data: res.data.data.courses,\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n\n //全选\n allChange(e) {\n let checked = e.target.checked\n let newData = this.state.data.map((item, i) => {\n return {\n ...item,\n check: checked\n }\n })\n this.setState({\n data: newData\n })\n this.calc(newData)\n\n if (checked) {\n let arr = []\n newData.map((item, i) => {\n arr.push(item.course_id)\n })\n this.setState({\n courseIdarr: arr\n })\n\n } else {\n this.setState({\n courseIdarr: []\n })\n }\n\n }\n\n //点击\n checkChange(id, check) {\n let newData = this.state.data.map((item, i) => {\n if (item.course_id === id) {\n return {\n ...item,\n check: check\n }\n } else {\n return item;\n }\n })\n this.setState({\n data: newData\n })\n this.calc(newData)\n let arr = []\n newData.forEach((item, i) => {\n if (item.check) {\n arr.push(item.course_id)\n this.setState({\n courseIdarr: arr\n })\n } else {\n this.setState({\n courseIdarr: arr\n })\n }\n })\n }\n\n //计算总价\n calc(newData) {\n let allPrice = 0;\n let checkedNum = 0;\n let cartNmu = 0;\n let arr = []\n newData.forEach((item, i) => {\n if (item.check) {\n arr.push(item)\n cartNmu += 1;\n checkedNum = arr.length;\n allPrice += parseFloat(item.price1);\n }\n })\n this.setState({\n checkedNum,\n allPrice,\n cartNmu\n })\n }\n\n // 去结算\n tobuy = () => {\n console.log(this.state.courseIdarr);\n http.get(`${API['base-api']}/m/cart/addtopreorder/[${this.state.courseIdarr}]`).then((res) => {\n if (res.data.errno == 0) {\n this.props.history.push(`/order?id=[${this.state.courseIdarr}]`)\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n\n\n // 删除\n todelete = () => {\n if (this.state.courseIdarr.length > 0) {\n alert('', '确定从购物车中删除?', [\n {text: '取消', onPress: () => console.log('cancel')},\n {\n text: '确认',\n onPress: () => {\n let data = {\n course_ids: this.state.courseIdarr\n }\n http.post(`${API.home}/m/cart/remove`, data).then((res) => {\n if (res.data.code === 200) {\n this.getList()\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n }\n ])\n }\n\n }\n\n\n render() {\n return (\n <div className=\"cart-page\" style={{overflow: 'hidden'}}>\n <HeaderBar title='购物车' arrow={true} cart={false} delete={true} toDelete={this.todelete}></HeaderBar>\n\n <Loading isLoading={this.state.isLoading}>\n <div className=\"cart-body\">\n <ShopCart checkChange={this.checkChange.bind(this)} data={this.state.data}/>\n\n <div className=\"cart-footer\">\n <div className=\"cart-label\">\n <Checkbox onChange={(e) => {\n this.allChange(e)\n }}/>\n <div>全选</div>\n </div>\n <div className=\"all-pirce\">\n <p>\n <span>合计:</span>\n <span>¥{this.state.allPrice}</span>\n </p>\n </div>\n <div className={classnames({\n 'active': this.state.checkedNum > 0\n })} onClick={() => {\n if (this.state.checkedNum > 0) {\n this.tobuy()\n }\n }}>\n 结算<span> ( {this.state.checkedNum} ) </span>\n </div>\n </div>\n\n </div>\n </Loading>\n\n\n </div>\n )\n }\n}\n\nexport default connect()(Cart)"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{1169:function(e,t,a){"use strict";a.r(t);var n=a(25),o=(a(44),a(14)),c=a.n(o),s=a(115),i=a(7),r=a(8),l=a(11),u=a(9),p=a(10),d=a(0),m=a.n(d),h=(a(772),a(773),a(774),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=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(C,{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),b=(a(775),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)),y=a(4),E=a(70),j=a(40),O=a(33),_=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(y.b)("id"),showUseButton:!1},a.handleChange=function(e){var t=e?e.target.value:"";a.setState({redeemCode:t})},a.exchange=function(){""!==a.state.redeemCode?y.c.post("".concat(API.home,"/m/coupon/exchange"),{code:a.state.redeemCode}).then(function(e){var t=e.data;if(200===t.code){var n=t.data;if(a.state.showUseButton)a.setState({couponList:[].concat(Object(s.a)(a.state.couponList),[n]),redeemCode:""});else{var o=t.data;2==o.ctype&&o.limit_course!=a.state.courseId?a.setState({invalid_coupons:[].concat(Object(s.a)(a.state.invalid_coupons),[o]),showUseButton:null}):a.setState({valid_coupons:[].concat(Object(s.a)(a.state.valid_coupons),[o]),redeemCode:""})}c.a.info("\u5151\u6362\u6210\u529f"),a.getMyCoupons()}else c.a.info(t.msg)}):c.a.info("\u8bf7\u8f93\u5165\u5151\u6362\u7801")},a.getMyCoupons=function(){y.c.get("".concat(API.home,"/m/coupon/all")).then(function(e){var t=e.data;200===t.code?a.setState({couponList:Object(j.isEmpty)(t.data)?[]:t.data}):c.a.info(t.msg)})},a.getAllCoupons=function(){y.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.history,n=a.state.couponList.find(function(t){return t.id===e});if(e)if(a.state.showUseButton)1===n.ctype?t.push("/classify"):t.push("/detail?id=".concat(n.limit_course));else{var o=a.state,s=o.courseId;o.selectedCouponId===e?y.c.post("".concat(API.home,"/m/coupon/cancel"),{course_id:s}).then(function(e){var t=e.data;200===t.code?a.setState({selectedCouponId:0}):c.a.info(t.msg)}):y.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(O.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(I,{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(I,{coupons:this.state.invalid_coupons,selectedCouponId:n,select:this.select,purpose:"use",invalid:"invalid"}))))}}]),t}(d.PureComponent);function I(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(b,Object.assign({key:e.id},e,{id:e.id},a))}))}t.default=Object(E.a)(_)},772:function(e,t,a){},773:function(e,t,a){},774:function(e,t,a){},775:function(e,t,a){}}]);
//# sourceMappingURL=coupons.ed17ab53.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{1169:function(e,t,a){"use strict";a.r(t);var n=a(25),o=(a(44),a(14)),c=a.n(o),s=a(115),i=a(7),r=a(8),l=a(11),u=a(9),p=a(10),d=a(0),m=a.n(d),h=(a(772),a(773),a(774),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=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(C,{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),b=(a(775),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)),y=a(4),E=a(70),j=a(40),O=a(30),_=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(y.b)("id"),showUseButton:!1},a.handleChange=function(e){var t=e?e.target.value:"";a.setState({redeemCode:t})},a.exchange=function(){""!==a.state.redeemCode?y.c.post("".concat(API.home,"/m/coupon/exchange"),{code:a.state.redeemCode}).then(function(e){var t=e.data;if(200===t.code){var n=t.data;if(a.state.showUseButton)a.setState({couponList:[].concat(Object(s.a)(a.state.couponList),[n]),redeemCode:""});else{var o=t.data;2==o.ctype&&o.limit_course!=a.state.courseId?a.setState({invalid_coupons:[].concat(Object(s.a)(a.state.invalid_coupons),[o]),showUseButton:null}):a.setState({valid_coupons:[].concat(Object(s.a)(a.state.valid_coupons),[o]),redeemCode:""})}c.a.info("\u5151\u6362\u6210\u529f"),a.getMyCoupons()}else c.a.info(t.msg)}):c.a.info("\u8bf7\u8f93\u5165\u5151\u6362\u7801")},a.getMyCoupons=function(){y.c.get("".concat(API.home,"/m/coupon/all")).then(function(e){var t=e.data;200===t.code?a.setState({couponList:Object(j.isEmpty)(t.data)?[]:t.data}):c.a.info(t.msg)})},a.getAllCoupons=function(){y.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.history,n=a.state.couponList.find(function(t){return t.id===e});if(e)if(a.state.showUseButton)1===n.ctype?t.push("/classify"):t.push("/detail?id=".concat(n.limit_course));else{var o=a.state,s=o.courseId;o.selectedCouponId===e?y.c.post("".concat(API.home,"/m/coupon/cancel"),{course_id:s}).then(function(e){var t=e.data;200===t.code?a.setState({selectedCouponId:0}):c.a.info(t.msg)}):y.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(O.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(I,{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(I,{coupons:this.state.invalid_coupons,selectedCouponId:n,select:this.select,purpose:"use",invalid:"invalid"}))))}}]),t}(d.PureComponent);function I(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(b,Object.assign({key:e.id},e,{id:e.id},a))}))}t.default=Object(E.a)(_)},772:function(e,t,a){},773:function(e,t,a){},774:function(e,t,a){},775:function(e,t,a){}}]);
//# sourceMappingURL=coupons.0ff2580f.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/coupons/Input/index.js","components/coupons/RedeemBar/index.js","components/coupons/Coupon/index.js","components/coupons/index.js"],"names":["Input","clearInput","_this","props","onChange","_this$props","this","type","placeholder","react_default","a","createElement","className","classnames","value","hide","length","onClick","Component","defaultProps","RedeemBar","state","redeemCode","exchange","coupons_Input","active","Coupon","pick","useCoupon","invalid","id","GoToUse","_this$props2","ctype","amount","format_expire_time","limit_course","course_title","selectedCouponId","showUseButton","concat","check","Array","fill","map","item","index","key","PureComponent","UseCoupon","couponList","valid_coupons","invalid_coupons","courseId","getParam","handleChange","e","target","setState","http","post","API","home","code","then","res","data","coupon","Object","toConsumableArray","toast_default","info","getMyCoupons","msg","get","isEmpty","getAllCoupons","course_id","inuse_coupon","val","history","find","push","_this$state","coupon_id","goBack","location","reload","from","replace","_this$state2","common","title","arrow","coupons_RedeemBar","Content","coupons","select","Fragment","purpose","_ref","rest","objectWithoutProperties","coupons_Coupon","assign","WithFullSize"],"mappings":"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TtE,QAAS,sBA9NrBmB,iBAyOxB,SAAS+C,EAATK,GAAqC,IAAnBJ,EAAmBI,EAAnBJ,QAAYK,EAAOjC,OAAAkC,EAAA,EAAAlC,CAAAgC,EAAA,aACjC,OAAuB,IAAnBJ,EAAQhF,OAEJP,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SACXH,EAAAC,EAAAC,cAAA,oEAKRF,EAAAC,EAAAC,cAAA,UAEQqF,EAAQpD,IAAI,SAAAC,GACR,OACIpC,EAAAC,EAAAC,cAAC4F,EAADnC,OAAAoC,OAAA,CACIzD,IAAKF,EAAKf,IACNe,EAFR,CAGIf,GAAIe,EAAKf,IACLuE,OASjBI,sBAAaxD","file":"static/js/coupons.ed17ab53.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport './input.scss'\n\nimport classnames from 'classnames'\n\nclass Input extends Component {\n clearInput = () => {\n this.props.onChange('')\n }\n\n render() {\n let {type, placeholder} = this.props\n return (\n <div className='custom-input-wrapper'>\n <input\n type={type}\n className={classnames('custom-input')}\n placeholder={placeholder}\n onChange={this.props.onChange}\n value={this.props.value}\n />\n <i\n className={classnames('iconfont icondanseshixintubiao-3', {\n hide: this.props.value.length === 0\n })}\n onClick={this.clearInput}\n />\n </div>\n );\n }\n}\n\n\nInput.defaultProps = {type: 'text', placeholder: ''}\n\nexport default Input;","import React, { Component } from 'react';\nimport './exchange-bar.scss'\nimport Input from '../Input'\nimport classnames from 'classnames'\n\nclass RedeemBar extends Component {\n state = {}\n\n render() {\n const {onChange, redeemCode, exchange} = this.props\n return (\n <div className=\"exchange-bar\">\n <Input\n placeholder={'请输入优惠码'}\n onChange={onChange}\n value={redeemCode}\n />\n <button className={classnames({\n active: redeemCode && redeemCode.length > 0\n })} onClick={exchange}>兑换\n </button>\n </div>\n );\n }\n}\n\nexport default RedeemBar;","import React, { PureComponent } from 'react'\nimport './coupon.scss'\nimport classnames from 'classnames'\n\nclass Coupon extends PureComponent {\n\n pick = () => {\n let {useCoupon, invalid} = this.props\n !invalid && useCoupon && useCoupon(this.props.id)\n }\n\n GoToUse = () => {\n this.props.useCoupon(this.props.id)\n }\n\n render() {\n let {\n ctype,\n amount,\n format_expire_time,\n limit_course,\n invalid,\n course_title,\n id,\n selectedCouponId,\n showUseButton\n } = this.props\n\n return (\n <li className='coupon' onClick={this.pick}>\n <div className={classnames('coupon-info', invalid ? 'invalid' : `coupon-type${ctype}`)}>\n <p className='type'>{ctype === 1 ? '代金券' : '课程券'}</p>\n {\n ctype === 1 ? <p className='denomination'>{amount} <span>元</span></p>\n : <p className='course-title'>{course_title}</p>\n\n }\n <p className='expire'>有效期至:{format_expire_time}</p>\n {\n selectedCouponId === id &&\n <i className={classnames('iconfont icondanseshixintubiao-5', {\n check: !invalid\n })}\n />\n }\n <ul>\n {\n new Array(19).fill('a').map((item, index) => {\n return <li key={index}/>\n })\n }\n </ul>\n </div>\n <div className=\"coupon-des\">\n <span className='limit'>{\n limit_course === 0 ? '可用于大于代金券金额的课程' : `仅适用于《${course_title}》`\n }</span>\n {\n showUseButton &&\n <button\n className='use'\n onClick={this.GoToUse}\n >立即使用\n </button>\n }\n\n </div>\n </li>\n );\n }\n}\n\nexport default Coupon","import React, { PureComponent } from 'react';\nimport './coupons.scss'\n\nimport RedeemBar from \"./RedeemBar\";\nimport Coupon from './Coupon'\nimport { http, api, getParam } from '@/utils'\nimport { WithFullSize } from '@/HOCs'\nimport { Toast } from 'antd-mobile'\nimport { isEmpty } from 'lodash'\nimport { HeaderBar } from \"@/common\";\n\n\nclass UseCoupon extends PureComponent {\n\n state = {\n selectedCouponId: 0,\n redeemCode: '',\n couponList: [],\n valid_coupons: [],\n invalid_coupons: [],\n courseId: getParam('id'),\n showUseButton: false\n }\n\n componentDidMount() {\n\n const {history, location} = this.props\n\n const {state} = this.props.location\n\n\n if (state && state.from) {\n if (state.from === '/my') {\n this.getMyCoupons();\n this.setState({\n showUseButton: true\n })\n } else {\n if (!this.state.courseId) {\n location.state && location.state.from ? history.replace(location.state.from) : history.goBack()\n }\n this.getAllCoupons();\n }\n }\n }\n\n handleChange = e => {\n let value = e ? e.target.value : ''\n this.setState({redeemCode: value})\n }\n\n exchange = () => {\n if (this.state.redeemCode !== '') {\n http.post(`${API.home}/m/coupon/exchange`, {\n code: this.state.redeemCode\n })\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n const coupon = data.data\n\n if (this.state.showUseButton) {\n this.setState({\n couponList: [...this.state.couponList, coupon],\n redeemCode: ''\n })\n } else {\n\n const coupon = data.data\n\n if (coupon['ctype'] == 2\n && coupon['limit_course'] != this.state.courseId) {\n this.setState({\n invalid_coupons: [...this.state.invalid_coupons, coupon],\n showUseButton: null\n });\n } else {\n this.setState({\n valid_coupons: [...this.state.valid_coupons, coupon],\n redeemCode: ''\n })\n }\n\n }\n Toast.info('兑换成功')\n this.getMyCoupons()\n } else {\n Toast.info(data.msg)\n }\n })\n } else {\n Toast.info('请输入兑换码')\n }\n }\n\n getMyCoupons = () => {\n http.get(`${API.home}/m/coupon/all`)\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n this.setState({\n couponList: isEmpty(data.data) ? [] : data.data\n })\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n getAllCoupons = () => {\n http.post(`${API.home}/m/coupon/select`, {course_id: this.state.courseId})\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n const inuse_coupon = data.data['inuse_coupon'];\n\n\n this.setState({\n valid_coupons: inuse_coupon\n ? [...inuse_coupon, ...data.data.valid_coupons]\n : data.data.valid_coupons,\n invalid_coupons: data.data.invalid_coupons,\n selectedCouponId: inuse_coupon.length ? inuse_coupon[0].id : 0\n })\n\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n useCoupon = val => {\n const {history} = this.props\n const coupon = this.state.couponList.find(item => item.id === val)\n\n if (val) {\n if (this.state.showUseButton) {\n\n if (coupon['ctype'] === 1) {\n history.push(`/classify`)\n } else {\n history.push(`/detail?id=${coupon['limit_course']}`)\n }\n\n } else {\n\n const {courseId, selectedCouponId} = this.state\n\n if (selectedCouponId === val) {\n\n\n http.post(`${API.home}/m/coupon/cancel`, {\n course_id: courseId\n }).then(res => {\n const data = res.data\n if (data.code === 200) {\n\n\n this.setState({\n selectedCouponId: 0\n })\n\n\n } else {\n Toast.info(data.msg)\n }\n })\n\n\n } else {\n http.post(`${API.home}/m/coupon/use`, {\n course_id: this.state.courseId,\n coupon_id: val\n })\n .then(res => {\n const data = res && res.data\n if (data.code === 200) {\n\n this.setState({selectedCouponId: val})\n this.props.history.goBack()\n\n\n } else {\n Toast.info(data.msg)\n }\n })\n\n }\n\n\n }\n\n } else {\n Toast.info('未知错误')\n location.reload()\n }\n\n }\n\n render() {\n const {state} = this.props.location\n const {showUseButton, selectedCouponId} = this.state\n return (\n <div className='use-coupon'>\n <HeaderBar title='优惠券' arrow={true}/>\n <RedeemBar onChange={this.handleChange}\n exchange={this.exchange}\n redeemCode={this.state.redeemCode}/>\n <div className=\"coupons-area\">\n <Content\n coupons={\n state\n && state.from\n && state.from === '/my'\n ? this.state.couponList\n : this.state.valid_coupons\n }\n showUseButton={showUseButton}\n selectedCouponId={selectedCouponId}\n select={this.select}\n useCoupon={this.useCoupon}\n />\n {\n this.state.invalid_coupons.length > 0 &&\n (\n <>\n <div className='invalid-title'>- 不可使用的优惠券 -</div>\n <Content\n coupons={this.state.invalid_coupons}\n selectedCouponId={selectedCouponId}\n select={this.select}\n purpose={'use'}\n invalid={'invalid'}\n />\n </>\n )\n }\n </div>\n </div>\n );\n }\n}\n\nfunction Content({coupons, ...rest}) {\n if (coupons.length === 0) {\n return (\n <div className='empty'>\n <p>暂无可使用的优惠券</p>\n </div>\n )\n }\n return (\n <ul>\n {\n coupons.map(item => {\n return (\n <Coupon\n key={item.id}\n {...item}\n id={item.id}\n {...rest}\n />\n )\n })\n }\n </ul>\n )\n}\n\nexport default WithFullSize(UseCoupon);"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/coupons/Input/index.js","components/coupons/RedeemBar/index.js","components/coupons/Coupon/index.js","components/coupons/index.js"],"names":["Input","clearInput","_this","props","onChange","_this$props","this","type","placeholder","react_default","a","createElement","className","classnames","value","hide","length","onClick","Component","defaultProps","RedeemBar","state","redeemCode","exchange","coupons_Input","active","Coupon","pick","useCoupon","invalid","id","GoToUse","_this$props2","ctype","amount","format_expire_time","limit_course","course_title","selectedCouponId","showUseButton","concat","check","Array","fill","map","item","index","key","PureComponent","UseCoupon","couponList","valid_coupons","invalid_coupons","courseId","getParam","handleChange","e","target","setState","http","post","API","home","code","then","res","data","coupon","Object","toConsumableArray","toast_default","info","getMyCoupons","msg","get","isEmpty","getAllCoupons","course_id","inuse_coupon","val","history","find","push","_this$state","coupon_id","goBack","location","reload","from","replace","_this$state2","common","title","arrow","coupons_RedeemBar","Content","coupons","select","Fragment","purpose","_ref","rest","objectWithoutProperties","coupons_Coupon","assign","WithFullSize"],"mappings":"8OAKMA,6MACFC,WAAa,WACTC,EAAKC,MAAMC,SAAS,6EAGf,IAAAC,EACqBC,KAAKH,MAA1BI,EADAF,EACAE,KAAMC,EADNH,EACMG,YACX,OACIC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,wBACXH,EAAAC,EAAAC,cAAA,SACIJ,KAAMA,EACNK,UAAWC,IAAW,gBACtBL,YAAaA,EACbJ,SAAUE,KAAKH,MAAMC,SACrBU,MAAOR,KAAKH,MAAMW,QAEtBL,EAAAC,EAAAC,cAAA,KACIC,UAAWC,IAAW,mCAAoC,CACtDE,KAAkC,IAA5BT,KAAKH,MAAMW,MAAME,SAE3BC,QAASX,KAAKL,qBApBdiB,aA4BpBlB,EAAMmB,aAAe,CAACZ,KAAM,OAAQC,YAAa,IAElCR,QCTAoB,6MApBXC,MAAQ,2EAEC,IAAAhB,EACoCC,KAAKH,MAAvCC,EADFC,EACED,SAAUkB,EADZjB,EACYiB,WAAYC,EADxBlB,EACwBkB,SAC7B,OACId,EAAAC,EAAAC,cAAA,OAAKC,UAAU,gBACXH,EAAAC,EAAAC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jB,KAAKiB,SACfD,WAAYhB,KAAKe,MAAMC,aAClCb,EAAAC,EAAAC,cAAA,OAAKC,UAAU,gBACXH,EAAAC,EAAAC,cAACoF,EAAD,CACIC,QACI3E,GACGA,EAAMmE,MACS,QAAfnE,EAAMmE,KACHlF,KAAKe,MAAM6B,WACX5C,KAAKe,MAAM8B,cAErBZ,cAAeA,EACfD,iBAAkBA,EAClB2D,OAAQ3F,KAAK2F,OACbrE,UAAWtB,KAAKsB,YAGhBtB,KAAKe,MAAM+B,gBAAgBpC,OAAS,GAEhCP,EAAAC,EAAAC,cAAAF,EAAAC,EAAAwF,SAAA,KACIzF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,iBAAf,wDACAH,EAAAC,EAAAC,cAACoF,EAAD,CACIC,QAAS1F,KAAKe,MAAM+B,gBACpBd,iBAAkBA,EAClB2D,OAAQ3F,KAAK2F,OACbE,QAAS,MACTtE,QAAS,sBA9NrBmB,iBAyOxB,SAAS+C,EAATK,GAAqC,IAAnBJ,EAAmBI,EAAnBJ,QAAYK,EAAOjC,OAAAkC,EAAA,EAAAlC,CAAAgC,EAAA,aACjC,OAAuB,IAAnBJ,EAAQhF,OAEJP,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SACXH,EAAAC,EAAAC,cAAA,oEAKRF,EAAAC,EAAAC,cAAA,UAEQqF,EAAQpD,IAAI,SAAAC,GACR,OACIpC,EAAAC,EAAAC,cAAC4F,EAADnC,OAAAoC,OAAA,CACIzD,IAAKF,EAAKf,IACNe,EAFR,CAGIf,GAAIe,EAAKf,IACLuE,OASjBI,sBAAaxD","file":"static/js/coupons.0ff2580f.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport './input.scss'\n\nimport classnames from 'classnames'\n\nclass Input extends Component {\n clearInput = () => {\n this.props.onChange('')\n }\n\n render() {\n let {type, placeholder} = this.props\n return (\n <div className='custom-input-wrapper'>\n <input\n type={type}\n className={classnames('custom-input')}\n placeholder={placeholder}\n onChange={this.props.onChange}\n value={this.props.value}\n />\n <i\n className={classnames('iconfont icondanseshixintubiao-3', {\n hide: this.props.value.length === 0\n })}\n onClick={this.clearInput}\n />\n </div>\n );\n }\n}\n\n\nInput.defaultProps = {type: 'text', placeholder: ''}\n\nexport default Input;","import React, { Component } from 'react';\nimport './exchange-bar.scss'\nimport Input from '../Input'\nimport classnames from 'classnames'\n\nclass RedeemBar extends Component {\n state = {}\n\n render() {\n const {onChange, redeemCode, exchange} = this.props\n return (\n <div className=\"exchange-bar\">\n <Input\n placeholder={'请输入优惠码'}\n onChange={onChange}\n value={redeemCode}\n />\n <button className={classnames({\n active: redeemCode && redeemCode.length > 0\n })} onClick={exchange}>兑换\n </button>\n </div>\n );\n }\n}\n\nexport default RedeemBar;","import React, { PureComponent } from 'react'\nimport './coupon.scss'\nimport classnames from 'classnames'\n\nclass Coupon extends PureComponent {\n\n pick = () => {\n let {useCoupon, invalid} = this.props\n !invalid && useCoupon && useCoupon(this.props.id)\n }\n\n GoToUse = () => {\n this.props.useCoupon(this.props.id)\n }\n\n render() {\n let {\n ctype,\n amount,\n format_expire_time,\n limit_course,\n invalid,\n course_title,\n id,\n selectedCouponId,\n showUseButton\n } = this.props\n\n return (\n <li className='coupon' onClick={this.pick}>\n <div className={classnames('coupon-info', invalid ? 'invalid' : `coupon-type${ctype}`)}>\n <p className='type'>{ctype === 1 ? '代金券' : '课程券'}</p>\n {\n ctype === 1 ? <p className='denomination'>{amount} <span>元</span></p>\n : <p className='course-title'>{course_title}</p>\n\n }\n <p className='expire'>有效期至:{format_expire_time}</p>\n {\n selectedCouponId === id &&\n <i className={classnames('iconfont icondanseshixintubiao-5', {\n check: !invalid\n })}\n />\n }\n <ul>\n {\n new Array(19).fill('a').map((item, index) => {\n return <li key={index}/>\n })\n }\n </ul>\n </div>\n <div className=\"coupon-des\">\n <span className='limit'>{\n limit_course === 0 ? '可用于大于代金券金额的课程' : `仅适用于《${course_title}》`\n }</span>\n {\n showUseButton &&\n <button\n className='use'\n onClick={this.GoToUse}\n >立即使用\n </button>\n }\n\n </div>\n </li>\n );\n }\n}\n\nexport default Coupon","import React, { PureComponent } from 'react';\nimport './coupons.scss'\n\nimport RedeemBar from \"./RedeemBar\";\nimport Coupon from './Coupon'\nimport { http, api, getParam } from '@/utils'\nimport { WithFullSize } from '@/HOCs'\nimport { Toast } from 'antd-mobile'\nimport { isEmpty } from 'lodash'\nimport { HeaderBar } from \"@/common\";\n\n\nclass UseCoupon extends PureComponent {\n\n state = {\n selectedCouponId: 0,\n redeemCode: '',\n couponList: [],\n valid_coupons: [],\n invalid_coupons: [],\n courseId: getParam('id'),\n showUseButton: false\n }\n\n componentDidMount() {\n\n const {history, location} = this.props\n\n const {state} = this.props.location\n\n\n if (state && state.from) {\n if (state.from === '/my') {\n this.getMyCoupons();\n this.setState({\n showUseButton: true\n })\n } else {\n if (!this.state.courseId) {\n location.state && location.state.from ? history.replace(location.state.from) : history.goBack()\n }\n this.getAllCoupons();\n }\n }\n }\n\n handleChange = e => {\n let value = e ? e.target.value : ''\n this.setState({redeemCode: value})\n }\n\n exchange = () => {\n if (this.state.redeemCode !== '') {\n http.post(`${API.home}/m/coupon/exchange`, {\n code: this.state.redeemCode\n })\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n const coupon = data.data\n\n if (this.state.showUseButton) {\n this.setState({\n couponList: [...this.state.couponList, coupon],\n redeemCode: ''\n })\n } else {\n\n const coupon = data.data\n\n if (coupon['ctype'] == 2\n && coupon['limit_course'] != this.state.courseId) {\n this.setState({\n invalid_coupons: [...this.state.invalid_coupons, coupon],\n showUseButton: null\n });\n } else {\n this.setState({\n valid_coupons: [...this.state.valid_coupons, coupon],\n redeemCode: ''\n })\n }\n\n }\n Toast.info('兑换成功')\n this.getMyCoupons()\n } else {\n Toast.info(data.msg)\n }\n })\n } else {\n Toast.info('请输入兑换码')\n }\n }\n\n getMyCoupons = () => {\n http.get(`${API.home}/m/coupon/all`)\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n this.setState({\n couponList: isEmpty(data.data) ? [] : data.data\n })\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n getAllCoupons = () => {\n http.post(`${API.home}/m/coupon/select`, {course_id: this.state.courseId})\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n const inuse_coupon = data.data['inuse_coupon'];\n\n\n this.setState({\n valid_coupons: inuse_coupon\n ? [...inuse_coupon, ...data.data.valid_coupons]\n : data.data.valid_coupons,\n invalid_coupons: data.data.invalid_coupons,\n selectedCouponId: inuse_coupon.length ? inuse_coupon[0].id : 0\n })\n\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n useCoupon = val => {\n const {history} = this.props\n const coupon = this.state.couponList.find(item => item.id === val)\n\n if (val) {\n if (this.state.showUseButton) {\n\n if (coupon['ctype'] === 1) {\n history.push(`/classify`)\n } else {\n history.push(`/detail?id=${coupon['limit_course']}`)\n }\n\n } else {\n\n const {courseId, selectedCouponId} = this.state\n\n if (selectedCouponId === val) {\n\n\n http.post(`${API.home}/m/coupon/cancel`, {\n course_id: courseId\n }).then(res => {\n const data = res.data\n if (data.code === 200) {\n\n\n this.setState({\n selectedCouponId: 0\n })\n\n\n } else {\n Toast.info(data.msg)\n }\n })\n\n\n } else {\n http.post(`${API.home}/m/coupon/use`, {\n course_id: this.state.courseId,\n coupon_id: val\n })\n .then(res => {\n const data = res && res.data\n if (data.code === 200) {\n\n this.setState({selectedCouponId: val})\n this.props.history.goBack()\n\n\n } else {\n Toast.info(data.msg)\n }\n })\n\n }\n\n\n }\n\n } else {\n Toast.info('未知错误')\n location.reload()\n }\n\n }\n\n render() {\n const {state} = this.props.location\n const {showUseButton, selectedCouponId} = this.state\n return (\n <div className='use-coupon'>\n <HeaderBar title='优惠券' arrow={true}/>\n <RedeemBar onChange={this.handleChange}\n exchange={this.exchange}\n redeemCode={this.state.redeemCode}/>\n <div className=\"coupons-area\">\n <Content\n coupons={\n state\n && state.from\n && state.from === '/my'\n ? this.state.couponList\n : this.state.valid_coupons\n }\n showUseButton={showUseButton}\n selectedCouponId={selectedCouponId}\n select={this.select}\n useCoupon={this.useCoupon}\n />\n {\n this.state.invalid_coupons.length > 0 &&\n (\n <>\n <div className='invalid-title'>- 不可使用的优惠券 -</div>\n <Content\n coupons={this.state.invalid_coupons}\n selectedCouponId={selectedCouponId}\n select={this.select}\n purpose={'use'}\n invalid={'invalid'}\n />\n </>\n )\n }\n </div>\n </div>\n );\n }\n}\n\nfunction Content({coupons, ...rest}) {\n if (coupons.length === 0) {\n return (\n <div className='empty'>\n <p>暂无可使用的优惠券</p>\n </div>\n )\n }\n return (\n <ul>\n {\n coupons.map(item => {\n return (\n <Coupon\n key={item.id}\n {...item}\n id={item.id}\n {...rest}\n />\n )\n })\n }\n </ul>\n )\n}\n\nexport default WithFullSize(UseCoupon);"],"sourceRoot":""}
\ 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([[16],{1153:function(e,t,n){"use strict";n.r(t);n(44);var a=n(14),o=n.n(a),r=n(7),s=n(8),i=n(11),l=n(9),c=n(10),u=(n(253),n(98)),p=n.n(u),d=n(0),m=n.n(d),h=(n(881),n(33)),f=n(155),v=n(4),g=n(16),b=n(63),y=n(643),E=n.n(y),L=n(40),w=p.a.alert,_=function(e){function t(e){var n;return Object(r.a)(this,t),(n=Object(i.a)(this,Object(l.a)(t).call(this,e))).page=1,n.getMore=Object(L.debounce)(function(){n.state.data.length%10===0&&n.getList(++n.page)},200),n.getList=function(){v.c.get("".concat(API.home,"/m/my/orders/").concat(n.page,"/10")).then(function(e){200===e.data.code?n.setState({data:n.state.data.concat(e.data.data),isLoading:!1}):o.a.info(e.data.msg,2)})},n.cancel=function(e){w("\u786e\u8ba4\u53d6\u6d88\u8ba2\u5355\uff1f","\u8ba2\u5355\u53d6\u6d88\u540e\uff0c\u4f18\u60e0\u5238\u548c\u62b5\u6263\u7684\u4f59\u989d\u4f1a\u8fd4\u56de\u5230\u60a8\u7684\u8d26\u6237\u3002",[{text:"\u53d6\u6d88",onPress:function(){return console.log("cancel")}},{text:"\u786e\u8ba4",onPress:function(){var t={order_id:e};v.c.post("".concat(API.home,"/m/cancel_order"),t).then(function(e){200===e.data.code?location.reload():o.a.info(e.data.msg,2)})}}])},n.state={data:[],pageNum:1,isLoading:!0,total:0},n}return Object(c.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.getList(this.page)}},{key:"render",value:function(){var e=this;return m.a.createElement("div",{className:"myorders-box"},m.a.createElement(h.e,{title:"\u6211\u7684\u8ba2\u5355",arrow:!0,cart:!1}),m.a.createElement(b.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?m.a.createElement(E.a,{pageStart:0,hasMore:!0,loadMore:this.getMore.bind(this),useWindow:!0},this.state.data.map(function(t,n){return m.a.createElement("div",{className:"order-body",key:n},m.a.createElement(P,{item:t}),t.course&&t.course.length>0&&t.course.map(function(e,t){var n=m.a.createElement("div",{className:"order-info"},m.a.createElement("p",{className:"order-title text-overflow-one"},m.a.createElement(g.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),m.a.createElement("p",{className:"order-content text-overflow-2"},e.description),m.a.createElement("p",{className:"order-des"},m.a.createElement("span",{className:"order-newprice"},"\xa5",e.pay_amount),m.a.createElement("span",{className:"order-price"},"\xa5",e.price0)));return m.a.createElement("div",{className:"order-wrap",key:t},m.a.createElement(f.a,{info:n,src:e.image_name,isSign:e.is_aist,id:e.course_id}))}),m.a.createElement(N,{item:t,cancel:e.cancel}))})," "):m.a.createElement("div",{className:"cart-tip"},m.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8ba2\u5355\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),m.a.createElement(g.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(d.Component);function P(e){var t;return t="0"===e.item.pay_time&&0===e.item.member_num?m.a.createElement("span",{className:"oid-status"},"\u7b49\u5f85\u652f\u4ed8"):e.item.pdd_info&&e.item.member_num===e.item.pdd_info.length&&0!==e.item.member_num?m.a.createElement("span",{className:"oid-success"},"\u62fc\u56e2\u6210\u529f"):m.a.createElement("span",{className:"oid-success"},"\u652f\u4ed8\u6210\u529f"),m.a.createElement("div",{className:"order-head"},m.a.createElement("span",{className:"oid-num"},"\u8ba2\u5355\u53f7\uff1a",e.item.oid),t)}function N(e){return m.a.createElement("div",{className:"order-btm"},m.a.createElement("div",{className:"price-info"},m.a.createElement("p",null,m.a.createElement("span",{className:"payable"},"\u5e94\u4ed8\uff1a"),m.a.createElement("span",{className:"price"},"\xa5",e.item.pay_amount)),m.a.createElement("p",null,m.a.createElement("span",{className:"payable"},"\u5df2\u4f18\u60e0\uff1a"),m.a.createElement("span",{className:"price"},"\xa5",e.item.coupon_amount))),"0"===e.item.pay_time&&0===e.item.member_num&&m.a.createElement("div",{className:"btm-right"},m.a.createElement("button",{className:"cancel",onClick:function(t){return e.cancel(e.item.oid)}},"\u53d6\u6d88\u8ba2\u5355"),m.a.createElement(g.b,{to:"/payorder?oid=".concat(e.item.oid)},"\u53bb\u652f\u4ed8")),0!==e.item.member_num&&m.a.createElement("div",{className:"btm-right"},m.a.createElement("div",{className:"group"},e.item.pdd_info&&e.item.pdd_info.length>0&&e.item.pdd_info.map(function(e,t){return m.a.createElement("img",{src:""===e.user_avatar?"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-spreadtrain8/ellipsis.png":e.user_avatar,key:t,alt:""})}))))}t.default=_},643:function(e,t,n){e.exports=n(644)},644:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=n(0),r=i(o),s=i(n(2));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.Component),a(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(n){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),a=void 0;if(this.props.useWindow){var o=document.documentElement||document.body.parentNode||document.body,r=void 0!==t.pageYOffset?t.pageYOffset:o.scrollTop;a=this.props.isReverse?r:this.calculateOffset(e,r)}else a=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;a<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"===typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,a=t.element,o=t.hasMore,s=(t.initialLoad,t.isReverse),i=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return o&&(i?s?u.unshift(i):u.push(i):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),r.default.createElement(a,c,u)}}]),t}();l.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},881:function(e,t,n){}}]);
//# sourceMappingURL=myorders.a16d3d05.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{1153:function(e,t,n){"use strict";n.r(t);n(44);var a=n(14),o=n.n(a),r=n(7),s=n(8),i=n(11),l=n(9),c=n(10),u=(n(253),n(98)),p=n.n(u),d=n(0),m=n.n(d),h=(n(881),n(30)),f=n(155),v=n(4),g=n(16),b=n(63),y=n(643),E=n.n(y),L=n(40),w=p.a.alert,_=function(e){function t(e){var n;return Object(r.a)(this,t),(n=Object(i.a)(this,Object(l.a)(t).call(this,e))).page=1,n.getMore=Object(L.debounce)(function(){n.state.data.length%10===0&&n.getList(++n.page)},200),n.getList=function(){v.c.get("".concat(API.home,"/m/my/orders/").concat(n.page,"/10")).then(function(e){200===e.data.code?n.setState({data:n.state.data.concat(e.data.data),isLoading:!1}):o.a.info(e.data.msg,2)})},n.cancel=function(e){w("\u786e\u8ba4\u53d6\u6d88\u8ba2\u5355\uff1f","\u8ba2\u5355\u53d6\u6d88\u540e\uff0c\u4f18\u60e0\u5238\u548c\u62b5\u6263\u7684\u4f59\u989d\u4f1a\u8fd4\u56de\u5230\u60a8\u7684\u8d26\u6237\u3002",[{text:"\u53d6\u6d88",onPress:function(){return console.log("cancel")}},{text:"\u786e\u8ba4",onPress:function(){var t={order_id:e};v.c.post("".concat(API.home,"/m/cancel_order"),t).then(function(e){200===e.data.code?location.reload():o.a.info(e.data.msg,2)})}}])},n.state={data:[],pageNum:1,isLoading:!0,total:0},n}return Object(c.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.getList(this.page)}},{key:"render",value:function(){var e=this;return m.a.createElement("div",{className:"myorders-box"},m.a.createElement(h.e,{title:"\u6211\u7684\u8ba2\u5355",arrow:!0,cart:!1}),m.a.createElement(b.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?m.a.createElement(E.a,{pageStart:0,hasMore:!0,loadMore:this.getMore.bind(this),useWindow:!0},this.state.data.map(function(t,n){return m.a.createElement("div",{className:"order-body",key:n},m.a.createElement(P,{item:t}),t.course&&t.course.length>0&&t.course.map(function(e,t){var n=m.a.createElement("div",{className:"order-info"},m.a.createElement("p",{className:"order-title text-overflow-one"},m.a.createElement(g.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),m.a.createElement("p",{className:"order-content text-overflow-2"},e.description),m.a.createElement("p",{className:"order-des"},m.a.createElement("span",{className:"order-newprice"},"\xa5",e.pay_amount),m.a.createElement("span",{className:"order-price"},"\xa5",e.price0)));return m.a.createElement("div",{className:"order-wrap",key:t},m.a.createElement(f.a,{info:n,src:e.image_name,isSign:e.is_aist,id:e.course_id}))}),m.a.createElement(N,{item:t,cancel:e.cancel}))})," "):m.a.createElement("div",{className:"cart-tip"},m.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8ba2\u5355\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),m.a.createElement(g.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(d.Component);function P(e){var t;return t="0"===e.item.pay_time&&0===e.item.member_num?m.a.createElement("span",{className:"oid-status"},"\u7b49\u5f85\u652f\u4ed8"):e.item.pdd_info&&e.item.member_num===e.item.pdd_info.length&&0!==e.item.member_num?m.a.createElement("span",{className:"oid-success"},"\u62fc\u56e2\u6210\u529f"):m.a.createElement("span",{className:"oid-success"},"\u652f\u4ed8\u6210\u529f"),m.a.createElement("div",{className:"order-head"},m.a.createElement("span",{className:"oid-num"},"\u8ba2\u5355\u53f7\uff1a",e.item.oid),t)}function N(e){return m.a.createElement("div",{className:"order-btm"},m.a.createElement("div",{className:"price-info"},m.a.createElement("p",null,m.a.createElement("span",{className:"payable"},"\u5e94\u4ed8\uff1a"),m.a.createElement("span",{className:"price"},"\xa5",e.item.pay_amount)),m.a.createElement("p",null,m.a.createElement("span",{className:"payable"},"\u5df2\u4f18\u60e0\uff1a"),m.a.createElement("span",{className:"price"},"\xa5",e.item.coupon_amount))),"0"===e.item.pay_time&&0===e.item.member_num&&m.a.createElement("div",{className:"btm-right"},m.a.createElement("button",{className:"cancel",onClick:function(t){return e.cancel(e.item.oid)}},"\u53d6\u6d88\u8ba2\u5355"),m.a.createElement(g.b,{to:"/payorder?oid=".concat(e.item.oid)},"\u53bb\u652f\u4ed8")),0!==e.item.member_num&&m.a.createElement("div",{className:"btm-right"},m.a.createElement("div",{className:"group"},e.item.pdd_info&&e.item.pdd_info.length>0&&e.item.pdd_info.map(function(e,t){return m.a.createElement("img",{src:""===e.user_avatar?"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-spreadtrain8/ellipsis.png":e.user_avatar,key:t,alt:""})}))))}t.default=_},643:function(e,t,n){e.exports=n(644)},644:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=n(0),r=i(o),s=i(n(2));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.Component),a(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(n){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),a=void 0;if(this.props.useWindow){var o=document.documentElement||document.body.parentNode||document.body,r=void 0!==t.pageYOffset?t.pageYOffset:o.scrollTop;a=this.props.isReverse?r:this.calculateOffset(e,r)}else a=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;a<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"===typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,a=t.element,o=t.hasMore,s=(t.initialLoad,t.isReverse),i=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return o&&(i?s?u.unshift(i):u.push(i):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),r.default.createElement(a,c,u)}}]),t}();l.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},881:function(e,t,n){}}]);
//# sourceMappingURL=myorders.3a9f8bf2.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/myOrders/index.js","../node_modules/react-infinite-scroller/index.js","../node_modules/react-infinite-scroller/dist/InfiniteScroll.js"],"names":["alert","antd_mobile_lib_modal__WEBPACK_IMPORTED_MODULE_8___default","a","MyOrders","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","page","getMore","debounce","state","data","length","getList","http","get","concat","API","home","then","res","code","setState","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","info","msg","cancel","oid","text","onPress","console","log","order_id","post","location","reload","pageNum","total","_this2","react__WEBPACK_IMPORTED_MODULE_9___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_11__","title","arrow","cart","_common_Loading__WEBPACK_IMPORTED_MODULE_15__","react_infinite_scroller__WEBPACK_IMPORTED_MODULE_16___default","pageStart","hasMore","loadMore","bind","useWindow","map","item","index","key","OrderInfo","course","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_14__","to","course_id","course_title","description","pay_amount","price0","_common_OrderList__WEBPACK_IMPORTED_MODULE_12__","src","image_name","isSign","is_aist","id","PayInfo","Component","btn","pay_time","member_num","pdd_info","coupon_amount","onClick","event","user_avatar","alt","module","exports","__webpack_require__","defineProperty","value","_createClass","defineProperties","target","i","descriptor","enumerable","configurable","writable","Constructor","protoProps","staticProps","prototype","_react","_react2","_interopRequireDefault","_propTypes2","obj","__esModule","default","InfiniteScroll","_Component","instance","TypeError","_classCallCheck","self","ReferenceError","_possibleConstructorReturn","__proto__","getPrototypeOf","scrollListener","eventListenerOptions","mousewheelListener","subClass","superClass","create","constructor","setPrototypeOf","_inherits","pageLoaded","options","attachScrollListener","isReverse","parentElement","getParentElement","scrollComponent","scrollTop","scrollHeight","beforeScrollHeight","beforeScrollTop","detachScrollListener","detachMousewheelListener","passive","testOptions","document","addEventListener","removeEventListener","e","useCapture","isPassiveSupported","loader","defaultLoader","scrollEl","window","parentNode","el","scrollParent","getScrollParent","initialLoad","deltaY","preventDefault","offset","doc","documentElement","body","undefined","pageYOffset","calculateOffset","clientHeight","Number","threshold","offsetParent","calculateTopPosition","offsetHeight","innerHeight","offsetTop","renderProps","filterProps","children","element","ref","keys","indexOf","hasOwnProperty","_objectWithoutProperties","node","childrenArray","unshift","push","propTypes","isRequired","bool","func","number","defaultProps"],"mappings":"wRAWMA,EAAQC,EAAAC,EAAMF,MAGdG,cAEF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,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I,SAAAsD,EAAAG,QAAAmF,KAAAF,WACA5I,UAAAwD,EAAAG,QAAAoF,OACAb,IAAA1E,EAAAG,QAAAmF,KACAnC,gBAAAnD,EAAAG,QAAAmF,KACAtB,UAAAhE,EAAAG,QAAAoF,OACA7C,WAAA1C,EAAAG,QAAAkF,KACAzI,UAAAoD,EAAAG,QAAAkF,MAEAjF,EAAAoF,aAAA,CACAf,QAAA,MACAhI,SAAA,EACA2G,aAAA,EACA5G,UAAA,EACAkI,IAAA,KACAV,UAAA,IACApH,WAAA,EACA8E,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAO,gBAAA,MAEAtE,EAAAsB,QAAAC,EACAxB,EAAAC,UAAA","file":"static/js/myorders.a16d3d05.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport './index.scss'\nimport {HeaderBar} from '../../common'\nimport OrderList from '@/common/OrderList'\nimport {http, api} from \"@/utils\"\nimport {Link} from 'react-router-dom'\nimport {Modal, Toast} from 'antd-mobile'\nimport Loading from '@/common/Loading'\nimport InfiniteScroll from 'react-infinite-scroller'\nimport {debounce} from 'lodash'\n\nconst alert = Modal.alert\n\n\nclass MyOrders extends Component {\n page = 1\n constructor(props) {\n super(props)\n this.state = {\n data: [],\n pageNum: 1,\n isLoading: true,\n total: 0,\n }\n }\n\n componentDidMount() {\n this.getList(this.page)\n }\n\n getMore = debounce(() => {\n if(this.state.data.length % 10 === 0){\n this.getList(++this.page)\n }\n }, 200)\n\n // 获取订单\n getList = () => {\n http.get(`${API.home}/m/my/orders/${this.page}/10`,).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n data: this.state.data.concat(res.data.data),\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n\n }\n\n // 取消订单\n cancel = (oid) => {\n alert('确认取消订单?', '订单取消后,优惠券和抵扣的余额会返回到您的账户。', [\n {text: '取消', onPress: () => console.log('cancel')},\n {\n text: '确认',\n onPress: () => {\n let data = {\n order_id: oid\n }\n http.post(`${API.home}/m/cancel_order`, data).then((res) => {\n if (res.data.code === 200) {\n location.reload();\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n }\n ])\n }\n\n\n render() {\n\n return (\n <div className='myorders-box'>\n <HeaderBar title='我的订单' arrow={true} cart={false}></HeaderBar>\n <Loading isLoading={this.state.isLoading}>\n {\n this.state.data && this.state.data.length > 0 ?\n <InfiniteScroll\n pageStart={0}\n hasMore={true}\n loadMore={this.getMore.bind(this)}\n useWindow={true}\n >\n {\n this.state.data.map((item, index) => {\n return (\n <div className=\"order-body\" key={index}>\n <OrderInfo item={item}/>\n {\n item.course && item.course.length > 0 && item.course.map((item, index) => {\n const Info = (\n <div className=\"order-info\">\n <p className='order-title text-overflow-one'>\n <Link\n to={`/detail?id=${item.course_id}`}>{item.course_title}</Link>\n </p>\n <p className='order-content text-overflow-2'>{item.description}</p>\n <p className='order-des'>\n <span\n className='order-newprice'>¥{item.pay_amount}</span>\n <span\n className='order-price'>¥{item.price0}</span>\n </p>\n </div>\n )\n return (\n <div className=\"order-wrap\" key={index}>\n <OrderList info={Info} src={item.image_name}\n isSign={item.is_aist}\n id={item.course_id}></OrderList>\n </div>\n )\n })\n }\n\n <PayInfo item={item} cancel={this.cancel}/>\n </div>\n )\n })\n } </InfiniteScroll> : <div className=\"cart-tip\">\n <p className='cart-mess'>您还没有订单哦,快去逛逛吧~</p>\n <Link to='/classify'>去逛逛</Link>\n </div>\n }\n\n </Loading>\n </div>\n )\n }\n}\n\n\nfunction OrderInfo(props) {\n let btn\n if (props.item.pay_time === '0' && props.item.member_num === 0) {\n btn = <span className='oid-status'>等待支付</span>\n } else if (props.item.pdd_info && (props.item.member_num === props.item.pdd_info.length) && props.item.member_num !== 0) {\n btn = <span className='oid-success'>拼团成功</span>\n } else {\n btn = <span className='oid-success'>支付成功</span>\n }\n return (\n <div className='order-head'>\n <span className='oid-num'>订单号:{props.item.oid}</span>\n {btn}\n </div>\n )\n}\n\nfunction PayInfo(props) {\n return (\n <div className='order-btm'>\n <div className='price-info'>\n <p>\n <span className='payable'>应付:</span>\n <span className='price'>¥{props.item.pay_amount}</span>\n </p>\n <p>\n <span className='payable'>已优惠:</span>\n <span className='price'>¥{props.item.coupon_amount}</span>\n </p>\n </div>\n\n {\n props.item.pay_time === '0' && props.item.member_num === 0 &&\n <div className='btm-right'>\n <button className='cancel' onClick={event => props.cancel(props.item.oid)}>取消订单</button>\n <Link to={`/payorder?oid=${props.item.oid}`}>去支付</Link>\n </div>\n }\n\n {\n props.item.member_num !== 0 &&\n <div className='btm-right'>\n <div className=\"group\">\n {\n props.item.pdd_info && props.item.pdd_info.length > 0 && props.item.pdd_info.map((item, index) => {\n return (\n <img\n src={item.user_avatar === '' ? 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-spreadtrain8/ellipsis.png' : item.user_avatar}\n key={index} alt=\"\"/>\n )\n })\n }\n </div>\n </div>\n }\n </div>\n )\n}\n\nexport default MyOrders\n","module.exports = require('./dist/InfiniteScroll');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar InfiniteScroll = function (_Component) {\n _inherits(InfiniteScroll, _Component);\n\n function InfiniteScroll(props) {\n _classCallCheck(this, InfiniteScroll);\n\n var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props));\n\n _this.scrollListener = _this.scrollListener.bind(_this);\n _this.eventListenerOptions = _this.eventListenerOptions.bind(_this);\n _this.mousewheelListener = _this.mousewheelListener.bind(_this);\n return _this;\n }\n\n _createClass(InfiniteScroll, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.pageLoaded = this.props.pageStart;\n this.options = this.eventListenerOptions();\n this.attachScrollListener();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.props.isReverse && this.loadMore) {\n var parentElement = this.getParentElement(this.scrollComponent);\n parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop;\n this.loadMore = false;\n }\n\n this.attachScrollListener();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.detachScrollListener();\n this.detachMousewheelListener();\n }\n }, {\n key: 'isPassiveSupported',\n value: function isPassiveSupported() {\n var passive = false;\n var testOptions = {\n get passive() {\n passive = true;\n }\n\n };\n\n try {\n document.addEventListener('test', null, testOptions);\n document.removeEventListener('test', null, testOptions);\n } catch (e) {// ignore\n }\n\n return passive;\n }\n }, {\n key: 'eventListenerOptions',\n value: function eventListenerOptions() {\n var options = this.props.useCapture;\n\n if (this.isPassiveSupported()) {\n options = {\n useCapture: this.props.useCapture,\n passive: true\n };\n }\n\n return options;\n } // Set a defaut loader for all your `InfiniteScroll` components\n\n }, {\n key: 'setDefaultLoader',\n value: function setDefaultLoader(loader) {\n this.defaultLoader = loader;\n }\n }, {\n key: 'detachMousewheelListener',\n value: function detachMousewheelListener() {\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = this.scrollComponent.parentNode;\n }\n\n scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);\n }\n }, {\n key: 'detachScrollListener',\n value: function detachScrollListener() {\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = this.getParentElement(this.scrollComponent);\n }\n\n scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);\n scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);\n }\n }, {\n key: 'getParentElement',\n value: function getParentElement(el) {\n var scrollParent = this.props.getScrollParent && this.props.getScrollParent();\n\n if (scrollParent != null) {\n return scrollParent;\n }\n\n return el && el.parentNode;\n }\n }, {\n key: 'filterProps',\n value: function filterProps(props) {\n return props;\n }\n }, {\n key: 'attachScrollListener',\n value: function attachScrollListener() {\n var parentElement = this.getParentElement(this.scrollComponent);\n\n if (!this.props.hasMore || !parentElement) {\n return;\n }\n\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = parentElement;\n }\n\n scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);\n scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);\n scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);\n\n if (this.props.initialLoad) {\n this.scrollListener();\n }\n }\n }, {\n key: 'mousewheelListener',\n value: function mousewheelListener(e) {\n // Prevents Chrome hangups\n // See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257\n if (e.deltaY === 1 && !this.isPassiveSupported()) {\n e.preventDefault();\n }\n }\n }, {\n key: 'scrollListener',\n value: function scrollListener() {\n var el = this.scrollComponent;\n var scrollEl = window;\n var parentNode = this.getParentElement(el);\n var offset = void 0;\n\n if (this.props.useWindow) {\n var doc = document.documentElement || document.body.parentNode || document.body;\n var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop;\n\n if (this.props.isReverse) {\n offset = scrollTop;\n } else {\n offset = this.calculateOffset(el, scrollTop);\n }\n } else if (this.props.isReverse) {\n offset = parentNode.scrollTop;\n } else {\n offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight;\n } // Here we make sure the element is visible as well as checking the offset\n\n\n if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) {\n this.detachScrollListener();\n this.beforeScrollHeight = parentNode.scrollHeight;\n this.beforeScrollTop = parentNode.scrollTop; // Call loadMore after detachScrollListener to allow for non-async loadMore functions\n\n if (typeof this.props.loadMore === 'function') {\n this.props.loadMore(this.pageLoaded += 1);\n this.loadMore = true;\n }\n }\n }\n }, {\n key: 'calculateOffset',\n value: function calculateOffset(el, scrollTop) {\n if (!el) {\n return 0;\n }\n\n return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight);\n }\n }, {\n key: 'calculateTopPosition',\n value: function calculateTopPosition(el) {\n if (!el) {\n return 0;\n }\n\n return el.offsetTop + this.calculateTopPosition(el.offsetParent);\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var renderProps = this.filterProps(this.props);\n\n var children = renderProps.children,\n element = renderProps.element,\n hasMore = renderProps.hasMore,\n initialLoad = renderProps.initialLoad,\n isReverse = renderProps.isReverse,\n loader = renderProps.loader,\n loadMore = renderProps.loadMore,\n pageStart = renderProps.pageStart,\n ref = renderProps.ref,\n threshold = renderProps.threshold,\n useCapture = renderProps.useCapture,\n useWindow = renderProps.useWindow,\n getScrollParent = renderProps.getScrollParent,\n props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']);\n\n props.ref = function (node) {\n _this2.scrollComponent = node;\n\n if (ref) {\n ref(node);\n }\n };\n\n var childrenArray = [children];\n\n if (hasMore) {\n if (loader) {\n isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader);\n } else if (this.defaultLoader) {\n isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader);\n }\n }\n\n return _react2.default.createElement(element, props, childrenArray);\n }\n }]);\n\n return InfiniteScroll;\n}(_react.Component);\n\nInfiniteScroll.propTypes = {\n children: _propTypes2.default.node.isRequired,\n element: _propTypes2.default.node,\n hasMore: _propTypes2.default.bool,\n initialLoad: _propTypes2.default.bool,\n isReverse: _propTypes2.default.bool,\n loader: _propTypes2.default.node,\n loadMore: _propTypes2.default.func.isRequired,\n pageStart: _propTypes2.default.number,\n ref: _propTypes2.default.func,\n getScrollParent: _propTypes2.default.func,\n threshold: _propTypes2.default.number,\n useCapture: _propTypes2.default.bool,\n useWindow: _propTypes2.default.bool\n};\nInfiniteScroll.defaultProps = {\n element: 'div',\n hasMore: false,\n initialLoad: true,\n pageStart: 0,\n ref: null,\n threshold: 250,\n useWindow: true,\n isReverse: false,\n useCapture: false,\n loader: null,\n getScrollParent: null\n};\nexports.default = InfiniteScroll;\nmodule.exports = exports['default'];"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/myOrders/index.js","../node_modules/react-infinite-scroller/index.js","../node_modules/react-infinite-scroller/dist/InfiniteScroll.js"],"names":["alert","antd_mobile_lib_modal__WEBPACK_IMPORTED_MODULE_8___default","a","MyOrders","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","page","getMore","debounce","state","data","length","getList","http","get","concat","API","home","then","res","code","setState","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","info","msg","cancel","oid","text","onPress","console","log","order_id","post","location","reload","pageNum","total","_this2","react__WEBPACK_IMPORTED_MODULE_9___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_11__","title","arrow","cart","_common_Loading__WEBPACK_IMPORTED_MODULE_15__","react_infinite_scroller__WEBPACK_IMPORTED_MODULE_16___default","pageStart","hasMore","loadMore","bind","useWindow","map","item","index","key","OrderInfo","course","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_14__","to","course_id","course_title","description","pay_amount","price0","_common_OrderList__WEBPACK_IMPORTED_MODULE_12__","src","image_name","isSign","is_aist","id","PayInfo","Component","btn","pay_time","member_num","pdd_info","coupon_amount","onClick","event","user_avatar","alt","module","exports","__webpack_require__","defineProperty","value","_createClass","defineProperties","target","i","descriptor","enumerable","configurable","writable","Constructor","protoProps","staticProps","prototype","_react","_react2","_interopRequireDefault","_propTypes2","obj","__esModule","default","InfiniteScroll","_Component","instance","TypeError","_classCallCheck","self","ReferenceError","_possibleConstructorReturn","__proto__","getPrototypeOf","scrollListener","eventListenerOptions","mousewheelListener","subClass","superClass","create","constructor","setPrototypeOf","_inherits","pageLoaded","options","attachScrollListener","isReverse","parentElement","getParentElement","scrollComponent","scrollTop","scrollHeight","beforeScrollHeight","beforeScrollTop","detachScrollListener","detachMousewheelListener","passive","testOptions","document","addEventListener","removeEventListener","e","useCapture","isPassiveSupported","loader","defaultLoader","scrollEl","window","parentNode","el","scrollParent","getScrollParent","initialLoad","deltaY","preventDefault","offset","doc","documentElement","body","undefined","pageYOffset","calculateOffset","clientHeight","Number","threshold","offsetParent","calculateTopPosition","offsetHeight","innerHeight","offsetTop","renderProps","filterProps","children","element","ref","keys","indexOf","hasOwnProperty","_objectWithoutProperties","node","childrenArray","unshift","push","propTypes","isRequired","bool","func","number","defaultProps"],"mappings":"wRAWMA,EAAQC,EAAAC,EAAMF,MAGdG,cAEF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAFVQ,KAAO,EACYP,EAcnBQ,QAAUC,mBAAS,WACZT,EAAKU,MAAMC,KAAKC,OAAS,KAAO,GAC/BZ,EAAKa,UAAUb,EAAKO,OAEzB,KAlBgBP,EAqBnBa,QAAU,WACNC,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,iBAAAF,OAAoChB,EAAKO,KAAzC,QAAqDY,KAAK,SAACC,GACjC,MAAlBA,EAAIT,KAAKU,KACTrB,EAAKsB,SAAS,CACVX,KAAMX,EAAKU,MAAMC,KAAKK,OAAOI,EAAIT,KAAKA,MACtCY,WAAW,IAGfC,EAAA3B,EAAM4B,KAAKL,EAAIT,KAAKe,IAAK,MA7BlB1B,EAoCnB2B,OAAS,SAACC,GACNjC,EAAM,6CAAW,mJAA4B,CACzC,CAACkC,KAAM,eAAMC,QAAS,kBAAMC,QAAQC,IAAI,YACxC,CACIH,KAAM,eACNC,QAAS,WACL,IAAInB,EAAO,CACPsB,SAAUL,GAEdd,IAAKoB,KAAL,GAAAlB,OAAaC,IAAIC,KAAjB,mBAAwC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,EAAAK,IAIA,IAAAC,EAAA,CAAAR,GAUA,OARA/H,IACAmG,EACAlB,EAAAsD,EAAAC,QAAArC,GAAAoC,EAAAE,KAAAtC,GACSlJ,KAAAmJ,gBACTnB,EAAAsD,EAAAC,QAAAvL,KAAAmJ,eAAAmC,EAAAE,KAAAxL,KAAAmJ,iBAIA/C,EAAAK,QAAAnE,cAAAyI,EAAAnL,EAAA0L,OAIA5E,EArPA,GAwPAA,EAAA+E,UAAA,CACAX,SAAAxE,EAAAG,QAAA4E,KAAAK,WACAX,QAAAzE,EAAAG,QAAA4E,KACAtI,QAAAuD,EAAAG,QAAAkF,KACAjC,YAAApD,EAAAG,QAAAkF,KACA3D,UAAA1B,EAAAG,QAAAkF,KACAzC,OAAA5C,EAAAG,QAAA4E,KACArI,SAAAsD,EAAAG,QAAAmF,KAAAF,WACA5I,UAAAwD,EAAAG,QAAAoF,OACAb,IAAA1E,EAAAG,QAAAmF,KACAnC,gBAAAnD,EAAAG,QAAAmF,KACAtB,UAAAhE,EAAAG,QAAAoF,OACA7C,WAAA1C,EAAAG,QAAAkF,KACAzI,UAAAoD,EAAAG,QAAAkF,MAEAjF,EAAAoF,aAAA,CACAf,QAAA,MACAhI,SAAA,EACA2G,aAAA,EACA5G,UAAA,EACAkI,IAAA,KACAV,UAAA,IACApH,WAAA,EACA8E,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAO,gBAAA,MAEAtE,EAAAsB,QAAAC,EACAxB,EAAAC,UAAA","file":"static/js/myorders.3a9f8bf2.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport './index.scss'\nimport {HeaderBar} from '../../common'\nimport OrderList from '@/common/OrderList'\nimport {http, api} from \"@/utils\"\nimport {Link} from 'react-router-dom'\nimport {Modal, Toast} from 'antd-mobile'\nimport Loading from '@/common/Loading'\nimport InfiniteScroll from 'react-infinite-scroller'\nimport {debounce} from 'lodash'\n\nconst alert = Modal.alert\n\n\nclass MyOrders extends Component {\n page = 1\n constructor(props) {\n super(props)\n this.state = {\n data: [],\n pageNum: 1,\n isLoading: true,\n total: 0,\n }\n }\n\n componentDidMount() {\n this.getList(this.page)\n }\n\n getMore = debounce(() => {\n if(this.state.data.length % 10 === 0){\n this.getList(++this.page)\n }\n }, 200)\n\n // 获取订单\n getList = () => {\n http.get(`${API.home}/m/my/orders/${this.page}/10`,).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n data: this.state.data.concat(res.data.data),\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n\n }\n\n // 取消订单\n cancel = (oid) => {\n alert('确认取消订单?', '订单取消后,优惠券和抵扣的余额会返回到您的账户。', [\n {text: '取消', onPress: () => console.log('cancel')},\n {\n text: '确认',\n onPress: () => {\n let data = {\n order_id: oid\n }\n http.post(`${API.home}/m/cancel_order`, data).then((res) => {\n if (res.data.code === 200) {\n location.reload();\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n }\n ])\n }\n\n\n render() {\n\n return (\n <div className='myorders-box'>\n <HeaderBar title='我的订单' arrow={true} cart={false}></HeaderBar>\n <Loading isLoading={this.state.isLoading}>\n {\n this.state.data && this.state.data.length > 0 ?\n <InfiniteScroll\n pageStart={0}\n hasMore={true}\n loadMore={this.getMore.bind(this)}\n useWindow={true}\n >\n {\n this.state.data.map((item, index) => {\n return (\n <div className=\"order-body\" key={index}>\n <OrderInfo item={item}/>\n {\n item.course && item.course.length > 0 && item.course.map((item, index) => {\n const Info = (\n <div className=\"order-info\">\n <p className='order-title text-overflow-one'>\n <Link\n to={`/detail?id=${item.course_id}`}>{item.course_title}</Link>\n </p>\n <p className='order-content text-overflow-2'>{item.description}</p>\n <p className='order-des'>\n <span\n className='order-newprice'>¥{item.pay_amount}</span>\n <span\n className='order-price'>¥{item.price0}</span>\n </p>\n </div>\n )\n return (\n <div className=\"order-wrap\" key={index}>\n <OrderList info={Info} src={item.image_name}\n isSign={item.is_aist}\n id={item.course_id}></OrderList>\n </div>\n )\n })\n }\n\n <PayInfo item={item} cancel={this.cancel}/>\n </div>\n )\n })\n } </InfiniteScroll> : <div className=\"cart-tip\">\n <p className='cart-mess'>您还没有订单哦,快去逛逛吧~</p>\n <Link to='/classify'>去逛逛</Link>\n </div>\n }\n\n </Loading>\n </div>\n )\n }\n}\n\n\nfunction OrderInfo(props) {\n let btn\n if (props.item.pay_time === '0' && props.item.member_num === 0) {\n btn = <span className='oid-status'>等待支付</span>\n } else if (props.item.pdd_info && (props.item.member_num === props.item.pdd_info.length) && props.item.member_num !== 0) {\n btn = <span className='oid-success'>拼团成功</span>\n } else {\n btn = <span className='oid-success'>支付成功</span>\n }\n return (\n <div className='order-head'>\n <span className='oid-num'>订单号:{props.item.oid}</span>\n {btn}\n </div>\n )\n}\n\nfunction PayInfo(props) {\n return (\n <div className='order-btm'>\n <div className='price-info'>\n <p>\n <span className='payable'>应付:</span>\n <span className='price'>¥{props.item.pay_amount}</span>\n </p>\n <p>\n <span className='payable'>已优惠:</span>\n <span className='price'>¥{props.item.coupon_amount}</span>\n </p>\n </div>\n\n {\n props.item.pay_time === '0' && props.item.member_num === 0 &&\n <div className='btm-right'>\n <button className='cancel' onClick={event => props.cancel(props.item.oid)}>取消订单</button>\n <Link to={`/payorder?oid=${props.item.oid}`}>去支付</Link>\n </div>\n }\n\n {\n props.item.member_num !== 0 &&\n <div className='btm-right'>\n <div className=\"group\">\n {\n props.item.pdd_info && props.item.pdd_info.length > 0 && props.item.pdd_info.map((item, index) => {\n return (\n <img\n src={item.user_avatar === '' ? 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-spreadtrain8/ellipsis.png' : item.user_avatar}\n key={index} alt=\"\"/>\n )\n })\n }\n </div>\n </div>\n }\n </div>\n )\n}\n\nexport default MyOrders\n","module.exports = require('./dist/InfiniteScroll');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar InfiniteScroll = function (_Component) {\n _inherits(InfiniteScroll, _Component);\n\n function InfiniteScroll(props) {\n _classCallCheck(this, InfiniteScroll);\n\n var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props));\n\n _this.scrollListener = _this.scrollListener.bind(_this);\n _this.eventListenerOptions = _this.eventListenerOptions.bind(_this);\n _this.mousewheelListener = _this.mousewheelListener.bind(_this);\n return _this;\n }\n\n _createClass(InfiniteScroll, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.pageLoaded = this.props.pageStart;\n this.options = this.eventListenerOptions();\n this.attachScrollListener();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.props.isReverse && this.loadMore) {\n var parentElement = this.getParentElement(this.scrollComponent);\n parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop;\n this.loadMore = false;\n }\n\n this.attachScrollListener();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.detachScrollListener();\n this.detachMousewheelListener();\n }\n }, {\n key: 'isPassiveSupported',\n value: function isPassiveSupported() {\n var passive = false;\n var testOptions = {\n get passive() {\n passive = true;\n }\n\n };\n\n try {\n document.addEventListener('test', null, testOptions);\n document.removeEventListener('test', null, testOptions);\n } catch (e) {// ignore\n }\n\n return passive;\n }\n }, {\n key: 'eventListenerOptions',\n value: function eventListenerOptions() {\n var options = this.props.useCapture;\n\n if (this.isPassiveSupported()) {\n options = {\n useCapture: this.props.useCapture,\n passive: true\n };\n }\n\n return options;\n } // Set a defaut loader for all your `InfiniteScroll` components\n\n }, {\n key: 'setDefaultLoader',\n value: function setDefaultLoader(loader) {\n this.defaultLoader = loader;\n }\n }, {\n key: 'detachMousewheelListener',\n value: function detachMousewheelListener() {\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = this.scrollComponent.parentNode;\n }\n\n scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);\n }\n }, {\n key: 'detachScrollListener',\n value: function detachScrollListener() {\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = this.getParentElement(this.scrollComponent);\n }\n\n scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);\n scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);\n }\n }, {\n key: 'getParentElement',\n value: function getParentElement(el) {\n var scrollParent = this.props.getScrollParent && this.props.getScrollParent();\n\n if (scrollParent != null) {\n return scrollParent;\n }\n\n return el && el.parentNode;\n }\n }, {\n key: 'filterProps',\n value: function filterProps(props) {\n return props;\n }\n }, {\n key: 'attachScrollListener',\n value: function attachScrollListener() {\n var parentElement = this.getParentElement(this.scrollComponent);\n\n if (!this.props.hasMore || !parentElement) {\n return;\n }\n\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = parentElement;\n }\n\n scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);\n scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);\n scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);\n\n if (this.props.initialLoad) {\n this.scrollListener();\n }\n }\n }, {\n key: 'mousewheelListener',\n value: function mousewheelListener(e) {\n // Prevents Chrome hangups\n // See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257\n if (e.deltaY === 1 && !this.isPassiveSupported()) {\n e.preventDefault();\n }\n }\n }, {\n key: 'scrollListener',\n value: function scrollListener() {\n var el = this.scrollComponent;\n var scrollEl = window;\n var parentNode = this.getParentElement(el);\n var offset = void 0;\n\n if (this.props.useWindow) {\n var doc = document.documentElement || document.body.parentNode || document.body;\n var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop;\n\n if (this.props.isReverse) {\n offset = scrollTop;\n } else {\n offset = this.calculateOffset(el, scrollTop);\n }\n } else if (this.props.isReverse) {\n offset = parentNode.scrollTop;\n } else {\n offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight;\n } // Here we make sure the element is visible as well as checking the offset\n\n\n if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) {\n this.detachScrollListener();\n this.beforeScrollHeight = parentNode.scrollHeight;\n this.beforeScrollTop = parentNode.scrollTop; // Call loadMore after detachScrollListener to allow for non-async loadMore functions\n\n if (typeof this.props.loadMore === 'function') {\n this.props.loadMore(this.pageLoaded += 1);\n this.loadMore = true;\n }\n }\n }\n }, {\n key: 'calculateOffset',\n value: function calculateOffset(el, scrollTop) {\n if (!el) {\n return 0;\n }\n\n return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight);\n }\n }, {\n key: 'calculateTopPosition',\n value: function calculateTopPosition(el) {\n if (!el) {\n return 0;\n }\n\n return el.offsetTop + this.calculateTopPosition(el.offsetParent);\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var renderProps = this.filterProps(this.props);\n\n var children = renderProps.children,\n element = renderProps.element,\n hasMore = renderProps.hasMore,\n initialLoad = renderProps.initialLoad,\n isReverse = renderProps.isReverse,\n loader = renderProps.loader,\n loadMore = renderProps.loadMore,\n pageStart = renderProps.pageStart,\n ref = renderProps.ref,\n threshold = renderProps.threshold,\n useCapture = renderProps.useCapture,\n useWindow = renderProps.useWindow,\n getScrollParent = renderProps.getScrollParent,\n props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']);\n\n props.ref = function (node) {\n _this2.scrollComponent = node;\n\n if (ref) {\n ref(node);\n }\n };\n\n var childrenArray = [children];\n\n if (hasMore) {\n if (loader) {\n isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader);\n } else if (this.defaultLoader) {\n isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader);\n }\n }\n\n return _react2.default.createElement(element, props, childrenArray);\n }\n }]);\n\n return InfiniteScroll;\n}(_react.Component);\n\nInfiniteScroll.propTypes = {\n children: _propTypes2.default.node.isRequired,\n element: _propTypes2.default.node,\n hasMore: _propTypes2.default.bool,\n initialLoad: _propTypes2.default.bool,\n isReverse: _propTypes2.default.bool,\n loader: _propTypes2.default.node,\n loadMore: _propTypes2.default.func.isRequired,\n pageStart: _propTypes2.default.number,\n ref: _propTypes2.default.func,\n getScrollParent: _propTypes2.default.func,\n threshold: _propTypes2.default.number,\n useCapture: _propTypes2.default.bool,\n useWindow: _propTypes2.default.bool\n};\nInfiniteScroll.defaultProps = {\n element: 'div',\n hasMore: false,\n initialLoad: true,\n pageStart: 0,\n ref: null,\n threshold: 250,\n useWindow: true,\n isReverse: false,\n useCapture: false,\n loader: null,\n getScrollParent: null\n};\nexports.default = InfiniteScroll;\nmodule.exports = exports['default'];"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1154:function(e,t,a){"use strict";a.r(t);a(44);var s=a(14),n=a.n(s),c=a(7),i=a(8),r=a(11),o=a(9),l=a(10),d=a(0),m=a.n(d),u=(a(882),a(33)),p=a(4),f=a(16),h=a(20),E=a(63),v=function(e){function t(e){var a;return Object(c.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}):n.a.info(e.data.msg,2)})},a.state={data:[],isLoading:!0},a}return Object(l.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"render",value:function(){var e=this.props.user,t=e&&e.data&&e.data.uid;return m.a.createElement("div",{className:"purchased-box"},m.a.createElement(u.e,{title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,href:"/my"}),m.a.createElement(E.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?m.a.createElement("div",{className:"purchased-body"},m.a.createElement("div",{className:"tip"},"\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a",t),this.state.data.map(function(e,t){var a=m.a.createElement("div",{className:"info"},m.a.createElement("p",{className:"title"},m.a.createElement(f.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),m.a.createElement("p",{className:"contact text-overflow-2"},e.simpledescription),e.is_aist?m.a.createElement("div",{className:"des"},"\u52a9\u6559\u5fae\u4fe1\uff1a",e.assist_weixin):m.a.createElement("div",{className:"des"},"QQ\u7fa4\uff1a",e.course_qq)),s=e.is_aist&&m.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return m.a.createElement(u.i,{key:t,img:e.image_name,id:e.course_id,info:a,status:s})})):m.a.createElement("div",{className:"cart-tip"},m.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),m.a.createElement(f.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(d.Component);t.default=Object(h.b)(function(e){return{user:e.user}},null)(v)},882:function(e,t,a){}}]);
//# sourceMappingURL=purchased.b3951208.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1154:function(e,t,a){"use strict";a.r(t);a(44);var s=a(14),n=a.n(s),c=a(7),i=a(8),r=a(11),o=a(9),l=a(10),d=a(0),m=a.n(d),u=(a(882),a(30)),p=a(4),f=a(16),h=a(20),E=a(63),v=function(e){function t(e){var a;return Object(c.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}):n.a.info(e.data.msg,2)})},a.state={data:[],isLoading:!0},a}return Object(l.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"render",value:function(){var e=this.props.user,t=e&&e.data&&e.data.uid;return m.a.createElement("div",{className:"purchased-box"},m.a.createElement(u.e,{title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,href:"/my"}),m.a.createElement(E.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?m.a.createElement("div",{className:"purchased-body"},m.a.createElement("div",{className:"tip"},"\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a",t),this.state.data.map(function(e,t){var a=m.a.createElement("div",{className:"info"},m.a.createElement("p",{className:"title"},m.a.createElement(f.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),m.a.createElement("p",{className:"contact text-overflow-2"},e.simpledescription),e.is_aist?m.a.createElement("div",{className:"des"},"\u52a9\u6559\u5fae\u4fe1\uff1a",e.assist_weixin):m.a.createElement("div",{className:"des"},"QQ\u7fa4\uff1a",e.course_qq)),s=e.is_aist&&m.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return m.a.createElement(u.i,{key:t,img:e.image_name,id:e.course_id,info:a,status:s})})):m.a.createElement("div",{className:"cart-tip"},m.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),m.a.createElement(f.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(d.Component);t.default=Object(h.b)(function(e){return{user:e.user}},null)(v)},882:function(e,t,a){}}]);
//# sourceMappingURL=purchased.96de9074.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/purchased/index.js"],"names":["Purchased","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","getList","http","get","concat","API","home","then","res","data","code","setState","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","state","user","uid","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_9__","title","cart","href","_common_Loading__WEBPACK_IMPORTED_MODULE_13__","length","map","item","index","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","course_id","course_title","simpledescription","is_aist","assist_weixin","course_qq","status","key","img","image_name","id","Component","connect"],"mappings":"mOASMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAYVQ,QAAU,WACNC,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,kBAAsCC,KAAK,SAACC,GAClB,MAAlBA,EAAIC,KAAKC,KACThB,EAAKiB,SAAS,CACVF,KAAMD,EAAIC,KAAKA,KACfG,WAAW,IAGfC,EAAAC,EAAMC,KAAKP,EAAIC,KAAKO,IAAK,MAnBjCtB,EAAKuB,MAAQ,CACTR,KAAM,GACNG,WAAW,GAJAlB,mFASfG,KAAKI,2CAkBA,IACEiB,EAAQrB,KAAKJ,MAAbyB,KACDC,EAAMD,GAAQA,EAAKT,MAAQS,EAAKT,KAAKU,IAC3C,OACIC,EAAAN,EAAAO,cAAA,OAAKC,UAAU,iBACXF,EAAAN,EAAAO,cAACE,EAAA,EAAD,CAAWC,MAAM,2BAAOC,MAAM,EAAOC,KAAK,QAC1CN,EAAAN,EAAAO,cAACM,EAAA,EAAD,CAASf,UAAWf,KAAKoB,MAAML,WAEvBf,KAAKoB,MAAMR,MAAQZ,KAAKoB,MAAMR,KAAKmB,OAAS,EACxCR,EAAAN,EAAAO,cAAA,OAAKC,UAAU,kBACXF,EAAAN,EAAAO,cAAA,OAAKC,UAAU,OAAf,+DAAgCH,GAE5BtB,KAAKoB,MAAMR,KAAKoB,IAAI,SAACC,EAAMC,GACvB,IAAMC,EACFZ,EAAAN,EAAAO,cAAA,OAAKC,UAAU,QACXF,EAAAN,EAAAO,cAAA,KAAGC,UAAU,SACTF,EAAAN,EAAAO,cAACY,EAAA,EAAD,CAAMC,GAAE,cAAA9B,OAAgB0B,EAAKK,YACxBL,EAAKM,eAGdhB,EAAAN,EAAAO,cAAA,KAAGC,UAAU,2BAA2BQ,EAAKO,mBAEzCP,EAAKQ,QACClB,EAAAN,EAAAO,cAAA,OAAKC,UAAU,OAAf,iCAA2BQ,EAAKS,eAChCnB,EAAAN,EAAAO,cAAA,OAAKC,UAAU,OAAf,iBAA0BQ,EAAKU,YAI3CC,EACFX,EAAKQ,SAAWlB,EAAAN,EAAAO,cAAA,QAAMC,UAAU,UAAhB,gBAEpB,OACIF,EAAAN,EAAAO,cAACE,EAAA,EAAD,CAAOmB,IAAKX,EACLY,IAAKb,EAAKc,WACVC,GAAIf,EAAKK,UACTpB,KAAMiB,EACNS,OAAQA,OAM7BrB,EAAAN,EAAAO,cAAA,OAAKC,UAAU,YACbF,EAAAN,EAAAO,cAAA,KAAGC,UAAU,aAAb,mFACAF,EAAAN,EAAAO,cAACY,EAAA,EAAD,CAAMC,GAAG,aAAT,gCAxERY,aAkFTC,sBACX,SAAA9B,GAAK,MAAK,CAACC,KAAMD,EAAMC,OACvB,KAFW6B,CAGbvD","file":"static/js/purchased.b3951208.chunk.js","sourcesContent":["import React, {Component} from 'react';\nimport './index.scss';\nimport {HeaderBar, VList} from '../../common'\nimport { http } from \"@/utils\";\nimport {Link} from 'react-router-dom'\nimport {Toast} from 'antd-mobile'\nimport {connect} from \"react-redux\"\nimport Loading from '@/common/Loading'\n\nclass Purchased extends Component {\n constructor(props) {\n super(props)\n this.state = {\n data: [],\n isLoading: true\n }\n }\n\n componentDidMount() {\n this.getList()\n }\n\n // 获取订单\n getList = () => {\n http.get(`${API.home}/m/my/courses`,).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n data: res.data.data,\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n\n\n render() {\n const {user} = this.props\n const uid = user && user.data && user.data.uid\n return (\n <div className='purchased-box'>\n <HeaderBar title='已购课程' cart={false} href='/my'></HeaderBar>\n <Loading isLoading={this.state.isLoading}>\n {\n this.state.data && this.state.data.length > 0 ?\n <div className=\"purchased-body\">\n <div className='tip'>加群请备注您的学号:{uid}</div>\n {\n this.state.data.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${item.course_id}`}>\n {item.course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{item.simpledescription}</p>\n {\n item.is_aist\n ? <div className='des'>助教微信:{item.assist_weixin}</div>\n : <div className='des'>QQ群:{item.course_qq}</div>\n }\n </div>\n )\n const status = (\n item.is_aist && <span className='status'>返现</span>\n )\n return (\n <VList key={index}\n img={item.image_name}\n id={item.course_id}\n info={Info}\n status={status}\n />\n )\n })\n }\n </div>\n : <div className=\"cart-tip\">\n <p className='cart-mess'>您还没有课程哦,快去逛逛吧~</p>\n <Link to='/classify'>去逛逛</Link>\n </div>\n }\n </Loading>\n\n </div>\n )\n }\n}\n\nexport default connect(\n state => ({user: state.user}),\n null\n)(Purchased)\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/purchased/index.js"],"names":["Purchased","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","getList","http","get","concat","API","home","then","res","data","code","setState","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","state","user","uid","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_9__","title","cart","href","_common_Loading__WEBPACK_IMPORTED_MODULE_13__","length","map","item","index","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","course_id","course_title","simpledescription","is_aist","assist_weixin","course_qq","status","key","img","image_name","id","Component","connect"],"mappings":"mOASMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAYVQ,QAAU,WACNC,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,kBAAsCC,KAAK,SAACC,GAClB,MAAlBA,EAAIC,KAAKC,KACThB,EAAKiB,SAAS,CACVF,KAAMD,EAAIC,KAAKA,KACfG,WAAW,IAGfC,EAAAC,EAAMC,KAAKP,EAAIC,KAAKO,IAAK,MAnBjCtB,EAAKuB,MAAQ,CACTR,KAAM,GACNG,WAAW,GAJAlB,mFASfG,KAAKI,2CAkBA,IACEiB,EAAQrB,KAAKJ,MAAbyB,KACDC,EAAMD,GAAQA,EAAKT,MAAQS,EAAKT,KAAKU,IAC3C,OACIC,EAAAN,EAAAO,cAAA,OAAKC,UAAU,iBACXF,EAAAN,EAAAO,cAACE,EAAA,EAAD,CAAWC,MAAM,2BAAOC,MAAM,EAAOC,KAAK,QAC1CN,EAAAN,EAAAO,cAACM,EAAA,EAAD,CAASf,UAAWf,KAAKoB,MAAML,WAEvBf,KAAKoB,MAAMR,MAAQZ,KAAKoB,MAAMR,KAAKmB,OAAS,EACxCR,EAAAN,EAAAO,cAAA,OAAKC,UAAU,kBACXF,EAAAN,EAAAO,cAAA,OAAKC,UAAU,OAAf,+DAAgCH,GAE5BtB,KAAKoB,MAAMR,KAAKoB,IAAI,SAACC,EAAMC,GACvB,IAAMC,EACFZ,EAAAN,EAAAO,cAAA,OAAKC,UAAU,QACXF,EAAAN,EAAAO,cAAA,KAAGC,UAAU,SACTF,EAAAN,EAAAO,cAACY,EAAA,EAAD,CAAMC,GAAE,cAAA9B,OAAgB0B,EAAKK,YACxBL,EAAKM,eAGdhB,EAAAN,EAAAO,cAAA,KAAGC,UAAU,2BAA2BQ,EAAKO,mBAEzCP,EAAKQ,QACClB,EAAAN,EAAAO,cAAA,OAAKC,UAAU,OAAf,iCAA2BQ,EAAKS,eAChCnB,EAAAN,EAAAO,cAAA,OAAKC,UAAU,OAAf,iBAA0BQ,EAAKU,YAI3CC,EACFX,EAAKQ,SAAWlB,EAAAN,EAAAO,cAAA,QAAMC,UAAU,UAAhB,gBAEpB,OACIF,EAAAN,EAAAO,cAACE,EAAA,EAAD,CAAOmB,IAAKX,EACLY,IAAKb,EAAKc,WACVC,GAAIf,EAAKK,UACTpB,KAAMiB,EACNS,OAAQA,OAM7BrB,EAAAN,EAAAO,cAAA,OAAKC,UAAU,YACbF,EAAAN,EAAAO,cAAA,KAAGC,UAAU,aAAb,mFACAF,EAAAN,EAAAO,cAACY,EAAA,EAAD,CAAMC,GAAG,aAAT,gCAxERY,aAkFTC,sBACX,SAAA9B,GAAK,MAAK,CAACC,KAAMD,EAAMC,OACvB,KAFW6B,CAGbvD","file":"static/js/purchased.96de9074.chunk.js","sourcesContent":["import React, {Component} from 'react';\nimport './index.scss';\nimport {HeaderBar, VList} from '../../common'\nimport { http } from \"@/utils\";\nimport {Link} from 'react-router-dom'\nimport {Toast} from 'antd-mobile'\nimport {connect} from \"react-redux\"\nimport Loading from '@/common/Loading'\n\nclass Purchased extends Component {\n constructor(props) {\n super(props)\n this.state = {\n data: [],\n isLoading: true\n }\n }\n\n componentDidMount() {\n this.getList()\n }\n\n // 获取订单\n getList = () => {\n http.get(`${API.home}/m/my/courses`,).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n data: res.data.data,\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n\n\n render() {\n const {user} = this.props\n const uid = user && user.data && user.data.uid\n return (\n <div className='purchased-box'>\n <HeaderBar title='已购课程' cart={false} href='/my'></HeaderBar>\n <Loading isLoading={this.state.isLoading}>\n {\n this.state.data && this.state.data.length > 0 ?\n <div className=\"purchased-body\">\n <div className='tip'>加群请备注您的学号:{uid}</div>\n {\n this.state.data.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${item.course_id}`}>\n {item.course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{item.simpledescription}</p>\n {\n item.is_aist\n ? <div className='des'>助教微信:{item.assist_weixin}</div>\n : <div className='des'>QQ群:{item.course_qq}</div>\n }\n </div>\n )\n const status = (\n item.is_aist && <span className='status'>返现</span>\n )\n return (\n <VList key={index}\n img={item.image_name}\n id={item.course_id}\n info={Info}\n status={status}\n />\n )\n })\n }\n </div>\n : <div className=\"cart-tip\">\n <p className='cart-mess'>您还没有课程哦,快去逛逛吧~</p>\n <Link to='/classify'>去逛逛</Link>\n </div>\n }\n </Loading>\n\n </div>\n )\n }\n}\n\nexport default connect(\n state => ({user: state.user}),\n null\n)(Purchased)\n"],"sourceRoot":""}
\ No newline at end of file
!function(e){function r(r){for(var n,a,f=r[0],d=r[1],i=r[2],u=0,l=[];u<f.length;u++)a=f[u],o[a]&&l.push(o[a][0]),o[a]=0;for(n in d)Object.prototype.hasOwnProperty.call(d,n)&&(e[n]=d[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,i||[]),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 d=t[a];0!==o[d]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var n={},a={18:0},o={18:0},c=[];function f(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,f),t.l=!0,t.exports}f.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,31:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="static/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:"6d24aba4",1:"5ed0fc89",2:"5ce769bd",3:"aeb3f822",4:"280c19c2",5:"31d6cfe0",6:"061a2017",7:"31d6cfe0",8:"a9111f28",9:"99c1fc9f",10:"b968f5d5",11:"8f4c32db",12:"a97e13d0",13:"f2c7a13b",14:"ce10de93",16:"789a128d",17:"fb5cdbc2",19:"ed8f7a59",20:"175bee2a",21:"8867122f",22:"f08bc5f3",23:"2b2824ba",25:"31d6cfe0",26:"73976871",27:"31d6cfe0",28:"42a89c77",29:"bf839917",30:"35e22f8c",31:"57d8b033"}[e]+".chunk.css",o=f.p+n,c=document.getElementsByTagName("link"),d=0;d<c.length;d++){var i=(s=c[d]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(i===n||i===o))return r()}var u=document.getElementsByTagName("style");for(d=0;d<u.length;d++){var s;if((i=(s=u[d]).getAttribute("data-href"))===n||i===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,d=document.createElement("script");d.charset="utf-8",d.timeout=120,f.nc&&d.setAttribute("nonce",f.nc),d.src=function(e){return f.p+"static/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:"5ad51000",1:"da3edf64",2:"da982f82",3:"b6b14ec2",4:"954a0197",5:"e7408258",6:"a3016da1",7:"c503b1f0",8:"c84e2bbe",9:"5d20f031",10:"e678ace6",11:"4f1c3903",12:"6ae202e2",13:"0ff2580f",14:"35f0eebd",16:"3a9f8bf2",17:"96de9074",19:"d9684d99",20:"c5ea327d",21:"3ca271e7",22:"a6717ccf",23:"0535da32",25:"66a6cdfb",26:"ad7bb673",27:"48079d34",28:"dc773ffa",29:"76256aca",30:"db405cf8",31:"804baf53"}[e]+".chunk.js"}(e),c=function(r){d.onerror=d.onload=null,clearTimeout(i);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 i=setTimeout(function(){c({type:"timeout",target:d})},12e4);d.onerror=d.onload=c,document.head.appendChild(d)}return Promise.all(r)},f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/",f.oe=function(e){throw console.error(e),e};var d=window.webpackJsonp=window.webpackJsonp||[],i=d.push.bind(d);d.push=r,d=d.slice();for(var u=0;u<d.length;u++)r(d[u]);var s=i;t()}([]);
//# sourceMappingURL=runtime~main.7dae6868.js.map
\ No newline at end of file
{"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","installedCssChunks","18","exports","module","l","e","promises","0","1","2","3","4","6","8","9","10","11","12","13","14","16","17","19","20","21","22","23","26","28","29","30","31","Promise","resolve","reject","href","5","7","25","27","fullhref","p","existingLinkTags","document","getElementsByTagName","dataHref","tag","getAttribute","rel","existingStyleTags","linkTag","createElement","type","onload","onerror","event","request","target","src","err","Error","parentNode","removeChild","appendChild","then","installedChunkData","promise","onScriptComplete","script","charset","timeout","nc","setAttribute","jsonpScriptSrc","clearTimeout","chunk","errorType","realSrc","error","undefined","setTimeout","head","all","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","console","jsonpArray","window","oldJsonpFunction","slice"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAA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eAAAvF,EAAA2F,OAAAC,YAAA,CAAwDC,MAAA,WAExDlH,OAAA4G,eAAAvF,EAAA,cAAiD6F,OAAA,KAQjDlG,EAAAmG,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAAlG,EAAAkG,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,kBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAtH,OAAAuH,OAAA,MAGA,GAFAvG,EAAA+F,EAAAO,GACAtH,OAAA4G,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAAlG,EAAAwF,EAAAc,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAtG,EAAA0G,EAAA,SAAApG,GACA,IAAAoF,EAAApF,KAAA+F,WACA,WAA2B,OAAA/F,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAN,EAAAwF,EAAAE,EAAA,IAAAA,GACAA,GAIA1F,EAAA2F,EAAA,SAAAgB,EAAAC,GAAsD,OAAA5H,OAAAC,UAAAC,eAAAC,KAAAwH,EAAAC,IAGtD5G,EAAA4C,EAAA,IAGA5C,EAAA6G,GAAA,SAAA/C,GAA8D,MAApBgD,QAAA7B,MAAAnB,GAAoBA,GAE9D,IAAAiD,EAAAC,OAAA,aAAAA,OAAA,iBACAC,EAAAF,EAAAhI,KAAA0H,KAAAM,GACAA,EAAAhI,KAAAX,EACA2I,IAAAG,QACA,QAAAvI,EAAA,EAAgBA,EAAAoI,EAAAlI,OAAuBF,IAAAP,EAAA2I,EAAApI,IACvC,IAAAU,EAAA4H,EAIAxH","file":"static/js/runtime~main.be1b171d.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded CSS chunks\n \tvar installedCssChunks = {\n \t\t18: 0\n \t}\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t18: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"static/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\"}[chunkId]||chunkId) + \".\" + {\"0\":\"9a184cbd\",\"1\":\"dc10b929\",\"2\":\"50c6b061\",\"3\":\"b6b14ec2\",\"4\":\"539d70c4\",\"5\":\"50ccc0c5\",\"6\":\"0269088f\",\"7\":\"08abf5d9\",\"8\":\"bb4ece84\",\"9\":\"c423e386\",\"10\":\"8322516d\",\"11\":\"9e1ecb82\",\"12\":\"6ae202e2\",\"13\":\"ed17ab53\",\"14\":\"a02f5c6f\",\"16\":\"a16d3d05\",\"17\":\"b3951208\",\"19\":\"c639c060\",\"20\":\"099c39b4\",\"21\":\"e6eec39b\",\"22\":\"38eac215\",\"23\":\"5cde5b2a\",\"25\":\"66a6cdfb\",\"26\":\"ad7bb673\",\"27\":\"48079d34\",\"28\":\"f699c8ca\",\"29\":\"95cc221c\",\"30\":\"551081e6\",\"31\":\"1f9a1906\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// mini-css-extract-plugin CSS loading\n \t\tvar cssChunks = {\"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,\"31\":1};\n \t\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n \t\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n \t\t\tpromises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {\n \t\t\t\tvar href = \"static/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\"}[chunkId]||chunkId) + \".\" + {\"0\":\"6d24aba4\",\"1\":\"5ed0fc89\",\"2\":\"5ce769bd\",\"3\":\"aeb3f822\",\"4\":\"280c19c2\",\"5\":\"31d6cfe0\",\"6\":\"061a2017\",\"7\":\"31d6cfe0\",\"8\":\"a9111f28\",\"9\":\"99c1fc9f\",\"10\":\"b968f5d5\",\"11\":\"8f4c32db\",\"12\":\"a97e13d0\",\"13\":\"f2c7a13b\",\"14\":\"ce10de93\",\"16\":\"789a128d\",\"17\":\"fb5cdbc2\",\"19\":\"ed8f7a59\",\"20\":\"175bee2a\",\"21\":\"8867122f\",\"22\":\"f08bc5f3\",\"23\":\"2b2824ba\",\"25\":\"31d6cfe0\",\"26\":\"73976871\",\"27\":\"31d6cfe0\",\"28\":\"42a89c77\",\"29\":\"bf839917\",\"30\":\"35e22f8c\",\"31\":\"57d8b033\"}[chunkId] + \".chunk.css\";\n \t\t\t\tvar fullhref = __webpack_require__.p + href;\n \t\t\t\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n \t\t\t\tfor(var i = 0; i < existingLinkTags.length; i++) {\n \t\t\t\t\tvar tag = existingLinkTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n \t\t\t\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return resolve();\n \t\t\t\t}\n \t\t\t\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n \t\t\t\tfor(var i = 0; i < existingStyleTags.length; i++) {\n \t\t\t\t\tvar tag = existingStyleTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\");\n \t\t\t\t\tif(dataHref === href || dataHref === fullhref) return resolve();\n \t\t\t\t}\n \t\t\t\tvar linkTag = document.createElement(\"link\");\n \t\t\t\tlinkTag.rel = \"stylesheet\";\n \t\t\t\tlinkTag.type = \"text/css\";\n \t\t\t\tlinkTag.onload = resolve;\n \t\t\t\tlinkTag.onerror = function(event) {\n \t\t\t\t\tvar request = event && event.target && event.target.src || fullhref;\n \t\t\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + request + \")\");\n \t\t\t\t\terr.request = request;\n \t\t\t\t\tdelete installedCssChunks[chunkId]\n \t\t\t\t\tlinkTag.parentNode.removeChild(linkTag)\n \t\t\t\t\treject(err);\n \t\t\t\t};\n \t\t\t\tlinkTag.href = fullhref;\n\n \t\t\t\tvar head = document.getElementsByTagName(\"head\")[0];\n \t\t\t\thead.appendChild(linkTag);\n \t\t\t}).then(function() {\n \t\t\t\tinstalledCssChunks[chunkId] = 0;\n \t\t\t}));\n \t\t}\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\tvar error = new Error('Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')');\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","installedCssChunks","18","exports","module","l","e","promises","0","1","2","3","4","6","8","9","10","11","12","13","14","16","17","19","20","21","22","23","26","28","29","30","31","Promise","resolve","reject","href","5","7","25","27","fullhref","p","existingLinkTags","document","getElementsByTagName","dataHref","tag","getAttribute","rel","existingStyleTags","linkTag","createElement","type","onload","onerror","event","request","target","src","err","Error","parentNode","removeChild","appendChild","then","installedChunkData","promise","onScriptComplete","script","charset","timeout","nc","setAttribute","jsonpScriptSrc","clearTimeout","chunk","errorType","realSrc","error","undefined","setTimeout","head","all","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","console","jsonpArray","window","oldJsonpFunction","slice"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI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AAoI,EAAAlI,OAAuBF,IAAAP,EAAA2I,EAAApI,IACvC,IAAAU,EAAA4H,EAIAxH","file":"static/js/runtime~main.7dae6868.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded CSS chunks\n \tvar installedCssChunks = {\n \t\t18: 0\n \t}\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t18: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"static/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\"}[chunkId]||chunkId) + \".\" + {\"0\":\"5ad51000\",\"1\":\"da3edf64\",\"2\":\"da982f82\",\"3\":\"b6b14ec2\",\"4\":\"954a0197\",\"5\":\"e7408258\",\"6\":\"a3016da1\",\"7\":\"c503b1f0\",\"8\":\"c84e2bbe\",\"9\":\"5d20f031\",\"10\":\"e678ace6\",\"11\":\"4f1c3903\",\"12\":\"6ae202e2\",\"13\":\"0ff2580f\",\"14\":\"35f0eebd\",\"16\":\"3a9f8bf2\",\"17\":\"96de9074\",\"19\":\"d9684d99\",\"20\":\"c5ea327d\",\"21\":\"3ca271e7\",\"22\":\"a6717ccf\",\"23\":\"0535da32\",\"25\":\"66a6cdfb\",\"26\":\"ad7bb673\",\"27\":\"48079d34\",\"28\":\"dc773ffa\",\"29\":\"76256aca\",\"30\":\"db405cf8\",\"31\":\"804baf53\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// mini-css-extract-plugin CSS loading\n \t\tvar cssChunks = {\"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,\"31\":1};\n \t\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n \t\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n \t\t\tpromises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {\n \t\t\t\tvar href = \"static/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\"}[chunkId]||chunkId) + \".\" + {\"0\":\"6d24aba4\",\"1\":\"5ed0fc89\",\"2\":\"5ce769bd\",\"3\":\"aeb3f822\",\"4\":\"280c19c2\",\"5\":\"31d6cfe0\",\"6\":\"061a2017\",\"7\":\"31d6cfe0\",\"8\":\"a9111f28\",\"9\":\"99c1fc9f\",\"10\":\"b968f5d5\",\"11\":\"8f4c32db\",\"12\":\"a97e13d0\",\"13\":\"f2c7a13b\",\"14\":\"ce10de93\",\"16\":\"789a128d\",\"17\":\"fb5cdbc2\",\"19\":\"ed8f7a59\",\"20\":\"175bee2a\",\"21\":\"8867122f\",\"22\":\"f08bc5f3\",\"23\":\"2b2824ba\",\"25\":\"31d6cfe0\",\"26\":\"73976871\",\"27\":\"31d6cfe0\",\"28\":\"42a89c77\",\"29\":\"bf839917\",\"30\":\"35e22f8c\",\"31\":\"57d8b033\"}[chunkId] + \".chunk.css\";\n \t\t\t\tvar fullhref = __webpack_require__.p + href;\n \t\t\t\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n \t\t\t\tfor(var i = 0; i < existingLinkTags.length; i++) {\n \t\t\t\t\tvar tag = existingLinkTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n \t\t\t\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return resolve();\n \t\t\t\t}\n \t\t\t\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n \t\t\t\tfor(var i = 0; i < existingStyleTags.length; i++) {\n \t\t\t\t\tvar tag = existingStyleTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\");\n \t\t\t\t\tif(dataHref === href || dataHref === fullhref) return resolve();\n \t\t\t\t}\n \t\t\t\tvar linkTag = document.createElement(\"link\");\n \t\t\t\tlinkTag.rel = \"stylesheet\";\n \t\t\t\tlinkTag.type = \"text/css\";\n \t\t\t\tlinkTag.onload = resolve;\n \t\t\t\tlinkTag.onerror = function(event) {\n \t\t\t\t\tvar request = event && event.target && event.target.src || fullhref;\n \t\t\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + request + \")\");\n \t\t\t\t\terr.request = request;\n \t\t\t\t\tdelete installedCssChunks[chunkId]\n \t\t\t\t\tlinkTag.parentNode.removeChild(linkTag)\n \t\t\t\t\treject(err);\n \t\t\t\t};\n \t\t\t\tlinkTag.href = fullhref;\n\n \t\t\t\tvar head = document.getElementsByTagName(\"head\")[0];\n \t\t\t\thead.appendChild(linkTag);\n \t\t\t}).then(function() {\n \t\t\t\tinstalledCssChunks[chunkId] = 0;\n \t\t\t}));\n \t\t}\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\tvar error = new Error('Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')');\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
\ No newline at end of file
!function(e){function r(r){for(var n,a,i=r[0],u=r[1],d=r[2],f=0,l=[];f<i.length;f++)a=i[f],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,d||[]),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,31:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="static/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:"6d24aba4",1:"5ed0fc89",2:"5ce769bd",3:"aeb3f822",4:"280c19c2",5:"31d6cfe0",6:"061a2017",7:"31d6cfe0",8:"a9111f28",9:"99c1fc9f",10:"b968f5d5",11:"8f4c32db",12:"a97e13d0",13:"f2c7a13b",14:"ce10de93",16:"789a128d",17:"fb5cdbc2",19:"ed8f7a59",20:"175bee2a",21:"8867122f",22:"f08bc5f3",23:"2b2824ba",25:"31d6cfe0",26:"73976871",27:"31d6cfe0",28:"42a89c77",29:"bf839917",30:"35e22f8c",31:"57d8b033"}[e]+".chunk.css",o=i.p+n,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var d=(s=c[u]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(d===n||d===o))return r()}var f=document.getElementsByTagName("style");for(u=0;u<f.length;u++){var s;if((d=(s=f[u]).getAttribute("data-href"))===n||d===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+"static/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:"9a184cbd",1:"dc10b929",2:"50c6b061",3:"b6b14ec2",4:"539d70c4",5:"50ccc0c5",6:"0269088f",7:"08abf5d9",8:"bb4ece84",9:"c423e386",10:"8322516d",11:"9e1ecb82",12:"6ae202e2",13:"ed17ab53",14:"a02f5c6f",16:"a16d3d05",17:"b3951208",19:"c639c060",20:"099c39b4",21:"e6eec39b",22:"38eac215",23:"5cde5b2a",25:"66a6cdfb",26:"ad7bb673",27:"48079d34",28:"f699c8ca",29:"95cc221c",30:"551081e6",31:"1f9a1906"}[e]+".chunk.js"}(e),c=function(r){u.onerror=u.onload=null,clearTimeout(d);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 d=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||[],d=u.push.bind(u);u.push=r,u=u.slice();for(var f=0;f<u.length;f++)r(u[f]);var s=d;t()}([]);
//# sourceMappingURL=runtime~main.be1b171d.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{1128:function(e,t,n){},1129:function(e,t,n){},1174:function(e,t,n){"use strict";n.r(t);var a=n(73),r=n.n(a),o=n(105),s=n(115),i=n(7),c=n(8),l=n(11),u=n(9),h=n(10),f=n(0),p=n.n(f),d=n(698),m=(n(1128),function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(c.a)(t,[{key:"render",value:function(){return p.a.createElement("span",Object.assign({className:"tag"},this.props),this.props.children)}}]),t}(f.PureComponent)),v=n(4),g=(n(1129),n(16)),y=n(63),C=function(e){function t(){var e,n;Object(i.a)(this,t);for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return(n=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(r)))).state={searchHistory:JSON.parse(localStorage.getItem("searchHistory"))||[],hot_words:[],searchList:[],value:"",isLoading:!0},n.clearHistory=function(){localStorage.setItem("searchHistory",null),n.setState({searchHistory:[]})},n.handleChange=function(e){n.setState({value:e})},n.handleSearch=function(){n.state.value&&n.props.history.push("/search-result?word=".concat(encodeURIComponent(n.state.value)))},n.storeHistory=function(e){localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(s.a)(n.state.searchHistory),[e])))},n}return Object(h.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=Object(o.a)(r.a.mark(function e(){var t;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.c.get("".concat(API["search-api"],"/search_hot_word"));case 2:0===(t=e.sent).data.errno&&this.setState({hot_words:t.data.data.info.hot_words,isLoading:!1});case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.state.searchHistory;return p.a.createElement("div",{className:"search-page"},p.a.createElement(d.a,{searchHistory:this.state.searchHistory,value:this.state.value,handleChange:this.handleChange,handleSearch:this.handleSearch}),p.a.createElement(y.a,{isLoading:this.state.isLoading},p.a.createElement("div",{className:"search-main"},p.a.createElement("div",{className:"search-land"},p.a.createElement("div",{className:"search-history"},p.a.createElement("span",null,"\u6700\u8fd1\u641c\u7d22"),p.a.createElement("i",{className:"iconfont iconiconfront-56",onClick:this.clearHistory})),p.a.createElement("div",{className:"search-tag"},t.length>0?t.map(function(e,t){return p.a.createElement(g.b,{key:t,to:"/search-result?word=".concat(encodeURIComponent(e))},p.a.createElement(m,null,e))}):p.a.createElement("div",{style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u5386\u53f2"))),p.a.createElement("div",{className:"search-land search-hot"},p.a.createElement("label",null,p.a.createElement("span",null,"\u70ed\u95e8\u641c\u7d22")),p.a.createElement("div",{className:"search-tag"},this.state.hot_words.length>0?this.state.hot_words.map(function(t,n){return p.a.createElement(g.b,{key:n,to:"/search-result?word=".concat(encodeURIComponent(t)),onClick:e.storeHistory.bind(e,t)},p.a.createElement(m,null,t))}):p.a.createElement("div",{style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u70ed\u95e8"))))))}}]),t}(f.PureComponent);t.default=C},577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,n){return"aria-"!==n.substr(0,5)&&"data-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t},{})},e.exports=t.default},582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,r=n(3),o=(a=r)&&a.__esModule?a:{default:a};t.getComponentLocale=function(e,t,n,a){var r={};if(t&&t.antLocale&&t.antLocale[n])r=t.antLocale[n];else{var s=a();r=s.default||s}var i=(0,o.default)({},r);e.locale&&(i=(0,o.default)({},i,e.locale),e.locale.lang&&(i.lang=(0,o.default)({},r.lang,e.locale.lang)));return i},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},600:function(e,t,n){"use strict";n(48),n(601)},601:function(e,t,n){},602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=g(n(3)),r=g(n(32)),o=g(n(5)),s=g(n(12)),i=g(n(6)),c=g(n(13)),l=g(n(15)),u=v(n(0)),h=v(n(2)),f=g(n(151)),p=g(n(577)),d=n(582),m=n(603);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){(0,o.default)(this,t);var n=(0,i.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onSubmit=function(e){e.preventDefault(),n.props.onSubmit&&n.props.onSubmit(n.state.value||""),n.inputRef&&n.inputRef.blur()},n.onChange=function(e){n.state.focus||n.setState({focus:!0});var t=e.target.value;"value"in n.props||n.setState({value:t}),n.props.onChange&&n.props.onChange(t)},n.onFocus=function(){n.setState({focus:!0}),n.firstFocus=!0,n.props.onFocus&&n.props.onFocus()},n.onBlur=function(){var e;n.onBlurTimeout=(e=function(){n.blurFromOnClear||document.activeElement!==n.inputRef&&n.setState({focus:!1}),n.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),n.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),n.props.onBlur())},n.onClear=function(){n.doClear()},n.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.blurFromOnClear=e,"value"in n.props||n.setState({value:""}),n.props.onClear&&n.props.onClear(""),n.props.onChange&&n.props.onChange(""),e&&n.focus()},n.onCancel=function(){n.props.onCancel?n.props.onCancel(n.state.value||""):n.doClear(!1)},n.focus=function(){n.inputRef&&n.inputRef.focus()};var a=void 0;return a="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",n.state={value:a,focus:!1},n}return(0,c.default)(t,e),(0,s.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,o=this.props,s=o.prefixCls,i=o.showCancelButton,c=o.disabled,h=o.placeholder,m=o.className,v=o.style,g=o.maxLength,y=(0,d.getComponentLocale)(this.props,this.context,"SearchBar",function(){return n(604)}).cancelText,C=this.state,b=C.value,w=C.focus,E=(0,l.default)(s,m,(0,r.default)({},s+"-start",!!(w||b&&b.length>0))),O=(0,l.default)(s+"-clear",(0,r.default)({},s+"-clear-show",!!(w&&b&&b.length>0))),R=(0,l.default)(s+"-cancel",(e={},(0,r.default)(e,s+"-cancel-show",!!(i||w||b&&b.length>0)),(0,r.default)(e,s+"-cancel-anim",this.firstFocus),e));return u.createElement("form",{onSubmit:this.onSubmit,className:E,style:v,ref:function(e){return t.inputContainerRef=e},action:"#"},u.createElement("div",{className:s+"-input"},u.createElement("div",{className:s+"-synthetic-ph",ref:function(e){return t.syntheticPhRef=e}},u.createElement("span",{className:s+"-synthetic-ph-container",ref:function(e){return t.syntheticPhContainerRef=e}},u.createElement("i",{className:s+"-synthetic-ph-icon"}),u.createElement("span",{className:s+"-synthetic-ph-placeholder",style:{visibility:h&&!b?"visible":"hidden"}},h))),u.createElement("input",(0,a.default)({type:"search",className:s+"-value",value:b,disabled:c,placeholder:h,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:g},(0,p.default)(this.props))),u.createElement(f.default,{activeClassName:s+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:O}))),u.createElement("div",{className:R,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||y))}}]),t}(u.Component);t.default=y,y.defaultProps=m.defaultProps,y.contextTypes={antLocale:h.object},e.exports=t.default},603:function(e,t,n){"use strict";function a(){}Object.defineProperty(t,"__esModule",{value:!0});t.defaultProps={prefixCls:"am-search",placeholder:"",onSubmit:a,onChange:a,onFocus:a,onBlur:a,onClear:a,showCancelButton:!1,disabled:!1}},604:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},698:function(e,t,n){"use strict";n(600);var a=n(602),r=n.n(a),o=n(115),s=n(7),i=n(8),c=n(11),l=n(9),u=n(10),h=n(0),f=n.n(h),p=n(52),d=(n(699),function(e){function t(){var e,n;Object(s.a)(this,t);for(var a=arguments.length,r=new Array(a),i=0;i<a;i++)r[i]=arguments[i];return(n=Object(c.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(r)))).returnPage=function(){n.props.history.go(-1)},n.search=function(){n.storeKeyword(),n.props.handleSearch()},n.storeKeyword=function(){var e=n.props,t=e.searchHistory,a=void 0===t?[]:t,r=e.value;r&&localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(o.a)(a),[r])))},n}return Object(u.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.refs.search.focus()}},{key:"render",value:function(){return f.a.createElement("div",{className:"search-head"},f.a.createElement("div",{className:"left",onClick:this.returnPage},f.a.createElement("i",{className:"iconfont iconiconfront-68"})),f.a.createElement("div",{className:"center"},f.a.createElement(r.a,{value:this.props.value,showCancelButton:!0,cancelText:" ",ref:"search",focus:!0,onChange:this.props.handleChange,placeholder:"\u641c\u7d22\u8bfe\u7a0b"})),f.a.createElement("div",{className:"right right-btn",onClick:this.search},f.a.createElement("div",{className:"submit-btn"},"\u641c\u7d22")))}}]),t}(h.PureComponent));t.a=Object(p.g)(d)},699:function(e,t,n){}}]);
//# sourceMappingURL=search.c639c060.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{1128:function(e,t,n){},1129:function(e,t,n){},1174:function(e,t,n){"use strict";n.r(t);var a=n(73),r=n.n(a),o=n(105),s=n(115),i=n(7),c=n(8),l=n(11),u=n(9),h=n(10),f=n(0),p=n.n(f),d=n(698),m=(n(1128),function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(c.a)(t,[{key:"render",value:function(){return p.a.createElement("span",Object.assign({className:"tag"},this.props),this.props.children)}}]),t}(f.PureComponent)),v=n(4),g=(n(1129),n(16)),y=n(63),C=function(e){function t(){var e,n;Object(i.a)(this,t);for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return(n=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(r)))).state={searchHistory:JSON.parse(localStorage.getItem("searchHistory"))||[],hot_words:[],searchList:[],value:"",isLoading:!0},n.clearHistory=function(){localStorage.setItem("searchHistory",null),n.setState({searchHistory:[]})},n.handleChange=function(e){n.setState({value:e})},n.handleSearch=function(){n.state.value&&n.props.history.push("/search-result?word=".concat(encodeURIComponent(n.state.value)))},n.storeHistory=function(e){localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(s.a)(n.state.searchHistory),[e])))},n}return Object(h.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=Object(o.a)(r.a.mark(function e(){var t;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.c.get("".concat(API["search-api"],"/search_hot_word"));case 2:0===(t=e.sent).data.errno&&this.setState({hot_words:t.data.data.info.hot_words,isLoading:!1});case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.state.searchHistory;return p.a.createElement("div",{className:"search-page"},p.a.createElement(d.a,{searchHistory:this.state.searchHistory,value:this.state.value,handleChange:this.handleChange,handleSearch:this.handleSearch}),p.a.createElement(y.a,{isLoading:this.state.isLoading},p.a.createElement("div",{className:"search-main"},p.a.createElement("div",{className:"search-land"},p.a.createElement("div",{className:"search-history"},p.a.createElement("span",null,"\u6700\u8fd1\u641c\u7d22"),p.a.createElement("i",{className:"iconfont iconiconfront-56",onClick:this.clearHistory})),p.a.createElement("div",{className:"search-tag"},t.length>0?t.map(function(e,t){return p.a.createElement(g.b,{key:t,to:"/search-result?word=".concat(encodeURIComponent(e))},p.a.createElement(m,null,e))}):p.a.createElement("div",{style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u5386\u53f2"))),p.a.createElement("div",{className:"search-land search-hot"},p.a.createElement("label",null,p.a.createElement("span",null,"\u70ed\u95e8\u641c\u7d22")),p.a.createElement("div",{className:"search-tag"},this.state.hot_words.length>0?this.state.hot_words.map(function(t,n){return p.a.createElement(g.b,{key:n,to:"/search-result?word=".concat(encodeURIComponent(t)),onClick:e.storeHistory.bind(e,t)},p.a.createElement(m,null,t))}):p.a.createElement("div",{style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u70ed\u95e8"))))))}}]),t}(f.PureComponent);t.default=C},577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,n){return"aria-"!==n.substr(0,5)&&"data-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t},{})},e.exports=t.default},582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,r=n(3),o=(a=r)&&a.__esModule?a:{default:a};t.getComponentLocale=function(e,t,n,a){var r={};if(t&&t.antLocale&&t.antLocale[n])r=t.antLocale[n];else{var s=a();r=s.default||s}var i=(0,o.default)({},r);e.locale&&(i=(0,o.default)({},i,e.locale),e.locale.lang&&(i.lang=(0,o.default)({},r.lang,e.locale.lang)));return i},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},600:function(e,t,n){"use strict";n(48),n(601)},601:function(e,t,n){},602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=g(n(3)),r=g(n(33)),o=g(n(5)),s=g(n(12)),i=g(n(6)),c=g(n(13)),l=g(n(15)),u=v(n(0)),h=v(n(2)),f=g(n(151)),p=g(n(577)),d=n(582),m=n(603);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){(0,o.default)(this,t);var n=(0,i.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onSubmit=function(e){e.preventDefault(),n.props.onSubmit&&n.props.onSubmit(n.state.value||""),n.inputRef&&n.inputRef.blur()},n.onChange=function(e){n.state.focus||n.setState({focus:!0});var t=e.target.value;"value"in n.props||n.setState({value:t}),n.props.onChange&&n.props.onChange(t)},n.onFocus=function(){n.setState({focus:!0}),n.firstFocus=!0,n.props.onFocus&&n.props.onFocus()},n.onBlur=function(){var e;n.onBlurTimeout=(e=function(){n.blurFromOnClear||document.activeElement!==n.inputRef&&n.setState({focus:!1}),n.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),n.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),n.props.onBlur())},n.onClear=function(){n.doClear()},n.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.blurFromOnClear=e,"value"in n.props||n.setState({value:""}),n.props.onClear&&n.props.onClear(""),n.props.onChange&&n.props.onChange(""),e&&n.focus()},n.onCancel=function(){n.props.onCancel?n.props.onCancel(n.state.value||""):n.doClear(!1)},n.focus=function(){n.inputRef&&n.inputRef.focus()};var a=void 0;return a="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",n.state={value:a,focus:!1},n}return(0,c.default)(t,e),(0,s.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,o=this.props,s=o.prefixCls,i=o.showCancelButton,c=o.disabled,h=o.placeholder,m=o.className,v=o.style,g=o.maxLength,y=(0,d.getComponentLocale)(this.props,this.context,"SearchBar",function(){return n(604)}).cancelText,C=this.state,b=C.value,w=C.focus,E=(0,l.default)(s,m,(0,r.default)({},s+"-start",!!(w||b&&b.length>0))),O=(0,l.default)(s+"-clear",(0,r.default)({},s+"-clear-show",!!(w&&b&&b.length>0))),R=(0,l.default)(s+"-cancel",(e={},(0,r.default)(e,s+"-cancel-show",!!(i||w||b&&b.length>0)),(0,r.default)(e,s+"-cancel-anim",this.firstFocus),e));return u.createElement("form",{onSubmit:this.onSubmit,className:E,style:v,ref:function(e){return t.inputContainerRef=e},action:"#"},u.createElement("div",{className:s+"-input"},u.createElement("div",{className:s+"-synthetic-ph",ref:function(e){return t.syntheticPhRef=e}},u.createElement("span",{className:s+"-synthetic-ph-container",ref:function(e){return t.syntheticPhContainerRef=e}},u.createElement("i",{className:s+"-synthetic-ph-icon"}),u.createElement("span",{className:s+"-synthetic-ph-placeholder",style:{visibility:h&&!b?"visible":"hidden"}},h))),u.createElement("input",(0,a.default)({type:"search",className:s+"-value",value:b,disabled:c,placeholder:h,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:g},(0,p.default)(this.props))),u.createElement(f.default,{activeClassName:s+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:O}))),u.createElement("div",{className:R,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||y))}}]),t}(u.Component);t.default=y,y.defaultProps=m.defaultProps,y.contextTypes={antLocale:h.object},e.exports=t.default},603:function(e,t,n){"use strict";function a(){}Object.defineProperty(t,"__esModule",{value:!0});t.defaultProps={prefixCls:"am-search",placeholder:"",onSubmit:a,onChange:a,onFocus:a,onBlur:a,onClear:a,showCancelButton:!1,disabled:!1}},604:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},698:function(e,t,n){"use strict";n(600);var a=n(602),r=n.n(a),o=n(115),s=n(7),i=n(8),c=n(11),l=n(9),u=n(10),h=n(0),f=n.n(h),p=n(52),d=(n(699),function(e){function t(){var e,n;Object(s.a)(this,t);for(var a=arguments.length,r=new Array(a),i=0;i<a;i++)r[i]=arguments[i];return(n=Object(c.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(r)))).returnPage=function(){n.props.history.go(-1)},n.search=function(){n.storeKeyword(),n.props.handleSearch()},n.storeKeyword=function(){var e=n.props,t=e.searchHistory,a=void 0===t?[]:t,r=e.value;r&&localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(o.a)(a),[r])))},n}return Object(u.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.refs.search.focus()}},{key:"render",value:function(){return f.a.createElement("div",{className:"search-head"},f.a.createElement("div",{className:"left",onClick:this.returnPage},f.a.createElement("i",{className:"iconfont iconiconfront-68"})),f.a.createElement("div",{className:"center"},f.a.createElement(r.a,{value:this.props.value,showCancelButton:!0,cancelText:" ",ref:"search",focus:!0,onChange:this.props.handleChange,placeholder:"\u641c\u7d22\u8bfe\u7a0b"})),f.a.createElement("div",{className:"right right-btn",onClick:this.search},f.a.createElement("div",{className:"submit-btn"},"\u641c\u7d22")))}}]),t}(h.PureComponent));t.a=Object(p.g)(d)},699:function(e,t,n){}}]);
//# sourceMappingURL=search.d9684d99.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["common/Tag/index.js","components/search/index.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","components/search/searchHead.js"],"names":["Tag","react_default","a","createElement","Object","assign","className","this","props","children","PureComponent","Search","state","searchHistory","JSON","parse","localStorage","getItem","hot_words","searchList","value","isLoading","clearHistory","setItem","_this","setState","handleChange","handleSearch","history","push","concat","encodeURIComponent","storeHistory","keyword","stringify","toConsumableArray","http","get","API","res","data","errno","info","_this2","searchHead","Loading","onClick","length","map","v","i","react_router_dom","key","to","Tag_Tag","style","textAlign","padding","bind","defineProperty","exports","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","call","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","e","preventDefault","inputRef","blur","onChange","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","document","activeElement","window","requestAnimationFrame","setTimeout","body","scrollTop","onClear","doClear","arguments","undefined","onCancel","defaultValue","rightBtnRef","initBtn","getComputedStyle","rightBtnInitMarginleft","marginLeft","componentDidUpdate","syntheticPhRef","inputContainerRef","indexOf","prefixCls","syntheticPhContainerRef","realWidth","getBoundingClientRect","width","Math","ceil","showCancelButton","marginRight","offsetWidth","parseInt","nextProps","nextFrameId","cancelAnimationFrame","clearTimeout","_classnames3","_props","disabled","placeholder","maxLength","cancelText","_state","wrapCls","clearCls","cancelCls","ref","el","action","visibility","type","activeClassName","Component","defaultProps","contextTypes","object","noop","SearchHead","returnPage","go","search","storeKeyword","_this$props","_this$props$searchHis","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MOD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AAMY,MAClBiI,kBAAgB,EAChBa,WAAY,IACZK,IAAI,SACJvD,OAAO,EACPD,SAAUxG,KAAKC,MAAMkB,aACrBsI,YAAY,8BAEpB2B,EAAAzL,EAAAC,cAAA,OAAKG,UAAU,kBAAkBwC,QAASvC,KAAK8K,QAC3CM,EAAAzL,EAAAC,cAAA,OAAKG,UAAU,cAAf,yBAxCKI,kBAgDVmL,gBAAWX","file":"static/js/search.c639c060.chunk.js","sourcesContent":["import React, { PureComponent } from 'react'\nimport './tag.scss'\nexport default class Tag extends PureComponent {\n render() {\n return (\n <span className=\"tag\" {...this.props}>\n {this.props.children}\n </span>\n )\n }\n}\n","import React, { PureComponent } from 'react';\nimport SearchHead from './searchHead'\nimport Tag from '@common/Tag/index.js'\nimport { http } from '@/utils'\nimport './index.scss';\nimport { Link } from 'react-router-dom'\nimport Loading from '@/common/Loading'\n\n\nclass Search extends PureComponent {\n\n state = {\n searchHistory: JSON.parse(localStorage.getItem('searchHistory')) || [],\n hot_words: [],\n searchList: [],\n value: '',\n isLoading: true\n }\n\n async componentDidMount() {\n const res = await http.get(`${API['search-api']}/search_hot_word`)\n if (res.data.errno === 0) {\n this.setState({\n hot_words: res.data.data.info.hot_words,\n isLoading: false\n })\n }\n }\n\n clearHistory = () => {\n localStorage.setItem('searchHistory', null)\n this.setState({\n searchHistory: []\n })\n }\n\n handleChange = value => {\n this.setState({value})\n }\n\n handleSearch = () => {\n this.state.value && this.props.history.push(`/search-result?word=${encodeURIComponent(this.state.value)}`)\n }\n\n storeHistory = keyword => {\n localStorage.setItem('searchHistory', JSON.stringify([...this.state.searchHistory, keyword]))\n }\n\n\n render() {\n const {searchHistory} = this.state\n return (\n <div className=\"search-page\">\n <SearchHead\n searchHistory={this.state.searchHistory}\n value={this.state.value}\n handleChange={this.handleChange}\n handleSearch={this.handleSearch}\n />\n <Loading isLoading={this.state.isLoading}>\n <div className=\"search-main\">\n <div className=\"search-land\">\n <div className='search-history'>\n <span>最近搜索</span>\n <i className=\"iconfont iconiconfront-56\" onClick={this.clearHistory}/>\n </div>\n <div className=\"search-tag\">\n {\n searchHistory.length > 0 ?\n searchHistory.map((v, i) => {\n return (\n <Link\n key={i}\n to={`/search-result?word=${encodeURIComponent(v)}`}\n >\n <Tag>{v}</Tag>\n </Link>\n )\n })\n : <div style={{textAlign: 'center', padding: '20px'}}>暂无历史</div>\n }\n </div>\n </div>\n <div className=\"search-land search-hot\">\n <label>\n <span>热门搜索</span>\n </label>\n <div className=\"search-tag\">\n {\n this.state['hot_words'].length > 0 ?\n this.state['hot_words'].map((v, i) => {\n return (\n <Link key={i}\n to={`/search-result?word=${encodeURIComponent(v)}`}\n onClick={this.storeHistory.bind(this, v)}\n >\n <Tag>{v}</Tag>\n </Link>\n )\n })\n : <div style={{textAlign: 'center', padding: '20px'}}>暂无热门</div>\n }\n </div>\n </div>\n </div>\n </Loading>\n\n </div>\n )\n }\n\n}\n\nexport default Search;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, { PureComponent } from 'react'\nimport { SearchBar } from 'antd-mobile'\nimport { withRouter } from 'react-router-dom'\n\nimport './search_header.scss'\n\nclass SearchHead extends PureComponent {\n\n returnPage = () => {\n this.props.history.go(-1)\n }\n\n componentDidMount() {\n this.refs.search.focus();\n }\n\n search = () => {\n this.storeKeyword()\n this.props.handleSearch()\n }\n\n storeKeyword = () => {\n let {searchHistory = [], value} = this.props\n value && localStorage.setItem('searchHistory', JSON.stringify([...searchHistory, value]))\n }\n\n\n render() {\n return (\n <div className=\"search-head\">\n\n <div className=\"left\" onClick={this.returnPage}>\n <i className=\"iconfont iconiconfront-68\"/>\n </div>\n\n <div className=\"center\">\n <SearchBar\n value={this.props.value}\n showCancelButton\n cancelText={\" \"}\n ref=\"search\"\n focus={true}\n onChange={this.props.handleChange}\n placeholder=\"搜索课程\"/>\n </div>\n <div className=\"right right-btn\" onClick={this.search}>\n <div className=\"submit-btn\">搜索\n </div>\n </div>\n </div>\n )\n }\n}\n\nexport default withRouter(SearchHead)"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["common/Tag/index.js","components/search/index.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","components/search/searchHead.js"],"names":["Tag","react_default","a","createElement","Object","assign","className","this","props","children","PureComponent","Search","state","searchHistory","JSON","parse","localStorage","getItem","hot_words","searchList","value","isLoading","clearHistory","setItem","_this","setState","handleChange","handleSearch","history","push","concat","encodeURIComponent","storeHistory","keyword","stringify","toConsumableArray","http","get","API","res","data","errno","info","_this2","searchHead","Loading","onClick","length","map","v","i","react_router_dom","key","to","Tag_Tag","style","textAlign","padding","bind","defineProperty","exports","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","call","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","e","preventDefault","inputRef","blur","onChange","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","document","activeElement","window","requestAnimationFrame","setTimeout","body","scrollTop","onClear","doClear","arguments","undefined","onCancel","defaultValue","rightBtnRef","initBtn","getComputedStyle","rightBtnInitMarginleft","marginLeft","componentDidUpdate","syntheticPhRef","inputContainerRef","indexOf","prefixCls","syntheticPhContainerRef","realWidth","getBoundingClientRect","width","Math","ceil","showCancelButton","marginRight","offsetWidth","parseInt","nextProps","nextFrameId","cancelAnimationFrame","clearTimeout","_classnames3","_props","disabled","placeholder","maxLength","cancelText","_state","wrapCls","clearCls","cancelCls","ref","el","action","visibility","type","activeClassName","Component","defaultProps","contextTypes","object","noop","SearchHead","returnPage","go","search","storeKeyword","_this$props","_this$props$searchHis","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__","refs","react__WEBPACK_IMPORTED_MODULE_8___default","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","withRouter"],"mappings":"sPAEqBA,4LAEb,OACIC,EAAAC,EAAAC,cAAA,OAAAC,OAAAC,OAAA,CAAMC,UAAU,OAAUC,KAAKC,OAC1BD,KAAKC,MAAMC,iBAJKC,mDCO3BC,6MAEFC,MAAQ,CACJC,cAAeC,KAAKC,MAAMC,aAAaC,QAAQ,mBAAqB,GACpEC,UAAW,GACXC,WAAY,GACZC,MAAO,GACPC,WAAW,KAafC,aAAe,WACXN,aAAaO,QAAQ,gBAAiB,MACtCC,EAAKC,SAAS,CACVZ,cAAe,QAIvBa,aAAe,SAAAN,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AAAkD,EACA5B,kBAAA,EACAU,UAAA,qCCfA3J,OAAAuD,eAAAC,EAAA,cACAxC,OAAA,IAEAwC,EAAA,SACAsG,WAAA,gBAEAjG,EAAAL,UAAA,6ICFMsH,qNAEFC,WAAa,WACT3J,EAAKhB,MAAMoB,QAAQwJ,IAAI,MAO3BC,OAAS,WACL7J,EAAK8J,eACL9J,EAAKhB,MAAMmB,kBAGf2J,aAAe,WAAM,IAAAC,EACiB/J,EAAKhB,MADtBgL,EAAAD,EACZ1K,qBADY,IAAA2K,EACI,GADJA,EACQpK,EADRmK,EACQnK,MACzBA,GAASJ,aAAaO,QAAQ,gBAAiBT,KAAKoB,UAAL,GAAAJ,OAAA1B,OAAAqL,EAAA,EAAArL,CAAmBS,GAAnB,CAAkCO,0FAVjFb,KAAKmL,KAAKL,OAAOrE,yCAejB,OACI2E,EAAAzL,EAAAC,cAAA,OAAKG,UAAU,eAEXqL,EAAAzL,EAAAC,cAAA,OAAKG,UAAU,OAAOwC,QAASvC,KAAK4K,YAChCQ,EAAAzL,EAAAC,cAAA,KAAGG,UAAU,+BAGjBqL,EAAAzL,EAAAC,cAAA,OAAKG,UAAU,UACXqL,EAAAzL,EAAAC,cAAAyL,EAAA1L,EAAA,CACIkB,MAAOb,KAAKC,MAAMY,MAClBiI,kBAAgB,EAChBa,WAAY,IACZK,IAAI,SACJvD,OAAO,EACPD,SAAUxG,KAAKC,MAAMkB,aACrBsI,YAAY,8BAEpB2B,EAAAzL,EAAAC,cAAA,OAAKG,UAAU,kBAAkBwC,QAASvC,KAAK8K,QAC3CM,EAAAzL,EAAAC,cAAA,OAAKG,UAAU,cAAf,yBAxCKI,kBAgDVmL,gBAAWX","file":"static/js/search.d9684d99.chunk.js","sourcesContent":["import React, { PureComponent } from 'react'\nimport './tag.scss'\nexport default class Tag extends PureComponent {\n render() {\n return (\n <span className=\"tag\" {...this.props}>\n {this.props.children}\n </span>\n )\n }\n}\n","import React, { PureComponent } from 'react';\nimport SearchHead from './searchHead'\nimport Tag from '@common/Tag/index.js'\nimport { http } from '@/utils'\nimport './index.scss';\nimport { Link } from 'react-router-dom'\nimport Loading from '@/common/Loading'\n\n\nclass Search extends PureComponent {\n\n state = {\n searchHistory: JSON.parse(localStorage.getItem('searchHistory')) || [],\n hot_words: [],\n searchList: [],\n value: '',\n isLoading: true\n }\n\n async componentDidMount() {\n const res = await http.get(`${API['search-api']}/search_hot_word`)\n if (res.data.errno === 0) {\n this.setState({\n hot_words: res.data.data.info.hot_words,\n isLoading: false\n })\n }\n }\n\n clearHistory = () => {\n localStorage.setItem('searchHistory', null)\n this.setState({\n searchHistory: []\n })\n }\n\n handleChange = value => {\n this.setState({value})\n }\n\n handleSearch = () => {\n this.state.value && this.props.history.push(`/search-result?word=${encodeURIComponent(this.state.value)}`)\n }\n\n storeHistory = keyword => {\n localStorage.setItem('searchHistory', JSON.stringify([...this.state.searchHistory, keyword]))\n }\n\n\n render() {\n const {searchHistory} = this.state\n return (\n <div className=\"search-page\">\n <SearchHead\n searchHistory={this.state.searchHistory}\n value={this.state.value}\n handleChange={this.handleChange}\n handleSearch={this.handleSearch}\n />\n <Loading isLoading={this.state.isLoading}>\n <div className=\"search-main\">\n <div className=\"search-land\">\n <div className='search-history'>\n <span>最近搜索</span>\n <i className=\"iconfont iconiconfront-56\" onClick={this.clearHistory}/>\n </div>\n <div className=\"search-tag\">\n {\n searchHistory.length > 0 ?\n searchHistory.map((v, i) => {\n return (\n <Link\n key={i}\n to={`/search-result?word=${encodeURIComponent(v)}`}\n >\n <Tag>{v}</Tag>\n </Link>\n )\n })\n : <div style={{textAlign: 'center', padding: '20px'}}>暂无历史</div>\n }\n </div>\n </div>\n <div className=\"search-land search-hot\">\n <label>\n <span>热门搜索</span>\n </label>\n <div className=\"search-tag\">\n {\n this.state['hot_words'].length > 0 ?\n this.state['hot_words'].map((v, i) => {\n return (\n <Link key={i}\n to={`/search-result?word=${encodeURIComponent(v)}`}\n onClick={this.storeHistory.bind(this, v)}\n >\n <Tag>{v}</Tag>\n </Link>\n )\n })\n : <div style={{textAlign: 'center', padding: '20px'}}>暂无热门</div>\n }\n </div>\n </div>\n </div>\n </Loading>\n\n </div>\n )\n }\n\n}\n\nexport default Search;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, { PureComponent } from 'react'\nimport { SearchBar } from 'antd-mobile'\nimport { withRouter } from 'react-router-dom'\n\nimport './search_header.scss'\n\nclass SearchHead extends PureComponent {\n\n returnPage = () => {\n this.props.history.go(-1)\n }\n\n componentDidMount() {\n this.refs.search.focus();\n }\n\n search = () => {\n this.storeKeyword()\n this.props.handleSearch()\n }\n\n storeKeyword = () => {\n let {searchHistory = [], value} = this.props\n value && localStorage.setItem('searchHistory', JSON.stringify([...searchHistory, value]))\n }\n\n\n render() {\n return (\n <div className=\"search-head\">\n\n <div className=\"left\" onClick={this.returnPage}>\n <i className=\"iconfont iconiconfront-68\"/>\n </div>\n\n <div className=\"center\">\n <SearchBar\n value={this.props.value}\n showCancelButton\n cancelText={\" \"}\n ref=\"search\"\n focus={true}\n onChange={this.props.handleChange}\n placeholder=\"搜索课程\"/>\n </div>\n <div className=\"right right-btn\" onClick={this.search}>\n <div className=\"submit-btn\">搜索\n </div>\n </div>\n </div>\n )\n }\n}\n\nexport default withRouter(SearchHead)"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{1152:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),i=a.n(n),s=a(7),r=a(8),c=a(11),o=a(9),l=a(159),d=a(10),m=a(0),g=a.n(m),u=(a(859),a(33)),h=a(4),v=a(860),f=a.n(v),p=function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(c.a)(this,Object(o.a)(t).call(this,e))).initCanvas=function(e,t){var n=Object(l.a)(a),i=e[t].poster,s=450*e[t].header_position_x,r=800*e[t].header_position_y,c=(e[t].qr_code_x,e[t].qr_code_y,e[t].qr_code_width,e[t].qr_code_height,"/detail/".concat(Object(h.b)("courseId"),"/").concat(Object(h.b)("dist_code")),document.getElementById("canvas")),o=c.getContext("2d");n.getBase64(i).then(function(a){var i=new Image;i.src=a;var c=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)?c=document.getElementById("qrcode"):/(Android)/i.test(navigator.userAgent)&&(c=document.getElementById("qrcode")),i.setAttribute("crossOrigin","anonymous"),i.onload=function(){o.drawImage(i,0,0,450,800),o.drawImage(c,320,685,100,100),o.fillStyle=e[t].username_color,o.font="16px serif",o.fillText("@"+n.name,s+50+20,r+25),o.font="14px serif",o.fillText("\u6b63\u5728\u5b66\u4e60\u8be5\u8bfe\u7a0b",s+50+20,r+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,s,r,24),o.drawImage(t,s,r,48,48),o.restore(),n.setState({billSrc:n.convertCanvasToImage(c)})}})})},a.children=function(e,t){var a=e.childNodes,n=[];if(/MSIE(6|7|8)/.test(navigator.userAgent))for(var i=0;i<a.length;i++){var s=a[i];1===s.nodeType&&(n[n.length]=s)}else n=Array.prototype.slice.call(e.children);if("string"===typeof t)for(var r=0;r<n.length;r++)(e=n[r]).nodeName.toLowerCase()!==t.toLowerCase()&&(n.splice(r,1),r--);return n},a.imgPosition=function(e,t,a,n,i){e.save();var s=a+i,r=n+i;e.beginPath(),e.arc(s,r,i,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(d.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.getCodeWe(),h.c.get("".concat(API.home,"/m/dist/posters/").concat(Object(h.b)("courseId"),"/").concat(Object(h.b)("uid"))).then(function(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)):i.a.info(t.data.msg,2)})}},{key:"getCodeWe",value:function(){var e=this,t="http://m.julyedu.com/detail/".concat(Object(h.b)("courseId"),"/").concat(Object(h.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,i=new Image,s=+new Date;i.setAttribute("crossOrigin","anonymous"),i.src=e+"?"+s,i.onload=function(){n=t.getBase64Image(i),a(n)},i.onerror=function(){var a=+new Date;t.getBase64(e+"?"+a)}})}},{key:"render",value:function(){var e=this;return g.a.createElement("div",{className:"share-poster"},g.a.createElement(u.e,{title:"\u751f\u6210\u4e13\u5c5e\u6d77\u62a5",arrow:!0,cart:!1}),g.a.createElement("div",{className:"total-container"},g.a.createElement("div",{className:"placard-img-container",id:"imgWrapper"},g.a.createElement("img",{src:this.state.billSrc.src,alt:""})),g.a.createElement("img",{src:this.state.codeSrc,alt:"",id:"qrcode",className:"placard-code"}),g.a.createElement("canvas",{id:"canvas",width:"450",height:"800",className:""===this.state.billSrc?"":"hide"})),g.a.createElement("div",{className:"placard-desc"},g.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===this.state.distPrice.count_type&&g.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97",this.state.distPrice.first_level_tip,"\u5143\u7684\u4f63\u91d1\u5956\u52b1\u3002"),1===this.state.distPrice.count_type&&g.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97\u6210\u4ea4\u91d1\u989d\u7684",this.state.distPrice.first_level_scale,"%\u4f5c\u4e3a\u4f63\u91d1\u5956\u52b1\u3002"))),g.a.createElement("div",{className:"placard-swiper"},g.a.createElement("ul",{className:"placard-list"},this.state.smallListImg&&this.state.smallListImg.length>0&&this.state.smallListImg.map(function(t,a){return g.a.createElement("li",{onClick:e.squareClick.bind(e,a),key:a,className:e.state.smallactive===a?"active":""},g.a.createElement("img",{src:t.square,alt:""}))}))))}}]),t}(m.Component);t.default=p},859:function(e,t,a){}}]);
//# sourceMappingURL=shareposter.099c39b4.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{1152:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),i=a.n(n),s=a(7),r=a(8),c=a(11),o=a(9),l=a(159),d=a(10),m=a(0),g=a.n(m),u=(a(859),a(30)),h=a(4),v=a(860),f=a.n(v),p=function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(c.a)(this,Object(o.a)(t).call(this,e))).initCanvas=function(e,t){var n=Object(l.a)(a),i=e[t].poster,s=450*e[t].header_position_x,r=800*e[t].header_position_y,c=(e[t].qr_code_x,e[t].qr_code_y,e[t].qr_code_width,e[t].qr_code_height,"/detail/".concat(Object(h.b)("courseId"),"/").concat(Object(h.b)("dist_code")),document.getElementById("canvas")),o=c.getContext("2d");n.getBase64(i).then(function(a){var i=new Image;i.src=a;var c=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)?c=document.getElementById("qrcode"):/(Android)/i.test(navigator.userAgent)&&(c=document.getElementById("qrcode")),i.setAttribute("crossOrigin","anonymous"),i.onload=function(){o.drawImage(i,0,0,450,800),o.drawImage(c,320,685,100,100),o.fillStyle=e[t].username_color,o.font="16px serif",o.fillText("@"+n.name,s+50+20,r+25),o.font="14px serif",o.fillText("\u6b63\u5728\u5b66\u4e60\u8be5\u8bfe\u7a0b",s+50+20,r+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,s,r,24),o.drawImage(t,s,r,48,48),o.restore(),n.setState({billSrc:n.convertCanvasToImage(c)})}})})},a.children=function(e,t){var a=e.childNodes,n=[];if(/MSIE(6|7|8)/.test(navigator.userAgent))for(var i=0;i<a.length;i++){var s=a[i];1===s.nodeType&&(n[n.length]=s)}else n=Array.prototype.slice.call(e.children);if("string"===typeof t)for(var r=0;r<n.length;r++)(e=n[r]).nodeName.toLowerCase()!==t.toLowerCase()&&(n.splice(r,1),r--);return n},a.imgPosition=function(e,t,a,n,i){e.save();var s=a+i,r=n+i;e.beginPath(),e.arc(s,r,i,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(d.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.getCodeWe(),h.c.get("".concat(API.home,"/m/dist/posters/").concat(Object(h.b)("courseId"),"/").concat(Object(h.b)("uid"))).then(function(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)):i.a.info(t.data.msg,2)})}},{key:"getCodeWe",value:function(){var e=this,t="http://m.julyedu.com/detail/".concat(Object(h.b)("courseId"),"/").concat(Object(h.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,i=new Image,s=+new Date;i.setAttribute("crossOrigin","anonymous"),i.src=e+"?"+s,i.onload=function(){n=t.getBase64Image(i),a(n)},i.onerror=function(){var a=+new Date;t.getBase64(e+"?"+a)}})}},{key:"render",value:function(){var e=this;return g.a.createElement("div",{className:"share-poster"},g.a.createElement(u.e,{title:"\u751f\u6210\u4e13\u5c5e\u6d77\u62a5",arrow:!0,cart:!1}),g.a.createElement("div",{className:"total-container"},g.a.createElement("div",{className:"placard-img-container",id:"imgWrapper"},g.a.createElement("img",{src:this.state.billSrc.src,alt:""})),g.a.createElement("img",{src:this.state.codeSrc,alt:"",id:"qrcode",className:"placard-code"}),g.a.createElement("canvas",{id:"canvas",width:"450",height:"800",className:""===this.state.billSrc?"":"hide"})),g.a.createElement("div",{className:"placard-desc"},g.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===this.state.distPrice.count_type&&g.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97",this.state.distPrice.first_level_tip,"\u5143\u7684\u4f63\u91d1\u5956\u52b1\u3002"),1===this.state.distPrice.count_type&&g.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97\u6210\u4ea4\u91d1\u989d\u7684",this.state.distPrice.first_level_scale,"%\u4f5c\u4e3a\u4f63\u91d1\u5956\u52b1\u3002"))),g.a.createElement("div",{className:"placard-swiper"},g.a.createElement("ul",{className:"placard-list"},this.state.smallListImg&&this.state.smallListImg.length>0&&this.state.smallListImg.map(function(t,a){return g.a.createElement("li",{onClick:e.squareClick.bind(e,a),key:a,className:e.state.smallactive===a?"active":""},g.a.createElement("img",{src:t.square,alt:""}))}))))}}]),t}(m.Component);t.default=p},859:function(e,t,a){}}]);
//# sourceMappingURL=shareposter.c5ea327d.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/sharePoster/index.js"],"names":["SharePoster","props","_this2","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","initCanvas","imgList","index","_this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__","imgSrc1","poster","avatarPositionX","header_position_x","avatarPositionY","header_position_y","canvas","qr_code_x","qr_code_y","qr_code_width","qr_code_height","concat","getParam","document","getElementById","context","getContext","getBase64","then","img","bgImage","Image","src","qrCodeImg","ua","navigator","userAgent","toLowerCase","indexOf","match","test","setAttribute","onload","drawImage","fillStyle","username_color","font","fillText","name","avatarHeight","restore","state","imgUrl","imgPosition","setState","billSrc","convertCanvasToImage","children","curEle","tagName","nodeList","childNodes","ary","i","length","curNode","nodeType","Array","prototype","slice","k","nodeName","splice","ctx","x","y","r","save","cx","cy","beginPath","arc","Math","PI","clip","getBase64Image","createElement","width","height","ext","substring","lastIndexOf","toDataURL","image","squareClick","smallactive","codeSrc","smallListImg","distPrice","_this3","getCodeWe","http","get","API","home","res","data","code","avatar","list","dist_course","username","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","qrCodeLink","Promise","resolve","QRCode","err","url","base64","timeStamp","Date","onerror","_this4","react__WEBPACK_IMPORTED_MODULE_8___default","className","_common__WEBPACK_IMPORTED_MODULE_10__","title","arrow","cart","id","alt","count_type","first_level_tip","first_level_scale","map","item","onClick","bind","key","square","Component"],"mappings":"sOASMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAgCVQ,WAAa,SAACC,EAASC,GACnB,IAAIC,EAAKT,OAA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,EAAA3B,cAAA,MAAI0C,UAAU,gBAEN/H,KAAKkD,MAAM8C,cAAgBhG,KAAKkD,MAAM8C,aAAajC,OAAS,GAAK/D,KAAKkD,MAAM8C,aAAayC,IAAI,SAACC,EAAMpI,GAChG,OACIwH,EAAAd,EAAA3B,cAAA,MAAIsD,QAASd,EAAKhC,YAAY+C,KAAKf,EAAMvH,GAAQuI,IAAKvI,EAClDyH,UAAWF,EAAK3E,MAAM4C,cAAgBxF,EAAQ,SAAW,IACzDwH,EAAAd,EAAA3B,cAAA,OAAKtD,IAAK2G,EAAKI,OAAQT,IAAI,kBA7PzCU,aA0QXpJ","file":"static/js/shareposter.099c39b4.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport './index.scss'\nimport {HeaderBar} from '../../common'\nimport {http, api, getParam} from '@/utils'\nimport QRCode from 'qrcode'\nimport { Toast} from 'antd-mobile'\n\n\n\nclass SharePoster extends Component {\n constructor(props) {\n super(props)\n this.state = {\n codeSrc: '',\n billSrc: '', // 图片链接\n imgUrl: '',\n smallListImg: [], // 小图片地址\n smallactive: 0, // 小图选中标记\n distPrice: '', // 分销价格\n name: '', // 用户姓名\n bgImage: [] // 背景图\n }\n }\n\n componentDidMount() {\n this.getCodeWe()\n http.get(`${API.home}/m/dist/posters/${getParam('courseId')}/${getParam('uid')}`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n imgUrl: res.data.data.avatar,\n smallListImg: res.data.data.list,\n distPrice: res.data.data.dist_course,\n bgImage: res.data.data.list,\n name: res.data.data.username\n })\n this.initCanvas(this.state.bgImage, 0)\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n // 初始化海报\n initCanvas = (imgList, index) => {\n let _this = this;\n let imgSrc1 = imgList[index].poster;\n let $width = 450;\n let $height = 800;\n let avatarWidth = 50 // imgList[index].poster_width // 头像宽度\n let avatarHeight = 50 // imgList[index].poster_height // 头像高度\n let avatarPositionX = (imgList[index].header_position_x * $width) // 头像x轴位置\n let avatarPositionY = (imgList[index].header_position_y * $height) // 头像Y轴位置\n\n let qrCodePositionX = imgList[index].qr_code_x * $width // 二维码x轴位置\n let qrCodePositionY = imgList[index].qr_code_y * $height // 二维码y轴位置\n let qrCodeWidth = (imgList[index].qr_code_width * $width) // 二维码宽度\n let qrCodeHeight = (imgList[index].qr_code_height * $height) - avatarHeight / 2 // 二维码高度\n\n let qrCodeLink = `/detail/${getParam('courseId')}/${getParam('dist_code')}`\n\n var canvas = document.getElementById(\"canvas\"),\n context = canvas.getContext(\"2d\");\n\n _this.getBase64(imgSrc1)\n // 背景图片合成\n .then((img) => {\n let bgImage = new Image();\n bgImage.src = img;\n let qrCodeImg = document.getElementById('qrcode');\n let ua = navigator.userAgent.toLowerCase();\n // Android终端\n let isAndroid = ua.indexOf('Android') > -1 || ua.indexOf('Adr') > -1;\n // Ios终端\n let isiOS = !!ua.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/);\n if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {\n qrCodeImg = document.getElementById('qrcode');\n } else if (/(Android)/i.test(navigator.userAgent)) {\n //Android终端\n qrCodeImg = document.getElementById('qrcode');\n\n }\n\n bgImage.setAttribute('crossOrigin', 'anonymous');\n bgImage.onload = function () {\n context.drawImage(bgImage, 0, 0, 450, 800);\n context.drawImage(qrCodeImg, 320, 685, 100, 100);\n context.fillStyle = imgList[index].username_color;\n context.font = \"16px serif\";\n context.fillText('@' + _this.name, (avatarPositionX + avatarWidth) + 20, (avatarPositionY + avatarHeight / 2));\n context.font = \"14px serif\";\n context.fillText('正在学习该课程', (avatarPositionX + avatarWidth) + 20, (avatarPositionY + avatarHeight / 2) + 20);\n context.restore();\n }\n\n })\n // 头像生成\n .then(() => {\n _this.getBase64(_this.state.imgUrl)\n .then((img) => {\n let bgImage = new Image();\n bgImage.src = img;\n bgImage.setAttribute('crossOrigin', 'anonymous');\n bgImage.setAttribute('border-Radius', '50%');\n bgImage.onload = function () {\n _this.imgPosition(context, bgImage, avatarPositionX, avatarPositionY, 24);\n context.drawImage(bgImage, avatarPositionX, avatarPositionY, 48, 48);\n context.restore();\n _this.setState({\n billSrc: _this.convertCanvasToImage(canvas)\n })\n\n }\n })\n\n })\n }\n children = (curEle, tagName) => {\n var nodeList = curEle.childNodes;\n var ary = [];\n if (/MSIE(6|7|8)/.test(navigator.userAgent)) {\n for (var i = 0; i < nodeList.length; i++) {\n var curNode = nodeList[i];\n if (curNode.nodeType === 1) {\n ary[ary.length] = curNode;\n }\n }\n } else {\n ary = Array.prototype.slice.call(curEle.children);\n }\n\n // 获取指定子元素\n if (typeof tagName === \"string\") {\n for (var k = 0; k < ary.length; k++) {\n curEle = ary[k];\n if (curEle.nodeName.toLowerCase() !== tagName.toLowerCase()) {\n ary.splice(k, 1);\n k--;\n }\n }\n }\n\n return ary;\n }\n\n // 合成图片位置\n imgPosition = (ctx, img, x, y, r) => {\n ctx.save();\n var d = 2 * r;\n var cx = x + r;\n var cy = y + r;\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, 2 * Math.PI);\n ctx.clip();\n }\n\n // 获取二维码\n getCodeWe() {\n let _this = this\n let qrCodeLink = `http://m.julyedu.com/detail/${getParam('courseId')}/${getParam('dist_code')}`\n return new Promise(resolve => {\n QRCode.toDataURL(qrCodeLink, {}, function (err, url) {\n _this.setState({\n codeSrc: url\n })\n })\n /*\n let qrcode = new QRCode(document.getElementById('qrcode'), {\n text: qrCodeLink,\n width: 160,\n height: 160,\n colorDark: \"#000000\", // 生成的二维码的深色部分\n colorLight: \"#ffffff\", //生成二维码的浅色部分\n })\n */\n resolve()\n })\n }\n\n // 图片路径转成base64\n getBase64(img) {\n let _this = this;\n return new Promise(resolve => {\n let base64 = null;\n let image = new Image();\n let timeStamp = +new Date();\n image.setAttribute('crossOrigin', 'anonymous');\n image.src = img + '?' + timeStamp;\n image.onload = () => {\n base64 = _this.getBase64Image(image)\n resolve(base64)\n }\n image.onerror = function () {\n let timeStamp = +new Date();\n _this.getBase64(img + '?' + timeStamp);\n }\n })\n\n }\n\n // 图片路径放入canvas转成base64\n getBase64Image = (img) => {\n let canvas = document.createElement(\"canvas\");\n canvas.width = img.width;\n canvas.height = img.height;\n\n let ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0, img.width, img.height);\n let ext = img.src.substring(img.src.lastIndexOf(\".\") + 1).toLowerCase();\n let dataURL = canvas.toDataURL(\"image/\" + ext);\n return dataURL;\n }\n\n // canvas转换成img图片\n convertCanvasToImage = (canvas) => {\n let image = new Image();\n image.src = canvas.toDataURL(\"image/png\");\n return image;\n }\n\n // 小图切换\n squareClick = (index) => {\n this.setState({\n smallactive: index\n })\n this.initCanvas(this.state.bgImage, index);\n\n }\n\n render() {\n return (\n <div className='share-poster'>\n <HeaderBar title='生成专属海报' arrow={true} cart={false}></HeaderBar>\n <div className=\"total-container\">\n <div className='placard-img-container' id='imgWrapper'>\n <img src={this.state.billSrc.src} alt=\"\"/>\n </div>\n <img src={this.state.codeSrc} alt=\"\" id='qrcode' className='placard-code'/>\n <canvas id='canvas' width='450' height='800'\n className={this.state.billSrc === '' ? '' : 'hide'}></canvas>\n </div>\n <div className='placard-desc'>\n <span className='placard-sharetxt'>\n 长按保存海报分享给好友,每有一人通过您的分享购买该课程,您可以\n {\n this.state.distPrice.count_type === 0 &&\n <span className='placard-price'>获得{this.state.distPrice.first_level_tip}元的佣金奖励。</span>\n }\n {\n this.state.distPrice.count_type === 1 &&\n <span\n className='placard-price'>获得成交金额的{this.state.distPrice.first_level_scale}%作为佣金奖励。</span>\n }\n </span>\n </div>\n\n <div className='placard-swiper'>\n <ul className='placard-list'>\n {\n this.state.smallListImg && this.state.smallListImg.length > 0 && this.state.smallListImg.map((item, index) => {\n return (\n <li onClick={this.squareClick.bind(this, index)} key={index}\n className={this.state.smallactive === index ? 'active' : ''}>\n <img src={item.square} alt=\"\"/>\n </li>\n )\n })\n }\n </ul>\n </div>\n\n </div>\n )\n }\n}\n\nexport default SharePoster\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/sharePoster/index.js"],"names":["SharePoster","props","_this2","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","initCanvas","imgList","index","_this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__","imgSrc1","poster","avatarPositionX","header_position_x","avatarPositionY","header_position_y","canvas","qr_code_x","qr_code_y","qr_code_width","qr_code_height","concat","getParam","document","getElementById","context","getContext","getBase64","then","img","bgImage","Image","src","qrCodeImg","ua","navigator","userAgent","toLowerCase","indexOf","match","test","setAttribute","onload","drawImage","fillStyle","username_color","font","fillText","name","avatarHeight","restore","state","imgUrl","imgPosition","setState","billSrc","convertCanvasToImage","children","curEle","tagName","nodeList","childNodes","ary","i","length","curNode","nodeType","Array","prototype","slice","k","nodeName","splice","ctx","x","y","r","save","cx","cy","beginPath","arc","Math","PI","clip","getBase64Image","createElement","width","height","ext","substring","lastIndexOf","toDataURL","image","squareClick","smallactive","codeSrc","smallListImg","distPrice","_this3","getCodeWe","http","get","API","home","res","data","code","avatar","list","dist_course","username","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","qrCodeLink","Promise","resolve","QRCode","err","url","base64","timeStamp","Date","onerror","_this4","react__WEBPACK_IMPORTED_MODULE_8___default","className","_common__WEBPACK_IMPORTED_MODULE_10__","title","arrow","cart","id","alt","count_type","first_level_tip","first_level_scale","map","item","onClick","bind","key","square","Component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,UAAU,iBAAhB,eAAmC/H,KAAKkD,MAAM+C,UAAUsC,gBAAxD,8CAGoC,IAApCvI,KAAKkD,MAAM+C,UAAUqC,YACrBR,EAAAd,EAAA3B,cAAA,QACI0C,UAAU,iBADd,6CACsC/H,KAAKkD,MAAM+C,UAAUuC,kBAD3D,iDAMZV,EAAAd,EAAA3B,cAAA,OAAK0C,UAAU,kBACXD,EAAAd,EAAA3B,cAAA,MAAI0C,UAAU,gBAEN/H,KAAKkD,MAAM8C,cAAgBhG,KAAKkD,MAAM8C,aAAajC,OAAS,GAAK/D,KAAKkD,MAAM8C,aAAayC,IAAI,SAACC,EAAMpI,GAChG,OACIwH,EAAAd,EAAA3B,cAAA,MAAIsD,QAASd,EAAKhC,YAAY+C,KAAKf,EAAMvH,GAAQuI,IAAKvI,EAClDyH,UAAWF,EAAK3E,MAAM4C,cAAgBxF,EAAQ,SAAW,IACzDwH,EAAAd,EAAA3B,cAAA,OAAKtD,IAAK2G,EAAKI,OAAQT,IAAI,kBA7PzCU,aA0QXpJ","file":"static/js/shareposter.c5ea327d.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport './index.scss'\nimport {HeaderBar} from '../../common'\nimport {http, api, getParam} from '@/utils'\nimport QRCode from 'qrcode'\nimport { Toast} from 'antd-mobile'\n\n\n\nclass SharePoster extends Component {\n constructor(props) {\n super(props)\n this.state = {\n codeSrc: '',\n billSrc: '', // 图片链接\n imgUrl: '',\n smallListImg: [], // 小图片地址\n smallactive: 0, // 小图选中标记\n distPrice: '', // 分销价格\n name: '', // 用户姓名\n bgImage: [] // 背景图\n }\n }\n\n componentDidMount() {\n this.getCodeWe()\n http.get(`${API.home}/m/dist/posters/${getParam('courseId')}/${getParam('uid')}`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n imgUrl: res.data.data.avatar,\n smallListImg: res.data.data.list,\n distPrice: res.data.data.dist_course,\n bgImage: res.data.data.list,\n name: res.data.data.username\n })\n this.initCanvas(this.state.bgImage, 0)\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n // 初始化海报\n initCanvas = (imgList, index) => {\n let _this = this;\n let imgSrc1 = imgList[index].poster;\n let $width = 450;\n let $height = 800;\n let avatarWidth = 50 // imgList[index].poster_width // 头像宽度\n let avatarHeight = 50 // imgList[index].poster_height // 头像高度\n let avatarPositionX = (imgList[index].header_position_x * $width) // 头像x轴位置\n let avatarPositionY = (imgList[index].header_position_y * $height) // 头像Y轴位置\n\n let qrCodePositionX = imgList[index].qr_code_x * $width // 二维码x轴位置\n let qrCodePositionY = imgList[index].qr_code_y * $height // 二维码y轴位置\n let qrCodeWidth = (imgList[index].qr_code_width * $width) // 二维码宽度\n let qrCodeHeight = (imgList[index].qr_code_height * $height) - avatarHeight / 2 // 二维码高度\n\n let qrCodeLink = `/detail/${getParam('courseId')}/${getParam('dist_code')}`\n\n var canvas = document.getElementById(\"canvas\"),\n context = canvas.getContext(\"2d\");\n\n _this.getBase64(imgSrc1)\n // 背景图片合成\n .then((img) => {\n let bgImage = new Image();\n bgImage.src = img;\n let qrCodeImg = document.getElementById('qrcode');\n let ua = navigator.userAgent.toLowerCase();\n // Android终端\n let isAndroid = ua.indexOf('Android') > -1 || ua.indexOf('Adr') > -1;\n // Ios终端\n let isiOS = !!ua.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/);\n if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {\n qrCodeImg = document.getElementById('qrcode');\n } else if (/(Android)/i.test(navigator.userAgent)) {\n //Android终端\n qrCodeImg = document.getElementById('qrcode');\n\n }\n\n bgImage.setAttribute('crossOrigin', 'anonymous');\n bgImage.onload = function () {\n context.drawImage(bgImage, 0, 0, 450, 800);\n context.drawImage(qrCodeImg, 320, 685, 100, 100);\n context.fillStyle = imgList[index].username_color;\n context.font = \"16px serif\";\n context.fillText('@' + _this.name, (avatarPositionX + avatarWidth) + 20, (avatarPositionY + avatarHeight / 2));\n context.font = \"14px serif\";\n context.fillText('正在学习该课程', (avatarPositionX + avatarWidth) + 20, (avatarPositionY + avatarHeight / 2) + 20);\n context.restore();\n }\n\n })\n // 头像生成\n .then(() => {\n _this.getBase64(_this.state.imgUrl)\n .then((img) => {\n let bgImage = new Image();\n bgImage.src = img;\n bgImage.setAttribute('crossOrigin', 'anonymous');\n bgImage.setAttribute('border-Radius', '50%');\n bgImage.onload = function () {\n _this.imgPosition(context, bgImage, avatarPositionX, avatarPositionY, 24);\n context.drawImage(bgImage, avatarPositionX, avatarPositionY, 48, 48);\n context.restore();\n _this.setState({\n billSrc: _this.convertCanvasToImage(canvas)\n })\n\n }\n })\n\n })\n }\n children = (curEle, tagName) => {\n var nodeList = curEle.childNodes;\n var ary = [];\n if (/MSIE(6|7|8)/.test(navigator.userAgent)) {\n for (var i = 0; i < nodeList.length; i++) {\n var curNode = nodeList[i];\n if (curNode.nodeType === 1) {\n ary[ary.length] = curNode;\n }\n }\n } else {\n ary = Array.prototype.slice.call(curEle.children);\n }\n\n // 获取指定子元素\n if (typeof tagName === \"string\") {\n for (var k = 0; k < ary.length; k++) {\n curEle = ary[k];\n if (curEle.nodeName.toLowerCase() !== tagName.toLowerCase()) {\n ary.splice(k, 1);\n k--;\n }\n }\n }\n\n return ary;\n }\n\n // 合成图片位置\n imgPosition = (ctx, img, x, y, r) => {\n ctx.save();\n var d = 2 * r;\n var cx = x + r;\n var cy = y + r;\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, 2 * Math.PI);\n ctx.clip();\n }\n\n // 获取二维码\n getCodeWe() {\n let _this = this\n let qrCodeLink = `http://m.julyedu.com/detail/${getParam('courseId')}/${getParam('dist_code')}`\n return new Promise(resolve => {\n QRCode.toDataURL(qrCodeLink, {}, function (err, url) {\n _this.setState({\n codeSrc: url\n })\n })\n /*\n let qrcode = new QRCode(document.getElementById('qrcode'), {\n text: qrCodeLink,\n width: 160,\n height: 160,\n colorDark: \"#000000\", // 生成的二维码的深色部分\n colorLight: \"#ffffff\", //生成二维码的浅色部分\n })\n */\n resolve()\n })\n }\n\n // 图片路径转成base64\n getBase64(img) {\n let _this = this;\n return new Promise(resolve => {\n let base64 = null;\n let image = new Image();\n let timeStamp = +new Date();\n image.setAttribute('crossOrigin', 'anonymous');\n image.src = img + '?' + timeStamp;\n image.onload = () => {\n base64 = _this.getBase64Image(image)\n resolve(base64)\n }\n image.onerror = function () {\n let timeStamp = +new Date();\n _this.getBase64(img + '?' + timeStamp);\n }\n })\n\n }\n\n // 图片路径放入canvas转成base64\n getBase64Image = (img) => {\n let canvas = document.createElement(\"canvas\");\n canvas.width = img.width;\n canvas.height = img.height;\n\n let ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0, img.width, img.height);\n let ext = img.src.substring(img.src.lastIndexOf(\".\") + 1).toLowerCase();\n let dataURL = canvas.toDataURL(\"image/\" + ext);\n return dataURL;\n }\n\n // canvas转换成img图片\n convertCanvasToImage = (canvas) => {\n let image = new Image();\n image.src = canvas.toDataURL(\"image/png\");\n return image;\n }\n\n // 小图切换\n squareClick = (index) => {\n this.setState({\n smallactive: index\n })\n this.initCanvas(this.state.bgImage, index);\n\n }\n\n render() {\n return (\n <div className='share-poster'>\n <HeaderBar title='生成专属海报' arrow={true} cart={false}></HeaderBar>\n <div className=\"total-container\">\n <div className='placard-img-container' id='imgWrapper'>\n <img src={this.state.billSrc.src} alt=\"\"/>\n </div>\n <img src={this.state.codeSrc} alt=\"\" id='qrcode' className='placard-code'/>\n <canvas id='canvas' width='450' height='800'\n className={this.state.billSrc === '' ? '' : 'hide'}></canvas>\n </div>\n <div className='placard-desc'>\n <span className='placard-sharetxt'>\n 长按保存海报分享给好友,每有一人通过您的分享购买该课程,您可以\n {\n this.state.distPrice.count_type === 0 &&\n <span className='placard-price'>获得{this.state.distPrice.first_level_tip}元的佣金奖励。</span>\n }\n {\n this.state.distPrice.count_type === 1 &&\n <span\n className='placard-price'>获得成交金额的{this.state.distPrice.first_level_scale}%作为佣金奖励。</span>\n }\n </span>\n </div>\n\n <div className='placard-swiper'>\n <ul className='placard-list'>\n {\n this.state.smallListImg && this.state.smallListImg.length > 0 && this.state.smallListImg.map((item, index) => {\n return (\n <li onClick={this.squareClick.bind(this, index)} key={index}\n className={this.state.smallactive === index ? 'active' : ''}>\n <img src={item.square} alt=\"\"/>\n </li>\n )\n })\n }\n </ul>\n </div>\n\n </div>\n )\n }\n}\n\nexport default SharePoster\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{1170:function(e,t,a){"use strict";a.r(t);var n=a(7),s=a(8),o=a(11),r=a(9),i=a(10),l=a(0),c=a.n(l),u=(a(776),a(16)),p=a(52),d=a(641),m=(a(777),a(154)),h=a(20),f=a(83),v=a(643),b=a.n(v),y=a(40),E=a(33);var g=c.a.memo(function(e){var t=e.addCourseClick;return c.a.createElement("div",{className:"add-course"},c.a.createElement("button",{className:"add",onClick:t},"\u6dfb\u52a0\u8bfe\u7a0b+"))});function L(e){var t=e.record,a=t.seconds,n=t.lesson_name,s="";if(n){var o=/\u7b2c[\s\S]+?\u8bfe/.exec(n);s+=o&&o[0]?o[0]:""}if(a){var r=function(e){return{hour:Math.floor(e/3600),min:Math.floor(e/60)%60,sec:e%60}}(a);s+=(r.hour?String(r.hour).padStart(2,"0")+":":"")+(r.min?String(r.min).padStart(2,"0")+":":"")+(r.sec?String(r.sec).padStart(2,"0"):"")}return c.a.createElement("span",{className:"record"},s.length?"\u5b66\u4e60\u5230".concat(s):null)}var w=c.a.memo(function(e){var t=e.item;if(t.ago||t.seconds){var a=new Date(1e3*t.ago),n=Object(m.isToday)(a)?Object(m.format)(a,"HH\u65f6mm\u5206"):Object(m.format)(a,"MM\u6708DD\u65e5");return c.a.createElement("div",{className:"des"},c.a.createElement("span",{className:"time"},n),c.a.createElement(L,{record:t}))}return c.a.createElement("button",{className:"start-learn"},"\u5f00\u59cb\u5b66\u4e60")}),C=function(e){function t(){var e,a;Object(n.a)(this,t);for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).state={isLoading:!0},a.handleClick=function(e){a.props.history.push("/play/video?id=".concat(e))},a.addCourseClick=function(){a.props.history.push("/classify")},a.loadFunc=Object(y.debounce)(function(){a.props.courseList.length%10===0&&a.props.fetchCoursesListIfNeeded()},200),a}return Object(i.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.props.switchTab(!1),this.props.fetchCoursesListIfNeeded()}},{key:"componentWillUnmount",value:function(){this.props.switchTab(!0)}},{key:"render",value:function(){var e=this,t=this.props.courseList;return c.a.createElement(E.f,{isLoading:this.props.isLoading},t&&0!==t.length?c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"my-course-uid"},"\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a".concat(this.props.user.data.uid)),c.a.createElement(b.a,{pageStart:0,hasMore:!0,loadMore:this.loadFunc,useWindow:!1},c.a.createElement("ul",{ref:function(t){return e.list=t}},t.map(function(t,a){var n=c.a.createElement("div",{className:"info"},c.a.createElement("div",{className:"title"},t.course_title),t.is_aist?c.a.createElement("div",{className:"contact"},"\u52a9\u6559\u5fae\u4fe1\uff1a",t.assist_weixin):c.a.createElement("div",{className:"contact"},"QQ\u7fa4\uff1a",t.course_qq),t.is_aist&&t.aist_schedule&&c.a.createElement("div",{className:"process-status"},c.a.createElement("div",{className:"process-wrapper"},c.a.createElement("div",{className:"process-bar",style:{width:"".concat(parseFloat(t.aist_schedule),"%")}})),c.a.createElement("div",{className:"process-text"},t.aist_schedule)),c.a.createElement(w,{item:t})),s=t.is_aist&&c.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return c.a.createElement(d.a,Object.assign({img:t.image_name,handleClick:e.handleClick},t,{key:a,info:n,status:s,id:t.course_id}))}))),t.length%10!==0?c.a.createElement(g,{addCourseClick:this.addCourseClick}):null):c.a.createElement("div",{className:"empty"},c.a.createElement("p",null,c.a.createElement("i",{className:"iconfont iconfish"})),c.a.createElement("p",{className:"empty-prompt"},"\u8fd8\u662f\u54b8\u9c7c\u4e00\u6761\uff0c\u5feb\u53bb\u7ffb\u8eab~"),c.a.createElement("p",null,c.a.createElement(u.b,{className:"select-course",to:"/classify"},"\u53bb\u9009\u8bfe"))))}}]),t}(l.PureComponent),N=Object(h.b)(function(e){return{courseList:e.myCourses.courseList,user:e.user,isLoading:e.myCourses.isLoading}},{fetchCoursesListIfNeeded:f.e,switchTab:f.f})(C),k=(a(44),a(14)),O=a.n(k),_=(a(778),function(e){return c.a.createElement("li",{className:"course-base-item ".concat(e.className),onClick:e.handleClick.bind(void 0,e.id)},e.top,c.a.createElement("img",{src:e.img,alt:""}),c.a.createElement("p",{className:"course-title"},e.title),e.bottom)}),S=a(4),j=a(15),P=a.n(j),M=(a(779),function(e){return c.a.createElement("div",{className:"bottom"},c.a.createElement(E.h,{className:e.className},e.text),c.a.createElement("span",null,e.audience,"\u4eba\u89c2\u770b"))}),T=function(e){function t(){var e,a;Object(n.a)(this,t);for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).state={courses:[],live:[],page:1,num:10},a.handleClick=function(e){a.props.history.push("/play?id=".concat(e))},a.getFreeCourses=function(){return S.c.get("".concat(API.home,"/m/free_course/").concat(a.state.page,"/").concat(a.state.num))},a.getFreeLive=function(){return S.c.get("".concat(API.home,"/m/live/free_list"))},a.toLive=function(e){var t=e.room_id;e.live_status?window.location.assign("http://www-test.julyedu.com/live/m_room/".concat(t)):O.a.info("\u76f4\u64ad\u5373\u5c06\u5f00\u59cb\uff0c\u656c\u8bf7\u671f\u5f85",2,null,!1)},a}return Object(i.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.getFreeCourses().then(function(t){var a=t.data;200==a.code?e.setState({courses:a.data}):O.a.info(a.msg)}),this.getFreeLive().then(function(t){var a=t.data;200==a.code?e.setState({live:Object(y.isEmpty)(a.data)?[]:a.data}):O.a.info(a.msg,2,null,!1)})}},{key:"render",value:function(){var e=this;return c.a.createElement("ul",{className:"free-courses"},this.state.live.map(function(t,a){var n=c.a.createElement("div",{className:"bottom"},c.a.createElement("div",{className:"animation-box"},new Array(4).fill("a").map(function(e,t){return c.a.createElement("i",{key:t,className:P()("column","column-".concat(t+1))})})),c.a.createElement("div",{className:"time"},"".concat(t.live_start_time))),s=t.live_status?c.a.createElement(E.h,{className:"tag-soon top"},"\u5373\u5c06\u5f00\u59cb"):c.a.createElement(E.h,{className:"tag-playing top"},"\u6b63\u5728\u76f4\u64ad");return c.a.createElement(_,{img:t.live_cover,title:t.live_title,top:s,bottom:n,key:t.live_id,className:"live",handleClick:e.toLive.bind(e,t),id:a})}),this.state.courses.map(function(t,a){return c.a.createElement(_,{img:t.logo,title:t.video_course_name,handleClick:e.handleClick,bottom:c.a.createElement(M,{audience:t.play_times,className:"tag-category",text:t.category}),id:t.v_course_id,key:a,className:"course-item"})}))}}]),t}(l.PureComponent),x=a(162),W=a(156),H=a(23),R=function(e){function t(){var e,a;Object(n.a)(this,t);for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).state={position:{}},a}return Object(i.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.match;return c.a.createElement("section",{id:"study"},c.a.createElement("div",{className:"tab"},c.a.createElement("div",null,c.a.createElement(u.c,{to:"".concat(e.url,"/my-course"),replace:!0,activeClassName:"active"},"\u6211\u7684\u8bfe\u7a0b")),c.a.createElement("div",null,c.a.createElement(u.c,{to:"".concat(e.url,"/free-course"),replace:!0,activeClassName:"active"},"\u514d\u8d39\u8bfe\u7a0b"))),c.a.createElement("div",{className:"study-container"},c.a.createElement(p.d,null,c.a.createElement(p.a,{exact:!0,from:"/study",to:"study/my-course"}),c.a.createElement(p.b,{path:"".concat(this.props.match.path,"/my-course"),component:N}),c.a.createElement(p.b,{path:"".concat(this.props.match.path,"/free-course"),component:T}))))}}]),t}(l.Component);t.default=Object(H.d)(W.a,x.a)(R)},641:function(e,t,a){"use strict";var n=a(0),s=a.n(n);a(642);t.a=function(e){return s.a.createElement("li",{className:"v-list-base-item",onClick:e.handleClick.bind(void 0,e.id)},s.a.createElement("div",{className:"content"},s.a.createElement("div",{className:"cover"},e.status,s.a.createElement("img",{src:e.img,alt:""})),e.info),e.tab)}},642:function(e,t,a){},643:function(e,t,a){e.exports=a(644)},644:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),s=a(0),o=i(s),r=i(a(2));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.scrollListener=a.scrollListener.bind(a),a.eventListenerOptions=a.eventListenerOptions.bind(a),a.mousewheelListener=a.mousewheelListener.bind(a),a}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.Component),n(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(a){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,a=this.getParentElement(e),n=void 0;if(this.props.useWindow){var s=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:s.scrollTop;n=this.props.isReverse?o:this.calculateOffset(e,o)}else n=this.props.isReverse?a.scrollTop:e.scrollHeight-a.scrollTop-a.clientHeight;n<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=a.scrollHeight,this.beforeScrollTop=a.scrollTop,"function"===typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),a=t.children,n=t.element,s=t.hasMore,r=(t.initialLoad,t.isReverse),i=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var a={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[a];return s&&(i?r?u.unshift(i):u.push(i):this.defaultLoader&&(r?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(n,c,u)}}]),t}();l.propTypes={children:r.default.node.isRequired,element:r.default.node,hasMore:r.default.bool,initialLoad:r.default.bool,isReverse:r.default.bool,loader:r.default.node,loadMore:r.default.func.isRequired,pageStart:r.default.number,ref:r.default.func,getScrollParent:r.default.func,threshold:r.default.number,useCapture:r.default.bool,useWindow:r.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},776:function(e,t,a){},777:function(e,t,a){},778:function(e,t,a){},779:function(e,t,a){}}]);
//# sourceMappingURL=study.e6eec39b.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{1170:function(e,t,a){"use strict";a.r(t);var n=a(7),s=a(8),o=a(11),r=a(9),i=a(10),l=a(0),c=a.n(l),u=(a(776),a(16)),p=a(52),d=a(641),m=(a(777),a(154)),h=a(20),f=a(83),v=a(643),b=a.n(v),y=a(40),E=a(30);var g=c.a.memo(function(e){var t=e.addCourseClick;return c.a.createElement("div",{className:"add-course"},c.a.createElement("button",{className:"add",onClick:t},"\u6dfb\u52a0\u8bfe\u7a0b+"))});function L(e){var t=e.record,a=t.seconds,n=t.lesson_name,s="";if(n){var o=/\u7b2c[\s\S]+?\u8bfe/.exec(n);s+=o&&o[0]?o[0]:""}if(a){var r=function(e){return{hour:Math.floor(e/3600),min:Math.floor(e/60)%60,sec:e%60}}(a);s+=(r.hour?String(r.hour).padStart(2,"0")+":":"")+(r.min?String(r.min).padStart(2,"0")+":":"")+(r.sec?String(r.sec).padStart(2,"0"):"")}return c.a.createElement("span",{className:"record"},s.length?"\u5b66\u4e60\u5230".concat(s):null)}var w=c.a.memo(function(e){var t=e.item;if(t.ago||t.seconds){var a=new Date(1e3*t.ago),n=Object(m.isToday)(a)?Object(m.format)(a,"HH\u65f6mm\u5206"):Object(m.format)(a,"MM\u6708DD\u65e5");return c.a.createElement("div",{className:"des"},c.a.createElement("span",{className:"time"},n),c.a.createElement(L,{record:t}))}return c.a.createElement("button",{className:"start-learn"},"\u5f00\u59cb\u5b66\u4e60")}),C=function(e){function t(){var e,a;Object(n.a)(this,t);for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).state={isLoading:!0},a.handleClick=function(e){a.props.history.push("/play/video?id=".concat(e))},a.addCourseClick=function(){a.props.history.push("/classify")},a.loadFunc=Object(y.debounce)(function(){a.props.courseList.length%10===0&&a.props.fetchCoursesListIfNeeded()},200),a}return Object(i.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.props.switchTab(!1),this.props.fetchCoursesListIfNeeded()}},{key:"componentWillUnmount",value:function(){this.props.switchTab(!0)}},{key:"render",value:function(){var e=this,t=this.props.courseList;return c.a.createElement(E.f,{isLoading:this.props.isLoading},t&&0!==t.length?c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"my-course-uid"},"\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a".concat(this.props.user.data.uid)),c.a.createElement(b.a,{pageStart:0,hasMore:!0,loadMore:this.loadFunc,useWindow:!1},c.a.createElement("ul",{ref:function(t){return e.list=t}},t.map(function(t,a){var n=c.a.createElement("div",{className:"info"},c.a.createElement("div",{className:"title"},t.course_title),t.is_aist?c.a.createElement("div",{className:"contact"},"\u52a9\u6559\u5fae\u4fe1\uff1a",t.assist_weixin):c.a.createElement("div",{className:"contact"},"QQ\u7fa4\uff1a",t.course_qq),t.is_aist&&t.aist_schedule&&c.a.createElement("div",{className:"process-status"},c.a.createElement("div",{className:"process-wrapper"},c.a.createElement("div",{className:"process-bar",style:{width:"".concat(parseFloat(t.aist_schedule),"%")}})),c.a.createElement("div",{className:"process-text"},t.aist_schedule)),c.a.createElement(w,{item:t})),s=t.is_aist&&c.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return c.a.createElement(d.a,Object.assign({img:t.image_name,handleClick:e.handleClick},t,{key:a,info:n,status:s,id:t.course_id}))}))),t.length%10!==0?c.a.createElement(g,{addCourseClick:this.addCourseClick}):null):c.a.createElement("div",{className:"empty"},c.a.createElement("p",null,c.a.createElement("i",{className:"iconfont iconfish"})),c.a.createElement("p",{className:"empty-prompt"},"\u8fd8\u662f\u54b8\u9c7c\u4e00\u6761\uff0c\u5feb\u53bb\u7ffb\u8eab~"),c.a.createElement("p",null,c.a.createElement(u.b,{className:"select-course",to:"/classify"},"\u53bb\u9009\u8bfe"))))}}]),t}(l.PureComponent),N=Object(h.b)(function(e){return{courseList:e.myCourses.courseList,user:e.user,isLoading:e.myCourses.isLoading}},{fetchCoursesListIfNeeded:f.e,switchTab:f.f})(C),k=(a(44),a(14)),O=a.n(k),_=(a(778),function(e){return c.a.createElement("li",{className:"course-base-item ".concat(e.className),onClick:e.handleClick.bind(void 0,e.id)},e.top,c.a.createElement("img",{src:e.img,alt:""}),c.a.createElement("p",{className:"course-title"},e.title),e.bottom)}),S=a(4),j=a(15),P=a.n(j),M=(a(779),function(e){return c.a.createElement("div",{className:"bottom"},c.a.createElement(E.h,{className:e.className},e.text),c.a.createElement("span",null,e.audience,"\u4eba\u89c2\u770b"))}),T=function(e){function t(){var e,a;Object(n.a)(this,t);for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).state={courses:[],live:[],page:1,num:10},a.handleClick=function(e){a.props.history.push("/play?id=".concat(e))},a.getFreeCourses=function(){return S.c.get("".concat(API.home,"/m/free_course/").concat(a.state.page,"/").concat(a.state.num))},a.getFreeLive=function(){return S.c.get("".concat(API.home,"/m/live/free_list"))},a.toLive=function(e){var t=e.room_id;e.live_status?window.location.assign("http://www-test.julyedu.com/live/m_room/".concat(t)):O.a.info("\u76f4\u64ad\u5373\u5c06\u5f00\u59cb\uff0c\u656c\u8bf7\u671f\u5f85",2,null,!1)},a}return Object(i.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.getFreeCourses().then(function(t){var a=t.data;200==a.code?e.setState({courses:a.data}):O.a.info(a.msg)}),this.getFreeLive().then(function(t){var a=t.data;200==a.code?e.setState({live:Object(y.isEmpty)(a.data)?[]:a.data}):O.a.info(a.msg,2,null,!1)})}},{key:"render",value:function(){var e=this;return c.a.createElement("ul",{className:"free-courses"},this.state.live.map(function(t,a){var n=c.a.createElement("div",{className:"bottom"},c.a.createElement("div",{className:"animation-box"},new Array(4).fill("a").map(function(e,t){return c.a.createElement("i",{key:t,className:P()("column","column-".concat(t+1))})})),c.a.createElement("div",{className:"time"},"".concat(t.live_start_time))),s=t.live_status?c.a.createElement(E.h,{className:"tag-soon top"},"\u5373\u5c06\u5f00\u59cb"):c.a.createElement(E.h,{className:"tag-playing top"},"\u6b63\u5728\u76f4\u64ad");return c.a.createElement(_,{img:t.live_cover,title:t.live_title,top:s,bottom:n,key:t.live_id,className:"live",handleClick:e.toLive.bind(e,t),id:a})}),this.state.courses.map(function(t,a){return c.a.createElement(_,{img:t.logo,title:t.video_course_name,handleClick:e.handleClick,bottom:c.a.createElement(M,{audience:t.play_times,className:"tag-category",text:t.category}),id:t.v_course_id,key:a,className:"course-item"})}))}}]),t}(l.PureComponent),x=a(162),W=a(156),H=a(23),R=function(e){function t(){var e,a;Object(n.a)(this,t);for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).state={position:{}},a}return Object(i.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.match;return c.a.createElement("section",{id:"study"},c.a.createElement("div",{className:"tab"},c.a.createElement("div",null,c.a.createElement(u.c,{to:"".concat(e.url,"/my-course"),replace:!0,activeClassName:"active"},"\u6211\u7684\u8bfe\u7a0b")),c.a.createElement("div",null,c.a.createElement(u.c,{to:"".concat(e.url,"/free-course"),replace:!0,activeClassName:"active"},"\u514d\u8d39\u8bfe\u7a0b"))),c.a.createElement("div",{className:"study-container"},c.a.createElement(p.d,null,c.a.createElement(p.a,{exact:!0,from:"/study",to:"study/my-course"}),c.a.createElement(p.b,{path:"".concat(this.props.match.path,"/my-course"),component:N}),c.a.createElement(p.b,{path:"".concat(this.props.match.path,"/free-course"),component:T}))))}}]),t}(l.Component);t.default=Object(H.d)(W.a,x.a)(R)},641:function(e,t,a){"use strict";var n=a(0),s=a.n(n);a(642);t.a=function(e){return s.a.createElement("li",{className:"v-list-base-item",onClick:e.handleClick.bind(void 0,e.id)},s.a.createElement("div",{className:"content"},s.a.createElement("div",{className:"cover"},e.status,s.a.createElement("img",{src:e.img,alt:""})),e.info),e.tab)}},642:function(e,t,a){},643:function(e,t,a){e.exports=a(644)},644:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),s=a(0),o=i(s),r=i(a(2));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.scrollListener=a.scrollListener.bind(a),a.eventListenerOptions=a.eventListenerOptions.bind(a),a.mousewheelListener=a.mousewheelListener.bind(a),a}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.Component),n(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(a){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,a=this.getParentElement(e),n=void 0;if(this.props.useWindow){var s=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:s.scrollTop;n=this.props.isReverse?o:this.calculateOffset(e,o)}else n=this.props.isReverse?a.scrollTop:e.scrollHeight-a.scrollTop-a.clientHeight;n<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=a.scrollHeight,this.beforeScrollTop=a.scrollTop,"function"===typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),a=t.children,n=t.element,s=t.hasMore,r=(t.initialLoad,t.isReverse),i=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var a={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[a];return s&&(i?r?u.unshift(i):u.push(i):this.defaultLoader&&(r?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(n,c,u)}}]),t}();l.propTypes={children:r.default.node.isRequired,element:r.default.node,hasMore:r.default.bool,initialLoad:r.default.bool,isReverse:r.default.bool,loader:r.default.node,loadMore:r.default.func.isRequired,pageStart:r.default.number,ref:r.default.func,getScrollParent:r.default.func,threshold:r.default.number,useCapture:r.default.bool,useWindow:r.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},776:function(e,t,a){},777:function(e,t,a){},778:function(e,t,a){},779:function(e,t,a){}}]);
//# sourceMappingURL=study.3ca271e7.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/study/myCourses/index.js","common/course-base/index.js","components/study/freeCourses/index.js","components/study/index.js","common/v-list-base/index.js","../node_modules/react-infinite-scroller/index.js","../node_modules/react-infinite-scroller/dist/InfiniteScroll.js"],"names":["AddCourse","React","memo","_ref","addCourseClick","react_default","a","createElement","className","onClick","Record","_ref2","_ref2$record","record","seconds","lesson_name","result","matchResult","exec","studyTime","hour","Math","floor","min","sec","getStudyTime","String","padStart","length","concat","Bottom","_ref3","item","ago","date","Date","time","isToday","format","MyCourses","state","isLoading","handleClick","id","_this","props","history","push","loadFunc","debounce","courseList","fetchCoursesListIfNeeded","this","switchTab","_this2","list","common","Fragment","user","data","uid","react_infinite_scroller_default","pageStart","hasMore","loadMore","useWindow","ref","el","map","index","Info","course_title","is_aist","assist_weixin","course_qq","aist_schedule","style","width","parseFloat","myCourses_Bottom","status","v_list_base","Object","assign","img","image_name","key","info","react_router_dom","to","PureComponent","connect","myCourses","Course","bind","top","src","alt","title","bottom","text","audience","FreeCourse","courses","live","page","num","getFreeCourses","http","get","API","home","getFreeLive","toLive","room_id","live_status","window","location","toast_default","then","res","code","setState","msg","isEmpty","_this3","Array","fill","classnames","LiveStatus","common_course_base","logo","freeCourses_Bottom","category","Study","position","match","url","replace","activeClassName","react_router","exact","from","path","component","FreeCourses","Component","compose","WithFullSize","WithTab","VList","react__WEBPACK_IMPORTED_MODULE_0___default","tab","module","exports","__webpack_require__","defineProperty","value","_createClass","defineProperties","target","i","descriptor","enumerable","configurable","writable","Constructor","protoProps","staticProps","prototype","_react","_react2","_interopRequireDefault","_propTypes2","obj","__esModule","default","InfiniteScroll","_Component","instance","TypeError","_classCallCheck","self","call","ReferenceError","_possibleConstructorReturn","__proto__","getPrototypeOf","scrollListener","eventListenerOptions","mousewheelListener","subClass","superClass","create","constructor","setPrototypeOf","_inherits","pageLoaded","options","attachScrollListener","isReverse","parentElement","getParentElement","scrollComponent","scrollTop","scrollHeight","beforeScrollHeight","beforeScrollTop","detachScrollListener","detachMousewheelListener","passive","testOptions","document","addEventListener","removeEventListener","e","useCapture","isPassiveSupported","loader","defaultLoader","scrollEl","parentNode","scrollParent","getScrollParent","initialLoad","deltaY","preventDefault","offset","doc","documentElement","body","undefined","pageYOffset","calculateOffset","clientHeight","Number","threshold","offsetParent","calculateTopPosition","offsetHeight","innerHeight","offsetTop","renderProps","filterProps","children","element","keys","indexOf","hasOwnProperty","_objectWithoutProperties","node","childrenArray","unshift","propTypes","isRequired","bool","func","number","defaultProps"],"mappings":"kQAoBA,IAAMA,EAAYC,IAAMC,KAAK,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":"static/js/study.e6eec39b.chunk.js","sourcesContent":["import React, { PureComponent } from \"react\"\nimport VList from '@/common/v-list-base'\nimport './my-courses.scss'\nimport { isToday, format } from \"date-fns\"\nimport { connect } from \"react-redux\"\nimport { fetchCoursesListIfNeeded, switchTab } from \"./actions\"\nimport InfiniteScroll from 'react-infinite-scroller'\nimport { debounce } from 'lodash'\nimport { Link } from 'react-router-dom'\nimport { Loading } from \"@/common\";\n\n\nfunction getStudyTime(seconds) {\n return {\n hour: Math.floor(seconds / (60 * 60)),\n min: Math.floor(seconds / 60) % 60,\n sec: seconds % 60\n }\n}\n\nconst AddCourse = React.memo(({addCourseClick}) => (\n <div className='add-course'>\n <button className='add' onClick={addCourseClick}>添加课程+</button>\n </div>\n))\n\nfunction Record({record: {seconds, lesson_name}}) {\n let re = /第[\\s\\S]+?课/,\n result = ''\n\n if (lesson_name) {\n let matchResult = re.exec(lesson_name)\n result += (matchResult && matchResult[0]) ? matchResult[0] : ''\n }\n\n if (seconds) {\n let studyTime = getStudyTime(seconds)\n let hour = studyTime.hour ? String(studyTime.hour).padStart(2, '0') + ':' : '',\n min = studyTime.min ? String(studyTime.min).padStart(2, '0') + ':' : '',\n sec = studyTime.sec ? String(studyTime.sec).padStart(2, '0') : ''\n\n result += hour + min + sec\n }\n\n return (\n <span className={'record'}>\n {\n result.length ? `学习到${result}` : null\n }\n </span>\n )\n}\n\n\nconst Bottom = React.memo(({item}) => {\n if (item.ago || item.seconds) {\n let date = new Date(item.ago * 1000)\n let time = isToday(date) ? format(date, 'HH时mm分') : format(date, 'MM月DD日')\n return (\n <div className=\"des\">\n <span className='time'>{time}</span>\n <Record record={item}/>\n </div>\n )\n }\n return (\n <button className='start-learn'>开始学习</button>\n )\n})\n\nclass MyCourses extends PureComponent {\n\n list\n\n state = {\n isLoading: true\n }\n\n handleClick = id => {\n this.props.history.push(`/play/video?id=${id}`)\n }\n addCourseClick = () => {\n this.props.history.push('/classify')\n }\n\n componentDidMount() {\n this.props.switchTab(false)\n this.props.fetchCoursesListIfNeeded()\n }\n\n componentWillUnmount() {\n this.props.switchTab(true);\n }\n\n loadFunc = debounce(() => {\n if (this.props.courseList.length % 10 === 0) {\n this.props.fetchCoursesListIfNeeded()\n }\n }, 200)\n\n render() {\n let list = this.props.courseList\n\n return <Loading isLoading={this.props.isLoading}>\n {\n list && list.length !== 0\n ?\n <>\n <div className=\"my-course-uid\">\n {`加群请备注您的学号:${this.props.user.data.uid}`}\n </div>\n <InfiniteScroll\n pageStart={0}\n hasMore={true}\n loadMore={this.loadFunc}\n useWindow={false}\n >\n <ul ref={el => this.list = el}>\n {\n list.map((item, index) => {\n\n const Info = (\n <div className=\"info\">\n <div className='title'>{item.course_title}</div>\n {\n item.is_aist\n ? <div className='contact'>助教微信:{item.assist_weixin}</div>\n : <div className='contact'>QQ群:{item.course_qq}</div>\n }\n {\n item.is_aist && item.aist_schedule &&\n <div className=\"process-status\">\n <div className=\"process-wrapper\">\n <div className=\"process-bar\"\n style={{width: `${parseFloat(item.aist_schedule)}%`}}/>\n </div>\n <div className=\"process-text\">{item.aist_schedule}</div>\n </div>\n }\n <Bottom item={item}/>\n </div>\n )\n\n const status = (\n item.is_aist && <span className='status'>返现</span>\n )\n return (\n <VList img={item.image_name}\n handleClick={this.handleClick}\n {...item}\n key={index}\n info={Info}\n status={status}\n id={item['course_id']}\n />\n )\n })\n }\n </ul>\n </InfiniteScroll>\n {\n list.length % 10 !== 0 ?\n <AddCourse addCourseClick={this.addCourseClick}/>\n : null\n }\n </>\n :\n <div className=\"empty\">\n <p><i className='iconfont iconfish'/></p>\n <p className='empty-prompt'>还是咸鱼一条,快去翻身~</p>\n <p>\n <Link className='select-course' to='/classify'>去选课</Link>\n </p>\n </div>\n }\n </Loading>\n\n }\n}\n\nexport default connect(\n state => ({\n courseList: state.myCourses.courseList,\n user: state.user,\n isLoading: state.myCourses.isLoading\n }),\n {\n fetchCoursesListIfNeeded,\n switchTab\n })(MyCourses)","import React from 'react'\nimport './course-base.scss'\n\nconst Course = (props) => {\n return (\n <li className={`course-base-item ${props.className}`} onClick={props.handleClick.bind(this, props.id)}>\n {props.top}\n <img src={props.img} alt=\"\"/>\n <p className=\"course-title\">{props.title}</p>\n {props.bottom}\n </li>\n );\n};\n\nexport default Course;\n\n","import React, { PureComponent } from 'react'\nimport { Tag } from '../../../common'\nimport Course from '@/common/course-base'\nimport { http } from '@/utils'\nimport { Toast } from \"antd-mobile\";\nimport classnames from 'classnames'\nimport { isEmpty } from 'lodash'\n\n\nimport './free-courses.scss'\n\nconst Bottom = (props) => (\n <div className='bottom'>\n <Tag className={props.className}>{props.text}</Tag>\n <span>{props.audience}人观看</span>\n </div>\n)\n\nclass FreeCourse extends PureComponent {\n state = {\n courses: [],\n live: [],\n page: 1,\n num: 10\n }\n\n componentDidMount() {\n this.getFreeCourses()\n .then(res => {\n let data = res.data\n if (data.code == 200) {\n this.setState({\n courses: data.data,\n })\n } else {\n Toast.info(data.msg)\n }\n })\n this.getFreeLive()\n .then(res => {\n let data = res.data\n if (data.code == 200) {\n this.setState({\n live: isEmpty(data.data) ? [] : data.data\n })\n } else {\n Toast.info(data.msg, 2, null, false)\n }\n })\n }\n\n handleClick = id => {\n this.props.history.push(`/play?id=${id}`)\n }\n\n getFreeCourses = () => {\n return http.get(`${API.home}/m/free_course/${this.state.page}/${this.state.num}`)\n }\n\n getFreeLive = () => {\n return http.get(`${API.home}/m/live/free_list`)\n }\n\n toLive = live => {\n const {room_id, live_status} = live\n if (live_status) {\n window.location.assign(`http://www-test.julyedu.com/live/m_room/${room_id}`)\n } else {\n Toast.info('直播即将开始,敬请期待', 2, null, false)\n }\n }\n\n render() {\n return (\n <ul className='free-courses'>\n {\n this.state.live.map((item, index) => {\n const Bottom = (\n <div className=\"bottom\">\n <div className=\"animation-box\">\n {new Array(4).fill('a').map((item, index) => {\n return <i key={index} className={classnames('column', `column-${index + 1}`)}/>\n })}\n </div>\n <div className=\"time\">{`${item['live_start_time']}`}</div>\n </div>\n )\n\n const LiveStatus = (\n item['live_status'] ? <Tag className={'tag-soon top'}>即将开始</Tag> :\n <Tag className={'tag-playing top'}>正在直播</Tag>\n )\n return (\n <Course\n img={item['live_cover']}\n title={item['live_title']}\n top={LiveStatus}\n bottom={Bottom}\n key={item['live_id']}\n className={'live'}\n handleClick={this.toLive.bind(this, item)}\n id={index}\n />\n )\n })\n }\n {\n this.state.courses.map((item, index) => (\n <Course\n img={item.logo}\n title={item['video_course_name']}\n handleClick={this.handleClick}\n bottom={\n <Bottom audience={item['play_times']} className={'tag-category'} text={item.category}/>\n }\n id={item['v_course_id']}\n key={index}\n className={'course-item'}\n />\n ))\n }\n </ul>\n )\n }\n}\n\n\nexport default FreeCourse","import React, { Component } from 'react'\nimport './study.scss'\n\nimport { NavLink, Route, Switch, Redirect } from \"react-router-dom\"\nimport MyCourses from \"./myCourses\"\nimport FreeCourses from './freeCourses'\nimport WithTab from '@/HOCs/WithTab'\nimport WithFullSize from '@/HOCs/WithFullSize'\nimport { compose } from 'redux'\n\n\nclass Study extends Component {\n\n state = {\n position: {}\n }\n\n render() {\n const {match} = this.props;\n return (\n <section id='study'>\n <div className='tab'>\n <div>\n <NavLink to={`${match.url}/my-course`}\n replace\n activeClassName='active'\n >我的课程</NavLink>\n </div>\n <div>\n <NavLink to={`${match.url}/free-course`}\n replace\n activeClassName='active'\n >免费课程</NavLink>\n </div>\n </div>\n <div className=\"study-container\">\n <Switch>\n <Redirect exact from='/study' to='study/my-course'/>\n <Route path={`${this.props.match.path}/my-course`} component={MyCourses}/>\n <Route path={`${this.props.match.path}/free-course`} component={FreeCourses}/>\n </Switch>\n </div>\n </section>\n )\n }\n\n}\n\nexport default compose(\n WithFullSize,\n WithTab\n)(Study)","import React from 'react';\nimport './index.scss'\n\nconst VList = (props) => {\n return (\n <li className='v-list-base-item' onClick={props.handleClick.bind(this, props.id)}>\n <div className=\"content\">\n <div className=\"cover\">\n {props.status}\n <img src={props.img} alt=\"\"/>\n </div>\n {props.info}\n </div>\n {props.tab}\n </li>\n );\n};\n\nexport default VList;","module.exports = require('./dist/InfiniteScroll');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar InfiniteScroll = function (_Component) {\n _inherits(InfiniteScroll, _Component);\n\n function InfiniteScroll(props) {\n _classCallCheck(this, InfiniteScroll);\n\n var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props));\n\n _this.scrollListener = _this.scrollListener.bind(_this);\n _this.eventListenerOptions = _this.eventListenerOptions.bind(_this);\n _this.mousewheelListener = _this.mousewheelListener.bind(_this);\n return _this;\n }\n\n _createClass(InfiniteScroll, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.pageLoaded = this.props.pageStart;\n this.options = this.eventListenerOptions();\n this.attachScrollListener();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.props.isReverse && this.loadMore) {\n var parentElement = this.getParentElement(this.scrollComponent);\n parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop;\n this.loadMore = false;\n }\n\n this.attachScrollListener();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.detachScrollListener();\n this.detachMousewheelListener();\n }\n }, {\n key: 'isPassiveSupported',\n value: function isPassiveSupported() {\n var passive = false;\n var testOptions = {\n get passive() {\n passive = true;\n }\n\n };\n\n try {\n document.addEventListener('test', null, testOptions);\n document.removeEventListener('test', null, testOptions);\n } catch (e) {// ignore\n }\n\n return passive;\n }\n }, {\n key: 'eventListenerOptions',\n value: function eventListenerOptions() {\n var options = this.props.useCapture;\n\n if (this.isPassiveSupported()) {\n options = {\n useCapture: this.props.useCapture,\n passive: true\n };\n }\n\n return options;\n } // Set a defaut loader for all your `InfiniteScroll` components\n\n }, {\n key: 'setDefaultLoader',\n value: function setDefaultLoader(loader) {\n this.defaultLoader = loader;\n }\n }, {\n key: 'detachMousewheelListener',\n value: function detachMousewheelListener() {\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = this.scrollComponent.parentNode;\n }\n\n scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);\n }\n }, {\n key: 'detachScrollListener',\n value: function detachScrollListener() {\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = this.getParentElement(this.scrollComponent);\n }\n\n scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);\n scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);\n }\n }, {\n key: 'getParentElement',\n value: function getParentElement(el) {\n var scrollParent = this.props.getScrollParent && this.props.getScrollParent();\n\n if (scrollParent != null) {\n return scrollParent;\n }\n\n return el && el.parentNode;\n }\n }, {\n key: 'filterProps',\n value: function filterProps(props) {\n return props;\n }\n }, {\n key: 'attachScrollListener',\n value: function attachScrollListener() {\n var parentElement = this.getParentElement(this.scrollComponent);\n\n if (!this.props.hasMore || !parentElement) {\n return;\n }\n\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = parentElement;\n }\n\n scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);\n scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);\n scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);\n\n if (this.props.initialLoad) {\n this.scrollListener();\n }\n }\n }, {\n key: 'mousewheelListener',\n value: function mousewheelListener(e) {\n // Prevents Chrome hangups\n // See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257\n if (e.deltaY === 1 && !this.isPassiveSupported()) {\n e.preventDefault();\n }\n }\n }, {\n key: 'scrollListener',\n value: function scrollListener() {\n var el = this.scrollComponent;\n var scrollEl = window;\n var parentNode = this.getParentElement(el);\n var offset = void 0;\n\n if (this.props.useWindow) {\n var doc = document.documentElement || document.body.parentNode || document.body;\n var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop;\n\n if (this.props.isReverse) {\n offset = scrollTop;\n } else {\n offset = this.calculateOffset(el, scrollTop);\n }\n } else if (this.props.isReverse) {\n offset = parentNode.scrollTop;\n } else {\n offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight;\n } // Here we make sure the element is visible as well as checking the offset\n\n\n if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) {\n this.detachScrollListener();\n this.beforeScrollHeight = parentNode.scrollHeight;\n this.beforeScrollTop = parentNode.scrollTop; // Call loadMore after detachScrollListener to allow for non-async loadMore functions\n\n if (typeof this.props.loadMore === 'function') {\n this.props.loadMore(this.pageLoaded += 1);\n this.loadMore = true;\n }\n }\n }\n }, {\n key: 'calculateOffset',\n value: function calculateOffset(el, scrollTop) {\n if (!el) {\n return 0;\n }\n\n return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight);\n }\n }, {\n key: 'calculateTopPosition',\n value: function calculateTopPosition(el) {\n if (!el) {\n return 0;\n }\n\n return el.offsetTop + this.calculateTopPosition(el.offsetParent);\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var renderProps = this.filterProps(this.props);\n\n var children = renderProps.children,\n element = renderProps.element,\n hasMore = renderProps.hasMore,\n initialLoad = renderProps.initialLoad,\n isReverse = renderProps.isReverse,\n loader = renderProps.loader,\n loadMore = renderProps.loadMore,\n pageStart = renderProps.pageStart,\n ref = renderProps.ref,\n threshold = renderProps.threshold,\n useCapture = renderProps.useCapture,\n useWindow = renderProps.useWindow,\n getScrollParent = renderProps.getScrollParent,\n props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']);\n\n props.ref = function (node) {\n _this2.scrollComponent = node;\n\n if (ref) {\n ref(node);\n }\n };\n\n var childrenArray = [children];\n\n if (hasMore) {\n if (loader) {\n isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader);\n } else if (this.defaultLoader) {\n isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader);\n }\n }\n\n return _react2.default.createElement(element, props, childrenArray);\n }\n }]);\n\n return InfiniteScroll;\n}(_react.Component);\n\nInfiniteScroll.propTypes = {\n children: _propTypes2.default.node.isRequired,\n element: _propTypes2.default.node,\n hasMore: _propTypes2.default.bool,\n initialLoad: _propTypes2.default.bool,\n isReverse: _propTypes2.default.bool,\n loader: _propTypes2.default.node,\n loadMore: _propTypes2.default.func.isRequired,\n pageStart: _propTypes2.default.number,\n ref: _propTypes2.default.func,\n getScrollParent: _propTypes2.default.func,\n threshold: _propTypes2.default.number,\n useCapture: _propTypes2.default.bool,\n useWindow: _propTypes2.default.bool\n};\nInfiniteScroll.defaultProps = {\n element: 'div',\n hasMore: false,\n initialLoad: true,\n pageStart: 0,\n ref: null,\n threshold: 250,\n useWindow: true,\n isReverse: false,\n useCapture: false,\n loader: null,\n getScrollParent: null\n};\nexports.default = InfiniteScroll;\nmodule.exports = exports['default'];"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/study/myCourses/index.js","common/course-base/index.js","components/study/freeCourses/index.js","components/study/index.js","common/v-list-base/index.js","../node_modules/react-infinite-scroller/index.js","../node_modules/react-infinite-scroller/dist/InfiniteScroll.js"],"names":["AddCourse","React","memo","_ref","addCourseClick","react_default","a","createElement","className","onClick","Record","_ref2","_ref2$record","record","seconds","lesson_name","result","matchResult","exec","studyTime","hour","Math","floor","min","sec","getStudyTime","String","padStart","length","concat","Bottom","_ref3","item","ago","date","Date","time","isToday","format","MyCourses","state","isLoading","handleClick","id","_this","props","history","push","loadFunc","debounce","courseList","fetchCoursesListIfNeeded","this","switchTab","_this2","list","common","Fragment","user","data","uid","react_infinite_scroller_default","pageStart","hasMore","loadMore","useWindow","ref","el","map","index","Info","course_title","is_aist","assist_weixin","course_qq","aist_schedule","style","width","parseFloat","myCourses_Bottom","status","v_list_base","Object","assign","img","image_name","key","info","react_router_dom","to","PureComponent","connect","myCourses","Course","bind","top","src","alt","title","bottom","text","audience","FreeCourse","courses","live","page","num","getFreeCourses","http","get","API","home","getFreeLive","toLive","room_id","live_status","window","location","toast_default","then","res","code","setState","msg","isEmpty","_this3","Array","fill","classnames","LiveStatus","common_course_base","logo","freeCourses_Bottom","category","Study","position","match","url","replace","activeClassName","react_router","exact","from","path","component","FreeCourses","Component","compose","WithFullSize","WithTab","VList","react__WEBPACK_IMPORTED_MODULE_0___default","tab","module","exports","__webpack_require__","defineProperty","value","_createClass","defineProperties","target","i","descriptor","enumerable","configurable","writable","Constructor","protoProps","staticProps","prototype","_react","_react2","_interopRequireDefault","_propTypes2","obj","__esModule","default","InfiniteScroll","_Component","instance","TypeError","_classCallCheck","self","call","ReferenceError","_possibleConstructorReturn","__proto__","getPrototypeOf","scrollListener","eventListenerOptions","mousewheelListener","subClass","superClass","create","constructor","setPrototypeOf","_inherits","pageLoaded","options","attachScrollListener","isReverse","parentElement","getParentElement","scrollComponent","scrollTop","scrollHeight","beforeScrollHeight","beforeScrollTop","detachScrollListener","detachMousewheelListener","passive","testOptions","document","addEventListener","removeEventListener","e","useCapture","isPassiveSupported","loader","defaultLoader","scrollEl","parentNode","scrollParent","getScrollParent","initialLoad","deltaY","preventDefault","offset","doc","documentElement","body","undefined","pageYOffset","calculateOffset","clientHeight","Number","threshold","offsetParent","calculateTopPosition","offsetHeight","innerHeight","offsetTop","renderProps","filterProps","children","element","keys","indexOf","hasOwnProperty","_objectWithoutProperties","node","childrenArray","unshift","propTypes","isRequired","bool","func","number","defaultProps"],"mappings":"kQAoBA,IAAMA,EAAYC,IAAMC,KAAK,SAAAC,GAAA,IAAEC,EAAFD,EAAEC,eAAF,OACzBC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,cACXH,EAAAC,EAAAC,cAAA,UAAQC,UAAU,MAAMC,QAASL,GAAjC,gCAIR,SAASM,EAATC,GAAkD,IAAAC,EAAAD,EAAjCE,OAASC,EAAwBF,EAAxBE,QAASC,EAAeH,EAAfG,YAE3BC,EAAS,GAEb,GAAID,EAAa,CACb,IAAIE,EAJC,uBAIgBC,KAAKH,GAC1BC,GAAWC,GAAeA,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L,IAIA,IAAAC,EAAA,CAAAP,GAUA,OARArL,IACA2J,EACAlB,EAAAmD,EAAAC,QAAAlC,GAAAiC,EAAA5M,KAAA2K,GACStK,KAAAuK,gBACTnB,EAAAmD,EAAAC,QAAAxM,KAAAuK,eAAAgC,EAAA5M,KAAAK,KAAAuK,iBAIAhD,EAAAK,QAAAzK,cAAA8O,EAAAxM,EAAA8M,OAIA1E,EArPA,GAwPAA,EAAA4E,UAAA,CACAT,SAAAvE,EAAAG,QAAA0E,KAAAI,WACAT,QAAAxE,EAAAG,QAAA0E,KACA3L,QAAA8G,EAAAG,QAAA+E,KACA/B,YAAAnD,EAAAG,QAAA+E,KACAvD,UAAA3B,EAAAG,QAAA+E,KACArC,OAAA7C,EAAAG,QAAA0E,KACA1L,SAAA6G,EAAAG,QAAAgF,KAAAF,WACAhM,UAAA+G,EAAAG,QAAAiF,OACA/L,IAAA2G,EAAAG,QAAAgF,KACAjC,gBAAAlD,EAAAG,QAAAgF,KACApB,UAAA/D,EAAAG,QAAAiF,OACAzC,WAAA3C,EAAAG,QAAA+E,KACA9L,UAAA4G,EAAAG,QAAA+E,MAEA9E,EAAAiF,aAAA,CACAb,QAAA,MACAtL,SAAA,EACAiK,aAAA,EACAlK,UAAA,EACAI,IAAA,KACA0K,UAAA,IACA3K,WAAA,EACAuI,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAK,gBAAA,MAEArE,EAAAsB,QAAAC,EACAxB,EAAAC,UAAA","file":"static/js/study.3ca271e7.chunk.js","sourcesContent":["import React, { PureComponent } from \"react\"\nimport VList from '@/common/v-list-base'\nimport './my-courses.scss'\nimport { isToday, format } from \"date-fns\"\nimport { connect } from \"react-redux\"\nimport { fetchCoursesListIfNeeded, switchTab } from \"./actions\"\nimport InfiniteScroll from 'react-infinite-scroller'\nimport { debounce } from 'lodash'\nimport { Link } from 'react-router-dom'\nimport { Loading } from \"@/common\";\n\n\nfunction getStudyTime(seconds) {\n return {\n hour: Math.floor(seconds / (60 * 60)),\n min: Math.floor(seconds / 60) % 60,\n sec: seconds % 60\n }\n}\n\nconst AddCourse = React.memo(({addCourseClick}) => (\n <div className='add-course'>\n <button className='add' onClick={addCourseClick}>添加课程+</button>\n </div>\n))\n\nfunction Record({record: {seconds, lesson_name}}) {\n let re = /第[\\s\\S]+?课/,\n result = ''\n\n if (lesson_name) {\n let matchResult = re.exec(lesson_name)\n result += (matchResult && matchResult[0]) ? matchResult[0] : ''\n }\n\n if (seconds) {\n let studyTime = getStudyTime(seconds)\n let hour = studyTime.hour ? String(studyTime.hour).padStart(2, '0') + ':' : '',\n min = studyTime.min ? String(studyTime.min).padStart(2, '0') + ':' : '',\n sec = studyTime.sec ? String(studyTime.sec).padStart(2, '0') : ''\n\n result += hour + min + sec\n }\n\n return (\n <span className={'record'}>\n {\n result.length ? `学习到${result}` : null\n }\n </span>\n )\n}\n\n\nconst Bottom = React.memo(({item}) => {\n if (item.ago || item.seconds) {\n let date = new Date(item.ago * 1000)\n let time = isToday(date) ? format(date, 'HH时mm分') : format(date, 'MM月DD日')\n return (\n <div className=\"des\">\n <span className='time'>{time}</span>\n <Record record={item}/>\n </div>\n )\n }\n return (\n <button className='start-learn'>开始学习</button>\n )\n})\n\nclass MyCourses extends PureComponent {\n\n list\n\n state = {\n isLoading: true\n }\n\n handleClick = id => {\n this.props.history.push(`/play/video?id=${id}`)\n }\n addCourseClick = () => {\n this.props.history.push('/classify')\n }\n\n componentDidMount() {\n this.props.switchTab(false)\n this.props.fetchCoursesListIfNeeded()\n }\n\n componentWillUnmount() {\n this.props.switchTab(true);\n }\n\n loadFunc = debounce(() => {\n if (this.props.courseList.length % 10 === 0) {\n this.props.fetchCoursesListIfNeeded()\n }\n }, 200)\n\n render() {\n let list = this.props.courseList\n\n return <Loading isLoading={this.props.isLoading}>\n {\n list && list.length !== 0\n ?\n <>\n <div className=\"my-course-uid\">\n {`加群请备注您的学号:${this.props.user.data.uid}`}\n </div>\n <InfiniteScroll\n pageStart={0}\n hasMore={true}\n loadMore={this.loadFunc}\n useWindow={false}\n >\n <ul ref={el => this.list = el}>\n {\n list.map((item, index) => {\n\n const Info = (\n <div className=\"info\">\n <div className='title'>{item.course_title}</div>\n {\n item.is_aist\n ? <div className='contact'>助教微信:{item.assist_weixin}</div>\n : <div className='contact'>QQ群:{item.course_qq}</div>\n }\n {\n item.is_aist && item.aist_schedule &&\n <div className=\"process-status\">\n <div className=\"process-wrapper\">\n <div className=\"process-bar\"\n style={{width: `${parseFloat(item.aist_schedule)}%`}}/>\n </div>\n <div className=\"process-text\">{item.aist_schedule}</div>\n </div>\n }\n <Bottom item={item}/>\n </div>\n )\n\n const status = (\n item.is_aist && <span className='status'>返现</span>\n )\n return (\n <VList img={item.image_name}\n handleClick={this.handleClick}\n {...item}\n key={index}\n info={Info}\n status={status}\n id={item['course_id']}\n />\n )\n })\n }\n </ul>\n </InfiniteScroll>\n {\n list.length % 10 !== 0 ?\n <AddCourse addCourseClick={this.addCourseClick}/>\n : null\n }\n </>\n :\n <div className=\"empty\">\n <p><i className='iconfont iconfish'/></p>\n <p className='empty-prompt'>还是咸鱼一条,快去翻身~</p>\n <p>\n <Link className='select-course' to='/classify'>去选课</Link>\n </p>\n </div>\n }\n </Loading>\n\n }\n}\n\nexport default connect(\n state => ({\n courseList: state.myCourses.courseList,\n user: state.user,\n isLoading: state.myCourses.isLoading\n }),\n {\n fetchCoursesListIfNeeded,\n switchTab\n })(MyCourses)","import React from 'react'\nimport './course-base.scss'\n\nconst Course = (props) => {\n return (\n <li className={`course-base-item ${props.className}`} onClick={props.handleClick.bind(this, props.id)}>\n {props.top}\n <img src={props.img} alt=\"\"/>\n <p className=\"course-title\">{props.title}</p>\n {props.bottom}\n </li>\n );\n};\n\nexport default Course;\n\n","import React, { PureComponent } from 'react'\nimport { Tag } from '../../../common'\nimport Course from '@/common/course-base'\nimport { http } from '@/utils'\nimport { Toast } from \"antd-mobile\";\nimport classnames from 'classnames'\nimport { isEmpty } from 'lodash'\n\n\nimport './free-courses.scss'\n\nconst Bottom = (props) => (\n <div className='bottom'>\n <Tag className={props.className}>{props.text}</Tag>\n <span>{props.audience}人观看</span>\n </div>\n)\n\nclass FreeCourse extends PureComponent {\n state = {\n courses: [],\n live: [],\n page: 1,\n num: 10\n }\n\n componentDidMount() {\n this.getFreeCourses()\n .then(res => {\n let data = res.data\n if (data.code == 200) {\n this.setState({\n courses: data.data,\n })\n } else {\n Toast.info(data.msg)\n }\n })\n this.getFreeLive()\n .then(res => {\n let data = res.data\n if (data.code == 200) {\n this.setState({\n live: isEmpty(data.data) ? [] : data.data\n })\n } else {\n Toast.info(data.msg, 2, null, false)\n }\n })\n }\n\n handleClick = id => {\n this.props.history.push(`/play?id=${id}`)\n }\n\n getFreeCourses = () => {\n return http.get(`${API.home}/m/free_course/${this.state.page}/${this.state.num}`)\n }\n\n getFreeLive = () => {\n return http.get(`${API.home}/m/live/free_list`)\n }\n\n toLive = live => {\n const {room_id, live_status} = live\n if (live_status) {\n window.location.assign(`http://www-test.julyedu.com/live/m_room/${room_id}`)\n } else {\n Toast.info('直播即将开始,敬请期待', 2, null, false)\n }\n }\n\n render() {\n return (\n <ul className='free-courses'>\n {\n this.state.live.map((item, index) => {\n const Bottom = (\n <div className=\"bottom\">\n <div className=\"animation-box\">\n {new Array(4).fill('a').map((item, index) => {\n return <i key={index} className={classnames('column', `column-${index + 1}`)}/>\n })}\n </div>\n <div className=\"time\">{`${item['live_start_time']}`}</div>\n </div>\n )\n\n const LiveStatus = (\n item['live_status'] ? <Tag className={'tag-soon top'}>即将开始</Tag> :\n <Tag className={'tag-playing top'}>正在直播</Tag>\n )\n return (\n <Course\n img={item['live_cover']}\n title={item['live_title']}\n top={LiveStatus}\n bottom={Bottom}\n key={item['live_id']}\n className={'live'}\n handleClick={this.toLive.bind(this, item)}\n id={index}\n />\n )\n })\n }\n {\n this.state.courses.map((item, index) => (\n <Course\n img={item.logo}\n title={item['video_course_name']}\n handleClick={this.handleClick}\n bottom={\n <Bottom audience={item['play_times']} className={'tag-category'} text={item.category}/>\n }\n id={item['v_course_id']}\n key={index}\n className={'course-item'}\n />\n ))\n }\n </ul>\n )\n }\n}\n\n\nexport default FreeCourse","import React, { Component } from 'react'\nimport './study.scss'\n\nimport { NavLink, Route, Switch, Redirect } from \"react-router-dom\"\nimport MyCourses from \"./myCourses\"\nimport FreeCourses from './freeCourses'\nimport WithTab from '@/HOCs/WithTab'\nimport WithFullSize from '@/HOCs/WithFullSize'\nimport { compose } from 'redux'\n\n\nclass Study extends Component {\n\n state = {\n position: {}\n }\n\n render() {\n const {match} = this.props;\n return (\n <section id='study'>\n <div className='tab'>\n <div>\n <NavLink to={`${match.url}/my-course`}\n replace\n activeClassName='active'\n >我的课程</NavLink>\n </div>\n <div>\n <NavLink to={`${match.url}/free-course`}\n replace\n activeClassName='active'\n >免费课程</NavLink>\n </div>\n </div>\n <div className=\"study-container\">\n <Switch>\n <Redirect exact from='/study' to='study/my-course'/>\n <Route path={`${this.props.match.path}/my-course`} component={MyCourses}/>\n <Route path={`${this.props.match.path}/free-course`} component={FreeCourses}/>\n </Switch>\n </div>\n </section>\n )\n }\n\n}\n\nexport default compose(\n WithFullSize,\n WithTab\n)(Study)","import React from 'react';\nimport './index.scss'\n\nconst VList = (props) => {\n return (\n <li className='v-list-base-item' onClick={props.handleClick.bind(this, props.id)}>\n <div className=\"content\">\n <div className=\"cover\">\n {props.status}\n <img src={props.img} alt=\"\"/>\n </div>\n {props.info}\n </div>\n {props.tab}\n </li>\n );\n};\n\nexport default VList;","module.exports = require('./dist/InfiniteScroll');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar InfiniteScroll = function (_Component) {\n _inherits(InfiniteScroll, _Component);\n\n function InfiniteScroll(props) {\n _classCallCheck(this, InfiniteScroll);\n\n var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props));\n\n _this.scrollListener = _this.scrollListener.bind(_this);\n _this.eventListenerOptions = _this.eventListenerOptions.bind(_this);\n _this.mousewheelListener = _this.mousewheelListener.bind(_this);\n return _this;\n }\n\n _createClass(InfiniteScroll, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.pageLoaded = this.props.pageStart;\n this.options = this.eventListenerOptions();\n this.attachScrollListener();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.props.isReverse && this.loadMore) {\n var parentElement = this.getParentElement(this.scrollComponent);\n parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop;\n this.loadMore = false;\n }\n\n this.attachScrollListener();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.detachScrollListener();\n this.detachMousewheelListener();\n }\n }, {\n key: 'isPassiveSupported',\n value: function isPassiveSupported() {\n var passive = false;\n var testOptions = {\n get passive() {\n passive = true;\n }\n\n };\n\n try {\n document.addEventListener('test', null, testOptions);\n document.removeEventListener('test', null, testOptions);\n } catch (e) {// ignore\n }\n\n return passive;\n }\n }, {\n key: 'eventListenerOptions',\n value: function eventListenerOptions() {\n var options = this.props.useCapture;\n\n if (this.isPassiveSupported()) {\n options = {\n useCapture: this.props.useCapture,\n passive: true\n };\n }\n\n return options;\n } // Set a defaut loader for all your `InfiniteScroll` components\n\n }, {\n key: 'setDefaultLoader',\n value: function setDefaultLoader(loader) {\n this.defaultLoader = loader;\n }\n }, {\n key: 'detachMousewheelListener',\n value: function detachMousewheelListener() {\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = this.scrollComponent.parentNode;\n }\n\n scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);\n }\n }, {\n key: 'detachScrollListener',\n value: function detachScrollListener() {\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = this.getParentElement(this.scrollComponent);\n }\n\n scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);\n scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);\n }\n }, {\n key: 'getParentElement',\n value: function getParentElement(el) {\n var scrollParent = this.props.getScrollParent && this.props.getScrollParent();\n\n if (scrollParent != null) {\n return scrollParent;\n }\n\n return el && el.parentNode;\n }\n }, {\n key: 'filterProps',\n value: function filterProps(props) {\n return props;\n }\n }, {\n key: 'attachScrollListener',\n value: function attachScrollListener() {\n var parentElement = this.getParentElement(this.scrollComponent);\n\n if (!this.props.hasMore || !parentElement) {\n return;\n }\n\n var scrollEl = window;\n\n if (this.props.useWindow === false) {\n scrollEl = parentElement;\n }\n\n scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);\n scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);\n scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);\n\n if (this.props.initialLoad) {\n this.scrollListener();\n }\n }\n }, {\n key: 'mousewheelListener',\n value: function mousewheelListener(e) {\n // Prevents Chrome hangups\n // See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257\n if (e.deltaY === 1 && !this.isPassiveSupported()) {\n e.preventDefault();\n }\n }\n }, {\n key: 'scrollListener',\n value: function scrollListener() {\n var el = this.scrollComponent;\n var scrollEl = window;\n var parentNode = this.getParentElement(el);\n var offset = void 0;\n\n if (this.props.useWindow) {\n var doc = document.documentElement || document.body.parentNode || document.body;\n var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop;\n\n if (this.props.isReverse) {\n offset = scrollTop;\n } else {\n offset = this.calculateOffset(el, scrollTop);\n }\n } else if (this.props.isReverse) {\n offset = parentNode.scrollTop;\n } else {\n offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight;\n } // Here we make sure the element is visible as well as checking the offset\n\n\n if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) {\n this.detachScrollListener();\n this.beforeScrollHeight = parentNode.scrollHeight;\n this.beforeScrollTop = parentNode.scrollTop; // Call loadMore after detachScrollListener to allow for non-async loadMore functions\n\n if (typeof this.props.loadMore === 'function') {\n this.props.loadMore(this.pageLoaded += 1);\n this.loadMore = true;\n }\n }\n }\n }, {\n key: 'calculateOffset',\n value: function calculateOffset(el, scrollTop) {\n if (!el) {\n return 0;\n }\n\n return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight);\n }\n }, {\n key: 'calculateTopPosition',\n value: function calculateTopPosition(el) {\n if (!el) {\n return 0;\n }\n\n return el.offsetTop + this.calculateTopPosition(el.offsetParent);\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var renderProps = this.filterProps(this.props);\n\n var children = renderProps.children,\n element = renderProps.element,\n hasMore = renderProps.hasMore,\n initialLoad = renderProps.initialLoad,\n isReverse = renderProps.isReverse,\n loader = renderProps.loader,\n loadMore = renderProps.loadMore,\n pageStart = renderProps.pageStart,\n ref = renderProps.ref,\n threshold = renderProps.threshold,\n useCapture = renderProps.useCapture,\n useWindow = renderProps.useWindow,\n getScrollParent = renderProps.getScrollParent,\n props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']);\n\n props.ref = function (node) {\n _this2.scrollComponent = node;\n\n if (ref) {\n ref(node);\n }\n };\n\n var childrenArray = [children];\n\n if (hasMore) {\n if (loader) {\n isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader);\n } else if (this.defaultLoader) {\n isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader);\n }\n }\n\n return _react2.default.createElement(element, props, childrenArray);\n }\n }]);\n\n return InfiniteScroll;\n}(_react.Component);\n\nInfiniteScroll.propTypes = {\n children: _propTypes2.default.node.isRequired,\n element: _propTypes2.default.node,\n hasMore: _propTypes2.default.bool,\n initialLoad: _propTypes2.default.bool,\n isReverse: _propTypes2.default.bool,\n loader: _propTypes2.default.node,\n loadMore: _propTypes2.default.func.isRequired,\n pageStart: _propTypes2.default.number,\n ref: _propTypes2.default.func,\n getScrollParent: _propTypes2.default.func,\n threshold: _propTypes2.default.number,\n useCapture: _propTypes2.default.bool,\n useWindow: _propTypes2.default.bool\n};\nInfiniteScroll.defaultProps = {\n element: 'div',\n hasMore: false,\n initialLoad: true,\n pageStart: 0,\n ref: null,\n threshold: 250,\n useWindow: true,\n isReverse: false,\n useCapture: false,\n loader: null,\n getScrollParent: null\n};\nexports.default = InfiniteScroll;\nmodule.exports = exports['default'];"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{1155:function(e,a,t){"use strict";t.r(a);t(153);var n=t(74),c=t.n(n),s=(t(88),t(26)),r=t.n(s),i=(t(152),t(34)),o=t.n(i),l=(t(44),t(14)),m=t.n(l),d=t(24),u=t(7),p=t(8),E=t(11),f=t(9),g=t(10),_=t(0),N=t.n(_),v=(t(883),t(33)),b=t(4),h=(t(20),t(16)),w=function(e){function a(e){var t;return Object(u.a)(this,a),(t=Object(E.a)(this,Object(f.a)(a).call(this,e))).invitedFriends=function(){var e=t.state,a=e.pdd_price,n=e.number,c=e.data;if(b.a.isWeixin){var s=t.state.share;t.setState({share:!s});var r={title:"\u3010\u4ec5\u5269".concat(n,"\u4e2a\u540d\u989d\u3011\u6211").concat(a,"\u5143\u62fc\u4e86\u300a").concat(c.course_title,"\u300b"),desc:c.course_title,link:location.origin+"/detail??id=".concat(c.course_id),imgUrl:c.image_name};b.c.post("".concat(API["base-api"],"/m/sale/signature")).then(function(e){var a=e.data,t=a.nonce_str,n=a.signature,c=a.timestamp;wx.config({debug:!1,appId:"wx23dac6775ac82877",timestamp:c,nonceStr:t,signature:n,jsApiList:["hideMenuItems","showMenuItems","updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareAppMessage"]})}),wx.ready(function(){wx.hideAllNonBaseMenuItem(),wx.showMenuItems({menuList:["menuItem:share:appMessage","menuItem:share:timeline"]}),wx.updateAppMessageShareData(Object(d.a)({},r,{success:function(){}})),wx.updateTimelineShareData(Object(d.a)({},r,{success:function(){}}))})}else m.a.info("\u8bf7\u5728\u5fae\u4fe1\u4e2d\u4f7f\u7528\u5206\u4eab\u529f\u80fd\uff01",2)},t.state={data:{},share:!1,pdd_price:0,groupon_member:[],person_num:0,is_success:!1,userInfo:{},number:0},t}return Object(g.a)(a,e),Object(p.a)(a,[{key:"componentDidMount",value:function(){var e=this;Promise.all([b.c.get("".concat(API["base-api"],"/pdd/goupon_pay_page/").concat(Object(b.b)("id"))),b.c.get("".concat(API.home,"/m/user_info"))]).then(function(a){console.log(a);var t=a[0],n=a[1];if(0===t.data.errno)if(200===n.data.code){if(e.setState({data:t.data.data.course_info,pdd_price:t.data.data.pdd_price,groupon_member:t.data.data.groupon_member,is_success:t.data.data.is_success,person_num:t.data.data.person_num,course_list:t.data.data.course_list,userInfo:n,number:t.data.data.number,countdown:""}),0===t.data.data.is_success){var c=1e3*t.data.data.end_time,s=0,r=0,i=0;setInterval(function(){c-=1e3,s="".concat(parseInt(c/36e5)).padStart(2,0),r="".concat(parseInt((c-36e5*s)/6e4)).padStart(2,0),i="".concat(parseInt((c-36e5*s-6e4*r)/1e3)).padStart(2,0),e.setState({countdown:"".concat(s,":").concat(r,":").concat(i)})},1e3)}}else m.a.info(t.data.msg,2);else m.a.info(t.data.msg,2)})}},{key:"render",value:function(){var e=this.state,a=e.data,t=a.course_id,n=a.course_title,c=a.simpledescription,s=a.price0,r=a.price1,i=(e.pdd_price,e.is_success),l=(e.person_num,e.groupon_member,e.course_list),m=N.a.createElement("div",{className:"info"},N.a.createElement("p",{className:"title"},N.a.createElement(h.b,{to:"/detail?id=".concat(t)},n)),N.a.createElement("p",{className:"contact text-overflow-2"},c),N.a.createElement("div",{className:"des"},N.a.createElement("p",{className:"course-price"},N.a.createElement("span",{className:"new"},"\xa5",r),N.a.createElement("span",{className:"old"},"\xa5",s))));return N.a.createElement("div",{className:"to-group-box"},N.a.createElement(v.e,{title:"\u62fc\u56e2",arrow:!0,cart:!1}),!i&&N.a.createElement(v.i,{img:this.state.data.image_name,id:this.state.data.course_id,info:m}),N.a.createElement(I,{data:this.state,invitedFriends:this.invitedFriends}),N.a.createElement(o.a,null),N.a.createElement("div",{className:"group-course"},N.a.createElement("div",{className:"top-title"},N.a.createElement("span",null,"\u672c\u5468\u7279\u60e0"),N.a.createElement(h.b,{to:"/preferential",className:"more"},"\u66f4\u591a",N.a.createElement("i",{className:"iconfont iconiconfront-70"}))),l&&l.length>0&&l[0].course&&l[0].course.length>0&&l[0].course.slice(0,4).map(function(e){var a=N.a.createElement("div",{className:"info"},N.a.createElement("p",{className:"title"},N.a.createElement(h.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),N.a.createElement("p",{className:"contact text-overflow-2"},e.simpledescription),N.a.createElement("div",{className:"des"},N.a.createElement("p",{className:"course-price"},N.a.createElement("span",{className:"new"},"\xa5",e.price1),N.a.createElement("span",{className:"old"},"\xa5",e.price0))));return N.a.createElement(v.i,{img:e.image_name,key:e.uid,id:e.course_id,info:a})})))}}]),a}(_.Component);function I(e){for(var a,t,n,s,i=e.data,o=i.pdd_price,l=i.data,m=i.groupon_member,d=i.is_success,u=i.person_num,p=i.userInfo,E=i.share,f=i.number,g=i.countdown,_=[],v=f;0!=v;)_.push(v),v--;if(s=N.a.createElement("div",{className:"group-user-list"},N.a.createElement(r.a,{justify:"center",className:"imgList"},m.map(function(e){return N.a.createElement("div",{className:"imgContainer",key:Math.random()},N.a.createElement("img",{className:"imgname",src:e.avatar,alt:""}),1===e.user_type?N.a.createElement("div",{className:"leaderFlag"},N.a.createElement("span",null,"\u56e2\u957f")):null)}),_.map(function(e){return N.a.createElement("div",{className:"imgContainer",key:Math.random()},N.a.createElement("div",{className:"imgname"},N.a.createElement("i",{className:"iconfont iconwode-xianxing no-body"})))}))),m&&m.length>0){var b="";m.map(function(e){1===e.user_type&&(b="".concat(e.uid))}),b===p.data.data.uid?(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(o,"\u5143")),t=N.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",g," \u540e\u7ed3\u675f"),n=N.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")):(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(o,"\u5143")),t=N.a.createElement(h.b,{to:"/order?id=".concat(l.course_id),className:"group-btn"},"\u4e00\u952e\u53c2\u56e2"))}return 1===d&&(a=N.a.createElement("p",{className:"success"},"\u62fc\u56e2\u6210\u529f"),t=N.a.createElement(h.b,{to:"/play",className:"tostudy"},"\u53bb\u5b66\u4e60")),N.a.createElement("div",{className:"gorup-content"},E?N.a.createElement("div",{className:"groupSuccessMbc",onClick:e.invitedFriends},N.a.createElement("div",{className:"tipContent"},"\u8fd8\u5dee".concat(f,"\u4eba\uff0c\u5206\u4eab\u52303\u4e2a\u7fa4\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")),N.a.createElement("div",{className:"tipArrow"},N.a.createElement("i",{className:"iconfont iconyindao"}))):null,a,N.a.createElement(c.a,null,s),N.a.createElement(c.a,null,t),n,!d&&N.a.createElement("div",{className:"group-dec"},N.a.createElement("span",null,N.a.createElement("i",{className:"iconfont iconiconfront-1"}),"\xb7\u597d\u53cb\u53c2\u56e2 \xb7\u4eba\u6ee1\u6210\u4ea4 \xb7\u4eba\u4e0d\u6ee1\u9000\u6b3e"),N.a.createElement("span",{className:"allNum"},"\u7d2f\u8ba1".concat(u,"\u4eba\u6210\u56e2"))))}a.default=w},883:function(e,a,t){}}]);
//# sourceMappingURL=togroup.38eac215.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{1155:function(e,a,t){"use strict";t.r(a);t(153);var n=t(74),c=t.n(n),s=(t(88),t(26)),r=t.n(s),i=(t(152),t(34)),o=t.n(i),l=(t(44),t(14)),m=t.n(l),d=t(24),u=t(7),p=t(8),E=t(11),f=t(9),g=t(10),_=t(0),N=t.n(_),v=(t(883),t(30)),b=t(4),h=(t(20),t(16)),w=function(e){function a(e){var t;return Object(u.a)(this,a),(t=Object(E.a)(this,Object(f.a)(a).call(this,e))).invitedFriends=function(){var e=t.state,a=e.pdd_price,n=e.number,c=e.data;if(b.a.isWeixin){var s=t.state.share;t.setState({share:!s});var r={title:"\u3010\u4ec5\u5269".concat(n,"\u4e2a\u540d\u989d\u3011\u6211").concat(a,"\u5143\u62fc\u4e86\u300a").concat(c.course_title,"\u300b"),desc:c.course_title,link:location.origin+"/detail??id=".concat(c.course_id),imgUrl:c.image_name};b.c.post("".concat(API["base-api"],"/m/sale/signature")).then(function(e){var a=e.data,t=a.nonce_str,n=a.signature,c=a.timestamp;wx.config({debug:!1,appId:"wx23dac6775ac82877",timestamp:c,nonceStr:t,signature:n,jsApiList:["hideMenuItems","showMenuItems","updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareAppMessage"]})}),wx.ready(function(){wx.hideAllNonBaseMenuItem(),wx.showMenuItems({menuList:["menuItem:share:appMessage","menuItem:share:timeline"]}),wx.updateAppMessageShareData(Object(d.a)({},r,{success:function(){}})),wx.updateTimelineShareData(Object(d.a)({},r,{success:function(){}}))})}else m.a.info("\u8bf7\u5728\u5fae\u4fe1\u4e2d\u4f7f\u7528\u5206\u4eab\u529f\u80fd\uff01",2)},t.state={data:{},share:!1,pdd_price:0,groupon_member:[],person_num:0,is_success:!1,userInfo:{},number:0},t}return Object(g.a)(a,e),Object(p.a)(a,[{key:"componentDidMount",value:function(){var e=this;Promise.all([b.c.get("".concat(API["base-api"],"/pdd/goupon_pay_page/").concat(Object(b.b)("id"))),b.c.get("".concat(API.home,"/m/user_info"))]).then(function(a){console.log(a);var t=a[0],n=a[1];if(0===t.data.errno)if(200===n.data.code){if(e.setState({data:t.data.data.course_info,pdd_price:t.data.data.pdd_price,groupon_member:t.data.data.groupon_member,is_success:t.data.data.is_success,person_num:t.data.data.person_num,course_list:t.data.data.course_list,userInfo:n,number:t.data.data.number,countdown:""}),0===t.data.data.is_success){var c=1e3*t.data.data.end_time,s=0,r=0,i=0;setInterval(function(){c-=1e3,s="".concat(parseInt(c/36e5)).padStart(2,0),r="".concat(parseInt((c-36e5*s)/6e4)).padStart(2,0),i="".concat(parseInt((c-36e5*s-6e4*r)/1e3)).padStart(2,0),e.setState({countdown:"".concat(s,":").concat(r,":").concat(i)})},1e3)}}else m.a.info(t.data.msg,2);else m.a.info(t.data.msg,2)})}},{key:"render",value:function(){var e=this.state,a=e.data,t=a.course_id,n=a.course_title,c=a.simpledescription,s=a.price0,r=a.price1,i=(e.pdd_price,e.is_success),l=(e.person_num,e.groupon_member,e.course_list),m=N.a.createElement("div",{className:"info"},N.a.createElement("p",{className:"title"},N.a.createElement(h.b,{to:"/detail?id=".concat(t)},n)),N.a.createElement("p",{className:"contact text-overflow-2"},c),N.a.createElement("div",{className:"des"},N.a.createElement("p",{className:"course-price"},N.a.createElement("span",{className:"new"},"\xa5",r),N.a.createElement("span",{className:"old"},"\xa5",s))));return N.a.createElement("div",{className:"to-group-box"},N.a.createElement(v.e,{title:"\u62fc\u56e2",arrow:!0,cart:!1}),!i&&N.a.createElement(v.i,{img:this.state.data.image_name,id:this.state.data.course_id,info:m}),N.a.createElement(I,{data:this.state,invitedFriends:this.invitedFriends}),N.a.createElement(o.a,null),N.a.createElement("div",{className:"group-course"},N.a.createElement("div",{className:"top-title"},N.a.createElement("span",null,"\u672c\u5468\u7279\u60e0"),N.a.createElement(h.b,{to:"/preferential",className:"more"},"\u66f4\u591a",N.a.createElement("i",{className:"iconfont iconiconfront-70"}))),l&&l.length>0&&l[0].course&&l[0].course.length>0&&l[0].course.slice(0,4).map(function(e){var a=N.a.createElement("div",{className:"info"},N.a.createElement("p",{className:"title"},N.a.createElement(h.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),N.a.createElement("p",{className:"contact text-overflow-2"},e.simpledescription),N.a.createElement("div",{className:"des"},N.a.createElement("p",{className:"course-price"},N.a.createElement("span",{className:"new"},"\xa5",e.price1),N.a.createElement("span",{className:"old"},"\xa5",e.price0))));return N.a.createElement(v.i,{img:e.image_name,key:e.uid,id:e.course_id,info:a})})))}}]),a}(_.Component);function I(e){for(var a,t,n,s,i=e.data,o=i.pdd_price,l=i.data,m=i.groupon_member,d=i.is_success,u=i.person_num,p=i.userInfo,E=i.share,f=i.number,g=i.countdown,_=[],v=f;0!=v;)_.push(v),v--;if(s=N.a.createElement("div",{className:"group-user-list"},N.a.createElement(r.a,{justify:"center",className:"imgList"},m.map(function(e){return N.a.createElement("div",{className:"imgContainer",key:Math.random()},N.a.createElement("img",{className:"imgname",src:e.avatar,alt:""}),1===e.user_type?N.a.createElement("div",{className:"leaderFlag"},N.a.createElement("span",null,"\u56e2\u957f")):null)}),_.map(function(e){return N.a.createElement("div",{className:"imgContainer",key:Math.random()},N.a.createElement("div",{className:"imgname"},N.a.createElement("i",{className:"iconfont iconwode-xianxing no-body"})))}))),m&&m.length>0){var b="";m.map(function(e){1===e.user_type&&(b="".concat(e.uid))}),b===p.data.data.uid?(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(o,"\u5143")),t=N.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",g," \u540e\u7ed3\u675f"),n=N.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")):(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(o,"\u5143")),t=N.a.createElement(h.b,{to:"/order?id=".concat(l.course_id),className:"group-btn"},"\u4e00\u952e\u53c2\u56e2"))}return 1===d&&(a=N.a.createElement("p",{className:"success"},"\u62fc\u56e2\u6210\u529f"),t=N.a.createElement(h.b,{to:"/play",className:"tostudy"},"\u53bb\u5b66\u4e60")),N.a.createElement("div",{className:"gorup-content"},E?N.a.createElement("div",{className:"groupSuccessMbc",onClick:e.invitedFriends},N.a.createElement("div",{className:"tipContent"},"\u8fd8\u5dee".concat(f,"\u4eba\uff0c\u5206\u4eab\u52303\u4e2a\u7fa4\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")),N.a.createElement("div",{className:"tipArrow"},N.a.createElement("i",{className:"iconfont iconyindao"}))):null,a,N.a.createElement(c.a,null,s),N.a.createElement(c.a,null,t),n,!d&&N.a.createElement("div",{className:"group-dec"},N.a.createElement("span",null,N.a.createElement("i",{className:"iconfont iconiconfront-1"}),"\xb7\u597d\u53cb\u53c2\u56e2 \xb7\u4eba\u6ee1\u6210\u4ea4 \xb7\u4eba\u4e0d\u6ee1\u9000\u6b3e"),N.a.createElement("span",{className:"allNum"},"\u7d2f\u8ba1".concat(u,"\u4eba\u6210\u56e2"))))}a.default=w},883:function(e,a,t){}}]);
//# sourceMappingURL=togroup.a6717ccf.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/detail/group/togroup.js"],"names":["ToGroup","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_9__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_11__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_12__","call","invitedFriends","_this$state","state","pdd_price","number","data","browser","isWeixin","share","setState","shareData","title","concat","course_title","desc","link","location","origin","course_id","imgUrl","image_name","http","post","API","then","res","_res$data","nonce_str","signature","timestamp","wx","config","debug","appId","nonceStr","jsApiList","ready","hideAllNonBaseMenuItem","showMenuItems","menuList","updateAppMessageShareData","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_8__","success","updateTimelineShareData","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_7___default","a","info","groupon_member","person_num","is_success","userInfo","_this2","Promise","all","get","getParam","home","resultList","console","log","errno","code","course_info","course_list","countdown","date","end_time","hours","minutes","seconds","setInterval","parseInt","padStart","msg","_this$state2","_this$state2$data","simpledescription","price0","price1","Info","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","className","react_router_dom__WEBPACK_IMPORTED_MODULE_19__","to","_common__WEBPACK_IMPORTED_MODULE_16__","arrow","cart","img","id","GorupContent","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_5___default","length","course","slice","map","item","weekInfo","key","uid","Component","tip","btn","dec","groupTip","_props$data","ary","num","push","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_3___default","justify","Math","random","src","avatar","alt","user_type","onClick","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_1___default"],"mappings":"gTAUMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAaVQ,eAAiB,WAAM,IAAAC,EACeR,EAAKS,MAAhCC,EADYF,EACZE,UAAWC,EADCH,EACDG,OAAQC,EADPJ,EACOI,KAC1B,GAAGC,IAAQC,SAAU,CACjB,IAAIC,EAAQf,EAAKS,MAAMM,MACvBf,EAAKgB,SAAS,CACVD,OAAQA,IAEZ,IAAIE,EAAY,CACZC,MAAK,qBAAAC,OAAQR,EAAR,kCAAAQ,OAAsBT,EAAtB,4BAAAS,OAAsCP,EAAKQ,aAA3C,UACLC,KAAMT,EAAKQ,aACXE,KAAMC,SAASC,OAAT,eAAAL,OAAiCP,EAAKa,WAC5CC,OAAQd,EAAKe,YAEjBC,IAAKC,KAAL,GAAAV,OAAaW,IAAI,YAAj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OAAKC,UAAU,YACXF,EAAAnC,EAAAoC,cAAA,KAAGC,UAAU,0BAGrB,KAGPmB,EACDrB,EAAAnC,EAAAoC,cAAAqC,EAAAzE,EAAA,KACK2D,GAELxB,EAAAnC,EAAAoC,cAAAqC,EAAAzE,EAAA,KACKyD,GAEJC,GAEItD,GACD+B,EAAAnC,EAAAoC,cAAA,OAAKC,UAAU,aACXF,EAAAnC,EAAAoC,cAAA,YACID,EAAAnC,EAAAoC,cAAA,KAAGC,UAAU,6BADjB,kGAIAF,EAAAnC,EAAAoC,cAAA,QAAMC,UAAU,UAAhB,eAAAtE,OAA+BoC,EAA/B,yBAOLzD","file":"static/js/togroup.38eac215.chunk.js","sourcesContent":["import React, { Component } from 'react'\nimport './togroup.scss'\nimport { HeaderBar, VList } from '../../../common'\n\nimport { api, getParam, http, browser} from \"@/utils\";\nimport { connect } from \"react-redux\"\nimport { Link } from \"react-router-dom\"\nimport { WingBlank, WhiteSpace, Flex, Toast } from 'antd-mobile'\n\n\nclass ToGroup extends Component {\n constructor(props) {\n super(props)\n this.state = {\n data: {},\n share: false,\n pdd_price: 0,\n groupon_member: [],\n person_num: 0, // 共多少人成团\n is_success: false, // 是否拼团成功\n userInfo: {},\n number: 0, // 差几人成团\n }\n }\n\n invitedFriends = () => {\n const {pdd_price, number, data} = this.state;\n if(browser.isWeixin) {\n let share = this.state.share;\n this.setState({\n share: !share,\n });\n let shareData = {\n title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`,\n desc: data.course_title, // 分享描述\n link: location.origin + `/detail??id=${data.course_id}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致\n imgUrl: data.image_name, // 分享图标\n };\n http.post(`${API['base-api']}/m/sale/signature`).then(res => {\n const {nonce_str, signature, timestamp} = res.data;\n wx.config({\n \"debug\": false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。\n \"appId\": 'wx23dac6775ac82877', // 必填,公众号的唯一标识\n \"timestamp\": timestamp, // 必填,生成签名的时间戳\n \"nonceStr\": nonce_str, // 必填,生成签名的随机串\n \"signature\": signature, // 必填,签名\n jsApiList: [\n 'hideMenuItems',\n 'showMenuItems',\n 'updateAppMessageShareData',\n 'updateTimelineShareData',\n 'onMenuShareWeibo',\n 'onMenuShareAppMessage',\n ], // 必填,需要使用的JS接口列表\n });\n });\n wx.ready(function () { //需在用户可能点击分享按钮前就先调用\n wx.hideAllNonBaseMenuItem();\n wx.showMenuItems({\n menuList: ['menuItem:share:appMessage' , 'menuItem:share:timeline'] // 要显示的菜单项,所有menu项见附录3\n });\n wx.updateAppMessageShareData({ \n ...shareData,\n success: function () {\n // 设置成功\n }\n })\n wx.updateTimelineShareData({\n ...shareData,\n success: function () {\n // 设置成功\n }\n })\n });\n }else{\n Toast.info('请在微信中使用分享功能!', 2);\n }\n }\n\n componentDidMount() {\n Promise.all([http.get(`${API['base-api']}/pdd/goupon_pay_page/${getParam('id')}`), http.get(`${API.home}/m/user_info`)]).then(resultList => {\n console.log(resultList);\n let res = resultList[0],\n userInfo = resultList[1];\n if(res.data.errno !== 0) {\n Toast.info(res.data.msg, 2);\n return;\n }\n if(userInfo.data.code !== 200) {\n Toast.info(res.data.msg, 2);\n return;\n }\n this.setState({\n data: res.data.data.course_info,\n pdd_price: res.data.data.pdd_price,\n groupon_member: res.data.data.groupon_member,\n is_success: res.data.data.is_success,\n person_num: res.data.data.person_num,\n course_list: res.data.data.course_list,\n userInfo,\n number: res.data.data.number,\n countdown: '',\n });\n\n if(res.data.data.is_success === 0) {\n let date = res.data.data.end_time * 1000,\n hours = 0,\n minutes = 0,\n seconds = 0;\n setInterval(() => {\n date -= 1000\n hours = `${parseInt(date / (60 * 60 * 1000))}`.padStart(2, 0);\n minutes = `${parseInt((date - hours * 3600000) / 60000)}`.padStart(2, 0);\n seconds = `${parseInt((date - hours * 3600000 - minutes * 60000 ) / 1000)}`.padStart(2, 0);\n this.setState({\n countdown: `${hours}:${minutes}:${seconds}`\n });\n }, 1000)\n }\n });\n }\n\n render() {\n const { data: { course_id, course_title, simpledescription, price0, price1 }, pdd_price, is_success, person_num, groupon_member, course_list } = this.state;\n const Info = (\n <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${course_id}`}>\n {course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{simpledescription}</p>\n <div className='des'>\n <p className=\"course-price\">\n <span className=\"new\">¥{price1}</span>\n <span className=\"old\">¥{price0}</span>\n </p>\n </div>\n </div>\n )\n return (\n <div className='to-group-box'>\n <HeaderBar title='拼团' arrow={true} cart={false}></HeaderBar>\n {\n !is_success && <VList img={this.state.data.image_name} id={this.state.data.course_id} info={Info}></VList>\n }\n\n <GorupContent data={this.state} invitedFriends={this.invitedFriends} />\n\n <WhiteSpace></WhiteSpace>\n <div className=\"group-course\">\n <div className=\"top-title\">\n <span>本周特惠</span>\n <Link to={`/preferential`} className='more'>更多<i className='iconfont iconiconfront-70'></i></Link>\n </div>\n {\n (course_list && course_list.length > 0) && (course_list[0].course && course_list[0].course.length > 0) && course_list[0].course.slice(0, 4).map(item => {\n\n let weekInfo = <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${item.course_id}`}>\n {item.course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{item.simpledescription}</p>\n <div className='des'>\n <p className=\"course-price\">\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n </div>\n </div>\n return (<VList img={item.image_name} key={item.uid} id={item.course_id} info={weekInfo}></VList>)\n })\n }\n\n </div>\n </div>\n )\n }\n}\n\nfunction GorupContent(props) {\n let tip, btn, dec, groupTip, shareTip, groupSuccessMbc;\n const { pdd_price, data, groupon_member, is_success, person_num, userInfo, share, number, countdown } = props.data;\n let ary=[],num = number;\n while(num != 0) {\n ary.push(num);\n num--;\n }\n groupTip = (<div className='group-user-list'>\n <Flex justify='center' className='imgList'>\n {\n groupon_member.map(item => {\n return (\n <div className='imgContainer' key={Math.random()}>\n <img className='imgname' src={item.avatar} alt='' />\n {\n item.user_type === 1 ? (\n <div className='leaderFlag'>\n <span>团长</span>\n </div>\n ) : null\n }\n </div>);\n })\n }\n {\n ary.map(item => {\n return (<div className='imgContainer' key={Math.random()}>\n <div className='imgname'>\n <i className='iconfont iconwode-xianxing no-body'></i>\n </div>\n </div>)\n })\n }\n </Flex>\n </div>);\n\n if (groupon_member && groupon_member.length > 0) {\n let uid = '';\n groupon_member.map(item=>{\n if(item.user_type === 1) {\n uid = `${item.uid}`;\n }\n })\n\n if(uid === userInfo.data.data.uid) {\n tip = <p className='tip'>{`拼团省¥${pdd_price}元`}</p>\n btn = <span className='group-btn' onClick={props.invitedFriends}>邀请好友参团 {countdown} 后结束</span>\n dec = <p className='dec'>分享到3个群后,成团率高达98%</p>\n } else {\n tip = <p className='tip'>{`拼团省¥${pdd_price}元`}</p>\n btn = <Link to={`/order?id=${data.course_id}`} className='group-btn'>一键参团</Link>\n }\n }\n\n if (is_success === 1) {\n tip = <p className='success'>拼团成功</p>\n btn = <Link to={`/play`} className='tostudy'>去学习</Link>\n }\n return (\n <div className='gorup-content'>\n {\n share ? (\n <div className='groupSuccessMbc' onClick={props.invitedFriends}>\n <div className='tipContent'>\n \n {`还差${number}人,分享到3个群,成团率高达98%`}\n </div>\n <div className='tipArrow'>\n <i className='iconfont iconyindao'></i>\n </div>\n </div>\n ) : null\n }\n\n {tip}\n <WingBlank>\n {groupTip}\n </WingBlank>\n <WingBlank>\n {btn}\n </WingBlank>\n {dec}\n {\n !is_success &&\n <div className=\"group-dec\">\n <span>\n <i className='iconfont iconiconfront-1'></i>\n ·好友参团 ·人满成交 ·人不满退款\n </span>\n <span className='allNum'>{`累计${person_num}人成团`}</span>\n </div>\n }\n </div>\n )\n}\n\nexport default ToGroup\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/detail/group/togroup.js"],"names":["ToGroup","props","_this","Object","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_9__","this","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_11__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_12__","call","invitedFriends","_this$state","state","pdd_price","number","data","browser","isWeixin","share","setState","shareData","title","concat","course_title","desc","link","location","origin","course_id","imgUrl","image_name","http","post","API","then","res","_res$data","nonce_str","signature","timestamp","wx","config","debug","appId","nonceStr","jsApiList","ready","hideAllNonBaseMenuItem","showMenuItems","menuList","updateAppMessageShareData","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_8__","success","updateTimelineShareData","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_7___default","a","info","groupon_member","person_num","is_success","userInfo","_this2","Promise","all","get","getParam","home","resultList","console","log","errno","code","course_info","course_list","countdown","date","end_time","hours","minutes","seconds","setInterval","parseInt","padStart","msg","_this$state2","_this$state2$data","simpledescription","price0","price1","Info","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","className","react_router_dom__WEBPACK_IMPORTED_MODULE_19__","to","_common__WEBPACK_IMPORTED_MODULE_16__","arrow","cart","img","id","GorupContent","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_5___default","length","course","slice","map","item","weekInfo","key","uid","Component","tip","btn","dec","groupTip","_props$data","ary","num","push","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_3___default","justify","Math","random","src","avatar","alt","user_type","onClick","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_1___default"],"mappings":"gTAUMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA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OAAb,kFAENmB,EAAMrB,EAAAnC,EAAAoC,cAAA,KAAGC,UAAU,OAAb,2BAAAtE,OAA2BT,EAA3B,WACNmG,EAAMtB,EAAAnC,EAAAoC,cAACE,EAAA,EAAD,CAAMC,GAAE,aAAAxE,OAAeP,EAAKa,WAAagE,UAAU,aAAnD,6BAQd,OAJmB,IAAfjC,IACAoD,EAAMrB,EAAAnC,EAAAoC,cAAA,KAAGC,UAAU,WAAb,4BACNoB,EAAMtB,EAAAnC,EAAAoC,cAACE,EAAA,EAAD,CAAMC,GAAE,QAAWF,UAAU,WAA7B,uBAGNF,EAAAnC,EAAAoC,cAAA,OAAKC,UAAU,iBAEP1E,EACIwE,EAAAnC,EAAAoC,cAAA,OAAKC,UAAU,kBAAkBmC,QAAS7H,EAAMQ,gBAC5CgF,EAAAnC,EAAAoC,cAAA,OAAKC,UAAU,cAAf,eAAAtE,OAEUR,EAFV,uFAIA4E,EAAAnC,EAAAoC,cAAA,OAAKC,UAAU,YACXF,EAAAnC,EAAAoC,cAAA,KAAGC,UAAU,0BAGrB,KAGPmB,EACDrB,EAAAnC,EAAAoC,cAAAqC,EAAAzE,EAAA,KACK2D,GAELxB,EAAAnC,EAAAoC,cAAAqC,EAAAzE,EAAA,KACKyD,GAEJC,GAEItD,GACD+B,EAAAnC,EAAAoC,cAAA,OAAKC,UAAU,aACXF,EAAAnC,EAAAoC,cAAA,YACID,EAAAnC,EAAAoC,cAAA,KAAGC,UAAU,6BADjB,kGAIAF,EAAAnC,EAAAoC,cAAA,QAAMC,UAAU,UAAhB,eAAAtE,OAA+BoC,EAA/B,yBAOLzD","file":"static/js/togroup.a6717ccf.chunk.js","sourcesContent":["import React, { Component } from 'react'\nimport './togroup.scss'\nimport { HeaderBar, VList } from '../../../common'\n\nimport { api, getParam, http, browser} from \"@/utils\";\nimport { connect } from \"react-redux\"\nimport { Link } from \"react-router-dom\"\nimport { WingBlank, WhiteSpace, Flex, Toast } from 'antd-mobile'\n\n\nclass ToGroup extends Component {\n constructor(props) {\n super(props)\n this.state = {\n data: {},\n share: false,\n pdd_price: 0,\n groupon_member: [],\n person_num: 0, // 共多少人成团\n is_success: false, // 是否拼团成功\n userInfo: {},\n number: 0, // 差几人成团\n }\n }\n\n invitedFriends = () => {\n const {pdd_price, number, data} = this.state;\n if(browser.isWeixin) {\n let share = this.state.share;\n this.setState({\n share: !share,\n });\n let shareData = {\n title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`,\n desc: data.course_title, // 分享描述\n link: location.origin + `/detail??id=${data.course_id}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致\n imgUrl: data.image_name, // 分享图标\n };\n http.post(`${API['base-api']}/m/sale/signature`).then(res => {\n const {nonce_str, signature, timestamp} = res.data;\n wx.config({\n \"debug\": false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。\n \"appId\": 'wx23dac6775ac82877', // 必填,公众号的唯一标识\n \"timestamp\": timestamp, // 必填,生成签名的时间戳\n \"nonceStr\": nonce_str, // 必填,生成签名的随机串\n \"signature\": signature, // 必填,签名\n jsApiList: [\n 'hideMenuItems',\n 'showMenuItems',\n 'updateAppMessageShareData',\n 'updateTimelineShareData',\n 'onMenuShareWeibo',\n 'onMenuShareAppMessage',\n ], // 必填,需要使用的JS接口列表\n });\n });\n wx.ready(function () { //需在用户可能点击分享按钮前就先调用\n wx.hideAllNonBaseMenuItem();\n wx.showMenuItems({\n menuList: ['menuItem:share:appMessage' , 'menuItem:share:timeline'] // 要显示的菜单项,所有menu项见附录3\n });\n wx.updateAppMessageShareData({ \n ...shareData,\n success: function () {\n // 设置成功\n }\n })\n wx.updateTimelineShareData({\n ...shareData,\n success: function () {\n // 设置成功\n }\n })\n });\n }else{\n Toast.info('请在微信中使用分享功能!', 2);\n }\n }\n\n componentDidMount() {\n Promise.all([http.get(`${API['base-api']}/pdd/goupon_pay_page/${getParam('id')}`), http.get(`${API.home}/m/user_info`)]).then(resultList => {\n console.log(resultList);\n let res = resultList[0],\n userInfo = resultList[1];\n if(res.data.errno !== 0) {\n Toast.info(res.data.msg, 2);\n return;\n }\n if(userInfo.data.code !== 200) {\n Toast.info(res.data.msg, 2);\n return;\n }\n this.setState({\n data: res.data.data.course_info,\n pdd_price: res.data.data.pdd_price,\n groupon_member: res.data.data.groupon_member,\n is_success: res.data.data.is_success,\n person_num: res.data.data.person_num,\n course_list: res.data.data.course_list,\n userInfo,\n number: res.data.data.number,\n countdown: '',\n });\n\n if(res.data.data.is_success === 0) {\n let date = res.data.data.end_time * 1000,\n hours = 0,\n minutes = 0,\n seconds = 0;\n setInterval(() => {\n date -= 1000\n hours = `${parseInt(date / (60 * 60 * 1000))}`.padStart(2, 0);\n minutes = `${parseInt((date - hours * 3600000) / 60000)}`.padStart(2, 0);\n seconds = `${parseInt((date - hours * 3600000 - minutes * 60000 ) / 1000)}`.padStart(2, 0);\n this.setState({\n countdown: `${hours}:${minutes}:${seconds}`\n });\n }, 1000)\n }\n });\n }\n\n render() {\n const { data: { course_id, course_title, simpledescription, price0, price1 }, pdd_price, is_success, person_num, groupon_member, course_list } = this.state;\n const Info = (\n <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${course_id}`}>\n {course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{simpledescription}</p>\n <div className='des'>\n <p className=\"course-price\">\n <span className=\"new\">¥{price1}</span>\n <span className=\"old\">¥{price0}</span>\n </p>\n </div>\n </div>\n )\n return (\n <div className='to-group-box'>\n <HeaderBar title='拼团' arrow={true} cart={false}></HeaderBar>\n {\n !is_success && <VList img={this.state.data.image_name} id={this.state.data.course_id} info={Info}></VList>\n }\n\n <GorupContent data={this.state} invitedFriends={this.invitedFriends} />\n\n <WhiteSpace></WhiteSpace>\n <div className=\"group-course\">\n <div className=\"top-title\">\n <span>本周特惠</span>\n <Link to={`/preferential`} className='more'>更多<i className='iconfont iconiconfront-70'></i></Link>\n </div>\n {\n (course_list && course_list.length > 0) && (course_list[0].course && course_list[0].course.length > 0) && course_list[0].course.slice(0, 4).map(item => {\n\n let weekInfo = <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${item.course_id}`}>\n {item.course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{item.simpledescription}</p>\n <div className='des'>\n <p className=\"course-price\">\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n </div>\n </div>\n return (<VList img={item.image_name} key={item.uid} id={item.course_id} info={weekInfo}></VList>)\n })\n }\n\n </div>\n </div>\n )\n }\n}\n\nfunction GorupContent(props) {\n let tip, btn, dec, groupTip, shareTip, groupSuccessMbc;\n const { pdd_price, data, groupon_member, is_success, person_num, userInfo, share, number, countdown } = props.data;\n let ary=[],num = number;\n while(num != 0) {\n ary.push(num);\n num--;\n }\n groupTip = (<div className='group-user-list'>\n <Flex justify='center' className='imgList'>\n {\n groupon_member.map(item => {\n return (\n <div className='imgContainer' key={Math.random()}>\n <img className='imgname' src={item.avatar} alt='' />\n {\n item.user_type === 1 ? (\n <div className='leaderFlag'>\n <span>团长</span>\n </div>\n ) : null\n }\n </div>);\n })\n }\n {\n ary.map(item => {\n return (<div className='imgContainer' key={Math.random()}>\n <div className='imgname'>\n <i className='iconfont iconwode-xianxing no-body'></i>\n </div>\n </div>)\n })\n }\n </Flex>\n </div>);\n\n if (groupon_member && groupon_member.length > 0) {\n let uid = '';\n groupon_member.map(item=>{\n if(item.user_type === 1) {\n uid = `${item.uid}`;\n }\n })\n\n if(uid === userInfo.data.data.uid) {\n tip = <p className='tip'>{`拼团省¥${pdd_price}元`}</p>\n btn = <span className='group-btn' onClick={props.invitedFriends}>邀请好友参团 {countdown} 后结束</span>\n dec = <p className='dec'>分享到3个群后,成团率高达98%</p>\n } else {\n tip = <p className='tip'>{`拼团省¥${pdd_price}元`}</p>\n btn = <Link to={`/order?id=${data.course_id}`} className='group-btn'>一键参团</Link>\n }\n }\n\n if (is_success === 1) {\n tip = <p className='success'>拼团成功</p>\n btn = <Link to={`/play`} className='tostudy'>去学习</Link>\n }\n return (\n <div className='gorup-content'>\n {\n share ? (\n <div className='groupSuccessMbc' onClick={props.invitedFriends}>\n <div className='tipContent'>\n \n {`还差${number}人,分享到3个群,成团率高达98%`}\n </div>\n <div className='tipArrow'>\n <i className='iconfont iconyindao'></i>\n </div>\n </div>\n ) : null\n }\n\n {tip}\n <WingBlank>\n {groupTip}\n </WingBlank>\n <WingBlank>\n {btn}\n </WingBlank>\n {dec}\n {\n !is_success &&\n <div className=\"group-dec\">\n <span>\n <i className='iconfont iconiconfront-1'></i>\n ·好友参团 ·人满成交 ·人不满退款\n </span>\n <span className='allNum'>{`累计${person_num}人成团`}</span>\n </div>\n }\n </div>\n )\n}\n\nexport default ToGroup\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{1171:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),c=a.n(n),i=a(7),s=a(8),r=a(11),o=a(9),l=a(10),d=(a(253),a(98)),u=a.n(d),m=a(0),p=a.n(m),h=a(161),v=(a(780),a(16)),f=a(52),y=a(4),E=(a(781),a(641)),b=function(e){var t=e.item;return p.a.createElement("div",{className:"bottom"},p.a.createElement("span",{className:"price"},"\xa5",t.price1),p.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},g=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];return(a=Object(r.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(s)))).state={num:10,list:[],courseId:null},a.getRecommendation=function(){y.c.get("".concat(API.home,"/m/play/recommend_course/").concat(a.props.vCourseId,"?num=").concat(a.state.num)).then(function(e){var t=e.data;200===t.code?a.setState({list:t.data}):c.a.info(t.msg)})},a.handleClick=function(e){a.props.history.push("/detail?id=".concat(e))},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.getRecommendation()}},{key:"render",value:function(){var e=this;return p.a.createElement("div",{className:"recommendation"},p.a.createElement("div",{className:"title"},"\u76f8\u5173\u63a8\u8350"),p.a.createElement("ul",null,this.state.list.map(function(t){var a=p.a.createElement("div",{className:"info"},p.a.createElement("p",{className:"title"},t.course_title),p.a.createElement("p",{className:"des"},t.simpledescription),p.a.createElement(b,{item:t}));return p.a.createElement(E.a,{key:t.course_id,img:t.image_name,handleClick:e.handleClick,info:a,id:t.course_id})})))}}]),t}(m.PureComponent),N=(a(782),a(15)),S=a.n(N),I=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,c=new Array(n),s=0;s<n;s++)c[s]=arguments[s];return(a=Object(r.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(c)))).handleClick=function(e){a.props.selectVideo(e)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this;return p.a.createElement("div",{className:"video-catalog"},p.a.createElement("ul",null,this.props.videoCatalog.map(function(t,a){return p.a.createElement("li",{key:t.id,className:S()({active:e.props.activeIndex===a})},p.a.createElement("div",{className:"video-title",onClick:e.handleClick.bind(e,a)},p.a.createElement("span",{className:"title"},t.name),p.a.createElement("span",{className:"duration"},t.duration),p.a.createElement("i",{className:S()("iconfont",[0===t.video_auth?"iconiconfront-74":"iconplay_hovericon"])})),t.practice&&t.practice.qid?p.a.createElement("div",{className:"exercise"},"\u8bfe\u540e\u7ec3\u4e60\uff1a",t.practice.title,p.a.createElement("i",{className:S()("iconfont",t.practice.is_tested?"iconiconfront-3":"iconiconfront-74")})):null)})))}}]),t}(m.Component),w=(a(783),a(785)),_=a.n(w),k=(a(786),function(e){function t(){return Object(i.a)(this,t),Object(r.a)(this,Object(o.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.datum;return p.a.createElement("div",{className:"datum-catalog"},p.a.createElement("p",{className:"prompt"},"\u8bfe\u7a0b\u8d44\u6599\u8bf7\u5230PC\u7aef\u64ad\u653e\u9875\u4e0b\u8f7d"),p.a.createElement(_.a,null,e&&e.length&&e.map(function(e,t){return p.a.createElement(_.a.Panel,{header:e.dir_name,key:t},e.files.map(function(e){return p.a.createElement("div",{key:e.file_id,className:"file-name"},e.file_name)}))})))}}]),t}(m.Component));k.defaultProps={datum:[{dir_name:"",files:[{file_name:"",file_id:0}]}]};var x=k,O=a(1149),P=(a(832),a(30)),j=a(20),C=a(43),R=a.n(C),A=a(833),L=a.n(A),B=a(654),T=u.a.alert;function D(e){return e.isShow&&p.a.createElement("div",{className:"progress-share-modal-wrapper"},p.a.createElement("div",{className:"progress-share-modal"},p.a.createElement("div",{className:"title"},"\u6bcf\u65e5\u6253\u5361"),p.a.createElement("ul",{className:"progress-container"},p.a.createElement("li",null,p.a.createElement("div",{className:"title"},"\u7d2f\u8ba1\u5b66\u4e60"),p.a.createElement("div",{className:"number"},p.a.createElement("span",{className:"num"},e.data.learn_day_count),"\u5929")),p.a.createElement("li",null,p.a.createElement("div",{className:"title"},"\u884c\u52a8\u529b\u8d85\u8fc7"),p.a.createElement("div",{className:"number"},p.a.createElement("span",{className:"num"},parseFloat(e.data.action_power)),"%"))),p.a.createElement("div",{className:"share-container"},p.a.createElement("div",{className:"title"},"\u5206\u4eab\u5230"),p.a.createElement("ul",null,p.a.createElement("li",{className:"share-icon"},p.a.createElement("div",{className:"icon"},p.a.createElement("i",{className:"iconfont iconweixinzhifu"})),p.a.createElement("div",{className:"text"},"\u5fae\u4fe1\u597d\u53cb")),p.a.createElement("li",{className:"share-icon"},p.a.createElement("div",{className:"icon"},p.a.createElement("i",{className:"iconfont iconpengyouquaniconx"})),p.a.createElement("div",{className:"text"},"\u670b\u53cb\u5708")))),p.a.createElement("i",{className:"iconfont iconiconfront-2 close",onClick:e.closeShareModal})))}var W=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];return(a=Object(r.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(s)))).previousPlaybackRate=1,a.currentPlaybackRate=1,a.reconnect=!0,a.state={title:"",courseId:null,videoList:[],datum:[],currentVideoSrc:"",activeIndex:0,isAuth:!0,course:null,salePrice:null,vCourseId:null,isLoading:!0,isShowShareModal:!1,shareData:{},singleBox:!1,singMess:""},a.tobuy=function(){y.c.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(y.b)("id"),"]")).then(function(e){0===e.data.errno?a.props.history.push("/order?id=".concat(Object(y.b)("id")),{simple:1}):c.a.info(e.data.msg,2)})},a.toSingleset=function(e){console.log(e),a.setState({singleBox:!0,singMess:e})},a.boxHide=function(e){a.setState({singleBox:e})},a.setupRecord=function(){a.recordSocket=L()(API.record,{transports:["websocket"]}),a.recordSocket.on("seek",function(e){a.player.currentTime(e)}),a.recordTimer=setInterval(function(){a.sendRecord()},5e3)},a.sendRecord=function(){a.recordSocket&&a.player&&a.recordSocket.emit("addRecord",a.recordUserInfo())},a.recordUserInfo=function(){return{uid:a.props.user.data.uid,course_id:a.courseID,video_id:a.state.videoList[a.state.activeIndex].id,video_time:parseInt(a.player.currentTime()),plat:5}},a.setupWS=function(){a.ws=new WebSocket("ws://process-test.julyedu.com:9502"),a.ws.addEventListener("error",function(){a.ws=null}),a.ws.addEventListener("close",function(){a.reconnect&&(a.ws=null,setTimeout(function(){a.setupWS()},1e3)),clearInterval(a.timer)}),a.ws.addEventListener("message",function(e){4040==JSON.parse(e.data).code&&(a.reconnect=!1)})},a.sendMessage=function(e){a.ws.send(JSON.stringify(e))},a.getShareProgressInfo=function(){y.c.get("".concat(API["base-api"],"/m/aist/share_data/").concat(a.courseID,"/").concat(a.state.videoList[a.state.activeIndex].id)).then(function(e){var t=e.data;200==t.errno&&a.setState({shareData:t.data,isShowShareModal:!0})})},a.countSchedule=function(){a.sendMessage({mtype:"count_schedule",uid:a.props.user.data.uid,token:a.token,platform:5})},a.sendWatchTime=function(e,t){var n=a.state,c=n.videoList,i=n.activeIndex,s=n.vCourseId;a.sendMessage({mtype:"watch_time",rate:t,time:e,video_id:c[i].id,course_id:a.courseID,v_course_id:s,uid:a.props.user.data.uid,token:a.token,platform:5})},a.setupTimer=function(){a.count=0,a.watchSec=0,clearInterval(a.timer),a.timer=setInterval(function(){a.player&&a.player.player()&&(5===a.count?(a.sendWatchTime(a.watchSec,a.currentPlaybackRate),a.count=a.watchSec=0):(!a.player.paused()&&a.watchSec++,a.count++))},1e3)},a.initializePlayer=function(){window.HELP_IMPROVE_VIDEOJS=!1,a.player=Object(O.a)(a.video,{controls:!0,preload:"auto",bigPlayButton:!0,textTrackDisplay:!1,posterImage:!1,errorDisplay:!1,playbackRates:["0.75","1","1.5","2"],controlBar:{pictureInPictureToggle:!1}}),a.player.on("ready",function(){a.recordSocket.emit("load",a.recordUserInfo())}),a.player.on("ratechange",function(){a.currentPlaybackRate=a.player.playbackRate(),a.sendWatchTime(a.watchSec,a.previousPlaybackRate),a.count=a.watchSec=0,a.previousPlaybackRate=a.currentPlaybackRate}),a.player.on("ended",function(){a.sendWatchTime(a.watchSec,a.currentPlaybackRate),a.getShareProgressInfo(),clearInterval(a.timer)}),a.player.on("seeked",function(){a.sendRecord()})},a.sendLastRecord=function(){y.c.post("".concat(API.home,"/m/course/record_last_video"),{v_course_id:a.state.course.v_course_id,video_id:a.state.videoList[a.state.activeIndex].id})},a.selectVideo=function(e){if(a.hasAuth()){if(e===a.state.activeIndex)return;a.setState({activeIndex:e},function(){a.setPlayerSrc(a.state.videoList[e].play_url),a.sendLastRecord(),a.playVideo()}),clearInterval(a.timer),a.ws&&(a.countSchedule(),a.setupTimer())}a.setState({activeIndex:e})},a.getVideoList=function(){y.c.get("".concat(API.home,"/m/course/play/").concat(a.courseID)).then(function(e){var t=e.data;200===t.code?a.setState(function(e){return{videoList:t.data.lessons,currentVideoSrc:t.data.lessons[e.activeIndex].play_url,course:t.data.course,courseId:t.data.course.course_id,vCourseId:t.data.course.v_course_id,title:t.data.course.course_title,isLoading:!1}},function(){a.state.course.is_aist&&(a.setupWS(),a.setupTimer()),a.lessonAvailable()?a.hasAuth(a.state.activeIndex)?Promise.resolve().then(function(){var e=a.state,t=e.videoList,n=e.course,c=t.findIndex(function(e){return e.id==n.last_video_id});a.setState({activeIndex:c<0?0:c}),a.initializePlayer(),a.playWithAuth()}):a.getCoursePrice():T("\u6682\u65e0\u89c6\u9891","",[{text:"OK",onPress:function(){a.props.history.push("/")}}])}):c.a.info(t.msg)})},a.setPlayerSrc=function(e){a.player.src({src:e,type:"application/x-mpegURL"})},a.playVideo=function(){a.player.play()},a.lessonAvailable=function(){var e=a.state;return 0!==e.videoList[e.activeIndex].video_size},a.getCoursePrice=function(){y.c.get("".concat(API.home,"/sys/course/price/").concat(Object(y.b)("id"))).then(function(e){var t=e.data;200===t.code&&a.setState({salePrice:t.data.sale_price})})},a.playWithAuth=function(){var e=a.state,t=e.videoList,n=e.activeIndex;a.hasAuth()&&a.setPlayerSrc(t[n].play_url)},a.hasAuth=function(){var e=a.state,t=e.course,n=e.videoList[e.activeIndex];return n.is_free?(a.setState({isAuth:!0}),!0):t.is_audition?(a.setState({isAuth:!0}),!0):n.video_auth?(a.setState({isAuth:!0}),!0):(a.setState({isAuth:!1}),!1)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.courseID=Object(y.b)("id"),this.setState({courseId:this.courseID}),this.token=R.a.get("token"),this.getVideoList(),this.getDatumCatalog(),this.setupRecord()}},{key:"componentWillUnmount",value:function(){this.player&&this.player.dispose(),clearInterval(this.timer),this.ws&&this.ws.close(),this.ws=null,clearInterval(this.recordTimer),this.recordSocket&&this.recordSocket.close(),this.recordSocket=null}},{key:"getDatumCatalog",value:function(){var e=this;y.c.get("".concat(API.home,"/m/course/data/").concat(this.courseID)).then(function(t){var a=t.data;200===a.code?e.setState({datum:a.data}):c.a.info(a.msg)})}},{key:"render",value:function(){var e=this,t=this.props,a=t.match,n=t.location,c=this.state,i=c.videoList,s=c.activeIndex,r=c.isAuth,o=c.salePrice;return p.a.createElement("div",{className:"play"},p.a.createElement(h.a,{title:this.state.title,arrow:!0}),p.a.createElement(P.f,{isLoading:this.state.isLoading},p.a.createElement("div",{className:"video"},p.a.createElement("video",{className:"video-js",ref:function(t){return e.video=t}},p.a.createElement("source",{src:"/",type:"application/x-mpegURL"})),!r&&p.a.createElement("div",{className:"purchase-box"},p.a.createElement("div",{className:"hint"},"\u60a8\u5c1a\u672a\u8d2d\u4e70\u8be5\u8bfe\u65f6\uff0c\u8bf7\u8d2d\u4e70\u540e\u5b66\u4e60\u3002"),p.a.createElement("div",{className:"btns"},p.a.createElement("button",{type:"button",onClick:this.tobuy,className:"purchase-class"},"\xa5",o," \u8d2d\u4e70\u8bfe\u7a0b"),p.a.createElement("button",{type:"button",onClick:this.toSingleset.bind(this,i[s]),className:"purchase-episode"},"\xa5",i.length&&i[s].class_price," \u8d2d\u4e70\u5355\u96c6")))),p.a.createElement("div",{className:"tab"},p.a.createElement("div",null,p.a.createElement(v.c,{to:"".concat(a.url,"/video"),replace:!0,activeClassName:"active"},"\u89c6\u9891")),p.a.createElement("div",null,p.a.createElement(v.c,{to:"".concat(a.url,"/datum"),replace:!0,activeClassName:"active"},"\u8d44\u6599"))),p.a.createElement(B.a,{singleBox:this.state.singleBox,boxHide:this.boxHide,data:this.state.singMess,videoId:this.state.singMess.id,title:this.state.singMess.course_tile})),p.a.createElement(f.d,null,p.a.createElement(f.a,{exact:!0,from:"/play",to:{pathname:"/play/video",search:n.search}}),p.a.createElement(f.b,{path:"".concat(a.path,"/video"),render:function(t){return p.a.createElement(I,Object.assign({activeIndex:e.state.activeIndex,selectVideo:e.selectVideo,videoCatalog:e.state.videoList},t))}}),p.a.createElement(f.b,{path:"".concat(a.path,"/datum"),render:function(t){return p.a.createElement(x,Object.assign({},t,{datum:e.state.datum}))}})),p.a.createElement(f.b,{render:function(t){return e.state.vCourseId?p.a.createElement(g,Object.assign({},t,{vCourseId:e.state.vCourseId})):null}}),p.a.createElement(D,{isShow:this.state.isShowShareModal,closeShareModal:function(){return e.setState({isShowShareModal:!1})},data:this.state.shareData}))}}]),t}(m.Component);t.default=Object(j.b)(function(e){return{user:e.user}},null)(W)},641:function(e,t,a){"use strict";var n=a(0),c=a.n(n);a(642);t.a=function(e){return c.a.createElement("li",{className:"v-list-base-item",onClick:e.handleClick.bind(void 0,e.id)},c.a.createElement("div",{className:"content"},c.a.createElement("div",{className:"cover"},e.status,c.a.createElement("img",{src:e.img,alt:""})),e.info),e.tab)}},642:function(e,t,a){},654:function(e,t,a){"use strict";a(44);var n=a(14),c=a.n(n),i=a(7),s=a(8),r=a(11),o=a(9),l=a(10),d=a(0),u=a.n(d),m=(a(655),a(4)),p=a(16),h=a(52),v=a(23),f=a(20),y=a(154),E=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).check=function(e){a.setState({payType:e})},a.toBuy=function(){m.c.get("".concat(API.home,"/sys/createClassOrder/").concat(a.props.videoId)).then(function(e){200===e.data.code?(a.setState({orderId:e.data.data.order_id}),"1"===a.state.payType?a.alipayPay(a.state.orderId):a.weixinPay(a.state.orderId)):c.a.info(e.data.msg,2)})},a.weixinPay=function(e){m.a.isWeixin?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb").toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":m.c.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(e){0===e.data.errno?window.location.href=e.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1").toLowerCase():c.a.info(e.data.msg,2)})},a.alipayPay=function(e){m.c.get("".concat(API["base-api"],"/pay/alipay/wap_charge/oid/").concat(e)).then(function(e){0===e.data.errno?window.location=e.data.data.url:c.a.info(e.data.msg,2)})},a.onBridgeReady=function(e){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.appId,timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.paySign},function(e){"get_brand_wcpay_request:ok"==e.err_msg?this.payCallback():alert("\u652f\u4ed8\u5931\u8d25")})},a.isweixinPay=function(){var e=Object(m.b)("code");if(e){if(void 0===Object(m.b)("oid"))return;m.c.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(m.b)("oid"),"/code/").concat(e)).then(function(e){if(0===e.data.errno){var t=e.data.data;a.onBridgeReady(t),"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",a.onBridgeReady,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",a.onBridgeReady),document.attachEvent("onWeixinJSBridgeReady",a.onBridgeReady)):a.onBridgeReady()}else c.a.info(e.data.msg,2)})}},a.payCallback=function(){m.c.get("".concat(API.home,"/sys/orderStatus/").concat(Object(m.b)("oid"))).then(function(e){"200"==e.data.data.errno?a.setState({status:6}):"201"==e.data.data.errno?a.setState({status:4}):"202"==e.data.data.errno?a.setState({status:3}):"203"==e.data.data.errno?a.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,status:2}):c.a.info(e.data.data.msg,2)})},a.toBuyAll=function(){},a.zerobuyReceive=function(){c.a.success("\u8d2d\u4e70\u5168\u96c6\u6210\u529f",3),a.colse()},a.zerogroupBuy=function(){a.getOrderId()},a.getOrderId=function(){var e={course_id:Object(m.b)("id")};m.c.post("".concat(API["base-api"],"/pdd/sys"),e).then(function(e){0===e.data.errno?(a.setState({groupOrderId:e.data.data.order_id}),a.getOrderStatus(e.data.data.order_id)):c.a.info(e.data.msg,2)})},a.getOrderStatus=function(e){m.c.get("".concat(API.home,"/m/pdd/order_status/").concat(e)).then(function(e){200===e.data.code?a.getTime(e.data.data.pdd_order_id):c.a.info(e.data.msg,2)})},a.getTime=function(e){m.c.get("".concat(API.home,"/m/pdd_order_end_time/").concat(e)).then(function(e){200===e.data.code?a.setState({endTime:e.data.data.end_time,status:7}):c.a.info(e.data.msg,2)})},a.toGroup=function(){a.props.history.push("/togroup?id=".concat(a.state.groupOrderId))},a.colse=function(){a.props.boxHide(!1),a.setState({status:1})},a.state={status:1,orderId:"",nowPrice:"",laterPrice:"",hour:"",min:"",sec:"",endTime:"",groupOrderId:"",payType:"0"},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){(1===Object(m.b)("is_class")||Object(m.b)("weixinpay"))&&this.payCallback(),m.a.isWeixin&&this.isweixinPay()}},{key:"render",value:function(){var e=this;if(this.state.endTime){var t=1e3*this.state.endTime,a=Date.now();setInterval(function(){t-=1e3;var n=Object(y.differenceInSeconds)(new Date(t),a)%60,c=Object(y.differenceInMinutes)(new Date(t),a)%60,i=Object(y.differenceInHours)(new Date(t),a)%24;e.setState({hour:i,min:c,sec:n})},1e3)}return u.a.createElement("div",null,this.props.singleBox&&u.a.createElement("div",{className:"popup-box"},1===this.state.status&&u.a.createElement("div",{className:"content singleset-payment"},u.a.createElement("div",{className:"price-box"},u.a.createElement("span",null,"\u5b9e\u4ed8\u6b3e\uff1a"),u.a.createElement("p",null,this.props.data.class_price,"\u5143")),u.a.createElement("div",{className:"course-info"},u.a.createElement("p",{className:"text-overflow-1"},u.a.createElement("span",null,"\u8bfe\u7a0b\uff1a"),this.props.title),u.a.createElement("p",{className:"text-overflow-1"},u.a.createElement("span",null,"\u8bfe\u65f6\uff1a"),this.props.data.name)),u.a.createElement("div",{className:"payment-type"},u.a.createElement("label",null,"\u652f\u4ed8\u65b9\u5f0f\uff1a"),!m.a.isWeixin&&u.a.createElement("p",{onClick:this.check.bind(this,"1")},u.a.createElement("i",{className:"iconfont iconzhifubaox-"}),u.a.createElement("span",null,"\u652f\u4ed8\u5b9d"),u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("1"===this.state.payType?"redioed":"")})),u.a.createElement("p",{onClick:this.check.bind(this,"0")},u.a.createElement("i",{className:"iconfont iconweixinzhifu buy"}),u.a.createElement("span",null,"\u5fae\u4fe1\u652f\u4ed8"),u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("0"===this.state.payType?"redioed":"")}))),u.a.createElement("div",{className:"btn btn-18B4ED",onClick:this.toBuy},"\u786e\u8ba4\u8d2d\u4e70")),2===this.state.status&&u.a.createElement("div",{className:"content payment-success"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u8d2d\u4e70\u6210\u529f")),u.a.createElement("div",{className:"dec"},"\xb7 3\u5929\u5185\u8d2d\u4e70\u5168\u96c6\uff0c\u53ef\u76f4\u63a5\u62b5\u6263\u8be5\u96c6\u8d39\u7528\uff0c",this.state.nowPrice,"\u5143\u8d2d\u4e70\u3002"),u.a.createElement("div",{className:"dec"},"\xb7 \u8d85\u8fc73\u5929\uff0c\u6309\u7167\u672a\u591f\u96c6\u6570/\u5168\u90e8\u96c6\u6570\u7b49\u6bd4\u4f8b\u8ba1\u8d39\uff0c",this.state.laterPrice,"\u5143\u8d2d\u4e70\u5168\u96c6\u3002"),u.a.createElement("div",{className:"btn btn-18B4ED"},"\u5f00\u59cb\u5b66\u4e60"),u.a.createElement("div",{className:"btn btn-FF4000",onclick:this.toBuyAll()},"\uffe5",this.state.nowPrice,"\u8d2d\u4e70\u5168\u96c6")),3===this.state.status&&u.a.createElement("div",{className:"content zero"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u8d2d\u4e70\u6210\u529f")),u.a.createElement("div",{className:"dec"},"\xb7 \u606d\u559c\u60a8\u83b7\u5f970\u5143\u62fc\u56e2\u8d2d\u4e70\u5269\u4f59\u8bfe\u65f6\u7684\u673a\u4f1a\u3002"),u.a.createElement("div",{className:"btn btn-FF4000",onClick:this.zerogroupBuy},"0\u5143\u53c2\u56e2")),4===this.state.status&&u.a.createElement("div",{className:"content zero"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u8d2d\u4e70\u6210\u529f")),u.a.createElement("div",{className:"dec"},"\xb7 \u606d\u559c\u60a8\u83b7\u5f970\u5143\u8d2d\u4e70\u5269\u4f59\u8bfe\u65f6\u7684\u673a\u4f1a\u3002"),u.a.createElement("div",{className:"btn btn-FF4000",onClick:this.zerobuyReceive},"0\u5143\u8d2d")),6===this.state.status&&u.a.createElement("div",{className:"content zero"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u8d2d\u4e70\u6210\u529f")),u.a.createElement(p.b,{to:"/play?id=".concat(Object(m.b)("id")),className:"btn btn-18B4ED"},"\u53bb\u5b66\u4e60")),7===this.state.status&&u.a.createElement("div",{className:"content group"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u53c2\u56e2\u6210\u529f")),u.a.createElement("div",{className:"group-img"},u.a.createElement("img",{src:this.props.user.data.avatar,alt:""}),u.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/images/weekend/train7/ellipsis.png",alt:""}),u.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/images/weekend/train7/ellipsis.png",alt:""})),u.a.createElement("div",{className:"btn-l btn-FF4000",onClick:this.toGroup},"\u5269\u4f59",String(this.state.hour).padStart(2,0),"\uff1a",String(this.state.min).padStart(2,0),"\uff1a",String(this.state.sec).padStart(2,0),"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2")),u.a.createElement("i",{onClick:this.colse,className:"iconfont iconiconfront-2 close"})))}}]),t}(d.Component);t.a=Object(v.d)(Object(f.b)(function(e){return{user:e.user}},null),h.g)(E)},655:function(e,t,a){},780:function(e,t,a){},781:function(e,t,a){},782:function(e,t,a){},786:function(e,t,a){},788:function(e,t){},856:function(e,t){}}]);
//# sourceMappingURL=video.0535da32.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/video/recommendation/index.js","components/video/video-catalog/index.js","components/video/datum-catalog/index.js","components/video/index.js","common/v-list-base/index.js","components/detail/single/index.js"],"names":["Bottom","_ref","item","react_default","a","createElement","className","price1","price0","Recommendation","state","num","list","courseId","getRecommendation","http","get","concat","API","home","_this","props","vCourseId","then","res","data","code","setState","toast_default","info","msg","handleClick","id","history","push","this","_this2","map","Info","course_title","simpledescription","recommendation_Bottom","v_list_base","key","course_id","img","image_name","PureComponent","VideoCatalog","i","selectVideo","videoCatalog","index","classnames","active","activeIndex","onClick","bind","name","duration","video_auth","practice","qid","title","is_tested","Component","DatumCatalog","datum","accordion_default","length","Panel","header","dir_name","files","file_id","file_name","defaultProps","alert","modal_default","ProgressShareModal","isShow","learn_day_count","parseFloat","action_power","closeShareModal","Video","previousPlaybackRate","currentPlaybackRate","reconnect","videoList","currentVideoSrc","isAuth","course","salePrice","isLoading","isShowShareModal","shareData","singleBox","singMess","tobuy","getParam","errno","simple","toSingleset","console","log","boxHide","val","setupRecord","recordSocket","io","record","transports","on","time","player","currentTime","recordTimer","setInterval","sendRecord","emit","recordUserInfo","uid","user","courseID","video_id","video_time","parseInt","plat","setupWS","ws","WebSocket","addEventListener","setTimeout","clearInterval","timer","e","JSON","parse","sendMessage","message","send","stringify","getShareProgressInfo","countSchedule","mtype","token","platform","sendWatchTime","sec","rate","_this$state","v_course_id","setupTimer","count","watchSec","paused","initializePlayer","window","HELP_IMPROVE_VIDEOJS","videojs","video","controls","preload","bigPlayButton","textTrackDisplay","posterImage","errorDisplay","playbackRates","controlBar","pictureInPictureToggle","playbackRate","sendLastRecord","post","hasAuth","setPlayerSrc","playVideo","getVideoList","is_aist","lessonAvailable","Promise","resolve","_this$state2","videoIndex","findIndex","last_video_id","playWithAuth","getCoursePrice","text","onPress","src","type","play","_this$state3","_this$state4","_this$state5","lesson","jsCookie","getDatumCatalog","dispose","close","_this3","_this$props","match","location","_this$state6","HeaderBar","arrow","common","ref","el","react_router_dom","to","url","replace","activeClassName","single","videoId","course_tile","react_router","exact","from","pathname","search","path","render","video_video_catalog","Object","assign","video_datum_catalog","video_recommendation","connect","VList","react__WEBPACK_IMPORTED_MODULE_0___default","status","alt","tab","Single","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","check","payType","toBuy","orderId","order_id","alipayPay","weixinPay","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","browser","isWeixin","href","encodeURIComponent","toLowerCase","onBridgeReady","WeixinJSBridge","invoke","appId","timeStamp","nonceStr","package","signType","paySign","err_msg","payCallback","isweixinPay","weixin_code","undefined","document","attachEvent","nowPrice","now_price","laterPrice","three_day_later_price","toBuyAll","zerobuyReceive","success","colse","zerogroupBuy","getOrderId","groupOrderId","getOrderStatus","getTime","pdd_order_id","endTime","end_time","toGroup","hour","min","date","now","Date","s","differenceInSeconds","m","differenceInMinutes","h","differenceInHours","react__WEBPACK_IMPORTED_MODULE_7___default","class_price","onclick","react_router_dom__WEBPACK_IMPORTED_MODULE_10__","avatar","String","padStart","compose","withRouter"],"mappings":"wQAQMA,EAAS,SAAAC,GAAY,IAAVC,EAAUD,EAAVC,KACb,OACIC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,UACXH,EAAAC,EAAAC,cAAA,QAAMC,UAAU,SAAhB,OAA0BJ,EAAKK,QAC/BJ,EAAAC,EAAAC,cAAA,QAAMC,UAAU,eAAhB,OAAgCJ,EAAKM,UA0El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MsR,MAAMiB,SAAS,EAAG,GAD3C,SACgDD,OAAO7Q,KAAKzB,MAAMuR,KAAKgB,SAAS,EAAG,GADnF,SACwFD,OAAO7Q,KAAKzB,MAAM2I,KAAK4J,SAAS,EAAG,GAD3H,yCAMRN,EAAAvS,EAAAC,cAAA,KAAGmD,QAASrB,KAAKmP,MAAOhR,UAAW,4CA1VtC2D,aAoWNiP,gBACX3E,YACI,SAAA7N,GAAK,MAAK,CAACiH,KAAMjH,EAAMiH,OACvB,MAEJwL,IALWD,CAMbrE","file":"static/js/video.0535da32.chunk.js","sourcesContent":["import React, { PureComponent } from 'react';\nimport './recommendation.scss'\nimport { http } from '@/utils'\nimport { Toast } from \"antd-mobile\";\nimport VList from '@/common/v-list-base';\n\n\n\nconst Bottom = ({item}) => {\n return (\n <div className='bottom'>\n <span className='price'>¥{item.price1}</span>\n <span className='stale-price'>¥{item.price0}</span>\n </div>\n )\n}\n\n\n\nclass Recommendation extends PureComponent {\n state = {\n num: 10,\n list: [],\n courseId: null\n }\n\n\n componentDidMount() {\n this.getRecommendation()\n }\n\n getRecommendation = () => {\n http.get(`${API.home}/m/play/recommend_course/${this.props.vCourseId}?num=${this.state.num}`)\n .then(res => {\n const data = res.data\n if(data.code === 200){\n\n this.setState({\n list: data.data\n })\n\n }else {\n Toast.info(data.msg)\n }\n })\n }\n\n\n handleClick = id => {\n this.props.history.push(`/detail?id=${id}`)\n }\n\n render() {\n return (\n <div className='recommendation'>\n <div className={'title'}>相关推荐</div>\n <ul>\n {\n this.state.list.map(item => {\n const Info = (\n <div className=\"info\">\n <p className='title'>{item.course_title}</p>\n <p className='des'>{item.simpledescription}</p>\n <Bottom\n item={item}\n />\n </div>\n )\n\n return (\n <VList\n key={item.course_id}\n img={item.image_name}\n handleClick={this.handleClick}\n info={Info}\n id={item.course_id}\n />\n )\n })\n }\n </ul>\n </div>\n );\n }\n}\n\nexport default Recommendation;","import React, { Component } from 'react'\nimport './video-catalog.scss'\nimport classnames from 'classnames'\n\n\nclass VideoCatalog extends Component {\n\n handleClick = (i) => {\n this.props.selectVideo(i)\n }\n\n render() {\n return (\n <div className='video-catalog'>\n <ul>\n {\n this.props.videoCatalog.map((item, index) => {\n return (\n <li key={item.id}\n className={classnames({active: this.props.activeIndex === index})}\n >\n <div className=\"video-title\" onClick={this.handleClick.bind(this, index)}>\n <span className=\"title\">{item.name}</span>\n <span className='duration'>{item.duration}</span>\n <i className={classnames(`iconfont`,\n [item.video_auth === 0\n ? 'iconiconfront-74'\n : 'iconplay_hovericon'],\n )}/>\n </div>\n {\n (item.practice && item.practice.qid) ? <div className=\"exercise\">\n 课后练习:{item.practice.title}\n <i className={classnames('iconfont', item.practice.is_tested ? 'iconiconfront-3' : 'iconiconfront-74')}/>\n {/*<i className='iconfont iconiconfront-74'/>*/}\n </div>\n : null\n }\n </li>\n )\n })\n }\n </ul>\n </div>\n );\n }\n}\n\nexport default VideoCatalog;","import React, { Component } from 'react';\nimport './datum-catalog.scss'\nimport { Accordion } from \"antd-mobile\";\n\n\nclass DatumCatalog extends Component {\n\n static defaultProps = {\n datum: [{\n dir_name: '',\n files: [{\n file_name: '',\n file_id: 0\n }]\n }]\n }\n\n render() {\n const {datum} = this.props\n return (\n <div className='datum-catalog'>\n <p className='prompt'>课程资料请到PC端播放页下载</p>\n <Accordion>\n {\n datum && datum.length && datum.map((item, index) => {\n return (\n <Accordion.Panel header={item.dir_name} key={index}>\n {\n item.files.map(item => {\n return (\n <div key={item.file_id} className='file-name'>\n {item.file_name}\n </div>\n )\n })\n }\n </Accordion.Panel>\n )\n })\n }\n </Accordion>\n </div>\n );\n }\n}\n\nexport default DatumCatalog;","import React, { Component } from 'react'\nimport HeaderBar from '@/common/HeaderBar'\nimport './video.scss'\nimport { NavLink, Route, Redirect, Switch } from 'react-router-dom'\nimport { http, api, getParam } from '@/utils'\nimport Recommendation from './recommendation'\nimport VideoCatalog from './video-catalog'\nimport DatumCatalog from './datum-catalog'\nimport { Toast } from 'antd-mobile'\nimport videojs from 'video.js'\nimport 'video.js/dist/video-js.min.css'\nimport { Modal } from \"antd-mobile\"\nimport { Loading } from '@/common'\nimport { connect } from \"react-redux\"\nimport jsCookie from 'js-cookie'\nimport io from 'socket.io-client'\nimport Single from \"@/components/detail/single\";\n\nlet alert = Modal.alert\n\nfunction ProgressShareModal(props) {\n return (\n props.isShow &&\n <div className='progress-share-modal-wrapper'>\n <div className=\"progress-share-modal\">\n <div className=\"title\">每日打卡</div>\n <ul className=\"progress-container\">\n <li>\n <div className=\"title\">累计学习</div>\n <div className=\"number\"><span className='num'>{props.data.learn_day_count}</span>天</div>\n </li>\n <li>\n <div className=\"title\">行动力超过</div>\n <div className=\"number\"><span className='num'>{parseFloat(props.data.action_power)}</span>%\n </div>\n </li>\n </ul>\n <div className=\"share-container\">\n <div className=\"title\">分享到</div>\n <ul>\n <li className='share-icon'>\n <div className=\"icon\"><i className='iconfont iconweixinzhifu'></i></div>\n <div className='text'>微信好友</div>\n </li>\n <li className='share-icon'>\n <div className=\"icon\"><i className='iconfont iconpengyouquaniconx'></i></div>\n <div className='text'>朋友圈</div>\n </li>\n </ul>\n </div>\n <i className=\"iconfont iconiconfront-2 close\" onClick={props.closeShareModal}/>\n </div>\n </div>\n )\n}\n\n\nclass Video extends Component {\n\n video //video element\n player //video player instance\n\n courseID\n\n ws //websocket instance\n timer\n token\n count\n watchSec\n previousPlaybackRate = 1\n currentPlaybackRate = 1\n reconnect = true\n\n recordSocket\n recordTimer\n\n\n state = {\n title: '',\n courseId: null,\n videoList: [],\n datum: [],\n currentVideoSrc: '',\n activeIndex: 0,\n isAuth: true,\n course: null,\n salePrice: null,\n vCourseId: null,\n isLoading: true,\n isShowShareModal: false,\n shareData: {},\n singleBox: false,\n singMess: '',\n }\n\n\n componentDidMount() {\n this.courseID = getParam('id')\n this.setState({\n courseId: this.courseID\n })\n this.token = jsCookie.get('token')\n this.getVideoList()\n this.getDatumCatalog()\n this.setupRecord()\n }\n\n // 直接购买\n tobuy=()=>{\n http.get(`${API['base-api']}/m/cart/addtopreorder/[${getParam('id')}]`).then((res) => {\n if (res.data.errno === 0) {\n this.props.history.push(`/order?id=${getParam('id')}`, {simple: 1})\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n // 购买单集\n toSingleset = (item) => {\n console.log(item)\n this.setState({\n singleBox: true,\n singMess: item\n })\n }\n\n // 自组件传给父组件的boxHide\n boxHide = (val) => {\n this.setState({singleBox: val})\n }\n\n\n setupRecord = () => {\n this.recordSocket = io(API.record,{\n transports: ['websocket']\n })\n this.recordSocket.on('seek', time => {\n this.player.currentTime(time)\n })\n\n this.recordTimer = setInterval(() => {\n this.sendRecord()\n }, 5000)\n }\n\n sendRecord = () => {\n if (this.recordSocket && this.player) {\n this.recordSocket.emit('addRecord', this.recordUserInfo())\n }\n }\n\n recordUserInfo = () => {\n let {uid} = this.props.user.data\n return {\n uid,\n course_id: this.courseID,\n video_id: this.state.videoList[this.state.activeIndex]['id'],\n video_time: parseInt(this.player.currentTime()),\n plat: 5\n }\n }\n\n setupWS = () => {\n this.ws = new WebSocket('ws://process-test.julyedu.com:9502');\n this.ws.addEventListener('error', () => {\n this.ws = null\n /*setTimeout(() => {\n this.setupWS();\n }, 1000)*/\n })\n this.ws.addEventListener('close', () => {\n if (this.reconnect) {\n this.ws = null\n setTimeout(() => {\n this.setupWS();\n }, 1000)\n }\n clearInterval(this.timer)\n })\n this.ws.addEventListener('message', e => {\n const data = JSON.parse(e.data);\n data.code == 4040 && (this.reconnect = false)\n })\n }\n\n sendMessage = message => {\n this.ws.send(JSON.stringify(message))\n }\n\n //视频结束请求接口\n getShareProgressInfo = () => {\n http.get(`${API['base-api']}/m/aist/share_data/${this.courseID}/${this.state.videoList[this.state.activeIndex]['id']}`)\n .then(res => {\n const {data} = res\n if (data.errno == 200) {\n this.setState({shareData: data.data, isShowShareModal: true})\n }\n })\n }\n\n //告诉服务端切换视频\n countSchedule = () => {\n this.sendMessage({\n mtype: 'count_schedule',\n uid: this.props.user.data.uid,\n token: this.token,\n platform: 5\n })\n }\n\n sendWatchTime = (sec, rate) => {\n const {videoList, activeIndex, vCourseId} = this.state\n\n this.sendMessage({\n mtype: 'watch_time',\n rate,\n time: sec,\n video_id: videoList[activeIndex]['id'],\n course_id: this.courseID,\n v_course_id: vCourseId,\n uid: this.props.user.data.uid,\n token: this.token,\n platform: 5\n })\n }\n\n setupTimer = () => {\n this.count = 0\n this.watchSec = 0\n clearInterval(this.timer)\n this.timer = setInterval(() => {\n if (this.player && this.player.player()) {\n if (this.count === 5) {\n this.sendWatchTime(this.watchSec, this.currentPlaybackRate)\n this.count = this.watchSec = 0\n } else {\n !this.player.paused() && this.watchSec++\n this.count++\n }\n }\n }, 1000)\n\n }\n\n initializePlayer = () => {\n window.HELP_IMPROVE_VIDEOJS = false;\n this.player = videojs(this.video, {\n controls: true,\n preload: 'auto',\n bigPlayButton: true,\n textTrackDisplay: false,\n posterImage: false,\n errorDisplay: false,\n playbackRates: ['0.75', '1', '1.5', '2'],\n controlBar: {\n pictureInPictureToggle: false\n }\n })\n this.player.on('ready', () => {\n this.recordSocket.emit('load', this.recordUserInfo())\n })\n this.player.on('ratechange', () => {\n this.currentPlaybackRate = this.player.playbackRate()\n this.sendWatchTime(this.watchSec, this.previousPlaybackRate)\n this.count = this.watchSec = 0\n this.previousPlaybackRate = this.currentPlaybackRate\n })\n this.player.on('ended', () => {\n this.sendWatchTime(this.watchSec, this.currentPlaybackRate)\n this.getShareProgressInfo()\n clearInterval(this.timer)\n })\n this.player.on('seeked', () => {\n this.sendRecord()\n })\n }\n\n sendLastRecord = () => {\n http.post(`${API.home}/m/course/record_last_video`, {\n v_course_id: this.state.course['v_course_id'],\n video_id: this.state.videoList[this.state.activeIndex].id\n })\n }\n\n componentWillUnmount() {\n this.player && this.player.dispose()\n\n clearInterval(this.timer)\n this.ws && this.ws.close()\n this.ws = null\n\n clearInterval(this.recordTimer)\n this.recordSocket && this.recordSocket.close()\n this.recordSocket = null\n }\n\n selectVideo = index => {\n if (this.hasAuth()) {\n if (index === this.state.activeIndex) {\n return\n }\n this.setState({\n activeIndex: index\n },\n () => {\n this.setPlayerSrc(this.state.videoList[index]['play_url'])\n this.sendLastRecord()\n this.playVideo()\n }\n )\n clearInterval(this.timer)\n if (this.ws) {\n this.countSchedule()\n this.setupTimer()\n }\n\n }\n this.setState({\n activeIndex: index\n })\n }\n\n\n getVideoList = () => {\n http.get(`${API.home}/m/course/play/${this.courseID}`)\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n this.setState(\n state => ({\n videoList: data.data['lessons'],\n currentVideoSrc: data.data['lessons'][state.activeIndex]['play_url'],\n course: data.data.course,\n courseId: data.data.course['course_id'],\n vCourseId: data.data.course['v_course_id'],\n title: data.data.course['course_title'],\n isLoading: false\n }),\n () => {\n if (this.state.course.is_aist) {\n this.setupWS()\n this.setupTimer()\n }\n if (this.lessonAvailable()) {\n if (this.hasAuth(this.state.activeIndex)) {\n Promise.resolve().then(() => {\n\n let {videoList, course} = this.state\n let videoIndex = videoList.findIndex(item => item.id == course.last_video_id)\n this.setState({\n activeIndex: videoIndex < 0 ? 0 : videoIndex\n })\n\n this.initializePlayer()\n this.playWithAuth()\n })\n } else {\n this.getCoursePrice();\n }\n } else {\n alert('暂无视频', '', [{\n text: 'OK',\n onPress: () => {\n this.props.history.push('/')\n }\n }])\n }\n }\n )\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n setPlayerSrc = src => {\n this.player.src({\n src,\n type: 'application/x-mpegURL'\n })\n }\n\n playVideo = () => {\n this.player.play()\n }\n\n\n getDatumCatalog() {\n http.get(`${API.home}/m/course/data/${this.courseID}`)\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n this.setState({\n datum: data.data\n })\n\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n lessonAvailable = () => {\n const {videoList, activeIndex} = this.state\n return videoList[activeIndex]['video_size'] !== 0\n }\n\n getCoursePrice = () => {\n http.get(`${API.home}/sys/course/price/${getParam('id')}`)\n .then(res => {\n const {data} = res\n if (data.code === 200) {\n this.setState({\n salePrice: data.data['sale_price']\n })\n }\n })\n }\n\n playWithAuth = () => {\n const {videoList, activeIndex} = this.state\n\n if (this.hasAuth()) {\n this.setPlayerSrc(videoList[activeIndex]['play_url'])\n }\n }\n\n hasAuth = () => {\n const {course, videoList, activeIndex} = this.state\n let lesson = videoList[activeIndex]\n if (!lesson['is_free']) {\n if (course['is_audition']) {\n this.setState({\n isAuth: true\n })\n return true\n } else {\n if (lesson['video_auth']) {\n this.setState({\n isAuth: true\n })\n return true\n }\n this.setState({\n isAuth: false\n })\n return false\n }\n\n }\n this.setState({\n isAuth: true\n })\n return true\n }\n\n\n render() {\n let {match, location} = this.props\n const {videoList, activeIndex, isAuth, salePrice} = this.state\n return (\n <div className='play'>\n <HeaderBar title={this.state.title} arrow={true}/>\n <Loading isLoading={this.state.isLoading}>\n <div className=\"video\">\n <video className={'video-js'} ref={el => this.video = el}>\n <source src={'/'} type='application/x-mpegURL'/>\n </video>\n {\n !isAuth && (\n <div className=\"purchase-box\">\n <div className='hint'>您尚未购买该课时,请购买后学习。</div>\n <div className='btns'>\n <button type='button'\n onClick={this.tobuy}\n className='purchase-class'>¥{salePrice} 购买课程</button>\n <button type='button'\n onClick={this.toSingleset.bind(this,videoList[activeIndex])}\n className='purchase-episode'>¥{videoList.length && videoList[activeIndex]['class_price']} 购买单集\n </button>\n </div>\n </div>\n )\n }\n </div>\n <div className='tab'>\n <div>\n <NavLink to={`${match.url}/video`}\n replace\n activeClassName='active'\n >视频</NavLink>\n </div>\n <div>\n <NavLink to={`${match.url}/datum`}\n replace\n activeClassName='active'\n >资料</NavLink>\n </div>\n </div>\n\n {/*单集购买*/}\n <Single singleBox={this.state.singleBox} boxHide={this.boxHide} data={this.state.singMess} videoId={this.state.singMess.id}\n title={this.state.singMess.course_tile}/>\n </Loading>\n <Switch>\n <Redirect exact from={'/play'} to={{\n pathname: '/play/video',\n search: location.search\n }}/>\n <Route path={`${match.path}/video`} render={props => {\n return <VideoCatalog\n activeIndex={this.state.activeIndex}\n selectVideo={this.selectVideo}\n videoCatalog={this.state.videoList}\n {...props}/>\n }}/>\n <Route path={`${match.path}/datum`} render={props => {\n return <DatumCatalog {...props} datum={this.state.datum}/>\n }}/>\n </Switch>\n <Route render={props => {\n return this.state.vCourseId ? <Recommendation {...props} vCourseId={this.state.vCourseId}/>\n : null\n }}/>\n <ProgressShareModal isShow={this.state.isShowShareModal}\n closeShareModal={() => this.setState({isShowShareModal: false})}\n data={this.state.shareData}\n />\n\n </div>\n );\n }\n}\n\n\nexport default connect(\n state => ({user: state.user}),\n null\n)(Video);","import React from 'react';\nimport './index.scss'\n\nconst VList = (props) => {\n return (\n <li className='v-list-base-item' onClick={props.handleClick.bind(this, props.id)}>\n <div className=\"content\">\n <div className=\"cover\">\n {props.status}\n <img src={props.img} alt=\"\"/>\n </div>\n {props.info}\n </div>\n {props.tab}\n </li>\n );\n};\n\nexport default VList;","import React, {Component} from 'react'\nimport './index.scss'\nimport {api, getParam, http, browser} from \"@/utils\";\nimport {Toast} from 'antd-mobile';\nimport {Link, withRouter} from \"react-router-dom\";\nimport {compose} from \"redux\";\nimport {connect} from \"react-redux\";\nimport {differenceInHours, differenceInMinutes, differenceInSeconds} from \"date-fns\";\n\n\nclass Single extends Component {\n constructor(props) {\n super(props)\n this.state = {\n status: 1,\n orderId: '',\n nowPrice: '',\n laterPrice: '',\n hour: '',\n min: '',\n sec: '',\n endTime: '',\n groupOrderId: '',\n payType: '0', // 1支付宝 0微信\n }\n }\n\n componentDidMount() {\n if (getParam('is_class') === 1 || getParam('weixinpay')) {\n this.payCallback()\n }\n if (browser.isWeixin) {\n this.isweixinPay()\n }\n }\n\n // 选择支付方式\n check = (type) => {\n this.setState({\n payType: type\n })\n }\n\n // 确定购买\n toBuy = () => {\n http.get(`${API.home}/sys/createClassOrder/${this.props.videoId}`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n orderId: res.data.data.order_id\n })\n this.state.payType === '1' ? this.alipayPay(this.state.orderId) : this.weixinPay(this.state.orderId)\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // 微信支付\n weixinPay = (orderId) => {\n // 微信内部-支付\n if (browser.isWeixin) {\n window.location.href = \"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=\" + encodeURIComponent(window.location.href + \"&aa=bb\").toLowerCase() + \"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect\";\n } else {\n // 微信外部-支付\n http.get(`${API['base-api']}/pay/wxpay/wap_charge/oid/${orderId}`).then((res) => {\n if (res.data.errno === 0) {\n window.location.href = res.data.data.url + \"&redirect_url=\" + encodeURIComponent(window.location.href + \"&weixinpay=1\").toLowerCase();\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n // 支付宝支付\n alipayPay = (orderId) => {\n http.get(`${API['base-api']}/pay/alipay/wap_charge/oid/${orderId}`).then((res) => {\n if (res.data.errno === 0) {\n window.location = res.data.data.url;\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n onBridgeReady = (data) => {\n WeixinJSBridge.invoke(\n 'getBrandWCPayRequest', {\n \"appId\": data.appId, //公众号名称,由商户传入\n \"timeStamp\": data.timeStamp, //时间戳,自1970年以来的秒数\n \"nonceStr\": data.nonceStr, //随机串\n \"package\": data.package,\n \"signType\": data.signType, //微信签名方式:\n \"paySign\": data.paySign //微信签名\n },\n function (res) {\n if (res.err_msg == \"get_brand_wcpay_request:ok\") {\n this.payCallback()\n } else {\n alert('支付失败')\n }\n }\n )\n }\n // 微信内部支付\n isweixinPay = () => {\n let weixin_code = getParam('code')\n if (weixin_code) {\n if (getParam('oid') === undefined) {\n return\n } else {\n http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => {\n if (res.data.errno === 0) {\n const data = res.data.data\n this.onBridgeReady(data)\n if (typeof WeixinJSBridge == \"undefined\") {\n if (document.addEventListener) {\n document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady, false)\n } else if (document.attachEvent) {\n document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady)\n document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady)\n }\n } else {\n this.onBridgeReady()\n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n }\n\n // 支付完成之后获取状态\n payCallback = () => {\n http.get(`${API.home}/sys/orderStatus/${getParam('oid')}`).then((res) => {\n if (res.data.data.errno == '200') {\n // 正常购买单集成功\n this.setState({\n status: 6\n })\n } else if (res.data.data.errno == '201') {\n // 0元参团\n this.setState({\n status: 4\n })\n } else if (res.data.data.errno == '202') {\n // 0元购\n this.setState({\n status: 3\n })\n } else if (res.data.data.errno == '203') {\n // 三天内特价\n this.setState({\n nowPrice: res.data.data.data.now_price,\n laterPrice: res.data.data.data.three_day_later_price,\n status: 2\n })\n } else {\n Toast.info(res.data.data.msg, 2)\n }\n })\n }\n\n\n // 特价购买全集\n toBuyAll = () => {\n\n }\n // 0元购买全集\n zerobuyReceive = () => {\n Toast.success('购买全集成功', 3)\n this.colse()\n }\n // 0元参团\n zerogroupBuy = () => {\n this.getOrderId()\n }\n\n // 获取订单号-0元参团\n getOrderId = () => {\n let data = {\n course_id: getParam('id')\n }\n http.post(`${API['base-api']}/pdd/sys`, data).then((res) => {\n if (res.data.errno === 0) {\n this.setState({\n groupOrderId: res.data.data.order_id\n })\n this.getOrderStatus(res.data.data.order_id)\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n // 获取订单状态-0元参团\n getOrderStatus = (id) => {\n http.get(`${API.home}/m/pdd/order_status/${id}`).then((res) => {\n if (res.data.code === 200) {\n this.getTime(res.data.data.pdd_order_id)\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // 获取倒计时-0元参团\n getTime = (id) => {\n http.get(`${API.home}/m/pdd_order_end_time/${id}`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n endTime: res.data.data.end_time,\n status: 7\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n // 邀请好友参团\n toGroup = () => {\n this.props.history.push(`/togroup?id=${this.state.groupOrderId}`)\n }\n\n // 关闭弹窗\n colse = () => {\n this.props.boxHide(false);\n this.setState({\n status: 1\n })\n }\n\n render() {\n if (this.state.endTime) {\n let date = this.state.endTime * 1000\n let now = Date.now()\n setInterval(() => {\n date -= 1000\n let s = differenceInSeconds(new Date(date), now) % 60,\n m = differenceInMinutes(new Date(date), now) % 60,\n h = differenceInHours(new Date(date), now) % 24\n this.setState({\n hour: h,\n min: m,\n sec: s,\n })\n }, 1000)\n }\n\n return (\n <div>\n {\n this.props.singleBox &&\n <div className='popup-box'>\n {\n this.state.status === 1 &&\n <div className='content singleset-payment'>\n <div className='price-box'>\n <span>实付款:</span>\n <p>{this.props.data.class_price}元</p>\n </div>\n <div className='course-info'>\n <p className='text-overflow-1'><span>课程:</span>\n {this.props.title}\n </p>\n <p className='text-overflow-1'><span>课时:</span>\n {this.props.data.name}\n </p>\n </div>\n <div className='payment-type'>\n <label>支付方式:</label>\n {\n !browser.isWeixin &&\n <p onClick={this.check.bind(this, '1')}>\n <i className='iconfont iconzhifubaox-'></i>\n <span>支付宝</span>\n <i className={`iconfont icondanseshixintubiao-5 redio ${this.state.payType === '1' ? 'redioed' : ''}`}></i>\n </p>\n }\n\n <p onClick={this.check.bind(this, '0')}>\n <i className='iconfont iconweixinzhifu buy'></i>\n <span>微信支付</span>\n <i className={`iconfont icondanseshixintubiao-5 redio ${this.state.payType === '0' ? 'redioed' : ''}`}></i>\n </p>\n </div>\n <div className='btn btn-18B4ED' onClick={this.toBuy}>确认购买</div>\n </div>\n }\n {\n this.state.status === 2 &&\n <div className='content payment-success'>\n <div className=\"header\">\n <i className='iconfont icondanseshixintubiao-5'></i>\n <span>购买成功</span>\n </div>\n <div className=\"dec\">· 3天内购买全集,可直接抵扣该集费用,{this.state.nowPrice}元购买。</div>\n <div className=\"dec\">· 超过3天,按照未够集数/全部集数等比例计费,{this.state.laterPrice}元购买全集。</div>\n <div className='btn btn-18B4ED'>开始学习</div>\n <div className='btn btn-FF4000' onclick={this.toBuyAll()}>¥{this.state.nowPrice}购买全集\n </div>\n </div>\n }\n {\n this.state.status === 3 &&\n <div className='content zero'>\n <div className=\"header\">\n <i className='iconfont icondanseshixintubiao-5'></i>\n <span>购买成功</span>\n </div>\n <div className=\"dec\">· 恭喜您获得0元拼团购买剩余课时的机会。</div>\n <div className='btn btn-FF4000' onClick={this.zerogroupBuy}>0元参团</div>\n </div>\n }\n {\n this.state.status === 4 &&\n <div className='content zero'>\n <div className=\"header\">\n <i className='iconfont icondanseshixintubiao-5'></i>\n <span>购买成功</span>\n </div>\n <div className=\"dec\">· 恭喜您获得0元购买剩余课时的机会。</div>\n <div className='btn btn-FF4000' onClick={this.zerobuyReceive}>0元购</div>\n </div>\n }\n {\n this.state.status === 6 &&\n <div className='content zero'>\n <div className=\"header\">\n <i className='iconfont icondanseshixintubiao-5'></i>\n <span>购买成功</span>\n </div>\n <Link to={`/play?id=${getParam('id')}`} className='btn btn-18B4ED'>去学习</Link>\n </div>\n }\n {\n this.state.status === 7 &&\n <div className='content group'>\n <div className=\"header\">\n <i className='iconfont icondanseshixintubiao-5'></i>\n <span>参团成功</span>\n </div>\n <div className='group-img'>\n <img src={this.props.user.data.avatar} alt=\"\"/>\n <img\n src=\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/images/weekend/train7/ellipsis.png\"\n alt=\"\"/>\n <img\n src=\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/images/weekend/train7/ellipsis.png\"\n alt=\"\"/>\n\n </div>\n <div className='btn-l btn-FF4000' onClick={this.toGroup}>\n 剩余{String(this.state.hour).padStart(2, 0)}:{String(this.state.min).padStart(2, 0)}:{String(this.state.sec).padStart(2, 0)}\n 邀请好友参团\n </div>\n </div>\n }\n <i onClick={this.colse} className={'iconfont iconiconfront-2 close'}></i>\n </div>\n }\n </div>\n\n );\n }\n\n}\n\nexport default compose(\n connect(\n state => ({user: state.user}),\n null\n ),\n withRouter\n)(Single)\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{1171:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),c=a.n(n),i=a(7),s=a(8),r=a(11),o=a(9),l=a(10),d=(a(253),a(98)),u=a.n(d),m=a(0),p=a.n(m),h=a(161),v=(a(780),a(16)),f=a(52),y=a(4),E=(a(781),a(641)),b=function(e){var t=e.item;return p.a.createElement("div",{className:"bottom"},p.a.createElement("span",{className:"price"},"\xa5",t.price1),p.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},g=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];return(a=Object(r.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(s)))).state={num:10,list:[],courseId:null},a.getRecommendation=function(){y.c.get("".concat(API.home,"/m/play/recommend_course/").concat(a.props.vCourseId,"?num=").concat(a.state.num)).then(function(e){var t=e.data;200===t.code?a.setState({list:t.data}):c.a.info(t.msg)})},a.handleClick=function(e){a.props.history.push("/detail?id=".concat(e))},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.getRecommendation()}},{key:"render",value:function(){var e=this;return p.a.createElement("div",{className:"recommendation"},p.a.createElement("div",{className:"title"},"\u76f8\u5173\u63a8\u8350"),p.a.createElement("ul",null,this.state.list.map(function(t){var a=p.a.createElement("div",{className:"info"},p.a.createElement("p",{className:"title"},t.course_title),p.a.createElement("p",{className:"des"},t.simpledescription),p.a.createElement(b,{item:t}));return p.a.createElement(E.a,{key:t.course_id,img:t.image_name,handleClick:e.handleClick,info:a,id:t.course_id})})))}}]),t}(m.PureComponent),N=(a(782),a(15)),S=a.n(N),I=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,c=new Array(n),s=0;s<n;s++)c[s]=arguments[s];return(a=Object(r.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(c)))).handleClick=function(e){a.props.selectVideo(e)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this;return p.a.createElement("div",{className:"video-catalog"},p.a.createElement("ul",null,this.props.videoCatalog.map(function(t,a){return p.a.createElement("li",{key:t.id,className:S()({active:e.props.activeIndex===a})},p.a.createElement("div",{className:"video-title",onClick:e.handleClick.bind(e,a)},p.a.createElement("span",{className:"title"},t.name),p.a.createElement("span",{className:"duration"},t.duration),p.a.createElement("i",{className:S()("iconfont",[0===t.video_auth?"iconiconfront-74":"iconplay_hovericon"])})),t.practice&&t.practice.qid?p.a.createElement("div",{className:"exercise"},"\u8bfe\u540e\u7ec3\u4e60\uff1a",t.practice.title,p.a.createElement("i",{className:S()("iconfont",t.practice.is_tested?"iconiconfront-3":"iconiconfront-74")})):null)})))}}]),t}(m.Component),w=(a(783),a(785)),_=a.n(w),k=(a(786),function(e){function t(){return Object(i.a)(this,t),Object(r.a)(this,Object(o.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.datum;return p.a.createElement("div",{className:"datum-catalog"},p.a.createElement("p",{className:"prompt"},"\u8bfe\u7a0b\u8d44\u6599\u8bf7\u5230PC\u7aef\u64ad\u653e\u9875\u4e0b\u8f7d"),p.a.createElement(_.a,null,e&&e.length&&e.map(function(e,t){return p.a.createElement(_.a.Panel,{header:e.dir_name,key:t},e.files.map(function(e){return p.a.createElement("div",{key:e.file_id,className:"file-name"},e.file_name)}))})))}}]),t}(m.Component));k.defaultProps={datum:[{dir_name:"",files:[{file_name:"",file_id:0}]}]};var x=k,O=a(1149),P=(a(832),a(33)),j=a(20),C=a(43),R=a.n(C),A=a(833),L=a.n(A),B=a(654),T=u.a.alert;function D(e){return e.isShow&&p.a.createElement("div",{className:"progress-share-modal-wrapper"},p.a.createElement("div",{className:"progress-share-modal"},p.a.createElement("div",{className:"title"},"\u6bcf\u65e5\u6253\u5361"),p.a.createElement("ul",{className:"progress-container"},p.a.createElement("li",null,p.a.createElement("div",{className:"title"},"\u7d2f\u8ba1\u5b66\u4e60"),p.a.createElement("div",{className:"number"},p.a.createElement("span",{className:"num"},e.data.learn_day_count),"\u5929")),p.a.createElement("li",null,p.a.createElement("div",{className:"title"},"\u884c\u52a8\u529b\u8d85\u8fc7"),p.a.createElement("div",{className:"number"},p.a.createElement("span",{className:"num"},parseFloat(e.data.action_power)),"%"))),p.a.createElement("div",{className:"share-container"},p.a.createElement("div",{className:"title"},"\u5206\u4eab\u5230"),p.a.createElement("ul",null,p.a.createElement("li",{className:"share-icon"},p.a.createElement("div",{className:"icon"},p.a.createElement("i",{className:"iconfont iconweixinzhifu"})),p.a.createElement("div",{className:"text"},"\u5fae\u4fe1\u597d\u53cb")),p.a.createElement("li",{className:"share-icon"},p.a.createElement("div",{className:"icon"},p.a.createElement("i",{className:"iconfont iconpengyouquaniconx"})),p.a.createElement("div",{className:"text"},"\u670b\u53cb\u5708")))),p.a.createElement("i",{className:"iconfont iconiconfront-2 close",onClick:e.closeShareModal})))}var W=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];return(a=Object(r.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(s)))).previousPlaybackRate=1,a.currentPlaybackRate=1,a.reconnect=!0,a.state={title:"",courseId:null,videoList:[],datum:[],currentVideoSrc:"",activeIndex:0,isAuth:!0,course:null,salePrice:null,vCourseId:null,isLoading:!0,isShowShareModal:!1,shareData:{},singleBox:!1,singMess:""},a.tobuy=function(){y.c.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(y.b)("id"),"]")).then(function(e){0===e.data.errno?a.props.history.push("/order?id=".concat(Object(y.b)("id")),{simple:1}):c.a.info(e.data.msg,2)})},a.toSingleset=function(e){console.log(e),a.setState({singleBox:!0,singMess:e})},a.boxHide=function(e){a.setState({singleBox:e})},a.setupRecord=function(){a.recordSocket=L()(API.record),a.recordSocket.on("seek",function(e){a.player.currentTime(e)}),a.recordTimer=setInterval(function(){a.sendRecord()},5e3)},a.sendRecord=function(){a.recordSocket&&a.recordSocket.emit("addRecord",a.recordUserInfo())},a.recordUserInfo=function(){return{uid:a.props.user.data.uid,course_id:a.courseID,video_id:a.state.videoList[a.state.activeIndex].id,video_time:parseInt(a.player.currentTime()),plat:5}},a.setupWS=function(){a.ws=new WebSocket("ws://process-test.julyedu.com:9502"),a.ws.addEventListener("error",function(){a.ws=null}),a.ws.addEventListener("close",function(){a.reconnect&&(a.ws=null,setTimeout(function(){a.setupWS()},1e3)),clearInterval(a.timer)}),a.ws.addEventListener("message",function(e){4040==JSON.parse(e.data).code&&(a.reconnect=!1)})},a.sendMessage=function(e){a.ws.send(JSON.stringify(e))},a.getShareProgressInfo=function(){y.c.get("".concat(API["base-api"],"/m/aist/share_data/").concat(a.courseID,"/").concat(a.state.videoList[a.state.activeIndex].id)).then(function(e){var t=e.data;200==t.errno&&a.setState({shareData:t.data,isShowShareModal:!0})})},a.countSchedule=function(){a.sendMessage({mtype:"count_schedule",uid:a.props.user.data.uid,token:a.token,platform:5})},a.sendWatchTime=function(e,t){var n=a.state,c=n.videoList,i=n.activeIndex,s=n.vCourseId;a.sendMessage({mtype:"watch_time",rate:t,time:e,video_id:c[i].id,course_id:a.courseID,v_course_id:s,uid:a.props.user.data.uid,token:a.token,platform:5})},a.setupTimer=function(){a.count=0,a.watchSec=0,clearInterval(a.timer),a.timer=setInterval(function(){a.player&&a.player.player()&&(5===a.count?(a.sendWatchTime(a.watchSec,a.currentPlaybackRate),a.count=a.watchSec=0):(!a.player.paused()&&a.watchSec++,a.count++))},1e3)},a.initializePlayer=function(){window.HELP_IMPROVE_VIDEOJS=!1,a.player=Object(O.a)(a.video,{controls:!0,preload:"auto",bigPlayButton:!0,textTrackDisplay:!1,posterImage:!1,errorDisplay:!1,playbackRates:["0.75","1","1.5","2"],controlBar:{pictureInPictureToggle:!1}}),a.player.on("ready",function(){a.recordSocket.emit("load",a.recordUserInfo())}),a.player.on("ratechange",function(){a.currentPlaybackRate=a.player.playbackRate(),a.sendWatchTime(a.watchSec,a.previousPlaybackRate),a.count=a.watchSec=0,a.previousPlaybackRate=a.currentPlaybackRate}),a.player.on("ended",function(){a.sendWatchTime(a.watchSec,a.currentPlaybackRate),a.getShareProgressInfo(),clearInterval(a.timer)}),a.player.on("seeked",function(){a.sendRecord()})},a.sendLastRecord=function(){y.c.post("".concat(API.home,"/m/course/record_last_video"),{v_course_id:a.state.course.v_course_id,video_id:a.state.videoList[a.state.activeIndex].id})},a.selectVideo=function(e){if(a.hasAuth()){if(e===a.state.activeIndex)return;a.setState({activeIndex:e},function(){a.setPlayerSrc(a.state.videoList[e].play_url),a.sendLastRecord(),a.playVideo()}),clearInterval(a.timer),a.ws&&(a.countSchedule(),a.setupTimer())}a.setState({activeIndex:e})},a.getVideoList=function(){y.c.get("".concat(API.home,"/m/course/play/").concat(a.courseID)).then(function(e){var t=e.data;200===t.code?a.setState(function(e){return{videoList:t.data.lessons,currentVideoSrc:t.data.lessons[e.activeIndex].play_url,course:t.data.course,courseId:t.data.course.course_id,vCourseId:t.data.course.v_course_id,title:t.data.course.course_title,isLoading:!1}},function(){a.state.course.is_aist&&(a.setupWS(),a.setupTimer()),a.lessonAvailable()?a.hasAuth(a.state.activeIndex)?Promise.resolve().then(function(){var e=a.state,t=e.videoList,n=e.course,c=t.findIndex(function(e){return e.id==n.last_video_id});a.setState({activeIndex:c<0?0:c}),a.initializePlayer(),a.playWithAuth()}):a.getCoursePrice():T("\u6682\u65e0\u89c6\u9891","",[{text:"OK",onPress:function(){a.props.history.push("/")}}])}):c.a.info(t.msg)})},a.setPlayerSrc=function(e){a.player.src({src:e,type:"application/x-mpegURL"})},a.playVideo=function(){a.player.play()},a.lessonAvailable=function(){var e=a.state;return 0!==e.videoList[e.activeIndex].video_size},a.getCoursePrice=function(){y.c.get("".concat(API.home,"/sys/course/price/").concat(Object(y.b)("id"))).then(function(e){var t=e.data;200===t.code&&a.setState({salePrice:t.data.sale_price})})},a.playWithAuth=function(){var e=a.state,t=e.videoList,n=e.activeIndex;a.hasAuth()&&a.setPlayerSrc(t[n].play_url)},a.hasAuth=function(){var e=a.state,t=e.course,n=e.videoList[e.activeIndex];return n.is_free?(a.setState({isAuth:!0}),!0):t.is_audition?(a.setState({isAuth:!0}),!0):n.video_auth?(a.setState({isAuth:!0}),!0):(a.setState({isAuth:!1}),!1)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.courseID=Object(y.b)("id"),this.setState({courseId:this.courseID}),this.token=R.a.get("token"),this.getVideoList(),this.getDatumCatalog(),this.setupRecord()}},{key:"componentWillUnmount",value:function(){this.player&&this.player.dispose(),clearInterval(this.timer),this.ws&&this.ws.close(),this.ws=null,clearInterval(this.recordTimer),this.recordSocket&&this.recordSocket.close(),this.recordSocket=null}},{key:"getDatumCatalog",value:function(){var e=this;y.c.get("".concat(API.home,"/m/course/data/").concat(this.courseID)).then(function(t){var a=t.data;200===a.code?e.setState({datum:a.data}):c.a.info(a.msg)})}},{key:"render",value:function(){var e=this,t=this.props,a=t.match,n=t.location,c=this.state,i=c.videoList,s=c.activeIndex,r=c.isAuth,o=c.salePrice;return p.a.createElement("div",{className:"play"},p.a.createElement(h.a,{title:this.state.title,arrow:!0}),p.a.createElement(P.f,{isLoading:this.state.isLoading},p.a.createElement("div",{className:"video"},p.a.createElement("video",{className:"video-js",ref:function(t){return e.video=t}},p.a.createElement("source",{src:"/",type:"application/x-mpegURL"})),!r&&p.a.createElement("div",{className:"purchase-box"},p.a.createElement("div",{className:"hint"},"\u60a8\u5c1a\u672a\u8d2d\u4e70\u8be5\u8bfe\u65f6\uff0c\u8bf7\u8d2d\u4e70\u540e\u5b66\u4e60\u3002"),p.a.createElement("div",{className:"btns"},p.a.createElement("button",{type:"button",onClick:this.tobuy,className:"purchase-class"},"\xa5",o," \u8d2d\u4e70\u8bfe\u7a0b"),p.a.createElement("button",{type:"button",onClick:this.toSingleset.bind(this,i[s]),className:"purchase-episode"},"\xa5",i.length&&i[s].class_price," \u8d2d\u4e70\u5355\u96c6")))),p.a.createElement("div",{className:"tab"},p.a.createElement("div",null,p.a.createElement(v.c,{to:"".concat(a.url,"/video"),replace:!0,activeClassName:"active"},"\u89c6\u9891")),p.a.createElement("div",null,p.a.createElement(v.c,{to:"".concat(a.url,"/datum"),replace:!0,activeClassName:"active"},"\u8d44\u6599"))),p.a.createElement(B.a,{singleBox:this.state.singleBox,boxHide:this.boxHide,data:this.state.singMess,videoId:this.state.singMess.id,title:this.state.singMess.course_tile})),p.a.createElement(f.d,null,p.a.createElement(f.a,{exact:!0,from:"/play",to:{pathname:"/play/video",search:n.search}}),p.a.createElement(f.b,{path:"".concat(a.path,"/video"),render:function(t){return p.a.createElement(I,Object.assign({activeIndex:e.state.activeIndex,selectVideo:e.selectVideo,videoCatalog:e.state.videoList},t))}}),p.a.createElement(f.b,{path:"".concat(a.path,"/datum"),render:function(t){return p.a.createElement(x,Object.assign({},t,{datum:e.state.datum}))}})),p.a.createElement(f.b,{render:function(t){return e.state.vCourseId?p.a.createElement(g,Object.assign({},t,{vCourseId:e.state.vCourseId})):null}}),p.a.createElement(D,{isShow:this.state.isShowShareModal,closeShareModal:function(){return e.setState({isShowShareModal:!1})},data:this.state.shareData}))}}]),t}(m.Component);t.default=Object(j.b)(function(e){return{user:e.user}},null)(W)},641:function(e,t,a){"use strict";var n=a(0),c=a.n(n);a(642);t.a=function(e){return c.a.createElement("li",{className:"v-list-base-item",onClick:e.handleClick.bind(void 0,e.id)},c.a.createElement("div",{className:"content"},c.a.createElement("div",{className:"cover"},e.status,c.a.createElement("img",{src:e.img,alt:""})),e.info),e.tab)}},642:function(e,t,a){},654:function(e,t,a){"use strict";a(44);var n=a(14),c=a.n(n),i=a(7),s=a(8),r=a(11),o=a(9),l=a(10),d=a(0),u=a.n(d),m=(a(655),a(4)),p=a(16),h=a(52),v=a(23),f=a(20),y=a(154),E=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).check=function(e){a.setState({payType:e})},a.toBuy=function(){m.c.get("".concat(API.home,"/sys/createClassOrder/").concat(a.props.videoId)).then(function(e){200===e.data.code?(a.setState({orderId:e.data.data.order_id}),"1"===a.state.payType?a.alipayPay(a.state.orderId):a.weixinPay(a.state.orderId)):c.a.info(e.data.msg,2)})},a.weixinPay=function(e){m.a.isWeixin?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb").toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":m.c.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(e){0===e.data.errno?window.location.href=e.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1").toLowerCase():c.a.info(e.data.msg,2)})},a.alipayPay=function(e){m.c.get("".concat(API["base-api"],"/pay/alipay/wap_charge/oid/").concat(e)).then(function(e){0===e.data.errno?window.location=e.data.data.url:c.a.info(e.data.msg,2)})},a.onBridgeReady=function(e){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.appId,timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.paySign},function(e){"get_brand_wcpay_request:ok"==e.err_msg?this.payCallback():alert("\u652f\u4ed8\u5931\u8d25")})},a.isweixinPay=function(){var e=Object(m.b)("code");if(e){if(void 0===Object(m.b)("oid"))return;m.c.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(m.b)("oid"),"/code/").concat(e)).then(function(e){if(0===e.data.errno){var t=e.data.data;a.onBridgeReady(t),"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",a.onBridgeReady,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",a.onBridgeReady),document.attachEvent("onWeixinJSBridgeReady",a.onBridgeReady)):a.onBridgeReady()}else c.a.info(e.data.msg,2)})}},a.payCallback=function(){m.c.get("".concat(API.home,"/sys/orderStatus/").concat(Object(m.b)("oid"))).then(function(e){"200"==e.data.data.errno?a.setState({status:6}):"201"==e.data.data.errno?a.setState({status:4}):"202"==e.data.data.errno?a.setState({status:3}):"203"==e.data.data.errno?a.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,status:2}):c.a.info(e.data.data.msg,2)})},a.toBuyAll=function(){},a.zerobuyReceive=function(){c.a.success("\u8d2d\u4e70\u5168\u96c6\u6210\u529f",3),a.colse()},a.zerogroupBuy=function(){a.getOrderId()},a.getOrderId=function(){var e={course_id:Object(m.b)("id")};m.c.post("".concat(API["base-api"],"/pdd/sys"),e).then(function(e){0===e.data.errno?(a.setState({groupOrderId:e.data.data.order_id}),a.getOrderStatus(e.data.data.order_id)):c.a.info(e.data.msg,2)})},a.getOrderStatus=function(e){m.c.get("".concat(API.home,"/m/pdd/order_status/").concat(e)).then(function(e){200===e.data.code?a.getTime(e.data.data.pdd_order_id):c.a.info(e.data.msg,2)})},a.getTime=function(e){m.c.get("".concat(API.home,"/m/pdd_order_end_time/").concat(e)).then(function(e){200===e.data.code?a.setState({endTime:e.data.data.end_time,status:7}):c.a.info(e.data.msg,2)})},a.toGroup=function(){a.props.history.push("/togroup?id=".concat(a.state.groupOrderId))},a.colse=function(){a.props.boxHide(!1),a.setState({status:1})},a.state={status:1,orderId:"",nowPrice:"",laterPrice:"",hour:"",min:"",sec:"",endTime:"",groupOrderId:"",payType:"0"},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){(1===Object(m.b)("is_class")||Object(m.b)("weixinpay"))&&this.payCallback(),m.a.isWeixin&&this.isweixinPay()}},{key:"render",value:function(){var e=this;if(this.state.endTime){var t=1e3*this.state.endTime,a=Date.now();setInterval(function(){t-=1e3;var n=Object(y.differenceInSeconds)(new Date(t),a)%60,c=Object(y.differenceInMinutes)(new Date(t),a)%60,i=Object(y.differenceInHours)(new Date(t),a)%24;e.setState({hour:i,min:c,sec:n})},1e3)}return u.a.createElement("div",null,this.props.singleBox&&u.a.createElement("div",{className:"popup-box"},1===this.state.status&&u.a.createElement("div",{className:"content singleset-payment"},u.a.createElement("div",{className:"price-box"},u.a.createElement("span",null,"\u5b9e\u4ed8\u6b3e\uff1a"),u.a.createElement("p",null,this.props.data.class_price,"\u5143")),u.a.createElement("div",{className:"course-info"},u.a.createElement("p",{className:"text-overflow-1"},u.a.createElement("span",null,"\u8bfe\u7a0b\uff1a"),this.props.title),u.a.createElement("p",{className:"text-overflow-1"},u.a.createElement("span",null,"\u8bfe\u65f6\uff1a"),this.props.data.name)),u.a.createElement("div",{className:"payment-type"},u.a.createElement("label",null,"\u652f\u4ed8\u65b9\u5f0f\uff1a"),!m.a.isWeixin&&u.a.createElement("p",{onClick:this.check.bind(this,"1")},u.a.createElement("i",{className:"iconfont iconzhifubaox-"}),u.a.createElement("span",null,"\u652f\u4ed8\u5b9d"),u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("1"===this.state.payType?"redioed":"")})),u.a.createElement("p",{onClick:this.check.bind(this,"0")},u.a.createElement("i",{className:"iconfont iconweixinzhifu buy"}),u.a.createElement("span",null,"\u5fae\u4fe1\u652f\u4ed8"),u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("0"===this.state.payType?"redioed":"")}))),u.a.createElement("div",{className:"btn btn-18B4ED",onClick:this.toBuy},"\u786e\u8ba4\u8d2d\u4e70")),2===this.state.status&&u.a.createElement("div",{className:"content payment-success"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u8d2d\u4e70\u6210\u529f")),u.a.createElement("div",{className:"dec"},"\xb7 3\u5929\u5185\u8d2d\u4e70\u5168\u96c6\uff0c\u53ef\u76f4\u63a5\u62b5\u6263\u8be5\u96c6\u8d39\u7528\uff0c",this.state.nowPrice,"\u5143\u8d2d\u4e70\u3002"),u.a.createElement("div",{className:"dec"},"\xb7 \u8d85\u8fc73\u5929\uff0c\u6309\u7167\u672a\u591f\u96c6\u6570/\u5168\u90e8\u96c6\u6570\u7b49\u6bd4\u4f8b\u8ba1\u8d39\uff0c",this.state.laterPrice,"\u5143\u8d2d\u4e70\u5168\u96c6\u3002"),u.a.createElement("div",{className:"btn btn-18B4ED"},"\u5f00\u59cb\u5b66\u4e60"),u.a.createElement("div",{className:"btn btn-FF4000",onclick:this.toBuyAll()},"\uffe5",this.state.nowPrice,"\u8d2d\u4e70\u5168\u96c6")),3===this.state.status&&u.a.createElement("div",{className:"content zero"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u8d2d\u4e70\u6210\u529f")),u.a.createElement("div",{className:"dec"},"\xb7 \u606d\u559c\u60a8\u83b7\u5f970\u5143\u62fc\u56e2\u8d2d\u4e70\u5269\u4f59\u8bfe\u65f6\u7684\u673a\u4f1a\u3002"),u.a.createElement("div",{className:"btn btn-FF4000",onClick:this.zerogroupBuy},"0\u5143\u53c2\u56e2")),4===this.state.status&&u.a.createElement("div",{className:"content zero"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u8d2d\u4e70\u6210\u529f")),u.a.createElement("div",{className:"dec"},"\xb7 \u606d\u559c\u60a8\u83b7\u5f970\u5143\u8d2d\u4e70\u5269\u4f59\u8bfe\u65f6\u7684\u673a\u4f1a\u3002"),u.a.createElement("div",{className:"btn btn-FF4000",onClick:this.zerobuyReceive},"0\u5143\u8d2d")),6===this.state.status&&u.a.createElement("div",{className:"content zero"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u8d2d\u4e70\u6210\u529f")),u.a.createElement(p.b,{to:"/play?id=".concat(Object(m.b)("id")),className:"btn btn-18B4ED"},"\u53bb\u5b66\u4e60")),7===this.state.status&&u.a.createElement("div",{className:"content group"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u53c2\u56e2\u6210\u529f")),u.a.createElement("div",{className:"group-img"},u.a.createElement("img",{src:this.props.user.data.avatar,alt:""}),u.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/images/weekend/train7/ellipsis.png",alt:""}),u.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/images/weekend/train7/ellipsis.png",alt:""})),u.a.createElement("div",{className:"btn-l btn-FF4000",onClick:this.toGroup},"\u5269\u4f59",String(this.state.hour).padStart(2,0),"\uff1a",String(this.state.min).padStart(2,0),"\uff1a",String(this.state.sec).padStart(2,0),"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2")),u.a.createElement("i",{onClick:this.colse,className:"iconfont iconiconfront-2 close"})))}}]),t}(d.Component);t.a=Object(v.d)(Object(f.b)(function(e){return{user:e.user}},null),h.g)(E)},655:function(e,t,a){},780:function(e,t,a){},781:function(e,t,a){},782:function(e,t,a){},786:function(e,t,a){},788:function(e,t){},856:function(e,t){}}]);
//# sourceMappingURL=video.5cde5b2a.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/video/recommendation/index.js","components/video/video-catalog/index.js","components/video/datum-catalog/index.js","components/video/index.js","common/v-list-base/index.js","components/detail/single/index.js"],"names":["Bottom","_ref","item","react_default","a","createElement","className","price1","price0","Recommendation","state","num","list","courseId","getRecommendation","http","get","concat","API","home","_this","props","vCourseId","then","res","data","code","setState","toast_default","info","msg","handleClick","id","history","push","this","_this2","map","Info","course_title","simpledescription","recommendation_Bottom","v_list_base","key","course_id","img","image_name","PureComponent","VideoCatalog","i","selectVideo","videoCatalog","index","classnames","active","activeIndex","onClick","bind","name","duration","video_auth","practice","qid","title","is_tested","Component","DatumCatalog","datum","accordion_default","length","Panel","header","dir_name","files","file_id","file_name","defaultProps","alert","modal_default","ProgressShareModal","isShow","learn_day_count","parseFloat","action_power","closeShareModal","Video","previousPlaybackRate","currentPlaybackRate","reconnect","videoList","currentVideoSrc","isAuth","course","salePrice","isLoading","isShowShareModal","shareData","singleBox","singMess","tobuy","getParam","errno","simple","toSingleset","console","log","boxHide","val","setupRecord","recordSocket","io","record","on","time","player","currentTime","recordTimer","setInterval","sendRecord","emit","recordUserInfo","uid","user","courseID","video_id","video_time","parseInt","plat","setupWS","ws","WebSocket","addEventListener","setTimeout","clearInterval","timer","e","JSON","parse","sendMessage","message","send","stringify","getShareProgressInfo","countSchedule","mtype","token","platform","sendWatchTime","sec","rate","_this$state","v_course_id","setupTimer","count","watchSec","paused","initializePlayer","window","HELP_IMPROVE_VIDEOJS","videojs","video","controls","preload","bigPlayButton","textTrackDisplay","posterImage","errorDisplay","playbackRates","controlBar","pictureInPictureToggle","playbackRate","sendLastRecord","post","hasAuth","setPlayerSrc","playVideo","getVideoList","is_aist","lessonAvailable","Promise","resolve","_this$state2","videoIndex","findIndex","last_video_id","playWithAuth","getCoursePrice","text","onPress","src","type","play","_this$state3","_this$state4","_this$state5","lesson","jsCookie","getDatumCatalog","dispose","close","_this3","_this$props","match","location","_this$state6","HeaderBar","arrow","common","ref","el","react_router_dom","to","url","replace","activeClassName","single","videoId","course_tile","react_router","exact","from","pathname","search","path","render","video_video_catalog","Object","assign","video_datum_catalog","video_recommendation","connect","VList","react__WEBPACK_IMPORTED_MODULE_0___default","status","alt","tab","Single","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_xzh_dnmp_www_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","check","payType","toBuy","orderId","order_id","alipayPay","weixinPay","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","browser","isWeixin","href","encodeURIComponent","toLowerCase","onBridgeReady","WeixinJSBridge","invoke","appId","timeStamp","nonceStr","package","signType","paySign","err_msg","payCallback","isweixinPay","weixin_code","undefined","document","attachEvent","nowPrice","now_price","laterPrice","three_day_later_price","toBuyAll","zerobuyReceive","success","colse","zerogroupBuy","getOrderId","groupOrderId","getOrderStatus","getTime","pdd_order_id","endTime","end_time","toGroup","hour","min","date","now","Date","s","differenceInSeconds","m","differenceInMinutes","h","differenceInHours","react__WEBPACK_IMPORTED_MODULE_7___default","class_price","onclick","react_router_dom__WEBPACK_IMPORTED_MODULE_10__","avatar","String","padStart","compose","withRouter"],"mappings":"wQAQMA,EAAS,SAAAC,GAAY,IAAVC,EAAUD,EAAVC,KACb,OACIC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,UACXH,EAAAC,EAAAC,cAAA,QAAMC,UAAU,SAAhB,OAA0BJ,EAAKK,QAC/BJ,EAAAC,EAAAC,cAAA,QAAMC,UAAU,eAAhB,OAAgCJ,EAAKM,UA0ElCC,6MAlEXC,MAAQ,CACJC,IAAK,GACLC,KAAM,GACNC,SAAU,QAQdC,kBAAoB,WAChBC,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,6BAAAF,OAAgDG,EAAKC,MAAMC,UAA3D,SAAAL,OAA4EG,EAAKV,MAAMC,MAClFY,KAAK,SAAAC,GACF,IAAMC,EAAOD,EAAIC,KACA,MAAdA,EAAKC,KAEJN,EAAKO,SAAS,CACVf,KAAMa,EAAKA,OAIfG,EAAAxB,EAAMyB,KAAKJ,EAAKK,UAMhCC,YAAc,SAAAC,GACVZ,EAAKC,MAAMY,QAAQC,KAAnB,cAAAjB,OAAsCe,wFArBtCG,KAAKrB,qDAwBA,IAAAsB,EAAAD,KACL,OACIhC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EAAAC,cAAA,KAAGC,UAAU,qCACboS,EAAAtS,EAAAC,cAAA,yCAEJqS,EAAAtS,EAAAC,cAACwS,EAAA,EAAD,CAAM1F,GAAE,YAAAlM,OAAcmF,YAAS,OAAS9F,UAAU,kBAAlD,uBAIkB,IAAtB6B,KAAKzB,MAAM+N,QACXiE,EAAAtS,EAAAC,cAAA,OAAKC,UAAU,iBACXoS,EAAAtS,EAAAC,cAAA,OAAKC,UAAU,UACXoS,EAAAtS,EAAAC,cAAA,KAAGC,UAAU,qCACboS,EAAAtS,EAAAC,cAAA,yCAEJqS,EAAAtS,EAAAC,cAAA,OAAKC,UAAU,aACXoS,EAAAtS,EAAAC,cAAA,OAAKwL,IAAK1J,KAAKd,MAAMqG,KAAKjG,KAAKqR,OAAQpE,IAAI,KAC3CgE,EAAAtS,EAAAC,cAAA,OACIwL,IAAI,qFACJ6C,IAAI,KACRgE,EAAAtS,EAAAC,cAAA,OACIwL,IAAI,qFACJ6C,IAAI,MAGZgE,EAAAtS,EAAAC,cAAA,OAAKC,UAAU,mBAAmBkD,QAASrB,KAAK2P,SAAhD,eACOiB,OAAO5Q,KAAKzB,MAAMqR,MAAMiB,SAAS,EAAG,GAD3C,SACgDD,OAAO5Q,KAAKzB,MAAMsR,KAAKgB,SAAS,EAAG,GADnF,SACwFD,OAAO5Q,KAAKzB,MAAM0I,KAAK4J,SAAS,EAAG,GAD3H,yCAMRN,EAAAtS,EAAAC,cAAA,KAAGmD,QAASrB,KAAKkP,MAAO/Q,UAAW,4CA1VtC2D,aAoWNgP,gBACX3E,YACI,SAAA5N,GAAK,MAAK,CAACgH,KAAMhH,EAAMgH,OACvB,MAEJwL,IALWD,CAMbrE","file":"static/js/video.5cde5b2a.chunk.js","sourcesContent":["import React, { PureComponent } from 'react';\nimport './recommendation.scss'\nimport { http } from '@/utils'\nimport { Toast } from \"antd-mobile\";\nimport VList from '@/common/v-list-base';\n\n\n\nconst Bottom = ({item}) => {\n return (\n <div className='bottom'>\n <span className='price'>¥{item.price1}</span>\n <span className='stale-price'>¥{item.price0}</span>\n </div>\n )\n}\n\n\n\nclass Recommendation extends PureComponent {\n state = {\n num: 10,\n list: [],\n courseId: null\n }\n\n\n componentDidMount() {\n this.getRecommendation()\n }\n\n getRecommendation = () => {\n http.get(`${API.home}/m/play/recommend_course/${this.props.vCourseId}?num=${this.state.num}`)\n .then(res => {\n const data = res.data\n if(data.code === 200){\n\n this.setState({\n list: data.data\n })\n\n }else {\n Toast.info(data.msg)\n }\n })\n }\n\n\n handleClick = id => {\n this.props.history.push(`/detail?id=${id}`)\n }\n\n render() {\n return (\n <div className='recommendation'>\n <div className={'title'}>相关推荐</div>\n <ul>\n {\n this.state.list.map(item => {\n const Info = (\n <div className=\"info\">\n <p className='title'>{item.course_title}</p>\n <p className='des'>{item.simpledescription}</p>\n <Bottom\n item={item}\n />\n </div>\n )\n\n return (\n <VList\n key={item.course_id}\n img={item.image_name}\n handleClick={this.handleClick}\n info={Info}\n id={item.course_id}\n />\n )\n })\n }\n </ul>\n </div>\n );\n }\n}\n\nexport default Recommendation;","import React, { Component } from 'react'\nimport './video-catalog.scss'\nimport classnames from 'classnames'\n\n\nclass VideoCatalog extends Component {\n\n handleClick = (i) => {\n this.props.selectVideo(i)\n }\n\n render() {\n return (\n <div className='video-catalog'>\n <ul>\n {\n this.props.videoCatalog.map((item, index) => {\n return (\n <li key={item.id}\n className={classnames({active: this.props.activeIndex === index})}\n >\n <div className=\"video-title\" onClick={this.handleClick.bind(this, index)}>\n <span className=\"title\">{item.name}</span>\n <span className='duration'>{item.duration}</span>\n <i className={classnames(`iconfont`,\n [item.video_auth === 0\n ? 'iconiconfront-74'\n : 'iconplay_hovericon'],\n )}/>\n </div>\n {\n (item.practice && item.practice.qid) ? <div className=\"exercise\">\n 课后练习:{item.practice.title}\n <i className={classnames('iconfont', item.practice.is_tested ? 'iconiconfront-3' : 'iconiconfront-74')}/>\n {/*<i className='iconfont iconiconfront-74'/>*/}\n </div>\n : null\n }\n </li>\n )\n })\n }\n </ul>\n </div>\n );\n }\n}\n\nexport default VideoCatalog;","import React, { Component } from 'react';\nimport './datum-catalog.scss'\nimport { Accordion } from \"antd-mobile\";\n\n\nclass DatumCatalog extends Component {\n\n static defaultProps = {\n datum: [{\n dir_name: '',\n files: [{\n file_name: '',\n file_id: 0\n }]\n }]\n }\n\n render() {\n const {datum} = this.props\n return (\n <div className='datum-catalog'>\n <p className='prompt'>课程资料请到PC端播放页下载</p>\n <Accordion>\n {\n datum && datum.length && datum.map((item, index) => {\n return (\n <Accordion.Panel header={item.dir_name} key={index}>\n {\n item.files.map(item => {\n return (\n <div key={item.file_id} className='file-name'>\n {item.file_name}\n </div>\n )\n })\n }\n </Accordion.Panel>\n )\n })\n }\n </Accordion>\n </div>\n );\n }\n}\n\nexport default DatumCatalog;","import React, { Component } from 'react'\nimport HeaderBar from '@/common/HeaderBar'\nimport './video.scss'\nimport { NavLink, Route, Redirect, Switch } from 'react-router-dom'\nimport { http, api, getParam } from '@/utils'\nimport Recommendation from './recommendation'\nimport VideoCatalog from './video-catalog'\nimport DatumCatalog from './datum-catalog'\nimport { Toast } from 'antd-mobile'\nimport videojs from 'video.js'\nimport 'video.js/dist/video-js.min.css'\nimport { Modal } from \"antd-mobile\"\nimport { Loading } from '@/common'\nimport { connect } from \"react-redux\"\nimport jsCookie from 'js-cookie'\nimport io from 'socket.io-client'\nimport Single from \"@/components/detail/single\";\n\nlet alert = Modal.alert\n\nfunction ProgressShareModal(props) {\n return (\n props.isShow &&\n <div className='progress-share-modal-wrapper'>\n <div className=\"progress-share-modal\">\n <div className=\"title\">每日打卡</div>\n <ul className=\"progress-container\">\n <li>\n <div className=\"title\">累计学习</div>\n <div className=\"number\"><span className='num'>{props.data.learn_day_count}</span>天</div>\n </li>\n <li>\n <div className=\"title\">行动力超过</div>\n <div className=\"number\"><span className='num'>{parseFloat(props.data.action_power)}</span>%\n </div>\n </li>\n </ul>\n <div className=\"share-container\">\n <div className=\"title\">分享到</div>\n <ul>\n <li className='share-icon'>\n <div className=\"icon\"><i className='iconfont iconweixinzhifu'></i></div>\n <div className='text'>微信好友</div>\n </li>\n <li className='share-icon'>\n <div className=\"icon\"><i className='iconfont iconpengyouquaniconx'></i></div>\n <div className='text'>朋友圈</div>\n </li>\n </ul>\n </div>\n <i className=\"iconfont iconiconfront-2 close\" onClick={props.closeShareModal}/>\n </div>\n </div>\n )\n}\n\n\nclass Video extends Component {\n\n video //video element\n player //video player instance\n\n courseID\n\n ws //websocket instance\n timer\n token\n count\n watchSec\n previousPlaybackRate = 1\n currentPlaybackRate = 1\n reconnect = true\n\n recordSocket\n recordTimer\n\n\n state = {\n title: '',\n courseId: null,\n videoList: [],\n datum: [],\n currentVideoSrc: '',\n activeIndex: 0,\n isAuth: true,\n course: null,\n salePrice: null,\n vCourseId: null,\n isLoading: true,\n isShowShareModal: false,\n shareData: {},\n singleBox: false,\n singMess: '',\n }\n\n\n componentDidMount() {\n this.courseID = getParam('id')\n this.setState({\n courseId: this.courseID\n })\n this.token = jsCookie.get('token')\n this.getVideoList()\n this.getDatumCatalog()\n this.setupRecord()\n }\n\n // 直接购买\n tobuy=()=>{\n http.get(`${API['base-api']}/m/cart/addtopreorder/[${getParam('id')}]`).then((res) => {\n if (res.data.errno === 0) {\n this.props.history.push(`/order?id=${getParam('id')}`, {simple: 1})\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n // 购买单集\n toSingleset = (item) => {\n console.log(item)\n this.setState({\n singleBox: true,\n singMess: item\n })\n }\n\n // 自组件传给父组件的boxHide\n boxHide = (val) => {\n this.setState({singleBox: val})\n }\n\n\n setupRecord = () => {\n this.recordSocket = io(API.record)\n this.recordSocket.on('seek', time => {\n this.player.currentTime(time)\n })\n\n this.recordTimer = setInterval(() => {\n this.sendRecord()\n }, 5000)\n }\n\n sendRecord = () => {\n if (this.recordSocket) {\n this.recordSocket.emit('addRecord', this.recordUserInfo())\n }\n }\n\n recordUserInfo = () => {\n let {uid} = this.props.user.data\n return {\n uid,\n course_id: this.courseID,\n video_id: this.state.videoList[this.state.activeIndex]['id'],\n video_time: parseInt(this.player.currentTime()),\n plat: 5\n }\n }\n\n setupWS = () => {\n this.ws = new WebSocket('ws://process-test.julyedu.com:9502');\n this.ws.addEventListener('error', () => {\n this.ws = null\n /*setTimeout(() => {\n this.setupWS();\n }, 1000)*/\n })\n this.ws.addEventListener('close', () => {\n if (this.reconnect) {\n this.ws = null\n setTimeout(() => {\n this.setupWS();\n }, 1000)\n }\n clearInterval(this.timer)\n })\n this.ws.addEventListener('message', e => {\n const data = JSON.parse(e.data);\n data.code == 4040 && (this.reconnect = false)\n })\n }\n\n sendMessage = message => {\n this.ws.send(JSON.stringify(message))\n }\n\n //视频结束请求接口\n getShareProgressInfo = () => {\n http.get(`${API['base-api']}/m/aist/share_data/${this.courseID}/${this.state.videoList[this.state.activeIndex]['id']}`)\n .then(res => {\n const {data} = res\n if (data.errno == 200) {\n this.setState({shareData: data.data, isShowShareModal: true})\n }\n })\n }\n\n //告诉服务端切换视频\n countSchedule = () => {\n this.sendMessage({\n mtype: 'count_schedule',\n uid: this.props.user.data.uid,\n token: this.token,\n platform: 5\n })\n }\n\n sendWatchTime = (sec, rate) => {\n const {videoList, activeIndex, vCourseId} = this.state\n\n this.sendMessage({\n mtype: 'watch_time',\n rate,\n time: sec,\n video_id: videoList[activeIndex]['id'],\n course_id: this.courseID,\n v_course_id: vCourseId,\n uid: this.props.user.data.uid,\n token: this.token,\n platform: 5\n })\n }\n\n setupTimer = () => {\n this.count = 0\n this.watchSec = 0\n clearInterval(this.timer)\n this.timer = setInterval(() => {\n if (this.player && this.player.player()) {\n if (this.count === 5) {\n this.sendWatchTime(this.watchSec, this.currentPlaybackRate)\n this.count = this.watchSec = 0\n } else {\n !this.player.paused() && this.watchSec++\n this.count++\n }\n }\n }, 1000)\n\n }\n\n initializePlayer = () => {\n window.HELP_IMPROVE_VIDEOJS = false;\n this.player = videojs(this.video, {\n controls: true,\n preload: 'auto',\n bigPlayButton: true,\n textTrackDisplay: false,\n posterImage: false,\n errorDisplay: false,\n playbackRates: ['0.75', '1', '1.5', '2'],\n controlBar: {\n pictureInPictureToggle: false\n }\n })\n this.player.on('ready', () => {\n this.recordSocket.emit('load', this.recordUserInfo())\n })\n this.player.on('ratechange', () => {\n this.currentPlaybackRate = this.player.playbackRate()\n this.sendWatchTime(this.watchSec, this.previousPlaybackRate)\n this.count = this.watchSec = 0\n this.previousPlaybackRate = this.currentPlaybackRate\n })\n this.player.on('ended', () => {\n this.sendWatchTime(this.watchSec, this.currentPlaybackRate)\n this.getShareProgressInfo()\n clearInterval(this.timer)\n })\n this.player.on('seeked', () => {\n this.sendRecord()\n })\n }\n\n sendLastRecord = () => {\n http.post(`${API.home}/m/course/record_last_video`, {\n v_course_id: this.state.course['v_course_id'],\n video_id: this.state.videoList[this.state.activeIndex].id\n })\n }\n\n componentWillUnmount() {\n this.player && this.player.dispose()\n\n clearInterval(this.timer)\n this.ws && this.ws.close()\n this.ws = null\n\n clearInterval(this.recordTimer)\n this.recordSocket && this.recordSocket.close()\n this.recordSocket = null\n }\n\n selectVideo = index => {\n if (this.hasAuth()) {\n if (index === this.state.activeIndex) {\n return\n }\n this.setState({\n activeIndex: index\n },\n () => {\n this.setPlayerSrc(this.state.videoList[index]['play_url'])\n this.sendLastRecord()\n this.playVideo()\n }\n )\n clearInterval(this.timer)\n if (this.ws) {\n this.countSchedule()\n this.setupTimer()\n }\n\n }\n this.setState({\n activeIndex: index\n })\n }\n\n\n getVideoList = () => {\n http.get(`${API.home}/m/course/play/${this.courseID}`)\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n this.setState(\n state => ({\n videoList: data.data['lessons'],\n currentVideoSrc: data.data['lessons'][state.activeIndex]['play_url'],\n course: data.data.course,\n courseId: data.data.course['course_id'],\n vCourseId: data.data.course['v_course_id'],\n title: data.data.course['course_title'],\n isLoading: false\n }),\n () => {\n if (this.state.course.is_aist) {\n this.setupWS()\n this.setupTimer()\n }\n if (this.lessonAvailable()) {\n if (this.hasAuth(this.state.activeIndex)) {\n Promise.resolve().then(() => {\n\n let {videoList, course} = this.state\n let videoIndex = videoList.findIndex(item => item.id == course.last_video_id)\n this.setState({\n activeIndex: videoIndex < 0 ? 0 : videoIndex\n })\n\n this.initializePlayer()\n this.playWithAuth()\n })\n } else {\n this.getCoursePrice();\n }\n } else {\n alert('暂无视频', '', [{\n text: 'OK',\n onPress: () => {\n this.props.history.push('/')\n }\n }])\n }\n }\n )\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n setPlayerSrc = src => {\n this.player.src({\n src,\n type: 'application/x-mpegURL'\n })\n }\n\n playVideo = () => {\n this.player.play()\n }\n\n\n getDatumCatalog() {\n http.get(`${API.home}/m/course/data/${this.courseID}`)\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n this.setState({\n datum: data.data\n })\n\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n lessonAvailable = () => {\n const {videoList, activeIndex} = this.state\n return videoList[activeIndex]['video_size'] !== 0\n }\n\n getCoursePrice = () => {\n http.get(`${API.home}/sys/course/price/${getParam('id')}`)\n .then(res => {\n const {data} = res\n if (data.code === 200) {\n this.setState({\n salePrice: data.data['sale_price']\n })\n }\n })\n }\n\n playWithAuth = () => {\n const {videoList, activeIndex} = this.state\n\n if (this.hasAuth()) {\n this.setPlayerSrc(videoList[activeIndex]['play_url'])\n }\n }\n\n hasAuth = () => {\n const {course, videoList, activeIndex} = this.state\n let lesson = videoList[activeIndex]\n if (!lesson['is_free']) {\n if (course['is_audition']) {\n this.setState({\n isAuth: true\n })\n return true\n } else {\n if (lesson['video_auth']) {\n this.setState({\n isAuth: true\n })\n return true\n }\n this.setState({\n isAuth: false\n })\n return false\n }\n\n }\n this.setState({\n isAuth: true\n })\n return true\n }\n\n\n render() {\n let {match, location} = this.props\n const {videoList, activeIndex, isAuth, salePrice} = this.state\n return (\n <div className='play'>\n <HeaderBar title={this.state.title} arrow={true}/>\n <Loading isLoading={this.state.isLoading}>\n <div className=\"video\">\n <video className={'video-js'} ref={el => this.video = el}>\n <source src={'/'} type='application/x-mpegURL'/>\n </video>\n {\n !isAuth && (\n <div className=\"purchase-box\">\n <div className='hint'>您尚未购买该课时,请购买后学习。</div>\n <div className='btns'>\n <button type='button'\n onClick={this.tobuy}\n className='purchase-class'>¥{salePrice} 购买课程</button>\n <button type='button'\n onClick={this.toSingleset.bind(this,videoList[activeIndex])}\n className='purchase-episode'>¥{videoList.length && videoList[activeIndex]['class_price']} 购买单集\n </button>\n </div>\n </div>\n )\n }\n </div>\n <div className='tab'>\n <div>\n <NavLink to={`${match.url}/video`}\n replace\n activeClassName='active'\n >视频</NavLink>\n </div>\n <div>\n <NavLink to={`${match.url}/datum`}\n replace\n activeClassName='active'\n >资料</NavLink>\n </div>\n </div>\n\n {/*单集购买*/}\n <Single singleBox={this.state.singleBox} boxHide={this.boxHide} data={this.state.singMess} videoId={this.state.singMess.id}\n title={this.state.singMess.course_tile}/>\n </Loading>\n <Switch>\n <Redirect exact from={'/play'} to={{\n pathname: '/play/video',\n search: location.search\n }}/>\n <Route path={`${match.path}/video`} render={props => {\n return <VideoCatalog\n activeIndex={this.state.activeIndex}\n selectVideo={this.selectVideo}\n videoCatalog={this.state.videoList}\n {...props}/>\n }}/>\n <Route path={`${match.path}/datum`} render={props => {\n return <DatumCatalog {...props} datum={this.state.datum}/>\n }}/>\n </Switch>\n <Route render={props => {\n return this.state.vCourseId ? <Recommendation {...props} vCourseId={this.state.vCourseId}/>\n : null\n }}/>\n <ProgressShareModal isShow={this.state.isShowShareModal}\n closeShareModal={() => this.setState({isShowShareModal: false})}\n data={this.state.shareData}\n />\n\n </div>\n );\n }\n}\n\n\nexport default connect(\n state => ({user: state.user}),\n null\n)(Video);","import React from 'react';\nimport './index.scss'\n\nconst VList = (props) => {\n return (\n <li className='v-list-base-item' onClick={props.handleClick.bind(this, props.id)}>\n <div className=\"content\">\n <div className=\"cover\">\n {props.status}\n <img src={props.img} alt=\"\"/>\n </div>\n {props.info}\n </div>\n {props.tab}\n </li>\n );\n};\n\nexport default VList;","import React, {Component} from 'react'\nimport './index.scss'\nimport {api, getParam, http, browser} from \"@/utils\";\nimport {Toast} from 'antd-mobile';\nimport {Link, withRouter} from \"react-router-dom\";\nimport {compose} from \"redux\";\nimport {connect} from \"react-redux\";\nimport {differenceInHours, differenceInMinutes, differenceInSeconds} from \"date-fns\";\n\n\nclass Single extends Component {\n constructor(props) {\n super(props)\n this.state = {\n status: 1,\n orderId: '',\n nowPrice: '',\n laterPrice: '',\n hour: '',\n min: '',\n sec: '',\n endTime: '',\n groupOrderId: '',\n payType: '0', // 1支付宝 0微信\n }\n }\n\n componentDidMount() {\n if (getParam('is_class') === 1 || getParam('weixinpay')) {\n this.payCallback()\n }\n if (browser.isWeixin) {\n this.isweixinPay()\n }\n }\n\n // 选择支付方式\n check = (type) => {\n this.setState({\n payType: type\n })\n }\n\n // 确定购买\n toBuy = () => {\n http.get(`${API.home}/sys/createClassOrder/${this.props.videoId}`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n orderId: res.data.data.order_id\n })\n this.state.payType === '1' ? this.alipayPay(this.state.orderId) : this.weixinPay(this.state.orderId)\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // 微信支付\n weixinPay = (orderId) => {\n // 微信内部-支付\n if (browser.isWeixin) {\n window.location.href = \"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=\" + encodeURIComponent(window.location.href + \"&aa=bb\").toLowerCase() + \"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect\";\n } else {\n // 微信外部-支付\n http.get(`${API['base-api']}/pay/wxpay/wap_charge/oid/${orderId}`).then((res) => {\n if (res.data.errno === 0) {\n window.location.href = res.data.data.url + \"&redirect_url=\" + encodeURIComponent(window.location.href + \"&weixinpay=1\").toLowerCase();\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n // 支付宝支付\n alipayPay = (orderId) => {\n http.get(`${API['base-api']}/pay/alipay/wap_charge/oid/${orderId}`).then((res) => {\n if (res.data.errno === 0) {\n window.location = res.data.data.url;\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n onBridgeReady = (data) => {\n WeixinJSBridge.invoke(\n 'getBrandWCPayRequest', {\n \"appId\": data.appId, //公众号名称,由商户传入\n \"timeStamp\": data.timeStamp, //时间戳,自1970年以来的秒数\n \"nonceStr\": data.nonceStr, //随机串\n \"package\": data.package,\n \"signType\": data.signType, //微信签名方式:\n \"paySign\": data.paySign //微信签名\n },\n function (res) {\n if (res.err_msg == \"get_brand_wcpay_request:ok\") {\n this.payCallback()\n } else {\n alert('支付失败')\n }\n }\n )\n }\n // 微信内部支付\n isweixinPay = () => {\n let weixin_code = getParam('code')\n if (weixin_code) {\n if (getParam('oid') === undefined) {\n return\n } else {\n http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => {\n if (res.data.errno === 0) {\n const data = res.data.data\n this.onBridgeReady(data)\n if (typeof WeixinJSBridge == \"undefined\") {\n if (document.addEventListener) {\n document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady, false)\n } else if (document.attachEvent) {\n document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady)\n document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady)\n }\n } else {\n this.onBridgeReady()\n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n }\n\n // 支付完成之后获取状态\n payCallback = () => {\n http.get(`${API.home}/sys/orderStatus/${getParam('oid')}`).then((res) => {\n if (res.data.data.errno == '200') {\n // 正常购买单集成功\n this.setState({\n status: 6\n })\n } else if (res.data.data.errno == '201') {\n // 0元参团\n this.setState({\n status: 4\n })\n } else if (res.data.data.errno == '202') {\n // 0元购\n this.setState({\n status: 3\n })\n } else if (res.data.data.errno == '203') {\n // 三天内特价\n this.setState({\n nowPrice: res.data.data.data.now_price,\n laterPrice: res.data.data.data.three_day_later_price,\n status: 2\n })\n } else {\n Toast.info(res.data.data.msg, 2)\n }\n })\n }\n\n\n // 特价购买全集\n toBuyAll = () => {\n\n }\n // 0元购买全集\n zerobuyReceive = () => {\n Toast.success('购买全集成功', 3)\n this.colse()\n }\n // 0元参团\n zerogroupBuy = () => {\n this.getOrderId()\n }\n\n // 获取订单号-0元参团\n getOrderId = () => {\n let data = {\n course_id: getParam('id')\n }\n http.post(`${API['base-api']}/pdd/sys`, data).then((res) => {\n if (res.data.errno === 0) {\n this.setState({\n groupOrderId: res.data.data.order_id\n })\n this.getOrderStatus(res.data.data.order_id)\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n // 获取订单状态-0元参团\n getOrderStatus = (id) => {\n http.get(`${API.home}/m/pdd/order_status/${id}`).then((res) => {\n if (res.data.code === 200) {\n this.getTime(res.data.data.pdd_order_id)\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // 获取倒计时-0元参团\n getTime = (id) => {\n http.get(`${API.home}/m/pdd_order_end_time/${id}`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n endTime: res.data.data.end_time,\n status: 7\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n // 邀请好友参团\n toGroup = () => {\n this.props.history.push(`/togroup?id=${this.state.groupOrderId}`)\n }\n\n // 关闭弹窗\n colse = () => {\n this.props.boxHide(false);\n this.setState({\n status: 1\n })\n }\n\n render() {\n if (this.state.endTime) {\n let date = this.state.endTime * 1000\n let now = Date.now()\n setInterval(() => {\n date -= 1000\n let s = differenceInSeconds(new Date(date), now) % 60,\n m = differenceInMinutes(new Date(date), now) % 60,\n h = differenceInHours(new Date(date), now) % 24\n this.setState({\n hour: h,\n min: m,\n sec: s,\n })\n }, 1000)\n }\n\n return (\n <div>\n {\n this.props.singleBox &&\n <div className='popup-box'>\n {\n this.state.status === 1 &&\n <div className='content singleset-payment'>\n <div className='price-box'>\n <span>实付款:</span>\n <p>{this.props.data.class_price}元</p>\n </div>\n <div className='course-info'>\n <p className='text-overflow-1'><span>课程:</span>\n {this.props.title}\n </p>\n <p className='text-overflow-1'><span>课时:</span>\n {this.props.data.name}\n </p>\n </div>\n <div className='payment-type'>\n <label>支付方式:</label>\n {\n !browser.isWeixin &&\n <p onClick={this.check.bind(this, '1')}>\n <i className='iconfont iconzhifubaox-'></i>\n <span>支付宝</span>\n <i className={`iconfont icondanseshixintubiao-5 redio ${this.state.payType === '1' ? 'redioed' : ''}`}></i>\n </p>\n }\n\n <p onClick={this.check.bind(this, '0')}>\n <i className='iconfont iconweixinzhifu buy'></i>\n <span>微信支付</span>\n <i className={`iconfont icondanseshixintubiao-5 redio ${this.state.payType === '0' ? 'redioed' : ''}`}></i>\n </p>\n </div>\n <div className='btn btn-18B4ED' onClick={this.toBuy}>确认购买</div>\n </div>\n }\n {\n this.state.status === 2 &&\n <div className='content payment-success'>\n <div className=\"header\">\n <i className='iconfont icondanseshixintubiao-5'></i>\n <span>购买成功</span>\n </div>\n <div className=\"dec\">· 3天内购买全集,可直接抵扣该集费用,{this.state.nowPrice}元购买。</div>\n <div className=\"dec\">· 超过3天,按照未够集数/全部集数等比例计费,{this.state.laterPrice}元购买全集。</div>\n <div className='btn btn-18B4ED'>开始学习</div>\n <div className='btn btn-FF4000' onclick={this.toBuyAll()}>¥{this.state.nowPrice}购买全集\n </div>\n </div>\n }\n {\n this.state.status === 3 &&\n <div className='content zero'>\n <div className=\"header\">\n <i className='iconfont icondanseshixintubiao-5'></i>\n <span>购买成功</span>\n </div>\n <div className=\"dec\">· 恭喜您获得0元拼团购买剩余课时的机会。</div>\n <div className='btn btn-FF4000' onClick={this.zerogroupBuy}>0元参团</div>\n </div>\n }\n {\n this.state.status === 4 &&\n <div className='content zero'>\n <div className=\"header\">\n <i className='iconfont icondanseshixintubiao-5'></i>\n <span>购买成功</span>\n </div>\n <div className=\"dec\">· 恭喜您获得0元购买剩余课时的机会。</div>\n <div className='btn btn-FF4000' onClick={this.zerobuyReceive}>0元购</div>\n </div>\n }\n {\n this.state.status === 6 &&\n <div className='content zero'>\n <div className=\"header\">\n <i className='iconfont icondanseshixintubiao-5'></i>\n <span>购买成功</span>\n </div>\n <Link to={`/play?id=${getParam('id')}`} className='btn btn-18B4ED'>去学习</Link>\n </div>\n }\n {\n this.state.status === 7 &&\n <div className='content group'>\n <div className=\"header\">\n <i className='iconfont icondanseshixintubiao-5'></i>\n <span>参团成功</span>\n </div>\n <div className='group-img'>\n <img src={this.props.user.data.avatar} alt=\"\"/>\n <img\n src=\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/images/weekend/train7/ellipsis.png\"\n alt=\"\"/>\n <img\n src=\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/images/weekend/train7/ellipsis.png\"\n alt=\"\"/>\n\n </div>\n <div className='btn-l btn-FF4000' onClick={this.toGroup}>\n 剩余{String(this.state.hour).padStart(2, 0)}:{String(this.state.min).padStart(2, 0)}:{String(this.state.sec).padStart(2, 0)}\n 邀请好友参团\n </div>\n </div>\n }\n <i onClick={this.colse} className={'iconfont iconiconfront-2 close'}></i>\n </div>\n }\n </div>\n\n );\n }\n\n}\n\nexport default compose(\n connect(\n state => ({user: state.user}),\n null\n ),\n withRouter\n)(Single)\n"],"sourceRoot":""}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import { compose } from "redux";
import { connect } from "react-redux";
import { setCurrentUser } from "@/store/userAction";
import Captcha from '@/common/Captcha'
import {HeaderBar} from '@/common'
import ClearableInput from '@common/ClearableInput'
......@@ -44,6 +45,8 @@ class BindingTel extends Component {
errors
} = this.props
return (
<>
<HeaderBar title={'绑定手机号'} arrow={true}/>
<div className={'binding-tel'}>
<p className={'title'}>为提高您的账号安全,请绑定手机号</p>
<Form>
......@@ -88,6 +91,7 @@ class BindingTel extends Component {
<Button className={'complete-btn'} active={values.tel && values.veriCode && isEmpty(errors)}>完成</Button>
</Form>
</div>
</>
);
}
}
......
......@@ -3,9 +3,9 @@ import './button.scss'
import classnames from 'classnames'
const Button = ({children, active, ...rest}) => {
const Button = ({children, active, className, ...rest}) => {
return (
<button className={classnames('custom-button', {active})} {...rest}>
<button className={classnames('custom-button', className, {active})} {...rest}>
{children}
</button>
);
......
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