Commit e3a1e440 by zhanghaozhe

首页banner

parents 06952d0d 9f9e8c8b
{
"BargainMiddlePage.css": "/static/css/BargainMiddlePage.9e05243b.chunk.css",
"BargainMiddlePage.js": "/static/js/BargainMiddlePage.e9fa548d.chunk.js",
"BargainMiddlePage.js.map": "/static/js/BargainMiddlePage.e9fa548d.chunk.js.map",
"BargainMiddlePage.js": "/static/js/BargainMiddlePage.95b0aa68.chunk.js",
"BargainMiddlePage.js.map": "/static/js/BargainMiddlePage.95b0aa68.chunk.js.map",
"Classify.css": "/static/css/Classify.9ab7b4fc.chunk.css",
"Classify.js": "/static/js/Classify.ba29a5fa.chunk.js",
"Classify.js.map": "/static/js/Classify.ba29a5fa.chunk.js.map",
"Classify.js": "/static/js/Classify.1b759ace.chunk.js",
"Classify.js.map": "/static/js/Classify.1b759ace.chunk.js.map",
"CourseList.css": "/static/css/CourseList.c5876381.chunk.css",
"CourseList.js": "/static/js/CourseList.8c2b7670.chunk.js",
"CourseList.js.map": "/static/js/CourseList.8c2b7670.chunk.js.map",
"CourseList.js": "/static/js/CourseList.a81c12f2.chunk.js",
"CourseList.js.map": "/static/js/CourseList.a81c12f2.chunk.js.map",
"DrawDocument.css": "/static/css/DrawDocument.2e7d81ca.chunk.css",
"DrawDocument.js": "/static/js/DrawDocument.39af102b.chunk.js",
"DrawDocument.js.map": "/static/js/DrawDocument.39af102b.chunk.js.map",
......@@ -17,60 +17,60 @@
"MyEdit.js": "/static/js/MyEdit.d0b19073.chunk.js",
"MyEdit.js.map": "/static/js/MyEdit.d0b19073.chunk.js.map",
"Order.css": "/static/css/Order.34d6f553.chunk.css",
"Order.js": "/static/js/Order.13dc8973.chunk.js",
"Order.js.map": "/static/js/Order.13dc8973.chunk.js.map",
"Orderinfo.js": "/static/js/Orderinfo.ec770473.chunk.js",
"Orderinfo.js.map": "/static/js/Orderinfo.ec770473.chunk.js.map",
"Order.js": "/static/js/Order.c81925c9.chunk.js",
"Order.js.map": "/static/js/Order.c81925c9.chunk.js.map",
"Orderinfo.js": "/static/js/Orderinfo.93f1f54f.chunk.js",
"Orderinfo.js.map": "/static/js/Orderinfo.93f1f54f.chunk.js.map",
"PayOrder.css": "/static/css/PayOrder.ef3c6288.chunk.css",
"PayOrder.js": "/static/js/PayOrder.2f9f32e8.chunk.js",
"PayOrder.js.map": "/static/js/PayOrder.2f9f32e8.chunk.js.map",
"PayOrder.js": "/static/js/PayOrder.0540cc1c.chunk.js",
"PayOrder.js.map": "/static/js/PayOrder.0540cc1c.chunk.js.map",
"Preferential.css": "/static/css/Preferential.7456653e.chunk.css",
"Preferential.js": "/static/js/Preferential.f2230bb7.chunk.js",
"Preferential.js.map": "/static/js/Preferential.f2230bb7.chunk.js.map",
"Preferential.js": "/static/js/Preferential.5cd529e1.chunk.js",
"Preferential.js.map": "/static/js/Preferential.5cd529e1.chunk.js.map",
"SearchResult.css": "/static/css/SearchResult.0d7e3fa7.chunk.css",
"SearchResult.js": "/static/js/SearchResult.fff53593.chunk.js",
"SearchResult.js.map": "/static/js/SearchResult.fff53593.chunk.js.map",
"SearchResult.js": "/static/js/SearchResult.4d0783a4.chunk.js",
"SearchResult.js.map": "/static/js/SearchResult.4d0783a4.chunk.js.map",
"ShopCart.css": "/static/css/ShopCart.742fe9ff.chunk.css",
"ShopCart.js": "/static/js/ShopCart.176f2726.chunk.js",
"ShopCart.js.map": "/static/js/ShopCart.176f2726.chunk.js.map",
"ShopCart.js": "/static/js/ShopCart.4aa986c1.chunk.js",
"ShopCart.js.map": "/static/js/ShopCart.4aa986c1.chunk.js.map",
"aist-share.css": "/static/css/aist-share.bef8c404.chunk.css",
"aist-share.js": "/static/js/aist-share.26bcdb95.chunk.js",
"aist-share.js.map": "/static/js/aist-share.26bcdb95.chunk.js.map",
"aist-share.js": "/static/js/aist-share.f41ca3e6.chunk.js",
"aist-share.js.map": "/static/js/aist-share.f41ca3e6.chunk.js.map",
"coupons.css": "/static/css/coupons.9ece7350.chunk.css",
"coupons.js": "/static/js/coupons.847e634b.chunk.js",
"coupons.js.map": "/static/js/coupons.847e634b.chunk.js.map",
"detail.css": "/static/css/detail.1ccb2ab2.chunk.css",
"detail.js": "/static/js/detail.9ba39cc7.chunk.js",
"detail.js.map": "/static/js/detail.9ba39cc7.chunk.js.map",
"detail.js": "/static/js/detail.bec850de.chunk.js",
"detail.js.map": "/static/js/detail.bec850de.chunk.js.map",
"main.css": "/static/css/main.af8dac16.chunk.css",
"main.js": "/static/js/main.84e840e1.chunk.js",
"main.js.map": "/static/js/main.84e840e1.chunk.js.map",
"main.js": "/static/js/main.239f4441.chunk.js",
"main.js.map": "/static/js/main.239f4441.chunk.js.map",
"myorders.css": "/static/css/myorders.5434bc7e.chunk.css",
"myorders.js": "/static/js/myorders.68ab62ae.chunk.js",
"myorders.js.map": "/static/js/myorders.68ab62ae.chunk.js.map",
"myorders.js": "/static/js/myorders.1dff2efc.chunk.js",
"myorders.js.map": "/static/js/myorders.1dff2efc.chunk.js.map",
"purchased.css": "/static/css/purchased.6f6ffdf9.chunk.css",
"purchased.js": "/static/js/purchased.fda2c384.chunk.js",
"purchased.js.map": "/static/js/purchased.fda2c384.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.69b87c9c.js",
"runtime~main.js.map": "/static/js/runtime~main.69b87c9c.js.map",
"purchased.js": "/static/js/purchased.7305434a.chunk.js",
"purchased.js.map": "/static/js/purchased.7305434a.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.ce626342.js",
"runtime~main.js.map": "/static/js/runtime~main.ce626342.js.map",
"search.css": "/static/css/search.01106b05.chunk.css",
"search.js": "/static/js/search.3932de6c.chunk.js",
"search.js.map": "/static/js/search.3932de6c.chunk.js.map",
"search.js": "/static/js/search.214f669c.chunk.js",
"search.js.map": "/static/js/search.214f669c.chunk.js.map",
"shareposter.css": "/static/css/shareposter.3c7cba2d.chunk.css",
"shareposter.js": "/static/js/shareposter.94531bce.chunk.js",
"shareposter.js.map": "/static/js/shareposter.94531bce.chunk.js.map",
"study.css": "/static/css/study.724f37b8.chunk.css",
"study.js": "/static/js/study.ca66f2c3.chunk.js",
"study.js.map": "/static/js/study.ca66f2c3.chunk.js.map",
"study.js": "/static/js/study.2d4b43c5.chunk.js",
"study.js.map": "/static/js/study.2d4b43c5.chunk.js.map",
"togroup.css": "/static/css/togroup.49988cae.chunk.css",
"togroup.js": "/static/js/togroup.92a9903c.chunk.js",
"togroup.js.map": "/static/js/togroup.92a9903c.chunk.js.map",
"togroup.js": "/static/js/togroup.f06e77ca.chunk.js",
"togroup.js.map": "/static/js/togroup.f06e77ca.chunk.js.map",
"video.css": "/static/css/video.780bbb78.chunk.css",
"video.js": "/static/js/video.03e9383a.chunk.js",
"video.js.map": "/static/js/video.03e9383a.chunk.js.map",
"video.js": "/static/js/video.6db74c8b.chunk.js",
"video.js.map": "/static/js/video.6db74c8b.chunk.js.map",
"static/css/24.257b0329.chunk.css": "/static/css/24.257b0329.chunk.css",
"static/js/24.1b53d0cb.chunk.js": "/static/js/24.1b53d0cb.chunk.js",
"static/js/24.1b53d0cb.chunk.js.map": "/static/js/24.1b53d0cb.chunk.js.map",
"static/js/24.877770b5.chunk.js": "/static/js/24.877770b5.chunk.js",
"static/js/24.877770b5.chunk.js.map": "/static/js/24.877770b5.chunk.js.map",
"static/js/25.dc48eee8.chunk.js": "/static/js/25.dc48eee8.chunk.js",
"static/js/25.dc48eee8.chunk.js.map": "/static/js/25.dc48eee8.chunk.js.map",
"static/css/26.1b3a6258.chunk.css": "/static/css/26.1b3a6258.chunk.css",
......@@ -91,7 +91,7 @@
"static/js/31.39103831.chunk.js": "/static/js/31.39103831.chunk.js",
"static/js/31.39103831.chunk.js.map": "/static/js/31.39103831.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.4d898b4d3e161218fa1e2636991374e9.js": "/precache-manifest.4d898b4d3e161218fa1e2636991374e9.js",
"precache-manifest.98782e87537a9d6c88727d12ce827561.js": "/precache-manifest.98782e87537a9d6c88727d12ce827561.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",
......
<!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.af8dac16.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(i){function e(e){for(var r,t,n=e[0],a=e[1],o=e[2],c=0,f=[];c<n.length;c++)t=n[c],l[t]&&f.push(l[t][0]),l[t]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i[r]=a[r]);for(b&&b(e);f.length;)f.shift()();return d.push.apply(d,o||[]),u()}function u(){for(var e,r=0;r<d.length;r++){for(var t=d[r],n=!0,a=1;a<t.length;a++){var o=t[a];0!==l[o]&&(n=!1)}n&&(d.splice(r--,1),e=p(p.s=t[0]))}return e}var t={},s={18:0},l={18:0},d=[];function p(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return i[e].call(r.exports,r,r.exports,p),r.l=!0,r.exports}p.e=function(d){var e=[];s[d]?e.push(s[d]):0!==s[d]&&{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}[d]&&e.push(s[d]=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"}[d]||d)+"."+{0:"9e05243b",1:"9ab7b4fc",2:"c5876381",3:"2e7d81ca",4:"f2cc3163",5:"31d6cfe0",6:"34d6f553",7:"31d6cfe0",8:"ef3c6288",9:"7456653e",10:"0d7e3fa7",11:"742fe9ff",12:"bef8c404",13:"9ece7350",14:"1ccb2ab2",16:"5434bc7e",17:"6f6ffdf9",19:"01106b05",20:"3c7cba2d",21:"724f37b8",22:"49988cae",23:"780bbb78",25:"31d6cfe0",26:"1b3a6258",27:"31d6cfe0",28:"694b4628",29:"5ed15c7e",30:"ecbb6f9a",31:"bc06dce4"}[d]+".chunk.css",a=p.p+r,t=document.getElementsByTagName("link"),o=0;o<t.length;o++){var c=(i=t[o]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(c===r||c===a))return e()}var f=document.getElementsByTagName("style");for(o=0;o<f.length;o++){var i;if((c=(i=f[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 "+d+" failed.\n("+r+")");t.request=r,delete s[d],u.parentNode.removeChild(u),n(t)},u.href=a,document.getElementsByTagName("head")[0].appendChild(u)}).then(function(){s[d]=0}));var t=l[d];if(0!==t)if(t)e.push(t[2]);else{var r=new Promise(function(e,r){t=l[d]=[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"}[d]||d)+"."+{0:"e9fa548d",1:"ba29a5fa",2:"8c2b7670",3:"39af102b",4:"fc6423bb",5:"d0b19073",6:"13dc8973",7:"ec770473",8:"2f9f32e8",9:"f2230bb7",10:"fff53593",11:"176f2726",12:"26bcdb95",13:"847e634b",14:"9ba39cc7",16:"68ab62ae",17:"fda2c384",19:"3932de6c",20:"94531bce",21:"ca66f2c3",22:"92a9903c",23:"03e9383a",25:"dc48eee8",26:"3f952262",27:"451e15ff",28:"c45ad1a2",29:"e7db81e7",30:"ac1c9411",31:"39103831"}[d]+".chunk.js",n=function(e){o.onerror=o.onload=null,clearTimeout(c);var r=l[d];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 "+d+" failed.\n("+t+": "+n+")");a.type=t,a.request=n,r[1](a)}l[d]=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=i,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.1b53d0cb.chunk.js"></script><script src="/static/js/main.84e840e1.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.257b0329.chunk.css" rel="stylesheet"><link href="/static/css/main.af8dac16.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,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)&&(f[r]=a[r]);for(b&&b(e);i.length;)i.shift()();return d.push.apply(d,o||[]),u()}function u(){for(var e,r=0;r<d.length;r++){for(var t=d[r],n=!0,a=1;a<t.length;a++){var o=t[a];0!==l[o]&&(n=!1)}n&&(d.splice(r--,1),e=p(p.s=t[0]))}return e}var t={},s={18:0},l={18:0},d=[];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(d){var e=[];s[d]?e.push(s[d]):0!==s[d]&&{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}[d]&&e.push(s[d]=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"}[d]||d)+"."+{0:"9e05243b",1:"9ab7b4fc",2:"c5876381",3:"2e7d81ca",4:"f2cc3163",5:"31d6cfe0",6:"34d6f553",7:"31d6cfe0",8:"ef3c6288",9:"7456653e",10:"0d7e3fa7",11:"742fe9ff",12:"bef8c404",13:"9ece7350",14:"1ccb2ab2",16:"5434bc7e",17:"6f6ffdf9",19:"01106b05",20:"3c7cba2d",21:"724f37b8",22:"49988cae",23:"780bbb78",25:"31d6cfe0",26:"1b3a6258",27:"31d6cfe0",28:"694b4628",29:"5ed15c7e",30:"ecbb6f9a",31:"bc06dce4"}[d]+".chunk.css",a=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===a))return e()}var i=document.getElementsByTagName("style");for(o=0;o<i.length;o++){var f;if((c=(f=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 "+d+" failed.\n("+r+")");t.request=r,delete s[d],u.parentNode.removeChild(u),n(t)},u.href=a,document.getElementsByTagName("head")[0].appendChild(u)}).then(function(){s[d]=0}));var t=l[d];if(0!==t)if(t)e.push(t[2]);else{var r=new Promise(function(e,r){t=l[d]=[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"}[d]||d)+"."+{0:"95b0aa68",1:"1b759ace",2:"a81c12f2",3:"39af102b",4:"fc6423bb",5:"d0b19073",6:"c81925c9",7:"93f1f54f",8:"0540cc1c",9:"5cd529e1",10:"4d0783a4",11:"4aa986c1",12:"f41ca3e6",13:"847e634b",14:"bec850de",16:"1dff2efc",17:"7305434a",19:"214f669c",20:"94531bce",21:"2d4b43c5",22:"f06e77ca",23:"6db74c8b",25:"dc48eee8",26:"3f952262",27:"451e15ff",28:"c45ad1a2",29:"e7db81e7",30:"ac1c9411",31:"39103831"}[d]+".chunk.js",n=function(e){o.onerror=o.onload=null,clearTimeout(c);var r=l[d];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 "+d+" failed.\n("+t+": "+n+")");a.type=t,a.request=n,r[1](a)}l[d]=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=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 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.877770b5.chunk.js"></script><script src="/static/js/main.239f4441.chunk.js"></script></body></html>
\ No newline at end of file
self.__precacheManifest = [
{
"revision": "19c6f8668e50ed6130b2",
"url": "/static/js/purchased.fda2c384.chunk.js"
"revision": "4b5926ebf53cec1a2690",
"url": "/static/js/purchased.7305434a.chunk.js"
},
{
"revision": "3e3d6a25deeae66e62c0",
"revision": "d7a4387d4486958b52d0",
"url": "/static/css/BargainMiddlePage.9e05243b.chunk.css"
},
{
"revision": "94fe100ab02fa50ff2df",
"revision": "a86012899ff4c4218834",
"url": "/static/css/Classify.9ab7b4fc.chunk.css"
},
{
"revision": "94fe100ab02fa50ff2df",
"url": "/static/js/Classify.ba29a5fa.chunk.js"
"revision": "a86012899ff4c4218834",
"url": "/static/js/Classify.1b759ace.chunk.js"
},
{
"revision": "69dbbb8a521d05da7443",
"revision": "13fd0858cc775b3ed227",
"url": "/static/css/CourseList.c5876381.chunk.css"
},
{
"revision": "69dbbb8a521d05da7443",
"url": "/static/js/CourseList.8c2b7670.chunk.js"
"revision": "13fd0858cc775b3ed227",
"url": "/static/js/CourseList.a81c12f2.chunk.js"
},
{
"revision": "3536f30ae26d12283255",
......@@ -44,56 +44,56 @@ self.__precacheManifest = [
"url": "/static/js/MyEdit.d0b19073.chunk.js"
},
{
"revision": "4dcc4f016e9d25b818a3",
"revision": "25cb02c59ec871192975",
"url": "/static/css/Order.34d6f553.chunk.css"
},
{
"revision": "4dcc4f016e9d25b818a3",
"url": "/static/js/Order.13dc8973.chunk.js"
"revision": "25cb02c59ec871192975",
"url": "/static/js/Order.c81925c9.chunk.js"
},
{
"revision": "e4f3feaafb9a038d17ca",
"url": "/static/js/Orderinfo.ec770473.chunk.js"
"revision": "79ff6ddac2659cbafdba",
"url": "/static/js/Orderinfo.93f1f54f.chunk.js"
},
{
"revision": "bab0f0bdea1db5c5e3e9",
"revision": "d77d1ca1414ab394fb9f",
"url": "/static/css/PayOrder.ef3c6288.chunk.css"
},
{
"revision": "bab0f0bdea1db5c5e3e9",
"url": "/static/js/PayOrder.2f9f32e8.chunk.js"
"revision": "d77d1ca1414ab394fb9f",
"url": "/static/js/PayOrder.0540cc1c.chunk.js"
},
{
"revision": "6c3e34b52ec03f5476dc",
"revision": "819b8cd59ad5cb9a2481",
"url": "/static/css/Preferential.7456653e.chunk.css"
},
{
"revision": "6c3e34b52ec03f5476dc",
"url": "/static/js/Preferential.f2230bb7.chunk.js"
"revision": "819b8cd59ad5cb9a2481",
"url": "/static/js/Preferential.5cd529e1.chunk.js"
},
{
"revision": "f574b379fc16d09a6eae",
"revision": "9e5a192d621c8583828f",
"url": "/static/css/SearchResult.0d7e3fa7.chunk.css"
},
{
"revision": "f574b379fc16d09a6eae",
"url": "/static/js/SearchResult.fff53593.chunk.js"
"revision": "9e5a192d621c8583828f",
"url": "/static/js/SearchResult.4d0783a4.chunk.js"
},
{
"revision": "0ec0c604283b07a47652",
"revision": "609a50b8dfe0f2e30628",
"url": "/static/css/ShopCart.742fe9ff.chunk.css"
},
{
"revision": "0ec0c604283b07a47652",
"url": "/static/js/ShopCart.176f2726.chunk.js"
"revision": "609a50b8dfe0f2e30628",
"url": "/static/js/ShopCart.4aa986c1.chunk.js"
},
{
"revision": "bc7d9d0e14e11a67f319",
"revision": "b204be02682877f2c265",
"url": "/static/css/aist-share.bef8c404.chunk.css"
},
{
"revision": "bc7d9d0e14e11a67f319",
"url": "/static/js/aist-share.26bcdb95.chunk.js"
"revision": "b204be02682877f2c265",
"url": "/static/js/aist-share.f41ca3e6.chunk.js"
},
{
"revision": "2364bb60b0a18a42aaf9",
......@@ -104,48 +104,48 @@ self.__precacheManifest = [
"url": "/static/js/coupons.847e634b.chunk.js"
},
{
"revision": "8a8f1346f67f5d13643c",
"revision": "00a40242b41ce524f572",
"url": "/static/css/detail.1ccb2ab2.chunk.css"
},
{
"revision": "8a8f1346f67f5d13643c",
"url": "/static/js/detail.9ba39cc7.chunk.js"
"revision": "00a40242b41ce524f572",
"url": "/static/js/detail.bec850de.chunk.js"
},
{
"revision": "bfdd9bffe7ee3c3dc799",
"revision": "17957f3df024921a47bd",
"url": "/static/css/main.af8dac16.chunk.css"
},
{
"revision": "bfdd9bffe7ee3c3dc799",
"url": "/static/js/main.84e840e1.chunk.js"
"revision": "17957f3df024921a47bd",
"url": "/static/js/main.239f4441.chunk.js"
},
{
"revision": "6a0618ab69397a680c1a",
"revision": "b54da6079e782ad43776",
"url": "/static/css/myorders.5434bc7e.chunk.css"
},
{
"revision": "6a0618ab69397a680c1a",
"url": "/static/js/myorders.68ab62ae.chunk.js"
"revision": "b54da6079e782ad43776",
"url": "/static/js/myorders.1dff2efc.chunk.js"
},
{
"revision": "19c6f8668e50ed6130b2",
"revision": "4b5926ebf53cec1a2690",
"url": "/static/css/purchased.6f6ffdf9.chunk.css"
},
{
"revision": "3e3d6a25deeae66e62c0",
"url": "/static/js/BargainMiddlePage.e9fa548d.chunk.js"
"revision": "d7a4387d4486958b52d0",
"url": "/static/js/BargainMiddlePage.95b0aa68.chunk.js"
},
{
"revision": "b93de0366c33ea51e580",
"url": "/static/js/runtime~main.69b87c9c.js"
"revision": "a1f3a095950da3acddf3",
"url": "/static/js/runtime~main.ce626342.js"
},
{
"revision": "224b9f508a3a5597468b",
"revision": "0b04922e3e6c28917740",
"url": "/static/css/search.01106b05.chunk.css"
},
{
"revision": "224b9f508a3a5597468b",
"url": "/static/js/search.3932de6c.chunk.js"
"revision": "0b04922e3e6c28917740",
"url": "/static/js/search.214f669c.chunk.js"
},
{
"revision": "4d2fb467e530fe23061d",
......@@ -156,36 +156,36 @@ self.__precacheManifest = [
"url": "/static/js/shareposter.94531bce.chunk.js"
},
{
"revision": "99f6c67d77db29f333c1",
"revision": "787f95a638d566efbcf4",
"url": "/static/css/study.724f37b8.chunk.css"
},
{
"revision": "99f6c67d77db29f333c1",
"url": "/static/js/study.ca66f2c3.chunk.js"
"revision": "787f95a638d566efbcf4",
"url": "/static/js/study.2d4b43c5.chunk.js"
},
{
"revision": "c2b156de58bba026ce9e",
"revision": "7dafb5fc30f24b925b8a",
"url": "/static/css/togroup.49988cae.chunk.css"
},
{
"revision": "c2b156de58bba026ce9e",
"url": "/static/js/togroup.92a9903c.chunk.js"
"revision": "7dafb5fc30f24b925b8a",
"url": "/static/js/togroup.f06e77ca.chunk.js"
},
{
"revision": "e2e6152a1e568c5d0a40",
"revision": "e005fb537fd0e743223d",
"url": "/static/css/video.780bbb78.chunk.css"
},
{
"revision": "e2e6152a1e568c5d0a40",
"url": "/static/js/video.03e9383a.chunk.js"
"revision": "e005fb537fd0e743223d",
"url": "/static/js/video.6db74c8b.chunk.js"
},
{
"revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/static/media/progress-share-bg.80011994.png"
},
{
"revision": "7134e3625f1b991bf5d3",
"url": "/static/js/24.1b53d0cb.chunk.js"
"revision": "34eb7bd85e30b5c0fbbf",
"url": "/static/js/24.877770b5.chunk.js"
},
{
"revision": "c2692b9ec65a7d644968",
......@@ -256,11 +256,11 @@ self.__precacheManifest = [
"url": "/static/css/26.1b3a6258.chunk.css"
},
{
"revision": "7134e3625f1b991bf5d3",
"revision": "34eb7bd85e30b5c0fbbf",
"url": "/static/css/24.257b0329.chunk.css"
},
{
"revision": "c4ce3a0c0f9091e6dd2d3c3feff3988f",
"revision": "6d6cef42d55fa1b19a93ba853a78fb78",
"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.4d898b4d3e161218fa1e2636991374e9.js"
"/precache-manifest.98782e87537a9d6c88727d12ce827561.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.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{1164:function(t,a,e){"use strict";e.r(a);var s,i=e(23),n=(e(43),e(14)),r=e.n(n),c=e(7),l=e(8),o=e(11),m=e(9),u=e(10),d=e(0),h=e.n(d),g=(e(896),e(30)),p=e(4),b=e(19),E=e(53),v=e(670),f=e(156),j=e(630),N=e(20),y=e(45),S=Object(N.b)(function(t){return{user:t.user}})(s=function(t){function a(t){var s;return Object(c.a)(this,a),(s=Object(o.a)(this,Object(m.a)(a).call(this,t))).getBargainInfo=function(){p.c.get("".concat(API.home,"/m/bargain/info?bargaincode=").concat(Object(p.b)("bargaincode"),"&is_originator=").concat(Object(p.b)("is_originator"))).then(function(t){200===t.data.code?s.setState({data:t.data.data,isOriginator:t.data.data.is_originator,originatorUid:t.data.data.originator_uid,course:t.data.data.course,limitPeople:t.data.data.course.limit_people,bargainData:t.data.data.bargain,width:100*(t.data.data.bargain.bargain_price/t.data.data.bargain.total_price).toFixed(2)+"%"},function(){if(s.state.bargainData.expire_time){var t=1e3*s.state.bargainData.expire_time,a=Date.now();clearInterval(s.timer),s.timer=setInterval(function(){var e=new Date(t-=1e3),i=Object(f.differenceInSeconds)(e,a)%60,n=Object(f.differenceInMinutes)(e,a)%60,r=Object(f.differenceInHours)(e,a)%24,c=Object(f.differenceInDays)(e,a)%24;s.setState({hour:r,min:n,sec:i,day:c})},1e3)}}):r.a.info(t.data.msg,2)})},s.getBargainCourse=function(){p.c.get("".concat(API.home,"/m/bargain/courseList")).then(function(t){200===t.data.code?s.setState({courseList:t.data.data}):r.a.info(t.data.msg,2)})},s.getBargainRankList=function(t,a){var e={courseId:t,type:a};p.c.post("".concat(API.home,"/m/bargain/rankList"),e).then(function(t){if(200===t.data.code){var a=["\u5200\u795e","\u5200\u738b","\u5200\u9738"],e=t.data.data.out_list.map(function(t,e){return Object(i.a)({},t,{rank:a[e]})});s.setState({list:t.data.data.list,outList:e})}else r.a.info(t.data.msg,2)})},s.toCart=function(){var t={course_id:Object(p.b)("id")};p.c.post("".concat(API.home,"/m/cart/add"),t).then(function(t){200===t.data.code||15001===t.data.code?s.props.history.push("/shopcart"):r.a.info(t.data.msg,2)})},s.getMore=function(){s.setState({isShowMore:!0})},s.boxHide=function(t){s.setState({isShowMore:t})},s.toArtifact=function(){var t={courseId:Object(p.b)("id")};p.c.post("".concat(API.home,"/m/bargain/receiveLimit"),t).then(function(t){200===t.data.code?s.setState({isShowOverlay:!0,status:5}):r.a.info(t.data.msg,2)})},s.useArtifact=function(){s.toKanjia(Object(p.b)("id"),2,0)},s.toKanjia=function(t,a,e){var i={course_id:t,type:a,parent_uid:e};p.c.post("".concat(API.home,"/m/bargain/toBargain"),i).then(function(t){200===t.data.code?(s.setState({amount:t.data.data.amount}),2===a&&s.setState({isShowOverlay:!0,status:6}),1===t.data.data.is_success?s.setState({isShowOverlay:!0,status:4}):2===t.data.data.is_success?3===a?s.setState({isShowOverlay:!0,status:2}):4===a&&s.setState({isShowOverlay:!0,status:1,firendBaigainPrice:!1}):0===t.data.data.is_success&&(3===a?s.setState({isShowOverlay:!0,status:2}):4===a&&s.setState({isShowOverlay:!0,status:3})),s.getBargainInfo()):r.a.info(t.data.msg,2)})},s.friendBargainFirst=function(){s.toKanjia(Object(p.b)("id"),3,s.state.originatorUid)},s.friendBargainSecond=function(){s.toKanjia(Object(p.b)("id"),4,s.state.originatorUid)},s.shareFriendBargain=function(){s.setState({isShowOverlay:!0,status:7,isshowYindao:!!p.a.isWeixin})},s.close=function(){s.setState({isShowOverlay:!1,status:""})},s.toCourseDetail=function(t){var a=s.props,e=a.dispatch,i=a.history;e(Object(y.d)(t,function(){return i.push("/detail?id=".concat(t)),!1}))},s.state={isShowOverlay:!1,isOriginator:"",kanjiaIcon:e(629),course:{},courseList:[],data:"",bargainData:"",limitPeople:0,outList:[],list:[],width:"0",isShowMore:"",status:"",hour:"",min:"",sec:"",day:"",amount:"",firendBaigainPrice:!0,isshowYindao:!1,isLoaidng:!0},s}return Object(u.a)(a,t),Object(l.a)(a,[{key:"componentDidMount",value:function(){this.getBargainRankList(Object(p.b)("id"),1),this.getBargainCourse(),this.getBargainInfo()}},{key:"render",value:function(){var t,a,e,s=this;return 0===this.state.bargainData.is_artifact?t=h.a.createElement("div",null,"\u518d\u9080\u8bf7",h.a.createElement("span",{className:"indicator"},this.state.bargainData.invite_num),"\u4f4d\u597d\u53cb\u52a9\u529b\u5373\u53ef\u83b7\u5f97",h.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")):1===this.state.bargainData.is_artifact?(t=h.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",h.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),a=h.a.createElement("button",{className:"artifact-btn",onClick:this.toArtifact},"\u7acb\u5373\u9886\u53d6")):2===this.state.bargainData.is_artifact&&(t=h.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",h.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),a=h.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=h.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=h.a.createElement("button",{className:"active-btn",onClick:this.friendBargainSecond},"\u518d\u780d\u4e00\u5200"):1!==this.state.isOriginator&&2===this.state.data.assist_status?e=h.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=h.a.createElement("button",{className:"invalid-btn"},"\u780d\u4ef7\u7ed3\u675f"):1===this.state.isOriginator&&0===this.state.data.bargain_status&&(e=h.a.createElement("button",{className:"active-btn",onClick:this.shareFriendBargain},"\u9080\u8bf7\u597d\u53cb\u780d\u4ef7")),h.a.createElement("div",{className:"bargain-middle-page"},h.a.createElement(g.e,{title:"\u780d\u4ef7\u8be6\u60c5",arrow:!0,cart:!0}),h.a.createElement("div",{className:"top"},h.a.createElement("div",{className:"bargain-area"},1!==this.state.isOriginator&&h.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"),h.a.createElement("ul",null,h.a.createElement(g.i,{img:this.state.course.course_img,info:h.a.createElement(A,{isOriginator:this.state.isOriginator,data:this.state.data,toCart:this.toCart})})),h.a.createElement("div",{className:"bargain-detail"},h.a.createElement("div",{className:"top"},h.a.createElement("div",null,"\u5df2\u780d",h.a.createElement("span",{className:"reduced-price"},this.state.bargainData.bargain_price,"\u5143")),0===this.state.data.bargain_status&&h.a.createElement("div",null,h.a.createElement("span",{className:"time hour"},String(this.state.hour).padStart(2,0))," :\xa0",h.a.createElement("span",{className:"time min"},String(this.state.min).padStart(2,0))," :\xa0",h.a.createElement("span",{className:"time sec"},String(this.state.sec).padStart(2,0)),h.a.createElement("span",{className:"inactive"}," \u540e\u780d\u4ef7\u7ed3\u675f")),1===this.state.data.bargain_status&&1===this.state.isOriginator&&h.a.createElement("span",{className:"inactive"},"\u780d\u4ef7\u7ed3\u675f")),h.a.createElement("div",{className:"middle"},h.a.createElement("span",{style:{width:this.state.width}})),1===this.state.isOriginator&&0===this.state.data.bargain_status&&h.a.createElement("div",null,t,a),1===this.state.isOriginator&&1===this.state.data.bargain_status&&h.a.createElement("div",null,"\u780d\u4ef7\u91d1\u989d\u5c06\u4e8e",h.a.createElement("span",{className:"time hour"},String(this.state.day).padStart(2,0)),h.a.createElement("span",{className:"unit"}," \u5929 "),h.a.createElement("span",{className:"time min"},String(this.state.hour).padStart(2,0)),h.a.createElement("span",{className:"unit"}," \u65f6 "),h.a.createElement("span",{className:"time sec"},String(this.state.min).padStart(2,0)),h.a.createElement("span",{className:"unit"},"\u5206"),"\u540e\u6e05\u96f6\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u652f\u4ed8"),h.a.createElement("div",{className:"button"},e))),h.a.createElement("div",{className:"bargain-records"},h.a.createElement("div",{className:"title"},"\u780d\u4ef7\u8bb0\u5f55"),h.a.createElement("ul",null,this.state.outList&&this.state.outList.length>0&&this.state.outList.map(function(t,a){return h.a.createElement("li",{key:a},h.a.createElement("div",{className:"left"},h.a.createElement("img",{className:"avatar",src:t.avatar_file,alt:""}),h.a.createElement("span",{className:"nickname"},t.user_name),h.a.createElement("span",{className:"rank-tag"},t.rank)),h.a.createElement("div",{className:"right"},h.a.createElement("img",{className:"kanjia-icon",src:s.state.kanjiaIcon,alt:""}),"\u780d\u6389",h.a.createElement("span",{className:"price"},t.amount)))})),h.a.createElement("div",{className:"more",onClick:this.getMore},"\u67e5\u770b\u66f4\u591a>>"))),h.a.createElement("div",{className:"bargain-course-list",id:"bargainCourse"},h.a.createElement("div",{className:"title-wrapper"},h.a.createElement("div",{className:"title"},"\u6211\u8981\u780d\u4ef7"),h.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")),h.a.createElement("ul",null,this.state.courseList&&this.state.courseList.length>0&&this.state.courseList.map(function(t,a){return h.a.createElement(g.d,{className:"text-overflow-2",key:a,id:t.course_id,img:t.image_name,title:t.course_title,toDetail:s.toCourseDetail,bottom:h.a.createElement(C,{item:t,toCart:s.toCart,toDetail:s.toCourseDetail})})}))),h.a.createElement(b.b,{to:"/preferential",className:"preferential"},"\u67e5\u770b\u66f4\u591a\u7cbe\u54c1\u8bfe\u7a0b >>"),h.a.createElement(v.a,{list:this.state.list,icon:this.state.kanjiaIcon,limitPeople:this.state.limitPeople,isShowMore:this.state.isShowMore,boxHide:this.boxHide}),this.state.isShowOverlay&&h.a.createElement(j.a,null,7===this.state.status&&h.a.createElement(L,{isshowYindao:this.state.isshowYindao,limitPeople:this.state.limitPeople,close:this.close}),1===this.state.status&&h.a.createElement(k,{money:this.state.amount,avatar:this.props.user.data.avatar,firendBaigainPrice:this.state.firendBaigainPrice}),2===this.state.status&&h.a.createElement(B,{bargainSecond:this.friendBargainSecond,money:this.state.amount}),3===this.state.status&&h.a.createElement(U,{close:this.close,money:this.state.amount}),4===this.state.status&&h.a.createElement(w,{close:this.close,limitPeople:this.state.limitPeople}),5===this.state.status&&h.a.createElement(D,{useArtifact:this.useArtifact}),6===this.state.status&&h.a.createElement(O,{toCart:this.toCart,money:this.state.amount,allMoney:this.state.bargainData.bargain_price}),7!==this.state.status&&h.a.createElement("i",{onClick:this.close,className:"iconfont iconiconfront-2 bargain-close"})))}}]),a}(d.Component))||s;function A(t){var a=t.data&&t.data.course;return h.a.createElement("div",{className:"des"},h.a.createElement("div",{className:"course-title text-overflow-2"},a.course_title),h.a.createElement("div",{className:"price-bar"},h.a.createElement("span",{className:"discount-price"},"\uffe5",a.course_price),1===t.isOriginator&&h.a.createElement("button",{className:"purchase-btn",onClick:t.toCart},"\xa5",a.pay_price,"\u53bb\u652f\u4ed8")))}function C(t){var a;return a=2===t.item.bargain_status?h.a.createElement("a",{href:"javascript:;",onClick:function(){return t.toDetail(t.item.course_id)},className:"bargain"},"\u6211\u8981\u780d\u4ef7"):3===t.item.bargain_status?h.a.createElement(b.b,{to:"/play/video?id=".concat(t.item.course_id),className:"bargain"},"\u53bb\u5b66\u4e60"):h.a.createElement("div",{className:"btns"},1===t.item.bargain_status&&h.a.createElement("button",{className:"invalid"},"\u780d\u4ef7\u7ed3\u675f"),0===t.item.bargain_status&&h.a.createElement("a",{href:"javascript:;",onClick:function(){return t.toDetail(t.item.course_id)},className:"bargain-btn"},"\u6211\u8981\u780d\u4ef7"),h.a.createElement("button",{onClick:t.toCart,className:"purchase-btn"},"\xa5",t.item.pay_price,"\u53bb\u652f\u4ed8")),h.a.createElement("div",{className:"course-bottom"},h.a.createElement("div",{className:"course-price"},h.a.createElement("span",{className:"discount-price"},"\xa5",t.item.price1),h.a.createElement("span",{className:"original-price"},"\xa5",t.item.price0)),a)}function k(t){return h.a.createElement("div",{className:"bargain-public-number"},h.a.createElement("img",{className:"avait",src:t.avatar,alt:""}),t.firendBaigainPrice&&h.a.createElement("p",{className:"status-title ff4"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",t.money,"\u5143\uff01"),h.a.createElement("p",{className:"status-dec"},"\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u53ef\u4ee5\u518d\u780d\u4e00\u5200\u54e6~"),h.a.createElement("img",{className:"public-number-img",src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png",alt:""}))}function B(t){return h.a.createElement("div",{className:"bargain-first"},h.a.createElement("img",{className:"top-img",src:e(673),alt:""}),h.a.createElement("p",{className:"status-title"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",h.a.createElement("span",{className:"ff4"},t.money,"\u5143"),"\uff01"),h.a.createElement("p",{className:"status-dec"},"\u4f60\u8fd8\u53ef\u4ee5\u5e2e\u6211\u518d\u780d\u4e00\u5200\u54e6~"),h.a.createElement("button",{className:"bargain-href",onClick:t.bargainSecond},"\u518d\u780d\u4e00\u5200"))}function U(t){return h.a.createElement("div",{className:"bargain-second"},h.a.createElement("img",{className:"top-img",src:e(673),alt:""}),h.a.createElement("p",{className:"status-title"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u5e2e\u597d\u53cb\u780d\u6389",h.a.createElement("span",{className:"ff4"},t.money,"\u5143"),"\uff01"),h.a.createElement("a",{className:"bargain-href",href:"#bargainCourse",onClick:t.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function w(t){return h.a.createElement("div",{className:"not-bargain"},h.a.createElement("img",{className:"middle-img",src:e(897),alt:""}),h.a.createElement("p",{className:"status-title"},"\u4f60\u7684\u597d\u53cb\u7528\u3010\u780d\u4ef7\u795e\u5668\u3011\u628a\u6211\u780d\u8499\u5708\u4e86",h.a.createElement("br",null),"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),h.a.createElement("p",{className:"status-dec"},"\u9080\u8bf7",t.limitPeople,"\u4f4d\u4ee5\u4e0a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011"),h.a.createElement("a",{className:"bargain-href",href:"#bargainCourse",onClick:t.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function D(t){return h.a.createElement("div",{className:"artifact-box"},h.a.createElement("p",{className:"top-tip"},"\u606d\u559c\u4f60\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011\uff01"),h.a.createElement("p",{className:"middle-tip"},"\u60a8\u53ef\u4ee5\u4f7f\u7528",h.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u518d\u780d\u4e00\u5200"),h.a.createElement("button",{className:"use-artifact",onClick:t.useArtifact},"\u7acb\u5373\u4f7f\u7528"))}function O(t){return h.a.createElement("div",{className:"use-artifact-box"},h.a.createElement("img",{className:"top-img",src:e(673),alt:""}),h.a.createElement("p",{className:"top-tip"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u780d\u6389\u4e86",t.money,"\u5143\uff01"),h.a.createElement("p",{className:"middle-tip"},"\u4f60\u5df2\u7ecf\u780d\u4e86",h.a.createElement("span",{className:"indicator"},t.allMoney,"\u5143"),"\u6ca1\u89c1\u8fc7\u4f60\u8fd9\u4e48\u80fd\u780d\u7684\u4eba..."),h.a.createElement("p",{className:"btm-tip"},"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),h.a.createElement("button",{className:"tubuy",onClick:t.toCart},"\u53bb\u652f\u4ed8"))}function L(t){return h.a.createElement("div",null,h.a.createElement("div",{className:"close-bargain-success",onClick:t.close}),h.a.createElement("div",{className:"bargain-success"},t.isshowYindao&&h.a.createElement("i",{className:"iconfont iconyindao"}),h.a.createElement("p",null,"\u5206\u4eab\u5230\u5fae\u4fe1\u7fa4\u9080\u8bf7\u66f4\u591a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7"),h.a.createElement("p",null,"\u8d85\u8fc7",t.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97",h.a.createElement("span",{className:"indicator",style:{color:"#FF4000"}},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u54e6")))}a.default=Object(E.g)(S)},629:function(t,a){t.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="},630:function(t,a,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(672),document.body||document.documentElement),h=["touchmove","mousewheel"],g=function(t){function a(t){var e;return Object(s.a)(this,a),(e=Object(n.a)(this,Object(r.a)(a).call(this,t))).preventScroll=function(t){t.preventDefault()},e.overlayBox=null,e}return Object(c.a)(a,t),Object(i.a)(a,[{key:"componentDidMount",value:function(){var t=this;h.forEach(function(a){t.overlayBox.addEventListener(a,t.preventScroll,{passive:!1})})}},{key:"componentWillUnmount",value:function(){var t=this;h.forEach(function(a){t.overlayBox.removeEventListener(a,t.preventScroll)})}},{key:"render",value:function(){var t=this;return u.a.createPortal(o.a.createElement("div",{className:"overlay",ref:function(a){return t.overlayBox=a},style:{top:"".concat(window.scrollY,"px")}},this.props.children),d)}}]),a}(l.Component);a.a=g},670:function(t,a,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(671),function(t){function a(t){var i;return Object(s.a)(this,a),(i=Object(n.a)(this,Object(r.a)(a).call(this,t))).closeMore=function(){i.props.boxHide(!1)},i.state={kanjiaIcon:e(629)},i}return Object(c.a)(a,t),Object(i.a)(a,[{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}))}}]),a}(l.Component));function u(t){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"},t.list&&t.list.length>0&&t.list.map(function(a,e){return o.a.createElement("li",{key:e,className:"bargain-item"},o.a.createElement("img",{className:"avatar",src:a.avatar_file,alt:""}),o.a.createElement("p",{className:"name"},a.user_name),o.a.createElement("p",{className:"bargain-status"},o.a.createElement("img",{className:"kanjia-icon",src:t.img,alt:""}),"\u780d\u6389",o.a.createElement("span",{className:"price"},a.amount)))})),o.a.createElement("div",{className:"more-bargain-dec"},"\u8d85\u8fc7",t.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011")),o.a.createElement("i",{onClick:t.closeMore,className:"iconfont iconiconfront-2 close"}))}a.a=m},671:function(t,a,e){},672:function(t,a,e){},673:function(t,a,e){t.exports=e.p+"static/media/kanjia_cg_icon.81a489ac.png"},896:function(t,a,e){},897:function(t,a){t.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+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EHAQ9Yqo4toj7wpCDT4CF1lJ2Q1Kl0sjOhmO0dWG+4YyIkp7wdZLbjTYqdklLfhx5gVKjsq2iPHrnCx+DIhTdJIcjJmCygotyWidB2crc/vI3J8uKeiXER0CP4lREtkdEBghnJESXCT8pURCBjclk2Qs8jYig4iDkotD0FeEnMHq4GIr6BMvChU1jv2sxTro8yqWFmE7BQxzUOJ+XcRylnwiDHGd3HgsZqK7/GhgYyr4Bv0gWFMX+40TOAZvSG+YKhrUIpmOx2sRrU0KE8b9CfK04mZD0/TvqzupNz1FM9xzTZU1/YH9qfu9prOSPXG9Tr+UerDsaeOnGbP1S3bbNXggV9XIWYP5SLNCwAAAABJRU5ErkJggg=="}}]);
//# sourceMappingURL=BargainMiddlePage.e9fa548d.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{1164:function(t,a,e){"use strict";e.r(a);var s,i=e(23),n=(e(43),e(14)),r=e.n(n),c=e(7),l=e(8),o=e(11),m=e(9),u=e(10),d=e(0),h=e.n(d),g=(e(896),e(30)),p=e(4),b=e(18),E=e(53),v=e(670),f=e(156),j=e(630),N=e(20),y=e(45),S=Object(N.b)(function(t){return{user:t.user}})(s=function(t){function a(t){var s;return Object(c.a)(this,a),(s=Object(o.a)(this,Object(m.a)(a).call(this,t))).getBargainInfo=function(){p.c.get("".concat(API.home,"/m/bargain/info?bargaincode=").concat(Object(p.b)("bargaincode"),"&is_originator=").concat(Object(p.b)("is_originator"))).then(function(t){200===t.data.code?s.setState({data:t.data.data,isOriginator:t.data.data.is_originator,originatorUid:t.data.data.originator_uid,course:t.data.data.course,limitPeople:t.data.data.course.limit_people,bargainData:t.data.data.bargain,width:100*(t.data.data.bargain.bargain_price/t.data.data.bargain.total_price).toFixed(2)+"%"},function(){if(s.state.bargainData.expire_time){var t=1e3*s.state.bargainData.expire_time,a=Date.now();clearInterval(s.timer),s.timer=setInterval(function(){var e=new Date(t-=1e3),i=Object(f.differenceInSeconds)(e,a)%60,n=Object(f.differenceInMinutes)(e,a)%60,r=Object(f.differenceInHours)(e,a)%24,c=Object(f.differenceInDays)(e,a)%24;s.setState({hour:r,min:n,sec:i,day:c})},1e3)}}):r.a.info(t.data.msg,2)})},s.getBargainCourse=function(){p.c.get("".concat(API.home,"/m/bargain/courseList")).then(function(t){200===t.data.code?s.setState({courseList:t.data.data}):r.a.info(t.data.msg,2)})},s.getBargainRankList=function(t,a){var e={courseId:t,type:a};p.c.post("".concat(API.home,"/m/bargain/rankList"),e).then(function(t){if(200===t.data.code){var a=["\u5200\u795e","\u5200\u738b","\u5200\u9738"],e=t.data.data.out_list.map(function(t,e){return Object(i.a)({},t,{rank:a[e]})});s.setState({list:t.data.data.list,outList:e})}else r.a.info(t.data.msg,2)})},s.toCart=function(){var t={course_id:Object(p.b)("id")};p.c.post("".concat(API.home,"/m/cart/add"),t).then(function(t){200===t.data.code||15001===t.data.code?s.props.history.push("/shopcart"):r.a.info(t.data.msg,2)})},s.getMore=function(){s.setState({isShowMore:!0})},s.boxHide=function(t){s.setState({isShowMore:t})},s.toArtifact=function(){var t={courseId:Object(p.b)("id")};p.c.post("".concat(API.home,"/m/bargain/receiveLimit"),t).then(function(t){200===t.data.code?s.setState({isShowOverlay:!0,status:5}):r.a.info(t.data.msg,2)})},s.useArtifact=function(){s.toKanjia(Object(p.b)("id"),2,0)},s.toKanjia=function(t,a,e){var i={course_id:t,type:a,parent_uid:e};p.c.post("".concat(API.home,"/m/bargain/toBargain"),i).then(function(t){200===t.data.code?(s.setState({amount:t.data.data.amount}),2===a&&s.setState({isShowOverlay:!0,status:6}),1===t.data.data.is_success?s.setState({isShowOverlay:!0,status:4}):2===t.data.data.is_success?3===a?s.setState({isShowOverlay:!0,status:2}):4===a&&s.setState({isShowOverlay:!0,status:1,firendBaigainPrice:!1}):0===t.data.data.is_success&&(3===a?s.setState({isShowOverlay:!0,status:2}):4===a&&s.setState({isShowOverlay:!0,status:3})),s.getBargainInfo()):r.a.info(t.data.msg,2)})},s.friendBargainFirst=function(){s.toKanjia(Object(p.b)("id"),3,s.state.originatorUid)},s.friendBargainSecond=function(){s.toKanjia(Object(p.b)("id"),4,s.state.originatorUid)},s.shareFriendBargain=function(){s.setState({isShowOverlay:!0,status:7,isshowYindao:!!p.a.isWeixin})},s.close=function(){s.setState({isShowOverlay:!1,status:""})},s.toCourseDetail=function(t){var a=s.props,e=a.dispatch,i=a.history;e(Object(y.d)(t,function(){return i.push("/detail?id=".concat(t)),!1}))},s.state={isShowOverlay:!1,isOriginator:"",kanjiaIcon:e(629),course:{},courseList:[],data:"",bargainData:"",limitPeople:0,outList:[],list:[],width:"0",isShowMore:"",status:"",hour:"",min:"",sec:"",day:"",amount:"",firendBaigainPrice:!0,isshowYindao:!1,isLoaidng:!0},s}return Object(u.a)(a,t),Object(l.a)(a,[{key:"componentDidMount",value:function(){this.getBargainRankList(Object(p.b)("id"),1),this.getBargainCourse(),this.getBargainInfo()}},{key:"render",value:function(){var t,a,e,s=this;return 0===this.state.bargainData.is_artifact?t=h.a.createElement("div",null,"\u518d\u9080\u8bf7",h.a.createElement("span",{className:"indicator"},this.state.bargainData.invite_num),"\u4f4d\u597d\u53cb\u52a9\u529b\u5373\u53ef\u83b7\u5f97",h.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")):1===this.state.bargainData.is_artifact?(t=h.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",h.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),a=h.a.createElement("button",{className:"artifact-btn",onClick:this.toArtifact},"\u7acb\u5373\u9886\u53d6")):2===this.state.bargainData.is_artifact&&(t=h.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",h.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),a=h.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=h.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=h.a.createElement("button",{className:"active-btn",onClick:this.friendBargainSecond},"\u518d\u780d\u4e00\u5200"):1!==this.state.isOriginator&&2===this.state.data.assist_status?e=h.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=h.a.createElement("button",{className:"invalid-btn"},"\u780d\u4ef7\u7ed3\u675f"):1===this.state.isOriginator&&0===this.state.data.bargain_status&&(e=h.a.createElement("button",{className:"active-btn",onClick:this.shareFriendBargain},"\u9080\u8bf7\u597d\u53cb\u780d\u4ef7")),h.a.createElement("div",{className:"bargain-middle-page"},h.a.createElement(g.e,{title:"\u780d\u4ef7\u8be6\u60c5",arrow:!0,cart:!0}),h.a.createElement("div",{className:"top"},h.a.createElement("div",{className:"bargain-area"},1!==this.state.isOriginator&&h.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"),h.a.createElement("ul",null,h.a.createElement(g.i,{img:this.state.course.course_img,info:h.a.createElement(A,{isOriginator:this.state.isOriginator,data:this.state.data,toCart:this.toCart})})),h.a.createElement("div",{className:"bargain-detail"},h.a.createElement("div",{className:"top"},h.a.createElement("div",null,"\u5df2\u780d",h.a.createElement("span",{className:"reduced-price"},this.state.bargainData.bargain_price,"\u5143")),0===this.state.data.bargain_status&&h.a.createElement("div",null,h.a.createElement("span",{className:"time hour"},String(this.state.hour).padStart(2,0))," :\xa0",h.a.createElement("span",{className:"time min"},String(this.state.min).padStart(2,0))," :\xa0",h.a.createElement("span",{className:"time sec"},String(this.state.sec).padStart(2,0)),h.a.createElement("span",{className:"inactive"}," \u540e\u780d\u4ef7\u7ed3\u675f")),1===this.state.data.bargain_status&&1===this.state.isOriginator&&h.a.createElement("span",{className:"inactive"},"\u780d\u4ef7\u7ed3\u675f")),h.a.createElement("div",{className:"middle"},h.a.createElement("span",{style:{width:this.state.width}})),1===this.state.isOriginator&&0===this.state.data.bargain_status&&h.a.createElement("div",null,t,a),1===this.state.isOriginator&&1===this.state.data.bargain_status&&h.a.createElement("div",null,"\u780d\u4ef7\u91d1\u989d\u5c06\u4e8e",h.a.createElement("span",{className:"time hour"},String(this.state.day).padStart(2,0)),h.a.createElement("span",{className:"unit"}," \u5929 "),h.a.createElement("span",{className:"time min"},String(this.state.hour).padStart(2,0)),h.a.createElement("span",{className:"unit"}," \u65f6 "),h.a.createElement("span",{className:"time sec"},String(this.state.min).padStart(2,0)),h.a.createElement("span",{className:"unit"},"\u5206"),"\u540e\u6e05\u96f6\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u652f\u4ed8"),h.a.createElement("div",{className:"button"},e))),h.a.createElement("div",{className:"bargain-records"},h.a.createElement("div",{className:"title"},"\u780d\u4ef7\u8bb0\u5f55"),h.a.createElement("ul",null,this.state.outList&&this.state.outList.length>0&&this.state.outList.map(function(t,a){return h.a.createElement("li",{key:a},h.a.createElement("div",{className:"left"},h.a.createElement("img",{className:"avatar",src:t.avatar_file,alt:""}),h.a.createElement("span",{className:"nickname"},t.user_name),h.a.createElement("span",{className:"rank-tag"},t.rank)),h.a.createElement("div",{className:"right"},h.a.createElement("img",{className:"kanjia-icon",src:s.state.kanjiaIcon,alt:""}),"\u780d\u6389",h.a.createElement("span",{className:"price"},t.amount)))})),h.a.createElement("div",{className:"more",onClick:this.getMore},"\u67e5\u770b\u66f4\u591a>>"))),h.a.createElement("div",{className:"bargain-course-list",id:"bargainCourse"},h.a.createElement("div",{className:"title-wrapper"},h.a.createElement("div",{className:"title"},"\u6211\u8981\u780d\u4ef7"),h.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")),h.a.createElement("ul",null,this.state.courseList&&this.state.courseList.length>0&&this.state.courseList.map(function(t,a){return h.a.createElement(g.d,{className:"text-overflow-2",key:a,id:t.course_id,img:t.image_name,title:t.course_title,toDetail:s.toCourseDetail,bottom:h.a.createElement(C,{item:t,toCart:s.toCart,toDetail:s.toCourseDetail})})}))),h.a.createElement(b.b,{to:"/preferential",className:"preferential"},"\u67e5\u770b\u66f4\u591a\u7cbe\u54c1\u8bfe\u7a0b >>"),h.a.createElement(v.a,{list:this.state.list,icon:this.state.kanjiaIcon,limitPeople:this.state.limitPeople,isShowMore:this.state.isShowMore,boxHide:this.boxHide}),this.state.isShowOverlay&&h.a.createElement(j.a,null,7===this.state.status&&h.a.createElement(L,{isshowYindao:this.state.isshowYindao,limitPeople:this.state.limitPeople,close:this.close}),1===this.state.status&&h.a.createElement(k,{money:this.state.amount,avatar:this.props.user.data.avatar,firendBaigainPrice:this.state.firendBaigainPrice}),2===this.state.status&&h.a.createElement(B,{bargainSecond:this.friendBargainSecond,money:this.state.amount}),3===this.state.status&&h.a.createElement(U,{close:this.close,money:this.state.amount}),4===this.state.status&&h.a.createElement(w,{close:this.close,limitPeople:this.state.limitPeople}),5===this.state.status&&h.a.createElement(D,{useArtifact:this.useArtifact}),6===this.state.status&&h.a.createElement(O,{toCart:this.toCart,money:this.state.amount,allMoney:this.state.bargainData.bargain_price}),7!==this.state.status&&h.a.createElement("i",{onClick:this.close,className:"iconfont iconiconfront-2 bargain-close"})))}}]),a}(d.Component))||s;function A(t){var a=t.data&&t.data.course;return h.a.createElement("div",{className:"des"},h.a.createElement("div",{className:"course-title text-overflow-2"},a.course_title),h.a.createElement("div",{className:"price-bar"},h.a.createElement("span",{className:"discount-price"},"\uffe5",a.course_price),1===t.isOriginator&&h.a.createElement("button",{className:"purchase-btn",onClick:t.toCart},"\xa5",a.pay_price,"\u53bb\u652f\u4ed8")))}function C(t){var a;return a=2===t.item.bargain_status?h.a.createElement("a",{href:"javascript:;",onClick:function(){return t.toDetail(t.item.course_id)},className:"bargain"},"\u6211\u8981\u780d\u4ef7"):3===t.item.bargain_status?h.a.createElement(b.b,{to:"/play/video?id=".concat(t.item.course_id),className:"bargain"},"\u53bb\u5b66\u4e60"):h.a.createElement("div",{className:"btns"},1===t.item.bargain_status&&h.a.createElement("button",{className:"invalid"},"\u780d\u4ef7\u7ed3\u675f"),0===t.item.bargain_status&&h.a.createElement("a",{href:"javascript:;",onClick:function(){return t.toDetail(t.item.course_id)},className:"bargain-btn"},"\u6211\u8981\u780d\u4ef7"),h.a.createElement("button",{onClick:t.toCart,className:"purchase-btn"},"\xa5",t.item.pay_price,"\u53bb\u652f\u4ed8")),h.a.createElement("div",{className:"course-bottom"},h.a.createElement("div",{className:"course-price"},h.a.createElement("span",{className:"discount-price"},"\xa5",t.item.price1),h.a.createElement("span",{className:"original-price"},"\xa5",t.item.price0)),a)}function k(t){return h.a.createElement("div",{className:"bargain-public-number"},h.a.createElement("img",{className:"avait",src:t.avatar,alt:""}),t.firendBaigainPrice&&h.a.createElement("p",{className:"status-title ff4"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",t.money,"\u5143\uff01"),h.a.createElement("p",{className:"status-dec"},"\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u53ef\u4ee5\u518d\u780d\u4e00\u5200\u54e6~"),h.a.createElement("img",{className:"public-number-img",src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png",alt:""}))}function B(t){return h.a.createElement("div",{className:"bargain-first"},h.a.createElement("img",{className:"top-img",src:e(673),alt:""}),h.a.createElement("p",{className:"status-title"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",h.a.createElement("span",{className:"ff4"},t.money,"\u5143"),"\uff01"),h.a.createElement("p",{className:"status-dec"},"\u4f60\u8fd8\u53ef\u4ee5\u5e2e\u6211\u518d\u780d\u4e00\u5200\u54e6~"),h.a.createElement("button",{className:"bargain-href",onClick:t.bargainSecond},"\u518d\u780d\u4e00\u5200"))}function U(t){return h.a.createElement("div",{className:"bargain-second"},h.a.createElement("img",{className:"top-img",src:e(673),alt:""}),h.a.createElement("p",{className:"status-title"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u5e2e\u597d\u53cb\u780d\u6389",h.a.createElement("span",{className:"ff4"},t.money,"\u5143"),"\uff01"),h.a.createElement("a",{className:"bargain-href",href:"#bargainCourse",onClick:t.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function w(t){return h.a.createElement("div",{className:"not-bargain"},h.a.createElement("img",{className:"middle-img",src:e(897),alt:""}),h.a.createElement("p",{className:"status-title"},"\u4f60\u7684\u597d\u53cb\u7528\u3010\u780d\u4ef7\u795e\u5668\u3011\u628a\u6211\u780d\u8499\u5708\u4e86",h.a.createElement("br",null),"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),h.a.createElement("p",{className:"status-dec"},"\u9080\u8bf7",t.limitPeople,"\u4f4d\u4ee5\u4e0a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011"),h.a.createElement("a",{className:"bargain-href",href:"#bargainCourse",onClick:t.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function D(t){return h.a.createElement("div",{className:"artifact-box"},h.a.createElement("p",{className:"top-tip"},"\u606d\u559c\u4f60\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011\uff01"),h.a.createElement("p",{className:"middle-tip"},"\u60a8\u53ef\u4ee5\u4f7f\u7528",h.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u518d\u780d\u4e00\u5200"),h.a.createElement("button",{className:"use-artifact",onClick:t.useArtifact},"\u7acb\u5373\u4f7f\u7528"))}function O(t){return h.a.createElement("div",{className:"use-artifact-box"},h.a.createElement("img",{className:"top-img",src:e(673),alt:""}),h.a.createElement("p",{className:"top-tip"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u780d\u6389\u4e86",t.money,"\u5143\uff01"),h.a.createElement("p",{className:"middle-tip"},"\u4f60\u5df2\u7ecf\u780d\u4e86",h.a.createElement("span",{className:"indicator"},t.allMoney,"\u5143"),"\u6ca1\u89c1\u8fc7\u4f60\u8fd9\u4e48\u80fd\u780d\u7684\u4eba..."),h.a.createElement("p",{className:"btm-tip"},"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),h.a.createElement("button",{className:"tubuy",onClick:t.toCart},"\u53bb\u652f\u4ed8"))}function L(t){return h.a.createElement("div",null,h.a.createElement("div",{className:"close-bargain-success",onClick:t.close}),h.a.createElement("div",{className:"bargain-success"},t.isshowYindao&&h.a.createElement("i",{className:"iconfont iconyindao"}),h.a.createElement("p",null,"\u5206\u4eab\u5230\u5fae\u4fe1\u7fa4\u9080\u8bf7\u66f4\u591a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7"),h.a.createElement("p",null,"\u8d85\u8fc7",t.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97",h.a.createElement("span",{className:"indicator",style:{color:"#FF4000"}},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u54e6")))}a.default=Object(E.g)(S)},629:function(t,a){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAA51BMVEUAAAD3yyr4zCr60jD61DT4zSz4zi360C770jL93jn94UH3yin4yyz4ziz4zi34zS361TX50i/50jD61DP72Dj61jP+4kH+4ED4zCv3zCz4zSz4zS350jL61jb61jT6zir50DH83Dz71DP83Dj+5ET2zDD50C77zyj93j/930H82zv3yir3yCj/6072xib3yyv/6kz2xiT/7lD/8FL2wyL2xCP/8VT/7E//8lb83T74zS32wiH/81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e(672),document.body||document.documentElement),h=["touchmove","mousewheel"],g=function(t){function a(t){var e;return Object(s.a)(this,a),(e=Object(n.a)(this,Object(r.a)(a).call(this,t))).preventScroll=function(t){t.preventDefault()},e.overlayBox=null,e}return Object(c.a)(a,t),Object(i.a)(a,[{key:"componentDidMount",value:function(){var t=this;h.forEach(function(a){t.overlayBox.addEventListener(a,t.preventScroll,{passive:!1})})}},{key:"componentWillUnmount",value:function(){var t=this;h.forEach(function(a){t.overlayBox.removeEventListener(a,t.preventScroll)})}},{key:"render",value:function(){var t=this;return u.a.createPortal(o.a.createElement("div",{className:"overlay",ref:function(a){return t.overlayBox=a},style:{top:"".concat(window.scrollY,"px")}},this.props.children),d)}}]),a}(l.Component);a.a=g},670:function(t,a,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(671),function(t){function a(t){var i;return Object(s.a)(this,a),(i=Object(n.a)(this,Object(r.a)(a).call(this,t))).closeMore=function(){i.props.boxHide(!1)},i.state={kanjiaIcon:e(629)},i}return Object(c.a)(a,t),Object(i.a)(a,[{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}))}}]),a}(l.Component));function u(t){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"},t.list&&t.list.length>0&&t.list.map(function(a,e){return o.a.createElement("li",{key:e,className:"bargain-item"},o.a.createElement("img",{className:"avatar",src:a.avatar_file,alt:""}),o.a.createElement("p",{className:"name"},a.user_name),o.a.createElement("p",{className:"bargain-status"},o.a.createElement("img",{className:"kanjia-icon",src:t.img,alt:""}),"\u780d\u6389",o.a.createElement("span",{className:"price"},a.amount)))})),o.a.createElement("div",{className:"more-bargain-dec"},"\u8d85\u8fc7",t.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011")),o.a.createElement("i",{onClick:t.closeMore,className:"iconfont iconiconfront-2 close"}))}a.a=m},671:function(t,a,e){},672:function(t,a,e){},673:function(t,a,e){t.exports=e.p+"static/media/kanjia_cg_icon.81a489ac.png"},896:function(t,a,e){},897:function(t,a){t.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/ykmzvekqfe0f0lk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2Cjnb4+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.95b0aa68.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1151:function(e,t,a){},1152: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="},1170:function(e,t,a){"use strict";a.r(t);a(43);var n,s=a(14),i=a.n(s),c=a(7),r=a(8),o=a(11),l=a(9),m=a(10),u=a(0),d=a.n(u),p=a(71),h=(a(1151),a(4)),f=a(19),E=a(30),v=a(64),g=a(20),x=a(45),b=Object(g.b)()(n=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(o.a)(this,Object(l.a)(t).call(this,e))).toCourseDetail=function(e){var t=a.props,n=t.dispatch,s=t.history;n(Object(x.d)(e,function(){return s.push("/detail?id=".concat(e)),!1}))},a.state={camp:[],employment:[],basics:[],advanced:[],special:[],isLoading:!0},a}return Object(m.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this;h.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]||[]})):i.a.info(t.data.msg,2)})}},{key:"render",value:function(){var e=this;return d.a.createElement("div",{className:"class-box"},d.a.createElement(E.e,{title:"\u5206\u7c7b",arrow:!1,cart:!1}),d.a.createElement(v.a,{isLoading:this.state.isLoading},d.a.createElement(_,{toDetail:this.toCourseDetail,data:this.state.camp.list,title:this.state.camp.name,type:1}),d.a.createElement(_,{toDetail:this.toCourseDetail,data:this.state.employment.list,title:this.state.employment.name,type:1}),d.a.createElement(_,{toDetail:this.toCourseDetail,data:this.state.basics.list,title:this.state.basics.name,type:2}),d.a.createElement(_,{toDetail:this.toCourseDetail,data:this.state.advanced.list,title:this.state.advanced.name,type:2}),d.a.createElement("div",{className:"vip"},this.state.special.list&&this.state.special.list.length>0&&this.state.special.list.map(function(t,a){return d.a.createElement("a",{href:"javascript:;",onClick:function(){return e.toCourseDetail(t.course_id)},key:a},d.a.createElement("img",{src:t.course_img,alt:""}))}))))}}]),t}(u.Component))||n;function N(e){var t=e.data,a=e.toDetail;return d.a.createElement("div",{className:"items-box"},t&&t.length>0&&t.map(function(e,t){return d.a.createElement("a",{href:"javascript:;",onClick:function(){return a(e.course_id)},key:t,className:"item-banner"},d.a.createElement("img",{src:e.course_img,alt:""}),e.is_aist&&d.a.createElement("span",{className:"return_cash"}))}))}function w(e){return d.a.createElement("div",{className:"items-box"},e.data&&e.data.length>0&&e.data.map(function(e,t){return d.a.createElement(f.b,{to:"/courselist?id=".concat(e.c_id,"&name=").concat(e.c_name),key:t,className:"item-label"},e.c_name)}))}function _(e){return d.a.createElement("div",{className:"class-course"},d.a.createElement("p",{className:"course-items-title"},e.title&&d.a.createElement("img",{src:a(1152),alt:""}),e.title),1===e.type&&d.a.createElement(N,{data:e.data,toDetail:e.toDetail}),2===e.type&&d.a.createElement(w,{data:e.data}))}t.default=Object(p.b)(b)},1171:function(e,t,a){"use strict";a.r(t);a(43);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(776),a(20)),h=a(777),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),{href:"/classify"})},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)},1172:function(e,t,a){"use strict";a.r(t);a(43);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(776),a(777)),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},776:function(e,t,a){},777: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.ba29a5fa.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1151:function(e,t,a){},1152: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="},1170:function(e,t,a){"use strict";a.r(t);a(43);var n,s=a(14),i=a.n(s),c=a(7),r=a(8),o=a(11),l=a(9),m=a(10),u=a(0),d=a.n(u),p=a(71),h=(a(1151),a(4)),f=a(18),E=a(30),v=a(64),g=a(20),x=a(45),b=Object(g.b)()(n=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(o.a)(this,Object(l.a)(t).call(this,e))).toCourseDetail=function(e){var t=a.props,n=t.dispatch,s=t.history;n(Object(x.d)(e,function(){return s.push("/detail?id=".concat(e)),!1}))},a.state={camp:[],employment:[],basics:[],advanced:[],special:[],isLoading:!0},a}return Object(m.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this;h.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]||[]})):i.a.info(t.data.msg,2)})}},{key:"render",value:function(){var e=this;return d.a.createElement("div",{className:"class-box"},d.a.createElement(E.e,{title:"\u5206\u7c7b",arrow:!1,cart:!1}),d.a.createElement(v.a,{isLoading:this.state.isLoading},d.a.createElement(_,{toDetail:this.toCourseDetail,data:this.state.camp.list,title:this.state.camp.name,type:1}),d.a.createElement(_,{toDetail:this.toCourseDetail,data:this.state.employment.list,title:this.state.employment.name,type:1}),d.a.createElement(_,{toDetail:this.toCourseDetail,data:this.state.basics.list,title:this.state.basics.name,type:2}),d.a.createElement(_,{toDetail:this.toCourseDetail,data:this.state.advanced.list,title:this.state.advanced.name,type:2}),d.a.createElement("div",{className:"vip"},this.state.special.list&&this.state.special.list.length>0&&this.state.special.list.map(function(t,a){return d.a.createElement("a",{href:"javascript:;",onClick:function(){return e.toCourseDetail(t.course_id)},key:a},d.a.createElement("img",{src:t.course_img,alt:""}))}))))}}]),t}(u.Component))||n;function N(e){var t=e.data,a=e.toDetail;return d.a.createElement("div",{className:"items-box"},t&&t.length>0&&t.map(function(e,t){return d.a.createElement("a",{href:"javascript:;",onClick:function(){return a(e.course_id)},key:t,className:"item-banner"},d.a.createElement("img",{src:e.course_img,alt:""}),e.is_aist&&d.a.createElement("span",{className:"return_cash"}))}))}function w(e){return d.a.createElement("div",{className:"items-box"},e.data&&e.data.length>0&&e.data.map(function(e,t){return d.a.createElement(f.b,{to:"/courselist?id=".concat(e.c_id,"&name=").concat(e.c_name),key:t,className:"item-label"},e.c_name)}))}function _(e){return d.a.createElement("div",{className:"class-course"},d.a.createElement("p",{className:"course-items-title"},e.title&&d.a.createElement("img",{src:a(1152),alt:""}),e.title),1===e.type&&d.a.createElement(N,{data:e.data,toDetail:e.toDetail}),2===e.type&&d.a.createElement(w,{data:e.data}))}t.default=Object(p.b)(b)},1171:function(e,t,a){"use strict";a.r(t);a(43);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(776),a(20)),h=a(777),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),{href:"/classify"})},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)},1172:function(e,t,a){"use strict";a.r(t);a(43);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(776),a(777)),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},776:function(e,t,a){},777: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.1b759ace.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","connect","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","toCourseDetail","id","_this$props","dispatch","history","getCourses","push","concat","state","camp","employment","basics","advanced","special","isLoading","_this2","http","get","API","home","then","res","data","code","setState","common","length","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","_this3","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_12__","title","arrow","cart","_common_Loading__WEBPACK_IMPORTED_MODULE_13__","ClassCourseBox","toDetail","list","name","type","map","item","index","href","onClick","course_id","key","src","course_img","alt","Component","ClassCourseA","_ref","is_aist","ClassCourseB","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","c_id","c_name","require","WithTab","CampTest","close","showCard","body","document","getElementsByTagName","style","position","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","obj","setInterval","_this$state","_common_common__WEBPACK_IMPORTED_MODULE_11__","showCardEve","includes","CampResolve","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,shCCYMC,EADLC,4BAEG,SAAAD,EAAYE,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAN,IACfG,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAJ,GAAAS,KAAAH,KAAMJ,KAwCVQ,eAAiB,SAACC,GAAO,IAAAC,EACST,EAAKD,MAA3BW,EADaD,EACbC,SAAUC,EADGF,EACHE,QAClBD,EAASE,YAAWJ,EAAI,WAEpB,OADAG,EAAQE,KAAR,cAAAC,OAA2BN,KACpB,MA3CXR,EAAKe,MAAQ,CACTC,KAAM,GACNC,WAAY,GACZC,OAAQ,GACRC,SAAU,GACVC,QAAS,GACTC,WAAW,GARArB,mFAYC,IAAAsB,EAAAnB,KAEhBoB,IAAKC,IAAL,GAAAV,OAAYW,IAAIC,KAAhB,uBAAAZ,OADW,IACwCa,KAAK,SAACC,GAC/B,MAAlBA,EAAIC,KAAKC,MACTR,EAAKS,SAAS,CACVV,WAAW,IAGXO,EAAIC,KAAKA,KAAKG,OAAOC,OAAS,GAC9B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Ghec7ShV3wNk/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'\nimport {connect} from 'react-redux';\nimport {getCourses} from './../detail/actions';\n\n@connect()\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`);\n return false;\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 toDetail={this.toCourseDetail} data={this.state.camp.list} title={this.state.camp.name} type={1}/>\n <ClassCourseBox toDetail={this.toCourseDetail} data={this.state.employment.list} title={this.state.employment.name} type={1}/>\n <ClassCourseBox toDetail={this.toCourseDetail} data={this.state.basics.list} title={this.state.basics.name} type={2}/>\n <ClassCourseBox toDetail={this.toCourseDetail} 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 <a href=\"javascript:;\" onClick={() => this.toCourseDetail(item.course_id)} key={index}>\n {/* <Link key={index} to={`/detail?id=${item.course_id}`}> */}\n <img src={item.course_img} alt=\"\"/>\n {/* </Link> */}\n </a>\n )\n })\n }\n </div>\n </Loading>\n </div>\n )\n }\n}\n\n// 课程图片形式展示 点击图片直接跳转课程详情页面\nfunction ClassCourseA({data, toDetail}) {\n return (\n <div className='items-box'>\n {\n data && data.length > 0 && data.map((item, index) => {\n return (\n <a href=\"javascript:;\" onClick={() => toDetail(item.course_id)} key={index} className='item-banner'>\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 </a>\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 {\n props.title &&\n <img src={require('./image/tips.png')} alt=\"\"/>\n }\n {props.title}\n </p>\n {props.type === 1 &&\n <ClassCourseA data={props.data} toDetail={props.toDetail} />\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}`,{href: '/classify'})\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","connect","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","toCourseDetail","id","_this$props","dispatch","history","getCourses","push","concat","state","camp","employment","basics","advanced","special","isLoading","_this2","http","get","API","home","then","res","data","code","setState","common","length","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","_this3","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_12__","title","arrow","cart","_common_Loading__WEBPACK_IMPORTED_MODULE_13__","ClassCourseBox","toDetail","list","name","type","map","item","index","href","onClick","course_id","key","src","course_img","alt","Component","ClassCourseA","_ref","is_aist","ClassCourseB","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","c_id","c_name","require","WithTab","CampTest","close","showCard","body","document","getElementsByTagName","style","position","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","obj","setInterval","_this$state","_common_common__WEBPACK_IMPORTED_MODULE_11__","showCardEve","includes","CampResolve","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,shCCYMC,EADLC,4BAEG,SAAAD,EAAYE,GAAO,IAAAC,EA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8Jh1+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'\nimport {connect} from 'react-redux';\nimport {getCourses} from './../detail/actions';\n\n@connect()\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`);\n return false;\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 toDetail={this.toCourseDetail} data={this.state.camp.list} title={this.state.camp.name} type={1}/>\n <ClassCourseBox toDetail={this.toCourseDetail} data={this.state.employment.list} title={this.state.employment.name} type={1}/>\n <ClassCourseBox toDetail={this.toCourseDetail} data={this.state.basics.list} title={this.state.basics.name} type={2}/>\n <ClassCourseBox toDetail={this.toCourseDetail} 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 <a href=\"javascript:;\" onClick={() => this.toCourseDetail(item.course_id)} key={index}>\n {/* <Link key={index} to={`/detail?id=${item.course_id}`}> */}\n <img src={item.course_img} alt=\"\"/>\n {/* </Link> */}\n </a>\n )\n })\n }\n </div>\n </Loading>\n </div>\n )\n }\n}\n\n// 课程图片形式展示 点击图片直接跳转课程详情页面\nfunction ClassCourseA({data, toDetail}) {\n return (\n <div className='items-box'>\n {\n data && data.length > 0 && data.map((item, index) => {\n return (\n <a href=\"javascript:;\" onClick={() => toDetail(item.course_id)} key={index} className='item-banner'>\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 </a>\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 {\n props.title &&\n <img src={require('./image/tips.png')} alt=\"\"/>\n }\n {props.title}\n </p>\n {props.type === 1 &&\n <ClassCourseA data={props.data} toDetail={props.toDetail} />\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}`,{href: '/classify'})\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],{1150:function(e,t,a){},1168:function(e,t,a){"use strict";a.r(t);a(258);var n,i=a(160),c=a.n(i),s=(a(154),a(35)),o=a.n(s),l=(a(43),a(14)),r=a.n(l),u=a(7),d=a(8),f=a(11),h=a(9),m=a(10),p=a(157),v=a(0),b=a.n(v),g=a(30),C=(a(1150),a(706)),y=a(4),E=a(64),w=a(20),_=a(45),N=Object(w.b)()(n=function(e){function t(e){var a;return Object(u.a)(this,t),(a=Object(f.a)(this,Object(h.a)(t).call(this,e))).getTabs=function(){y.c.get("".concat(API.home,"/m/course/classify/").concat(0)).then(function(e){var t=Object(p.a)(Object(p.a)(a));if(200===e.data.code){if(e.data.data.common.length>0){var n=[{basics:[]},{advanced:[]}],i=[];["basics","advanced"].forEach(function(t,a){n[t]=e.data.data.common[a],e.data.data.common[a].list.forEach(function(e,t){i.push({title:e.c_name,id:e.c_id})})}),t.setState({arr:n,allClass:i})}}else r.a.info(e.data.msg,2)}).catch(function(e){console.log(e)})},a.getList=function(){var e=Object(p.a)(Object(p.a)(a));y.c.get("".concat(API.home,"/m/course/list/").concat(Object(y.b)("id"))).then(function(t){200===t.data.code&&e.setState({data:t.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.toCourseDetail=function(e){var t=a.props,n=t.dispatch,i=t.history;n(Object(_.d)(e,function(){i.push("/detail?id=".concat(e))}))},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(d.a)(t,[{key:"componentDidMount",value:function(){this.getTabs(),this.getList()}},{key:"render",value:function(){var e=this,t=b.a.createElement("i",{className:"iconfont iconiconfront-69 pull-down"}),a=b.a.createElement("i",{className:"iconfont iconiconfront-71 pull-down"}),n=this.state.allClass.findIndex(function(t){return t.title===e.state.activeTab});return b.a.createElement("div",{className:"class-child"},b.a.createElement(C.a,null),b.a.createElement(E.a,{isLoading:this.state.isLoading},b.a.createElement("div",{className:"class-content"},b.a.createElement(o.a,null),b.a.createElement("div",{onClick:this.pulldown.bind(this)},this.state.ispull?a:t),b.a.createElement(c.a,{tabs:this.state.allClass,animated:!1,page:n,onChange:function(t){return e.ontabclick(t)}},b.a.createElement("div",{className:"tabs"},b.a.createElement("ul",null,this.state.data&&this.state.data.length>0&&this.state.data.map(function(t,a){var n=b.a.createElement("div",{className:"info"},b.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),b.a.createElement("p",{className:"contact text-overflow-2"},t.desc),b.a.createElement("div",{className:"des"},!t.is_buy&&b.a.createElement("p",{className:"course-price"},b.a.createElement("span",{className:"new"},"\xa5",t.price1),b.a.createElement("span",{className:"old"},"\xa5",t.price0)),t.is_buy&&b.a.createElement("span",{className:"isbuy"},"\u5df2\u8d2d\u4e70"))),i=b.a.createElement("div",null,0===t.bargain_num&&0!==t.groupon_num&&b.a.createElement("p",{className:"course-status"},"\u62fc\u56e2\u51cf",t.groupon_num,"\u5143"),0!==t.bargain_num&&0===t.groupon_num&&b.a.createElement("p",{className:"course-status"},"\u780d\u4ef7\u51cf",t.bargain_num,"\u5143"),t.is_aist&&b.a.createElement("span",{className:"return_cash"}));return b.a.createElement(g.i,{key:a,status:i,img:t.image_name,id:t.course_id,info:n,toDetail:e.toCourseDetail})})))),b.a.createElement(o.a,null)),b.a.createElement("div",{className:"mbc-box",style:{display:this.state.display}},this.state.arr.basics&&b.a.createElement("div",{className:"tabcontent"},b.a.createElement(O,{activeTab:this.state.activeTab,data:this.state.arr.basics.list,title:this.state.arr.basics.name,labelclick:this.labelclick}),b.a.createElement(O,{activeTab:this.state.activeTab,data:this.state.arr.advanced.list,title:this.state.arr.advanced.name,labelclick:this.labelclick})))))}}]),t}(v.Component))||n;function O(e){return b.a.createElement("div",{className:"class-course"},b.a.createElement("p",{className:"course-items-title"},e.title),b.a.createElement("div",{className:"items-box"},e.data&&e.data.length>0&&e.data.map(function(t,a){return b.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=N},583: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},588: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}},606:function(e,t,a){"use strict";a(48),a(607)},607:function(e,t,a){},608:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=b(a(3)),i=b(a(34)),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(153)),h=b(a(583)),m=a(588),p=a(609);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(610)}).cancelText,C=this.state,y=C.value,E=C.focus,w=(0,r.default)(s,p,(0,i.default)({},s+"-start",!!(E||y&&y.length>0))),_=(0,r.default)(s+"-clear",(0,i.default)({},s+"-clear-show",!!(E&&y&&y.length>0))),N=(0,r.default)(s+"-cancel",(e={},(0,i.default)(e,s+"-cancel-show",!!(o||E||y&&y.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&&!y?"visible":"hidden"}},d))),u.createElement("input",(0,n.default)({type:"search",className:s+"-value",value:y,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},609: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}},610:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},706:function(e,t,a){"use strict";a(606);var n=a(608),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(707),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},707:function(e,t,a){}}]);
//# sourceMappingURL=CourseList.8c2b7670.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=CourseList.a81c12f2.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","connect","props","_this2","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_9__","call","getTabs","http","get","concat","API","home","then","res","_this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_11__","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","toCourseDetail","_this2$props","dispatch","getCourses","state","_this3","bottom","react__WEBPACK_IMPORTED_MODULE_12___default","createElement","className","top","page","findIndex","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_15__","_common_Loading__WEBPACK_IMPORTED_MODULE_17__","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","course_id","course_title","desc","is_buy","price1","price0","bargain_num","groupon_num","is_aist","_common__WEBPACK_IMPORTED_MODULE_13__","key","img","image_name","toDetail","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":"mUAaMA,EADLC,4BAEG,SAAAD,EAAYE,G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AAA,OAAKC,UAAU,cACX2J,EAAAxL,EAAA4B,cAAA,KAAGC,UAAW,mCAAoCO,QAASvE,KAAK4N,OAAOpJ,KAAKxE,QAC5E2N,EAAAxL,EAAA4B,cAAA8J,EAAA1L,EAAA,CACIkK,YAAY,2BACZE,WAAY,IACZhD,QAASvJ,KAAK8N,SAAStJ,KAAKxE,MAC5B0L,kBAAkB,IAEtBiC,EAAAxL,EAAA4B,cAAA,KAAGC,UAAW,+CAAgDO,QAASvE,KAAKuN,kBAzBxEvH,cAiCTsH","file":"static/js/CourseList.8c2b7670.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, getParam} from \"@/utils\"\nimport {Toast} from 'antd-mobile'\nimport {Link} from 'react-router-dom'\nimport Loading from '@/common/Loading'\nimport {connect} from 'react-redux';\nimport {getCourses} from './../detail/actions';\n\n@connect()\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 const _this = this\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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' onClick={() => this.toCourseDetail(item.course_id)}>\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\n key={index}\n status={status}\n img={item.image_name}\n id={item.course_id}\n info={Info}\n toDetail={this.toCourseDetail}\n />\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","connect","props","_this2","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_9__","call","getTabs","http","get","concat","API","home","then","res","_this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_11__","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","toCourseDetail","_this2$props","dispatch","getCourses","state","_this3","bottom","react__WEBPACK_IMPORTED_MODULE_12___default","createElement","className","top","page","findIndex","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_15__","_common_Loading__WEBPACK_IMPORTED_MODULE_17__","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","course_id","course_title","desc","is_buy","price1","price0","bargain_num","groupon_num","is_aist","_common__WEBPACK_IMPORTED_MODULE_13__","key","img","image_name","toDetail","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":"mUAaMA,EADLC,4BAEG,SAAAD,EAAYE,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAN,IACfG,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAJ,GAAAS,KAAAH,KAAMJ,KAmBVQ,QAAU,WAENC,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,uBAAAF,OADW,IAENG,KAAK,SAACC,GACH,IAAMC,EAAKd,OAAAe,EAAA,EAAAf,QAAAe,EAAA,EAAAf,CAAAD,IACX,GAAsB,MAAlBc,EAAIG,KAAKC,MACT,GAAIJ,EAAIG,KAAKA,KAAKE,OAAOC,OAAS,EAAG,CACjC,IACIC,EAAO,CAAC,CAACC,OAAQ,IAAK,CAACC,SAAU,KACjCC,EAAO,GAFD,CAAC,SAAU,YAGjBC,QAAQ,SAAUC,EAAMC,GACxBN,EAAKK,GAAQZ,EAAIG,KAAKA,KAAKE,OAAOQ,GAClCb,EAAIG,KAAKA,KAAKE,OAAOQ,GAAOC,KAAKH,QAAQ,SAAUC,EAAMC,GACrDH,EAAKK,KAAK,CAACC,MAASJ,EAAKK,OAAQC,GAAMN,EAAKO,WAGpDlB,EAAMmB,SAAS,CACXC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A,0CC5WA,SAAAkH,KAJAvN,OAAAoG,eAAAC,EAAA,cACAC,OAAA,IAKAD,EAAA+G,aAAA,CACA/B,UAAA,YACAkB,YAAA,GACApD,SAAAoE,EACAzI,SAAAyI,EACA9D,QAAA8D,EACA5D,OAAA4D,EACAjD,QAAAiD,EACA3B,kBAAA,EACAU,UAAA,qCCfAtM,OAAAoG,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,EAAAxL,EAAA4B,cAAA,OAAKC,UAAU,gBACX2J,EAAAxL,EAAA4B,cAAA,OAAKC,UAAU,cACX2J,EAAAxL,EAAA4B,cAAA,KAAGC,UAAW,mCAAoCO,QAASvE,KAAK4N,OAAOpJ,KAAKxE,QAC5E2N,EAAAxL,EAAA4B,cAAA8J,EAAA1L,EAAA,CACIkK,YAAY,2BACZE,WAAY,IACZhD,QAASvJ,KAAK8N,SAAStJ,KAAKxE,MAC5B0L,kBAAkB,IAEtBiC,EAAAxL,EAAA4B,cAAA,KAAGC,UAAW,+CAAgDO,QAASvE,KAAKuN,kBAzBxEvH,cAiCTsH","file":"static/js/CourseList.a81c12f2.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, getParam} from \"@/utils\"\nimport {Toast} from 'antd-mobile'\nimport {Link} from 'react-router-dom'\nimport Loading from '@/common/Loading'\nimport {connect} from 'react-redux';\nimport {getCourses} from './../detail/actions';\n\n@connect()\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 const _this = this\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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' onClick={() => this.toCourseDetail(item.course_id)}>\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\n key={index}\n status={status}\n img={item.image_name}\n id={item.course_id}\n info={Info}\n toDetail={this.toCourseDetail}\n />\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([[6],{1149:function(e,t,a){},1167:function(e,t,a){"use strict";a.r(t);a(155);var o,c=a(75),r=a.n(c),n=a(23),s=(a(43),a(14)),i=a.n(s),l=a(7),p=a(8),d=a(11),m=a(9),u=a(10),f=(a(89),a(25)),h=a.n(f),b=(a(115),a(46)),g=a.n(b),E=a(0),y=a.n(E),v=a(30),x=a(19),N=a(4),O=a(38),j=a(20),S=a(45),w=(a(1149),g.a.Item);function F(e){console.log(e);var t=e.list;return y.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,p=t.coupon_desc,d=y.a.createElement("span",{className:"order-newprice"},"\xa5",r);e.locationState&&e.locationState.group&&(d=y.a.createElement("span",{className:"order-newprice"},"\xa5",e.groupPrice));var m=y.a.createElement("div",{className:"order-info"},y.a.createElement("p",{className:"order-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},onClick:function(){return e.toDetail(o)}},i),y.a.createElement("p",{className:"order-content",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:"2",wordBreak:"break-all",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box"}},s),y.a.createElement("p",{className:"order-des"},d,y.a.createElement("span",{className:"order-price"},"\xa5",n)));return y.a.createElement(v.g,Object.assign({},t,{src:c,id:o,key:a,info:m,isaist:e.isaist,toDetail:e.toDetail}),e.locationState&&(e.locationState.type||e.locationState.simple)?y.a.createElement("div",{className:"order-prefer"},y.a.createElement(g.a,{key:a},y.a.createElement(w,{arrow:"horizontal",onClick:function(){}},y.a.createElement(x.b,{to:{pathname:"/coupons",search:"?id=".concat(o),state:{from:"/order"}}},y.a.createElement(h.a,{justify:"between"},y.a.createElement("span",{style:{color:"#333",fontSize:"15px"}},"\u4f18\u60e0\u5238"),y.a.createElement("span",{style:{fontSize:"14px",color:"#999999"}},p||(0===l?"\u65e0":"".concat(l,"\u5f20\u53ef\u7528")))))))):null)}))}var k=Object(j.b)()(o=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(d.a)(this,Object(m.a)(t).call(this,e))).submitOrder=function(){a.state.total;if(0!==a.state.orderList.length)if(a.state.perfect||i.a.info("\u8bf7\u5b8c\u5584\u62a5\u540d\u4fe1\u606f\uff01"),a.props.location.state&&1===a.props.location.state.group)N.c.post("".concat(API["base-api"],"/pdd/m"),{course_id:Object(N.b)("id"),ischeck:a.state.useBalance}).then(function(e){console.log(e),200===e.data.errno?(sessionStorage.removeItem("orderUseCacheObj"),1!==e.data.data.pay_jump?a.props.history.replace("/payorder?oid=".concat(e.data.data.oid)):a.props.history.push("/togroup?id=".concat(e.data.data.oid))):i.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"),N.c.get(e).then(function(e){0===e.data.errno?(sessionStorage.removeItem("orderUseCacheObj"),1!==e.data.data.is_free?a.props.history.replace("/payorder?oid=".concat(e.data.data.order_id)):a.props.history.replace("/purchased")):i.a.info(e.data.msg,2)})}else i.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(n.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.course,o=e.total,c=e.user_account,r=e.user_info,n=e.discount;a.props.location.state&&1===a.props.location.state.group&&(console.log(a.state),o=a.state.groupPrice),a.cacheObj={perfect:r,orderList:t,user_account:c,total:o,discount:n},a.setState({perfect:r,orderList:t,user_account:c,total:o,discount:n})},a.publicLocalStorage=function(){"PUSH"===a.props.history.action?sessionStorage.removeItem("orderUseCacheObj"):null!==sessionStorage.getItem("orderUseCacheObj")&&(a.setState({useBalance:!0}),a.computedMoneyByCache())},a.toCourseDetail=function(e){var t=a.props,o=t.dispatch,c=t.history;o(Object(S.d)(e,function(){c.push("/detail?id=".concat(e))}))},a.state={groupPrice:"",perfect:a.props.location.state,user_account:0,total:0,discount:0,useBalance:!1,orderList:[],info:!1,offset:0},a}return Object(u.a)(t,e),Object(p.a)(t,[{key:"componentDidMount",value:function(){var e=this;console.log(this.props.location.state),console.log(0),this.props.location.state&&1===this.props.location.state.type?N.c.get("".concat(API["base-api"],"/m/order/preorder?type=1")).then(function(t){200===t.data.errno?(e.publicGetData(t.data.data),e.publicLocalStorage()):i.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?(console.log(2),Promise.all([N.c.get("".concat(API.home,"/m/course/detail/").concat(Object(N.b)("id"))),N.c.get("".concat(API["base-api"],"/m/order/preorder"))]).then(function(t){var a=t[0],o=t[1];console.log(a.data),console.log(o.data);var c={};200===o.data.errno?(c=Object.assign({},o.data.data,{course:[]}),200===a.data.code?(c.course.push(a.data.data.course_info),e.setState({groupPrice:a.data.data.course_info.pdd_group_info.price}),e.publicGetData(c),e.publicLocalStorage()):i.a.info(a.data.msg,2)):i.a.info(o.data.msg,2)})):N.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.data.data),e.publicLocalStorage()):i.a.info(t.data.msg,2)}):(console.log(1),N.c.get("".concat(API["base-api"],"/m/order/preorder")).then(function(t){200===t.data.errno?(e.publicGetData(t.data.data),e.publicLocalStorage()):i.a.info(t.data.msg,2)}))}},{key:"render",value:function(){var e=this.state,t=e.perfect,a=e.orderList,o=e.user_account,c=e.total,s=e.discount,i=e.useBalance,l=e.info,p=e.offset,d=e.groupPrice;return y.a.createElement("div",{className:"order-wrapper"},y.a.createElement(h.a,null,y.a.createElement(h.a.Item,null,y.a.createElement(v.e,{title:"\u8bfe\u7a0b\u62a5\u540d",arrow:!0}),!this.state.perfect&&y.a.createElement(x.b,{to:{pathname:"/orderinfo",state:{type:this.props.location.state?this.props.location.state.type:null,id:Object(N.b)("id")}},className:"order-information"},y.a.createElement("i",{className:"iconfont iconiconfront-6 order-addsize"}),y.a.createElement("div",{className:"order-infotext"},"\u5b8c\u5584\u62a5\u540d\u4fe1\u606f"),y.a.createElement("i",{className:"iconfont iconiconfront-70 order-next"})),this.state.perfect&&y.a.createElement("div",{className:"order-information2"},y.a.createElement(r.a,null,y.a.createElement(x.b,{to:{pathname:"/orderinfo",state:Object(n.a)({},this.state.perfect,this.props.location.state,{id:Object(N.b)("id")})}},y.a.createElement(h.a,{align:"center",justify:"between",style:{height:"80px"}},y.a.createElement("i",{className:"iconfont iconiconfront-20 user-icon"}),y.a.createElement(h.a,{direction:"column",justify:"between",align:"start",className:"order-cell"},y.a.createElement("div",{className:"name"},"\u59d3\u540d\uff1a".concat(t.real_name)),y.a.createElement("div",null,"\u7535\u8bdd\uff1a".concat(t.cellphone))),y.a.createElement(h.a,{align:"start",className:"order-cell"},y.a.createElement("div",null,"QQ\uff1a".concat(t.qq))))))),y.a.createElement("div",{className:"order-list"},y.a.createElement(F,{list:a,compute:this.computedMoney,courseId:Object(N.b)("id"),locationState:this.props.location.state,groupPrice:d,toDetail:this.toCourseDetail})),y.a.createElement("div",{className:"order-balance"},y.a.createElement(g.a,null,y.a.createElement(w,{className:"order-prefer-text"},y.a.createElement(h.a,{justify:"between"},y.a.createElement(h.a,{align:"center"},y.a.createElement("span",null,"\u4f59\u989d\u62b5\u6263"),y.a.createElement("span",{className:"order-balanceprice"}," (\u4f59\u989d: ",y.a.createElement("i",{className:"order-money"},"".concat(o,"\u5143")),")"),y.a.createElement("i",{className:"iconfont iconiconfront-22 question-mark",onClick:this.showInfo})),y.a.createElement(h.a,null,i?y.a.createElement(y.a.Fragment,null,y.a.createElement("span",{style:{color:"#FF2121",fontSize:"15px",marginRight:"6px"}},"-\xa5".concat(p)),y.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 balance-used",onClick:Object(O.throttle)(this.useBalance,600)})):y.a.createElement("i",{className:"circle-icon",onClick:Object(O.throttle)(this.useBalance,600)})))))),y.a.createElement("div",{className:"order-bar"},y.a.createElement("div",{className:"order-course"},y.a.createElement("span",{className:"order-course-text"},"".concat(a.length,"\u95e8\u8bfe\u7a0b"))),y.a.createElement("div",{className:"order-bar-text"},y.a.createElement("div",{className:"order-amount"},y.a.createElement("span",{className:"order-amount-title"},"\u5408\u8ba1:"),y.a.createElement("span",{className:"order-amount-price"},"\uffe5".concat(c))),y.a.createElement("div",{className:"order-preprice"},y.a.createElement("span",{className:"order-preprice-title"},"\u5df2\u4f18\u60e0:"),y.a.createElement("span",{className:"order-preprice-price"},"\xa5".concat(s)))),t?y.a.createElement("button",{type:"button",className:"order-button has-info"},y.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355")):y.a.createElement("button",{type:"button",className:"order-button"},y.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355"))))),l?y.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",zIndex:"99"}},y.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%)"}},y.a.createElement(h.a,{direction:"column",justify:"between",align:"center",style:{height:"100%"}},y.a.createElement("p",{style:{fontSize:"16px",color:"#333333"}},"\u4f59\u989d\u62b5\u6263\u8bf4\u660e"),y.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"),y.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}(E.Component))||o;t.default=k}}]);
//# sourceMappingURL=Order.13dc8973.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{1149:function(e,t,a){},1167:function(e,t,a){"use strict";a.r(t);a(155);var o,c=a(75),r=a.n(c),n=a(23),s=(a(43),a(14)),i=a.n(s),l=a(7),p=a(8),d=a(11),m=a(9),u=a(10),f=(a(89),a(25)),h=a.n(f),b=(a(115),a(46)),g=a.n(b),E=a(0),y=a.n(E),v=a(30),x=a(18),N=a(4),O=a(38),j=a(20),S=a(45),w=(a(1149),g.a.Item);function F(e){console.log(e);var t=e.list;return y.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,p=t.coupon_desc,d=y.a.createElement("span",{className:"order-newprice"},"\xa5",r);e.locationState&&e.locationState.group&&(d=y.a.createElement("span",{className:"order-newprice"},"\xa5",e.groupPrice));var m=y.a.createElement("div",{className:"order-info"},y.a.createElement("p",{className:"order-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},onClick:function(){return e.toDetail(o)}},i),y.a.createElement("p",{className:"order-content",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:"2",wordBreak:"break-all",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box"}},s),y.a.createElement("p",{className:"order-des"},d,y.a.createElement("span",{className:"order-price"},"\xa5",n)));return y.a.createElement(v.g,Object.assign({},t,{src:c,id:o,key:a,info:m,isaist:e.isaist,toDetail:e.toDetail}),e.locationState&&(e.locationState.type||e.locationState.simple)?y.a.createElement("div",{className:"order-prefer"},y.a.createElement(g.a,{key:a},y.a.createElement(w,{arrow:"horizontal",onClick:function(){}},y.a.createElement(x.b,{to:{pathname:"/coupons",search:"?id=".concat(o),state:{from:"/order"}}},y.a.createElement(h.a,{justify:"between"},y.a.createElement("span",{style:{color:"#333",fontSize:"15px"}},"\u4f18\u60e0\u5238"),y.a.createElement("span",{style:{fontSize:"14px",color:"#999999"}},p||(0===l?"\u65e0":"".concat(l,"\u5f20\u53ef\u7528")))))))):null)}))}var k=Object(j.b)()(o=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(d.a)(this,Object(m.a)(t).call(this,e))).submitOrder=function(){a.state.total;if(0!==a.state.orderList.length)if(a.state.perfect||i.a.info("\u8bf7\u5b8c\u5584\u62a5\u540d\u4fe1\u606f\uff01"),a.props.location.state&&1===a.props.location.state.group)N.c.post("".concat(API["base-api"],"/pdd/m"),{course_id:Object(N.b)("id"),ischeck:a.state.useBalance}).then(function(e){console.log(e),200===e.data.errno?(sessionStorage.removeItem("orderUseCacheObj"),1!==e.data.data.pay_jump?a.props.history.replace("/payorder?oid=".concat(e.data.data.oid)):a.props.history.push("/togroup?id=".concat(e.data.data.oid))):i.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"),N.c.get(e).then(function(e){0===e.data.errno?(sessionStorage.removeItem("orderUseCacheObj"),1!==e.data.data.is_free?a.props.history.replace("/payorder?oid=".concat(e.data.data.order_id)):a.props.history.replace("/purchased")):i.a.info(e.data.msg,2)})}else i.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(n.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.course,o=e.total,c=e.user_account,r=e.user_info,n=e.discount;a.props.location.state&&1===a.props.location.state.group&&(console.log(a.state),o=a.state.groupPrice),a.cacheObj={perfect:r,orderList:t,user_account:c,total:o,discount:n},a.setState({perfect:r,orderList:t,user_account:c,total:o,discount:n})},a.publicLocalStorage=function(){"PUSH"===a.props.history.action?sessionStorage.removeItem("orderUseCacheObj"):null!==sessionStorage.getItem("orderUseCacheObj")&&(a.setState({useBalance:!0}),a.computedMoneyByCache())},a.toCourseDetail=function(e){var t=a.props,o=t.dispatch,c=t.history;o(Object(S.d)(e,function(){c.push("/detail?id=".concat(e))}))},a.state={groupPrice:"",perfect:a.props.location.state,user_account:0,total:0,discount:0,useBalance:!1,orderList:[],info:!1,offset:0},a}return Object(u.a)(t,e),Object(p.a)(t,[{key:"componentDidMount",value:function(){var e=this;console.log(this.props.location.state),console.log(0),this.props.location.state&&1===this.props.location.state.type?N.c.get("".concat(API["base-api"],"/m/order/preorder?type=1")).then(function(t){200===t.data.errno?(e.publicGetData(t.data.data),e.publicLocalStorage()):i.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?(console.log(2),Promise.all([N.c.get("".concat(API.home,"/m/course/detail/").concat(Object(N.b)("id"))),N.c.get("".concat(API["base-api"],"/m/order/preorder"))]).then(function(t){var a=t[0],o=t[1];console.log(a.data),console.log(o.data);var c={};200===o.data.errno?(c=Object.assign({},o.data.data,{course:[]}),200===a.data.code?(c.course.push(a.data.data.course_info),e.setState({groupPrice:a.data.data.course_info.pdd_group_info.price}),e.publicGetData(c),e.publicLocalStorage()):i.a.info(a.data.msg,2)):i.a.info(o.data.msg,2)})):N.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.data.data),e.publicLocalStorage()):i.a.info(t.data.msg,2)}):(console.log(1),N.c.get("".concat(API["base-api"],"/m/order/preorder")).then(function(t){200===t.data.errno?(e.publicGetData(t.data.data),e.publicLocalStorage()):i.a.info(t.data.msg,2)}))}},{key:"render",value:function(){var e=this.state,t=e.perfect,a=e.orderList,o=e.user_account,c=e.total,s=e.discount,i=e.useBalance,l=e.info,p=e.offset,d=e.groupPrice;return y.a.createElement("div",{className:"order-wrapper"},y.a.createElement(h.a,null,y.a.createElement(h.a.Item,null,y.a.createElement(v.e,{title:"\u8bfe\u7a0b\u62a5\u540d",arrow:!0}),!this.state.perfect&&y.a.createElement(x.b,{to:{pathname:"/orderinfo",state:{type:this.props.location.state?this.props.location.state.type:null,id:Object(N.b)("id")}},className:"order-information"},y.a.createElement("i",{className:"iconfont iconiconfront-6 order-addsize"}),y.a.createElement("div",{className:"order-infotext"},"\u5b8c\u5584\u62a5\u540d\u4fe1\u606f"),y.a.createElement("i",{className:"iconfont iconiconfront-70 order-next"})),this.state.perfect&&y.a.createElement("div",{className:"order-information2"},y.a.createElement(r.a,null,y.a.createElement(x.b,{to:{pathname:"/orderinfo",state:Object(n.a)({},this.state.perfect,this.props.location.state,{id:Object(N.b)("id")})}},y.a.createElement(h.a,{align:"center",justify:"between",style:{height:"80px"}},y.a.createElement("i",{className:"iconfont iconiconfront-20 user-icon"}),y.a.createElement(h.a,{direction:"column",justify:"between",align:"start",className:"order-cell"},y.a.createElement("div",{className:"name"},"\u59d3\u540d\uff1a".concat(t.real_name)),y.a.createElement("div",null,"\u7535\u8bdd\uff1a".concat(t.cellphone))),y.a.createElement(h.a,{align:"start",className:"order-cell"},y.a.createElement("div",null,"QQ\uff1a".concat(t.qq))))))),y.a.createElement("div",{className:"order-list"},y.a.createElement(F,{list:a,compute:this.computedMoney,courseId:Object(N.b)("id"),locationState:this.props.location.state,groupPrice:d,toDetail:this.toCourseDetail})),y.a.createElement("div",{className:"order-balance"},y.a.createElement(g.a,null,y.a.createElement(w,{className:"order-prefer-text"},y.a.createElement(h.a,{justify:"between"},y.a.createElement(h.a,{align:"center"},y.a.createElement("span",null,"\u4f59\u989d\u62b5\u6263"),y.a.createElement("span",{className:"order-balanceprice"}," (\u4f59\u989d: ",y.a.createElement("i",{className:"order-money"},"".concat(o,"\u5143")),")"),y.a.createElement("i",{className:"iconfont iconiconfront-22 question-mark",onClick:this.showInfo})),y.a.createElement(h.a,null,i?y.a.createElement(y.a.Fragment,null,y.a.createElement("span",{style:{color:"#FF2121",fontSize:"15px",marginRight:"6px"}},"-\xa5".concat(p)),y.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 balance-used",onClick:Object(O.throttle)(this.useBalance,600)})):y.a.createElement("i",{className:"circle-icon",onClick:Object(O.throttle)(this.useBalance,600)})))))),y.a.createElement("div",{className:"order-bar"},y.a.createElement("div",{className:"order-course"},y.a.createElement("span",{className:"order-course-text"},"".concat(a.length,"\u95e8\u8bfe\u7a0b"))),y.a.createElement("div",{className:"order-bar-text"},y.a.createElement("div",{className:"order-amount"},y.a.createElement("span",{className:"order-amount-title"},"\u5408\u8ba1:"),y.a.createElement("span",{className:"order-amount-price"},"\uffe5".concat(c))),y.a.createElement("div",{className:"order-preprice"},y.a.createElement("span",{className:"order-preprice-title"},"\u5df2\u4f18\u60e0:"),y.a.createElement("span",{className:"order-preprice-price"},"\xa5".concat(s)))),t?y.a.createElement("button",{type:"button",className:"order-button has-info"},y.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355")):y.a.createElement("button",{type:"button",className:"order-button"},y.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355"))))),l?y.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",zIndex:"99"}},y.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%)"}},y.a.createElement(h.a,{direction:"column",justify:"between",align:"center",style:{height:"100%"}},y.a.createElement("p",{style:{fontSize:"16px",color:"#333333"}},"\u4f59\u989d\u62b5\u6263\u8bf4\u660e"),y.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"),y.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}(E.Component))||o;t.default=k}}]);
//# sourceMappingURL=Order.c81925c9.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","style","overflow","textOverflow","whiteSpace","onClick","toDetail","WebkitBoxOrient","WebkitLineClamp","wordBreak","display","_common_index__WEBPACK_IMPORTED_MODULE_15__","Object","assign","src","id","key","info","isaist","type","simple","arrow","react_router_dom__WEBPACK_IMPORTED_MODULE_16__","to","pathname","search","concat","state","from","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_11___default","justify","color","fontSize","Order","connect","_this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_5__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8__","call","submitOrder","total","orderList","length","perfect","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_4___default","location","http","post","API","getParam","ischeck","useBalance","then","res","data","errno","sessionStorage","removeItem","pay_jump","history","replace","oid","push","msg","url","get","is_free","order_id","useBalanceFlag","setState","cacheObj","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__","setItem","JSON","stringify","computedMoney","totalSale","parseFloat","userAccount","user_account","discount","offset","toFixed","computedMoneyByCache","showInfo","prevState","publicGetData","course","user_info","publicLocalStorage","action","getItem","toCourseDetail","_this$props","dispatch","getCourses","_this2","bargain","Promise","all","home","resList","courseInfo","orderInfo","newData","code","course_info","pdd_group_info","price","_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":"+UAYMA,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,EA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ASgC,KAAKiD,SAAUrF,MAAO,CAAE+H,MAAO,QAASb,OAAQ,OAAQmB,WAAY,OAAQC,UAAW,SAAUC,aAAc,MAAOC,OAAQ,oBAAqB1G,MAAO,UAAWC,SAAU,SAA7L,yBAIJ,aAtaM0G,iBA+aLzG","file":"static/js/Order.13dc8973.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, 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';\nimport {connect} from 'react-redux';\nimport {getCourses} from './../detail/actions';\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}`}> */}\n <p\n className='order-title' \n style={{ \n overflow: 'hidden', \n textOverflow: 'ellipsis', \n whiteSpace: 'nowrap'\n }}\n onClick={() => props.toDetail(course_id)}\n >\n {course_title}\n </p>\n {/* </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 \n {...item} \n src={image_name} \n id={course_id} \n key={index} \n info={Info} \n isaist={props.isaist}\n toDetail={props.toDetail}\n >\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\n@connect()\nclass Order extends Component {\n constructor(props) {\n super(props);\n this.state = {\n groupPrice: '',\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 const {total} = this.state;\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\"),ischeck:this.state.useBalance}).then(res => {\n console.log(res);\n if(res.data.errno === 200) {\n sessionStorage.removeItem('orderUseCacheObj');\n if (res.data.data.pay_jump === 1) {\n this.props.history.push(`/togroup?id=${res.data.data.oid}`);\n return;\n }\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 if(res.data.errno !== 0) {\n Toast.info(res.data.msg, 2);\n return;\n }\n sessionStorage.removeItem('orderUseCacheObj');\n if (res.data.data.is_free === 1) {\n this.props.history.replace(`/purchased`);\n return;\n }\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;\n if(this.props.location.state && this.props.location.state.group === 1) {\n console.log(this.state);\n total = this.state.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 console.log(0);\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.data.data);\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 console.log(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.data.data);\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 console.log(2);\n // 获取一键开团的课程\n Promise.all([http.get(`${API.home}/m/course/detail/${getParam('id')}`),http.get(`${API['base-api']}/m/order/preorder`)]).then(resList => {\n let courseInfo = resList[0],\n orderInfo = resList[1];\n console.log(courseInfo.data);\n console.log(orderInfo.data);\n let newData = {};\n if(orderInfo.data.errno === 200) {\n newData = Object.assign({}, orderInfo.data.data, {course: []});\n }else{\n Toast.info(orderInfo.data.msg, 2);\n return;\n }\n if(courseInfo.data.code === 200) {\n newData.course.push(courseInfo.data.data.course_info);\n this.setState({\n groupPrice: courseInfo.data.data.course_info.pdd_group_info.price\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(newData);\n this.publicLocalStorage();\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.data.data);\n this.publicLocalStorage();\n })\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\n toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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 groupPrice\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\n list={orderList}\n compute={this.computedMoney}\n courseId={getParam('id')}\n locationState={this.props.location.state}\n groupPrice={groupPrice}\n toDetail={this.toCourseDetail}\n />\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
{"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","style","overflow","textOverflow","whiteSpace","onClick","toDetail","WebkitBoxOrient","WebkitLineClamp","wordBreak","display","_common_index__WEBPACK_IMPORTED_MODULE_15__","Object","assign","src","id","key","info","isaist","type","simple","arrow","react_router_dom__WEBPACK_IMPORTED_MODULE_16__","to","pathname","search","concat","state","from","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_11___default","justify","color","fontSize","Order","connect","_this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_5__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8__","call","submitOrder","total","orderList","length","perfect","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_4___default","location","http","post","API","getParam","ischeck","useBalance","then","res","data","errno","sessionStorage","removeItem","pay_jump","history","replace","oid","push","msg","url","get","is_free","order_id","useBalanceFlag","setState","cacheObj","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__","setItem","JSON","stringify","computedMoney","totalSale","parseFloat","userAccount","user_account","discount","offset","toFixed","computedMoneyByCache","showInfo","prevState","publicGetData","course","user_info","publicLocalStorage","action","getItem","toCourseDetail","_this$props","dispatch","getCourses","_this2","bargain","Promise","all","home","resList","courseInfo","orderInfo","newData","code","course_info","pdd_group_info","price","_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":"+UAYMA,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,cAEXf,EAAAP,EAAAQ,cAAA,KACEc,UAAU,cACVK,MAAO,CACLC,SAAU,SACVC,aAAc,WACdC,WAAY,UAEdC,QAAS,kBAAM7B,EAAM8B,SAASnB,KAE7BK,GAGLX,EAAAP,EAAAQ,cAAA,KAAGc,UAAU,gBAAgBK,MAAO,CAAEM,gBAAiB,WAAYC,gBAAiB,IAAKC,UAAW,YAAaP,SAAU,SAAUC,aAAc,WAAYO,QAAS,gBAAkBnB,GAC1LV,EAAAP,EAAAQ,cAAA,KAAGc,UAAU,aAKVD,EACDd,EAAAP,EAAAQ,cAAA,QAAMc,UAAU,eAAhB,OAAgCN,KAKtC,OACET,EAAAP,EAAAQ,cAAC6B,EAAA,EAADC,OAAAC,OAAA,GACM7B,EADN,CAEE8B,IAAK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,cAAA,OAAKmB,MAAO,CAAE4H,SAAU,QAASC,IAAK,EAAGC,KAAM,EAAGC,MAAO,OAAQb,OAAQ,OAAQc,gBAAiB,qBAAsBC,OAAQ,OAC9HrJ,EAAAP,EAAAQ,cAAA,OAAKmB,MAAO,CAAEkI,QAAS,OAAQF,gBAAiB,OAAQD,MAAO,QAASb,OAAQ,QAASiB,OAAQ,SAAUP,SAAU,WAAYE,KAAM,MAAOD,IAAK,MAAOO,UAAW,0BACnKxJ,EAAAP,EAAAQ,cAAA+C,EAAAvD,EAAA,CAAM8I,UAAU,SAAStF,QAAQ,UAAUoF,MAAM,SAASjH,MAAO,CAAEkH,OAAQ,SACzEtI,EAAAP,EAAAQ,cAAA,KAAGmB,MAAO,CAAE+B,SAAU,OAAQD,MAAO,YAArC,wCACAlD,EAAAP,EAAAQ,cAAA,KAAGmB,MAAO,CAAEqI,WAAY,OAAQtG,SAAU,OAAQD,MAAO,YAAzD,kRACAlD,EAAAP,EAAAQ,cAAA,OAAKuB,QAASgC,KAAKiD,SAAUrF,MAAO,CAAE+H,MAAO,QAASb,OAAQ,OAAQmB,WAAY,OAAQC,UAAW,SAAUC,aAAc,MAAOC,OAAQ,oBAAqB1G,MAAO,UAAWC,SAAU,SAA7L,yBAIJ,aAtaM0G,iBA+aLzG","file":"static/js/Order.c81925c9.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, 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';\nimport {connect} from 'react-redux';\nimport {getCourses} from './../detail/actions';\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}`}> */}\n <p\n className='order-title' \n style={{ \n overflow: 'hidden', \n textOverflow: 'ellipsis', \n whiteSpace: 'nowrap'\n }}\n onClick={() => props.toDetail(course_id)}\n >\n {course_title}\n </p>\n {/* </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 \n {...item} \n src={image_name} \n id={course_id} \n key={index} \n info={Info} \n isaist={props.isaist}\n toDetail={props.toDetail}\n >\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\n@connect()\nclass Order extends Component {\n constructor(props) {\n super(props);\n this.state = {\n groupPrice: '',\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 const {total} = this.state;\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\"),ischeck:this.state.useBalance}).then(res => {\n console.log(res);\n if(res.data.errno === 200) {\n sessionStorage.removeItem('orderUseCacheObj');\n if (res.data.data.pay_jump === 1) {\n this.props.history.push(`/togroup?id=${res.data.data.oid}`);\n return;\n }\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 if(res.data.errno !== 0) {\n Toast.info(res.data.msg, 2);\n return;\n }\n sessionStorage.removeItem('orderUseCacheObj');\n if (res.data.data.is_free === 1) {\n this.props.history.replace(`/purchased`);\n return;\n }\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;\n if(this.props.location.state && this.props.location.state.group === 1) {\n console.log(this.state);\n total = this.state.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 console.log(0);\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.data.data);\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 console.log(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.data.data);\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 console.log(2);\n // 获取一键开团的课程\n Promise.all([http.get(`${API.home}/m/course/detail/${getParam('id')}`),http.get(`${API['base-api']}/m/order/preorder`)]).then(resList => {\n let courseInfo = resList[0],\n orderInfo = resList[1];\n console.log(courseInfo.data);\n console.log(orderInfo.data);\n let newData = {};\n if(orderInfo.data.errno === 200) {\n newData = Object.assign({}, orderInfo.data.data, {course: []});\n }else{\n Toast.info(orderInfo.data.msg, 2);\n return;\n }\n if(courseInfo.data.code === 200) {\n newData.course.push(courseInfo.data.data.course_info);\n this.setState({\n groupPrice: courseInfo.data.data.course_info.pdd_group_info.price\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(newData);\n this.publicLocalStorage();\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.data.data);\n this.publicLocalStorage();\n })\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\n toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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 groupPrice\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\n list={orderList}\n compute={this.computedMoney}\n courseId={getParam('id')}\n locationState={this.props.location.state}\n groupPrice={groupPrice}\n toDetail={this.toCourseDetail}\n />\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],{1166: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(43),a(14)),s=a.n(c),p=a(23),u=(a(155),a(75)),d=a.n(u),f=(a(1137),a(1139)),h=a.n(f),m=(a(1140),a(1142)),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.ec770473.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{1166: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(43),a(14)),s=a.n(c),p=a(23),u=(a(155),a(75)),d=a.n(u),f=(a(1137),a(1139)),h=a.n(f),m=(a(1140),a(1142)),v=a.n(m),b=a(0),g=a.n(b),q=a(19),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.93f1f54f.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/order/orderinfo.js"],"names":["MyForm","withFormik","mapPropsToValues","props","Object","_Users_zhanghaozhe_server_mr_julyedu_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_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","_Users_zhanghaozhe_server_mr_julyedu_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,EA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, { 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_zhanghaozhe_server_mr_julyedu_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_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","_Users_zhanghaozhe_server_mr_julyedu_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,UAAWC,UAAW,GAAAE,OAAIN,EAA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AAAC,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.93f1f54f.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],{1162:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return O});t(155);var n=t(75),c=t.n(n),i=(t(89),t(25)),o=t.n(i),r=(t(154),t(35)),l=t.n(r),s=(t(43),t(14)),d=t.n(s),p=t(7),u=t(8),m=t(11),y=t(9),b=t(10),g=t(157),h=(t(890),t(892)),f=t.n(h),v=(t(115),t(46)),w=t.n(v),E=t(0),S=t.n(E),x=t(4),_=t(30),j=t(18),k=(t(894),w.a.Item.Brief,f.a.RadioItem),P=[];P=x.a.isWeixin?[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}]:[{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconzhifubaox-"},{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}];var O=function(e){function a(e){var t;return Object(p.a)(this,a),(t=Object(m.a)(this,Object(y.a)(a).call(this,e))).redirectAfterPay=function(){var e=Object(x.b)("status"),a=Object(x.b)("type"),n=Object(x.b)("oid"),c=t.props.history;(e||a)&&(0===parseInt(e,10)?2===parseInt(a,10)?c.push("/togroup?id=".concat(n)):c.push("/purchased"):d.a.info("\u652f\u4ed8\u5f02\u5e38",2))},t.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(g.a)(Object(g.a)(t)),a=Object(x.b)("code");if(a){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(a)).then(function(a){if(0===a.data.errno){var t=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(a){"get_brand_wcpay_request:ok"==a.err_msg?(d.a.info("\u652f\u4ed8\u6210\u529f",2),e.intervalPayStatus=setInterval(function(){x.c.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.b)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.c.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.b)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.b)("oid"))):e.props.history.replace("/purchased")}))})},1e3)):alert("\u652f\u4ed8\u5931\u8d25")})},n=a.data.data;"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",t,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",t),document.attachEvent("onWeixinJSBridgeReady",t)):t()}else d.a.info(a.data.msg,2)})}},t.payCallback=function(){var e=Object(g.a)(Object(g.a)(t));e.intervalPayStatus=setInterval(function(){x.c.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.b)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.c.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.b)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.b)("oid"))):e.props.history.replace("/purchased")}))})},1e3)},t.onBridgeReady1=function(e){var a=Object(g.a)(Object(g.a)(t));e=e||a.BridgeData,WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:"wx23dac6775ac82877",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?(d.a.info("\u652f\u4ed8\u6210\u529f",2),a.payCallback()):alert("\u652f\u4ed8\u5931\u8d25")})},t.alipayPay=function(e){x.c.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(t.payCallback(),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(b.a)(a,e),Object(u.a)(a,[{key:"componentDidMount",value:function(){var e=this;this.redirectAfterPay(),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,c=t.pay_amount,i=[];[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=(c/3).toFixed(2)):2===e?(a.stage=6,a.moneyRate="4.50%",a.rate=.045,a.periodic=(c/6).toFixed(2)):(a.stage=12,a.moneyRate="7.50%",a.rate=.075,a.periodic=(c/9).toFixed(2)),a.serviceFee=(c*a.rate/a.stage).toFixed(2),a.everyTotal=(parseFloat(a.periodic)+parseFloat(a.serviceFee)).toFixed(2),i.push(a)}),console.log(i),e.setState({pay_amount:c,categoryList:n,fenqiList:i})}else d.a.info(a.data.msg,2)}),(1===Object(x.b)("is_class")||Object(x.b)("weixinpay"))&&this.payCallback(),Object(x.e)()&&(this.setState({payType:1}),this.isweixinPay())}},{key:"render",value:function(){var e=this,a=this.state,t=a.orderId,n=a.pay_amount,i=a.payType,r=a.checkPeriod,s=a.singleMoney,d=a.periodNumber,p=a.huabei,u=a.fenqiList,m=a.categoryList,y=a.stageNumber;return S.a.createElement("div",{className:"pay-order"},S.a.createElement(_.e,{title:"\u786e\u8ba4\u652f\u4ed8",arrow:!0}),S.a.createElement(l.a,{size:"sm"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(c.a,null,S.a.createElement(o.a,{justify:"between",align:"center",style:{height:"44px"}},S.a.createElement("span",null,"\u8ba2\u5355\u53f7"),S.a.createElement("span",{className:"number"},t)))),S.a.createElement(l.a,{size:"md"}),m.map(function(a,t){var n=S.a.createElement("div",{className:"order-info"},S.a.createElement("p",{className:"order-title text-overflow-one"},S.a.createElement(j.b,{to:"/detail?id=".concat(a.course_id)},a.course_title)),S.a.createElement("p",{className:"order-content text-overflow-2"},a.simpledescription),S.a.createElement("p",{className:"order-des"},S.a.createElement("span",{className:"order-newprice"},"\xa5",a.price1),S.a.createElement("span",{className:"order-price"},"\xa5",a.price0)));return S.a.createElement(_.i,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),S.a.createElement(l.a,{size:"md"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(c.a,null,S.a.createElement(o.a,{justify:"between",align:"center",style:{height:"44px"}},S.a.createElement("span",null,"\u652f\u4ed8\u91d1\u989d"),S.a.createElement("span",{className:"money"},"\uffe5".concat(n))))),S.a.createElement(l.a,{size:"md"}),S.a.createElement(w.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},P.map(function(a){return S.a.createElement(k,{thumb:S.a.createElement("i",{className:"iconfont ".concat(a.icon," ").concat(i===a.value?"checked":"")}),key:a.value,checked:i===a.value,onChange:function(){return e.onChange(a.value)}},2===a.value?S.a.createElement(o.a,{direction:"column",align:"start",style:{width:"100%",marginTop:"6px"}},S.a.createElement(o.a,{direction:"row",justify:"between",style:{width:"100%",paddingRight:"30px"}},S.a.createElement("span",{style:{color:"#555555",fontSize:"14px"}},a.label),r?S.a.createElement("span",{style:{color:"#333333",fontSize:"12px"}},"".concat(s,"\u5143 \xd7 ").concat(d,"\u671f")):null),S.a.createElement(o.a,{justify:"start"},S.a.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\u652f\u4ed8\u4e0a\u9650\u53d7\u9650\u4e8e\u60a8\u7684\u82b1\u5457\u989d\u5ea6"))):a.label)})),S.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"),S.a.createElement("div",{className:"pay-button",onClick:this.pay},"\u786e\u8ba4\u652f\u4ed8"),p?S.a.createElement("div",{className:"check-staging"},S.a.createElement("div",{className:"container"},S.a.createElement("p",{className:"check-title"},"\u8bf7\u9009\u62e9\u5206\u671f"),u.map(function(a){return S.a.createElement(k,{key:a.value,checked:y===a.value,onChange:function(){return e.checkStaging(a)}},"".concat(a.everyTotal,"\u5143 \xd7 ").concat(a.stage,"\u671f"),S.a.createElement(w.a.Item.Brief,null,"\u624b\u7eed\u8d39".concat(a.serviceFee,"\u5143/\u671f\uff0c\u8d39\u7387").concat(a.moneyRate)))}))):null)}}]),a}(E.Component)},894:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.0540cc1c.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_17___default","a","Item","Brief","antd_mobile_lib_radio__WEBPACK_IMPORTED_MODULE_15___default","mockData","browser","isWeixin","value","label","icon","PayOrder","props","_this2","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_8__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_10__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_11__","call","redirectAfterPay","status","getParam","type","oid","history","parseInt","push","concat","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_7___default","info","onChange","setState","payType","checkPeriod","huabei","checkStaging","item","console","log","stageNumber","singleMoney","everyTotal","periodNumber","stage","print","_len","arguments","length","e","Array","_key","pay","_this2$state","state","orderId","alipayPay","weixinPay","is_weixin","window","location","href","encodeURIComponent","toLowerCase","http","get","API","then","res","data","errno","url","msg","isweixinPay","_this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_13__","weixin_code","undefined","onBridgeReady","WeixinJSBridge","invoke","appId","timeStamp","nonceStr","package","signType","paySign","err_msg","intervalPayStatus","setInterval","clearInterval","Number","course_type","replace","alert","document","addEventListener","attachEvent","payCallback","onBridgeReady1","BridgeData","huabeiPay","_this2$state2","pay_amount","fenqiList","qishu","lilv","everyMoney","feiyong","categoryList","_this3","post","order_id","_res$data$data","course","map","obj","moneyRate","rate","periodic","toFixed","serviceFee","parseFloat","_this4","_this$state","react__WEBPACK_IMPORTED_MODULE_18___default","createElement","className","_common_index__WEBPACK_IMPORTED_MODULE_20__","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_21__","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":"0XAWMA,UAFOC,EAAAC,EAAKC,KACCC,MACDC,EAAAH,EAAMF,WAEpBM,EAAW,GAEXA,EADDC,IAAQC,SACI,CACP,CAAEC,MAAO,EAAGC,MAAO,2BAAQC,KAAM,oBAG1B,CACP,CAAEF,MAAO,EAAGC,MAAO,qBAAOC,KAAM,kBAChC,CAAEF,MAAO,EAAGC,MAAO,2BAAQC,KAAM,wBAQpBC,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,KAoBVQ,iBAAmB,WAEf,IAAMC,EAASC,YAAS,UAClBC,EAAOD,YAAS,QAChBE,EAAMF,YAAS,OACbG,EAAYZ,EAAKD,MAAjBa,SACLJ,GAAUE,KACmB,IAAzBG,SAASL,EAAQ,IAEU,IAAvBK,SAASH,EAAM,IACdE,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0F,EAAA5H,EAAA6H,cAAA,OAAKC,UAAU,iBACXF,EAAA5H,EAAA6H,cAAA,OAAKC,UAAU,aACXF,EAAA5H,EAAA6H,cAAA,KAAGC,UAAU,eAAb,kCACCvB,EAAUW,IAAI,SAAAuC,GAAC,OACZ7B,EAAA5H,EAAA6H,cAAC/H,EAAD,CACIsJ,IAAKK,EAAElJ,MACPoJ,QAASpH,IAAgBkH,EAAElJ,MAC3BuB,SAAU,kBAAM4F,EAAKvF,aAAasH,KAHtC,GAAA9H,OAIQ8H,EAAEhH,WAJV,gBAAAd,OAI2B8H,EAAE9G,MAJ7B,UAKIiF,EAAA5H,EAAA6H,cAAA9H,EAAAC,EAAMC,KAAKC,MAAX,0BAAAyB,OAAwB8H,EAAEjC,WAA1B,mCAAA7F,OAA6C8H,EAAErC,iBAK/D,aA9Xc+C","file":"static/js/PayOrder.0540cc1c.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport {Flex, WingBlank, WhiteSpace, List, Radio, Toast} from 'antd-mobile';\nimport {http, getParam, is_weixin, browser } from '@/utils';\nimport { OrderItem, HeaderBar } from '@/common/index';\nimport { Link } from 'react-router-dom';\nimport './PayOrder.scss';\nimport { VList } from '@/common';\n\n\nconst Item = List.Item;\nconst Brief = Item.Brief;\nconst RadioItem = Radio.RadioItem;\n\nlet mockData = []\nif(browser.isWeixin) {\n mockData = [\n { value: 1, label: '微信支付', icon: 'iconweixinzhifu' }\n ];\n} else {\n mockData = [\n { value: 0, label: '支付宝', icon: 'iconzhifubaox-' },\n { value: 1, label: '微信支付', icon: 'iconweixinzhifu' },\n // { value: 2, label: '花呗分期', icon: 'iconhuabei' },\n ];\n}\n\n\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\n // 支付成功后,判断并重定向\n redirectAfterPay = () => {\n // status:0成功,1失败\n const status = getParam('status');\n const type = getParam('type');\n const oid = getParam('oid');\n const { history } = this.props;\n if(status || type) {\n if(parseInt(status, 10) === 0) {\n // type订单类型 0普通订单 1团购 2小团 3砍价 4单集购买 5定金课定金 6定金课尾款\n if(parseInt(type, 10) === 2) {\n history.push(`/togroup?id=${oid}`);\n }else {\n history.push('/purchased');\n }\n }else {\n Toast.info('支付异常', 2);\n }\n }\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 _this = this;\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 let data = res.data.data;\n function onBridgeReady() {\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 Toast.info('支付成功', 2);\n _this.intervalPayStatus = setInterval(function(){\n http.get(`${API['base-api']}/m/orderState/oid/${getParam('oid')}`).then(res => {\n if (res.data.errno === 401) {\n clearInterval(_this.intervalPayStatus);\n _this.intervalPayStatus = null;\n // 获取课程类型\n http.get(`${API['base-api']}/m/app_order/detail/${getParam('oid')}`).then(res => {\n if(Number(res.data.data.course_type) === 2) {\n _this.props.history.replace(`/togroup?id=${getParam('oid')}`);\n }else{\n // 跳转到已购课程 /purchased 不需要传递任何参数\n _this.props.history.replace(`/purchased`);\n }\n });\n }\n })\n }, 1000)\n } else {\n alert('支付失败')\n }\n }\n )\n }\n\n if (typeof WeixinJSBridge == \"undefined\") {\n if (document.addEventListener) {\n document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false)\n } else if (document.attachEvent) {\n document.attachEvent('WeixinJSBridgeReady', onBridgeReady);\n document.attachEvent('onWeixinJSBridgeReady', onBridgeReady)\n }\n } else {\n onBridgeReady();\n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n }\n // 支付完成之后获取状态\n payCallback = () => {\n const _this = this;\n // 支付回调\n // 定时器轮训获取订单状态\n _this.intervalPayStatus = setInterval(function(){\n http.get(`${API['base-api']}/m/orderState/oid/${getParam('oid')}`).then(res => {\n if (res.data.errno === 401) {\n clearInterval(_this.intervalPayStatus);\n _this.intervalPayStatus = null;\n // 获取课程类型\n http.get(`${API['base-api']}/m/app_order/detail/${getParam('oid')}`).then(res => {\n if(Number(res.data.data.course_type) === 2) {\n _this.props.history.replace(`/togroup?id=${getParam('oid')}`);\n }else{\n // 跳转到已购课程 /purchased 不需要传递任何参数\n _this.props.history.replace(`/purchased`);\n }\n\n });\n }\n })\n }, 1000)\n }\n\n onBridgeReady1 = (data) => {\n let _this = this;\n data = data || _this.BridgeData;\n\n WeixinJSBridge.invoke(\n 'getBrandWCPayRequest', {\n \"appId\": \"wx23dac6775ac82877\", //公众号名称,由商户传入\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 Toast.info('支付成功', 2);\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_new/oid/${orderId}`).then((res) => {\n if (res.data.errno === 0) {\n this.payCallback();\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 this.redirectAfterPay()\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.setState({\n payType: 1\n })\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],{1162:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return j});t(155);var n=t(75),i=t.n(n),c=(t(89),t(25)),o=t.n(c),r=(t(154),t(35)),l=t.n(r),s=(t(43),t(14)),d=t.n(s),p=t(7),u=t(8),m=t(11),y=t(9),g=t(10),f=t(157),h=(t(890),t(892)),b=t.n(h),v=(t(115),t(46)),w=t.n(v),E=t(0),x=t.n(E),S=t(4),k=t(30),_=t(19),N=(t(894),w.a.Item.Brief,b.a.RadioItem),P=[];P=S.a.isWeixin?[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}]:[{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconzhifubaox-"},{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}];var j=function(e){function a(e){var t;return Object(p.a)(this,a),(t=Object(m.a)(this,Object(y.a)(a).call(this,e))).redirectAfterPay=function(){var e=Object(S.b)("status"),a=Object(S.b)("type"),n=Object(S.b)("oid"),i=t.props.history;(e||a)&&(0===parseInt(e,10)?2===parseInt(a,10)?i.push("/togroup?id=".concat(n)):i.push("/purchased"):d.a.info("\u652f\u4ed8\u5f02\u5e38",2))},t.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(S.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":S.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+"weixinPay",2)})},t.isweixinPay=function(){var e=Object(S.b)("code");if(e){if(void 0===Object(S.b)("oid"))return;S.c.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(S.b)("oid"),"/code/").concat(e)).then(function(e){if(0===e.data.errno){var a=function(){d.a.info(t.appId,2),console.log("181 line data: ".concat(JSON.stringify(t)));var e=this;console.log("184 line data: ".concat(JSON.stringify(t))),d.a.info(t.appId,5),WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:"wx23dac6775ac82877",timeStamp:t.timeStamp,nonceStr:t.nonceStr,package:t.package,signType:t.signType,paySign:t.paySign},function(a){"get_brand_wcpay_request:ok"==a.err_msg?(d.a.info("\u652f\u4ed8\u6210\u529f",2),e.payCallback()):alert("\u652f\u4ed8\u5931\u8d25")})},t=e.data.data;"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",a,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",a),document.attachEvent("onWeixinJSBridgeReady",a)):a()}else d.a.info(e.data.msg+"isweixinPay",2)})}},t.payCallback=function(){var e=Object(f.a)(Object(f.a)(t));e.intervalPayStatus=setInterval(function(){var a=this;S.c.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(S.b)("oid"))).then(function(t){401===t.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,S.c.get("".concat(API.home,"/m/app_order/detail/").concat(Object(S.b)("oid"))).then(function(e){"2"===e.data.data.course_type?a.props.history.replace("/togroup?id=".concat(Object(S.b)("oid"))):a.props.history.replace("/purchased")}))})},1e3)},t.onBridgeReady1=function(e){d.a.info(e.appId,2),console.log("181 line data: ".concat(JSON.stringify(e)));var a=Object(f.a)(Object(f.a)(t));e=e||a.BridgeData,console.log("184 line data: ".concat(JSON.stringify(e))),d.a.info(e.appId,100),WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:"wx23dac6775ac82877",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?(d.a.info("\u652f\u4ed8\u6210\u529f",2),a.payCallback()):alert("\u652f\u4ed8\u5931\u8d25")})},t.alipayPay=function(e){S.c.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(t.payCallback(),window.location=e.data.data.url):d.a.info(e.data.msg+"alipayPay",2)})},t.huabeiPay=function(e){var a=t.state,n=(a.singleMoney,a.periodNumber);console.log("\u82b1\u5457\u5206\u671f\u652f\u4ed8"),S.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+"huabeiPay",2)})},t.state={pay_amount:0,payType:0,stageNumber:0,checkPeriod:!1,singleMoney:0,periodNumber:0,orderId:Object(S.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(u.a)(a,[{key:"componentDidMount",value:function(){var e=this;this.redirectAfterPay(),S.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,c=[];[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),c.push(a)}),console.log(c),e.setState({pay_amount:i,categoryList:n,fenqiList:c})}else d.a.info(a.data.msg+"componentDidMount",2)}),(1===Object(S.b)("is_class")||Object(S.b)("weixinpay"))&&this.payCallback(),Object(S.e)()&&(this.setState({payType:1}),this.isweixinPay())}},{key:"render",value:function(){var e=this,a=this.state,t=a.orderId,n=a.pay_amount,c=a.payType,r=a.checkPeriod,s=a.singleMoney,d=a.periodNumber,p=a.huabei,u=a.fenqiList,m=a.categoryList,y=a.stageNumber;return x.a.createElement("div",{className:"pay-order"},x.a.createElement(k.e,{title:"\u786e\u8ba4\u652f\u4ed8",arrow:!0}),x.a.createElement(l.a,{size:"sm"}),x.a.createElement("div",{className:"order-number"},x.a.createElement(i.a,null,x.a.createElement(o.a,{justify:"between",align:"center",style:{height:"44px"}},x.a.createElement("span",null,"\u8ba2\u5355\u53f7"),x.a.createElement("span",{className:"number"},t)))),x.a.createElement(l.a,{size:"md"}),m.map(function(a,t){var n=x.a.createElement("div",{className:"order-info"},x.a.createElement("p",{className:"order-title text-overflow-one"},x.a.createElement(_.b,{to:"/detail?id=".concat(a.course_id)},a.course_title)),x.a.createElement("p",{className:"order-content text-overflow-2"},a.simpledescription),x.a.createElement("p",{className:"order-des"},x.a.createElement("span",{className:"order-newprice"},"\xa5",a.price1),x.a.createElement("span",{className:"order-price"},"\xa5",a.price0)));return x.a.createElement(k.i,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),x.a.createElement(l.a,{size:"md"}),x.a.createElement("div",{className:"order-number"},x.a.createElement(i.a,null,x.a.createElement(o.a,{justify:"between",align:"center",style:{height:"44px"}},x.a.createElement("span",null,"\u652f\u4ed8\u91d1\u989d"),x.a.createElement("span",{className:"money"},"\uffe5".concat(n))))),x.a.createElement(l.a,{size:"md"}),x.a.createElement(w.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},P.map(function(a){return x.a.createElement(N,{thumb:x.a.createElement("i",{className:"iconfont ".concat(a.icon," ").concat(c===a.value?"checked":"")}),key:a.value,checked:c===a.value,onChange:function(){return e.onChange(a.value)}},2===a.value?x.a.createElement(o.a,{direction:"column",align:"start",style:{width:"100%",marginTop:"6px"}},x.a.createElement(o.a,{direction:"row",justify:"between",style:{width:"100%",paddingRight:"30px"}},x.a.createElement("span",{style:{color:"#555555",fontSize:"14px"}},a.label),r?x.a.createElement("span",{style:{color:"#333333",fontSize:"12px"}},"".concat(s,"\u5143 \xd7 ").concat(d,"\u671f")):null),x.a.createElement(o.a,{justify:"start"},x.a.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\u652f\u4ed8\u4e0a\u9650\u53d7\u9650\u4e8e\u60a8\u7684\u82b1\u5457\u989d\u5ea6"))):a.label)})),x.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"),x.a.createElement("div",{className:"pay-button",onClick:this.pay},"\u786e\u8ba4\u652f\u4ed8"),p?x.a.createElement("div",{className:"check-staging"},x.a.createElement("div",{className:"container"},x.a.createElement("p",{className:"check-title"},"\u8bf7\u9009\u62e9\u5206\u671f"),u.map(function(a){return x.a.createElement(N,{key:a.value,checked:y===a.value,onChange:function(){return e.checkStaging(a)}},"".concat(a.everyTotal,"\u5143 \xd7 ").concat(a.stage,"\u671f"),x.a.createElement(w.a.Item.Brief,null,"\u624b\u7eed\u8d39".concat(a.serviceFee,"\u5143/\u671f\uff0c\u8d39\u7387").concat(a.moneyRate)))}))):null)}}]),a}(E.Component)},894:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.2f9f32e8.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_17___default","a","Item","Brief","antd_mobile_lib_radio__WEBPACK_IMPORTED_MODULE_15___default","mockData","browser","isWeixin","value","label","icon","PayOrder","props","_this2","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_8__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_10__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_11__","call","redirectAfterPay","status","getParam","type","oid","history","parseInt","push","concat","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_7___default","info","onChange","setState","payType","checkPeriod","huabei","checkStaging","item","console","log","stageNumber","singleMoney","everyTotal","periodNumber","stage","print","_len","arguments","length","e","Array","_key","pay","_this2$state","state","orderId","alipayPay","weixinPay","is_weixin","window","location","href","encodeURIComponent","toLowerCase","http","get","API","then","res","data","errno","url","msg","isweixinPay","weixin_code","undefined","onBridgeReady","appId","JSON","stringify","_this","WeixinJSBridge","invoke","timeStamp","nonceStr","package","signType","paySign","err_msg","payCallback","alert","document","addEventListener","attachEvent","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_13__","intervalPayStatus","setInterval","_this3","clearInterval","home","course_type","replace","onBridgeReady1","BridgeData","huabeiPay","_this2$state2","pay_amount","fenqiList","qishu","lilv","everyMoney","feiyong","categoryList","_this4","post","order_id","_res$data$data","course","map","obj","moneyRate","rate","periodic","toFixed","serviceFee","parseFloat","_this5","_this$state","react__WEBPACK_IMPORTED_MODULE_18___default","createElement","className","_common_index__WEBPACK_IMPORTED_MODULE_20__","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_21__","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":"0XAWMA,UAFOC,EAAAC,EAAKC,KACCC,MACDC,EAAAH,EAAMF,WAEpBM,EAAW,GAEXA,EADDC,IAAQC,SACI,CACP,CAAEC,MAAO,EAAGC,MAAO,2BAAQC,KAAM,oBAG1B,CACP,CAAEF,MAAO,EAAGC,MAAO,qBAAOC,KAAM,kBAChC,CAAEF,MAAO,EAAGC,MAAO,2BAAQC,KAAM,wBAQpBC,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,KAoBVQ,iBAAmB,WAEf,IAAMC,EAASC,YAAS,UAClBC,EAAOD,YAAS,QAChBE,EAAMF,YAAS,OACbG,EAAYZ,EAAKD,MAAjBa,SACLJ,GAAUE,KACmB,IAAzBG,SAASL,EAAQ,IAEU,IAAvBK,SAASH,EAAM,IACdE,EAAQE,KAAR,eAAAC,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AAA/H,EAAAgI,cAAA,OAAKC,UAAU,aACXF,EAAA/H,EAAAgI,cAAA,KAAGC,UAAU,eAAb,kCACCvB,EAAUW,IAAI,SAAAuC,GAAC,OACZ7B,EAAA/H,EAAAgI,cAAClI,EAAD,CACIyJ,IAAKK,EAAErJ,MACPuJ,QAASvH,IAAgBqH,EAAErJ,MAC3BuB,SAAU,kBAAM+F,EAAK1F,aAAayH,KAHtC,GAAAjI,OAIQiI,EAAEnH,WAJV,gBAAAd,OAI2BiI,EAAEjH,MAJ7B,UAKIoF,EAAA/H,EAAAgI,cAAAjI,EAAAC,EAAMC,KAAKC,MAAX,0BAAAyB,OAAwBiI,EAAEjC,WAA1B,mCAAAhG,OAA6CiI,EAAErC,iBAK/D,aA3Xc+C","file":"static/js/PayOrder.2f9f32e8.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport {Flex, WingBlank, WhiteSpace, List, Radio, Toast} from 'antd-mobile';\nimport {http, getParam, is_weixin, browser } from '@/utils';\nimport { OrderItem, HeaderBar } from '@/common/index';\nimport { Link } from 'react-router-dom';\nimport './PayOrder.scss';\nimport { VList } from '@/common';\n\n\nconst Item = List.Item;\nconst Brief = Item.Brief;\nconst RadioItem = Radio.RadioItem;\n\nlet mockData = []\nif(browser.isWeixin) {\n mockData = [\n { value: 1, label: '微信支付', icon: 'iconweixinzhifu' }\n ];\n} else {\n mockData = [\n { value: 0, label: '支付宝', icon: 'iconzhifubaox-' },\n { value: 1, label: '微信支付', icon: 'iconweixinzhifu' },\n // { value: 2, label: '花呗分期', icon: 'iconhuabei' },\n ];\n}\n\n\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\n // 支付成功后,判断并重定向\n redirectAfterPay = () => {\n // status:0成功,1失败\n const status = getParam('status');\n const type = getParam('type');\n const oid = getParam('oid');\n const { history } = this.props;\n if(status || type) {\n if(parseInt(status, 10) === 0) {\n // type订单类型 0普通订单 1团购 2小团 3砍价 4单集购买 5定金课定金 6定金课尾款\n if(parseInt(type, 10) === 2) {\n history.push(`/togroup?id=${oid}`);\n }else {\n history.push('/purchased');\n }\n }else {\n Toast.info('支付异常', 2);\n }\n }\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 + 'weixinPay', 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 let data = res.data.data;\n // this.BridgeData = res.data.data;\n // Toast.info(this.BridgeData.appId, 1);\n // this.onBridgeReady(this.BridgeData); // 这个应该不需要\n function onBridgeReady() {\n Toast.info(data.appId, 2);\n console.log(`181 line data: ${JSON.stringify(data)}`);\n let _this = this;\n // data = data || _this.BridgeData;\n console.log(`184 line data: ${JSON.stringify(data)}`);\n Toast.info(data.appId, 5);\n\n WeixinJSBridge.invoke(\n 'getBrandWCPayRequest', {\n appId:\"wx23dac6775ac82877\", //公众号名称,由商户传入\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 Toast.info('支付成功', 2);\n _this.payCallback();\n } else {\n alert('支付失败')\n }\n }\n )\n }\n\n if (typeof WeixinJSBridge == \"undefined\") {\n if (document.addEventListener) {\n document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false)\n } else if (document.attachEvent) {\n document.attachEvent('WeixinJSBridgeReady', onBridgeReady);\n document.attachEvent('onWeixinJSBridgeReady', onBridgeReady)\n }\n } else {\n onBridgeReady();\n }\n } else {\n Toast.info(res.data.msg + 'isweixinPay', 2)\n }\n })\n }\n }\n }\n // 支付完成之后获取状态\n payCallback = () => {\n const _this = this;\n // 支付回调\n // 定时器轮训获取订单状态\n _this.intervalPayStatus = setInterval(function(){\n http.get(`${API['base-api']}/m/orderState/oid/${getParam('oid')}`).then(res => {\n if (res.data.errno === 401) {\n clearInterval(_this.intervalPayStatus);\n _this.intervalPayStatus = null;\n // 获取课程类型\n http.get(`${API.home}/m/app_order/detail/${getParam('oid')}`).then(res => {\n if(res.data.data.course_type === '2') {\n this.props.history.replace(`/togroup?id=${getParam('oid')}`);\n }else{\n // 跳转到已购课程 /purchased 不需要传递任何参数\n this.props.history.replace(`/purchased`);\n }\n\n });\n }\n })\n }, 1000)\n }\n\n onBridgeReady1 = (data) => {\n Toast.info(data.appId, 2);\n console.log(`181 line data: ${JSON.stringify(data)}`);\n let _this = this;\n data = data || _this.BridgeData;\n console.log(`184 line data: ${JSON.stringify(data)}`);\n Toast.info(data.appId, 100);\n\n WeixinJSBridge.invoke(\n 'getBrandWCPayRequest', {\n \"appId\": \"wx23dac6775ac82877\", //公众号名称,由商户传入\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 Toast.info('支付成功', 2);\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_new/oid/${orderId}`).then((res) => {\n if (res.data.errno === 0) {\n this.payCallback();\n window.location = res.data.data.url;\n } else {\n Toast.info(res.data.msg + 'alipayPay', 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 + \"huabeiPay\", 2)\n }\n });\n }\n\n componentDidMount() {\n this.redirectAfterPay()\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 + 'componentDidMount', 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.setState({\n payType: 1\n })\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],{1136:function(e,t,a){},1165:function(e,t,a){"use strict";a.r(t);a(258);var n,o=a(160),i=a.n(o),c=(a(154),a(35)),s=a.n(c),r=(a(43),a(14)),l=a.n(r),u=a(7),f=a(8),h=a(11),p=a(9),d=a(10),m=a(0),v=a.n(m),g=a(30),b=(a(1136),a(706)),C=a(4),y=a(64),w=a(20),E=a(45),N=Object(w.b)()(n=function(e){function t(e){var a;return Object(u.a)(this,t),(a=Object(h.a)(this,Object(p.a)(t).call(this,e))).specialSale=function(){C.c.get("".concat(API.home,"/m/home/weekDiscounts")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data,isLoading:!1}):l.a.info(e.data.msg,2)})},a.bargain=function(){C.c.get("".concat(API.home,"/m/home/bargainZone")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data}):l.a.info(e.data.msg,2)})},a.group=function(){C.c.get("".concat(API.home,"/m/home/grouponList")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data}):l.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.toCourseDetail=function(e){var t=a.props,n=t.dispatch,o=t.history;n(Object(E.d)(e,function(){o.push("/detail?id=".concat(e))}))},a.state={dataList:[],courseStatus:0,isLoading:!0},a}return Object(d.a)(t,e),Object(f.a)(t,[{key:"componentDidMount",value:function(){this.specialSale()}},{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"preferential"},v.a.createElement(b.a,null),v.a.createElement(y.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"class-content"},v.a.createElement(s.a,null),v.a.createElement(i.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)}},v.a.createElement("div",{className:"tabs"},v.a.createElement("ul",null,this.state.dataList.map(function(t,a){var n=v.a.createElement("div",{className:"info"},v.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),v.a.createElement("p",{className:"contact text-overflow-2"},t.course_desc),v.a.createElement("div",{className:"des"},!t.is_buy&&v.a.createElement("p",{className:"course-price"},0===e.state.courseStatus&&v.a.createElement("span",{className:"price"},"\u7279\u60e0\u4ef7\uff1a"),v.a.createElement("span",{className:"new"},"\xa5",t.price1),v.a.createElement("span",{className:"old"},"\xa5",t.price0)),t.is_buy&&v.a.createElement("a",{href:"/#",className:"isbuy"},"\u5df2\u8d2d\u4e70"))),o=v.a.createElement("div",null,1===e.state.courseStatus&&v.a.createElement("p",{className:"course-status"},"\u780d\u4ef7\u51cf",t.bargain_price,"\u5143"),2===e.state.courseStatus&&v.a.createElement("p",{className:"course-status"},"\u62fc\u56e2\u4ef7",t.price,"\u5143"),t.is_aist&&v.a.createElement("span",{className:"return_cash"}));return v.a.createElement(g.i,{key:a,img:t.image_name,id:t.course_id,status:o,info:n,toDetail:e.toCourseDetail})})))),v.a.createElement(s.a,null))))}}]),t}(m.Component))||n;t.default=N},583: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},588: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}},606:function(e,t,a){"use strict";a(48),a(607)},607:function(e,t,a){},608:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=g(a(3)),o=g(a(34)),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(153)),p=g(a(583)),d=a(588),m=a(609);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,d.getComponentLocale)(this.props,this.context,"SearchBar",function(){return a(610)}).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))),_=(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,p.default)(this.props))),u.createElement(h.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||b))}}]),t}(u.Component);t.default=b,b.defaultProps=m.defaultProps,b.contextTypes={antLocale:f.object},e.exports=t.default},609: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}},610:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},706:function(e,t,a){"use strict";a(606);var n=a(608),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(707),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},707:function(e,t,a){}}]);
//# sourceMappingURL=Preferential.f2230bb7.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=Preferential.5cd529e1.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","connect","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_zhanghaozhe_server_mr_julyedu_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","toCourseDetail","id","_this$props","dispatch","history","getCourses","push","_this2","react__WEBPACK_IMPORTED_MODULE_11___default","createElement","className","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_14__","_common_Loading__WEBPACK_IMPORTED_MODULE_16__","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","onClick","course_id","course_title","course_desc","is_buy","price1","price0","href","status","bargain_price","price","is_aist","_common__WEBPACK_IMPORTED_MODULE_12__","key","img","image_name","toDetail","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","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":"0TAaMA,EADLC,4BAEG,SAAAD,EAAYE,GAA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CfA3K,OAAAsE,eAAAC,EAAA,cACAC,OAAA,IAEAD,EAAA,SACAuG,WAAA,gBAEAjG,EAAAN,UAAA,4HCJMsH,qNASFC,OAAS,WACLC,SAASC,QAAQ,wFARjB5D,OAAO2D,SAASpI,KAAO,2CAIvByE,OAAO2D,SAASpI,KAAO,qCASvB,OACIsI,EAAA7K,EAAAmB,cAAA,OAAKC,UAAU,gBACXyJ,EAAA7K,EAAAmB,cAAA,OAAKC,UAAU,cACXyJ,EAAA7K,EAAAmB,cAAA,KAAGC,UAAW,mCAAoCY,QAASlD,KAAKgM,OAAOC,KAAKjM,QAC5E+L,EAAA7K,EAAAmB,cAAA6J,EAAAhL,EAAA,CACIwJ,YAAY,2BACZE,WAAY,IACZlD,QAAS1H,KAAKmM,SAASF,KAAKjM,MAC5B+J,kBAAkB,IAEtBgC,EAAA7K,EAAAmB,cAAA,KAAGC,UAAW,+CAAgDY,QAASlD,KAAK4L,kBAzBxEzH,cAiCTwH","file":"static/js/Preferential.f2230bb7.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'\nimport {bindActionCreators} from 'redux';\nimport {connect} from 'react-redux';\nimport {getCourses} from './../detail/actions';\n\n@connect()\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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' onClick={() => this.toCourseDetail(item.course_id)}>\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.bargain_price}元</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\n key={index}\n img={item.image_name}\n id={item.course_id}\n status={status}\n info={Info}\n toDetail={this.toCourseDetail}\n />\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","connect","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_zhanghaozhe_server_mr_julyedu_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","toCourseDetail","id","_this$props","dispatch","history","getCourses","push","_this2","react__WEBPACK_IMPORTED_MODULE_11___default","createElement","className","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_14__","_common_Loading__WEBPACK_IMPORTED_MODULE_16__","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","onClick","course_id","course_title","course_desc","is_buy","price1","price0","href","status","bargain_price","price","is_aist","_common__WEBPACK_IMPORTED_MODULE_12__","key","img","image_name","toDetail","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","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":"0TAaMA,EADLC,4BAEG,SAAAD,EAAYE,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAN,IACfG,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAJ,GAAAS,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,K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tBgC,EAAA7K,EAAAmB,cAAA,KAAGC,UAAW,+CAAgDY,QAASlD,KAAK4L,kBAzBxEzH,cAiCTwH","file":"static/js/Preferential.5cd529e1.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'\nimport {bindActionCreators} from 'redux';\nimport {connect} from 'react-redux';\nimport {getCourses} from './../detail/actions';\n\n@connect()\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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' onClick={() => this.toCourseDetail(item.course_id)}>\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.bargain_price}元</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\n key={index}\n img={item.image_name}\n id={item.course_id}\n status={status}\n info={Info}\n toDetail={this.toCourseDetail}\n />\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],{1132:function(e,t,a){},1133:function(e,t,a){},1180:function(e,t,a){"use strict";a.r(t);var n,o,r=a(7),s=a(8),c=a(11),i=a(9),l=a(10),u=a(0),h=a.n(u),f=a(20),p=a(704),d=a(161),m=a(4),v=(a(1132),a(43),a(14)),g=a.n(v),y=(a(1133),a(30)),b=a(53),C=a(45),w=Object(f.b)()(n=function(e){function t(){var e,a;Object(r.a)(this,t);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return(a=Object(c.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).state={courses:[]},a.toCourseDetail=function(e){var t=a.props,n=t.dispatch,o=t.history;n(Object(C.d)(e,function(){o.push("/detail?id=".concat(e))}))},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this;m.c.get("".concat(API["search-api"],"/search_hot_word")).then(function(t){0===t.data.errno?e.setState({courses:t.data.data.info.courses}):g.a.info(t.data.msg)})}},{key:"render",value:function(){var e=this,t=this.state.courses;return h.a.createElement("div",{className:"recommendation"},h.a.createElement("div",{className:"title"},"\u63a8\u8350\u8bfe\u7a0b"),h.a.createElement("div",{className:"courses"},t.length>0&&t.map(function(t){var a=h.a.createElement("div",{className:"bottom"},h.a.createElement("span",{className:"price"},t.price1),h.a.createElement("span",{className:"old-price"},t.price0));return h.a.createElement(y.d,{className:"text-overflow-2",key:t.course_id,id:t.course_id,img:t.image_name,title:t.course_title,bottom:a,toDetail:e.toCourseDetail})})))}}]),t}(u.Component))||n,E=Object(b.g)(w),O=function(e){var t=e.item;return h.a.createElement("div",{className:"bottom"},h.a.createElement("span",{className:"price"},"\xa5",t.price1),h.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},N=Object(f.b)()(o=function(e){function t(){var e,a;Object(r.a)(this,t);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return(a=Object(c.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).state={courseList:[],value:"",searchHistory:JSON.parse(localStorage.getItem("searchHistory"))||[]},a.getCourses=function(e){m.c.get("".concat(API["search-api"],"/search/").concat(e,"?type=course&page=1")).then(function(e){var t=e.data;0===t.errno&&a.setState({courseList:t.data.info.search_data.course})})},a.handleClick=function(e){a.props.history.push("/detail?id=".concat(e))},a.handleSearch=function(){a.state.value&&a.getCourses(a.state.value)},a.handleChange=function(e){a.setState({value:e})},a.toCourseDetail=function(e){var t=a.props,n=t.dispatch,o=t.history;n(Object(C.d)(e,function(){o.push("/detail?id=".concat(e))}))},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.getCourses(Object(m.b)("word"))}},{key:"render",value:function(){var e=this,t=this.state.courseList;return h.a.createElement("div",{className:"search-result"},h.a.createElement(p.a,{handleSearch:this.handleSearch,value:this.state.value,handleChange:this.handleChange,searchHistory:this.state.searchHistory}),t&&t.length>0?h.a.createElement("ul",null,t.map(function(t){var a=h.a.createElement("div",{className:"info"},h.a.createElement("p",{className:"title"},t.course_title),h.a.createElement("p",{className:"des"},t.simpledescription),h.a.createElement(O,{item:t})),n=t.bargain_num||t.groupon_num?h.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 h.a.createElement(d.a,{img:t.image_name,toDetail:e.toCourseDetail,key:t.course_id,info:a,id:t.course_id,status:n})})):h.a.createElement("div",{className:"empty"},"\u62b1\u6b49\uff01\u6ca1\u6709\u641c\u5230\u76f8\u5173\u5185\u5bb9"),h.a.createElement(E,null))}}]),t}(u.PureComponent))||o;t.default=N},583: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},588:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=a(3),r=(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 s=n();o=s.default||s}var c=(0,r.default)({},o);e.locale&&(c=(0,r.default)({},c,e.locale),e.locale.lang&&(c.lang=(0,r.default)({},o.lang,e.locale.lang)));return c},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},606:function(e,t,a){"use strict";a(48),a(607)},607:function(e,t,a){},608:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=g(a(3)),o=g(a(34)),r=g(a(5)),s=g(a(12)),c=g(a(6)),i=g(a(13)),l=g(a(15)),u=v(a(0)),h=v(a(2)),f=g(a(153)),p=g(a(583)),d=a(588),m=a(609);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 y=function(e){function t(e){(0,r.default)(this,t);var a=(0,c.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,i.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,r=this.props,s=r.prefixCls,c=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 a(610)}).cancelText,b=this.state,C=b.value,w=b.focus,E=(0,l.default)(s,m,(0,o.default)({},s+"-start",!!(w||C&&C.length>0))),O=(0,l.default)(s+"-clear",(0,o.default)({},s+"-clear-show",!!(w&&C&&C.length>0))),N=(0,l.default)(s+"-cancel",(e={},(0,o.default)(e,s+"-cancel-show",!!(c||w||C&&C.length>0)),(0,o.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&&!C?"visible":"hidden"}},h))),u.createElement("input",(0,n.default)({type:"search",className:s+"-value",value:C,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:s+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:O}))),u.createElement("div",{className:N,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},609: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}},610:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},704:function(e,t,a){"use strict";a(606);var n=a(608),o=a.n(n),r=a(116),s=a(7),c=a(8),i=a(11),l=a(9),u=a(10),h=a(0),f=a.n(h),p=a(53),d=(a(705),function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];return(a=Object(i.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(o)))).returnPage=function(){a.props.history.go(-1)},a.search=function(){a.storeKeyword(),a.props.handleSearch()},a.storeKeyword=function(){var e=a.props,t=e.searchHistory,n=void 0===t?[]:t,o=e.value;o&&localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(r.a)(n),[o])))},a}return Object(u.a)(t,e),Object(c.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)},705:function(e,t,a){}}]);
//# sourceMappingURL=SearchResult.fff53593.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=SearchResult.4d0783a4.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","connect","state","courses","toCourseDetail","id","_this$props","_this","props","dispatch","history","getCourses","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","Bottom","common","key","img","title","bottom","toDetail","Component","withRouter","_ref","price1","price0","SearchResult","courseList","value","searchHistory","JSON","parse","localStorage","getItem","word","course","handleClick","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$searchHis","setItem","stringify","_Users_zhanghaozhe_server_mr_julyedu_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":"kTAUMA,EADLC,2NAGGC,MAAQ,CACJC,QAAS,MAsBbC,eAAiB,SAACC,GAAO,IAAAC,EACSC,EAAKC,MAA3BC,EADaH,EACbG,SAAUC,EADGJ,EACHI,QAClBD,EAASE,YAAWN,EAAI,WACpBK,EAAQE,KAAR,cAAAC,OAA2BR,2FAtBf,IAAAS,EAAAC,KAChBC,IAAKC,IAAL,GAAAJ,OAAYK,IAAI,cAAhB,qBACKC,KAAK,SAAAC,GACqB,IAAnBA,EAAIC,KAAKC,MACTR,EAAKS,SAAS,CACVpB,QAASiB,EAAIC,KAAKA,KAAKG,KAAKrB,UAGhCsB,EAAAC,EAAMF,KAAKJ,EAAIC,KAAKM,wCAkB3B,IAAAC,EAAAb,KACEZ,EAAWY,KAAKb,MAAhBC,QACP,OACI0B,EAAAH,EAAAI,cAAA,OAAKC,UAAU,kBACXF,EAAAH,EAAAI,cAAA,OAAKC,UAAU,SAAf,4BACAF,EAAAH,EAAAI,cAAA,OAAKC,UAAU,WAEP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AjL,EAAAI,cAAA,OAAKC,UAAU,UACX4K,EAAAjL,EAAAI,cAAA8K,EAAAlL,EAAA,CACIuB,MAAOlC,KAAKP,MAAMyC,MAClBmH,kBAAgB,EAChBa,WAAY,IACZK,IAAI,SACJxD,OAAO,EACPD,SAAU9G,KAAKP,MAAMmD,aACrBoH,YAAY,8BAEpB4B,EAAAjL,EAAAI,cAAA,OAAKC,UAAU,kBAAkB6J,QAAS7K,KAAKqL,QAC3CO,EAAAjL,EAAAI,cAAA,OAAKC,UAAU,cAAf,yBAxCKwC,kBAgDV5B,gBAAWsJ","file":"static/js/SearchResult.fff53593.chunk.js","sourcesContent":["import React, { Component } from \"react\";\nimport {connect} from 'react-redux';\nimport './recommendation.scss'\nimport { Course } from \"@/common\";\nimport { http } from \"@/utils\";\nimport { Toast } from 'antd-mobile'\nimport {withRouter} from 'react-router-dom'\nimport {getCourses} from './../../detail/actions';\n\n@connect()\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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) => {\n const Bottom = (\n <div className='bottom'>\n <span className='price'>{item['price1']}</span>\n <span className='old-price'>{item['price0']}</span>\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 toDetail={this.toCourseDetail}\n />\n )\n })\n }\n\n </div>\n </div>\n )\n }\n}\n\nexport default withRouter(Recommendation)\n","import React, { PureComponent } from 'react';\nimport {connect} from 'react-redux';\nimport SearchHeader from './searchHead'\nimport VList from '@/common/VList'\nimport { http, getParam } from '@/utils'\nimport './search-result.scss'\nimport Recommendation from './recommendation'\nimport {getCourses} from './../detail/actions';\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@connect()\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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\n img={item.image_name}\n toDetail={this.toCourseDetail}\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 <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","connect","state","courses","toCourseDetail","id","_this$props","_this","props","dispatch","history","getCourses","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","Bottom","common","key","img","title","bottom","toDetail","Component","withRouter","_ref","price1","price0","SearchResult","courseList","value","searchHistory","JSON","parse","localStorage","getItem","word","course","handleClick","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$searchHis","setItem","stringify","_Users_zhanghaozhe_server_mr_julyedu_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":"kTAUMA,EADLC,2NAGGC,MAAQ,CACJC,QAAS,MAsBbC,eAAiB,SAACC,GAAO,IAAAC,EACSC,EAAKC,MAA3BC,EADaH,EACbG,SAAUC,EADGJ,EACHI,QAClBD,EAASE,YAAWN,EAAI,WACpBK,EAAQE,KAAR,cAAAC,OAA2BR,2FAtBf,IAAAS,EAAAC,KAChBC,IAAKC,IAAL,GAAAJ,OAAYK,IAAI,cAAhB,qBACKC,KAAK,SAAAC,GACqB,IAAnBA,EAAIC,KAAKC,MACTR,EAAKS,SAAS,CACVpB,QAASiB,EAAIC,KAAKA,KAAKG,KAAKrB,UAGhCsB,EAAAC,EAAMF,KAAKJ,EAAIC,KAAKM,wCAkB3B,IAAAC,EAAAb,KACEZ,EAAWY,KAAKb,MAAhBC,QACP,OACI0B,EAAAH,EAAAI,cAAA,OAAKC,UAAU,kBACXF,EAAAH,EAAAI,cAAA,OAAKC,UAAU,SAAf,4BACAF,EAAAH,EAAAI,cAAA,OAAKC,UAAU,WAEP5B,EAAQ6B,OAAS,GACjB7B,EAAQ8B,IAAI,SAACC,GACT,IAAMC,EACFN,EAAAH,EAAAI,cAAA,OAAKC,UAAU,UACXF,E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MAClBmH,kBAAgB,EAChBa,WAAY,IACZK,IAAI,SACJxD,OAAO,EACPD,SAAU9G,KAAKP,MAAMmD,aACrBoH,YAAY,8BAEpB4B,EAAAjL,EAAAI,cAAA,OAAKC,UAAU,kBAAkB6J,QAAS7K,KAAKqL,QAC3CO,EAAAjL,EAAAI,cAAA,OAAKC,UAAU,cAAf,yBAxCKwC,kBAgDV5B,gBAAWsJ","file":"static/js/SearchResult.4d0783a4.chunk.js","sourcesContent":["import React, { Component } from \"react\";\nimport {connect} from 'react-redux';\nimport './recommendation.scss'\nimport { Course } from \"@/common\";\nimport { http } from \"@/utils\";\nimport { Toast } from 'antd-mobile'\nimport {withRouter} from 'react-router-dom'\nimport {getCourses} from './../../detail/actions';\n\n@connect()\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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) => {\n const Bottom = (\n <div className='bottom'>\n <span className='price'>{item['price1']}</span>\n <span className='old-price'>{item['price0']}</span>\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 toDetail={this.toCourseDetail}\n />\n )\n })\n }\n\n </div>\n </div>\n )\n }\n}\n\nexport default withRouter(Recommendation)\n","import React, { PureComponent } from 'react';\nimport {connect} from 'react-redux';\nimport SearchHeader from './searchHead'\nimport VList from '@/common/VList'\nimport { http, getParam } from '@/utils'\nimport './search-result.scss'\nimport Recommendation from './recommendation'\nimport {getCourses} from './../detail/actions';\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@connect()\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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\n img={item.image_name}\n toDetail={this.toCourseDetail}\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 <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],{1178:function(e,t,a){"use strict";a.r(t);a(737);var c=a(738),n=a.n(c),r=a(23),s=(a(43),a(14)),o=a.n(s),i=a(7),l=a(8),u=a(11),d=a(9),h=a(10),m=(a(257),a(99)),p=a.n(m),f=a(0),v=a.n(f),g=a(20),k=a(30),E=a(64),b=a(19),N=a(158),j=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).state={val:e.item.value},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"onChange",value:function(e,t){var a=e.target.checked;this.props.checkChange(t,a)}},{key:"render",value:function(){var e=this,t=this.props.item,a=v.a.createElement("div",{className:"order-info"},v.a.createElement("p",{className:"order-title text-overflow-one",onClick:function(){return e.props.toDetail(t.course_id)}},t.course_title),v.a.createElement("p",{className:"order-content text-overflow-2"},t.simpledescription),v.a.createElement("p",{className:"order-des"},v.a.createElement("span",{className:"order-newprice"},"\xa5",t.price1),v.a.createElement("span",{className:"order-price"},"\xa5",t.price0)));return v.a.createElement("div",{className:"cart-c-item"},v.a.createElement("div",{className:"cart-c-check"},v.a.createElement(n.a,{checked:t.check,onChange:function(a){e.onChange(a,t.course_id)}})),v.a.createElement("div",{className:"card-wrap"},v.a.createElement(N.a,{info:a,src:t.image_name,id:t.course_id,toDetail:this.props.toDetail})))}}]),t}(f.Component),C=function(e){function t(){return Object(i.a)(this,t),Object(u.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-main"},v.a.createElement("div",{className:"cart-c-body"},this.props.data.length>0?this.props.data.map(function(t,a){return v.a.createElement(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,toDetail:e.props.toDetail})}):v.a.createElement("div",{className:"cart-tip"},v.a.createElement("p",{className:"cart-mess"},"\u8fd9\u91cc\u662f\u7a7a\u7684\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),v.a.createElement(b.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(f.Component),O=(a(901),a(15)),y=a.n(O),I=a(4),w=a(45),D=p.a.alert,S=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).getList=function(){I.c.get("".concat(API.home,"/m/cart/list")).then(function(e){200===e.data.code?a.setState({data:e.data.data.courses,isLoading:!1}):o.a.info(e.data.msg,2)})},a.tobuy=function(){console.log(a.state.courseIdarr),I.c.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(a.state.courseIdarr,"]")).then(function(e){0==e.data.errno?a.props.history.push("/order?id=[".concat(a.state.courseIdarr,"]"),{simple:1}):o.a.info(e.data.msg,2)})},a.todelete=function(){a.state.courseIdarr.length>0&&D("","\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():o.a.info(e.data.msg,2)})}}])},a.toCourseDetail=function(e){console.log(e);var t=a.props,c=t.dispatch,n=t.history;c(Object(w.d)(e,function(){n.push("/detail?id=".concat(e))}))},a.state={data:[],checkedNum:0,allPrice:0,cartNmu:0,courseIdarr:[],isLoading:!0},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"allChange",value:function(e){var t=e.target.checked,a=this.state.data.map(function(e,a){return Object(r.a)({},e,{check:t})});if(this.setState({data:a}),this.calc(a),t){var c=[];a.map(function(e,t){c.push(e.course_id)}),this.setState({courseIdarr:c})}else this.setState({courseIdarr:[]})}},{key:"checkChange",value:function(e,t){var a=this,c=this.state.data.map(function(a,c){return a.course_id===e?Object(r.a)({},a,{check:t}):a});this.setState({data:c}),this.calc(c);var n=[];c.forEach(function(e,t){e.check?(n.push(e.course_id),a.setState({courseIdarr:n})):a.setState({courseIdarr:n})})}},{key:"calc",value:function(e){var t=0,a=0,c=0,n=[];e.forEach(function(e,r){e.check&&(n.push(e),c+=1,a=n.length,t+=parseFloat(e.price1))}),this.setState({checkedNum:a,allPrice:t,cartNmu:c})}},{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-page",style:{overflow:"hidden"}},v.a.createElement(k.e,{title:"\u8d2d\u7269\u8f66",arrow:!0,cart:!1,delete:!0,toDelete:this.todelete}),v.a.createElement(E.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"cart-body"},v.a.createElement(C,{checkChange:this.checkChange.bind(this),data:this.state.data,toDetail:this.toCourseDetail}),v.a.createElement("div",{className:"cart-footer"},v.a.createElement("div",{className:"cart-label"},v.a.createElement(n.a,{onChange:function(t){e.allChange(t)}}),v.a.createElement("div",null,"\u5168\u9009")),v.a.createElement("div",{className:"all-pirce"},v.a.createElement("p",null,v.a.createElement("span",null,"\u5408\u8ba1\uff1a"),v.a.createElement("span",null,"\uffe5",this.state.allPrice))),v.a.createElement("div",{className:y()({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)},901:function(e,t,a){}}]);
//# sourceMappingURL=ShopCart.176f2726.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{1178:function(e,t,a){"use strict";a.r(t);a(737);var c=a(738),n=a.n(c),r=a(23),s=(a(43),a(14)),o=a.n(s),i=a(7),l=a(8),u=a(11),d=a(9),h=a(10),m=(a(257),a(99)),p=a.n(m),f=a(0),v=a.n(f),g=a(20),k=a(30),E=a(64),b=a(18),N=a(158),j=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).state={val:e.item.value},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"onChange",value:function(e,t){var a=e.target.checked;this.props.checkChange(t,a)}},{key:"render",value:function(){var e=this,t=this.props.item,a=v.a.createElement("div",{className:"order-info"},v.a.createElement("p",{className:"order-title text-overflow-one",onClick:function(){return e.props.toDetail(t.course_id)}},t.course_title),v.a.createElement("p",{className:"order-content text-overflow-2"},t.simpledescription),v.a.createElement("p",{className:"order-des"},v.a.createElement("span",{className:"order-newprice"},"\xa5",t.price1),v.a.createElement("span",{className:"order-price"},"\xa5",t.price0)));return v.a.createElement("div",{className:"cart-c-item"},v.a.createElement("div",{className:"cart-c-check"},v.a.createElement(n.a,{checked:t.check,onChange:function(a){e.onChange(a,t.course_id)}})),v.a.createElement("div",{className:"card-wrap"},v.a.createElement(N.a,{info:a,src:t.image_name,id:t.course_id,toDetail:this.props.toDetail})))}}]),t}(f.Component),C=function(e){function t(){return Object(i.a)(this,t),Object(u.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-main"},v.a.createElement("div",{className:"cart-c-body"},this.props.data.length>0?this.props.data.map(function(t,a){return v.a.createElement(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,toDetail:e.props.toDetail})}):v.a.createElement("div",{className:"cart-tip"},v.a.createElement("p",{className:"cart-mess"},"\u8fd9\u91cc\u662f\u7a7a\u7684\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),v.a.createElement(b.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(f.Component),O=(a(901),a(15)),y=a.n(O),I=a(4),w=a(45),D=p.a.alert,S=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).getList=function(){I.c.get("".concat(API.home,"/m/cart/list")).then(function(e){200===e.data.code?a.setState({data:e.data.data.courses,isLoading:!1}):o.a.info(e.data.msg,2)})},a.tobuy=function(){console.log(a.state.courseIdarr),I.c.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(a.state.courseIdarr,"]")).then(function(e){0==e.data.errno?a.props.history.push("/order?id=[".concat(a.state.courseIdarr,"]"),{simple:1}):o.a.info(e.data.msg,2)})},a.todelete=function(){a.state.courseIdarr.length>0&&D("","\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():o.a.info(e.data.msg,2)})}}])},a.toCourseDetail=function(e){console.log(e);var t=a.props,c=t.dispatch,n=t.history;c(Object(w.d)(e,function(){n.push("/detail?id=".concat(e))}))},a.state={data:[],checkedNum:0,allPrice:0,cartNmu:0,courseIdarr:[],isLoading:!0},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"allChange",value:function(e){var t=e.target.checked,a=this.state.data.map(function(e,a){return Object(r.a)({},e,{check:t})});if(this.setState({data:a}),this.calc(a),t){var c=[];a.map(function(e,t){c.push(e.course_id)}),this.setState({courseIdarr:c})}else this.setState({courseIdarr:[]})}},{key:"checkChange",value:function(e,t){var a=this,c=this.state.data.map(function(a,c){return a.course_id===e?Object(r.a)({},a,{check:t}):a});this.setState({data:c}),this.calc(c);var n=[];c.forEach(function(e,t){e.check?(n.push(e.course_id),a.setState({courseIdarr:n})):a.setState({courseIdarr:n})})}},{key:"calc",value:function(e){var t=0,a=0,c=0,n=[];e.forEach(function(e,r){e.check&&(n.push(e),c+=1,a=n.length,t+=parseFloat(e.price1))}),this.setState({checkedNum:a,allPrice:t,cartNmu:c})}},{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-page",style:{overflow:"hidden"}},v.a.createElement(k.e,{title:"\u8d2d\u7269\u8f66",arrow:!0,cart:!1,delete:!0,toDelete:this.todelete}),v.a.createElement(E.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"cart-body"},v.a.createElement(C,{checkChange:this.checkChange.bind(this),data:this.state.data,toDetail:this.toCourseDetail}),v.a.createElement("div",{className:"cart-footer"},v.a.createElement("div",{className:"cart-label"},v.a.createElement(n.a,{onChange:function(t){e.allChange(t)}}),v.a.createElement("div",null,"\u5168\u9009")),v.a.createElement("div",{className:"all-pirce"},v.a.createElement("p",null,v.a.createElement("span",null,"\u5408\u8ba1\uff1a"),v.a.createElement("span",null,"\uffe5",this.state.allPrice))),v.a.createElement("div",{className:y()({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)},901:function(e,t,a){}}]);
//# sourceMappingURL=ShopCart.4aa986c1.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","onClick","toDetail","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","react_router_dom","to","alert","modal_default","Cart","getList","http","get","concat","API","home","then","res","code","setState","courses","isLoading","toast_default","msg","tobuy","console","log","courseIdarr","errno","history","push","simple","todelete","text","onPress","course_ids","post","toCourseDetail","_this$props","dispatch","getCourses","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","connect"],"mappings":"y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3D,EAAAC,EAAAC,cAAA,OAAKC,UAAU,eACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,cACXH,EAAAC,EAAAC,cAAAS,EAAAV,EAAA,CAAUY,SAAU,SAACpB,GACjBgF,EAAKY,UAAU5F,MAEnBO,EAAAC,EAAAC,cAAA,4BAEJF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,aACXH,EAAAC,EAAAC,cAAA,SACIF,EAAAC,EAAAC,cAAA,kCACAF,EAAAC,EAAAC,cAAA,qBAAQjB,KAAKI,MAAM2E,YAG3BhE,EAAAC,EAAAC,cAAA,OAAKC,UAAWmF,IAAW,CACvBC,OAAUtG,KAAKI,MAAM0E,WAAa,IAClC3D,QAAS,WACLqE,EAAKpF,MAAM0E,WAAa,GACxBU,EAAK3B,UAJb,eAOM9C,EAAAC,EAAAC,cAAA,kBAAUjB,KAAKI,MAAM0E,WAArB,mBApMf7C,aAiNJsE,wBAAUzD","file":"static/js/ShopCart.176f2726.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' onClick={()=>this.props.toDetail(item.course_id)}>\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\n {item.course_title}\n {/* </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 \n info={Info} \n src={item.image_name} \n id={item.course_id}\n toDetail={this.props.toDetail}\n ></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'\n\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} \n item={item}\n toDetail={this.props.toDetail}\n />\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 {http} from \"@/utils\";\nimport {getCourses} from './../detail/actions';\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}]`,{simple: 1})\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 toCourseDetail = (id) => {\n console.log(id);\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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\n checkChange={this.checkChange.bind(this)}\n data={this.state.data}\n toDetail={this.toCourseDetail}\n />\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","onClick","toDetail","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","react_router_dom","to","alert","modal_default","Cart","getList","http","get","concat","API","home","then","res","code","setState","courses","isLoading","toast_default","msg","tobuy","console","log","courseIdarr","errno","history","push","simple","todelete","text","onPress","course_ids","post","toCourseDetail","_this$props","dispatch","getCourses","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","connect"],"mappings":"yRA0DeA,cAlDX,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF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GACjBgF,EAAKY,UAAU5F,MAEnBO,EAAAC,EAAAC,cAAA,4BAEJF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,aACXH,EAAAC,EAAAC,cAAA,SACIF,EAAAC,EAAAC,cAAA,kCACAF,EAAAC,EAAAC,cAAA,qBAAQjB,KAAKI,MAAM2E,YAG3BhE,EAAAC,EAAAC,cAAA,OAAKC,UAAWmF,IAAW,CACvBC,OAAUtG,KAAKI,MAAM0E,WAAa,IAClC3D,QAAS,WACLqE,EAAKpF,MAAM0E,WAAa,GACxBU,EAAK3B,UAJb,eAOM9C,EAAAC,EAAAC,cAAA,kBAAUjB,KAAKI,MAAM0E,WAArB,mBApMf7C,aAiNJsE,wBAAUzD","file":"static/js/ShopCart.4aa986c1.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' onClick={()=>this.props.toDetail(item.course_id)}>\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\n {item.course_title}\n {/* </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 \n info={Info} \n src={item.image_name} \n id={item.course_id}\n toDetail={this.props.toDetail}\n ></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'\n\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} \n item={item}\n toDetail={this.props.toDetail}\n />\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 {http} from \"@/utils\";\nimport {getCourses} from './../detail/actions';\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}]`,{simple: 1})\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 toCourseDetail = (id) => {\n console.log(id);\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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\n checkChange={this.checkChange.bind(this)}\n data={this.state.data}\n toDetail={this.toCourseDetail}\n />\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([[12],{1153:function(e,a,t){},1173:function(e,a,t){"use strict";t.r(a);var s=t(7),c=t(8),n=t(11),r=t(9),l=t(10),i=t(0),m=t.n(i),o=(t(1153),t(159)),d=t(4),u=(t(145),t(19)),v=function(e){function a(){var e,t;Object(s.a)(this,a);for(var c=arguments.length,l=new Array(c),i=0;i<c;i++)l[i]=arguments[i];return(t=Object(n.a)(this,(e=Object(r.a)(a)).call.apply(e,[this].concat(l)))).state={course:{title:"",des:"",img:"",id:""},progress:{days:0,action:0},showShareCover:!0,user:{avatar:"",name:"",time:""}},t}return Object(l.a)(a,e),Object(c.a)(a,[{key:"componentDidMount",value:function(){var e=this,a=new URLSearchParams(this.props.location.search);d.c.get("".concat(API["base-api"],"/m/aist/share_ground_data/").concat(a.get("id"),"/").concat(a.get("vId"))).then(function(a){if(200==a.data.errno){var t=a.data.data;e.setState({course:{title:t.course_title,des:t.course_desc,img:t.image_name,id:t.course_id},user:{avatar:t.avatar,name:t.username,time:t.create_time},progress:{days:t.learn_day_num,action:t.action_power}}),Object(d.h)({title:t.share_title,desc:t.share_desc,imgUrl:t.image_name,link:location.href})}})}},{key:"render",value:function(){var e=this.state,a=e.user,t=e.course,s=e.progress;return m.a.createElement("div",{className:"aist-share"},m.a.createElement("div",{className:"content"},m.a.createElement("div",{className:"user"},m.a.createElement("img",{src:a.avatar,alt:"\u5934\u50cf"}),m.a.createElement("span",{className:"username"},a.name),m.a.createElement("span",{className:"time"},a.time)),m.a.createElement(u.b,{to:{pathname:"/detail",search:"?id=".concat(this.state.course.id)}},m.a.createElement("div",{className:"course"},m.a.createElement("div",{className:"course-cover"},m.a.createElement("img",{src:t.img,alt:"\u8bfe\u7a0b\u5c01\u9762"})),m.a.createElement("div",{className:"course-info"},m.a.createElement("div",{className:"title"},t.title),m.a.createElement("div",{className:"des"},t.des)))),m.a.createElement("ul",{className:"progress"},m.a.createElement("li",null,m.a.createElement("div",{className:"title"},"\u7d2f\u8ba1\u5b66\u4e60"),m.a.createElement("div",{className:"progress-value"},m.a.createElement("span",{className:"num"},s.days),"\u5929")),m.a.createElement("li",null,m.a.createElement("div",{className:"title"},"\u884c\u52a8\u529b\u8d85\u8fc7"),m.a.createElement("div",{className:"progress-value"},m.a.createElement("span",{className:"num"},s.action),"%"))),m.a.createElement("div",{className:"recommend-app"},m.a.createElement("div",{className:"text"},m.a.createElement("div",{className:"bold"},m.a.createElement("div",null,"\u7acb\u5373\u4e0b\u8f7d\u3010\u4e03\u6708\u5728\u7ebf\u3011"),m.a.createElement("div",null,"\u4f17\u591a\u597d\u8bfe\u514d\u8d39\u5b66")),m.a.createElement("div",{className:"light"},"\u957f\u6309\u8bc6\u522b\u53f3\u4fa7\u4e8c\u7ef4\u7801",m.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/aist/arrow.png",alt:""}))),m.a.createElement("div",{className:"qrcode"},m.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_app.png",alt:""})))))}}]),a}(i.PureComponent);a.default=Object(o.a)(v)}}]);
//# sourceMappingURL=aist-share.26bcdb95.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{1153:function(e,a,t){},1173:function(e,a,t){"use strict";t.r(a);var s=t(7),c=t(8),n=t(11),r=t(9),l=t(10),i=t(0),m=t.n(i),o=(t(1153),t(159)),d=t(4),u=(t(145),t(18)),v=function(e){function a(){var e,t;Object(s.a)(this,a);for(var c=arguments.length,l=new Array(c),i=0;i<c;i++)l[i]=arguments[i];return(t=Object(n.a)(this,(e=Object(r.a)(a)).call.apply(e,[this].concat(l)))).state={course:{title:"",des:"",img:"",id:""},progress:{days:0,action:0},showShareCover:!0,user:{avatar:"",name:"",time:""}},t}return Object(l.a)(a,e),Object(c.a)(a,[{key:"componentDidMount",value:function(){var e=this,a=new URLSearchParams(this.props.location.search);d.c.get("".concat(API["base-api"],"/m/aist/share_ground_data/").concat(a.get("id"),"/").concat(a.get("vId"))).then(function(a){if(200==a.data.errno){var t=a.data.data;e.setState({course:{title:t.course_title,des:t.course_desc,img:t.image_name,id:t.course_id},user:{avatar:t.avatar,name:t.username,time:t.create_time},progress:{days:t.learn_day_num,action:t.action_power}}),Object(d.h)({title:t.share_title,desc:t.share_desc,imgUrl:t.image_name,link:location.href})}})}},{key:"render",value:function(){var e=this.state,a=e.user,t=e.course,s=e.progress;return m.a.createElement("div",{className:"aist-share"},m.a.createElement("div",{className:"content"},m.a.createElement("div",{className:"user"},m.a.createElement("img",{src:a.avatar,alt:"\u5934\u50cf"}),m.a.createElement("span",{className:"username"},a.name),m.a.createElement("span",{className:"time"},a.time)),m.a.createElement(u.b,{to:{pathname:"/detail",search:"?id=".concat(this.state.course.id)}},m.a.createElement("div",{className:"course"},m.a.createElement("div",{className:"course-cover"},m.a.createElement("img",{src:t.img,alt:"\u8bfe\u7a0b\u5c01\u9762"})),m.a.createElement("div",{className:"course-info"},m.a.createElement("div",{className:"title"},t.title),m.a.createElement("div",{className:"des"},t.des)))),m.a.createElement("ul",{className:"progress"},m.a.createElement("li",null,m.a.createElement("div",{className:"title"},"\u7d2f\u8ba1\u5b66\u4e60"),m.a.createElement("div",{className:"progress-value"},m.a.createElement("span",{className:"num"},s.days),"\u5929")),m.a.createElement("li",null,m.a.createElement("div",{className:"title"},"\u884c\u52a8\u529b\u8d85\u8fc7"),m.a.createElement("div",{className:"progress-value"},m.a.createElement("span",{className:"num"},s.action),"%"))),m.a.createElement("div",{className:"recommend-app"},m.a.createElement("div",{className:"text"},m.a.createElement("div",{className:"bold"},m.a.createElement("div",null,"\u7acb\u5373\u4e0b\u8f7d\u3010\u4e03\u6708\u5728\u7ebf\u3011"),m.a.createElement("div",null,"\u4f17\u591a\u597d\u8bfe\u514d\u8d39\u5b66")),m.a.createElement("div",{className:"light"},"\u957f\u6309\u8bc6\u522b\u53f3\u4fa7\u4e8c\u7ef4\u7801",m.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/aist/arrow.png",alt:""}))),m.a.createElement("div",{className:"qrcode"},m.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_app.png",alt:""})))))}}]),a}(i.PureComponent);a.default=Object(o.a)(v)}}]);
//# sourceMappingURL=aist-share.f41ca3e6.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/share-page/aist-share/index.js"],"names":["AistShare","state","course","title","des","img","id","progress","days","action","showShareCover","user","avatar","name","time","_this2","this","search","URLSearchParams","props","location","http","get","concat","API","then","res","data","errno","setState","course_title","course_desc","image_name","course_id","username","create_time","learn_day_num","action_power","wxShare","share_title","desc","share_desc","imgUrl","link","href","_this$state","react__WEBPACK_IMPORTED_MODULE_5___default","a","createElement","className","src","alt","react_router_dom__WEBPACK_IMPORTED_MODULE_10__","to","pathname","PureComponent","withFullSize"],"mappings":"8NAOMA,6MACFC,MAAQ,CACJC,OAAQ,CACJC,MAAO,GACPC,IAAK,GACLC,IAAK,GACLC,GAAI,IAERC,SAAU,CACNC,KAAM,EACNC,OAAQ,GAEZC,gBAAgB,EAChBC,KAAM,CACFC,OAAQ,GACRC,KAAM,GACNC,KAAM,wFAIM,IAAAC,EAAAC,KACVC,EAAS,IAAIC,gBAAgBF,KA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OAAKE,IAAKhD,EAAOG,IAAK8C,IAAI,8BAE9BL,EAAAC,EAAAC,cAAA,OAAKC,UAAU,eACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SAAS/C,EAAOC,OAC/B2C,EAAAC,EAAAC,cAAA,OAAKC,UAAU,OAAO/C,EAAOE,QAIzC0C,EAAAC,EAAAC,cAAA,MAAIC,UAAU,YACVH,EAAAC,EAAAC,cAAA,UACIF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SAAf,4BACAH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,kBAAiBH,EAAAC,EAAAC,cAAA,QAAMC,UAAU,OAAO1C,EAASC,MAAhE,WAEJsC,EAAAC,EAAAC,cAAA,UACIF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SAAf,kCACAH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,kBAAiBH,EAAAC,EAAAC,cAAA,QAAMC,UAAU,OAAO1C,EAASE,QAAhE,OAGRqC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,iBACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,QACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,QACXH,EAAAC,EAAAC,cAAA,2EACAF,EAAAC,EAAAC,cAAA,0DAEJF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SAAf,yDAEIH,EAAAC,EAAAC,cAAA,OAAKE,IAAI,gFACJC,IAAI,OAGjBL,EAAAC,EAAAC,cAAA,OAAKC,UAAU,UACXH,EAAAC,EAAAC,cAAA,OAAKE,IAAI,+EACJC,IAAI,gBApGbI,iBA6GTC,sBAAaxD","file":"static/js/aist-share.26bcdb95.chunk.js","sourcesContent":["import React, { PureComponent } from 'react';\nimport './aist-share.scss'\nimport withFullSize from '@/HOCs/WithFullSize'\nimport { http, wxShare } from \"@/utils\";\nimport { getWXObject } from \"@/utils/wechat/base\";\nimport {Link} from \"react-router-dom\";\n\nclass AistShare extends PureComponent {\n state = {\n course: {\n title: '',\n des: '',\n img: '',\n id: ''\n },\n progress: {\n days: 0,\n action: 0\n },\n showShareCover: true,\n user: {\n avatar: '',\n name: '',\n time: ''\n }\n }\n\n componentDidMount() {\n const search = new URLSearchParams(this.props.location.search);\n http.get(`${API['base-api']}/m/aist/share_ground_data/${search.get('id')}/${search.get('vId')}`)\n .then(res => {\n if (res.data.errno == 200) {\n const data = res.data.data;\n this.setState({\n course: {\n title: data.course_title,\n des: data.course_desc,\n img: data.image_name,\n id: data.course_id\n },\n user: {\n avatar: data.avatar,\n name: data.username,\n time: data.create_time\n },\n progress: {\n days: data.learn_day_num,\n action: data.action_power\n }\n })\n wxShare({\n title: data.share_title,\n desc: data.share_desc,\n imgUrl: data.image_name,\n link: location.href\n })\n }\n\n })\n }\n\n\n render() {\n const {user, course, progress} = this.state\n return (\n <div className='aist-share'>\n <div className=\"content\">\n <div className=\"user\">\n <img src={user.avatar} alt=\"头像\"/>\n <span className=\"username\">{user.name}</span>\n <span className=\"time\">{user.time}</span>\n </div>\n <Link to={{pathname: '/detail', search: `?id=${this.state.course.id}`}}>\n <div className=\"course\">\n <div className=\"course-cover\">\n <img src={course.img} alt=\"课程封面\"/>\n </div>\n <div className=\"course-info\">\n <div className=\"title\">{course.title}</div>\n <div className=\"des\">{course.des}</div>\n </div>\n </div>\n </Link>\n <ul className=\"progress\">\n <li>\n <div className=\"title\">累计学习</div>\n <div className=\"progress-value\"><span className=\"num\">{progress.days}</span>天</div>\n </li>\n <li>\n <div className=\"title\">行动力超过</div>\n <div className=\"progress-value\"><span className=\"num\">{progress.action}</span>%</div>\n </li>\n </ul>\n <div className=\"recommend-app\">\n <div className=\"text\">\n <div className=\"bold\">\n <div>立即下载【七月在线】</div>\n <div>众多好课免费学</div>\n </div>\n <div className=\"light\">\n 长按识别右侧二维码\n <img src=\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/aist/arrow.png\"\n alt=\"\"/>\n </div>\n </div>\n <div className=\"qrcode\">\n <img src=\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_app.png\"\n alt=\"\"/>\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default withFullSize(AistShare);"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/share-page/aist-share/index.js"],"names":["AistShare","state","course","title","des","img","id","progress","days","action","showShareCover","user","avatar","name","time","_this2","this","search","URLSearchParams","props","location","http","get","concat","API","then","res","data","errno","setState","course_title","course_desc","image_name","course_id","username","create_time","learn_day_num","action_power","wxShare","share_title","desc","share_desc","imgUrl","link","href","_this$state","react__WEBPACK_IMPORTED_MODULE_5___default","a","createElement","className","src","alt","react_router_dom__WEBPACK_IMPORTED_MODULE_10__","to","pathname","PureComponent","withFullSize"],"mappings":"8NAOMA,6MACFC,MAAQ,CACJC,OAAQ,CACJC,MAAO,GACPC,IAAK,GACLC,IAAK,GACLC,GAAI,IAERC,SAAU,CACNC,KAAM,EACNC,OAAQ,GAEZC,gBAAgB,EAChBC,KAAM,CACFC,OAAQ,GACRC,KAAM,GACNC,KAAM,wFAIM,IAAAC,EAAAC,KACVC,EAAS,IAAIC,gBAAgBF,KAAKG,MAAMC,SAASH,QACvDI,IAAKC,IAAL,GAAAC,OAAYC,IAAI,YAAhB,8BAAAD,OAAwDN,EAAOK,IAAI,MAAnE,KAAAC,OAA4EN,EAAOK,IAAI,SAClFG,KAAK,SAAAC,GACF,GAAsB,KAAlBA,EAAIC,KAAKC,MAAc,CACvB,IAAMD,EAAOD,EAAIC,KAAKA,KACtBZ,EAAKc,SAAS,CACV3B,OAAQ,CACJC,MAAOwB,EAAKG,aACZ1B,IAAKuB,EAAKI,YACV1B,IAAKsB,EAAKK,WACV1B,GAAIqB,EAAKM,WAEbtB,KAAM,CACFC,OAAQe,EAAKf,OACbC,KAAMc,EAAKO,SACXpB,KAAMa,EAAKQ,aAEf5B,SAAU,CACNC,KAAMmB,EAAKS,cACX3B,OAAQkB,EAAKU,gBAGrBC,YAAQ,CACJnC,MAAOwB,EAA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U,kBAAiBH,EAAAC,EAAAC,cAAA,QAAMC,UAAU,OAAO1C,EAASE,QAAhE,OAGRqC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,iBACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,QACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,QACXH,EAAAC,EAAAC,cAAA,2EACAF,EAAAC,EAAAC,cAAA,0DAEJF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SAAf,yDAEIH,EAAAC,EAAAC,cAAA,OAAKE,IAAI,gFACJC,IAAI,OAGjBL,EAAAC,EAAAC,cAAA,OAAKC,UAAU,UACXH,EAAAC,EAAAC,cAAA,OAAKE,IAAI,+EACJC,IAAI,gBApGbI,iBA6GTC,sBAAaxD","file":"static/js/aist-share.f41ca3e6.chunk.js","sourcesContent":["import React, { PureComponent } from 'react';\nimport './aist-share.scss'\nimport withFullSize from '@/HOCs/WithFullSize'\nimport { http, wxShare } from \"@/utils\";\nimport { getWXObject } from \"@/utils/wechat/base\";\nimport {Link} from \"react-router-dom\";\n\nclass AistShare extends PureComponent {\n state = {\n course: {\n title: '',\n des: '',\n img: '',\n id: ''\n },\n progress: {\n days: 0,\n action: 0\n },\n showShareCover: true,\n user: {\n avatar: '',\n name: '',\n time: ''\n }\n }\n\n componentDidMount() {\n const search = new URLSearchParams(this.props.location.search);\n http.get(`${API['base-api']}/m/aist/share_ground_data/${search.get('id')}/${search.get('vId')}`)\n .then(res => {\n if (res.data.errno == 200) {\n const data = res.data.data;\n this.setState({\n course: {\n title: data.course_title,\n des: data.course_desc,\n img: data.image_name,\n id: data.course_id\n },\n user: {\n avatar: data.avatar,\n name: data.username,\n time: data.create_time\n },\n progress: {\n days: data.learn_day_num,\n action: data.action_power\n }\n })\n wxShare({\n title: data.share_title,\n desc: data.share_desc,\n imgUrl: data.image_name,\n link: location.href\n })\n }\n\n })\n }\n\n\n render() {\n const {user, course, progress} = this.state\n return (\n <div className='aist-share'>\n <div className=\"content\">\n <div className=\"user\">\n <img src={user.avatar} alt=\"头像\"/>\n <span className=\"username\">{user.name}</span>\n <span className=\"time\">{user.time}</span>\n </div>\n <Link to={{pathname: '/detail', search: `?id=${this.state.course.id}`}}>\n <div className=\"course\">\n <div className=\"course-cover\">\n <img src={course.img} alt=\"课程封面\"/>\n </div>\n <div className=\"course-info\">\n <div className=\"title\">{course.title}</div>\n <div className=\"des\">{course.des}</div>\n </div>\n </div>\n </Link>\n <ul className=\"progress\">\n <li>\n <div className=\"title\">累计学习</div>\n <div className=\"progress-value\"><span className=\"num\">{progress.days}</span>天</div>\n </li>\n <li>\n <div className=\"title\">行动力超过</div>\n <div className=\"progress-value\"><span className=\"num\">{progress.action}</span>%</div>\n </li>\n </ul>\n <div className=\"recommend-app\">\n <div className=\"text\">\n <div className=\"bold\">\n <div>立即下载【七月在线】</div>\n <div>众多好课免费学</div>\n </div>\n <div className=\"light\">\n 长按识别右侧二维码\n <img src=\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/aist/arrow.png\"\n alt=\"\"/>\n </div>\n </div>\n <div className=\"qrcode\">\n <img src=\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_app.png\"\n alt=\"\"/>\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default withFullSize(AistShare);"],"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.
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{1159:function(e,t,n){"use strict";n.r(t);n(43);var a,o=n(14),r=n.n(o),s=n(7),i=n(8),l=n(11),c=n(9),u=n(10),p=(n(257),n(99)),d=n.n(p),m=n(0),h=n.n(m),f=(n(887),n(30)),v=n(158),g=n(4),b=n(19),y=n(64),E=n(649),L=n.n(E),w=n(38),_=n(45),N=n(20),P=d.a.alert,O=Object(N.b)()(a=function(e){function t(e){var n;return Object(s.a)(this,t),(n=Object(l.a)(this,Object(c.a)(t).call(this,e))).page=1,n.getMore=Object(w.debounce)(function(){n.state.data.length%10===0&&n.getList(++n.page)},200),n.getList=function(){g.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}):r.a.info(e.data.msg,2)})},n.cancel=function(e){P("\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};g.c.post("".concat(API.home,"/m/cancel_order"),t).then(function(e){200===e.data.code?location.reload():r.a.info(e.data.msg,2)})}}])},n.toCourseDetail=function(e){var t=n.props,a=t.dispatch,o=t.history;a(Object(_.d)(e,function(){return o.push("/detail?id=".concat(e)),!1}))},n.state={data:[],pageNum:1,isLoading:!0,total:0},n}return Object(u.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.getList(this.page)}},{key:"render",value:function(){var e=this;return h.a.createElement("div",{className:"myorders-box"},h.a.createElement(f.e,{title:"\u6211\u7684\u8ba2\u5355",arrow:!0,cart:!1}),h.a.createElement(y.a,{isLoading:this.state.isLoading},this.state.data&&"[{}]"!==JSON.stringify(this.state.data)?h.a.createElement(L.a,{pageStart:0,hasMore:!0,loadMore:this.getMore.bind(this),useWindow:!0},this.state.data.map(function(t,n){return h.a.createElement("div",{className:"order-body",key:n},h.a.createElement(S,{item:t}),t.course&&t.course.length>0&&t.course.map(function(t,n){var a=h.a.createElement("div",{className:"order-info"},h.a.createElement("p",{className:"order-title text-overflow-one",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),h.a.createElement("p",{className:"order-content text-overflow-2"},t.description),h.a.createElement("p",{className:"order-des"},h.a.createElement("span",{className:"order-newprice"},"\xa5",t.pay_amount),h.a.createElement("span",{className:"order-price"},"\xa5",t.price0)));return h.a.createElement("div",{className:"order-wrap",key:n},h.a.createElement(v.a,{info:a,src:t.image_name,isSign:t.is_aist,id:t.course_id,toDetail:e.toCourseDetail}))}),h.a.createElement(C,{item:t,cancel:e.cancel}))})," "):h.a.createElement("div",{className:"cart-tip"},h.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8ba2\u5355\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),h.a.createElement(b.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(m.Component))||a;function S(e){var t;return t="0"===e.item.pay_time&&0===e.item.member_num?h.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?h.a.createElement("span",{className:"oid-success"},"\u62fc\u56e2\u6210\u529f"):h.a.createElement("span",{className:"oid-success"},"\u652f\u4ed8\u6210\u529f"),h.a.createElement("div",{className:"order-head"},h.a.createElement("span",{className:"oid-num"},"\u8ba2\u5355\u53f7\uff1a",e.item.oid),t)}function C(e){return h.a.createElement("div",{className:"order-btm"},h.a.createElement("div",{className:"price-info"},h.a.createElement("p",null,h.a.createElement("span",{className:"payable"},"\u5e94\u4ed8\uff1a"),h.a.createElement("span",{className:"price"},"\xa5",e.item.pay_amount)),h.a.createElement("p",null,h.a.createElement("span",{className:"payable"},"\u5df2\u4f18\u60e0\uff1a"),h.a.createElement("span",{className:"price"},"\xa5",e.item.coupon_amount))),"0"===e.item.pay_time&&0===e.item.member_num&&h.a.createElement("div",{className:"btm-right"},h.a.createElement("button",{className:"cancel",onClick:function(t){return e.cancel(e.item.oid)}},"\u53d6\u6d88\u8ba2\u5355"),h.a.createElement(b.b,{to:"/payorder?oid=".concat(e.item.oid)},"\u53bb\u652f\u4ed8")),0!==e.item.member_num&&h.a.createElement("div",{className:"btm-right"},h.a.createElement("div",{className:"group"},e.item.pdd_info&&e.item.pdd_info.length>0&&e.item.pdd_info.map(function(e,t){return h.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=O},649:function(e,t,n){e.exports=n(650)},650: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},887:function(e,t,n){}}]);
//# sourceMappingURL=myorders.68ab62ae.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{1159:function(e,t,n){"use strict";n.r(t);n(43);var a,o=n(14),r=n.n(o),s=n(7),i=n(8),l=n(11),c=n(9),u=n(10),p=(n(257),n(99)),d=n.n(p),m=n(0),h=n.n(m),f=(n(887),n(30)),v=n(158),g=n(4),b=n(18),y=n(64),E=n(649),L=n.n(E),w=n(38),_=n(45),N=n(20),P=d.a.alert,O=Object(N.b)()(a=function(e){function t(e){var n;return Object(s.a)(this,t),(n=Object(l.a)(this,Object(c.a)(t).call(this,e))).page=1,n.getMore=Object(w.debounce)(function(){n.state.data.length%10===0&&n.getList(++n.page)},200),n.getList=function(){g.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}):r.a.info(e.data.msg,2)})},n.cancel=function(e){P("\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};g.c.post("".concat(API.home,"/m/cancel_order"),t).then(function(e){200===e.data.code?location.reload():r.a.info(e.data.msg,2)})}}])},n.toCourseDetail=function(e){var t=n.props,a=t.dispatch,o=t.history;a(Object(_.d)(e,function(){return o.push("/detail?id=".concat(e)),!1}))},n.state={data:[],pageNum:1,isLoading:!0,total:0},n}return Object(u.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.getList(this.page)}},{key:"render",value:function(){var e=this;return h.a.createElement("div",{className:"myorders-box"},h.a.createElement(f.e,{title:"\u6211\u7684\u8ba2\u5355",arrow:!0,cart:!1}),h.a.createElement(y.a,{isLoading:this.state.isLoading},this.state.data&&"[{}]"!==JSON.stringify(this.state.data)?h.a.createElement(L.a,{pageStart:0,hasMore:!0,loadMore:this.getMore.bind(this),useWindow:!0},this.state.data.map(function(t,n){return h.a.createElement("div",{className:"order-body",key:n},h.a.createElement(S,{item:t}),t.course&&t.course.length>0&&t.course.map(function(t,n){var a=h.a.createElement("div",{className:"order-info"},h.a.createElement("p",{className:"order-title text-overflow-one",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),h.a.createElement("p",{className:"order-content text-overflow-2"},t.description),h.a.createElement("p",{className:"order-des"},h.a.createElement("span",{className:"order-newprice"},"\xa5",t.pay_amount),h.a.createElement("span",{className:"order-price"},"\xa5",t.price0)));return h.a.createElement("div",{className:"order-wrap",key:n},h.a.createElement(v.a,{info:a,src:t.image_name,isSign:t.is_aist,id:t.course_id,toDetail:e.toCourseDetail}))}),h.a.createElement(C,{item:t,cancel:e.cancel}))})," "):h.a.createElement("div",{className:"cart-tip"},h.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8ba2\u5355\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),h.a.createElement(b.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(m.Component))||a;function S(e){var t;return t="0"===e.item.pay_time&&0===e.item.member_num?h.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?h.a.createElement("span",{className:"oid-success"},"\u62fc\u56e2\u6210\u529f"):h.a.createElement("span",{className:"oid-success"},"\u652f\u4ed8\u6210\u529f"),h.a.createElement("div",{className:"order-head"},h.a.createElement("span",{className:"oid-num"},"\u8ba2\u5355\u53f7\uff1a",e.item.oid),t)}function C(e){return h.a.createElement("div",{className:"order-btm"},h.a.createElement("div",{className:"price-info"},h.a.createElement("p",null,h.a.createElement("span",{className:"payable"},"\u5e94\u4ed8\uff1a"),h.a.createElement("span",{className:"price"},"\xa5",e.item.pay_amount)),h.a.createElement("p",null,h.a.createElement("span",{className:"payable"},"\u5df2\u4f18\u60e0\uff1a"),h.a.createElement("span",{className:"price"},"\xa5",e.item.coupon_amount))),"0"===e.item.pay_time&&0===e.item.member_num&&h.a.createElement("div",{className:"btm-right"},h.a.createElement("button",{className:"cancel",onClick:function(t){return e.cancel(e.item.oid)}},"\u53d6\u6d88\u8ba2\u5355"),h.a.createElement(b.b,{to:"/payorder?oid=".concat(e.item.oid)},"\u53bb\u652f\u4ed8")),0!==e.item.member_num&&h.a.createElement("div",{className:"btm-right"},h.a.createElement("div",{className:"group"},e.item.pdd_info&&e.item.pdd_info.length>0&&e.item.pdd_info.map(function(e,t){return h.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=O},649:function(e,t,n){e.exports=n(650)},650: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},887:function(e,t,n){}}]);
//# sourceMappingURL=myorders.1dff2efc.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","connect","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_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","toCourseDetail","id","_this$props","dispatch","history","getCourses","push","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__","JSON","stringify","react_infinite_scroller__WEBPACK_IMPORTED_MODULE_16___default","pageStart","hasMore","loadMore","bind","useWindow","map","item","index","key","OrderInfo","course","Info","onClick","course_id","course_title","description","pay_amount","price0","_common_OrderList__WEBPACK_IMPORTED_MODULE_12__","src","image_name","isSign","is_aist","toDetail","PayInfo","react_router_dom__WEBPACK_IMPORTED_MODULE_14__","to","Component","btn","pay_time","member_num","pdd_info","coupon_amount","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","propTypes","isRequired","bool","func","number","defaultProps"],"mappings":"0SAaMA,EAAQC,EAAAC,EAAMF,MAGdG,EADLC,4BAGG,SAAAD,EAAYE,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAN,IACfG,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAJ,GAAAS,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,EAAA5B,EAAM6B,KAAKL,EAAIT,KAAKe,IAAK,MA7BlB1B,EAoCnB2B,OAAS,SAACC,GACNlC,EAAM,6CAAW,mJAA4B,CACzC,CAACmC,KAAM,eAAMC,QAAS,kBAAMC,QAAQC,IAAI,YACxC,CACIH,KAAM,eACNC,QAAS,WACL,IAAInB,EAAO,CACPs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'\nimport './index.scss'\nimport {HeaderBar} from '../../common'\nimport OrderList from '@/common/OrderList'\nimport {http} 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'\nimport {getCourses} from './../detail/actions';\nimport {connect} from 'react-redux';\n\nconst alert = Modal.alert\n\n@connect()\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`);\n return false;\n }));\n }\n\n\n render() {\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 && JSON.stringify(this.state.data) !== '[{}]'?\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' onClick={() => this.toCourseDetail(item.course_id)}>\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\n {item.course_title}\n {/* </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\n info={Info}\n src={item.image_name}\n isSign={item.is_aist}\n id={item.course_id}\n toDetail={this.toCourseDetail}\n />\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","connect","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_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","toCourseDetail","id","_this$props","dispatch","history","getCourses","push","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__","JSON","stringify","react_infinite_scroller__WEBPACK_IMPORTED_MODULE_16___default","pageStart","hasMore","loadMore","bind","useWindow","map","item","index","key","OrderInfo","course","Info","onClick","course_id","course_title","description","pay_amount","price0","_common_OrderList__WEBPACK_IMPORTED_MODULE_12__","src","image_name","isSign","is_aist","toDetail","PayInfo","react_router_dom__WEBPACK_IMPORTED_MODULE_14__","to","Component","btn","pay_time","member_num","pdd_info","coupon_amount","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","propTypes","isRequired","bool","func","number","defaultProps"],"mappings":"0SAaMA,EAAQC,EAAAC,EAAMF,MAGdG,EADLC,4BAGG,SAAAD,EAAYE,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAN,IACfG,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAJ,GAAAS,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,EAAA5B,EAAM6B,KAAKL,EAAIT,KAAKe,IAAK,MA7BlB1B,EAoCnB2B,OAAS,SAACC,GACNlC,EAAM,6CAAW,mJAA4B,CACzC,CAACmC,KAAM,eAAMC,QAAS,kBAAMC,QAAQC,IAAI,YACxC,CACIH,KAAM,eACNC,QAAS,WACL,IAAInB,EAAO,CACPsB,SAAUL,GAEdd,IAAKoB,KAAL,GAAAlB,OAAaC,IAAIC,KAAjB,mBAAwCP,GAAMQ,KAAK,SAACC,GAC1B,MAAlBA,EAAIT,KAAKU,KACTc,SAASC,SAETZ,EAAA5B,EAAM6B,KAAKL,EAAIT,KAAKe,IAAK,UAjD9B1B,EAyDnBqC,eAAiB,SAACC,GAAO,IAAAC,EACSvC,EAAKD,MAA3ByC,EADaD,EACbC,SAAUC,EADGF,EACHE,QAClBD,EAASE,YAAWJ,EAAI,WAEpB,OADAG,EAA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sD,EAAAC,QAAArC,GAAAoC,EAAAvJ,KAAAmH,GACS3J,KAAA4J,gBACTnB,EAAAsD,EAAAC,QAAAhM,KAAA4J,eAAAmC,EAAAvJ,KAAAxC,KAAA4J,iBAIA/C,EAAAK,QAAArE,cAAA2I,EAAA5L,EAAAmM,OAIA5E,EArPA,GAwPAA,EAAA8E,UAAA,CACAV,SAAAxE,EAAAG,QAAA4E,KAAAI,WACAV,QAAAzE,EAAAG,QAAA4E,KACAtI,QAAAuD,EAAAG,QAAAiF,KACAhC,YAAApD,EAAAG,QAAAiF,KACA1D,UAAA1B,EAAAG,QAAAiF,KACAxC,OAAA5C,EAAAG,QAAA4E,KACArI,SAAAsD,EAAAG,QAAAkF,KAAAF,WACA3I,UAAAwD,EAAAG,QAAAmF,OACAZ,IAAA1E,EAAAG,QAAAkF,KACAlC,gBAAAnD,EAAAG,QAAAkF,KACArB,UAAAhE,EAAAG,QAAAmF,OACA5C,WAAA1C,EAAAG,QAAAiF,KACAxI,UAAAoD,EAAAG,QAAAiF,MAEAhF,EAAAmF,aAAA,CACAd,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.1dff2efc.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport './index.scss'\nimport {HeaderBar} from '../../common'\nimport OrderList from '@/common/OrderList'\nimport {http} 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'\nimport {getCourses} from './../detail/actions';\nimport {connect} from 'react-redux';\n\nconst alert = Modal.alert\n\n@connect()\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`);\n return false;\n }));\n }\n\n\n render() {\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 && JSON.stringify(this.state.data) !== '[{}]'?\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' onClick={() => this.toCourseDetail(item.course_id)}>\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\n {item.course_title}\n {/* </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\n info={Info}\n src={item.image_name}\n isSign={item.is_aist}\n id={item.course_id}\n toDetail={this.toCourseDetail}\n />\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],{1160:function(e,t,a){"use strict";a.r(t);a(43);var s=a(14),i=a.n(s),n=a(7),c=a(8),r=a(11),o=a(9),l=a(10),u=a(0),d=a.n(u),m=(a(888),a(30)),p=a(4),f=a(19),h=a(20),v=a(45),E=a(64),b=function(e){function t(e){var a;return Object(n.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).getList=function(){p.c.get("".concat(API.home,"/m/my/courses")).then(function(e){200===e.data.code?a.setState({data:e.data.data,isLoading:!1}):i.a.info(e.data.msg,2)})},a.toCourseDetail=function(e){var t=a.props,s=t.dispatch,i=t.history;s(Object(v.d)(e,function(){i.push("/detail?id=".concat(e))}))},a.state={data:[],isLoading:!0},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"render",value:function(){var e=this,t=this.props.user,a=t&&t.data&&t.data.uid;return d.a.createElement("div",{className:"purchased-box"},d.a.createElement(m.e,{title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,href:"/my"}),d.a.createElement(E.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?d.a.createElement("div",{className:"purchased-body"},d.a.createElement("div",{className:"tip"},"\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a",a),this.state.data.map(function(t,a){var s=d.a.createElement("div",{className:"info"},d.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),d.a.createElement("p",{className:"contact text-overflow-2"},t.simpledescription),t.is_aist?d.a.createElement("div",{className:"des"},"\u52a9\u6559\u5fae\u4fe1\uff1a",t.assist_weixin):d.a.createElement("div",{className:"des"},"QQ\u7fa4\uff1a",t.course_qq)),i=t.is_aist&&d.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return d.a.createElement(m.i,{key:a,img:t.image_name,id:t.course_id,info:s,status:i,toDetail:e.toCourseDetail})})):d.a.createElement("div",{className:"cart-tip"},d.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),d.a.createElement(f.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(u.Component);t.default=Object(h.b)(function(e){return{user:e.user}},null)(b)},888:function(e,t,a){}}]);
//# sourceMappingURL=purchased.fda2c384.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1160:function(e,t,a){"use strict";a.r(t);a(43);var s=a(14),i=a.n(s),n=a(7),c=a(8),r=a(11),o=a(9),l=a(10),u=a(0),d=a.n(u),m=(a(888),a(30)),p=a(4),f=a(18),h=a(20),v=a(45),E=a(64),b=function(e){function t(e){var a;return Object(n.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).getList=function(){p.c.get("".concat(API.home,"/m/my/courses")).then(function(e){200===e.data.code?a.setState({data:e.data.data,isLoading:!1}):i.a.info(e.data.msg,2)})},a.toCourseDetail=function(e){var t=a.props,s=t.dispatch,i=t.history;s(Object(v.d)(e,function(){i.push("/detail?id=".concat(e))}))},a.state={data:[],isLoading:!0},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"render",value:function(){var e=this,t=this.props.user,a=t&&t.data&&t.data.uid;return d.a.createElement("div",{className:"purchased-box"},d.a.createElement(m.e,{title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,href:"/my"}),d.a.createElement(E.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?d.a.createElement("div",{className:"purchased-body"},d.a.createElement("div",{className:"tip"},"\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a",a),this.state.data.map(function(t,a){var s=d.a.createElement("div",{className:"info"},d.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),d.a.createElement("p",{className:"contact text-overflow-2"},t.simpledescription),t.is_aist?d.a.createElement("div",{className:"des"},"\u52a9\u6559\u5fae\u4fe1\uff1a",t.assist_weixin):d.a.createElement("div",{className:"des"},"QQ\u7fa4\uff1a",t.course_qq)),i=t.is_aist&&d.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return d.a.createElement(m.i,{key:a,img:t.image_name,id:t.course_id,info:s,status:i,toDetail:e.toCourseDetail})})):d.a.createElement("div",{className:"cart-tip"},d.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),d.a.createElement(f.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(u.Component);t.default=Object(h.b)(function(e){return{user:e.user}},null)(b)},888:function(e,t,a){}}]);
//# sourceMappingURL=purchased.7305434a.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/purchased/index.js"],"names":["Purchased","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_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","toCourseDetail","id","_this$props","dispatch","history","getCourses","push","state","_this2","user","uid","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_9__","title","cart","href","_common_Loading__WEBPACK_IMPORTED_MODULE_14__","length","map","item","index","Info","onClick","course_id","course_title","simpledescription","is_aist","assist_weixin","course_qq","status","key","img","image_name","toDetail","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","Component","connect"],"mappings":"2OAUMA,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,MArBlBtB,EA0BnBuB,eAAiB,SAACC,GAAO,IAAAC,EACSzB,EAAKD,MAA3B2B,EADaD,EACbC,SAAUC,EADGF,EACHE,QAClBD,EAASE,YAAWJ,EAAI,WACpBG,EAAQE,KAAR,cAAAnB,OAA2Bc,QA3B/BxB,EAAK8B,MAAQ,CACTf,KAAM,GACNG,WAAW,GAJAlB,mFASfG,KAAKI,2CAyBA,IAAAwB,EAAA5B,KACE6B,EAAQ7B,KAAKJ,MAAbiC,KACDC,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C,GAAK,MAAK,CAACE,KAAMF,EAAME,OACvB,KAFW8B,CAGbhE","file":"static/js/purchased.fda2c384.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 {getCourses} from './../detail/actions';\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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' onClick={() => this.toCourseDetail(item.course_id)}>\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\n key={index}\n img={item.image_name}\n id={item.course_id}\n info={Info}\n status={status}\n toDetail={this.toCourseDetail}\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_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_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","toCourseDetail","id","_this$props","dispatch","history","getCourses","push","state","_this2","user","uid","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_9__","title","cart","href","_common_Loading__WEBPACK_IMPORTED_MODULE_14__","length","map","item","index","Info","onClick","course_id","course_title","simpledescription","is_aist","assist_weixin","course_qq","status","key","img","image_name","toDetail","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","Component","connect"],"mappings":"2OAUMA,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,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AAA,QAAMC,UAAU,UAAhB,gBAEpB,OACIF,EAAAd,EAAAe,cAACE,EAAA,EAAD,CACIkB,IAAKV,EACLW,IAAKZ,EAAKa,WACVjC,GAAIoB,EAAKI,UACT3B,KAAMyB,EACNQ,OAAQA,EACRI,SAAU3B,EAAKR,oBAMjCW,EAAAd,EAAAe,cAAA,OAAKC,UAAU,YACbF,EAAAd,EAAAe,cAAA,KAAGC,UAAU,aAAb,mFACAF,EAAAd,EAAAe,cAACwB,EAAA,EAAD,CAAMC,GAAG,aAAT,gCAjFRC,aA2FTC,sBACX,SAAAhC,GAAK,MAAK,CAACE,KAAMF,EAAME,OACvB,KAFW8B,CAGbhE","file":"static/js/purchased.7305434a.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 {getCourses} from './../detail/actions';\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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\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' onClick={() => this.toCourseDetail(item.course_id)}>\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\n key={index}\n img={item.image_name}\n id={item.course_id}\n info={Info}\n status={status}\n toDetail={this.toCourseDetail}\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],i=r[1],u=r[2],d=0,l=[];d<f.length;d++)a=f[d],o[a]&&l.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,u||[]),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 i=t[a];0!==o[i]&&(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:"9e05243b",1:"9ab7b4fc",2:"c5876381",3:"2e7d81ca",4:"f2cc3163",5:"31d6cfe0",6:"34d6f553",7:"31d6cfe0",8:"ef3c6288",9:"7456653e",10:"0d7e3fa7",11:"742fe9ff",12:"bef8c404",13:"9ece7350",14:"1ccb2ab2",16:"5434bc7e",17:"6f6ffdf9",19:"01106b05",20:"3c7cba2d",21:"724f37b8",22:"49988cae",23:"780bbb78",25:"31d6cfe0",26:"1b3a6258",27:"31d6cfe0",28:"694b4628",29:"5ed15c7e",30:"ecbb6f9a",31:"bc06dce4"}[e]+".chunk.css",o=f.p+n,c=document.getElementsByTagName("link"),i=0;i<c.length;i++){var u=(s=c[i]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(u===n||u===o))return r()}var d=document.getElementsByTagName("style");for(i=0;i<d.length;i++){var s;if((u=(s=d[i]).getAttribute("data-href"))===n||u===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,i=document.createElement("script");i.charset="utf-8",i.timeout=120,f.nc&&i.setAttribute("nonce",f.nc),i.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:"e9fa548d",1:"ba29a5fa",2:"8c2b7670",3:"39af102b",4:"fc6423bb",5:"d0b19073",6:"13dc8973",7:"ec770473",8:"2f9f32e8",9:"f2230bb7",10:"fff53593",11:"176f2726",12:"26bcdb95",13:"847e634b",14:"9ba39cc7",16:"68ab62ae",17:"fda2c384",19:"3932de6c",20:"94531bce",21:"ca66f2c3",22:"92a9903c",23:"03e9383a",25:"dc48eee8",26:"3f952262",27:"451e15ff",28:"c45ad1a2",29:"e7db81e7",30:"ac1c9411",31:"39103831"}[e]+".chunk.js"}(e),c=function(r){i.onerror=i.onload=null,clearTimeout(u);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 u=setTimeout(function(){c({type:"timeout",target:i})},12e4);i.onerror=i.onload=c,document.head.appendChild(i)}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 i=window.webpackJsonp=window.webpackJsonp||[],u=i.push.bind(i);i.push=r,i=i.slice();for(var d=0;d<i.length;d++)r(i[d]);var s=u;t()}([]);
//# sourceMappingURL=runtime~main.69b87c9c.js.map
\ No newline at end of file
!function(e){function r(r){for(var n,a,i=r[0],f=r[1],u=r[2],d=0,l=[];d<i.length;d++)a=i[d],o[a]&&l.push(o[a][0]),o[a]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,u||[]),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 f=t[a];0!==o[f]&&(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:"9e05243b",1:"9ab7b4fc",2:"c5876381",3:"2e7d81ca",4:"f2cc3163",5:"31d6cfe0",6:"34d6f553",7:"31d6cfe0",8:"ef3c6288",9:"7456653e",10:"0d7e3fa7",11:"742fe9ff",12:"bef8c404",13:"9ece7350",14:"1ccb2ab2",16:"5434bc7e",17:"6f6ffdf9",19:"01106b05",20:"3c7cba2d",21:"724f37b8",22:"49988cae",23:"780bbb78",25:"31d6cfe0",26:"1b3a6258",27:"31d6cfe0",28:"694b4628",29:"5ed15c7e",30:"ecbb6f9a",31:"bc06dce4"}[e]+".chunk.css",o=i.p+n,c=document.getElementsByTagName("link"),f=0;f<c.length;f++){var u=(s=c[f]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(u===n||u===o))return r()}var d=document.getElementsByTagName("style");for(f=0;f<d.length;f++){var s;if((u=(s=d[f]).getAttribute("data-href"))===n||u===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,f=document.createElement("script");f.charset="utf-8",f.timeout=120,i.nc&&f.setAttribute("nonce",i.nc),f.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:"95b0aa68",1:"1b759ace",2:"a81c12f2",3:"39af102b",4:"fc6423bb",5:"d0b19073",6:"c81925c9",7:"93f1f54f",8:"0540cc1c",9:"5cd529e1",10:"4d0783a4",11:"4aa986c1",12:"f41ca3e6",13:"847e634b",14:"bec850de",16:"1dff2efc",17:"7305434a",19:"214f669c",20:"94531bce",21:"2d4b43c5",22:"f06e77ca",23:"6db74c8b",25:"dc48eee8",26:"3f952262",27:"451e15ff",28:"c45ad1a2",29:"e7db81e7",30:"ac1c9411",31:"39103831"}[e]+".chunk.js"}(e),c=function(r){f.onerror=f.onload=null,clearTimeout(u);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 u=setTimeout(function(){c({type:"timeout",target:f})},12e4);f.onerror=f.onload=c,document.head.appendChild(f)}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 f=window.webpackJsonp=window.webpackJsonp||[],u=f.push.bind(f);f.push=r,f=f.slice();for(var d=0;d<f.length;d++)r(f[d]);var s=u;t()}([]);
//# sourceMappingURL=runtime~main.ce626342.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,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAKA,IAFAe,KAAAhB,GAEAO,EAAAC,QACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,IAAAf,EAAAgB,KAAAF,GAAA,GAEAA,IACAL,EAAAQ,OAAApB,IAAA,GACAe,EAAAM,IAAAC,EAAAN,EAAA,KAGA,OAAAD,EAIA,IAAAQ,EAAA,GAGAC,EAAA,CACAC,GAAA,GAMAtB,EAAA,CACAsB,GAAA,GAGAb,EAAA,GAQA,SAAAS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2B,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.69b87c9c.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\":\"e9fa548d\",\"1\":\"ba29a5fa\",\"2\":\"8c2b7670\",\"3\":\"39af102b\",\"4\":\"fc6423bb\",\"5\":\"d0b19073\",\"6\":\"13dc8973\",\"7\":\"ec770473\",\"8\":\"2f9f32e8\",\"9\":\"f2230bb7\",\"10\":\"fff53593\",\"11\":\"176f2726\",\"12\":\"26bcdb95\",\"13\":\"847e634b\",\"14\":\"9ba39cc7\",\"16\":\"68ab62ae\",\"17\":\"fda2c384\",\"19\":\"3932de6c\",\"20\":\"94531bce\",\"21\":\"ca66f2c3\",\"22\":\"92a9903c\",\"23\":\"03e9383a\",\"25\":\"dc48eee8\",\"26\":\"3f952262\",\"27\":\"451e15ff\",\"28\":\"c45ad1a2\",\"29\":\"e7db81e7\",\"30\":\"ac1c9411\",\"31\":\"39103831\"}[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\":\"9e05243b\",\"1\":\"9ab7b4fc\",\"2\":\"c5876381\",\"3\":\"2e7d81ca\",\"4\":\"f2cc3163\",\"5\":\"31d6cfe0\",\"6\":\"34d6f553\",\"7\":\"31d6cfe0\",\"8\":\"ef3c6288\",\"9\":\"7456653e\",\"10\":\"0d7e3fa7\",\"11\":\"742fe9ff\",\"12\":\"bef8c404\",\"13\":\"9ece7350\",\"14\":\"1ccb2ab2\",\"16\":\"5434bc7e\",\"17\":\"6f6ffdf9\",\"19\":\"01106b05\",\"20\":\"3c7cba2d\",\"21\":\"724f37b8\",\"22\":\"49988cae\",\"23\":\"780bbb78\",\"25\":\"31d6cfe0\",\"26\":\"1b3a6258\",\"27\":\"31d6cfe0\",\"28\":\"694b4628\",\"29\":\"5ed15c7e\",\"30\":\"ecbb6f9a\",\"31\":\"bc06dce4\"}[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,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,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAKA,IAFAe,KAAAhB,GAEAO,EAAAC,QACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7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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.ce626342.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\":\"95b0aa68\",\"1\":\"1b759ace\",\"2\":\"a81c12f2\",\"3\":\"39af102b\",\"4\":\"fc6423bb\",\"5\":\"d0b19073\",\"6\":\"c81925c9\",\"7\":\"93f1f54f\",\"8\":\"0540cc1c\",\"9\":\"5cd529e1\",\"10\":\"4d0783a4\",\"11\":\"4aa986c1\",\"12\":\"f41ca3e6\",\"13\":\"847e634b\",\"14\":\"bec850de\",\"16\":\"1dff2efc\",\"17\":\"7305434a\",\"19\":\"214f669c\",\"20\":\"94531bce\",\"21\":\"2d4b43c5\",\"22\":\"f06e77ca\",\"23\":\"6db74c8b\",\"25\":\"dc48eee8\",\"26\":\"3f952262\",\"27\":\"451e15ff\",\"28\":\"c45ad1a2\",\"29\":\"e7db81e7\",\"30\":\"ac1c9411\",\"31\":\"39103831\"}[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\":\"9e05243b\",\"1\":\"9ab7b4fc\",\"2\":\"c5876381\",\"3\":\"2e7d81ca\",\"4\":\"f2cc3163\",\"5\":\"31d6cfe0\",\"6\":\"34d6f553\",\"7\":\"31d6cfe0\",\"8\":\"ef3c6288\",\"9\":\"7456653e\",\"10\":\"0d7e3fa7\",\"11\":\"742fe9ff\",\"12\":\"bef8c404\",\"13\":\"9ece7350\",\"14\":\"1ccb2ab2\",\"16\":\"5434bc7e\",\"17\":\"6f6ffdf9\",\"19\":\"01106b05\",\"20\":\"3c7cba2d\",\"21\":\"724f37b8\",\"22\":\"49988cae\",\"23\":\"780bbb78\",\"25\":\"31d6cfe0\",\"26\":\"1b3a6258\",\"27\":\"31d6cfe0\",\"28\":\"694b4628\",\"29\":\"5ed15c7e\",\"30\":\"ecbb6f9a\",\"31\":\"bc06dce4\"}[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
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{1134:function(e,t,n){},1135:function(e,t,n){},1179:function(e,t,n){"use strict";n.r(t);var a=n(74),r=n.n(a),o=n(106),s=n(116),c=n(7),i=n(8),l=n(11),u=n(9),h=n(10),f=n(0),p=n.n(f),d=n(704),m=(n(1134),function(e){function t(){return Object(c.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){return p.a.createElement("span",Object.assign({className:this.props.name},this.props),this.props.children)}}]),t}(f.PureComponent)),v=n(4),g=(n(1135),n(19)),y=n(64),C=function(e){function t(){var e,n;Object(c.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(i.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,{name:"tagLately"},e))}):p.a.createElement("div",{className:"no_search_history",style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u5386\u53f2"))),p.a.createElement("div",{className:"search-land search-hot"},p.a.createElement("label",{className:"search-history"},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,{name:"tagHot"},t))}):p.a.createElement("div",{style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u70ed\u95e8"))))))}}]),t}(f.PureComponent);t.default=C},583: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},588: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 c=(0,o.default)({},r);e.locale&&(c=(0,o.default)({},c,e.locale),e.locale.lang&&(c.lang=(0,o.default)({},r.lang,e.locale.lang)));return c},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},606:function(e,t,n){"use strict";n(48),n(607)},607:function(e,t,n){},608:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=g(n(3)),r=g(n(34)),o=g(n(5)),s=g(n(12)),c=g(n(6)),i=g(n(13)),l=g(n(15)),u=v(n(0)),h=v(n(2)),f=g(n(153)),p=g(n(583)),d=n(588),m=n(609);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,c.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,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,c=o.showCancelButton,i=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(610)}).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))),N=(0,l.default)(s+"-cancel",(e={},(0,r.default)(e,s+"-cancel-show",!!(c||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: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:s+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:O}))),u.createElement("div",{className:N,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},609: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}},610:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},704:function(e,t,n){"use strict";n(606);var a=n(608),r=n.n(a),o=n(116),s=n(7),c=n(8),i=n(11),l=n(9),u=n(10),h=n(0),f=n.n(h),p=n(53),d=(n(705),function(e){function t(){var e,n;Object(s.a)(this,t);for(var a=arguments.length,r=new Array(a),c=0;c<a;c++)r[c]=arguments[c];return(n=Object(i.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(c.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)},705:function(e,t,n){}}]);
//# sourceMappingURL=search.3932de6c.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{1134:function(e,t,n){},1135:function(e,t,n){},1179:function(e,t,n){"use strict";n.r(t);var a=n(74),r=n.n(a),o=n(106),s=n(116),c=n(7),i=n(8),l=n(11),u=n(9),h=n(10),f=n(0),p=n.n(f),d=n(704),m=(n(1134),function(e){function t(){return Object(c.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){return p.a.createElement("span",Object.assign({className:this.props.name},this.props),this.props.children)}}]),t}(f.PureComponent)),v=n(4),g=(n(1135),n(18)),y=n(64),C=function(e){function t(){var e,n;Object(c.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(i.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,{name:"tagLately"},e))}):p.a.createElement("div",{className:"no_search_history",style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u5386\u53f2"))),p.a.createElement("div",{className:"search-land search-hot"},p.a.createElement("label",{className:"search-history"},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,{name:"tagHot"},t))}):p.a.createElement("div",{style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u70ed\u95e8"))))))}}]),t}(f.PureComponent);t.default=C},583: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},588: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 c=(0,o.default)({},r);e.locale&&(c=(0,o.default)({},c,e.locale),e.locale.lang&&(c.lang=(0,o.default)({},r.lang,e.locale.lang)));return c},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},606:function(e,t,n){"use strict";n(48),n(607)},607:function(e,t,n){},608:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=g(n(3)),r=g(n(34)),o=g(n(5)),s=g(n(12)),c=g(n(6)),i=g(n(13)),l=g(n(15)),u=v(n(0)),h=v(n(2)),f=g(n(153)),p=g(n(583)),d=n(588),m=n(609);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,c.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,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,c=o.showCancelButton,i=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(610)}).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))),N=(0,l.default)(s+"-cancel",(e={},(0,r.default)(e,s+"-cancel-show",!!(c||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: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:s+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:O}))),u.createElement("div",{className:N,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},609: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}},610:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},704:function(e,t,n){"use strict";n(606);var a=n(608),r=n.n(a),o=n(116),s=n(7),c=n(8),i=n(11),l=n(9),u=n(10),h=n(0),f=n.n(h),p=n(53),d=(n(705),function(e){function t(){var e,n;Object(s.a)(this,t);for(var a=arguments.length,r=new Array(a),c=0;c<a;c++)r[c]=arguments[c];return(n=Object(i.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(c.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)},705:function(e,t,n){}}]);
//# sourceMappingURL=search.214f669c.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","name","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_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__","refs","react__WEBPACK_IMPORTED_MODULE_8___default","antd_mobile_lib_search_bar__WEBPACK_IM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KAAKC,MAAMa,MAClBiI,kBAAgB,EAChBa,WAAY,IACZK,IAAI,SACJvD,OAAO,EACPD,SAAUzG,KAAKC,MAAMmB,aACrBsI,YAAY,8BAEpB2B,EAAA1L,EAAAC,cAAA,OAAKG,UAAU,kBAAkByC,QAASxC,KAAK+K,QAC3CM,EAAA1L,EAAAC,cAAA,OAAKG,UAAU,cAAf,yBAxCKK,kBAgDVmL,gBAAWX","file":"static/js/search.3932de6c.chunk.js","sourcesContent":["import React, { PureComponent } from 'react'\nimport './tag.scss'\nexport default class Tag extends PureComponent {\n render() {\n return (\n <span className={this.props.name} {...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 name={\"tagLately\"}>{v}</Tag>\n </Link>\n )\n })\n : <div className={'no_search_history'} style={{textAlign: 'center', padding: '20px'}}>暂无历史</div>\n }\n </div>\n </div>\n <div className=\"search-land search-hot\">\n <label className={'search-history'}>\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 name={\"tagHot\"}>{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","name","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_zhanghaozhe_server_mr_julyedu_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,UAAWC,KAAKC,MAAMC,MAAUF,KAAKC,OACtCD,KAAKC,MAAME,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,M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AKAwC,EAAAkH,aAAA,CACAhC,UAAA,YACAkB,YAAA,GACAtD,SAAAuE,EACAlE,SAAAkE,EACA/D,QAAA+D,EACA7D,OAAA6D,EACAlD,QAAAkD,EACA5B,kBAAA,EACAU,UAAA,qCCfA5J,OAAAwD,eAAAC,EAAA,cACAxC,OAAA,IAEAwC,EAAA,SACAsG,WAAA,gBAEAjG,EAAAL,UAAA,6ICFMsH,qNAEFC,WAAa,WACT3J,EAAKjB,MAAMqB,QAAQwJ,IAAI,MAO3BC,OAAS,WACL7J,EAAK8J,eACL9J,EAAKjB,MAAMoB,kBAGf2J,aAAe,WAAM,IAAAC,EACiB/J,EAAKjB,MADtBiL,EAAAD,EACZ1K,qBADY,IAAA2K,EACI,GADJA,EACQpK,EADRmK,EACQnK,MACzBA,GAASJ,aAAaO,QAAQ,gBAAiBT,KAAKoB,UAAL,GAAAJ,OAAA3B,OAAAsL,EAAA,EAAAtL,CAAmBU,GAAnB,CAAkCO,0FAVjFd,KAAKoL,KAAKL,OAAOrE,yCAejB,OACI2E,EAAA1L,EAAAC,cAAA,OAAKG,UAAU,eAEXsL,EAAA1L,EAAAC,cAAA,OAAKG,UAAU,OAAOyC,QAASxC,KAAK6K,YAChCQ,EAAA1L,EAAAC,cAAA,KAAGG,UAAU,+BAGjBsL,EAAA1L,EAAAC,cAAA,OAAKG,UAAU,UACXsL,EAAA1L,EAAAC,cAAA0L,EAAA3L,EAAA,CACImB,MAAOd,KAAKC,MAAMa,MAClBiI,kBAAgB,EAChBa,WAAY,IACZK,IAAI,SACJvD,OAAO,EACPD,SAAUzG,KAAKC,MAAMmB,aACrBsI,YAAY,8BAEpB2B,EAAA1L,EAAAC,cAAA,OAAKG,UAAU,kBAAkByC,QAASxC,KAAK+K,QAC3CM,EAAA1L,EAAAC,cAAA,OAAKG,UAAU,cAAf,yBAxCKK,kBAgDVmL,gBAAWX","file":"static/js/search.214f669c.chunk.js","sourcesContent":["import React, { PureComponent } from 'react'\nimport './tag.scss'\nexport default class Tag extends PureComponent {\n render() {\n return (\n <span className={this.props.name} {...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 name={\"tagLately\"}>{v}</Tag>\n </Link>\n )\n })\n : <div className={'no_search_history'} style={{textAlign: 'center', padding: '20px'}}>暂无历史</div>\n }\n </div>\n </div>\n <div className=\"search-land search-hot\">\n <label className={'search-history'}>\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 name={\"tagHot\"}>{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([[21],{1176:function(e,t,a){"use strict";a.r(t);var n=a(7),s=a(8),r=a(11),o=a(9),i=a(10),l=a(0),c=a.n(l),u=(a(782),a(19)),p=a(53),d=a(647),m=(a(783),a(156)),h=a(20),f=a(84),v=a(649),b=a.n(v),y=a(38),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 r=/\u7b2c[\s\S]+?\u8bfe/.exec(n);s+=r&&r[0]?r[0]:""}if(a){var o=function(e){return{hour:Math.floor(e/3600),min:Math.floor(e/60)%60,sec:e%60}}(a);s+=(o.hour?String(o.hour).padStart(2,"0")+":":"")+(o.min?String(o.min).padStart(2,"0")+":":"")+(o.sec?String(o.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(r.a)(this,(e=Object(o.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,a=t.courseList,n=t.user;return c.a.createElement(E.f,{isLoading:this.props.isLoading},a&&0!==a.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(!n.hasError&&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}},a.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.v_course_id}))}))),a.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(43),a(14)),O=a.n(k),_=(a(784),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(785),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(r.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(i)))).state={courses:[],live:[],page:1,num:10},a.handleClick=function(e){a.props.history.push("/play/video?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(163),W=a(159),H=a(17),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(r.a)(this,(e=Object(o.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)},647:function(e,t,a){"use strict";var n=a(0),s=a.n(n);a(648);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)}},648:function(e,t,a){},649:function(e,t,a){e.exports=a(650)},650: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),r=i(s),o=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,r=void 0!==t.pageYOffset?t.pageYOffset:s.scrollTop;n=this.props.isReverse?r:this.calculateOffset(e,r)}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,o=(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?o?u.unshift(i):u.push(i):this.defaultLoader&&(o?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),r.default.createElement(n,c,u)}}]),t}();l.propTypes={children:o.default.node.isRequired,element:o.default.node,hasMore:o.default.bool,initialLoad:o.default.bool,isReverse:o.default.bool,loader:o.default.node,loadMore:o.default.func.isRequired,pageStart:o.default.number,ref:o.default.func,getScrollParent:o.default.func,threshold:o.default.number,useCapture:o.default.bool,useWindow:o.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},782:function(e,t,a){},783:function(e,t,a){},784:function(e,t,a){},785:function(e,t,a){}}]);
//# sourceMappingURL=study.ca66f2c3.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{1176:function(e,t,a){"use strict";a.r(t);var n=a(7),s=a(8),r=a(11),o=a(9),i=a(10),l=a(0),c=a.n(l),u=(a(782),a(18)),p=a(53),d=a(647),m=(a(783),a(156)),h=a(20),f=a(84),v=a(649),b=a.n(v),y=a(38),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 r=/\u7b2c[\s\S]+?\u8bfe/.exec(n);s+=r&&r[0]?r[0]:""}if(a){var o=function(e){return{hour:Math.floor(e/3600),min:Math.floor(e/60)%60,sec:e%60}}(a);s+=(o.hour?String(o.hour).padStart(2,"0")+":":"")+(o.min?String(o.min).padStart(2,"0")+":":"")+(o.sec?String(o.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(r.a)(this,(e=Object(o.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,a=t.courseList,n=t.user;return c.a.createElement(E.f,{isLoading:this.props.isLoading},a&&0!==a.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(!n.hasError&&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}},a.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.v_course_id}))}))),a.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(43),a(14)),O=a.n(k),_=(a(784),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(785),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(r.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(i)))).state={courses:[],live:[],page:1,num:10},a.handleClick=function(e){a.props.history.push("/play/video?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(163),W=a(159),H=a(17),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(r.a)(this,(e=Object(o.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)},647:function(e,t,a){"use strict";var n=a(0),s=a.n(n);a(648);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)}},648:function(e,t,a){},649:function(e,t,a){e.exports=a(650)},650: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),r=i(s),o=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,r=void 0!==t.pageYOffset?t.pageYOffset:s.scrollTop;n=this.props.isReverse?r:this.calculateOffset(e,r)}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,o=(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?o?u.unshift(i):u.push(i):this.defaultLoader&&(o?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),r.default.createElement(n,c,u)}}]),t}();l.propTypes={children:o.default.node.isRequired,element:o.default.node,hasMore:o.default.bool,initialLoad:o.default.bool,isReverse:o.default.bool,loader:o.default.node,loadMore:o.default.func.isRequired,pageStart:o.default.number,ref:o.default.func,getScrollParent:o.default.func,threshold:o.default.number,useCapture:o.default.bool,useWindow:o.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},782:function(e,t,a){},783:function(e,t,a){},784:function(e,t,a){},785:function(e,t,a){}}]);
//# sourceMappingURL=study.2d4b43c5.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","_this$props","user","common","Fragment","hasError","data","uid","react_infinite_scroller_default","pageStart","hasMore","loadMore","useWindow","ref","el","list","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,EAAY,GAAMA,EAAY,GAAK,GAGjE,GAAIH,EAAS,CACT,IAAIK,EAxBZ,SAAsBL,GAClB,MAAO,CACHM,KAAMC,KAAKC,MAAMR,EAAO,MACxBS,IAAKF,KAAKC,MAAMR,EAAU,IAAM,GAChCU,IAAKV,EAAU,IAoBCW,CAAaX,GAK7BE,IAJWG,EAAUC,KAAOM,OAAOP,EAAUC,MAAMO,SAAS,EAAG,KAAO,IAAM,KAClER,EAAUI,IAAMG,OAAOP,EAAUI,KAAKI,SAAS,EAAG,KAAO,IAAM,KAC/DR,EAAUK,IAAME,OAAOP,EAAUK,KAAKG,SAAS,EAAG,KAAO,IAKvE,OACItB,EAAAC,EAAAC,cAAA,QAAMC,UAAW,UAETQ,EAAOY,OAAP,qBAAAC,OAAsBb,GAAW,MAOjD,IAAMc,EAAS7B,IAAMC,KAAK,SAAA6B,GAAY,IAAVC,EAAUD,EAAVC,KACxB,GAAIA,EAAKC,KAAOD,EAAKlB,QAAS,CAC1B,IAAIoB,EAAO,IAAIC,KAAgB,IAAXH,EAAKC,KACrBG,EAAOC,kBAAQH,GAAQI,iBAAOJ,EAAM,oBAAYI,iBAAOJ,EAAM,oBACjE,OACI7B,EAAAC,EAAAC,cAAA,OAAKC,UAAU,OACXH,EAAAC,EAAAC,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K,UAAA,EACAI,IAAA,KACA2K,UAAA,IACA5K,WAAA,EACAwI,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAK,gBAAA,MAEArE,EAAAsB,QAAAC,EACAxB,EAAAC,UAAA","file":"static/js/study.ca66f2c3.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 {courseList, user} = this.props\n\n return <Loading isLoading={this.props.isLoading}>\n {\n courseList && courseList.length !== 0\n ?\n <>\n <div className=\"my-course-uid\">\n {`加群请备注您的学号:${!user.hasError && 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 courseList.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['v_course_id']}\n />\n )\n })\n }\n </ul>\n </InfiniteScroll>\n {\n courseList.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/video?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","_this$props","user","common","Fragment","hasError","data","uid","react_infinite_scroller_default","pageStart","hasMore","loadMore","useWindow","ref","el","list","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,gC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AC,QAAAtF,IAAA,GACA/E,OAAAuF,UAAA+E,eAAAjE,KAAAT,EAAAb,KACAD,EAAAC,GAAAa,EAAAb,IAGA,OAAAD,EA8PAyF,CAAAP,EAAA,0JAEAvM,EAAAsB,IAAA,SAAAyL,GACAtM,EAAAuJ,gBAAA+C,EAEAzL,GACAA,EAAAyL,IAIA,IAAAC,EAAA,CAAAP,GAUA,OARAtL,IACA4J,EACAlB,EAAAmD,EAAAC,QAAAlC,GAAAiC,EAAA9M,KAAA6K,GACSxK,KAAAyK,gBACTnB,EAAAmD,EAAAC,QAAA1M,KAAAyK,eAAAgC,EAAA9M,KAAAK,KAAAyK,iBAIAhD,EAAAK,QAAA3K,cAAAgP,EAAA1M,EAAAgN,OAIA1E,EArPA,GAwPAA,EAAA4E,UAAA,CACAT,SAAAvE,EAAAG,QAAA0E,KAAAI,WACAT,QAAAxE,EAAAG,QAAA0E,KACA5L,QAAA+G,EAAAG,QAAA+E,KACA/B,YAAAnD,EAAAG,QAAA+E,KACAvD,UAAA3B,EAAAG,QAAA+E,KACArC,OAAA7C,EAAAG,QAAA0E,KACA3L,SAAA8G,EAAAG,QAAAgF,KAAAF,WACAjM,UAAAgH,EAAAG,QAAAiF,OACAhM,IAAA4G,EAAAG,QAAAgF,KACAjC,gBAAAlD,EAAAG,QAAAgF,KACApB,UAAA/D,EAAAG,QAAAiF,OACAzC,WAAA3C,EAAAG,QAAA+E,KACA/L,UAAA6G,EAAAG,QAAA+E,MAEA9E,EAAAiF,aAAA,CACAb,QAAA,MACAvL,SAAA,EACAkK,aAAA,EACAnK,UAAA,EACAI,IAAA,KACA2K,UAAA,IACA5K,WAAA,EACAwI,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAK,gBAAA,MAEArE,EAAAsB,QAAAC,EACAxB,EAAAC,UAAA","file":"static/js/study.2d4b43c5.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 {courseList, user} = this.props\n\n return <Loading isLoading={this.props.isLoading}>\n {\n courseList && courseList.length !== 0\n ?\n <>\n <div className=\"my-course-uid\">\n {`加群请备注您的学号:${!user.hasError && 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 courseList.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['v_course_id']}\n />\n )\n })\n }\n </ul>\n </InfiniteScroll>\n {\n courseList.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/video?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],{1161:function(e,a,t){"use strict";t.r(a);t(155);var n,c=t(75),s=t.n(c),r=(t(89),t(25)),i=t.n(r),o=(t(154),t(35)),l=t.n(o),m=(t(43),t(14)),u=t.n(m),d=t(23),p=t(7),f=t(8),E=t(11),g=t(9),_=t(10),N=t(0),v=t.n(N),h=(t(889),t(30)),b=t(4),w=t(20),I=t(19),y=t(45),C=Object(w.b)()(n=function(e){function a(e){var t;return Object(p.a)(this,a),(t=Object(E.a)(this,Object(g.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,"&isIn=1"),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 u.a.info("\u8bf7\u5728\u5fae\u4fe1\u4e2d\u4f7f\u7528\u5206\u4eab\u529f\u80fd\uff01",2)},t.toCourseDetail=function(e){var a=t.props,n=a.dispatch,c=a.history;n(Object(y.d)(e,function(){return c.push("/detail?id=".concat(e),{href:"/classify"}),!1}))},t.state={data:{},share:!1,pdd_price:0,groupon_member:[],person_num:0,is_success:!1,userInfo:{},number:0},t}return Object(_.a)(a,e),Object(f.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 u.a.info(t.data.msg,2);else u.a.info(t.data.msg,2)})}},{key:"render",value:function(){var e=this,a=this.state,t=a.data,n=t.course_id,c=t.course_title,s=t.simpledescription,r=t.price0,i=t.price1,o=(a.pdd_price,a.is_success),m=(a.person_num,a.groupon_member,a.course_list),u=v.a.createElement("div",{className:"info"},v.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(n)}},c),v.a.createElement("p",{className:"contact text-overflow-2"},s),v.a.createElement("div",{className:"des"},v.a.createElement("p",{className:"course-price"},v.a.createElement("span",{className:"new"},"\xa5",i),v.a.createElement("span",{className:"old"},"\xa5",r))));return v.a.createElement("div",{className:"to-group-box"},v.a.createElement(h.e,{title:"\u62fc\u56e2",cart:!1,toHref:function(){return e.toCourseDetail(n)}}),!o&&v.a.createElement(h.i,{img:this.state.data.image_name,id:this.state.data.course_id,info:u,toDetail:this.toCourseDetail}),v.a.createElement(M,{data:this.state,invitedFriends:this.invitedFriends}),v.a.createElement(l.a,null),v.a.createElement("div",{className:"group-course"},v.a.createElement("div",{className:"top-title"},v.a.createElement("span",null,"\u672c\u5468\u7279\u60e0"),v.a.createElement(I.b,{to:"/preferential",className:"more"},"\u66f4\u591a",v.a.createElement("i",{className:"iconfont iconiconfront-70"}))),m&&m.length>0&&m[0].course&&m[0].course.length>0&&m[0].course.slice(0,4).map(function(a){var t=v.a.createElement("div",{className:"info"},v.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(a.course_id)}},a.course_title),v.a.createElement("p",{className:"contact text-overflow-2"},a.simpledescription),v.a.createElement("div",{className:"des"},v.a.createElement("p",{className:"course-price"},v.a.createElement("span",{className:"new"},"\xa5",a.price1),v.a.createElement("span",{className:"old"},"\xa5",a.price0))));return v.a.createElement(h.i,{img:a.image_name,key:a.uid,id:a.course_id,info:t,toDetail:e.toCourseDetail})})))}}]),a}(N.Component))||n;function M(e){for(var a,t,n,c,r=e.data,o=r.pdd_price,l=r.data,m=r.groupon_member,u=r.is_success,d=r.person_num,p=r.userInfo,f=r.share,E=r.number,g=r.countdown,_=[],N=E;0!=N;)_.push(N),N--;if(c=v.a.createElement("div",{className:"group-user-list"},v.a.createElement(i.a,{justify:"center",className:"imgList"},m.map(function(e){return v.a.createElement("div",{className:"imgContainer",key:Math.random()},v.a.createElement("img",{className:"imgname",src:e.avatar,alt:""}),1===e.user_type?v.a.createElement("div",{className:"leaderFlag"},v.a.createElement("span",null,"\u56e2\u957f")):null)}),_.map(function(e){return v.a.createElement("div",{className:"imgContainer",key:Math.random()},v.a.createElement("div",{className:"imgname"},v.a.createElement("i",{className:"iconfont iconwode-xianxing no-body"})))}))),m&&m.length>0){var h="";m.map(function(e){1===e.user_type&&(h="".concat(e.uid))}),h===p.data.data.uid?(a=v.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(o,"\u5143")),t=v.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",g," \u540e\u7ed3\u675f"),n=v.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")):(a=v.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(o,"\u5143")),t=v.a.createElement(I.b,{to:"/order?id=".concat(l.course_id),className:"group-btn"},"\u4e00\u952e\u53c2\u56e2"))}return 1===u&&(a=v.a.createElement("p",{className:"success"},"\u62fc\u56e2\u6210\u529f"),t=v.a.createElement(I.b,{to:"/play",className:"tostudy"},"\u53bb\u5b66\u4e60")),v.a.createElement("div",{className:"gorup-content"},f?v.a.createElement("div",{className:"groupSuccessMbc",onClick:e.invitedFriends},v.a.createElement("div",{className:"tipContent"},"\u8fd8\u5dee".concat(E,"\u4eba\uff0c\u5206\u4eab\u52303\u4e2a\u7fa4\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")),v.a.createElement("div",{className:"tipArrow"},v.a.createElement("i",{className:"iconfont iconyindao"}))):null,a,v.a.createElement(s.a,null,c),v.a.createElement(s.a,null,t),n,!u&&v.a.createElement("div",{className:"group-dec"},v.a.createElement("span",null,v.a.createElement("i",{className:"iconfont iconiconfront-1"}),"\xb7\u597d\u53cb\u53c2\u56e2 \xb7\u4eba\u6ee1\u6210\u4ea4 \xb7\u4eba\u4e0d\u6ee1\u9000\u6b3e"),v.a.createElement("span",{className:"allNum"},"\u7d2f\u8ba1".concat(d,"\u4eba\u6210\u56e2"))))}a.default=C},889:function(e,a,t){}}]);
//# sourceMappingURL=togroup.92a9903c.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{1161:function(e,a,t){"use strict";t.r(a);t(155);var n,c=t(75),s=t.n(c),r=(t(89),t(25)),i=t.n(r),o=(t(154),t(35)),l=t.n(o),m=(t(43),t(14)),u=t.n(m),d=t(23),p=t(7),f=t(8),E=t(11),g=t(9),_=t(10),N=t(0),v=t.n(N),h=(t(889),t(30)),b=t(4),w=t(20),I=t(18),y=t(45),C=Object(w.b)()(n=function(e){function a(e){var t;return Object(p.a)(this,a),(t=Object(E.a)(this,Object(g.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,"&isIn=1"),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 u.a.info("\u8bf7\u5728\u5fae\u4fe1\u4e2d\u4f7f\u7528\u5206\u4eab\u529f\u80fd\uff01",2)},t.toCourseDetail=function(e){var a=t.props,n=a.dispatch,c=a.history;n(Object(y.d)(e,function(){return c.push("/detail?id=".concat(e),{href:"/classify"}),!1}))},t.state={data:{},share:!1,pdd_price:0,groupon_member:[],person_num:0,is_success:!1,userInfo:{},number:0},t}return Object(_.a)(a,e),Object(f.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 u.a.info(t.data.msg,2);else u.a.info(t.data.msg,2)})}},{key:"render",value:function(){var e=this,a=this.state,t=a.data,n=t.course_id,c=t.course_title,s=t.simpledescription,r=t.price0,i=t.price1,o=(a.pdd_price,a.is_success),m=(a.person_num,a.groupon_member,a.course_list),u=v.a.createElement("div",{className:"info"},v.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(n)}},c),v.a.createElement("p",{className:"contact text-overflow-2"},s),v.a.createElement("div",{className:"des"},v.a.createElement("p",{className:"course-price"},v.a.createElement("span",{className:"new"},"\xa5",i),v.a.createElement("span",{className:"old"},"\xa5",r))));return v.a.createElement("div",{className:"to-group-box"},v.a.createElement(h.e,{title:"\u62fc\u56e2",cart:!1,toHref:function(){return e.toCourseDetail(n)}}),!o&&v.a.createElement(h.i,{img:this.state.data.image_name,id:this.state.data.course_id,info:u,toDetail:this.toCourseDetail}),v.a.createElement(M,{data:this.state,invitedFriends:this.invitedFriends}),v.a.createElement(l.a,null),v.a.createElement("div",{className:"group-course"},v.a.createElement("div",{className:"top-title"},v.a.createElement("span",null,"\u672c\u5468\u7279\u60e0"),v.a.createElement(I.b,{to:"/preferential",className:"more"},"\u66f4\u591a",v.a.createElement("i",{className:"iconfont iconiconfront-70"}))),m&&m.length>0&&m[0].course&&m[0].course.length>0&&m[0].course.slice(0,4).map(function(a){var t=v.a.createElement("div",{className:"info"},v.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(a.course_id)}},a.course_title),v.a.createElement("p",{className:"contact text-overflow-2"},a.simpledescription),v.a.createElement("div",{className:"des"},v.a.createElement("p",{className:"course-price"},v.a.createElement("span",{className:"new"},"\xa5",a.price1),v.a.createElement("span",{className:"old"},"\xa5",a.price0))));return v.a.createElement(h.i,{img:a.image_name,key:a.uid,id:a.course_id,info:t,toDetail:e.toCourseDetail})})))}}]),a}(N.Component))||n;function M(e){for(var a,t,n,c,r=e.data,o=r.pdd_price,l=r.data,m=r.groupon_member,u=r.is_success,d=r.person_num,p=r.userInfo,f=r.share,E=r.number,g=r.countdown,_=[],N=E;0!=N;)_.push(N),N--;if(c=v.a.createElement("div",{className:"group-user-list"},v.a.createElement(i.a,{justify:"center",className:"imgList"},m.map(function(e){return v.a.createElement("div",{className:"imgContainer",key:Math.random()},v.a.createElement("img",{className:"imgname",src:e.avatar,alt:""}),1===e.user_type?v.a.createElement("div",{className:"leaderFlag"},v.a.createElement("span",null,"\u56e2\u957f")):null)}),_.map(function(e){return v.a.createElement("div",{className:"imgContainer",key:Math.random()},v.a.createElement("div",{className:"imgname"},v.a.createElement("i",{className:"iconfont iconwode-xianxing no-body"})))}))),m&&m.length>0){var h="";m.map(function(e){1===e.user_type&&(h="".concat(e.uid))}),h===p.data.data.uid?(a=v.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(o,"\u5143")),t=v.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",g," \u540e\u7ed3\u675f"),n=v.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")):(a=v.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(o,"\u5143")),t=v.a.createElement(I.b,{to:"/order?id=".concat(l.course_id),className:"group-btn"},"\u4e00\u952e\u53c2\u56e2"))}return 1===u&&(a=v.a.createElement("p",{className:"success"},"\u62fc\u56e2\u6210\u529f"),t=v.a.createElement(I.b,{to:"/play",className:"tostudy"},"\u53bb\u5b66\u4e60")),v.a.createElement("div",{className:"gorup-content"},f?v.a.createElement("div",{className:"groupSuccessMbc",onClick:e.invitedFriends},v.a.createElement("div",{className:"tipContent"},"\u8fd8\u5dee".concat(E,"\u4eba\uff0c\u5206\u4eab\u52303\u4e2a\u7fa4\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")),v.a.createElement("div",{className:"tipArrow"},v.a.createElement("i",{className:"iconfont iconyindao"}))):null,a,v.a.createElement(s.a,null,c),v.a.createElement(s.a,null,t),n,!u&&v.a.createElement("div",{className:"group-dec"},v.a.createElement("span",null,v.a.createElement("i",{className:"iconfont iconiconfront-1"}),"\xb7\u597d\u53cb\u53c2\u56e2 \xb7\u4eba\u6ee1\u6210\u4ea4 \xb7\u4eba\u4e0d\u6ee1\u9000\u6b3e"),v.a.createElement("span",{className:"allNum"},"\u7d2f\u8ba1".concat(d,"\u4eba\u6210\u56e2"))))}a.default=C},889:function(e,a,t){}}]);
//# sourceMappingURL=togroup.f06e77ca.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/detail/group/togroup.js"],"names":["ToGroup","connect","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_9__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_11__","_Users_zhanghaozhe_server_mr_julyedu_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_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_8__","success","updateTimelineShareData","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_7___default","a","info","toCourseDetail","id","_this$props","dispatch","history","getCourses","push","href","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","_this3","_this$state2","_this$state2$data","simpledescription","price0","price1","Info","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","className","onClick","_common__WEBPACK_IMPORTED_MODULE_16__","cart","toHref","img","toDetail","GorupContent","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_5___default","react_router_dom__WEBPACK_IMPORTED_MODULE_19__","to","length","course","slice","map","item","weekInfo","key","uid","Component","tip","btn","dec","groupTip","_props$data","ary","num","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_3___default","justify","Math","random","src","avatar","alt","user_type","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_1___default"],"mappings":"0TAWMA,EADLC,4BAEG,SAAAD,EAAYE,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAA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","sourcesContent":["import React, { Component } from 'react'\nimport './togroup.scss'\nimport { HeaderBar, VList } from '../../../common'\n\nimport { getParam, http, browser} from \"@/utils\";\nimport { connect } from \"react-redux\"\nimport { Link } from \"react-router-dom\"\nimport { WingBlank, WhiteSpace, Flex, Toast } from 'antd-mobile'\nimport {getCourses} from './../../detail/actions';\n\n@connect()\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 // 直接进入课程详情页,isIn: 1\n link: location.origin + `/detail?id=${data.course_id}&isIn=1`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`, {href: '/classify'});\n return false;\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' onClick={() => this.toCourseDetail(course_id)}>\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='拼团' cart={false} toHref={() => this.toCourseDetail(course_id)}></HeaderBar>\n {\n !is_success && \n <VList \n img={this.state.data.image_name} \n id={this.state.data.course_id} \n info={Info}\n toDetail={this.toCourseDetail}\n />\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' onClick={() => this.toCourseDetail(item.course_id)}>\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 (\n <VList \n img={item.image_name} \n key={item.uid} \n id={item.course_id} \n info={weekInfo}\n toDetail={this.toCourseDetail}\n />\n )\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","connect","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_9__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_11__","_Users_zhanghaozhe_server_mr_julyedu_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_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_8__","success","updateTimelineShareData","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_7___default","a","info","toCourseDetail","id","_this$props","dispatch","history","getCourses","push","href","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","_this3","_this$state2","_this$state2$data","simpledescription","price0","price1","Info","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","className","onClick","_common__WEBPACK_IMPORTED_MODULE_16__","cart","toHref","img","toDetail","GorupContent","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_5___default","react_router_dom__WEBPACK_IMPORTED_MODULE_19__","to","length","course","slice","map","item","weekInfo","key","uid","Component","tip","btn","dec","groupTip","_props$data","ary","num","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_3___default","justify","Math","random","src","avatar","alt","user_type","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_1___default"],"mappings":"0TAWMA,EADLC,4BAEG,SAAAD,EAAYE,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAN,IACfG,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAJ,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AAMC,UAAU,YAAYC,QAASpG,EAAMQ,gBAA3C,wCAAmEwE,EAAnE,uBACNyC,EAAMxB,EAAA5C,EAAA6C,cAAA,KAAGC,UAAU,OAAb,kFAENoB,EAAMtB,EAAA5C,EAAA6C,cAAA,KAAGC,UAAU,OAAb,2BAAA/E,OAA2BT,EAA3B,WACN6G,EAAMvB,EAAA5C,EAAA6C,cAACU,EAAA,EAAD,CAAMC,GAAE,aAAAzF,OAAeP,EAAKa,WAAayE,UAAU,aAAnD,6BAQd,OAJmB,IAAflC,IACAsD,EAAMtB,EAAA5C,EAAA6C,cAAA,KAAGC,UAAU,WAAb,4BACNqB,EAAMvB,EAAA5C,EAAA6C,cAACU,EAAA,EAAD,CAAMC,GAAE,QAAWV,UAAU,WAA7B,uBAGNF,EAAA5C,EAAA6C,cAAA,OAAKC,UAAU,iBAEPnF,EACIiF,EAAA5C,EAAA6C,cAAA,OAAKC,UAAU,kBAAkBC,QAASpG,EAAMQ,gBAC5CyF,EAAA5C,EAAA6C,cAAA,OAAKC,UAAU,cAAf,eAAA/E,OAEUR,EAFV,uFAIAqF,EAAA5C,EAAA6C,cAAA,OAAKC,UAAU,YACXF,EAAA5C,EAAA6C,cAAA,KAAGC,UAAU,0BAGrB,KAGPoB,EACDtB,EAAA5C,EAAA6C,cAAAoC,EAAAjF,EAAA,KACKqE,GAELzB,EAAA5C,EAAA6C,cAAAoC,EAAAjF,EAAA,KACKmE,GAEJC,GAEIxD,GACDgC,EAAA5C,EAAA6C,cAAA,OAAKC,UAAU,aACXF,EAAA5C,EAAA6C,cAAA,YACID,EAAA5C,EAAA6C,cAAA,KAAGC,UAAU,6BADjB,kGAIAF,EAAA5C,EAAA6C,cAAA,QAAMC,UAAU,UAAhB,eAAA/E,OAA+B4C,EAA/B,yBAOLlE","file":"static/js/togroup.f06e77ca.chunk.js","sourcesContent":["import React, { Component } from 'react'\nimport './togroup.scss'\nimport { HeaderBar, VList } from '../../../common'\n\nimport { getParam, http, browser} from \"@/utils\";\nimport { connect } from \"react-redux\"\nimport { Link } from \"react-router-dom\"\nimport { WingBlank, WhiteSpace, Flex, Toast } from 'antd-mobile'\nimport {getCourses} from './../../detail/actions';\n\n@connect()\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 // 直接进入课程详情页,isIn: 1\n link: location.origin + `/detail?id=${data.course_id}&isIn=1`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号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 toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`, {href: '/classify'});\n return false;\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' onClick={() => this.toCourseDetail(course_id)}>\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='拼团' cart={false} toHref={() => this.toCourseDetail(course_id)}></HeaderBar>\n {\n !is_success && \n <VList \n img={this.state.data.image_name} \n id={this.state.data.course_id} \n info={Info}\n toDetail={this.toCourseDetail}\n />\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' onClick={() => this.toCourseDetail(item.course_id)}>\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 (\n <VList \n img={item.image_name} \n key={item.uid} \n id={item.course_id} \n info={weekInfo}\n toDetail={this.toCourseDetail}\n />\n )\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],{1175:function(e,t,a){"use strict";a.r(t);a(43);var n,c=a(14),i=a.n(c),s=a(7),r=a(8),o=a(11),l=a(9),d=a(10),u=(a(257),a(99)),m=a.n(u),p=a(0),h=a.n(p),v=a(162),f=(a(786),a(19)),y=a(53),b=a(4),E=a(20),g=a(45),N=(a(787),a(647)),I=function(e){var t=e.item;return h.a.createElement("div",{className:"bottom"},h.a.createElement("span",{className:"price"},"\xa5",t.price1),h.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},S=Object(E.b)()(n=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,c=new Array(n),r=0;r<n;r++)c[r]=arguments[r];return(a=Object(o.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(c)))).state={num:10,list:[],courseId:null},a.getRecommendation=function(){b.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:Array.isArray(t.data)?t.data:[]}):i.a.info(t.msg)})},a.toCourseDetail=function(e){var t=a.props,n=t.dispatch,c=t.history;n(Object(g.d)(e,function(){c.push("/detail?id=".concat(e))}))},a}return Object(d.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){this.getRecommendation()}},{key:"render",value:function(){var e=this;return this.state.list.length?h.a.createElement("div",{className:"recommendation"},h.a.createElement("div",{className:"title"},"\u76f8\u5173\u63a8\u8350"),h.a.createElement("ul",null,this.state.list.map(function(t){var a=h.a.createElement("div",{className:"info"},h.a.createElement("p",{className:"title text-overflow-1"},t.course_title),h.a.createElement("p",{className:"des text-overflow-2"},t.simpledescription),h.a.createElement(I,{item:t}));return h.a.createElement(N.a,{key:t.course_id,img:t.image_name,handleClick:e.toCourseDetail,info:a,id:t.course_id})}))):null}}]),t}(p.PureComponent))||n,_=(a(788),a(15)),w=a.n(_),k=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return(a=Object(o.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(c)))).handleClick=function(e){a.props.selectVideo(e)},a}return Object(d.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this;return h.a.createElement("div",{className:"video-catalog"},h.a.createElement("ul",null,this.props.videoCatalog.map(function(t,a){return h.a.createElement("li",{key:t.id,className:w()({active:e.props.activeIndex===a})},h.a.createElement("div",{className:"video-title",onClick:e.handleClick.bind(e,a)},h.a.createElement("span",{className:"title"},t.name),h.a.createElement("span",{className:"duration"},t.duration),h.a.createElement("i",{className:w()("iconfont",[0===t.video_auth?"iconiconfront-74":"iconplay_hovericon"])})),t.practice&&t.practice.qid?h.a.createElement(f.b,{to:{pathname:"/campTest",search:"?keshi_id=".concat(t.id,"&qid=").concat(t.practice.qid)}},h.a.createElement("div",{className:"exercise"},"\u8bfe\u540e\u7ec3\u4e60\uff1a",t.practice.title,h.a.createElement("i",{className:w()("iconfont",t.video_auth?t.practice.is_tested?"iconiconfront-3":"":"iconiconfront-74")}))):null)})))}}]),t}(p.Component),x=(a(789),a(791)),O=a.n(x),P=(a(792),function(e){function t(){return Object(s.a)(this,t),Object(o.a)(this,Object(l.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props.datum;return h.a.createElement("div",{className:"datum-catalog"},h.a.createElement("p",{className:"prompt"},"\u8bfe\u7a0b\u8d44\u6599\u8bf7\u5230PC\u7aef\u64ad\u653e\u9875\u4e0b\u8f7d"),h.a.createElement(O.a,null,e&&e.length&&e.map(function(e,t){return h.a.createElement(O.a.Panel,{header:e.dir_name,key:t},e.files.map(function(e){return h.a.createElement("div",{key:e.file_id,className:"file-name"},e.file_name)}))})))}}]),t}(p.Component));P.defaultProps={datum:[{dir_name:"",files:[{file_name:"",file_id:0}]}]};var j=P,C=a(1155),A=(a(838),a(30)),R=a(41),D=a.n(R),L=a(839),B=a.n(L),T=a(660),W=m.a.alert;function M(e){return e.isShow&&h.a.createElement("div",{className:"progress-share-modal-wrapper"},h.a.createElement("div",{className:"progress-share-modal"},h.a.createElement("div",{className:"title"},"\u6bcf\u65e5\u6253\u5361"),h.a.createElement("ul",{className:"progress-container"},h.a.createElement("li",null,h.a.createElement("div",{className:"title"},"\u7d2f\u8ba1\u5b66\u4e60"),h.a.createElement("div",{className:"number"},h.a.createElement("span",{className:"num"},e.data.learn_day_count),"\u5929")),h.a.createElement("li",null,h.a.createElement("div",{className:"title"},"\u884c\u52a8\u529b\u8d85\u8fc7"),h.a.createElement("div",{className:"number"},h.a.createElement("span",{className:"num"},parseFloat(e.data.action_power)),"%"))),h.a.createElement("div",{className:"share-container"},h.a.createElement("div",{className:"title"},"\u5206\u4eab\u5230"),h.a.createElement("ul",null,h.a.createElement("li",{className:"share-icon"},h.a.createElement("a",{style:{display:"block"},href:e.data.url},h.a.createElement("div",{className:"icon"},h.a.createElement("i",{className:"iconfont iconweixinzhifu"})),h.a.createElement("div",{className:"text"},"\u5fae\u4fe1\u597d\u53cb"))),h.a.createElement("li",{className:"share-icon"},h.a.createElement("a",{style:{display:"block"},href:e.data.url},h.a.createElement("div",{className:"icon"},h.a.createElement("i",{className:"iconfont iconpengyouquaniconx"})),h.a.createElement("div",{className:"text"},"\u670b\u53cb\u5708"))))),h.a.createElement("i",{className:"iconfont iconiconfront-2 close",onClick:e.closeShareModal})))}var z=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,c=new Array(n),r=0;r<n;r++)c[r]=arguments[r];return(a=Object(o.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(c)))).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(){b.c.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(b.b)("id"),"]")).then(function(e){0===e.data.errno?a.props.history.push("/order?id=".concat(Object(b.b)("id")),{simple:1}):i.a.info(e.data.msg,2)})},a.toSingleset=function(e){a.setState({singleBox:!0,singMess:e})},a.boxHide=function(e){a.setState({singleBox:e})},a.setupRecord=function(){a.recordSocket=B()(API.record,{transports:["websocket"],forceNew:!0}),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(API["process-api"]),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(){b.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:0})},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(C.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(){b.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){e!==a.state.activeIndex&&(a.countSchedule(),a.setState({activeIndex:e},function(){a.hasAuth()&&(a.setPlayerSrc(a.state.videoList[e].play_url),a.sendLastRecord(),a.playVideo())}))},a.getVideoList=function(){var e="";e=Object(b.b)("video_id")?"".concat(API.home,"/m/course/play/").concat(a.courseID+"?video_id="+Object(b.b)("video_id")):"".concat(API.home,"/m/course/play/").concat(a.courseID),b.c.get(e).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()?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():W("\u6682\u65e0\u89c6\u9891","",[{text:"OK",onPress:function(){a.props.history.push("/")}}])}):i.a.info(t.msg)})},a.setPlayerSrc=function(e){a.player||a.initializePlayer(),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(){b.c.get("".concat(API.home,"/sys/course/price/").concat(Object(b.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;e.course;return e.videoList[e.activeIndex].video_auth?(a.setState({isAuth:!0}),!0):(a.setState({isAuth:!1}),!1)},a}return Object(d.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=window.location;"https:"!==e.protocol?(this.courseID=Object(b.b)("id"),this.courseID?(this.setState({courseId:this.courseID}),this.token=D.a.get("token"),this.getVideoList(),this.getDatumCatalog(),this.setupRecord()):this.props.history.replace("/")):e.replace("http"+e.href.slice(5))}},{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;b.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}):i.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,l=c.course;return h.a.createElement("div",{className:"play"},h.a.createElement(v.a,{title:this.state.title,arrow:!0}),h.a.createElement(A.f,{isLoading:this.state.isLoading},h.a.createElement("div",{className:"video"},h.a.createElement("video",{className:"video-js",ref:function(t){return e.video=t}},h.a.createElement("source",{src:"/",type:"application/x-mpegURL"})),!r&&!!i[s].is_class&&h.a.createElement("div",{className:"purchase-box"},h.a.createElement("div",{className:"hint"},"\u60a8\u5c1a\u672a\u8d2d\u4e70\u8be5\u8bfe\u65f6\uff0c\u8bf7\u8d2d\u4e70\u540e\u5b66\u4e60\u3002"),h.a.createElement("div",{className:"btns"},h.a.createElement("button",{type:"button",onClick:this.tobuy,className:"purchase-class"},"\xa5",o," \u8d2d\u4e70\u8bfe\u7a0b"),h.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"))),!r&&!!l.is_aist&&h.a.createElement("div",{className:"is-aist-box"},h.a.createElement("i",{className:"iconfont iconiconfront-21"}),h.a.createElement("p",{className:"time"},i[s].aist_start_time),h.a.createElement("p",{className:"time"},"\u8bf7\u8010\u5fc3\u7b49\u5f85..."))),h.a.createElement("div",{className:"tab"},h.a.createElement("div",null,h.a.createElement(f.c,{to:{pathname:"".concat(a.url,"/video"),search:"?id=".concat(this.courseID)},replace:!0,activeClassName:"active"},"\u89c6\u9891")),h.a.createElement("div",null,h.a.createElement(f.c,{to:{pathname:"".concat(a.url,"/datum"),search:"?id=".concat(this.courseID)},replace:!0,activeClassName:"active"},"\u8d44\u6599"))),h.a.createElement(T.a,{singleBox:this.state.singleBox,boxHide:this.boxHide,data:this.state.singMess,videoId:this.state.singMess.id,title:this.state.singMess.course_tile})),h.a.createElement(y.d,null,h.a.createElement(y.a,{exact:!0,from:"/play",to:{pathname:"/play/video",search:n.search}}),h.a.createElement(y.b,{path:"".concat(a.path,"/video"),render:function(t){return h.a.createElement(k,Object.assign({activeIndex:e.state.activeIndex,selectVideo:e.selectVideo,videoCatalog:i},t))}}),h.a.createElement(y.b,{path:"".concat(a.path,"/datum"),render:function(t){return h.a.createElement(j,Object.assign({},t,{datum:e.state.datum}))}})),h.a.createElement(y.b,{render:function(t){return e.state.vCourseId?h.a.createElement(S,Object.assign({},t,{vCourseId:e.state.vCourseId})):null}}),h.a.createElement(M,{isShow:this.state.isShowShareModal,closeShareModal:function(){return e.setState({isShowShareModal:!1})},data:this.state.shareData}))}}]),t}(p.Component);t.default=Object(E.b)(function(e){return{user:e.user}},null)(z)},647:function(e,t,a){"use strict";var n=a(0),c=a.n(n);a(648);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)}},648:function(e,t,a){},660:function(e,t,a){"use strict";a(43);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(661),a(4)),p=a(19),h=a(53),v=a(17),f=a(20),y=a(156),b=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/video?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)(b)},661:function(e,t,a){},786:function(e,t,a){},787:function(e,t,a){},788:function(e,t,a){},792:function(e,t,a){},794:function(e,t){},862:function(e,t){}}]);
//# sourceMappingURL=video.03e9383a.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{1175:function(e,t,a){"use strict";a.r(t);a(43);var n,c=a(14),i=a.n(c),s=a(7),r=a(8),o=a(11),l=a(9),d=a(10),u=(a(257),a(99)),m=a.n(u),p=a(0),h=a.n(p),v=a(162),f=(a(786),a(18)),y=a(53),b=a(4),E=a(20),g=a(45),N=(a(787),a(647)),I=function(e){var t=e.item;return h.a.createElement("div",{className:"bottom"},h.a.createElement("span",{className:"price"},"\xa5",t.price1),h.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},S=Object(E.b)()(n=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,c=new Array(n),r=0;r<n;r++)c[r]=arguments[r];return(a=Object(o.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(c)))).state={num:10,list:[],courseId:null},a.getRecommendation=function(){b.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:Array.isArray(t.data)?t.data:[]}):i.a.info(t.msg)})},a.toCourseDetail=function(e){var t=a.props,n=t.dispatch,c=t.history;n(Object(g.d)(e,function(){c.push("/detail?id=".concat(e))}))},a}return Object(d.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){this.getRecommendation()}},{key:"render",value:function(){var e=this;return this.state.list.length?h.a.createElement("div",{className:"recommendation"},h.a.createElement("div",{className:"title"},"\u76f8\u5173\u63a8\u8350"),h.a.createElement("ul",null,this.state.list.map(function(t){var a=h.a.createElement("div",{className:"info"},h.a.createElement("p",{className:"title text-overflow-1"},t.course_title),h.a.createElement("p",{className:"des text-overflow-2"},t.simpledescription),h.a.createElement(I,{item:t}));return h.a.createElement(N.a,{key:t.course_id,img:t.image_name,handleClick:e.toCourseDetail,info:a,id:t.course_id})}))):null}}]),t}(p.PureComponent))||n,_=(a(788),a(15)),w=a.n(_),k=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return(a=Object(o.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(c)))).handleClick=function(e){a.props.selectVideo(e)},a}return Object(d.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this;return h.a.createElement("div",{className:"video-catalog"},h.a.createElement("ul",null,this.props.videoCatalog.map(function(t,a){return h.a.createElement("li",{key:t.id,className:w()({active:e.props.activeIndex===a})},h.a.createElement("div",{className:"video-title",onClick:e.handleClick.bind(e,a)},h.a.createElement("span",{className:"title"},t.name),h.a.createElement("span",{className:"duration"},t.duration),h.a.createElement("i",{className:w()("iconfont",[0===t.video_auth?"iconiconfront-74":"iconplay_hovericon"])})),t.practice&&t.practice.qid?h.a.createElement(f.b,{to:{pathname:"/campTest",search:"?keshi_id=".concat(t.id,"&qid=").concat(t.practice.qid)}},h.a.createElement("div",{className:"exercise"},"\u8bfe\u540e\u7ec3\u4e60\uff1a",t.practice.title,h.a.createElement("i",{className:w()("iconfont",t.video_auth?t.practice.is_tested?"iconiconfront-3":"":"iconiconfront-74")}))):null)})))}}]),t}(p.Component),x=(a(789),a(791)),O=a.n(x),P=(a(792),function(e){function t(){return Object(s.a)(this,t),Object(o.a)(this,Object(l.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props.datum;return h.a.createElement("div",{className:"datum-catalog"},h.a.createElement("p",{className:"prompt"},"\u8bfe\u7a0b\u8d44\u6599\u8bf7\u5230PC\u7aef\u64ad\u653e\u9875\u4e0b\u8f7d"),h.a.createElement(O.a,null,e&&e.length&&e.map(function(e,t){return h.a.createElement(O.a.Panel,{header:e.dir_name,key:t},e.files.map(function(e){return h.a.createElement("div",{key:e.file_id,className:"file-name"},e.file_name)}))})))}}]),t}(p.Component));P.defaultProps={datum:[{dir_name:"",files:[{file_name:"",file_id:0}]}]};var j=P,C=a(1155),A=(a(838),a(30)),R=a(41),D=a.n(R),L=a(839),B=a.n(L),T=a(660),W=m.a.alert;function M(e){return e.isShow&&h.a.createElement("div",{className:"progress-share-modal-wrapper"},h.a.createElement("div",{className:"progress-share-modal"},h.a.createElement("div",{className:"title"},"\u6bcf\u65e5\u6253\u5361"),h.a.createElement("ul",{className:"progress-container"},h.a.createElement("li",null,h.a.createElement("div",{className:"title"},"\u7d2f\u8ba1\u5b66\u4e60"),h.a.createElement("div",{className:"number"},h.a.createElement("span",{className:"num"},e.data.learn_day_count),"\u5929")),h.a.createElement("li",null,h.a.createElement("div",{className:"title"},"\u884c\u52a8\u529b\u8d85\u8fc7"),h.a.createElement("div",{className:"number"},h.a.createElement("span",{className:"num"},parseFloat(e.data.action_power)),"%"))),h.a.createElement("div",{className:"share-container"},h.a.createElement("div",{className:"title"},"\u5206\u4eab\u5230"),h.a.createElement("ul",null,h.a.createElement("li",{className:"share-icon"},h.a.createElement("a",{style:{display:"block"},href:e.data.url},h.a.createElement("div",{className:"icon"},h.a.createElement("i",{className:"iconfont iconweixinzhifu"})),h.a.createElement("div",{className:"text"},"\u5fae\u4fe1\u597d\u53cb"))),h.a.createElement("li",{className:"share-icon"},h.a.createElement("a",{style:{display:"block"},href:e.data.url},h.a.createElement("div",{className:"icon"},h.a.createElement("i",{className:"iconfont iconpengyouquaniconx"})),h.a.createElement("div",{className:"text"},"\u670b\u53cb\u5708"))))),h.a.createElement("i",{className:"iconfont iconiconfront-2 close",onClick:e.closeShareModal})))}var z=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,c=new Array(n),r=0;r<n;r++)c[r]=arguments[r];return(a=Object(o.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(c)))).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(){b.c.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(b.b)("id"),"]")).then(function(e){0===e.data.errno?a.props.history.push("/order?id=".concat(Object(b.b)("id")),{simple:1}):i.a.info(e.data.msg,2)})},a.toSingleset=function(e){a.setState({singleBox:!0,singMess:e})},a.boxHide=function(e){a.setState({singleBox:e})},a.setupRecord=function(){a.recordSocket=B()(API.record,{transports:["websocket"],forceNew:!0}),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(API["process-api"]),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(){b.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:0})},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(C.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(){b.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){e!==a.state.activeIndex&&(a.countSchedule(),a.setState({activeIndex:e},function(){a.hasAuth()&&(a.setPlayerSrc(a.state.videoList[e].play_url),a.sendLastRecord(),a.playVideo())}))},a.getVideoList=function(){var e="";e=Object(b.b)("video_id")?"".concat(API.home,"/m/course/play/").concat(a.courseID+"?video_id="+Object(b.b)("video_id")):"".concat(API.home,"/m/course/play/").concat(a.courseID),b.c.get(e).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()?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():W("\u6682\u65e0\u89c6\u9891","",[{text:"OK",onPress:function(){a.props.history.push("/")}}])}):i.a.info(t.msg)})},a.setPlayerSrc=function(e){a.player||a.initializePlayer(),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(){b.c.get("".concat(API.home,"/sys/course/price/").concat(Object(b.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;e.course;return e.videoList[e.activeIndex].video_auth?(a.setState({isAuth:!0}),!0):(a.setState({isAuth:!1}),!1)},a}return Object(d.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=window.location;"https:"!==e.protocol?(this.courseID=Object(b.b)("id"),this.courseID?(this.setState({courseId:this.courseID}),this.token=D.a.get("token"),this.getVideoList(),this.getDatumCatalog(),this.setupRecord()):this.props.history.replace("/")):e.replace("http"+e.href.slice(5))}},{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;b.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}):i.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,l=c.course;return h.a.createElement("div",{className:"play"},h.a.createElement(v.a,{title:this.state.title,arrow:!0}),h.a.createElement(A.f,{isLoading:this.state.isLoading},h.a.createElement("div",{className:"video"},h.a.createElement("video",{className:"video-js",ref:function(t){return e.video=t}},h.a.createElement("source",{src:"/",type:"application/x-mpegURL"})),!r&&!!i[s].is_class&&h.a.createElement("div",{className:"purchase-box"},h.a.createElement("div",{className:"hint"},"\u60a8\u5c1a\u672a\u8d2d\u4e70\u8be5\u8bfe\u65f6\uff0c\u8bf7\u8d2d\u4e70\u540e\u5b66\u4e60\u3002"),h.a.createElement("div",{className:"btns"},h.a.createElement("button",{type:"button",onClick:this.tobuy,className:"purchase-class"},"\xa5",o," \u8d2d\u4e70\u8bfe\u7a0b"),h.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"))),!r&&!!l.is_aist&&h.a.createElement("div",{className:"is-aist-box"},h.a.createElement("i",{className:"iconfont iconiconfront-21"}),h.a.createElement("p",{className:"time"},i[s].aist_start_time),h.a.createElement("p",{className:"time"},"\u8bf7\u8010\u5fc3\u7b49\u5f85..."))),h.a.createElement("div",{className:"tab"},h.a.createElement("div",null,h.a.createElement(f.c,{to:{pathname:"".concat(a.url,"/video"),search:"?id=".concat(this.courseID)},replace:!0,activeClassName:"active"},"\u89c6\u9891")),h.a.createElement("div",null,h.a.createElement(f.c,{to:{pathname:"".concat(a.url,"/datum"),search:"?id=".concat(this.courseID)},replace:!0,activeClassName:"active"},"\u8d44\u6599"))),h.a.createElement(T.a,{singleBox:this.state.singleBox,boxHide:this.boxHide,data:this.state.singMess,videoId:this.state.singMess.id,title:this.state.singMess.course_tile})),h.a.createElement(y.d,null,h.a.createElement(y.a,{exact:!0,from:"/play",to:{pathname:"/play/video",search:n.search}}),h.a.createElement(y.b,{path:"".concat(a.path,"/video"),render:function(t){return h.a.createElement(k,Object.assign({activeIndex:e.state.activeIndex,selectVideo:e.selectVideo,videoCatalog:i},t))}}),h.a.createElement(y.b,{path:"".concat(a.path,"/datum"),render:function(t){return h.a.createElement(j,Object.assign({},t,{datum:e.state.datum}))}})),h.a.createElement(y.b,{render:function(t){return e.state.vCourseId?h.a.createElement(S,Object.assign({},t,{vCourseId:e.state.vCourseId})):null}}),h.a.createElement(M,{isShow:this.state.isShowShareModal,closeShareModal:function(){return e.setState({isShowShareModal:!1})},data:this.state.shareData}))}}]),t}(p.Component);t.default=Object(E.b)(function(e){return{user:e.user}},null)(z)},647:function(e,t,a){"use strict";var n=a(0),c=a.n(n);a(648);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)}},648:function(e,t,a){},660:function(e,t,a){"use strict";a(43);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(661),a(4)),p=a(18),h=a(53),v=a(17),f=a(20),y=a(156),b=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/video?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)(b)},661:function(e,t,a){},786:function(e,t,a){},787:function(e,t,a){},788:function(e,t,a){},792:function(e,t,a){},794:function(e,t){},862:function(e,t){}}]);
//# sourceMappingURL=video.6db74c8b.chunk.js.map
\ No newline at end of file
......@@ -97,7 +97,7 @@ export default class PayOrder extends Component {
pay = () => {
const {payType, orderId} = this.state;
if(payType === 0) {
this.alipayPay(orderId)
this.alipayPay(orderId);
} else if (payType === 1) {
this.weixinPay(orderId)
}
......@@ -117,14 +117,15 @@ export default class PayOrder extends Component {
if (res.data.errno === 0) {
window.location.href = res.data.data.url + "&redirect_url=" + encodeURIComponent(window.location.href + "&weixinpay=1").toLowerCase();
} else {
Toast.info(res.data.msg + 'weixinPay', 2)
Toast.info(res.data.msg, 2)
}
})
}
}
// 微信内部支付
isweixinPay = () => {
let weixin_code = getParam('code')
let _this = this;
let weixin_code = getParam('code');
if (weixin_code) {
if (getParam('oid') === undefined) {
return
......@@ -132,20 +133,10 @@ export default class PayOrder extends Component {
http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => {
if (res.data.errno === 0) {
let data = res.data.data;
// this.BridgeData = res.data.data;
// Toast.info(this.BridgeData.appId, 1);
// this.onBridgeReady(this.BridgeData); // 这个应该不需要
function onBridgeReady() {
Toast.info(data.appId, 2);
console.log(`181 line data: ${JSON.stringify(data)}`);
let _this = this;
// data = data || _this.BridgeData;
console.log(`184 line data: ${JSON.stringify(data)}`);
Toast.info(data.appId, 5);
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
appId:"wx23dac6775ac82877", //公众号名称,由商户传入
appId:data.appId, //公众号名称,由商户传入
timeStamp:data.timeStamp, //时间戳,自1970年以来的秒数
nonceStr:data.nonceStr, //随机串
package:data.package,
......@@ -155,7 +146,23 @@ export default class PayOrder extends Component {
function (res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
Toast.info('支付成功', 2);
_this.payCallback();
_this.intervalPayStatus = setInterval(function(){
http.get(`${API['base-api']}/m/orderState/oid/${getParam('oid')}`).then(res => {
if (res.data.errno === 401) {
clearInterval(_this.intervalPayStatus);
_this.intervalPayStatus = null;
// 获取课程类型
http.get(`${API['base-api']}/m/app_order/detail/${getParam('oid')}`).then(res => {
if(Number(res.data.data.course_type) === 2) {
_this.props.history.replace(`/togroup?id=${getParam('oid')}`);
}else{
// 跳转到已购课程 /purchased 不需要传递任何参数
_this.props.history.replace(`/purchased`);
}
});
}
})
}, 1000)
} else {
alert('支付失败')
}
......@@ -174,7 +181,7 @@ export default class PayOrder extends Component {
onBridgeReady();
}
} else {
Toast.info(res.data.msg + 'isweixinPay', 2)
Toast.info(res.data.msg, 2)
}
})
}
......@@ -191,12 +198,12 @@ export default class PayOrder extends Component {
clearInterval(_this.intervalPayStatus);
_this.intervalPayStatus = null;
// 获取课程类型
http.get(`${API.home}/m/app_order/detail/${getParam('oid')}`).then(res => {
if(res.data.data.course_type === '2') {
this.props.history.replace(`/togroup?id=${getParam('oid')}`);
http.get(`${API['base-api']}/m/app_order/detail/${getParam('oid')}`).then(res => {
if(Number(res.data.data.course_type) === 2) {
_this.props.history.replace(`/togroup?id=${getParam('oid')}`);
}else{
// 跳转到已购课程 /purchased 不需要传递任何参数
this.props.history.replace(`/purchased`);
_this.props.history.replace(`/purchased`);
}
});
......@@ -206,12 +213,8 @@ export default class PayOrder extends Component {
}
onBridgeReady1 = (data) => {
Toast.info(data.appId, 2);
console.log(`181 line data: ${JSON.stringify(data)}`);
let _this = this;
data = data || _this.BridgeData;
console.log(`184 line data: ${JSON.stringify(data)}`);
Toast.info(data.appId, 100);
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
......@@ -239,7 +242,7 @@ export default class PayOrder extends Component {
this.payCallback();
window.location = res.data.data.url;
} else {
Toast.info(res.data.msg + 'alipayPay', 2)
Toast.info(res.data.msg, 2)
}
})
}
......@@ -253,7 +256,7 @@ export default class PayOrder extends Component {
if (res.data.errno === 0) {
window.location = res.data.data.url;
} else {
Toast.info(res.data.msg + "huabeiPay", 2)
Toast.info(res.data.msg, 2)
}
});
}
......@@ -263,7 +266,7 @@ export default class PayOrder extends Component {
http.post(`${API['base-api']}/m/order/detail`, { order_id: this.state.orderId }).then((res) => {
console.log(res);
if (res.data.errno !== 200) {
Toast.info(res.data.msg + 'componentDidMount', 2);
Toast.info(res.data.msg, 2);
return;
}
const { course, pay_amount } = res.data.data;
......
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