Commit 983b183b by zhanghaozhe

Merge branch 'master' into international-phone-number

# Conflicts:
#	src/components/passport/index.js
parents 9a30e8ce 975419f3
......@@ -2,11 +2,11 @@
"mrstatic/js/0.aef3cf26.chunk.js": "/mrstatic/js/0.aef3cf26.chunk.js",
"mrstatic/js/0.aef3cf26.chunk.js.map": "/mrstatic/js/0.aef3cf26.chunk.js.map",
"BargainMiddlePage.css": "/mrstatic/css/BargainMiddlePage.718dff83.chunk.css",
"BargainMiddlePage.js": "/mrstatic/js/BargainMiddlePage.f63f8cf2.chunk.js",
"BargainMiddlePage.js.map": "/mrstatic/js/BargainMiddlePage.f63f8cf2.chunk.js.map",
"BargainMiddlePage.js": "/mrstatic/js/BargainMiddlePage.f5bb0d59.chunk.js",
"BargainMiddlePage.js.map": "/mrstatic/js/BargainMiddlePage.f5bb0d59.chunk.js.map",
"Classify.css": "/mrstatic/css/Classify.f2f19957.chunk.css",
"Classify.js": "/mrstatic/js/Classify.994277e1.chunk.js",
"Classify.js.map": "/mrstatic/js/Classify.994277e1.chunk.js.map",
"Classify.js": "/mrstatic/js/Classify.914a8251.chunk.js",
"Classify.js.map": "/mrstatic/js/Classify.914a8251.chunk.js.map",
"CourseList.css": "/mrstatic/css/CourseList.c0829f24.chunk.css",
"CourseList.js": "/mrstatic/js/CourseList.ab1190ce.chunk.js",
"CourseList.js.map": "/mrstatic/js/CourseList.ab1190ce.chunk.js.map",
......@@ -19,60 +19,60 @@
"MyEdit.js": "/mrstatic/js/MyEdit.30ed911f.chunk.js",
"MyEdit.js.map": "/mrstatic/js/MyEdit.30ed911f.chunk.js.map",
"Order.css": "/mrstatic/css/Order.8bb031ea.chunk.css",
"Order.js": "/mrstatic/js/Order.96622df3.chunk.js",
"Order.js.map": "/mrstatic/js/Order.96622df3.chunk.js.map",
"Order.js": "/mrstatic/js/Order.d0b6e74e.chunk.js",
"Order.js.map": "/mrstatic/js/Order.d0b6e74e.chunk.js.map",
"Orderinfo.js": "/mrstatic/js/Orderinfo.eaea6ad9.chunk.js",
"Orderinfo.js.map": "/mrstatic/js/Orderinfo.eaea6ad9.chunk.js.map",
"PayOrder.css": "/mrstatic/css/PayOrder.e5315535.chunk.css",
"PayOrder.js": "/mrstatic/js/PayOrder.3f5285c6.chunk.js",
"PayOrder.js.map": "/mrstatic/js/PayOrder.3f5285c6.chunk.js.map",
"PayOrder.js": "/mrstatic/js/PayOrder.c0854efc.chunk.js",
"PayOrder.js.map": "/mrstatic/js/PayOrder.c0854efc.chunk.js.map",
"Preferential.css": "/mrstatic/css/Preferential.cda7a495.chunk.css",
"Preferential.js": "/mrstatic/js/Preferential.c92167d3.chunk.js",
"Preferential.js.map": "/mrstatic/js/Preferential.c92167d3.chunk.js.map",
"SearchResult.css": "/mrstatic/css/SearchResult.2649d43f.chunk.css",
"SearchResult.js": "/mrstatic/js/SearchResult.a9940fff.chunk.js",
"SearchResult.js.map": "/mrstatic/js/SearchResult.a9940fff.chunk.js.map",
"SearchResult.js": "/mrstatic/js/SearchResult.0c0c9343.chunk.js",
"SearchResult.js.map": "/mrstatic/js/SearchResult.0c0c9343.chunk.js.map",
"ShopCart.css": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css",
"ShopCart.js": "/mrstatic/js/ShopCart.023ad36a.chunk.js",
"ShopCart.js.map": "/mrstatic/js/ShopCart.023ad36a.chunk.js.map",
"ShopCart.js": "/mrstatic/js/ShopCart.4c2987b1.chunk.js",
"ShopCart.js.map": "/mrstatic/js/ShopCart.4c2987b1.chunk.js.map",
"aist-share.css": "/mrstatic/css/aist-share.bef8c404.chunk.css",
"aist-share.js": "/mrstatic/js/aist-share.78a5ac9c.chunk.js",
"aist-share.js.map": "/mrstatic/js/aist-share.78a5ac9c.chunk.js.map",
"coupons.css": "/mrstatic/css/coupons.4a456833.chunk.css",
"coupons.js": "/mrstatic/js/coupons.b214df27.chunk.js",
"coupons.js.map": "/mrstatic/js/coupons.b214df27.chunk.js.map",
"aist-share.js": "/mrstatic/js/aist-share.ca8ee328.chunk.js",
"aist-share.js.map": "/mrstatic/js/aist-share.ca8ee328.chunk.js.map",
"coupons.css": "/mrstatic/css/coupons.de0ae9dc.chunk.css",
"coupons.js": "/mrstatic/js/coupons.60649292.chunk.js",
"coupons.js.map": "/mrstatic/js/coupons.60649292.chunk.js.map",
"detail.css": "/mrstatic/css/detail.4c28ce89.chunk.css",
"detail.js": "/mrstatic/js/detail.c4409a6e.chunk.js",
"detail.js.map": "/mrstatic/js/detail.c4409a6e.chunk.js.map",
"detail.js": "/mrstatic/js/detail.2c2c806a.chunk.js",
"detail.js.map": "/mrstatic/js/detail.2c2c806a.chunk.js.map",
"main.css": "/mrstatic/css/main.d9221c15.chunk.css",
"main.js": "/mrstatic/js/main.b701803d.chunk.js",
"main.js.map": "/mrstatic/js/main.b701803d.chunk.js.map",
"main.js": "/mrstatic/js/main.0c0a0e50.chunk.js",
"main.js.map": "/mrstatic/js/main.0c0a0e50.chunk.js.map",
"myorders.css": "/mrstatic/css/myorders.3ae12dec.chunk.css",
"myorders.js": "/mrstatic/js/myorders.2957b1c3.chunk.js",
"myorders.js.map": "/mrstatic/js/myorders.2957b1c3.chunk.js.map",
"myorders.js": "/mrstatic/js/myorders.b388a40d.chunk.js",
"myorders.js.map": "/mrstatic/js/myorders.b388a40d.chunk.js.map",
"purchased.css": "/mrstatic/css/purchased.1daf107b.chunk.css",
"purchased.js": "/mrstatic/js/purchased.fd53e3b4.chunk.js",
"purchased.js.map": "/mrstatic/js/purchased.fd53e3b4.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.a19408db.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.a19408db.js.map",
"purchased.js": "/mrstatic/js/purchased.44208014.chunk.js",
"purchased.js.map": "/mrstatic/js/purchased.44208014.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.21ddada3.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.21ddada3.js.map",
"search.css": "/mrstatic/css/search.fab97849.chunk.css",
"search.js": "/mrstatic/js/search.0053fea0.chunk.js",
"search.js.map": "/mrstatic/js/search.0053fea0.chunk.js.map",
"search.js": "/mrstatic/js/search.e1881957.chunk.js",
"search.js.map": "/mrstatic/js/search.e1881957.chunk.js.map",
"shareposter.css": "/mrstatic/css/shareposter.f09a5959.chunk.css",
"shareposter.js": "/mrstatic/js/shareposter.1e04a897.chunk.js",
"shareposter.js.map": "/mrstatic/js/shareposter.1e04a897.chunk.js.map",
"study.css": "/mrstatic/css/study.5e9927d1.chunk.css",
"study.js": "/mrstatic/js/study.2bd0e879.chunk.js",
"study.js.map": "/mrstatic/js/study.2bd0e879.chunk.js.map",
"study.js": "/mrstatic/js/study.2c0ce1c1.chunk.js",
"study.js.map": "/mrstatic/js/study.2c0ce1c1.chunk.js.map",
"togroup.css": "/mrstatic/css/togroup.49988cae.chunk.css",
"togroup.js": "/mrstatic/js/togroup.3e165b5f.chunk.js",
"togroup.js.map": "/mrstatic/js/togroup.3e165b5f.chunk.js.map",
"togroup.js": "/mrstatic/js/togroup.03b425a3.chunk.js",
"togroup.js.map": "/mrstatic/js/togroup.03b425a3.chunk.js.map",
"video.css": "/mrstatic/css/video.b57a1aec.chunk.css",
"video.js": "/mrstatic/js/video.0d7cb00a.chunk.js",
"video.js.map": "/mrstatic/js/video.0d7cb00a.chunk.js.map",
"video.js": "/mrstatic/js/video.41f298c2.chunk.js",
"video.js.map": "/mrstatic/js/video.41f298c2.chunk.js.map",
"mrstatic/css/25.aebbab68.chunk.css": "/mrstatic/css/25.aebbab68.chunk.css",
"mrstatic/js/25.3dfc5c01.chunk.js": "/mrstatic/js/25.3dfc5c01.chunk.js",
"mrstatic/js/25.3dfc5c01.chunk.js.map": "/mrstatic/js/25.3dfc5c01.chunk.js.map",
"mrstatic/js/25.bc7deb84.chunk.js": "/mrstatic/js/25.bc7deb84.chunk.js",
"mrstatic/js/25.bc7deb84.chunk.js.map": "/mrstatic/js/25.bc7deb84.chunk.js.map",
"mrstatic/js/26.b2e8d558.chunk.js": "/mrstatic/js/26.b2e8d558.chunk.js",
"mrstatic/js/26.b2e8d558.chunk.js.map": "/mrstatic/js/26.b2e8d558.chunk.js.map",
"mrstatic/css/27.4c706a4e.chunk.css": "/mrstatic/css/27.4c706a4e.chunk.css",
......@@ -116,7 +116,7 @@
"mrstatic/css/SearchResult.2649d43f.chunk.css.map": "/mrstatic/css/SearchResult.2649d43f.chunk.css.map",
"mrstatic/css/ShopCart.3a4dbb7a.chunk.css.map": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css.map",
"mrstatic/css/aist-share.bef8c404.chunk.css.map": "/mrstatic/css/aist-share.bef8c404.chunk.css.map",
"mrstatic/css/coupons.4a456833.chunk.css.map": "/mrstatic/css/coupons.4a456833.chunk.css.map",
"mrstatic/css/coupons.de0ae9dc.chunk.css.map": "/mrstatic/css/coupons.de0ae9dc.chunk.css.map",
"mrstatic/css/detail.4c28ce89.chunk.css.map": "/mrstatic/css/detail.4c28ce89.chunk.css.map",
"mrstatic/css/main.d9221c15.chunk.css.map": "/mrstatic/css/main.d9221c15.chunk.css.map",
"mrstatic/css/myorders.3ae12dec.chunk.css.map": "/mrstatic/css/myorders.3ae12dec.chunk.css.map",
......@@ -130,6 +130,6 @@
"mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.f983caa7.svg",
"mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png",
"mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png",
"precache-manifest.3f5f2a3c7a01584265ba90175b926773.js": "/precache-manifest.3f5f2a3c7a01584265ba90175b926773.js",
"precache-manifest.6fd5f509ced587e4c9cf72388cad6820.js": "/precache-manifest.6fd5f509ced587e4c9cf72388cad6820.js",
"service-worker.js": "/service-worker.js"
}
\ 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="/mrstatic/css/25.aebbab68.chunk.css" rel="stylesheet"><link href="/mrstatic/css/main.d9221c15.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/api.js"></script><script>!function(f){function e(e){for(var r,t,a=e[0],n=e[1],o=e[2],c=0,d=[];c<a.length;c++)t=a[c],l[t]&&d.push(l[t][0]),l[t]=0;for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(f[r]=n[r]);for(h&&h(e);d.length;)d.shift()();return u.push.apply(u,o||[]),i()}function i(){for(var e,r=0;r<u.length;r++){for(var t=u[r],a=!0,n=1;n<t.length;n++){var o=t[n];0!==l[o]&&(a=!1)}a&&(u.splice(r--,1),e=p(p.s=t[0]))}return e}var t={},s={19:0},l={19:0},u=[];function p(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return f[e].call(r.exports,r,r.exports,p),r.l=!0,r.exports}p.e=function(u){var e=[];s[u]?e.push(s[u]):0!==s[u]&&{1:1,2:1,3:1,4:1,5:1,7:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,17:1,18:1,20:1,21:1,22:1,23:1,24:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1}[u]&&e.push(s[u]=new Promise(function(e,a){for(var r="mrstatic/css/"+({1:"BargainMiddlePage",2:"Classify",3:"CourseList",4:"DrawDocument",5:"Examination",6:"MyEdit",7:"Order",8:"Orderinfo",9:"PayOrder",10:"Preferential",11:"SearchResult",12:"ShopCart",13:"aist-share",14:"coupons",15:"detail",17:"myorders",18:"purchased",20:"search",21:"shareposter",22:"study",23:"togroup",24:"video"}[u]||u)+"."+{0:"31d6cfe0",1:"718dff83",2:"f2f19957",3:"c0829f24",4:"2e7d81ca",5:"f2cc3163",6:"31d6cfe0",7:"8bb031ea",8:"31d6cfe0",9:"e5315535",10:"cda7a495",11:"2649d43f",12:"3a4dbb7a",13:"bef8c404",14:"4a456833",15:"4c28ce89",17:"3ae12dec",18:"1daf107b",20:"fab97849",21:"f09a5959",22:"5e9927d1",23:"49988cae",24:"b57a1aec",26:"31d6cfe0",27:"4c706a4e",28:"2471f477",29:"0bb224f2",30:"5ed15c7e",31:"ecbb6f9a",32:"278ad3b1",33:"03fe7b57"}[u]+".chunk.css",n=p.p+r,t=document.getElementsByTagName("link"),o=0;o<t.length;o++){var c=(f=t[o]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(c===r||c===n))return e()}var d=document.getElementsByTagName("style");for(o=0;o<d.length;o++){var f;if((c=(f=d[o]).getAttribute("data-href"))===r||c===n)return e()}var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",i.onload=e,i.onerror=function(e){var r=e&&e.target&&e.target.src||n,t=new Error("Loading CSS chunk "+u+" failed.\n("+r+")");t.request=r,delete s[u],i.parentNode.removeChild(i),a(t)},i.href=n,document.getElementsByTagName("head")[0].appendChild(i)}).then(function(){s[u]=0}));var t=l[u];if(0!==t)if(t)e.push(t[2]);else{var r=new Promise(function(e,r){t=l[u]=[e,r]});e.push(t[2]=r);var a,o=document.createElement("script");o.charset="utf-8",o.timeout=120,p.nc&&o.setAttribute("nonce",p.nc),o.src=p.p+"mrstatic/js/"+({1:"BargainMiddlePage",2:"Classify",3:"CourseList",4:"DrawDocument",5:"Examination",6:"MyEdit",7:"Order",8:"Orderinfo",9:"PayOrder",10:"Preferential",11:"SearchResult",12:"ShopCart",13:"aist-share",14:"coupons",15:"detail",17:"myorders",18:"purchased",20:"search",21:"shareposter",22:"study",23:"togroup",24:"video"}[u]||u)+"."+{0:"aef3cf26",1:"f63f8cf2",2:"994277e1",3:"ab1190ce",4:"7730f3de",5:"df98c5b3",6:"30ed911f",7:"96622df3",8:"eaea6ad9",9:"3f5285c6",10:"c92167d3",11:"a9940fff",12:"023ad36a",13:"78a5ac9c",14:"b214df27",15:"c4409a6e",17:"2957b1c3",18:"fd53e3b4",20:"0053fea0",21:"1e04a897",22:"2bd0e879",23:"3e165b5f",24:"0d7cb00a",26:"b2e8d558",27:"4948c8d6",28:"a684e5c7",29:"cddce484",30:"58628dcc",31:"66e2dea5",32:"0e3712aa",33:"9869dd21"}[u]+".chunk.js",a=function(e){o.onerror=o.onload=null,clearTimeout(c);var r=l[u];if(0!==r){if(r){var t=e&&("load"===e.type?"missing":e.type),a=e&&e.target&&e.target.src,n=new Error("Loading chunk "+u+" failed.\n("+t+": "+a+")");n.type=t,n.request=a,r[1](n)}l[u]=void 0}};var c=setTimeout(function(){a({type:"timeout",target:o})},12e4);o.onerror=o.onload=a,document.head.appendChild(o)}return Promise.all(e)},p.m=f,p.c=t,p.d=function(e,r,t){p.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.t=function(r,e){if(1&e&&(r=p(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(p.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var a in r)p.d(t,a,function(e){return r[e]}.bind(null,a));return t},p.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(r,"a",r),r},p.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},p.p="/",p.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],a=r.push.bind(r);r.push=e,r=r.slice();for(var n=0;n<r.length;n++)e(r[n]);var h=a;i()}([])</script><script src="/mrstatic/js/25.3dfc5c01.chunk.js"></script><script src="/mrstatic/js/main.b701803d.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="/mrstatic/css/25.aebbab68.chunk.css" rel="stylesheet"><link href="/mrstatic/css/main.d9221c15.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,a=e[0],n=e[1],o=e[2],c=0,d=[];c<a.length;c++)t=a[c],l[t]&&d.push(l[t][0]),l[t]=0;for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[r]=n[r]);for(h&&h(e);d.length;)d.shift()();return f.push.apply(f,o||[]),u()}function u(){for(var e,r=0;r<f.length;r++){for(var t=f[r],a=!0,n=1;n<t.length;n++){var o=t[n];0!==l[o]&&(a=!1)}a&&(f.splice(r--,1),e=p(p.s=t[0]))}return e}var t={},s={19:0},l={19:0},f=[];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(f){var e=[];s[f]?e.push(s[f]):0!==s[f]&&{1:1,2:1,3:1,4:1,5:1,7:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,17:1,18:1,20:1,21:1,22:1,23:1,24:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1}[f]&&e.push(s[f]=new Promise(function(e,a){for(var r="mrstatic/css/"+({1:"BargainMiddlePage",2:"Classify",3:"CourseList",4:"DrawDocument",5:"Examination",6:"MyEdit",7:"Order",8:"Orderinfo",9:"PayOrder",10:"Preferential",11:"SearchResult",12:"ShopCart",13:"aist-share",14:"coupons",15:"detail",17:"myorders",18:"purchased",20:"search",21:"shareposter",22:"study",23:"togroup",24:"video"}[f]||f)+"."+{0:"31d6cfe0",1:"718dff83",2:"f2f19957",3:"c0829f24",4:"2e7d81ca",5:"f2cc3163",6:"31d6cfe0",7:"8bb031ea",8:"31d6cfe0",9:"e5315535",10:"cda7a495",11:"2649d43f",12:"3a4dbb7a",13:"bef8c404",14:"de0ae9dc",15:"4c28ce89",17:"3ae12dec",18:"1daf107b",20:"fab97849",21:"f09a5959",22:"5e9927d1",23:"49988cae",24:"b57a1aec",26:"31d6cfe0",27:"4c706a4e",28:"2471f477",29:"0bb224f2",30:"5ed15c7e",31:"ecbb6f9a",32:"278ad3b1",33:"03fe7b57"}[f]+".chunk.css",n=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===n))return e()}var d=document.getElementsByTagName("style");for(o=0;o<d.length;o++){var i;if((c=(i=d[o]).getAttribute("data-href"))===r||c===n)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||n,t=new Error("Loading CSS chunk "+f+" failed.\n("+r+")");t.request=r,delete s[f],u.parentNode.removeChild(u),a(t)},u.href=n,document.getElementsByTagName("head")[0].appendChild(u)}).then(function(){s[f]=0}));var t=l[f];if(0!==t)if(t)e.push(t[2]);else{var r=new Promise(function(e,r){t=l[f]=[e,r]});e.push(t[2]=r);var a,o=document.createElement("script");o.charset="utf-8",o.timeout=120,p.nc&&o.setAttribute("nonce",p.nc),o.src=p.p+"mrstatic/js/"+({1:"BargainMiddlePage",2:"Classify",3:"CourseList",4:"DrawDocument",5:"Examination",6:"MyEdit",7:"Order",8:"Orderinfo",9:"PayOrder",10:"Preferential",11:"SearchResult",12:"ShopCart",13:"aist-share",14:"coupons",15:"detail",17:"myorders",18:"purchased",20:"search",21:"shareposter",22:"study",23:"togroup",24:"video"}[f]||f)+"."+{0:"aef3cf26",1:"f5bb0d59",2:"914a8251",3:"ab1190ce",4:"7730f3de",5:"df98c5b3",6:"30ed911f",7:"d0b6e74e",8:"eaea6ad9",9:"c0854efc",10:"c92167d3",11:"0c0c9343",12:"4c2987b1",13:"ca8ee328",14:"60649292",15:"2c2c806a",17:"b388a40d",18:"44208014",20:"e1881957",21:"1e04a897",22:"2c0ce1c1",23:"03b425a3",24:"41f298c2",26:"b2e8d558",27:"4948c8d6",28:"a684e5c7",29:"cddce484",30:"58628dcc",31:"66e2dea5",32:"0e3712aa",33:"9869dd21"}[f]+".chunk.js",a=function(e){o.onerror=o.onload=null,clearTimeout(c);var r=l[f];if(0!==r){if(r){var t=e&&("load"===e.type?"missing":e.type),a=e&&e.target&&e.target.src,n=new Error("Loading chunk "+f+" failed.\n("+t+": "+a+")");n.type=t,n.request=a,r[1](n)}l[f]=void 0}};var c=setTimeout(function(){a({type:"timeout",target:o})},12e4);o.onerror=o.onload=a,document.head.appendChild(o)}return Promise.all(e)},p.m=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 a in r)p.d(t,a,function(e){return r[e]}.bind(null,a));return t},p.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(r,"a",r),r},p.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},p.p="/",p.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],a=r.push.bind(r);r.push=e,r=r.slice();for(var n=0;n<r.length;n++)e(r[n]);var h=a;u()}([])</script><script src="/mrstatic/js/25.bc7deb84.chunk.js"></script><script src="/mrstatic/js/main.0c0a0e50.chunk.js"></script></body></html>
\ No newline at end of file
.use-coupon{display:flex;flex-flow:column;height:100%;background-color:#f5f5f5}.use-coupon .coupons-area{padding:19.2vw 3.2vw 0;background:#f5f5f5;flex:1 1 auto}.use-coupon .coupons-area .empty{min-height:56.266667vw;line-height:56.266667vw;font-size:3.2vw;color:#666;text-align:center}.use-coupon .coupons-area .invalid-title{text-align:center;font-size:3.2vw;line-height:13.866667vw;color:#999}.exchange-bar{display:flex;justify-content:space-between;width:100%;padding:2.666667vw 3.2vw;border-bottom:1px solid #e7eaf1;position:absolute;top:25.6vw;left:0;z-index:10;background:#fff}.exchange-bar button{display:inline-block;width:17.066667vw;height:8.8vw;line-height:8.8vw;font-size:3.733333vw;color:#fff;background-color:#ccc;border:none;-webkit-appearance:none;border-radius:.8vw}.exchange-bar button.active{background-color:#09f}.custom-input-wrapper{position:relative}.custom-input-wrapper .custom-input{width:73.866667vw;height:8.8vw;padding-left:2.666667vw;border:1px solid #ddd;border-radius:.8vw;font-size:3.2vw;-webkit-appearance:none}.custom-input-wrapper .custom-input::-webkit-input-placeholder{color:#999}.custom-input-wrapper .iconfont{position:absolute;right:2.666667vw;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:3.733333vw;color:#ccc}.custom-input-wrapper .hide{display:none}.coupon{margin-bottom:4vw;box-shadow:0 .533333vw 3.2vw -2.133333vw}.coupon,.coupon .coupon-info{position:relative;border-radius:.8vw}.coupon .coupon-info{height:25.333333vw;padding:2.666667vw 4vw;color:#fff}.coupon .coupon-info .type{font-size:3.733333vw}.coupon .coupon-info .denomination{font-size:6.933333vw;line-height:6.933333vw;text-align:center}.coupon .coupon-info .denomination span{font-size:3.2vw}.coupon .coupon-info .course-title{width:68.37%;margin:0 auto 1.066667vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:4.266667vw}.coupon .coupon-info .expire{text-align:center;font-size:3.2vw;line-height:4.266667vw}.coupon .coupon-info.coupon-type1{background:#fe6161}.coupon .coupon-info.coupon-type2{background:#e0b97b}.coupon .coupon-info.invalid{background:#999}.coupon .coupon-info>.iconfont{position:absolute;top:50%;right:5.333333vw;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:5.866667vw;height:5.866667vw;display:none}.coupon .coupon-info .check{display:block}.coupon .coupon-info ul{position:absolute;bottom:0;left:0;width:100%;display:flex;justify-content:space-around}.coupon .coupon-info ul li{width:2.666667vw;height:2.666667vw;border-radius:50%;background:#fff;-webkit-transform:translateY(50%);transform:translateY(50%)}.coupon .coupon-des{padding:2.666667vw 4vw;background:#fff;display:flex;justify-content:space-between;align-items:center;border-radius:0 0 .8vw .8vw}.coupon .coupon-des .limit{width:63.81%;font-size:3.2vw;vertical-align:middle;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.coupon .coupon-des .use{display:inline-block;padding:.8vw 2.133333vw;font-size:3.2vw;color:#f31;border:1px solid #f31;border-radius:2.666667vw;background:transparent;-webkit-appearance:none}.my-patch{background-color:#f5f5f5}.my-patch .couponAmount{padding:1.333333vw 3.2vw 0;font-size:3.733333vw;color:#555;margin-bottom:4vw}.my-patch .couponAmount span{color:#ff4000}.my-patch .coupons{padding:0 3.2vw}.my-patch .coupons .items-box{margin-bottom:2.666667vw}.my-patch .coupons .items-box .coupon-info{position:relative;background-color:#999;height:25.333333vw;color:#fff;border-radius:.8vw;padding:2.666667vw 4vw 0}.my-patch .coupons .items-box .coupon-info .type{font-size:3.733333vw}.my-patch .coupons .items-box .coupon-info .amount{width:100%;text-align:center;font-size:3.2vw}.my-patch .coupons .items-box .coupon-info .amount span{font-size:6.933333vw;margin-right:1.333333vw}.my-patch .coupons .items-box .coupon-info ul{position:absolute;bottom:0;left:0;width:100%;display:flex;justify-content:space-around}.my-patch .coupons .items-box .coupon-info ul li{width:2.666667vw;height:2.666667vw;border-radius:50%;background:#fff;-webkit-transform:translateY(50%);transform:translateY(50%)}.my-patch .coupons .items-box .coupon-des{border-radius:.8vw;background-color:#fff;height:8.8vw;line-height:8.8vw;color:#999;font-size:3.2vw;padding-left:4vw}.my-patch .coupons .active{background-color:#fe6161!important}.my-patch .coupons .checkout{width:5.866667vw;height:5.866667vw;position:absolute;right:4vw;top:9.866667vw;font-size:7.466667vw;line-height:5.866667vw}.my-patch .coupons .icondanseshixintubiao-5{right:4.8vw}.my-patch .coupons .nochecked{background:hsla(0,0%,100%,.2);border:1px solid #fff;border-radius:50%}.my-patch .patch-desc{padding:0 3.2vw;margin-top:8vw}.my-patch .patch-desc .title{height:4vw;line-height:4vw;font-size:3.733333vw;margin-bottom:2.666667vw;color:#555;text-align:center}.my-patch .patch-desc .title span{display:inline-block;margin-left:4vw;margin-right:4vw}.my-patch .patch-desc .title i{display:inline-block;width:8vw;height:1px;background-color:#ccc;position:relative;top:-1.333333vw}.my-patch .patch-desc .desc-item{font-size:3.2vw;color:#777;line-height:4.8vw}.my-patch .compound{margin-top:11.733333vw;width:100%;height:10.666667vw;border:none;outline:none;font-size:4.266667vw;color:#fff}.my-patch .disable-active{background-color:#09f}.my-patch .disable{background-color:#999}.my-patch .success{width:26.666667vw;height:8vw;background:rgba(0,0,0,.7);font-size:3.733333vw;border-radius:4vw;text-align:center;line-height:8vw;color:#fff;position:fixed;top:50%;left:50%;margin-top:-4vw;margin-left:-13.333333vw}.coupons-box,.coupons-box #coupons{height:100%}.coupons-box #coupons .tab{width:100%;height:11.733333vw;line-height:11.733333vw;background-color:#fff;display:flex;justify-content:space-around;font-size:3.733333vw;color:#555}.coupons-box #coupons .tab a{display:inline-block;height:100%}.coupons-box #coupons .btm-border{background-color:#f5f5f5;width:100%;height:2.133333vw}.coupons-box #coupons .tab-active{color:#09f;border-bottom:1px solid #09f}.coupons-box #coupons .coupons-container{height:100%}
/*# sourceMappingURL=coupons.4a456833.chunk.css.map */
\ No newline at end of file
{"version":3,"sources":["/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/myCoupons/index.scss","/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/RedeemBar/exchange-bar.scss","/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/Input/input.scss","/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/Coupon/coupon.scss","/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/myPatch/index.scss","/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AAA,CACA,iBAAA,CACA,SAAA,CACA,cAAA,CACA,oBAAA,CACA,sBAAiB,CApFvB,4CAwFM,WAAW,CAxFjB,8BA4FM,6BAAA,CACA,qBAAA,CACA,iBAAkB,CA9FxB,sBAmGI,eAAA,CACA,cAAgB,CApGpB,6BAuGM,UAAA,CACA,eAAA,CACA,oBAAA,CACA,wBAAA,CACA,UAAA,CACA,iBAAkB,CA5GxB,kCA+GQ,oBAAA,CACA,eAAA,CACA,gBAAkB,CAjH1B,+BAqHQ,oBAAA,CACA,SAAA,CACA,UAAA,CACA,qBAAA,CACA,iBAAA,CACA,eAAS,CA1HjB,iCA+HM,eAAA,CACA,UAAA,CACA,iBAAiB,CAjIvB,oBAsII,sBAAA,CACA,UAAA,CACA,kBAAA,CACA,WAAA,CACA,YAAA,CACA,oBAAA,CACA,UAAW,CA5If,0BAgJI,qBAAsB,CAhJ1B,mBAoJI,qBAAsB,CApJ1B,mBAwJI,iBAAA,CACA,UAAA,CACA,yBAAA,CACA,oBAAA,CACA,iBAAA,CACA,iBAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,OAAA,CACA,QAAA,CACA,eAAA,CACA,wBAAkB,CCpKtB,mCAGI,WAAY,CAHhB,2BAKM,UAAA,CACA,kBAAA,CACA,uBAAA,CACA,qBAAA,CACA,YAAA,CACA,4BAAA,CACA,oBAAA,CACA,UAAW,CAZjB,6BAeQ,oBAAA,CACA,WAAY,CAhBpB,kCAsBM,wBAAA,CACA,UAAA,CACA,iBAAW,CAxBjB,kCA4BM,UAAA,CACA,4BAA6B,CA7BnC,yCAgCM,WAAY","file":"coupons.4a456833.chunk.css","sourcesContent":["@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.use-coupon {\n display: flex;\n flex-flow: column;\n height: 100%;\n background-color: #f5f5f5; }\n .use-coupon .coupons-area {\n padding: 72px 12px 0px;\n background: #f5f5f5;\n flex: 1 1 auto; }\n .use-coupon .coupons-area .empty {\n min-height: 211px;\n line-height: 211px;\n font-size: 12px;\n color: #666;\n text-align: center; }\n .use-coupon .coupons-area .invalid-title {\n text-align: center;\n font-size: 12px;\n line-height: 52px;\n color: #999; }\n","@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.exchange-bar {\n display: flex;\n justify-content: space-between;\n width: 100%;\n padding: 10px 12px;\n border-bottom: 1px solid #E7EAF1;\n position: absolute;\n top: 96px;\n left: 0;\n z-index: 10;\n background: #fff; }\n .exchange-bar button {\n display: inline-block;\n width: 64px;\n height: 33px;\n line-height: 33px;\n font-size: 14px;\n color: #fff;\n background-color: #ccc;\n border: none;\n -webkit-appearance: none;\n border-radius: 3px; }\n .exchange-bar button.active {\n background-color: #09f; }\n","@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.custom-input-wrapper {\n position: relative; }\n .custom-input-wrapper .custom-input {\n width: 277px;\n height: 33px;\n padding-left: 10px;\n border: 1px solid #ddd;\n border-radius: 3px;\n font-size: 12px;\n -webkit-appearance: none; }\n .custom-input-wrapper .custom-input::-webkit-input-placeholder {\n color: #999; }\n .custom-input-wrapper .iconfont {\n position: absolute;\n right: 10px;\n top: 50%;\n transform: translateY(-50%);\n font-size: 14px;\n color: #ccc; }\n .custom-input-wrapper .hide {\n display: none; }\n","@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.coupon {\n position: relative;\n margin-bottom: 15px;\n box-shadow: 0px 2px 12px -8px;\n border-radius: 3px; }\n .coupon .coupon-info {\n position: relative;\n height: 95px;\n padding: 10px 15px;\n color: #fff;\n border-radius: 3px; }\n .coupon .coupon-info .type {\n font-size: 14px; }\n .coupon .coupon-info .denomination {\n font-size: 26px;\n line-height: 26px;\n text-align: center; }\n .coupon .coupon-info .denomination span {\n font-size: 12px; }\n .coupon .coupon-info .course-title {\n width: 68.37%;\n margin: 0 auto 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: 16px; }\n .coupon .coupon-info .expire {\n text-align: center;\n font-size: 12px;\n line-height: 16px; }\n .coupon .coupon-info.coupon-type1 {\n background: #FE6161; }\n .coupon .coupon-info.coupon-type2 {\n background: #E0B97B; }\n .coupon .coupon-info.invalid {\n background: #999; }\n .coupon .coupon-info > .iconfont {\n position: absolute;\n top: 50%;\n right: 20px;\n transform: translateY(-50%);\n width: 22px;\n height: 22px;\n display: none; }\n .coupon .coupon-info .check {\n display: block; }\n .coupon .coupon-info ul {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n display: flex;\n justify-content: space-around; }\n .coupon .coupon-info ul li {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: #fff;\n transform: translateY(50%); }\n .coupon .coupon-des {\n padding: 10px 15px;\n background: #fff;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-radius: 0 0 3px 3px; }\n .coupon .coupon-des .limit {\n width: 63.81%;\n font-size: 12px;\n vertical-align: middle;\n color: #666;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n .coupon .coupon-des .use {\n display: inline-block;\n padding: 3px 8px;\n font-size: 12px;\n color: #f31;\n border: 1px solid #f31;\n border-radius: 10px;\n background: transparent;\n -webkit-appearance: none; }\n","@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.my-patch {\n background-color: #f5f5f5; }\n .my-patch .couponAmount {\n padding: 5px 12px 0 12px;\n font-size: 14px;\n color: #555;\n margin-bottom: 15px; }\n .my-patch .couponAmount span {\n color: #FF4000; }\n .my-patch .coupons {\n padding: 0 12px; }\n .my-patch .coupons .items-box {\n margin-bottom: 10px; }\n .my-patch .coupons .items-box .coupon-info {\n position: relative;\n background-color: #999;\n height: 95px;\n color: #fff;\n border-radius: 3px;\n padding: 10px 15px 0 15px; }\n .my-patch .coupons .items-box .coupon-info .type {\n font-size: 14px; }\n .my-patch .coupons .items-box .coupon-info .amount {\n width: 100%;\n text-align: center;\n font-size: 12px; }\n .my-patch .coupons .items-box .coupon-info .amount span {\n font-size: 26px;\n margin-right: 5px; }\n .my-patch .coupons .items-box .coupon-info ul {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n display: flex;\n justify-content: space-around; }\n .my-patch .coupons .items-box .coupon-info ul li {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: #fff;\n transform: translateY(50%); }\n .my-patch .coupons .items-box .coupon-des {\n border-radius: 3px;\n background-color: #fff;\n height: 33px;\n line-height: 33px;\n color: #999;\n font-size: 12px;\n padding-left: 15px; }\n .my-patch .coupons .active {\n background-color: #FE6161 !important; }\n .my-patch .coupons .checkout {\n width: 22px;\n height: 22px;\n position: absolute;\n right: 15px;\n top: 37px;\n font-size: 28px;\n line-height: 22px; }\n .my-patch .coupons .icondanseshixintubiao-5 {\n right: 18px; }\n .my-patch .coupons .nochecked {\n background: rgba(255, 255, 255, 0.2);\n border: 1px solid #fff;\n border-radius: 50%; }\n .my-patch .patch-desc {\n padding: 0 12px;\n margin-top: 30px; }\n .my-patch .patch-desc .title {\n height: 15px;\n line-height: 15px;\n font-size: 14px;\n margin-bottom: 10px;\n color: #555;\n text-align: center; }\n .my-patch .patch-desc .title span {\n display: inline-block;\n margin-left: 15px;\n margin-right: 15px; }\n .my-patch .patch-desc .title i {\n display: inline-block;\n width: 30px;\n height: 1px;\n background-color: #CCC;\n position: relative;\n top: -5px; }\n .my-patch .patch-desc .desc-item {\n font-size: 12px;\n color: #777;\n line-height: 18px; }\n .my-patch .compound {\n margin-top: 44px;\n width: 100%;\n height: 40px;\n border: none;\n outline: none;\n font-size: 16px;\n color: #fff; }\n .my-patch .disable-active {\n background-color: #09f; }\n .my-patch .disable {\n background-color: #999; }\n .my-patch .success {\n width: 100px;\n height: 30px;\n background: rgba(0, 0, 0, 0.7);\n font-size: 14px;\n border-radius: 15px;\n text-align: center;\n line-height: 30px;\n color: #fff;\n position: fixed;\n top: 50%;\n left: 50%;\n margin-top: -15px;\n margin-left: -50px; }\n","@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.coupons-box {\n height: 100%; }\n .coupons-box #coupons {\n height: 100%; }\n .coupons-box #coupons .tab {\n width: 100%;\n height: 44px;\n line-height: 44px;\n background-color: #fff;\n display: flex;\n justify-content: space-around;\n font-size: 14px;\n color: #555; }\n .coupons-box #coupons .tab a {\n display: inline-block;\n height: 100%; }\n .coupons-box #coupons .btm-border {\n background-color: #f5f5f5;\n width: 100%;\n height: 8px; }\n .coupons-box #coupons .tab-active {\n color: #09f;\n border-bottom: 1px solid #09f; }\n .coupons-box #coupons .coupons-container {\n height: 100%; }\n"]}
\ No newline at end of file
.use-coupon{display:flex;flex-flow:column;height:100%;background-color:#f5f5f5}.use-coupon .coupons-area{padding:19.2vw 3.2vw 0;background:#f5f5f5;flex:1 1 auto}.use-coupon .coupons-area .empty{min-height:56.266667vw;line-height:56.266667vw;font-size:3.2vw;color:#666;text-align:center}.use-coupon .coupons-area .invalid-title{text-align:center;font-size:3.2vw;line-height:13.866667vw;color:#999}.exchange-bar{display:flex;justify-content:space-between;width:100%;padding:2.666667vw 3.2vw;position:absolute;top:25.6vw;left:0;z-index:10;background:#fff}.exchange-bar button{display:inline-block;width:17.066667vw;height:8.8vw;line-height:8.8vw;font-size:3.733333vw;color:#fff;background-color:#ccc;border:none;-webkit-appearance:none;border-radius:.8vw}.exchange-bar button.active{background-color:#09f}.custom-input-wrapper{position:relative}.custom-input-wrapper .custom-input{width:73.866667vw;height:8.8vw;padding-left:2.666667vw;border:1px solid #ddd;border-radius:.8vw;font-size:3.2vw;-webkit-appearance:none}.custom-input-wrapper .custom-input::-webkit-input-placeholder{color:#999}.custom-input-wrapper .custom-input--active{border-color:#09f}.custom-input-wrapper .iconfont{position:absolute;right:2.666667vw;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:3.733333vw;color:#ccc}.custom-input-wrapper .hide{display:none}.coupon{margin-bottom:4vw;box-shadow:0 .533333vw 3.2vw -2.133333vw}.coupon,.coupon .coupon-info{position:relative;border-radius:.8vw}.coupon .coupon-info{height:25.333333vw;padding:2.666667vw 4vw;color:#fff}.coupon .coupon-info .type{font-size:3.733333vw}.coupon .coupon-info .denomination{font-size:6.933333vw;line-height:6.933333vw;text-align:center}.coupon .coupon-info .denomination span{font-size:3.2vw}.coupon .coupon-info .course-title{width:68.37%;margin:0 auto 1.066667vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:4.266667vw}.coupon .coupon-info .expire{text-align:center;font-size:3.2vw;line-height:4.266667vw}.coupon .coupon-info.coupon-type1{background:#fe6161}.coupon .coupon-info.coupon-type2{background:#e0b97b}.coupon .coupon-info.invalid{background:#999}.coupon .coupon-info>.iconfont{position:absolute;top:50%;right:5.333333vw;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:5.866667vw;height:5.866667vw;display:none}.coupon .coupon-info .check{display:block}.coupon .coupon-info ul{position:absolute;bottom:0;left:0;width:100%;display:flex;justify-content:space-around}.coupon .coupon-info ul li{width:2.666667vw;height:2.666667vw;border-radius:50%;background:#fff;-webkit-transform:translateY(50%);transform:translateY(50%)}.coupon .coupon-des{padding:2.666667vw 4vw;background:#fff;display:flex;justify-content:space-between;align-items:center;border-radius:0 0 .8vw .8vw}.coupon .coupon-des .limit{width:63.81%;font-size:3.2vw;vertical-align:middle;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.coupon .coupon-des .use{display:inline-block;padding:.8vw 2.133333vw;font-size:3.2vw;color:#f31;border:1px solid #f31;border-radius:2.666667vw;background:transparent;-webkit-appearance:none}.my-patch{background-color:#f5f5f5}.my-patch .couponAmount{padding:1.333333vw 3.2vw 0;font-size:3.733333vw;color:#555;margin-bottom:4vw}.my-patch .couponAmount span{color:#ff4000}.my-patch .coupons{padding:0 3.2vw}.my-patch .coupons .items-box{margin-bottom:2.666667vw}.my-patch .coupons .items-box .coupon-info{position:relative;background-color:#999;height:25.333333vw;color:#fff;border-radius:.8vw;padding:2.666667vw 4vw 0}.my-patch .coupons .items-box .coupon-info .type{font-size:3.733333vw}.my-patch .coupons .items-box .coupon-info .amount{width:100%;text-align:center;font-size:3.2vw}.my-patch .coupons .items-box .coupon-info .amount span{font-size:6.933333vw;margin-right:1.333333vw}.my-patch .coupons .items-box .coupon-info ul{position:absolute;bottom:0;left:0;width:100%;display:flex;justify-content:space-around}.my-patch .coupons .items-box .coupon-info ul li{width:2.666667vw;height:2.666667vw;border-radius:50%;background:#fff;-webkit-transform:translateY(50%);transform:translateY(50%)}.my-patch .coupons .items-box .coupon-des{border-radius:.8vw;background-color:#fff;height:8.8vw;line-height:8.8vw;color:#999;font-size:3.2vw;padding-left:4vw}.my-patch .coupons .active{background-color:#fe6161!important}.my-patch .coupons .checkout{width:5.866667vw;height:5.866667vw;position:absolute;right:4vw;top:9.866667vw;font-size:7.466667vw;line-height:5.866667vw}.my-patch .coupons .icondanseshixintubiao-5{right:4.8vw}.my-patch .coupons .nochecked{background:hsla(0,0%,100%,.2);border:1px solid #fff;border-radius:50%}.my-patch .patch-desc{padding:0 3.2vw 5.333333vw;margin-top:8vw}.my-patch .patch-desc .title{height:4vw;line-height:4vw;font-size:3.733333vw;margin-bottom:2.666667vw;color:#555;text-align:center}.my-patch .patch-desc .title span{display:inline-block;margin-left:4vw;margin-right:4vw}.my-patch .patch-desc .title i{display:inline-block;width:8vw;height:1px;background-color:#ccc;position:relative;top:-1.333333vw}.my-patch .patch-desc .desc-item{font-size:3.2vw;color:#777;line-height:4.8vw}.my-patch .compound{width:100%;height:10.666667vw;border:none;border-radius:5.333333vw;outline:none;font-size:4.266667vw;color:#fff}.my-patch .disable-active{background-color:#09f}.my-patch .disable{background-color:#999}.my-patch .success{width:26.666667vw;height:8vw;background:rgba(0,0,0,.7);font-size:3.733333vw;border-radius:4vw;text-align:center;line-height:8vw;color:#fff;position:fixed;top:50%;left:50%;margin-top:-4vw;margin-left:-13.333333vw}.compound-button--compose{padding:0 3.2vw}.compound-button--compose .compound{margin-top:2.666667vw}.coupons-box,.coupons-box #coupons{height:100%}.coupons-box #coupons .tab{width:100%;height:11.733333vw;line-height:11.733333vw;background-color:#fff;display:flex;justify-content:space-around;font-size:3.733333vw;color:#555}.coupons-box #coupons .tab a{display:inline-block;height:100%}.coupons-box #coupons .btm-border{background-color:#f5f5f5;width:100%;height:2.133333vw}.coupons-box #coupons .tab-active{color:#09f;border-bottom:1px solid #09f}.coupons-box #coupons .coupons-container{height:100%}
/*# sourceMappingURL=coupons.de0ae9dc.chunk.css.map */
\ No newline at end of file
{"version":3,"sources":["/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/myCoupons/index.scss","/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/RedeemBar/exchange-bar.scss","/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/Input/input.scss","/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/Coupon/coupon.scss","/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/myPatch/index.scss","/Users/zhanghaozhe/server/mr-julyedu/src/components/coupons/coupons.scss"],"names":[],"mappings":"AAmGA,YAC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BAAiB,CApFvB,4CAwFM,WAAW,CAxFjB,8BA4FM,6BAAA,CACA,qBAAA,CACA,iBAAkB,CA9FxB,sBAmGI,0BAAA,CACA,cAAgB,CApGpB,6BAuGM,UAAA,CACA,eAAA,CACA,oBAAA,CACA,wBAAA,CACA,UAAA,CACA,iBAAkB,CA5GxB,kCA+GQ,oBAAA,CACA,eAAA,CACA,gBAAkB,CAjH1B,+BAqHQ,oBAAA,CACA,SAAA,CACA,UAAA,CACA,qBAAA,CACA,iBAAA,CACA,eAAS,CA1HjB,iCA+HM,eAAA,CACA,UAAA,CACA,iBAAiB,CAjIvB,oBAuII,UAAA,CACA,kBAAA,CACA,WAAA,CACA,wBAAA,CACA,YAAA,CACA,oBAAA,CACA,UAAW,CA7If,0BAiJI,qBAAsB,CAjJ1B,mBAqJI,qBAAsB,CArJ1B,mBAyJI,iBAAA,CACA,UAAA,CACA,yBAAA,CACA,oBAAA,CACA,iBAAA,CACA,iBAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,OAAA,CACA,QAAA,CACA,eAAA,CACA,wBAAkB,CAItB,0BACE,eAAe,CADjB,oCAII,qBAAgB,CC7KpB,mCAGI,WAAY,CAHhB,2BAKM,UAAA,CACA,kBAAA,CACA,uBAAA,CACA,qBAAA,CACA,YAAA,CACA,4BAAA,CACA,oBAAA,CACA,UAAW,CAZjB,6BAeQ,oBAAA,CACA,WAAY,CAhBpB,kCAsBM,wBAAA,CACA,UAAA,CACA,iBAAW,CAxBjB,kCA4BM,UAAA,CACA,4BAA6B,CA7BnC,yCAgCM,WAAY","file":"coupons.de0ae9dc.chunk.css","sourcesContent":["@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.use-coupon {\n display: flex;\n flex-flow: column;\n height: 100%;\n background-color: #f5f5f5; }\n .use-coupon .coupons-area {\n padding: 72px 12px 0px;\n background: #f5f5f5;\n flex: 1 1 auto; }\n .use-coupon .coupons-area .empty {\n min-height: 211px;\n line-height: 211px;\n font-size: 12px;\n color: #666;\n text-align: center; }\n .use-coupon .coupons-area .invalid-title {\n text-align: center;\n font-size: 12px;\n line-height: 52px;\n color: #999; }\n","@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.exchange-bar {\n display: flex;\n justify-content: space-between;\n width: 100%;\n padding: 10px 12px;\n position: absolute;\n top: 96px;\n left: 0;\n z-index: 10;\n background: #fff; }\n .exchange-bar button {\n display: inline-block;\n width: 64px;\n height: 33px;\n line-height: 33px;\n font-size: 14px;\n color: #fff;\n background-color: #ccc;\n border: none;\n -webkit-appearance: none;\n border-radius: 3px; }\n .exchange-bar button.active {\n background-color: #09f; }\n","@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.custom-input-wrapper {\n position: relative; }\n .custom-input-wrapper .custom-input {\n width: 277px;\n height: 33px;\n padding-left: 10px;\n border: 1px solid #ddd;\n border-radius: 3px;\n font-size: 12px;\n -webkit-appearance: none; }\n .custom-input-wrapper .custom-input::-webkit-input-placeholder {\n color: #999; }\n .custom-input-wrapper .custom-input--active {\n border-color: #09f; }\n .custom-input-wrapper .iconfont {\n position: absolute;\n right: 10px;\n top: 50%;\n transform: translateY(-50%);\n font-size: 14px;\n color: #ccc; }\n .custom-input-wrapper .hide {\n display: none; }\n","@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.coupon {\n position: relative;\n margin-bottom: 15px;\n box-shadow: 0px 2px 12px -8px;\n border-radius: 3px; }\n .coupon .coupon-info {\n position: relative;\n height: 95px;\n padding: 10px 15px;\n color: #fff;\n border-radius: 3px; }\n .coupon .coupon-info .type {\n font-size: 14px; }\n .coupon .coupon-info .denomination {\n font-size: 26px;\n line-height: 26px;\n text-align: center; }\n .coupon .coupon-info .denomination span {\n font-size: 12px; }\n .coupon .coupon-info .course-title {\n width: 68.37%;\n margin: 0 auto 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: 16px; }\n .coupon .coupon-info .expire {\n text-align: center;\n font-size: 12px;\n line-height: 16px; }\n .coupon .coupon-info.coupon-type1 {\n background: #FE6161; }\n .coupon .coupon-info.coupon-type2 {\n background: #E0B97B; }\n .coupon .coupon-info.invalid {\n background: #999; }\n .coupon .coupon-info > .iconfont {\n position: absolute;\n top: 50%;\n right: 20px;\n transform: translateY(-50%);\n width: 22px;\n height: 22px;\n display: none; }\n .coupon .coupon-info .check {\n display: block; }\n .coupon .coupon-info ul {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n display: flex;\n justify-content: space-around; }\n .coupon .coupon-info ul li {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: #fff;\n transform: translateY(50%); }\n .coupon .coupon-des {\n padding: 10px 15px;\n background: #fff;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-radius: 0 0 3px 3px; }\n .coupon .coupon-des .limit {\n width: 63.81%;\n font-size: 12px;\n vertical-align: middle;\n color: #666;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n .coupon .coupon-des .use {\n display: inline-block;\n padding: 3px 8px;\n font-size: 12px;\n color: #f31;\n border: 1px solid #f31;\n border-radius: 10px;\n background: transparent;\n -webkit-appearance: none; }\n","@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.my-patch {\n background-color: #f5f5f5; }\n .my-patch .couponAmount {\n padding: 5px 12px 0 12px;\n font-size: 14px;\n color: #555;\n margin-bottom: 15px; }\n .my-patch .couponAmount span {\n color: #FF4000; }\n .my-patch .coupons {\n padding: 0 12px; }\n .my-patch .coupons .items-box {\n margin-bottom: 10px; }\n .my-patch .coupons .items-box .coupon-info {\n position: relative;\n background-color: #999;\n height: 95px;\n color: #fff;\n border-radius: 3px;\n padding: 10px 15px 0 15px; }\n .my-patch .coupons .items-box .coupon-info .type {\n font-size: 14px; }\n .my-patch .coupons .items-box .coupon-info .amount {\n width: 100%;\n text-align: center;\n font-size: 12px; }\n .my-patch .coupons .items-box .coupon-info .amount span {\n font-size: 26px;\n margin-right: 5px; }\n .my-patch .coupons .items-box .coupon-info ul {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n display: flex;\n justify-content: space-around; }\n .my-patch .coupons .items-box .coupon-info ul li {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: #fff;\n transform: translateY(50%); }\n .my-patch .coupons .items-box .coupon-des {\n border-radius: 3px;\n background-color: #fff;\n height: 33px;\n line-height: 33px;\n color: #999;\n font-size: 12px;\n padding-left: 15px; }\n .my-patch .coupons .active {\n background-color: #FE6161 !important; }\n .my-patch .coupons .checkout {\n width: 22px;\n height: 22px;\n position: absolute;\n right: 15px;\n top: 37px;\n font-size: 28px;\n line-height: 22px; }\n .my-patch .coupons .icondanseshixintubiao-5 {\n right: 18px; }\n .my-patch .coupons .nochecked {\n background: rgba(255, 255, 255, 0.2);\n border: 1px solid #fff;\n border-radius: 50%; }\n .my-patch .patch-desc {\n padding: 0 12px 20px;\n margin-top: 30px; }\n .my-patch .patch-desc .title {\n height: 15px;\n line-height: 15px;\n font-size: 14px;\n margin-bottom: 10px;\n color: #555;\n text-align: center; }\n .my-patch .patch-desc .title span {\n display: inline-block;\n margin-left: 15px;\n margin-right: 15px; }\n .my-patch .patch-desc .title i {\n display: inline-block;\n width: 30px;\n height: 1px;\n background-color: #CCC;\n position: relative;\n top: -5px; }\n .my-patch .patch-desc .desc-item {\n font-size: 12px;\n color: #777;\n line-height: 18px; }\n .my-patch .compound {\n width: 100%;\n height: 40px;\n border: none;\n border-radius: 20px;\n outline: none;\n font-size: 16px;\n color: #fff; }\n .my-patch .disable-active {\n background-color: #09f; }\n .my-patch .disable {\n background-color: #999; }\n .my-patch .success {\n width: 100px;\n height: 30px;\n background: rgba(0, 0, 0, 0.7);\n font-size: 14px;\n border-radius: 15px;\n text-align: center;\n line-height: 30px;\n color: #fff;\n position: fixed;\n top: 50%;\n left: 50%;\n margin-top: -15px;\n margin-left: -50px; }\n\n.compound-button--compose {\n padding: 0 12px; }\n .compound-button--compose .compound {\n margin-top: 10px; }\n","@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.coupons-box {\n height: 100%; }\n .coupons-box #coupons {\n height: 100%; }\n .coupons-box #coupons .tab {\n width: 100%;\n height: 44px;\n line-height: 44px;\n background-color: #fff;\n display: flex;\n justify-content: space-around;\n font-size: 14px;\n color: #555; }\n .coupons-box #coupons .tab a {\n display: inline-block;\n height: 100%; }\n .coupons-box #coupons .btm-border {\n background-color: #f5f5f5;\n width: 100%;\n height: 8px; }\n .coupons-box #coupons .tab-active {\n color: #09f;\n border-bottom: 1px solid #09f; }\n .coupons-box #coupons .coupons-container {\n height: 100%; }\n"]}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1177:function(t,a,e){"use strict";e.r(a);var s,i=e(18),n=(e(44),e(14)),r=e.n(n),c=e(5),o=e(7),l=e(6),m=e(8),u=e(9),d=e(0),g=e.n(d),p=(e(898),e(30)),h=e(3),b=e(16),E=e(48),f=e(666),v=e(156),j=e(627),y=e(21),N=(e(74),e(15)),S=e.n(N),A=Object(y.b)(function(t){return{user:t.user}})(s=function(t){function a(t){var s;return Object(c.a)(this,a),(s=Object(l.a)(this,Object(m.a)(a).call(this,t))).getBargainInfo=function(){h.d.get("".concat(API.home,"/m/bargain/info?bargaincode=").concat(Object(h.c)("bargaincode"),"&is_originator=").concat(Object(h.c)("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(v.differenceInSeconds)(e,a)%60,n=Object(v.differenceInMinutes)(e,a)%60,r=Object(v.differenceInHours)(e,a)%24,c=Object(v.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(){h.d.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};h.d.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 4030==t.data.code||4040==t.data.code||r.a.info(t.data.msg,2)})},s.toCart=function(){h.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(h.c)("id"),"]")).then(function(t){0===t.data.errno?s.props.history.push("/order?id=[".concat(Object(h.c)("id"),"]"),{bargain:1}):r.a.info(t.data.msg,2)})},s.toCartBottom=function(t){h.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(t,"]")).then(function(t){0===t.data.errno?s.props.history.push("/order?id=[".concat(Object(h.c)("id"),"]"),{bargain:1}):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(h.c)("id")};h.d.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(h.c)("id"),2,0)},s.toKanjia=function(t,a,e){var i={course_id:t,type:a,parent_uid:e};h.d.post("".concat(API.home,"/m/bargain/toBargain"),i).then(function(t){if(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();else if(4030==t.data.code||4040==t.data.code)if(h.b.isWeixin){var e=window.location.href;if(e.includes("code=")&&e.includes("state=STATE")){var i=e.lastIndexOf("code=");e=e.substr(0,i-1)}window.location.assign("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=".concat(encodeURIComponent(e),"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"))}else s.props.history.push("/passport");else r.a.info(t.data.msg,2)})},s.friendBargainFirst=function(){s.toKanjia(Object(h.c)("id"),3,s.state.originatorUid)},s.friendBargainSecond=function(){s.toKanjia(Object(h.c)("id"),4,s.state.originatorUid)},s.shareFriendBargain=function(){s.setState({isShowOverlay:!0,status:7,isshowYindao:!!h.b.isWeixin}),Object(h.i)({title:"\u6211\u53d1\u73b0\u4e00\u95e8\u597d\u8bfe\uff0c\u5feb\u6765\u5e2e\u6211\u780d\u4ef7\u5427\uff01",desc:"\u6211\u5df2\u7ecf\u780d\u4e86".concat(s.state.bargainData.bargain_price,"\u5143\uff0c\u770b\u770b\u4f60\u80fd\u780d\u591a\u5c11"),link:encodeURI(location.href),imgUrl:s.state.course.course_img})},s.close=function(){s.setState({isShowOverlay:!1,status:""})},s.toCourseDetail=function(t){var a=s.props;a.dispatch;return a.history.push("/detail?id=".concat(t)),!1},s.state={isShowOverlay:!1,isOriginator:"",kanjiaIcon:e(626),course:{},courseList:[],data:"",bargainData:"",limitPeople:0,outList:[],list:[],width:"0",isShowMore:"",status:"",hour:"",min:"",sec:"",day:"",amount:"",firendBaigainPrice:!0,isshowYindao:!1,isLoaidng:!0,imglink:"https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/"},s}return Object(u.a)(a,t),Object(o.a)(a,[{key:"componentDidMount",value:function(){this.getBargainRankList(Object(h.c)("id"),1),this.getBargainCourse(),this.getBargainInfo()}},{key:"componentDidUpdate",value:function(t){var a=this.props.user,e=t.user;a.hasError||a.hasError===e.hasError||(this.getBargainRankList(Object(h.c)("id"),1),this.getBargainCourse(),this.getBargainInfo())}},{key:"render",value:function(){var t,a,e,s=this;return 0===this.state.bargainData.is_artifact?t=g.a.createElement("div",null,"\u518d\u9080\u8bf7",g.a.createElement("span",{className:"indicator"},this.state.bargainData.invite_num),"\u4f4d\u597d\u53cb\u52a9\u529b\u5373\u53ef\u83b7\u5f97",g.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")):1===this.state.bargainData.is_artifact?(t=g.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",g.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),a=g.a.createElement("button",{className:"artifact-btn",onClick:this.toArtifact},"\u7acb\u5373\u9886\u53d6")):2===this.state.bargainData.is_artifact&&(t=g.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",g.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),a=g.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=g.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=g.a.createElement("button",{className:"active-btn",onClick:this.friendBargainSecond},"\u518d\u780d\u4e00\u5200"):1!==this.state.isOriginator&&2===this.state.data.assist_status?e=g.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=g.a.createElement("button",{className:"invalid-btn"},"\u780d\u4ef7\u7ed3\u675f"):1===this.state.isOriginator&&0===this.state.data.bargain_status&&(e=g.a.createElement("button",{className:"active-btn",onClick:this.shareFriendBargain},"\u9080\u8bf7\u597d\u53cb\u780d\u4ef7")),g.a.createElement("div",{className:"bargain-middle-page"},g.a.createElement(p.e,{title:"\u780d\u4ef7\u8be6\u60c5",arrow:!0,cart:!0,toHref:"/"}),g.a.createElement("div",{className:"top"},g.a.createElement("div",{className:"bargain-area"},1!==this.state.isOriginator&&g.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"),g.a.createElement("ul",null,g.a.createElement(p.j,{img:this.state.course.course_img,info:g.a.createElement(C,{isOriginator:this.state.isOriginator,data:this.state.data,toCart:this.toCart})})),g.a.createElement("div",{className:"bargain-detail"},g.a.createElement("div",{className:"top"},g.a.createElement("div",null,"\u5df2\u780d",g.a.createElement("span",{className:"reduced-price"},this.state.bargainData.bargain_price,"\u5143")),0===this.state.data.bargain_status&&g.a.createElement("div",null,g.a.createElement("span",{className:"time hour"},String(this.state.hour).padStart(2,0))," :\xa0",g.a.createElement("span",{className:"time min"},String(this.state.min).padStart(2,0))," :\xa0",g.a.createElement("span",{className:"time sec"},String(this.state.sec).padStart(2,0)),g.a.createElement("span",{className:"inactive"}," \u540e\u780d\u4ef7\u7ed3\u675f")),1===this.state.data.bargain_status&&1===this.state.isOriginator&&g.a.createElement("span",{className:"inactive"},"\u780d\u4ef7\u7ed3\u675f")),g.a.createElement("div",{className:"middle"},g.a.createElement("span",{style:{width:this.state.width}})),1===this.state.isOriginator&&0===this.state.data.bargain_status&&g.a.createElement("div",null,t,a),1===this.state.isOriginator&&1===this.state.data.bargain_status&&g.a.createElement("div",null,"\u780d\u4ef7\u91d1\u989d\u5c06\u4e8e",g.a.createElement("span",{className:"time hour"},String(this.state.day).padStart(2,0)),g.a.createElement("span",{className:"unit"}," \u5929 "),g.a.createElement("span",{className:"time min"},String(this.state.hour).padStart(2,0)),g.a.createElement("span",{className:"unit"}," \u65f6 "),g.a.createElement("span",{className:"time sec"},String(this.state.min).padStart(2,0)),g.a.createElement("span",{className:"unit"},"\u5206"),"\u540e\u6e05\u96f6\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u652f\u4ed8"),g.a.createElement("div",{className:"button"},e))),g.a.createElement("div",{className:"bargain-records"},g.a.createElement("div",{className:"title"},"\u780d\u4ef7\u8bb0\u5f55"),g.a.createElement("ul",null,this.state.outList&&this.state.outList.length>0&&this.state.outList.map(function(t,a){return g.a.createElement("li",{key:a},g.a.createElement("div",{className:"left"},g.a.createElement("img",{className:"avatar",src:t.avatar_file,alt:""}),g.a.createElement("span",{className:"nickname"},t.user_name),g.a.createElement("span",{className:"rank-tag"},t.rank)),g.a.createElement("div",{className:"right"},g.a.createElement("img",{className:"kanjia-icon",src:s.state.kanjiaIcon,alt:""}),"\u780d\u6389",g.a.createElement("span",{className:"price"},t.amount)))})),g.a.createElement("div",{className:"more",onClick:this.getMore},"\u67e5\u770b\u66f4\u591a>>"))),g.a.createElement("div",{className:"bargain-course-list",id:"bargainCourse"},g.a.createElement("div",{className:"title-wrapper"},g.a.createElement("div",{className:"title"},"\u6211\u8981\u780d\u4ef7"),g.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")),g.a.createElement("ul",null,this.state.courseList&&this.state.courseList.length>0&&this.state.courseList.map(function(t,a){return g.a.createElement(p.d,{className:"text-overflow-2",key:a,id:t.course_id,img:t.image_name,title:t.course_title,toDetail:s.toCourseDetail,bottom:g.a.createElement(k,{item:t,toCartBottom:s.toCartBottom.bind(s,t.course_id),toDetail:s.toCourseDetail})})}))),g.a.createElement(b.b,{to:"/classify",className:"preferential"},"\u67e5\u770b\u66f4\u591a\u7cbe\u54c1\u8bfe\u7a0b >>"),g.a.createElement(f.a,{list:this.state.list,icon:this.state.kanjiaIcon,limitPeople:this.state.limitPeople,isShowMore:this.state.isShowMore,boxHide:this.boxHide}),this.state.isShowOverlay&&g.a.createElement(j.a,null,7===this.state.status&&g.a.createElement(T,{isshowYindao:this.state.isshowYindao,limitPeople:this.state.limitPeople,close:this.close}),1===this.state.status&&g.a.createElement(B,{money:this.state.amount,avatar:this.props.user.data.avatar,firendBaigainPrice:this.state.firendBaigainPrice}),2===this.state.status&&g.a.createElement(w,{bargainSecond:this.friendBargainSecond,money:this.state.amount}),3===this.state.status&&g.a.createElement(U,{close:this.close,money:this.state.amount}),4===this.state.status&&g.a.createElement(O,{close:this.close,limitPeople:this.state.limitPeople}),5===this.state.status&&g.a.createElement(D,{useArtifact:this.useArtifact}),6===this.state.status&&g.a.createElement(L,{toCart:this.toCart,money:this.state.amount,allMoney:this.state.bargainData.bargain_price}),7!==this.state.status&&g.a.createElement("i",{onClick:this.close,className:"iconfont iconiconfront-2 bargain-close"})))}}]),a}(d.Component))||s;function C(t){var a=t.data&&t.data.course;return g.a.createElement("div",{className:"des"},g.a.createElement("div",{className:"course-title text-overflow-2"},a.course_title),g.a.createElement("div",{className:"price-bar"},g.a.createElement("span",{className:"discount-price"},"\uffe5",a.course_price),1===t.isOriginator&&g.a.createElement("button",{className:"purchase-btn",onClick:t.toCart},"\xa5",a.pay_price,"\u53bb\u652f\u4ed8")))}function k(t){var a;return a=2===t.item.bargain_status?g.a.createElement("a",{onClick:function(){return t.toDetail(t.item.course_id)},className:"bargain bargian-study"},"\u6211\u8981\u780d\u4ef7"):3===t.item.bargain_status?g.a.createElement(b.b,{to:"/play/video?id=".concat(t.item.v_course_id),className:S()("bargain","button--study")},"\u53bb\u5b66\u4e60"):g.a.createElement("div",{className:"btns"},1===t.item.bargain_status&&g.a.createElement("button",{className:"invalid"},"\u780d\u4ef7\u7ed3\u675f"),0===t.item.bargain_status&&g.a.createElement("a",{onClick:function(){return t.toDetail(t.item.course_id)},className:"bargain-btn"},"\u6211\u8981\u780d\u4ef7"),g.a.createElement("button",{onClick:function(){return t.toCartBottom(t.item.course_id)},className:"purchase-btn"},"\xa5",t.item.pay_price,"\u53bb\u652f\u4ed8")),g.a.createElement("div",{className:"course-bottom"},g.a.createElement("div",{className:"course-price"},g.a.createElement("span",{className:"discount-price"},"\xa5",t.item.price1),g.a.createElement("span",{className:"original-price"},"\xa5",t.item.price0)),a)}function B(t){return g.a.createElement("div",{className:"bargain-public-number"},g.a.createElement("img",{className:"avait",src:t.avatar,alt:""}),t.firendBaigainPrice&&g.a.createElement("p",{className:"status-title ff4"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",t.money,"\u5143\uff01"),g.a.createElement("p",{className:"status-dec"},"\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u53ef\u4ee5\u518d\u780d\u4e00\u5200\u54e6~"),g.a.createElement("img",{className:"public-number-img",src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png",alt:""}))}function w(t){return g.a.createElement("div",{className:"bargain-first"},g.a.createElement("img",{className:"top-img",src:e(669),alt:""}),g.a.createElement("p",{className:"status-title"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",g.a.createElement("span",{className:"ff4"},t.money,"\u5143"),"\uff01"),g.a.createElement("p",{className:"status-dec"},"\u4f60\u8fd8\u53ef\u4ee5\u5e2e\u6211\u518d\u780d\u4e00\u5200\u54e6~"),g.a.createElement("button",{className:"bargain-href",onClick:t.bargainSecond},"\u518d\u780d\u4e00\u5200"))}function U(t){return g.a.createElement("div",{className:"bargain-second"},g.a.createElement("img",{className:"top-img",src:e(669),alt:""}),g.a.createElement("p",{className:"status-title"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u5e2e\u597d\u53cb\u780d\u6389",g.a.createElement("span",{className:"ff4"},t.money,"\u5143"),"\uff01"),g.a.createElement(b.b,{className:"bargain-href",to:"#bargainCourse",onClick:t.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function O(t){return g.a.createElement("div",{className:"not-bargain"},g.a.createElement("img",{className:"middle-img",src:e(899),alt:""}),g.a.createElement("p",{className:"status-title"},"\u4f60\u7684\u597d\u53cb\u7528\u3010\u780d\u4ef7\u795e\u5668\u3011\u628a\u6211\u780d\u8499\u5708\u4e86",g.a.createElement("br",null),"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),g.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"),g.a.createElement(b.b,{className:"bargain-href",to:"#bargainCourse",onClick:t.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function D(t){return g.a.createElement("div",{className:"artifact-box"},g.a.createElement("p",{className:"top-tip"},"\u606d\u559c\u4f60\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011\uff01"),g.a.createElement("p",{className:"middle-tip"},"\u60a8\u53ef\u4ee5\u4f7f\u7528",g.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u518d\u780d\u4e00\u5200"),g.a.createElement("button",{className:"use-artifact",onClick:t.useArtifact},"\u7acb\u5373\u4f7f\u7528"))}function L(t){return g.a.createElement("div",{className:"use-artifact-box"},g.a.createElement("img",{className:"top-img",src:e(669),alt:""}),g.a.createElement("p",{className:"top-tip"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u780d\u6389\u4e86",t.money,"\u5143\uff01"),g.a.createElement("p",{className:"middle-tip"},"\u4f60\u5df2\u7ecf\u780d\u4e86",g.a.createElement("span",{className:"indicator"},t.allMoney,"\u5143"),"\u6ca1\u89c1\u8fc7\u4f60\u8fd9\u4e48\u80fd\u780d\u7684\u4eba..."),g.a.createElement("p",{className:"btm-tip"},"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),g.a.createElement("button",{className:"tubuy",onClick:t.toCart},"\u53bb\u652f\u4ed8"))}function T(t){return g.a.createElement("div",null,g.a.createElement("div",{className:"close-bargain-success",onClick:t.close}),g.a.createElement("div",{className:"bargain-success"},t.isshowYindao&&g.a.createElement("i",{className:"iconfont iconyindao"}),g.a.createElement("p",null,"\u5206\u4eab\u5230\u5fae\u4fe1\u7fa4\u9080\u8bf7\u66f4\u591a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7"),g.a.createElement("p",null,"\u8d85\u8fc7",t.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97",g.a.createElement("span",{className:"indicator",style:{color:"#FF4000"}},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u54e6")))}a.default=Object(E.g)(A)},626: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="},627:function(t,a,e){"use strict";var s=e(5),i=e(7),n=e(6),r=e(8),c=e(9),o=e(0),l=e.n(o),m=e(22),u=e.n(m),d=(e(668),document.body||document.documentElement),g=["touchmove","mousewheel"],p=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;g.forEach(function(a){t.overlayBox.addEventListener(a,t.preventScroll,{passive:!1})})}},{key:"componentWillUnmount",value:function(){var t=this;g.forEach(function(a){t.overlayBox.removeEventListener(a,t.preventScroll)})}},{key:"render",value:function(){var t=this;return u.a.createPortal(l.a.createElement("div",{className:"overlay",ref:function(a){return t.overlayBox=a},style:{top:"".concat(window.scrollY,"px")}},this.props.children),d)}}]),a}(o.Component);a.a=p},666:function(t,a,e){"use strict";var s=e(5),i=e(7),n=e(6),r=e(8),c=e(9),o=e(0),l=e.n(o),m=(e(667),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(626)},i}return Object(c.a)(a,t),Object(i.a)(a,[{key:"render",value:function(){return l.a.createElement("div",{className:"ranking-box"},this.props.isShowMore&&l.a.createElement(u,{list:this.props.list,limitPeople:this.props.limitPeople,closeMore:this.closeMore,img:this.props.icon}))}}]),a}(o.Component));function u(t){return l.a.createElement("div",{className:"moreMbc"},l.a.createElement("div",{className:"content"},l.a.createElement("div",{className:"title-box"},"\u597d\u53cb\u52a9\u529b\u8be6\u60c5"),l.a.createElement("ul",{className:"more-bargain-list"},t.list&&t.list.length>0&&t.list.map(function(a,e){return l.a.createElement("li",{key:e,className:"bargain-item"},l.a.createElement("img",{className:"avatar",src:a.avatar_file,alt:""}),l.a.createElement("p",{className:"name"},a.user_name),l.a.createElement("p",{className:"bargain-status"},l.a.createElement("img",{className:"kanjia-icon",src:t.img,alt:""}),"\u780d\u6389",l.a.createElement("span",{className:"price"},a.amount)))})),l.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")),l.a.createElement("i",{onClick:t.closeMore,className:"iconfont iconiconfront-2 close"}))}a.a=m},667:function(t,a,e){},668:function(t,a,e){},669:function(t,a,e){t.exports=e.p+"mrstatic/media/kanjia_cg_icon.81a489ac.png"},898:function(t,a,e){},899: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+z0B7cUu6oUDKrj3yzDZrZU3Gq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4iDkotD0FeEnMHq4GIr6BMvChU1jv2sxTro8yqWFmE7BQxzUOJ+XcRylnwiDHGd3HgsZqK7/GhgYyr4Bv0gWFMX+40TOAZvSG+YKhrUIpmOx2sRrU0KE8b9CfK04mZD0/TvqzupNz1FM9xzTZU1/YH9qfu9prOSPXG9Tr+UerDsaeOnGbP1S3bbNXggV9XIWYP5SLNCwAAAABJRU5ErkJggg=="}}]);
//# sourceMappingURL=BargainMiddlePage.f63f8cf2.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1177:function(t,a,e){"use strict";e.r(a);var s,i=e(18),n=(e(44),e(14)),r=e.n(n),c=e(5),o=e(7),l=e(6),m=e(8),u=e(9),d=e(0),g=e.n(d),p=(e(898),e(30)),h=e(3),b=e(17),E=e(48),f=e(666),v=e(156),j=e(627),y=e(21),N=(e(74),e(15)),S=e.n(N),A=Object(y.b)(function(t){return{user:t.user}})(s=function(t){function a(t){var s;return Object(c.a)(this,a),(s=Object(l.a)(this,Object(m.a)(a).call(this,t))).getBargainInfo=function(){h.d.get("".concat(API.home,"/m/bargain/info?bargaincode=").concat(Object(h.c)("bargaincode"),"&is_originator=").concat(Object(h.c)("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(v.differenceInSeconds)(e,a)%60,n=Object(v.differenceInMinutes)(e,a)%60,r=Object(v.differenceInHours)(e,a)%24,c=Object(v.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(){h.d.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};h.d.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 4030==t.data.code||4040==t.data.code||r.a.info(t.data.msg,2)})},s.toCart=function(){h.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(h.c)("id"),"]")).then(function(t){0===t.data.errno?s.props.history.push("/order?id=[".concat(Object(h.c)("id"),"]"),{bargain:1}):r.a.info(t.data.msg,2)})},s.toCartBottom=function(t){h.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(t,"]")).then(function(t){0===t.data.errno?s.props.history.push("/order?id=[".concat(Object(h.c)("id"),"]"),{bargain:1}):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(h.c)("id")};h.d.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(h.c)("id"),2,0)},s.toKanjia=function(t,a,e){var i={course_id:t,type:a,parent_uid:e};h.d.post("".concat(API.home,"/m/bargain/toBargain"),i).then(function(t){if(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();else if(4030==t.data.code||4040==t.data.code)if(h.b.isWeixin){var e=window.location.href;if(e.includes("code=")&&e.includes("state=STATE")){var i=e.lastIndexOf("code=");e=e.substr(0,i-1)}window.location.assign("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=".concat(encodeURIComponent(e),"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"))}else s.props.history.push("/passport");else r.a.info(t.data.msg,2)})},s.friendBargainFirst=function(){s.toKanjia(Object(h.c)("id"),3,s.state.originatorUid)},s.friendBargainSecond=function(){s.toKanjia(Object(h.c)("id"),4,s.state.originatorUid)},s.shareFriendBargain=function(){s.setState({isShowOverlay:!0,status:7,isshowYindao:!!h.b.isWeixin}),Object(h.i)({title:"\u6211\u53d1\u73b0\u4e00\u95e8\u597d\u8bfe\uff0c\u5feb\u6765\u5e2e\u6211\u780d\u4ef7\u5427\uff01",desc:"\u6211\u5df2\u7ecf\u780d\u4e86".concat(s.state.bargainData.bargain_price,"\u5143\uff0c\u770b\u770b\u4f60\u80fd\u780d\u591a\u5c11"),link:encodeURI(location.href),imgUrl:s.state.course.course_img})},s.close=function(){s.setState({isShowOverlay:!1,status:""})},s.toCourseDetail=function(t){var a=s.props;a.dispatch;return a.history.push("/detail?id=".concat(t)),!1},s.state={isShowOverlay:!1,isOriginator:"",kanjiaIcon:e(626),course:{},courseList:[],data:"",bargainData:"",limitPeople:0,outList:[],list:[],width:"0",isShowMore:"",status:"",hour:"",min:"",sec:"",day:"",amount:"",firendBaigainPrice:!0,isshowYindao:!1,isLoaidng:!0,imglink:"https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/"},s}return Object(u.a)(a,t),Object(o.a)(a,[{key:"componentDidMount",value:function(){this.getBargainRankList(Object(h.c)("id"),1),this.getBargainCourse(),this.getBargainInfo()}},{key:"componentDidUpdate",value:function(t){var a=this.props.user,e=t.user;a.hasError||a.hasError===e.hasError||(this.getBargainRankList(Object(h.c)("id"),1),this.getBargainCourse(),this.getBargainInfo())}},{key:"render",value:function(){var t,a,e,s=this;return 0===this.state.bargainData.is_artifact?t=g.a.createElement("div",null,"\u518d\u9080\u8bf7",g.a.createElement("span",{className:"indicator"},this.state.bargainData.invite_num),"\u4f4d\u597d\u53cb\u52a9\u529b\u5373\u53ef\u83b7\u5f97",g.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")):1===this.state.bargainData.is_artifact?(t=g.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",g.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),a=g.a.createElement("button",{className:"artifact-btn",onClick:this.toArtifact},"\u7acb\u5373\u9886\u53d6")):2===this.state.bargainData.is_artifact&&(t=g.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",g.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),a=g.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=g.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=g.a.createElement("button",{className:"active-btn",onClick:this.friendBargainSecond},"\u518d\u780d\u4e00\u5200"):1!==this.state.isOriginator&&2===this.state.data.assist_status?e=g.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=g.a.createElement("button",{className:"invalid-btn"},"\u780d\u4ef7\u7ed3\u675f"):1===this.state.isOriginator&&0===this.state.data.bargain_status&&(e=g.a.createElement("button",{className:"active-btn",onClick:this.shareFriendBargain},"\u9080\u8bf7\u597d\u53cb\u780d\u4ef7")),g.a.createElement("div",{className:"bargain-middle-page"},g.a.createElement(p.e,{title:"\u780d\u4ef7\u8be6\u60c5",arrow:!0,cart:!0,toHref:"/"}),g.a.createElement("div",{className:"top"},g.a.createElement("div",{className:"bargain-area"},1!==this.state.isOriginator&&g.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"),g.a.createElement("ul",null,g.a.createElement(p.j,{img:this.state.course.course_img,info:g.a.createElement(C,{isOriginator:this.state.isOriginator,data:this.state.data,toCart:this.toCart})})),g.a.createElement("div",{className:"bargain-detail"},g.a.createElement("div",{className:"top"},g.a.createElement("div",null,"\u5df2\u780d",g.a.createElement("span",{className:"reduced-price"},this.state.bargainData.bargain_price,"\u5143")),0===this.state.data.bargain_status&&g.a.createElement("div",null,g.a.createElement("span",{className:"time hour"},String(this.state.hour).padStart(2,0))," :\xa0",g.a.createElement("span",{className:"time min"},String(this.state.min).padStart(2,0))," :\xa0",g.a.createElement("span",{className:"time sec"},String(this.state.sec).padStart(2,0)),g.a.createElement("span",{className:"inactive"}," \u540e\u780d\u4ef7\u7ed3\u675f")),1===this.state.data.bargain_status&&1===this.state.isOriginator&&g.a.createElement("span",{className:"inactive"},"\u780d\u4ef7\u7ed3\u675f")),g.a.createElement("div",{className:"middle"},g.a.createElement("span",{style:{width:this.state.width}})),1===this.state.isOriginator&&0===this.state.data.bargain_status&&g.a.createElement("div",null,t,a),1===this.state.isOriginator&&1===this.state.data.bargain_status&&g.a.createElement("div",null,"\u780d\u4ef7\u91d1\u989d\u5c06\u4e8e",g.a.createElement("span",{className:"time hour"},String(this.state.day).padStart(2,0)),g.a.createElement("span",{className:"unit"}," \u5929 "),g.a.createElement("span",{className:"time min"},String(this.state.hour).padStart(2,0)),g.a.createElement("span",{className:"unit"}," \u65f6 "),g.a.createElement("span",{className:"time sec"},String(this.state.min).padStart(2,0)),g.a.createElement("span",{className:"unit"},"\u5206"),"\u540e\u6e05\u96f6\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u652f\u4ed8"),g.a.createElement("div",{className:"button"},e))),g.a.createElement("div",{className:"bargain-records"},g.a.createElement("div",{className:"title"},"\u780d\u4ef7\u8bb0\u5f55"),g.a.createElement("ul",null,this.state.outList&&this.state.outList.length>0&&this.state.outList.map(function(t,a){return g.a.createElement("li",{key:a},g.a.createElement("div",{className:"left"},g.a.createElement("img",{className:"avatar",src:t.avatar_file,alt:""}),g.a.createElement("span",{className:"nickname"},t.user_name),g.a.createElement("span",{className:"rank-tag"},t.rank)),g.a.createElement("div",{className:"right"},g.a.createElement("img",{className:"kanjia-icon",src:s.state.kanjiaIcon,alt:""}),"\u780d\u6389",g.a.createElement("span",{className:"price"},t.amount)))})),g.a.createElement("div",{className:"more",onClick:this.getMore},"\u67e5\u770b\u66f4\u591a>>"))),g.a.createElement("div",{className:"bargain-course-list",id:"bargainCourse"},g.a.createElement("div",{className:"title-wrapper"},g.a.createElement("div",{className:"title"},"\u6211\u8981\u780d\u4ef7"),g.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")),g.a.createElement("ul",null,this.state.courseList&&this.state.courseList.length>0&&this.state.courseList.map(function(t,a){return g.a.createElement(p.d,{className:"text-overflow-2",key:a,id:t.course_id,img:t.image_name,title:t.course_title,toDetail:s.toCourseDetail,bottom:g.a.createElement(k,{item:t,toCartBottom:s.toCartBottom.bind(s,t.course_id),toDetail:s.toCourseDetail})})}))),g.a.createElement(b.b,{to:"/classify",className:"preferential"},"\u67e5\u770b\u66f4\u591a\u7cbe\u54c1\u8bfe\u7a0b >>"),g.a.createElement(f.a,{list:this.state.list,icon:this.state.kanjiaIcon,limitPeople:this.state.limitPeople,isShowMore:this.state.isShowMore,boxHide:this.boxHide}),this.state.isShowOverlay&&g.a.createElement(j.a,null,7===this.state.status&&g.a.createElement(T,{isshowYindao:this.state.isshowYindao,limitPeople:this.state.limitPeople,close:this.close}),1===this.state.status&&g.a.createElement(B,{money:this.state.amount,avatar:this.props.user.data.avatar,firendBaigainPrice:this.state.firendBaigainPrice}),2===this.state.status&&g.a.createElement(w,{bargainSecond:this.friendBargainSecond,money:this.state.amount}),3===this.state.status&&g.a.createElement(U,{close:this.close,money:this.state.amount}),4===this.state.status&&g.a.createElement(O,{close:this.close,limitPeople:this.state.limitPeople}),5===this.state.status&&g.a.createElement(D,{useArtifact:this.useArtifact}),6===this.state.status&&g.a.createElement(L,{toCart:this.toCart,money:this.state.amount,allMoney:this.state.bargainData.bargain_price}),7!==this.state.status&&g.a.createElement("i",{onClick:this.close,className:"iconfont iconiconfront-2 bargain-close"})))}}]),a}(d.Component))||s;function C(t){var a=t.data&&t.data.course;return g.a.createElement("div",{className:"des"},g.a.createElement("div",{className:"course-title text-overflow-2"},a.course_title),g.a.createElement("div",{className:"price-bar"},g.a.createElement("span",{className:"discount-price"},"\uffe5",a.course_price),1===t.isOriginator&&g.a.createElement("button",{className:"purchase-btn",onClick:t.toCart},"\xa5",a.pay_price,"\u53bb\u652f\u4ed8")))}function k(t){var a;return a=2===t.item.bargain_status?g.a.createElement("a",{onClick:function(){return t.toDetail(t.item.course_id)},className:"bargain bargian-study"},"\u6211\u8981\u780d\u4ef7"):3===t.item.bargain_status?g.a.createElement(b.b,{to:"/play/video?id=".concat(t.item.v_course_id),className:S()("bargain","button--study")},"\u53bb\u5b66\u4e60"):g.a.createElement("div",{className:"btns"},1===t.item.bargain_status&&g.a.createElement("button",{className:"invalid"},"\u780d\u4ef7\u7ed3\u675f"),0===t.item.bargain_status&&g.a.createElement("a",{onClick:function(){return t.toDetail(t.item.course_id)},className:"bargain-btn"},"\u6211\u8981\u780d\u4ef7"),g.a.createElement("button",{onClick:function(){return t.toCartBottom(t.item.course_id)},className:"purchase-btn"},"\xa5",t.item.pay_price,"\u53bb\u652f\u4ed8")),g.a.createElement("div",{className:"course-bottom"},g.a.createElement("div",{className:"course-price"},g.a.createElement("span",{className:"discount-price"},"\xa5",t.item.price1),g.a.createElement("span",{className:"original-price"},"\xa5",t.item.price0)),a)}function B(t){return g.a.createElement("div",{className:"bargain-public-number"},g.a.createElement("img",{className:"avait",src:t.avatar,alt:""}),t.firendBaigainPrice&&g.a.createElement("p",{className:"status-title ff4"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",t.money,"\u5143\uff01"),g.a.createElement("p",{className:"status-dec"},"\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u53ef\u4ee5\u518d\u780d\u4e00\u5200\u54e6~"),g.a.createElement("img",{className:"public-number-img",src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png",alt:""}))}function w(t){return g.a.createElement("div",{className:"bargain-first"},g.a.createElement("img",{className:"top-img",src:e(669),alt:""}),g.a.createElement("p",{className:"status-title"},"\u8c22\u8c22\u4f60\u5e2e\u6211\u780d\u4e86",g.a.createElement("span",{className:"ff4"},t.money,"\u5143"),"\uff01"),g.a.createElement("p",{className:"status-dec"},"\u4f60\u8fd8\u53ef\u4ee5\u5e2e\u6211\u518d\u780d\u4e00\u5200\u54e6~"),g.a.createElement("button",{className:"bargain-href",onClick:t.bargainSecond},"\u518d\u780d\u4e00\u5200"))}function U(t){return g.a.createElement("div",{className:"bargain-second"},g.a.createElement("img",{className:"top-img",src:e(669),alt:""}),g.a.createElement("p",{className:"status-title"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u5e2e\u597d\u53cb\u780d\u6389",g.a.createElement("span",{className:"ff4"},t.money,"\u5143"),"\uff01"),g.a.createElement(b.b,{className:"bargain-href",to:"#bargainCourse",onClick:t.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function O(t){return g.a.createElement("div",{className:"not-bargain"},g.a.createElement("img",{className:"middle-img",src:e(899),alt:""}),g.a.createElement("p",{className:"status-title"},"\u4f60\u7684\u597d\u53cb\u7528\u3010\u780d\u4ef7\u795e\u5668\u3011\u628a\u6211\u780d\u8499\u5708\u4e86",g.a.createElement("br",null),"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),g.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"),g.a.createElement(b.b,{className:"bargain-href",to:"#bargainCourse",onClick:t.close},"\u6211\u4e5f\u8981\u780d\u4ef7"))}function D(t){return g.a.createElement("div",{className:"artifact-box"},g.a.createElement("p",{className:"top-tip"},"\u606d\u559c\u4f60\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011\uff01"),g.a.createElement("p",{className:"middle-tip"},"\u60a8\u53ef\u4ee5\u4f7f\u7528",g.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u518d\u780d\u4e00\u5200"),g.a.createElement("button",{className:"use-artifact",onClick:t.useArtifact},"\u7acb\u5373\u4f7f\u7528"))}function L(t){return g.a.createElement("div",{className:"use-artifact-box"},g.a.createElement("img",{className:"top-img",src:e(669),alt:""}),g.a.createElement("p",{className:"top-tip"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u780d\u6389\u4e86",t.money,"\u5143\uff01"),g.a.createElement("p",{className:"middle-tip"},"\u4f60\u5df2\u7ecf\u780d\u4e86",g.a.createElement("span",{className:"indicator"},t.allMoney,"\u5143"),"\u6ca1\u89c1\u8fc7\u4f60\u8fd9\u4e48\u80fd\u780d\u7684\u4eba..."),g.a.createElement("p",{className:"btm-tip"},"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),g.a.createElement("button",{className:"tubuy",onClick:t.toCart},"\u53bb\u652f\u4ed8"))}function T(t){return g.a.createElement("div",null,g.a.createElement("div",{className:"close-bargain-success",onClick:t.close}),g.a.createElement("div",{className:"bargain-success"},t.isshowYindao&&g.a.createElement("i",{className:"iconfont iconyindao"}),g.a.createElement("p",null,"\u5206\u4eab\u5230\u5fae\u4fe1\u7fa4\u9080\u8bf7\u66f4\u591a\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7"),g.a.createElement("p",null,"\u8d85\u8fc7",t.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97",g.a.createElement("span",{className:"indicator",style:{color:"#FF4000"}},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u54e6")))}a.default=Object(E.g)(A)},626: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="},627:function(t,a,e){"use strict";var s=e(5),i=e(7),n=e(6),r=e(8),c=e(9),o=e(0),l=e.n(o),m=e(22),u=e.n(m),d=(e(668),document.body||document.documentElement),g=["touchmove","mousewheel"],p=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;g.forEach(function(a){t.overlayBox.addEventListener(a,t.preventScroll,{passive:!1})})}},{key:"componentWillUnmount",value:function(){var t=this;g.forEach(function(a){t.overlayBox.removeEventListener(a,t.preventScroll)})}},{key:"render",value:function(){var t=this;return u.a.createPortal(l.a.createElement("div",{className:"overlay",ref:function(a){return t.overlayBox=a},style:{top:"".concat(window.scrollY,"px")}},this.props.children),d)}}]),a}(o.Component);a.a=p},666:function(t,a,e){"use strict";var s=e(5),i=e(7),n=e(6),r=e(8),c=e(9),o=e(0),l=e.n(o),m=(e(667),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(626)},i}return Object(c.a)(a,t),Object(i.a)(a,[{key:"render",value:function(){return l.a.createElement("div",{className:"ranking-box"},this.props.isShowMore&&l.a.createElement(u,{list:this.props.list,limitPeople:this.props.limitPeople,closeMore:this.closeMore,img:this.props.icon}))}}]),a}(o.Component));function u(t){return l.a.createElement("div",{className:"moreMbc"},l.a.createElement("div",{className:"content"},l.a.createElement("div",{className:"title-box"},"\u597d\u53cb\u52a9\u529b\u8be6\u60c5"),l.a.createElement("ul",{className:"more-bargain-list"},t.list&&t.list.length>0&&t.list.map(function(a,e){return l.a.createElement("li",{key:e,className:"bargain-item"},l.a.createElement("img",{className:"avatar",src:a.avatar_file,alt:""}),l.a.createElement("p",{className:"name"},a.user_name),l.a.createElement("p",{className:"bargain-status"},l.a.createElement("img",{className:"kanjia-icon",src:t.img,alt:""}),"\u780d\u6389",l.a.createElement("span",{className:"price"},a.amount)))})),l.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")),l.a.createElement("i",{onClick:t.closeMore,className:"iconfont iconiconfront-2 close"}))}a.a=m},667:function(t,a,e){},668:function(t,a,e){},669:function(t,a,e){t.exports=e.p+"mrstatic/media/kanjia_cg_icon.81a489ac.png"},898:function(t,a,e){},899:function(t,a){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGUAAABmCAMAAADlNq9TAAACSVBMVEUAAABeTUZoSDp2QytSUlL/1jRSUlJhTEL/1jRSUlJ2QytVUE780jP/1jRSUlL/1jT/1jR1QyxSUlJSUlJ2Qyv/1jRmSj3/1jR2QytSUlL/1jR3RCv/1jT/1jT/1j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0jM0u0uYr/K/+NhZld7gM68+JsFOGQoTanttUAtUr4JcL6HlccHvxmG/uiDVEz3gnfKxNP6KzwcMws4dzIom2/AS/mApgcPRSZsaW7WZVF2eEvz1bqZ0VBKIrj+NkILhLdSBBpROZKhtoV7QyKmHmKw8GW81AudJfaX4Ji6MlmIqaUbveY9Vnd3ZffWdxwtduHWIoKAh3knY50FpfqdEHAQ9Yqo4toj7wpCDT4CF1lJ2Q1Kl0sjOhmO0dWG+4YyIkp7wdZLbjTYqdklLfhx5gVKjsq2iPHrnCx+DIhTdJIcjJmCygotyWidB2crc/vI3J8uKeiXER0CP4lREtkdEBghnJESXCT8pURCBjclk2Qs8jYig4iDkotD0FeEnMHq4GIr6BMvChU1jv2sxTro8yqWFmE7BQxzUOJ+XcRylnwiDHGd3HgsZqK7/GhgYyr4Bv0gWFMX+40TOAZvSG+YKhrUIpmOx2sRrU0KE8b9CfK04mZD0/TvqzupNz1FM9xzTZU1/YH9qfu9prOSPXG9Tr+UerDsaeOnGbP1S3bbNXggV9XIWYP5SLNCwAAAABJRU5ErkJggg=="}}]);
//# sourceMappingURL=BargainMiddlePage.f5bb0d59.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1163:function(e,t,a){},1164: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="},1183:function(e,t,a){"use strict";a.r(t);a(44);var n,s=a(14),i=a.n(s),c=a(5),r=a(7),o=a(6),l=a(8),m=a(9),u=a(0),d=a.n(u),p=a(64),h=(a(1163),a(3)),f=a(16),E=a(30),v=a(63),x=a(21),g=Object(x.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;t.dispatch;return t.history.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.d.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(w,{toDetail:this.toCourseDetail,data:this.state.camp.list,title:this.state.camp.name,type:1}),d.a.createElement(w,{toDetail:this.toCourseDetail,data:this.state.employment.list,title:this.state.employment.name,type:1}),d.a.createElement(w,{toDetail:this.toCourseDetail,data:this.state.basics.list,title:this.state.basics.name,type:2}),d.a.createElement(w,{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",{onClick:function(){return e.toCourseDetail(t.course_id)},key:a},d.a.createElement("img",{src:t.course_img,alt:""}))}))))}}]),t}(u.Component))||n;function b(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",{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 N(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 w(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(1164),alt:""}),e.title),1===e.type&&d.a.createElement(b,{data:e.data,toDetail:e.toDetail}),2===e.type&&d.a.createElement(N,{data:e.data}))}t.default=Object(p.b)(g)},1184:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(5),c=a(7),r=a(6),o=a(8),l=a(9),m=a(0),u=a.n(m),d=a(3),p=(a(776),a(21)),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(){if(a.state.showCard)a.setState({showCard:!1}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="static";else{var e=a.props,t=e.history,n=e.location.state,s=void 0===n?{}:n,i="";s.from&&-1!==s.from.indexOf("video")&&(i="detail"),s.from&&-1!==s.from.indexOf("detail")&&(i="classify"),t.push("".concat(s.from),{to:i})}},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.d.post("".concat(API.home,"/m/aist/submit"),e).then(function(e){200===e.data.code?(a.body.style.position="static",a.props.history.push("/campResolve?keshi_id=".concat(a.keshi_id,"&qid=").concat(a.qid),{from:a.props.location.state.from})):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.c)("keshi_id"),this.qidP=Object(d.c)("qid");var t=this;d.d.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)},1185:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(5),c=a(7),r=a(6),o=a(8),l=a(9),m=a(0),u=a.n(m),d=a(3),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(){if(a.state.showCard)a.setState({showCard:!1}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="static";else{var e=a.props,t=e.history,n=e.location.state,s=void 0===n?{}:n,i="";s.from&&-1!==s.from.indexOf("video")&&(i="detail"),s.from&&-1!==s.from.indexOf("detail")&&(i="classify"),t.push("".concat(s.from),{to:i})}},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.c)("keshi_id"),this.qidP=Object(d.c)("qid");var t=this;d.d.get("".concat(API.home,"/m/aist/analysis/").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.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.994277e1.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1163:function(e,t,a){},1164: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="},1183:function(e,t,a){"use strict";a.r(t);a(44);var n,s=a(14),i=a.n(s),c=a(5),r=a(7),o=a(6),l=a(8),m=a(9),u=a(0),d=a.n(u),p=a(64),h=(a(1163),a(3)),f=a(17),E=a(30),v=a(63),x=a(21),g=Object(x.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;t.dispatch;return t.history.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.d.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(w,{toDetail:this.toCourseDetail,data:this.state.camp.list,title:this.state.camp.name,type:1}),d.a.createElement(w,{toDetail:this.toCourseDetail,data:this.state.employment.list,title:this.state.employment.name,type:1}),d.a.createElement(w,{toDetail:this.toCourseDetail,data:this.state.basics.list,title:this.state.basics.name,type:2}),d.a.createElement(w,{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",{onClick:function(){return e.toCourseDetail(t.course_id)},key:a},d.a.createElement("img",{src:t.course_img,alt:""}))}))))}}]),t}(u.Component))||n;function b(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",{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 N(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 w(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(1164),alt:""}),e.title),1===e.type&&d.a.createElement(b,{data:e.data,toDetail:e.toDetail}),2===e.type&&d.a.createElement(N,{data:e.data}))}t.default=Object(p.b)(g)},1184:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(5),c=a(7),r=a(6),o=a(8),l=a(9),m=a(0),u=a.n(m),d=a(3),p=(a(776),a(21)),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(){if(a.state.showCard)a.setState({showCard:!1}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="static";else{var e=a.props,t=e.history,n=e.location.state,s=void 0===n?{}:n,i="";s.from&&-1!==s.from.indexOf("video")&&(i="detail"),s.from&&-1!==s.from.indexOf("detail")&&(i="classify"),t.push("".concat(s.from),{to:i})}},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.d.post("".concat(API.home,"/m/aist/submit"),e).then(function(e){200===e.data.code?(a.body.style.position="static",a.props.history.push("/campResolve?keshi_id=".concat(a.keshi_id,"&qid=").concat(a.qid),{from:a.props.location.state.from})):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.c)("keshi_id"),this.qidP=Object(d.c)("qid");var t=this;d.d.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)},1185:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),s=a.n(n),i=a(5),c=a(7),r=a(6),o=a(8),l=a(9),m=a(0),u=a.n(m),d=a(3),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(){if(a.state.showCard)a.setState({showCard:!1}),a.body=document.getElementsByTagName("body")[0],a.body.style.position="static";else{var e=a.props,t=e.history,n=e.location.state,s=void 0===n?{}:n,i="";s.from&&-1!==s.from.indexOf("video")&&(i="detail"),s.from&&-1!==s.from.indexOf("detail")&&(i="classify"),t.push("".concat(s.from),{to:i})}},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.c)("keshi_id"),this.qidP=Object(d.c)("qid");var t=this;d.d.get("".concat(API.home,"/m/aist/analysis/").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.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.914a8251.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","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","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","_this$props$location$","location","from","indexOf","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","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,4gCCWMC,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,MADdU,EACbC,SAEJ,OAHiBD,EACHE,QACNC,KAAR,cAAAC,OAA2BL,KACpB,GA1CXR,EAAKc,MAAQ,CACTC,KAAM,GACNC,WAAY,GACZC,OAAQ,GACRC,SAAU,GACVC,QAAS,GACTC,WAAW,GARApB,mFAYC,IAAAqB,EAAAlB,KAEhBmB,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,GAC9BX,EAAKS,SAAS,CACVb,OAAQU,EAAIC,KAAKA,KAAKG,OAAO,GAC7Bb,SAAUS,EAAIC,KAAKA,KAAKG,OAAO,IAAM,KAGzCJ,EAAIC,KAAKA,KAAKT,QAAQa,OAAS,GAC/BX,EAAKS,SAAS,CACVf,KAAMY,EAAIC,KAAKA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BqH,wBAAyB,CAACC,OAAM,GAAAjJ,OAAK6I,EAAO3D,EAAYwE","file":"mrstatic/js/Classify.994277e1.chunk.js","sourcesContent":["module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAMAAADNlS1EAAAA+VBMVEUAAADeP03XQVEDmP38MjMGl/rSQ1Uhi+QJlfj9MjIsh9sGl/o6gtD/MTEYj+zoOkTxNzw6gtAIlvn8MjNQeL+wUXGAZZgnieCAZJg3g9LJSF0rh9x5aJ6HYpPfPktDfsm8TGhec7ShV3wNk/PxNjxdc7ShV3y7TGdDfskgi+XePkt4Z52GYpM2g9PIR10Ok/PxNjyUXYdrbajoOkQXkOwXkOzoO0M3g9LJR13UQ1TePksXkO0Nk/Qhi+QshtzePkzxNjz5MzbnO0RqbamUXIivUXI2g9NDfslQeL9dc7R4aJ6GYpKiV328TGfJR13UQlPoOkNQeb7pOkQ6pR5tAAAAO3RSTlMABo85Of3w7JGRjO7u7u3t7ZGDg09PMBUV+vrz7+/q397X18/Pv7+1tKSjmZh9fHd2cnFmZTQ0KCgbEL1XwbEAAADqSURBVBjTXZHlssIwFAZpqVDc4bq7+wXa4nUB3v9h+HKAYZL9k52dZJI5yfBk61m2SEapZEi7pqoqq8YYNLbxyjTNN6zVEahu2vcA/EAqE1Ch1tEty3pgJg+BTDFv2/ZRhy6SNU2mi/4OHMd5yfDcu657JrSm5y29phAvfN+/EdrnFLT51j0OguBJ2PgchuFJl2/tGfgQNt5GUXQp8a01By2+SedxHN8Jh1+TJDn8J60VizWSnpam6W4mIM/sEXM67VPULaBDfieLxeoLAsoDUIa8Y/TX2+fkTFCHKPgkhRWqhUKORGlQ27MGJhAis32Nv3oAAAAASUVORK5CYII=\"","import React, {Component} from 'react';\nimport {WithTab} from '@/HOCs'\nimport './index.scss';\nimport {http} from \"@/utils\";\nimport {Link} from 'react-router-dom'\nimport {Toast} from 'antd-mobile'\nimport {HeaderBar} from \"@/common\"\nimport Loading from '@/common/Loading'\nimport {connect} from 'react-redux';\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 history.push(`/detail?id=${id}`);\n return false;\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 onClick={() => this.toCourseDetail(item.course_id)} key={index}>\n <img src={item.course_img} alt=\"\"/>\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 onClick={() => toDetail(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 </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 const { history, location: { state={} } } = this.props;\n let to = '';\n if(state.from && state.from.indexOf('video') !== -1) {\n to='detail'\n }\n if(state.from && state.from.indexOf('detail') !== -1) {\n to='classify'\n }\n // console.log(this.props);\n history.push(\n `${state.from}`,\n {\n to\n }\n );\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.body.style.position = 'static';\n this.props.history.push(`/campResolve?keshi_id=${this.keshi_id}&qid=${this.qid}`, {from: this.props.location.state.from})\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 const { history, location: { state={} } } = this.props;\n let to = '';\n if(state.from && state.from.indexOf('video') !== -1) {\n to='detail'\n }\n if(state.from && state.from.indexOf('detail') !== -1) {\n to='classify'\n }\n // console.log(this.props);\n history.push(\n `${state.from}`,\n {\n to\n }\n );\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","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","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","_this$props$location$","location","from","indexOf","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","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,4gCCWMC,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,MADdU,EACbC,SAEJ,OAHiBD,EACHE,QACNC,KAAR,cAAAC,OAA2BL,KACpB,GA1CXR,EAAKc,MAAQ,CACTC,KAAM,GACNC,WAAY,GACZC,OAAQ,GACRC,SAAU,GACVC,QAAS,GACTC,WAAW,GARApB,mFAYC,IAAAqB,EAAAlB,KAEhBmB,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,GAC9BX,EAAKS,SAAS,CACVb,OAAQU,EAAIC,KAAKA,KAAKG,OAAO,GAC7Bb,SAAUS,EAAIC,KAAKA,KAAKG,OAAO,IAAM,KAGzCJ,EAAIC,KAAKA,KAAKT,QAAQa,OAAS,GAC/BX,EAAKS,SAAS,CACVf,KAAMY,EAAIC,KAAKA,KAAKT,QAAQ,GA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,OAAM,GAAAjJ,OAAK6I,EAAO3D,EAAYwE","file":"mrstatic/js/Classify.914a8251.chunk.js","sourcesContent":["module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAMAAADNlS1EAAAA+VBMVEUAAADeP03XQVEDmP38MjMGl/rSQ1Uhi+QJlfj9MjIsh9sGl/o6gtD/MTEYj+zoOkTxNzw6gtAIlvn8MjNQeL+wUXGAZZgnieCAZJg3g9LJSF0rh9x5aJ6HYpPfPktDfsm8TGhec7ShV3wNk/PxNjxdc7ShV3y7TGdDfskgi+XePkt4Z52GYpM2g9PIR10Ok/PxNjyUXYdrbajoOkQXkOwXkOzoO0M3g9LJR13UQ1TePksXkO0Nk/Qhi+QshtzePkzxNjz5MzbnO0RqbamUXIivUXI2g9NDfslQeL9dc7R4aJ6GYpKiV328TGfJR13UQlPoOkNQeb7pOkQ6pR5tAAAAO3RSTlMABo85Of3w7JGRjO7u7u3t7ZGDg09PMBUV+vrz7+/q397X18/Pv7+1tKSjmZh9fHd2cnFmZTQ0KCgbEL1XwbEAAADqSURBVBjTXZHlssIwFAZpqVDc4bq7+wXa4nUB3v9h+HKAYZL9k52dZJI5yfBk61m2SEapZEi7pqoqq8YYNLbxyjTNN6zVEahu2vcA/EAqE1Ch1tEty3pgJg+BTDFv2/ZRhy6SNU2mi/4OHMd5yfDcu657JrSm5y29phAvfN+/EdrnFLT51j0OguBJ2PgchuFJl2/tGfgQNt5GUXQp8a01By2+SedxHN8Jh1+TJDn8J60VizWSnpam6W4mIM/sEXM67VPULaBDfieLxeoLAsoDUIa8Y/TX2+fkTFCHKPgkhRWqhUKORGlQ27MGJhAis32Nv3oAAAAASUVORK5CYII=\"","import React, {Component} from 'react';\nimport {WithTab} from '@/HOCs'\nimport './index.scss';\nimport {http} from \"@/utils\";\nimport {Link} from 'react-router-dom'\nimport {Toast} from 'antd-mobile'\nimport {HeaderBar} from \"@/common\"\nimport Loading from '@/common/Loading'\nimport {connect} from 'react-redux';\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 history.push(`/detail?id=${id}`);\n return false;\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 onClick={() => this.toCourseDetail(item.course_id)} key={index}>\n <img src={item.course_img} alt=\"\"/>\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 onClick={() => toDetail(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 </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 const { history, location: { state={} } } = this.props;\n let to = '';\n if(state.from && state.from.indexOf('video') !== -1) {\n to='detail'\n }\n if(state.from && state.from.indexOf('detail') !== -1) {\n to='classify'\n }\n // console.log(this.props);\n history.push(\n `${state.from}`,\n {\n to\n }\n );\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.body.style.position = 'static';\n this.props.history.push(`/campResolve?keshi_id=${this.keshi_id}&qid=${this.qid}`, {from: this.props.location.state.from})\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 const { history, location: { state={} } } = this.props;\n let to = '';\n if(state.from && state.from.indexOf('video') !== -1) {\n to='detail'\n }\n if(state.from && state.from.indexOf('detail') !== -1) {\n to='classify'\n }\n // console.log(this.props);\n history.push(\n `${state.from}`,\n {\n to\n }\n );\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([[7],{1161:function(e,t,a){},1180:function(e,t,a){"use strict";a.r(t);a(155);var o,r=a(76),c=a.n(r),n=a(18),s=(a(44),a(14)),i=a.n(s),l=a(5),d=a(7),p=a(6),m=a(8),u=a(9),f=(a(91),a(25)),h=a.n(f),b=(a(118),a(46)),E=a.n(b),g=a(0),v=a.n(g),y=a(30),x=a(16),N=a(3),O=a(38),j=a(21),S=(a(74),a(1161),E.a.Item);function w(e){var t=e.list;return v.a.createElement("div",null,t.map(function(t,a){t.is_coupon;var o=t.course_id,r=t.image_name,c=t.price1,n=t.price0,s=t.simpledescription,i=t.course_title,l=t.coupon_num,d=t.coupon_desc,p=v.a.createElement("span",{className:"order-newprice"},"\xa5",c);e.locationState&&e.locationState.group&&(p=v.a.createElement("span",{className:"order-newprice"},"\xa5",e.groupPrice));var m=v.a.createElement("div",{className:"order-info"},v.a.createElement("p",{className:"order-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},onClick:function(){return e.toDetail(o)}},i),v.a.createElement("p",{className:"order-content",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:"2",wordBreak:"break-all",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box"}},s),v.a.createElement("p",{className:"order-des"},p,v.a.createElement("span",{className:"order-price"},"\xa5",n)));return v.a.createElement(y.g,Object.assign({},t,{src:r,id:o,key:a,info:m,isaist:e.isaist,toDetail:e.toDetail}),e.locationState&&(e.locationState.type||e.locationState.simple)?v.a.createElement("div",{className:"order-prefer"},v.a.createElement(E.a,{key:a},v.a.createElement(S,{arrow:"horizontal",onClick:function(){}},v.a.createElement(x.b,{to:{pathname:"/coupons",search:"?id=".concat(o),state:{from:"/order"}}},v.a.createElement(h.a,{justify:"between"},v.a.createElement("span",{style:{color:"#333",fontSize:"15px"}},"\u4f18\u60e0\u5238"),v.a.createElement("span",{style:{fontSize:"14px",color:"#999999"}},d||(0===l?"\u65e0":"".concat(l,"\u5f20\u53ef\u7528")))))))):null)}))}var _=Object(j.b)()(o=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(m.a)(t).call(this,e))).submitOrder=function(){a.state.total;if(0!==a.state.orderList.length){a.state.perfect||i.a.info("\u8bf7\u5b8c\u5584\u62a5\u540d\u4fe1\u606f\uff01");var e=a.props.location.state,t=void 0===e?{}:e;if(1===t.group){var o=t.pdd_order_id?{course_id:Object(N.c)("id"),ischeck:a.state.useBalance,pdd_order_id:t.pdd_order_id}:{course_id:Object(N.c)("id"),ischeck:a.state.useBalance};N.d.post("".concat(API["base-api"],"/pdd/m"),o).then(function(e){console.log(e),200===e.data.errno?(sessionStorage.removeItem("orderUseCacheObj"),1!==e.data.data.pay_jump?a.props.history.push("/payorder?oid=".concat(e.data.data.oid),{group:1}):a.props.history.push("/togroup?id=".concat(e.data.data.oid))):i.a.info(e.data.msg,2)})}else{var r="".concat(API["base-api"],"/m/v34/cart/order?ischeck=").concat(a.state.useBalance);a.props.location.state&&1===a.props.location.state.type&&(r+="&type=1"),N.d.get(r).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),r=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(r)).toFixed(2)}):a.setState({offset:t.toFixed(2),total:0,discount:(t+parseFloat(r)).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,r=e.user_account,c=e.user_info,n=e.discount;a.props.location.state&&1===a.props.location.state.group&&(o=a.state.groupPrice),a.cacheObj={perfect:c,orderList:t,user_account:r,total:o,discount:n},a.setState({perfect:c,orderList:t,user_account:r,total:o,discount:n})},a.publicLocalStorage=function(){"PUSH"===a.props.history.action?(sessionStorage.removeItem("orderUseCacheObj"),a.setState({discount:0})):null!==sessionStorage.getItem("orderUseCacheObj")&&(a.setState({useBalance:!0}),a.computedMoneyByCache())},a.toCourseDetail=function(e){var t=a.props;t.dispatch;t.history.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(d.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.props.location.state&&1===this.props.location.state.type?N.d.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?Promise.all([N.d.get("".concat(API.home,"/m/course/detail/").concat(Object(N.c)("id"))),N.d.get("".concat(API["base-api"],"/m/order/preorder"))]).then(function(t){var a=t[0],o=t[1],r={};200===o.data.errno?(r=Object.assign({},o.data.data,{course:[]}),200===a.data.code?(r.course.push(a.data.data.course_info),e.setState({groupPrice:a.data.data.course_info.pdd_group_info.price}),e.publicGetData(r),e.publicLocalStorage()):i.a.info(a.data.msg,2)):i.a.info(o.data.msg,2)}):N.d.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)}):N.d.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,r=e.total,s=e.discount,i=e.useBalance,l=e.info,d=e.offset,p=e.groupPrice;return v.a.createElement("div",{className:"order-wrapper"},v.a.createElement(h.a,null,v.a.createElement(h.a.Item,null,v.a.createElement(y.e,{title:"\u8bfe\u7a0b\u62a5\u540d",arrow:!0}),!this.state.perfect&&v.a.createElement(x.b,{to:{pathname:"/orderinfo",state:{type:this.props.location.state?this.props.location.state.type:null,id:Object(N.c)("id")}},className:"order-information"},v.a.createElement("i",{className:"iconfont iconiconfront-6 order-addsize"}),v.a.createElement("div",{className:"order-infotext"},"\u5b8c\u5584\u62a5\u540d\u4fe1\u606f"),v.a.createElement("i",{className:"iconfont iconiconfront-70 order-next"})),this.state.perfect&&v.a.createElement("div",{className:"order-information2"},v.a.createElement(c.a,null,v.a.createElement(x.b,{to:{pathname:"/orderinfo",state:Object(n.a)({},this.state.perfect,this.props.location.state,{id:Object(N.c)("id")})}},v.a.createElement(h.a,{align:"center",justify:"between",style:{height:"80px"}},v.a.createElement("i",{className:"iconfont iconiconfront-20 user-icon"}),v.a.createElement(h.a,{direction:"column",justify:"between",align:"start",className:"order-cell"},v.a.createElement("div",{className:"name"},"\u59d3\u540d\uff1a".concat(t.real_name)),v.a.createElement("div",null,"\u7535\u8bdd\uff1a".concat(t.cellphone))),v.a.createElement(h.a,{align:"start",className:"order-cell"},v.a.createElement("div",null,"QQ\uff1a".concat(t.qq))))))),v.a.createElement("div",{className:"order-list"},v.a.createElement(w,{list:a,compute:this.computedMoney,courseId:Object(N.c)("id"),locationState:this.props.location.state,groupPrice:p,toDetail:this.toCourseDetail})),v.a.createElement("div",{className:"order-balance"},v.a.createElement(E.a,null,v.a.createElement(S,{className:"order-prefer-text"},v.a.createElement(h.a,{justify:"between"},v.a.createElement(h.a,{align:"center"},v.a.createElement("span",null,"\u4f59\u989d\u62b5\u6263"),v.a.createElement("span",{className:"order-balanceprice"}," (\u4f59\u989d: ",v.a.createElement("i",{className:"order-money"},"".concat(o,"\u5143")),")"),v.a.createElement("i",{className:"iconfont iconiconfront-22 question-mark",onClick:this.showInfo})),v.a.createElement(h.a,null,i?v.a.createElement(v.a.Fragment,null,v.a.createElement("span",{style:{color:"#FF2121",fontSize:"15px",marginRight:"6px"}},"-\xa5".concat(d)),v.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 balance-used",onClick:Object(O.throttle)(this.useBalance,600)})):v.a.createElement("i",{className:"circle-icon",onClick:Object(O.throttle)(this.useBalance,600)})))))),v.a.createElement("div",{className:"order-bar"},v.a.createElement("div",{className:"order-course"},v.a.createElement("span",{className:"order-course-text"},"".concat(a.length,"\u95e8\u8bfe\u7a0b"))),v.a.createElement("div",{className:"order-bar-text"},v.a.createElement("div",{className:"order-amount"},v.a.createElement("span",{className:"order-amount-title"},"\u5408\u8ba1:"),v.a.createElement("span",{className:"order-amount-price"},"\uffe5".concat(r))),v.a.createElement("div",{className:"order-preprice"},v.a.createElement("span",{className:"order-preprice-title"},"\u5df2\u4f18\u60e0:"),v.a.createElement("span",{className:"order-preprice-price"},"\xa5".concat(s)))),t?v.a.createElement("button",{type:"button",className:"order-button has-info"},v.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355")):v.a.createElement("button",{type:"button",className:"order-button"},v.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355"))))),l?v.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",zIndex:"99"}},v.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%)"}},v.a.createElement(h.a,{direction:"column",justify:"between",align:"center",style:{height:"100%"}},v.a.createElement("p",{style:{fontSize:"16px",color:"#333333"}},"\u4f59\u989d\u62b5\u6263\u8bf4\u660e"),v.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"),v.a.createElement("div",{onClick:this.showInfo,style:{width:"260px",height:"30px",lineHeight:"30px",textAlign:"center",borderRadius:"3px",border:"1px solid #0099FF",color:"#0099FF",fontSize:"15px"}},"\u77e5\u9053\u4e86")))):null)}}]),t}(g.Component))||o;t.default=_}}]);
//# sourceMappingURL=Order.96622df3.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{1161:function(e,t,a){},1180:function(e,t,a){"use strict";a.r(t);a(155);var o,r=a(76),c=a.n(r),n=a(18),s=(a(44),a(14)),i=a.n(s),l=a(5),d=a(7),p=a(6),m=a(8),u=a(9),f=(a(91),a(25)),h=a.n(f),b=(a(118),a(46)),E=a.n(b),g=a(0),v=a.n(g),y=a(30),x=a(17),N=a(3),O=a(38),j=a(21),S=(a(74),a(1161),E.a.Item);function w(e){var t=e.list;return v.a.createElement("div",null,t.map(function(t,a){t.is_coupon;var o=t.course_id,r=t.image_name,c=t.price1,n=t.price0,s=t.simpledescription,i=t.course_title,l=t.coupon_num,d=t.coupon_desc,p=v.a.createElement("span",{className:"order-newprice"},"\xa5",c);e.locationState&&e.locationState.group&&(p=v.a.createElement("span",{className:"order-newprice"},"\xa5",e.groupPrice));var m=v.a.createElement("div",{className:"order-info"},v.a.createElement("p",{className:"order-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},onClick:function(){return e.toDetail(o)}},i),v.a.createElement("p",{className:"order-content",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:"2",wordBreak:"break-all",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box"}},s),v.a.createElement("p",{className:"order-des"},p,v.a.createElement("span",{className:"order-price"},"\xa5",n)));return v.a.createElement(y.g,Object.assign({},t,{src:r,id:o,key:a,info:m,isaist:e.isaist,toDetail:e.toDetail}),e.locationState&&(e.locationState.type||e.locationState.simple)?v.a.createElement("div",{className:"order-prefer"},v.a.createElement(E.a,{key:a},v.a.createElement(S,{arrow:"horizontal",onClick:function(){}},v.a.createElement(x.b,{to:{pathname:"/coupons",search:"?id=".concat(o),state:{from:"/order"}}},v.a.createElement(h.a,{justify:"between"},v.a.createElement("span",{style:{color:"#333",fontSize:"15px"}},"\u4f18\u60e0\u5238"),v.a.createElement("span",{style:{fontSize:"14px",color:"#999999"}},d||(0===l?"\u65e0":"".concat(l,"\u5f20\u53ef\u7528")))))))):null)}))}var _=Object(j.b)()(o=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(m.a)(t).call(this,e))).submitOrder=function(){a.state.total;if(0!==a.state.orderList.length){a.state.perfect||i.a.info("\u8bf7\u5b8c\u5584\u62a5\u540d\u4fe1\u606f\uff01");var e=a.props.location.state,t=void 0===e?{}:e;if(1===t.group){var o=t.pdd_order_id?{course_id:Object(N.c)("id"),ischeck:a.state.useBalance,pdd_order_id:t.pdd_order_id}:{course_id:Object(N.c)("id"),ischeck:a.state.useBalance};N.d.post("".concat(API["base-api"],"/pdd/m"),o).then(function(e){console.log(e),200===e.data.errno?(sessionStorage.removeItem("orderUseCacheObj"),1!==e.data.data.pay_jump?a.props.history.push("/payorder?oid=".concat(e.data.data.oid),{group:1}):a.props.history.push("/togroup?id=".concat(e.data.data.oid))):i.a.info(e.data.msg,2)})}else{var r="".concat(API["base-api"],"/m/v34/cart/order?ischeck=").concat(a.state.useBalance);a.props.location.state&&1===a.props.location.state.type&&(r+="&type=1"),N.d.get(r).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),r=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(r)).toFixed(2)}):a.setState({offset:t.toFixed(2),total:0,discount:(t+parseFloat(r)).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,r=e.user_account,c=e.user_info,n=e.discount;a.props.location.state&&1===a.props.location.state.group&&(o=a.state.groupPrice),a.cacheObj={perfect:c,orderList:t,user_account:r,total:o,discount:n},a.setState({perfect:c,orderList:t,user_account:r,total:o,discount:n})},a.publicLocalStorage=function(){"PUSH"===a.props.history.action?(sessionStorage.removeItem("orderUseCacheObj"),a.setState({discount:0})):null!==sessionStorage.getItem("orderUseCacheObj")&&(a.setState({useBalance:!0}),a.computedMoneyByCache())},a.toCourseDetail=function(e){var t=a.props;t.dispatch;t.history.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(d.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.props.location.state&&1===this.props.location.state.type?N.d.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?Promise.all([N.d.get("".concat(API.home,"/m/course/detail/").concat(Object(N.c)("id"))),N.d.get("".concat(API["base-api"],"/m/order/preorder"))]).then(function(t){var a=t[0],o=t[1],r={};200===o.data.errno?(r=Object.assign({},o.data.data,{course:[]}),200===a.data.code?(r.course.push(a.data.data.course_info),e.setState({groupPrice:a.data.data.course_info.pdd_group_info.price}),e.publicGetData(r),e.publicLocalStorage()):i.a.info(a.data.msg,2)):i.a.info(o.data.msg,2)}):N.d.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)}):N.d.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,r=e.total,s=e.discount,i=e.useBalance,l=e.info,d=e.offset,p=e.groupPrice;return v.a.createElement("div",{className:"order-wrapper"},v.a.createElement(h.a,null,v.a.createElement(h.a.Item,null,v.a.createElement(y.e,{title:"\u8bfe\u7a0b\u62a5\u540d",arrow:!0}),!this.state.perfect&&v.a.createElement(x.b,{to:{pathname:"/orderinfo",state:{type:this.props.location.state?this.props.location.state.type:null,id:Object(N.c)("id")}},className:"order-information"},v.a.createElement("i",{className:"iconfont iconiconfront-6 order-addsize"}),v.a.createElement("div",{className:"order-infotext"},"\u5b8c\u5584\u62a5\u540d\u4fe1\u606f"),v.a.createElement("i",{className:"iconfont iconiconfront-70 order-next"})),this.state.perfect&&v.a.createElement("div",{className:"order-information2"},v.a.createElement(c.a,null,v.a.createElement(x.b,{to:{pathname:"/orderinfo",state:Object(n.a)({},this.state.perfect,this.props.location.state,{id:Object(N.c)("id")})}},v.a.createElement(h.a,{align:"center",justify:"between",style:{height:"80px"}},v.a.createElement("i",{className:"iconfont iconiconfront-20 user-icon"}),v.a.createElement(h.a,{direction:"column",justify:"between",align:"start",className:"order-cell"},v.a.createElement("div",{className:"name"},"\u59d3\u540d\uff1a".concat(t.real_name)),v.a.createElement("div",null,"\u7535\u8bdd\uff1a".concat(t.cellphone))),v.a.createElement(h.a,{align:"start",className:"order-cell"},v.a.createElement("div",null,"QQ\uff1a".concat(t.qq))))))),v.a.createElement("div",{className:"order-list"},v.a.createElement(w,{list:a,compute:this.computedMoney,courseId:Object(N.c)("id"),locationState:this.props.location.state,groupPrice:p,toDetail:this.toCourseDetail})),v.a.createElement("div",{className:"order-balance"},v.a.createElement(E.a,null,v.a.createElement(S,{className:"order-prefer-text"},v.a.createElement(h.a,{justify:"between"},v.a.createElement(h.a,{align:"center"},v.a.createElement("span",null,"\u4f59\u989d\u62b5\u6263"),v.a.createElement("span",{className:"order-balanceprice"}," (\u4f59\u989d: ",v.a.createElement("i",{className:"order-money"},"".concat(o,"\u5143")),")"),v.a.createElement("i",{className:"iconfont iconiconfront-22 question-mark",onClick:this.showInfo})),v.a.createElement(h.a,null,i?v.a.createElement(v.a.Fragment,null,v.a.createElement("span",{style:{color:"#FF2121",fontSize:"15px",marginRight:"6px"}},"-\xa5".concat(d)),v.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 balance-used",onClick:Object(O.throttle)(this.useBalance,600)})):v.a.createElement("i",{className:"circle-icon",onClick:Object(O.throttle)(this.useBalance,600)})))))),v.a.createElement("div",{className:"order-bar"},v.a.createElement("div",{className:"order-course"},v.a.createElement("span",{className:"order-course-text"},"".concat(a.length,"\u95e8\u8bfe\u7a0b"))),v.a.createElement("div",{className:"order-bar-text"},v.a.createElement("div",{className:"order-amount"},v.a.createElement("span",{className:"order-amount-title"},"\u5408\u8ba1:"),v.a.createElement("span",{className:"order-amount-price"},"\uffe5".concat(r))),v.a.createElement("div",{className:"order-preprice"},v.a.createElement("span",{className:"order-preprice-title"},"\u5df2\u4f18\u60e0:"),v.a.createElement("span",{className:"order-preprice-price"},"\xa5".concat(s)))),t?v.a.createElement("button",{type:"button",className:"order-button has-info"},v.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355")):v.a.createElement("button",{type:"button",className:"order-button"},v.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355"))))),l?v.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",zIndex:"99"}},v.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%)"}},v.a.createElement(h.a,{direction:"column",justify:"between",align:"center",style:{height:"100%"}},v.a.createElement("p",{style:{fontSize:"16px",color:"#333333"}},"\u4f59\u989d\u62b5\u6263\u8bf4\u660e"),v.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"),v.a.createElement("div",{onClick:this.showInfo,style:{width:"260px",height:"30px",lineHeight:"30px",textAlign:"center",borderRadius:"3px",border:"1px solid #0099FF",color:"#0099FF",fontSize:"15px"}},"\u77e5\u9053\u4e86")))):null)}}]),t}(g.Component))||o;t.default=_}}]);
//# sourceMappingURL=Order.d0b6e74e.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","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","_this$props$location$","location","params","pdd_order_id","getParam","ischeck","useBalance","http","post","API","then","res","console","log","data","errno","sessionStorage","removeItem","pay_jump","history","push","oid","msg","url","get","is_free","replace","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","_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":"qUAYMA,iBAAOC,EAAAC,EAAKF,MAElB,SAASG,EAAUC,GACjB,IAAMC,EAAWD,EAAME,KACvB,OACEC,EAAAL,EAAAM,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,YACn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OAAQ,OAAQmB,WAAY,OAAQC,UAAW,SAAUC,aAAc,MAAOC,OAAQ,oBAAqB9G,MAAO,UAAWC,SAAU,SAA7L,yBAIJ,aA7aM8G,iBAsbL7G","file":"mrstatic/js/Order.96622df3.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 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 \n style={{ \n color: '#333', \n fontSize: '15px' \n }}\n >优惠券</span>\n <span \n style={{ \n fontSize: '14px', \n color: '#999999' \n }}\n >\n {!coupon_desc ? (coupon_num === 0 ? '无' : `${coupon_num}张可用`) : (coupon_desc)}\n </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 const { location: { state ={} } } = this.props;\n if(state.group === 1) {\n let params = state.pdd_order_id? {\n course_id: getParam(\"id\"),\n ischeck: this.state.useBalance,\n pdd_order_id: state.pdd_order_id\n } : {\n course_id: getParam(\"id\"),\n ischeck: this.state.useBalance,\n }\n http.post(`${API['base-api']}/pdd/m`, params).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.push(`/payorder?oid=${res.data.data.oid}`, {group: 1});\n\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 // 公共方法 存储数据\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 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 this.setState({\n discount: 0.00,\n });\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 // 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 // 普通课程立即报名 不带 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 // 获取一键开团的课程\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 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","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","_this$props$location$","location","params","pdd_order_id","getParam","ischeck","useBalance","http","post","API","then","res","console","log","data","errno","sessionStorage","removeItem","pay_jump","history","push","oid","msg","url","get","is_free","replace","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","_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":"qUAYMA,iBAAOC,EAAAC,EAAKF,MAElB,SAASG,EAAUC,GACjB,IAAMC,EAAWD,EAAME,KACvB,OACEC,EAAAL,EAAAM,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,EAAAL,EAAAM,cAAA,QAAMc,UAAU,kBAAhB,OAAmCP,GAChDX,EAAMmB,eAAiBnB,EAAMmB,cAAcC,QAC5CH,EAAYd,EAAAL,EAAAM,cAAA,QAAMc,UAAU,kBAAhB,OAAmClB,EAAMqB,aAEvD,IAAMC,EACJnB,EAAAL,EAAAM,cAAA,OAAKc,UAAU,cAEXf,EAAAL,EAAAM,cAAA,KACEc,UAAU,cACVK,MAAO,CACLC,SAAU,SACVC,aAAc,WACdC,WAAY,UAEdC,QAAS,kBAAM3B,EAAM4B,SAASnB,KAE7BK,GAGLX,EAAAL,EAAAM,cAAA,KAAGc,UAAU,gBAAgBK,MAAO,CAAEM,gBAAiB,WAAYC,gBAAiB,IAAKC,UAAW,YAAaP,SAAU,SAAUC,aAAc,WAAYO,QAAS,gBAAkBnB,GAC1LV,EAAAL,EAAAM,cAAA,KAAGc,UAAU,aAKVD,EACDd,EAAAL,EAAAM,cAAA,QAAMc,UAAU,eAAhB,OAAgCN,KAKtC,OACET,EAAAL,EAAAM,cAAC6B,EAAA,EAADC,OAAAC,OAAA,GACM7B,EADN,CAEE8B,IAA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,cAAA,OAAKmB,MAAO,CAAEsI,QAAS,OAAQF,gBAAiB,OAAQD,MAAO,QAASb,OAAQ,QAASiB,OAAQ,SAAUP,SAAU,WAAYE,KAAM,MAAOD,IAAK,MAAOO,UAAW,0BACnK5J,EAAAL,EAAAM,cAAA+C,EAAArD,EAAA,CAAMgJ,UAAU,SAAS1F,QAAQ,UAAUwF,MAAM,SAASrH,MAAO,CAAEsH,OAAQ,SACzE1I,EAAAL,EAAAM,cAAA,KAAGmB,MAAO,CAAE+B,SAAU,OAAQD,MAAO,YAArC,wCACAlD,EAAAL,EAAAM,cAAA,KAAGmB,MAAO,CAAEyI,WAAY,OAAQ1G,SAAU,OAAQD,MAAO,YAAzD,kRACAlD,EAAAL,EAAAM,cAAA,OAAKuB,QAASgC,KAAKsD,SAAU1F,MAAO,CAAEmI,MAAO,QAASb,OAAQ,OAAQmB,WAAY,OAAQC,UAAW,SAAUC,aAAc,MAAOC,OAAQ,oBAAqB9G,MAAO,UAAWC,SAAU,SAA7L,yBAIJ,aA7aM8G,iBAsbL7G","file":"mrstatic/js/Order.d0b6e74e.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 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 \n style={{ \n color: '#333', \n fontSize: '15px' \n }}\n >优惠券</span>\n <span \n style={{ \n fontSize: '14px', \n color: '#999999' \n }}\n >\n {!coupon_desc ? (coupon_num === 0 ? '无' : `${coupon_num}张可用`) : (coupon_desc)}\n </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 const { location: { state ={} } } = this.props;\n if(state.group === 1) {\n let params = state.pdd_order_id? {\n course_id: getParam(\"id\"),\n ischeck: this.state.useBalance,\n pdd_order_id: state.pdd_order_id\n } : {\n course_id: getParam(\"id\"),\n ischeck: this.state.useBalance,\n }\n http.post(`${API['base-api']}/pdd/m`, params).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.push(`/payorder?oid=${res.data.data.oid}`, {group: 1});\n\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 // 公共方法 存储数据\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 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 this.setState({\n discount: 0.00,\n });\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 // 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 // 普通课程立即报名 不带 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 // 获取一键开团的课程\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 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([[9],{1175:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return P});t(155);var n=t(76),i=t.n(n),c=(t(91),t(25)),o=t.n(c),r=(t(154),t(35)),s=t.n(r),l=(t(44),t(14)),d=t.n(l),p=t(5),u=t(7),m=t(6),y=t(8),f=t(9),g=t(75),h=(t(892),t(894)),b=t.n(h),v=(t(118),t(46)),w=t.n(v),E=t(0),S=t.n(E),x=t(3),_=t(30),j=t(16),k=(t(896),w.a.Item.Brief,b.a.RadioItem),I=[];I=x.b.isWeixin?[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}]:[{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconalipay"},{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}];var P=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.c)("status"),a=Object(x.c)("type"),n=Object(x.c)("oid"),i=t.props.history;if(e||a)if(0===parseInt(e,10))if(2===parseInt(a,10))i.push("/togroup?id=".concat(n));else if(4===parseInt(a,10)){c&&window.localStorage.setItem("payCourse",c);var c=window.localStorage.getItem("payCourse");c&&i.push("/detail?id=".concat(c),{oid:n})}else i.push("/purchased");else 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){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.f)()?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.d.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():d.a.info(e.data.msg,2)})},t.isweixinPay=function(){var e=Object(g.a)(Object(g.a)(t)),a=Object(x.c)("code");if(a){if(void 0===Object(x.c)("oid"))return;x.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(x.c)("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.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.d.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.c)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.c)("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.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.d.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.c)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.c)("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.d.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);x.d.get("/pay/alipay/wap_charge/oid/".concat(e,"/plat/{plat} /hb_num/").concat(n)).then(function(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.c)("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(f.a)(a,e),Object(u.a)(a,[{key:"componentDidMount",value:function(){var e=this;this.redirectAfterPay();var a={};a=this.props.location.state&&this.props.location.state.group?{order_id:this.state.orderId,type:2}:{order_id:this.state.orderId},x.d.post("".concat(API["base-api"],"/m/order/detail"),a).then(function(a){if(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)}),e.setState({pay_amount:i,categoryList:n,fenqiList:c})}else d.a.info(a.data.msg,2)}),(1===Object(x.c)("is_class")||Object(x.c)("weixinpay"))&&this.payCallback(),Object(x.f)()&&(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,l=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(s.a,{size:"sm"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(i.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(s.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(_.j,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),S.a.createElement(s.a,{size:"md"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(i.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(s.a,{size:"md"}),S.a.createElement(w.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},I.map(function(a){return S.a.createElement(k,{thumb:S.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?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(l,"\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)},896:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.3f5285c6.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{1175:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return P});t(155);var n=t(76),i=t.n(n),c=(t(91),t(25)),o=t.n(c),r=(t(154),t(35)),s=t.n(r),l=(t(44),t(14)),d=t.n(l),p=t(5),u=t(7),m=t(6),y=t(8),f=t(9),g=t(75),h=(t(892),t(894)),b=t.n(h),v=(t(118),t(46)),w=t.n(v),E=t(0),S=t.n(E),x=t(3),_=t(30),j=t(17),k=(t(896),w.a.Item.Brief,b.a.RadioItem),I=[];I=x.b.isWeixin?[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}]:[{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconalipay"},{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}];var P=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.c)("status"),a=Object(x.c)("type"),n=Object(x.c)("oid"),i=t.props.history;if(e||a)if(0===parseInt(e,10))if(2===parseInt(a,10))i.push("/togroup?id=".concat(n));else if(4===parseInt(a,10)){c&&window.localStorage.setItem("payCourse",c);var c=window.localStorage.getItem("payCourse");c&&i.push("/detail?id=".concat(c),{oid:n})}else i.push("/purchased");else 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){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.f)()?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.d.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():d.a.info(e.data.msg,2)})},t.isweixinPay=function(){var e=Object(g.a)(Object(g.a)(t)),a=Object(x.c)("code");if(a){if(void 0===Object(x.c)("oid"))return;x.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(x.c)("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.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.d.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.c)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.c)("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.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.d.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.c)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.c)("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.d.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);x.d.get("/pay/alipay/wap_charge/oid/".concat(e,"/plat/{plat} /hb_num/").concat(n)).then(function(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.c)("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(f.a)(a,e),Object(u.a)(a,[{key:"componentDidMount",value:function(){var e=this;this.redirectAfterPay();var a={};a=this.props.location.state&&this.props.location.state.group?{order_id:this.state.orderId,type:2}:{order_id:this.state.orderId},x.d.post("".concat(API["base-api"],"/m/order/detail"),a).then(function(a){if(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)}),e.setState({pay_amount:i,categoryList:n,fenqiList:c})}else d.a.info(a.data.msg,2)}),(1===Object(x.c)("is_class")||Object(x.c)("weixinpay"))&&this.payCallback(),Object(x.f)()&&(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,l=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(s.a,{size:"sm"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(i.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(s.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(_.j,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),S.a.createElement(s.a,{size:"md"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(i.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(s.a,{size:"md"}),S.a.createElement(w.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},I.map(function(a){return S.a.createElement(k,{thumb:S.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?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(l,"\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)},896:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.c0854efc.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","courseId","window","localStorage","setItem","getItem","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_7___default","info","onChange","setState","payType","checkPeriod","huabei","checkStaging","item","stageNumber","singleMoney","everyTotal","periodNumber","stage","print","_len","arguments","length","e","Array","_key","console","log","pay","_this2$state","state","orderId","alipayPay","weixinPay","is_weixin","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","group","order_id","post","_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":"uXAWMA,UAFOC,EAAAC,EAAKC,KACCC,MACDC,EAAAH,EAAMF,WAEpBM,EAAW,GAEXA,EADAC,IAAQC,SACG,CACP,CAACC,MAAO,EAAGC,MAAO,2BAAQC,KAAM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AErC,iBAK/D,aAlZc+C","file":"mrstatic/js/PayOrder.3f5285c6.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: 'iconalipay'},\n {value: 1, label: '微信支付', icon: 'iconweixinzhifu'},\n // { value: 2, label: '花呗分期', icon: 'iconhuabei' },\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 if(parseInt(type, 10) === 4) {\n courseId && window.localStorage.setItem('payCourse', courseId);\n const courseId = window.localStorage.getItem('payCourse')\n courseId && history.push(`/detail?id=${courseId}`,{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\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 let data = {}\n if(this.props.location.state && this.props.location.state.group){\n data = {\n order_id: this.state.orderId,\n type: 2\n }\n } else {\n data = {\n order_id: this.state.orderId,\n }\n }\n http.post(`${API['base-api']}/m/order/detail`,data).then((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\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'\n style={{width: '100%', paddingRight: '30px'}}>\n <span style={{color: '#555555', fontSize: '14px'}}>{i.label}</span>\n {\n checkPeriod ? (\n <span style={{\n color: '#333333',\n fontSize: '12px'\n }}>{`${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
{"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","courseId","window","localStorage","setItem","getItem","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_7___default","info","onChange","setState","payType","checkPeriod","huabei","checkStaging","item","stageNumber","singleMoney","everyTotal","periodNumber","stage","print","_len","arguments","length","e","Array","_key","console","log","pay","_this2$state","state","orderId","alipayPay","weixinPay","is_weixin","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","group","order_id","post","_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":"uXAWMA,UAFOC,EAAAC,EAAKC,KACCC,MACDC,EAAAH,EAAMF,WAEpBM,EAAW,GAEXA,EADAC,IAAQC,SACG,CACP,CAACC,MAAO,EAAGC,MAAO,2BAAQC,KAAM,oBAGzB,CACP,CAACF,MAAO,EAAGC,MAAO,qBAAOC,KAAM,cAC/B,CAACF,MAAO,EAAGC,MAAO,2BAAQC,KAAM,wBAMnBC,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,OACdG,EAAWZ,EAAKD,MAAhBa,QACP,GAAIJ,GAAUE,EACV,GAA6B,IAAzBG,SAASL,EAAQ,IAEjB,GAA2B,IAAvBK,SAASH,EAAM,IACfE,EAAQE,KAAR,eAAAC,OAA4BJ,SAC1B,GAA0B,IAAvBE,SAASH,EAAM,IAAW,CACnCM,GAAYC,OAAOC,aAAaC,QAAQ,YAAaH,GACjD,IAAMA,EAAWC,OAAOC,aAAaE,QAAQ,aAC7CJ,GAAYJ,EAAQE,KAAR,cAAAC,OAA2BC,GAAW,CAACL,aAEnDC,EAAQE,KAAK,mBAGjBO,EAAAjC,EAAMkC,KAAK,2BAAQ,IAxCZtB,EA6CnBuB,SAAW,SAAC5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UAAU,aACXF,EAAAjI,EAAAkI,cAAA,KAAGC,UAAU,eAAb,kCACCxB,EAAUY,IAAI,SAAAuC,GAAC,OACZ7B,EAAAjI,EAAAkI,cAACpI,EAAD,CACI2J,IAAKK,EAAEvJ,MACPyJ,QAAStH,IAAgBoH,EAAEvJ,MAC3B4B,SAAU,kBAAM4F,EAAKvF,aAAasH,KAHtC,GAAAnI,OAIQmI,EAAElH,WAJV,gBAAAjB,OAI2BmI,EAAEhH,MAJ7B,UAKImF,EAAAjI,EAAAkI,cAAAnI,EAAAC,EAAMC,KAAKC,MAAX,0BAAAyB,OAAwBmI,EAAEjC,WAA1B,mCAAAlG,OAA6CmI,EAAErC,iBAK/D,aAlZc+C","file":"mrstatic/js/PayOrder.c0854efc.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: 'iconalipay'},\n {value: 1, label: '微信支付', icon: 'iconweixinzhifu'},\n // { value: 2, label: '花呗分期', icon: 'iconhuabei' },\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 if(parseInt(type, 10) === 4) {\n courseId && window.localStorage.setItem('payCourse', courseId);\n const courseId = window.localStorage.getItem('payCourse')\n courseId && history.push(`/detail?id=${courseId}`,{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\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 let data = {}\n if(this.props.location.state && this.props.location.state.group){\n data = {\n order_id: this.state.orderId,\n type: 2\n }\n } else {\n data = {\n order_id: this.state.orderId,\n }\n }\n http.post(`${API['base-api']}/m/order/detail`,data).then((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\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'\n style={{width: '100%', paddingRight: '30px'}}>\n <span style={{color: '#555555', fontSize: '14px'}}>{i.label}</span>\n {\n checkPeriod ? (\n <span style={{\n color: '#333333',\n fontSize: '12px'\n }}>{`${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([[11],{1134:function(e,t,a){},1135:function(e,t,a){},1194:function(e,t,a){"use strict";a.r(t);var n,c=a(5),s=a(7),r=a(6),o=a(8),i=a(9),l=a(0),u=a.n(l),h=a(700),p=a(162),d=a(3),m=(a(1134),a(44),a(14)),f=a.n(m),v=a(21),g=(a(1135),a(30)),w=a(48),y=(a(74),Object(v.b)()(n=function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(a=Object(r.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(s)))).state={courses:[]},a.toCourseDetail=function(e){var t=a.props;t.dispatch;t.history.push("/detail?id=".concat(e))},a}return Object(i.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this;d.d.get("".concat(API["search-api"],"/search_hot_word")).then(function(t){0===t.data.errno?e.setState({courses:t.data.data.info.courses}):f.a.info(t.data.msg)})}},{key:"render",value:function(){var e=this,t=this.state.courses;return u.a.createElement("div",{className:"recommendation"},u.a.createElement("div",{className:"title"},"\u63a8\u8350\u8bfe\u7a0b"),u.a.createElement("div",{className:"courses"},t.length>0&&t.map(function(t){var a=u.a.createElement("div",{className:"bottom"},u.a.createElement("span",{className:"price"},t.price1),u.a.createElement("span",{className:"old-price"},t.price0));return u.a.createElement(g.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}(l.Component))||n),b=Object(w.g)(y),E=a(1136),S=a.n(E),N=u.a.forwardRef(function(e,t){return u.a.createElement(h.a,Object.assign({},e,{forwardedRef:t}))}),O=function(e){var t=e.item;return u.a.createElement("div",{className:"bottom"},u.a.createElement("span",{className:"price"},"\xa5",t.price1),u.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},C=function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(a=Object(r.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(s)))).prevScrollY=0,a.searchHead=u.a.createRef(),a.swipeUp="up",a.swipeDown="down",a.state={courseList:[],value:decodeURIComponent(Object(d.c)("word"))||"",searchHistory:JSON.parse(localStorage.getItem("searchHistory"))||[],fixedHeader:!1,searchHeadStyle:{top:0},swipeDirection:a.swipeUp},a.getCourses=function(e){d.d.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){a.props.history.push("/detail?id=".concat(e))},a.handleScroll=S()(function(){var e=window.scrollY,t=a.searchHead.current.offsetTop;e<a.prevScrollY?a.state.swipeDirection===a.swipeDown?e<=t&&"fixed"!==a.state.searchHeadStyle.position&&a.setState({searchHeadStyle:{top:"0",position:"fixed"}}):a.setState({swipeDirection:a.swipeDown},function(){a.state.swipeDirection===a.swipeDown&&a.setState({searchHeadStyle:{top:"".concat(e>t?e-44:e,"px")}})}):a.state.swipeDirection!==a.swipeUp&&a.setState({swipeDirection:a.swipeUp,searchHeadStyle:{position:"absolute",top:"".concat(e,"px")}}),a.prevScrollY=e},0),a}return Object(i.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.getCourses(Object(d.c)("word")),document.addEventListener("scroll",this.handleScroll)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("scroll",this.handleScroll)}},{key:"render",value:function(){var e=this,t=this.state.courseList;return u.a.createElement("div",{className:"search-result"},u.a.createElement(N,{handleSearch:this.handleSearch,value:this.state.value,handleChange:this.handleChange,searchHistory:this.state.searchHistory,style:this.state.searchHeadStyle,ref:this.searchHead}),t&&t.length>0?u.a.createElement("ul",null,t.map(function(t){var a=u.a.createElement("div",{className:"info"},u.a.createElement("p",{className:"title"},t.course_title),u.a.createElement("p",{className:"des"},t.simpledescription),u.a.createElement(O,{item:t})),n=t.bargain_num||t.groupon_num?u.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 u.a.createElement(p.a,{img:t.image_name,toDetail:e.toCourseDetail,key:t.course_id,info:a,id:t.course_id,status:n})})):u.a.createElement("div",{className:"empty"},"\u62b1\u6b49\uff01\u6ca1\u6709\u641c\u5230\u76f8\u5173\u5185\u5bb9"),u.a.createElement(b,null))}}]),t}(l.PureComponent);t.default=C},700:function(e,t,a){"use strict";a(601);var n=a(603),c=a.n(n),s=a(77),r=a(5),o=a(7),i=a(6),l=a(8),u=a(9),h=a(0),p=a.n(h),d=a(48),m=a(15),f=a.n(m),v=(a(701),function(e){function t(){var e,a;Object(r.a)(this,t);for(var n=arguments.length,c=new Array(n),o=0;o<n;o++)c[o]=arguments[o];return(a=Object(i.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(c)))).state={isFocus:!1},a.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,c=e.value;c&&localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(s.a)(n),[c])))},a.changeFontColor=function(e){a.setState({isFocus:e})},a}return Object(u.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){this.refs.search.focus()}},{key:"render",value:function(){var e=this,t=this.state.isFocus,a=f()("submit-btn",{"submit-btn--active":t});return p.a.createElement("div",{className:"search-head",style:this.props.style,ref:this.props.forwardedRef},p.a.createElement("div",{className:"left",onClick:this.returnPage},p.a.createElement("i",{className:"iconfont iconiconfront-68"})),p.a.createElement("div",{className:"center"},p.a.createElement(c.a,{value:this.props.value,showCancelButton:!0,cancelText:" ",ref:"search",focus:!0,onChange:this.props.handleChange,placeholder:"\u641c\u7d22\u8bfe\u7a0b",onFocus:function(){return e.changeFontColor(!0)},onBlur:function(){return e.changeFontColor(!1)},onSubmit:this.search})),p.a.createElement("div",{className:"right right-btn",onClick:this.search},p.a.createElement("div",{className:a},"\u641c\u7d22")))}}]),t}(h.PureComponent));t.a=Object(d.g)(v)},701:function(e,t,a){}}]);
//# sourceMappingURL=SearchResult.a9940fff.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=SearchResult.0c0c9343.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/search/recommendation/index.js","components/search/search-result.js","components/search/searchHead.js"],"names":["Recommendation","connect","state","courses","toCourseDetail","id","_this$props","_this","props","dispatch","history","push","concat","_this2","this","http","get","API","then","res","data","errno","setState","info","toast_default","a","msg","_this3","react_default","createElement","className","length","map","item","Bottom","common","key","img","title","bottom","toDetail","Component","withRouter","ForwardRefSearchHead","React","forwardRef","ref","searchHead","Object","assign","forwardedRef","_ref","price1","price0","SearchResult","prevScrollY","createRef","swipeUp","swipeDown","courseList","value","decodeURIComponent","getParam","searchHistory","JSON","parse","localStorage","getItem","fixedHeader","searchHeadStyle","top","swipeDirection","getCourses","word","course","handleClick","handleSearch","handleChange","handleScroll","throttle","y","window","scrollY","headY","current","offsetTop","position","document","addEventListener","removeEventListener","style","Info","course_title","simpledescription","search_result_Bottom","status","VList","image_name","course_id","search_recommendation","PureComponent","SearchHead","isFocus","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__","changeFontColor","refs","focus","cls","classnames","submit-btn--active","react__WEBPACK_IMPORTED_MODULE_8___default","onClick","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","showCancelButton","cancelText","onChange","placeholder","onFocus","onBlur","onSubmit"],"mappings":"sSAUMA,SADLC,2NAGGC,MAAQ,CACJC,QAAS,MAsBbC,eAAiB,SAACC,GAAO,IAAAC,EACSC,EAAKC,MADdF,EACbG,SADaH,EACHI,QAENC,KAAR,cAAAC,OAA2BP,wFAtBf,IAAAQ,EAAAC,KAChBC,IAAKC,IAAL,GAAAJ,OAAYK,IAAI,cAAhB,qBACKC,KAAK,SAAAC,GACqB,IAAnBA,EAAIC,KAAKC,MACTR,EAAKS,SAAS,CACVnB,QAASgB,EAAIC,KAAKA,KAAKG,KAAKpB,UAGhCqB,EAAAC,EAAMF,KAAKJ,EAAIC,KAAKM,wCAkB3B,IAAAC,EAAAb,KACEX,EAAWW,KAAKZ,MAAhBC,QACP,OACIyB,EAAAH,EAAAI,cAAA,OAAKC,UAAU,kBACXF,EAAAH,EAAAI,cAAA,OAAKC,UAAU,SAAf,4BACAF,EAAAH,EAAAI,cAAA,OAAKC,UAAU,WAEP3B,EAAQ4B,OAAS,GACjB5B,EAAQ6B,IAAI,SAACC,GACT,IAAMC,EACFN,EAAAH,EAAAI,cAAA,OAAKC,UAAU,UACXF,EAAAH,EAAAI,cAAA,QAAMC,UAAU,SAASG,EAAI,QAC7BL,EAAAH,EAAAI,cAAA,QAAMC,UAAU,aAAaG,EAAI,SAGzC,OACIL,EAAAH,EAAAI,cAACM,EAAA,EAAD,CACIL,UAAW,kBACXM,IAAKH,EAAI,UACT5B,GAAI4B,EAAI,UAC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N,MAAMkF,MAAO5C,IAAKhC,KAAKN,MAAM0C,cAElEmE,EAAA5F,EAAAI,cAAA,OAAKC,UAAU,OAAOwF,QAASxG,KAAKyF,YAChCc,EAAA5F,EAAAI,cAAA,KAAGC,UAAU,+BAGjBuF,EAAA5F,EAAAI,cAAA,OAAKC,UAAU,UACXuF,EAAA5F,EAAAI,cAAA0F,EAAA9F,EAAA,CACImC,MAAO9C,KAAKN,MAAMoD,MAClB4D,kBAAgB,EAChBC,WAAY,IACZ3E,IAAI,SACJmE,OAAO,EACPS,SAAU5G,KAAKN,MAAMqE,aACrB8C,YAAY,2BACZC,QAAS,kBAAM/G,EAAKkG,iBAAgB,IACpCc,OAAQ,kBAAMhH,EAAKkG,iBAAgB,IACnCe,SAAWhH,KAAK2F,UAGxBY,EAAA5F,EAAAI,cAAA,OAAKC,UAAU,kBAAkBwF,QAASxG,KAAK2F,QAC3CY,EAAA5F,EAAAI,cAAA,OAAKC,UAAWoF,GAAhB,yBAvDKd,kBA+DV1D,gBAAW2D","file":"mrstatic/js/SearchResult.a9940fff.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 SearchHeader from './searchHead'\nimport VList from '@/common/VList'\nimport { http, getParam } from '@/utils'\nimport './search-result.scss'\nimport Recommendation from './recommendation'\nimport throttle from 'lodash/throttle'\n\n\nconst ForwardRefSearchHead = React.forwardRef((props, ref) => {\n return <SearchHeader {...props} forwardedRef={ref}/>\n})\n\nconst Bottom = ({item}) => {\n return (\n <div className='bottom'>\n <span className='price'>¥{item.price1}</span>\n <span className='stale-price'>¥{item.price0}</span>\n </div>\n )\n}\n\nclass SearchResult extends PureComponent {\n prevScrollY = 0\n searchHead = React.createRef()\n swipeUp = 'up'\n swipeDown = 'down'\n\n state = {\n courseList: [],\n value: decodeURIComponent(getParam('word')) || '',\n searchHistory: JSON.parse(localStorage.getItem('searchHistory')) || [],\n fixedHeader: false,\n searchHeadStyle: {top: 0},\n swipeDirection: this.swipeUp\n }\n\n componentDidMount() {\n this.getCourses(getParam('word'))\n document.addEventListener('scroll', this.handleScroll)\n }\n\n componentWillUnmount() {\n document.removeEventListener('scroll', this.handleScroll)\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 {history} = this.props;\n history.push(`/detail?id=${id}`)\n }\n\n handleScroll = throttle(() => {\n let y = window.scrollY, headY = this.searchHead.current.offsetTop\n if (y < this.prevScrollY) {\n\n if (this.state.swipeDirection === this.swipeDown) {\n\n y <= headY && this.state.searchHeadStyle.position !== 'fixed' && this.setState({\n searchHeadStyle: {\n top: `0`,\n position: 'fixed'\n }\n })\n\n } else {\n this.setState({\n swipeDirection: this.swipeDown\n }, () => {\n if (this.state.swipeDirection === this.swipeDown) {\n this.setState({\n searchHeadStyle: {\n top: `${y > headY ? y - 44 : y}px`\n }\n })\n }\n })\n }\n\n\n } else {\n this.state.swipeDirection !== this.swipeUp &&\n this.setState({\n swipeDirection: this.swipeUp,\n searchHeadStyle: {\n position: 'absolute',\n top: `${y}px`\n }\n })\n\n }\n this.prevScrollY = y\n }, 0)\n\n render() {\n const {courseList} = this.state\n\n return (\n <div\n className={'search-result'}>\n <ForwardRefSearchHead\n handleSearch={this.handleSearch}\n value={this.state.value}\n handleChange={this.handleChange}\n searchHistory={this.state.searchHistory}\n style={this.state.searchHeadStyle}\n ref={this.searchHead}\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\n </div>\n );\n }\n}\n\n\nexport default SearchResult;","import React, { PureComponent } from 'react'\nimport { SearchBar } from 'antd-mobile'\nimport { withRouter } from 'react-router-dom'\nimport classnames from 'classnames';\n\nimport './search_header.scss'\n\nclass SearchHead extends PureComponent {\n \n state = {\n isFocus: false\n }\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 changeFontColor = (isFocus) => {\n this.setState({\n isFocus\n });\n }\n\n render() {\n const { isFocus } = this.state;\n const cls = classnames('submit-btn', {'submit-btn--active': isFocus})\n return (\n <div className=\"search-head\" style={this.props.style} ref={this.props.forwardedRef}>\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 onFocus={() => this.changeFontColor(true)}\n onBlur={() => this.changeFontColor(false)}\n onSubmit={ this.search }\n />\n </div>\n <div className=\"right right-btn\" onClick={this.search}>\n <div className={cls}>搜索</div>\n </div>\n </div>\n\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","components/search/searchHead.js"],"names":["Recommendation","connect","state","courses","toCourseDetail","id","_this$props","_this","props","dispatch","history","push","concat","_this2","this","http","get","API","then","res","data","errno","setState","info","toast_default","a","msg","_this3","react_default","createElement","className","length","map","item","Bottom","common","key","img","title","bottom","toDetail","Component","withRouter","ForwardRefSearchHead","React","forwardRef","ref","searchHead","Object","assign","forwardedRef","_ref","price1","price0","SearchResult","prevScrollY","createRef","swipeUp","swipeDown","courseList","value","decodeURIComponent","getParam","searchHistory","JSON","parse","localStorage","getItem","fixedHeader","searchHeadStyle","top","swipeDirection","getCourses","word","course","handleClick","handleSearch","handleChange","handleScroll","throttle","y","window","scrollY","headY","current","offsetTop","position","document","addEventListener","removeEventListener","style","Info","course_title","simpledescription","search_result_Bottom","status","VList","image_name","course_id","search_recommendation","PureComponent","SearchHead","isFocus","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__","changeFontColor","refs","focus","cls","classnames","submit-btn--active","react__WEBPACK_IMPORTED_MODULE_8___default","onClick","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","showCancelButton","cancelText","onChange","placeholder","onFocus","onBlur","onSubmit"],"mappings":"sSAUMA,SADLC,2NAGGC,MAAQ,CACJC,QAAS,MAsBbC,eAAiB,SAACC,GAAO,IAAAC,EACSC,EAAKC,MADdF,EACbG,SADaH,EACHI,QAENC,KAAR,cAAAC,OAA2BP,wFAtBf,IAAAQ,EAAAC,KAChBC,IAAKC,IAAL,GAAAJ,OAAYK,IAAI,cAAhB,qBACKC,KAAK,SAAAC,GACqB,IAAnBA,EAAIC,KAAKC,MACTR,EAAKS,SAAS,CACVnB,QAASgB,EAAIC,KAAKA,KAAKG,KAAKpB,UAGhCqB,EAAAC,EAAMF,KAAKJ,EAAIC,KAAKM,wCAkB3B,IAAAC,EAAAb,KACEX,EAAWW,KAAKZ,MAAhBC,QACP,OACIyB,EAAAH,EAAAI,cAAA,OAAKC,UAAU,kBACXF,EAAAH,EAAAI,cAAA,OAAKC,UAAU,SAAf,4BACAF,EAAAH,EAAAI,cAAA,OAAKC,UAAU,WAEP3B,EAAQ4B,OAAS,GACjB5B,EAAQ6B,IAAI,SAACC,GACT,IAAMC,EACFN,EAAAH,EAAAI,cAAA,OAAKC,UAAU,UACXF,EAAAH,EAAAI,cAAA,QAAMC,UAAU,SAASG,EAAI,QAC7BL,EAAAH,EAAAI,cAAA,QAAMC,UAAU,aAAaG,EAAI,SAGzC,OACIL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AAc,CAACC,qBAAsBd,IAC5D,OACIe,EAAA5F,EAAAI,cAAA,OAAKC,UAAU,cAAc4D,MAAO5E,KAAKN,MAAMkF,MAAO5C,IAAKhC,KAAKN,MAAM0C,cAElEmE,EAAA5F,EAAAI,cAAA,OAAKC,UAAU,OAAOwF,QAASxG,KAAKyF,YAChCc,EAAA5F,EAAAI,cAAA,KAAGC,UAAU,+BAGjBuF,EAAA5F,EAAAI,cAAA,OAAKC,UAAU,UACXuF,EAAA5F,EAAAI,cAAA0F,EAAA9F,EAAA,CACImC,MAAO9C,KAAKN,MAAMoD,MAClB4D,kBAAgB,EAChBC,WAAY,IACZ3E,IAAI,SACJmE,OAAO,EACPS,SAAU5G,KAAKN,MAAMqE,aACrB8C,YAAY,2BACZC,QAAS,kBAAM/G,EAAKkG,iBAAgB,IACpCc,OAAQ,kBAAMhH,EAAKkG,iBAAgB,IACnCe,SAAWhH,KAAK2F,UAGxBY,EAAA5F,EAAAI,cAAA,OAAKC,UAAU,kBAAkBwF,QAASxG,KAAK2F,QAC3CY,EAAA5F,EAAAI,cAAA,OAAKC,UAAWoF,GAAhB,yBAvDKd,kBA+DV1D,gBAAW2D","file":"mrstatic/js/SearchResult.0c0c9343.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 SearchHeader from './searchHead'\nimport VList from '@/common/VList'\nimport { http, getParam } from '@/utils'\nimport './search-result.scss'\nimport Recommendation from './recommendation'\nimport throttle from 'lodash/throttle'\n\n\nconst ForwardRefSearchHead = React.forwardRef((props, ref) => {\n return <SearchHeader {...props} forwardedRef={ref}/>\n})\n\nconst Bottom = ({item}) => {\n return (\n <div className='bottom'>\n <span className='price'>¥{item.price1}</span>\n <span className='stale-price'>¥{item.price0}</span>\n </div>\n )\n}\n\nclass SearchResult extends PureComponent {\n prevScrollY = 0\n searchHead = React.createRef()\n swipeUp = 'up'\n swipeDown = 'down'\n\n state = {\n courseList: [],\n value: decodeURIComponent(getParam('word')) || '',\n searchHistory: JSON.parse(localStorage.getItem('searchHistory')) || [],\n fixedHeader: false,\n searchHeadStyle: {top: 0},\n swipeDirection: this.swipeUp\n }\n\n componentDidMount() {\n this.getCourses(getParam('word'))\n document.addEventListener('scroll', this.handleScroll)\n }\n\n componentWillUnmount() {\n document.removeEventListener('scroll', this.handleScroll)\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 {history} = this.props;\n history.push(`/detail?id=${id}`)\n }\n\n handleScroll = throttle(() => {\n let y = window.scrollY, headY = this.searchHead.current.offsetTop\n if (y < this.prevScrollY) {\n\n if (this.state.swipeDirection === this.swipeDown) {\n\n y <= headY && this.state.searchHeadStyle.position !== 'fixed' && this.setState({\n searchHeadStyle: {\n top: `0`,\n position: 'fixed'\n }\n })\n\n } else {\n this.setState({\n swipeDirection: this.swipeDown\n }, () => {\n if (this.state.swipeDirection === this.swipeDown) {\n this.setState({\n searchHeadStyle: {\n top: `${y > headY ? y - 44 : y}px`\n }\n })\n }\n })\n }\n\n\n } else {\n this.state.swipeDirection !== this.swipeUp &&\n this.setState({\n swipeDirection: this.swipeUp,\n searchHeadStyle: {\n position: 'absolute',\n top: `${y}px`\n }\n })\n\n }\n this.prevScrollY = y\n }, 0)\n\n render() {\n const {courseList} = this.state\n\n return (\n <div\n className={'search-result'}>\n <ForwardRefSearchHead\n handleSearch={this.handleSearch}\n value={this.state.value}\n handleChange={this.handleChange}\n searchHistory={this.state.searchHistory}\n style={this.state.searchHeadStyle}\n ref={this.searchHead}\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\n </div>\n );\n }\n}\n\n\nexport default SearchResult;","import React, { PureComponent } from 'react'\nimport { SearchBar } from 'antd-mobile'\nimport { withRouter } from 'react-router-dom'\nimport classnames from 'classnames';\n\nimport './search_header.scss'\n\nclass SearchHead extends PureComponent {\n \n state = {\n isFocus: false\n }\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 changeFontColor = (isFocus) => {\n this.setState({\n isFocus\n });\n }\n\n render() {\n const { isFocus } = this.state;\n const cls = classnames('submit-btn', {'submit-btn--active': isFocus})\n return (\n <div className=\"search-head\" style={this.props.style} ref={this.props.forwardedRef}>\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 onFocus={() => this.changeFontColor(true)}\n onBlur={() => this.changeFontColor(false)}\n onSubmit={ this.search }\n />\n </div>\n <div className=\"right right-btn\" onClick={this.search}>\n <div className={cls}>搜索</div>\n </div>\n </div>\n\n )\n }\n}\n\nexport default withRouter(SearchHead)"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{1193:function(e,t,a){"use strict";a.r(t);a(735);var c=a(736),n=a.n(c),r=a(18),s=(a(44),a(14)),i=a.n(s),o=a(5),l=a(7),u=a(6),d=a(8),h=a(9),m=(a(253),a(93)),p=a.n(m),f=a(0),v=a.n(f),k=a(21),g=a(30),E=a(63),b=a(16),N=a(159),C=function(e){function t(e){var a;return Object(o.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).state={val:e.item.value},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"onChange",value:function(e,t){var a=e.target.checked;this.props.checkChange(t,a)}},{key:"render",value:function(){var e=this,t=this.props.item,a=v.a.createElement("div",{className:"order-info"},v.a.createElement("p",{className:"order-title text-overflow-one",onClick:function(){return e.props.toDetail(t.course_id)}},t.course_title),v.a.createElement("p",{className:"order-content text-overflow-2"},t.simpledescription),v.a.createElement("p",{className:"order-des"},v.a.createElement("span",{className:"order-newprice"},"\xa5",t.price1),v.a.createElement("span",{className:"order-price"},"\xa5",t.price0)));return v.a.createElement("div",{className:"cart-c-item"},v.a.createElement("div",{className:"cart-c-check"},v.a.createElement(n.a,{checked:t.check,onChange:function(a){e.onChange(a,t.course_id)}})),v.a.createElement("div",{className:"card-wrap"},v.a.createElement(N.a,{info:a,src:t.image_name,id:t.course_id,toDetail:this.props.toDetail})))}}]),t}(f.Component),j=function(e){function t(){return Object(o.a)(this,t),Object(u.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-main"},v.a.createElement("div",{className:"cart-c-body"},this.props.data.length>0?this.props.data.map(function(t,a){return v.a.createElement(C,{index:a,changeStock:function(t,a){e.props.changeStock(t,a)},checkChange:function(t,a){e.props.checkChange(t,a)},key:a,item:t,toDetail:e.props.toDetail})}):v.a.createElement("div",{className:"cart-tip"},v.a.createElement("p",{className:"cart-mess"},"\u8fd9\u91cc\u662f\u7a7a\u7684\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),v.a.createElement(b.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(f.Component),y=(a(903),a(15)),O=a.n(y),w=a(3),I=(a(74),p.a.alert),S=function(e){function t(e){var a;return Object(o.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).getList=function(){w.d.get("".concat(API.home,"/m/cart/list")).then(function(e){200===e.data.code?a.setState({data:e.data.data.courses,isLoading:!1}):i.a.info(e.data.msg,2)})},a.tobuy=function(){w.d.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}):i.a.info(e.data.msg,2)})},a.todelete=function(){a.state.courseIdarr.length>0&&I("","\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};w.d.post("".concat(API.home,"/m/cart/remove"),e).then(function(e){200===e.data.code?(a.getList(),a.setState({checkedNum:0,allPrice:0})):i.a.info(e.data.msg,2)})}}])},a.toCourseDetail=function(e){var t=a.props;t.dispatch;t.history.push("/detail?id=".concat(e))},a.state={data:[],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(g.e,{title:"\u8d2d\u7269\u8f66",arrow:!0,cart:!1,delete:!0,toDelete:this.todelete}),v.a.createElement(E.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"cart-body"},v.a.createElement(j,{checkChange:this.checkChange.bind(this),data:this.state.data,toDetail:this.toCourseDetail}),v.a.createElement("div",{className:"cart-footer"},v.a.createElement("div",{className:"cart-label"},v.a.createElement(n.a,{onChange:function(t){e.allChange(t)}}),v.a.createElement("div",null,"\u5168\u9009")),v.a.createElement("div",{className:"all-pirce"},v.a.createElement("p",null,v.a.createElement("span",null,"\u5408\u8ba1\uff1a"),v.a.createElement("span",null,"\uffe5",this.state.allPrice))),v.a.createElement("div",{className:O()({active:this.state.checkedNum>0}),onClick:function(){e.state.checkedNum>0&&e.tobuy()}},"\u7ed3\u7b97",v.a.createElement("span",null," ( ",this.state.checkedNum," ) "))))))}}]),t}(f.Component);t.default=Object(k.b)()(S)},903:function(e,t,a){}}]);
//# sourceMappingURL=ShopCart.023ad36a.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{1193:function(e,t,a){"use strict";a.r(t);a(735);var c=a(736),n=a.n(c),r=a(18),s=(a(44),a(14)),i=a.n(s),o=a(5),l=a(7),u=a(6),d=a(8),h=a(9),m=(a(253),a(93)),p=a.n(m),f=a(0),v=a.n(f),k=a(21),g=a(30),E=a(63),b=a(17),N=a(159),C=function(e){function t(e){var a;return Object(o.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).state={val:e.item.value},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"onChange",value:function(e,t){var a=e.target.checked;this.props.checkChange(t,a)}},{key:"render",value:function(){var e=this,t=this.props.item,a=v.a.createElement("div",{className:"order-info"},v.a.createElement("p",{className:"order-title text-overflow-one",onClick:function(){return e.props.toDetail(t.course_id)}},t.course_title),v.a.createElement("p",{className:"order-content text-overflow-2"},t.simpledescription),v.a.createElement("p",{className:"order-des"},v.a.createElement("span",{className:"order-newprice"},"\xa5",t.price1),v.a.createElement("span",{className:"order-price"},"\xa5",t.price0)));return v.a.createElement("div",{className:"cart-c-item"},v.a.createElement("div",{className:"cart-c-check"},v.a.createElement(n.a,{checked:t.check,onChange:function(a){e.onChange(a,t.course_id)}})),v.a.createElement("div",{className:"card-wrap"},v.a.createElement(N.a,{info:a,src:t.image_name,id:t.course_id,toDetail:this.props.toDetail})))}}]),t}(f.Component),j=function(e){function t(){return Object(o.a)(this,t),Object(u.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-main"},v.a.createElement("div",{className:"cart-c-body"},this.props.data.length>0?this.props.data.map(function(t,a){return v.a.createElement(C,{index:a,changeStock:function(t,a){e.props.changeStock(t,a)},checkChange:function(t,a){e.props.checkChange(t,a)},key:a,item:t,toDetail:e.props.toDetail})}):v.a.createElement("div",{className:"cart-tip"},v.a.createElement("p",{className:"cart-mess"},"\u8fd9\u91cc\u662f\u7a7a\u7684\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),v.a.createElement(b.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(f.Component),y=(a(903),a(15)),O=a.n(y),w=a(3),I=(a(74),p.a.alert),S=function(e){function t(e){var a;return Object(o.a)(this,t),(a=Object(u.a)(this,Object(d.a)(t).call(this,e))).getList=function(){w.d.get("".concat(API.home,"/m/cart/list")).then(function(e){200===e.data.code?a.setState({data:e.data.data.courses,isLoading:!1}):i.a.info(e.data.msg,2)})},a.tobuy=function(){w.d.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}):i.a.info(e.data.msg,2)})},a.todelete=function(){a.state.courseIdarr.length>0&&I("","\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};w.d.post("".concat(API.home,"/m/cart/remove"),e).then(function(e){200===e.data.code?(a.getList(),a.setState({checkedNum:0,allPrice:0})):i.a.info(e.data.msg,2)})}}])},a.toCourseDetail=function(e){var t=a.props;t.dispatch;t.history.push("/detail?id=".concat(e))},a.state={data:[],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(g.e,{title:"\u8d2d\u7269\u8f66",arrow:!0,cart:!1,delete:!0,toDelete:this.todelete}),v.a.createElement(E.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"cart-body"},v.a.createElement(j,{checkChange:this.checkChange.bind(this),data:this.state.data,toDetail:this.toCourseDetail}),v.a.createElement("div",{className:"cart-footer"},v.a.createElement("div",{className:"cart-label"},v.a.createElement(n.a,{onChange:function(t){e.allChange(t)}}),v.a.createElement("div",null,"\u5168\u9009")),v.a.createElement("div",{className:"all-pirce"},v.a.createElement("p",null,v.a.createElement("span",null,"\u5408\u8ba1\uff1a"),v.a.createElement("span",null,"\uffe5",this.state.allPrice))),v.a.createElement("div",{className:O()({active:this.state.checkedNum>0}),onClick:function(){e.state.checkedNum>0&&e.tobuy()}},"\u7ed3\u7b97",v.a.createElement("span",null," ( ",this.state.checkedNum," ) "))))))}}]),t}(f.Component);t.default=Object(k.b)()(S)},903:function(e,t,a){}}]);
//# sourceMappingURL=ShopCart.4c2987b1.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","courseIdarr","errno","history","push","simple","todelete","text","onPress","console","log","course_ids","post","checkedNum","allPrice","toCourseDetail","_this$props","dispatch","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":"uRA0DeA,cAlDX,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KACDQ,MAAQ,CACTC,IAAKT,EAAMU,KAAKC,OAHLV,wEAOVW,EAAGC,GACR,IAAIC,EAAUF,EAAEG,OAAOD,QACvBV,KAAKJ,MAAMgB,YAAYH,EAAIC,oCAGtB,IAAAG,EAAAb,KACDM,EAAON,KAAKJ,MAAMU,KAChBQ,EACFC,EAAAC,EAAAC,cAAA,OAAKC,UAA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OM9C,EAAAC,EAAAC,cAAA,kBAAUjB,KAAKI,MAAMsE,WAArB,mBAxMfzC,aAqNJqE,wBAAUxD","file":"mrstatic/js/ShopCart.023ad36a.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 this.setState({\n checkedNum: 0,\n allPrice:0\n })\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","courseIdarr","errno","history","push","simple","todelete","text","onPress","console","log","course_ids","post","checkedNum","allPrice","toCourseDetail","_this$props","dispatch","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":"uRA0DeA,cAlDX,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KACDQ,MAAQ,CACTC,IAAKT,EAAMU,KAAKC,OAHLV,wEAOVW,EAAGC,GACR,IAAIC,EAAUF,EAAEG,OAAOD,QACvBV,KAAKJ,MAAMgB,YAAYH,EAAIC,oCAGtB,IAAAG,EAAAb,KACDM,EAAON,KAAKJ,MAAMU,KAChBQ,EACFC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,cACXH,EAAAC,EAAAC,cAAA,KAAGC,UAAU,gCAAgCC,QAAS,kBAAIN,EAAKjB,MAAMwB,SAASd,EAAKe,aAE9Ef,EAAKgB,cAGVP,EAAAC,EAAAC,cAAA,KAAGC,UAAU,iCAAiCZ,EA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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 this.setState({\n checkedNum: 0,\n allPrice:0\n })\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([[13],{1167:function(e,a,t){},1188:function(e,a,t){"use strict";t.r(a);var s=t(5),c=t(7),n=t(6),r=t(8),l=t(9),i=t(0),m=t.n(i),o=(t(1167),t(160)),d=t(3),u=(t(147),t(16)),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.d.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.i)({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.78a5ac9c.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{1167:function(e,a,t){},1188:function(e,a,t){"use strict";t.r(a);var s=t(5),c=t(7),n=t(6),r=t(8),l=t(9),i=t(0),m=t.n(i),o=(t(1167),t(160)),d=t(3),u=(t(147),t(17)),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.d.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.i)({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.ca8ee328.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":"4NAOMA,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,OAA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AU,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":"mrstatic/js/aist-share.78a5ac9c.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":"4NAOMA,6MACF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rstatic/js/aist-share.ca8ee328.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
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{1190:function(e,t,a){"use strict";a.r(t);var n=a(18),c=a(5),o=a(7),s=a(6),i=a(8),l=a(9),u=a(0),r=a.n(u),p=a(17),m=a(48),d=a(24),h=(a(44),a(14)),v=a.n(h),f=a(77),E=(a(779),a(780),a(781),a(15)),b=a.n(E),y=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(s.a)(this,Object(i.a)(t).call(this,e))).clearInput=function(){a.props.onChange("")},a.state={isFocus:!1},a}return Object(l.a)(t,e),Object(o.a)(t,[{key:"render",value:function(){var e=this,t=this.props,a=t.type,n=t.placeholder,c=this.state.isFocus;return r.a.createElement("div",{className:"custom-input-wrapper"},r.a.createElement("input",{type:a,className:b()("custom-input",{"custom-input--active":c}),placeholder:n,onChange:this.props.onChange,value:this.props.value,onBlur:function(){e.setState({isFocus:!1})},onFocus:function(){e.setState({isFocus:!0})}}),r.a.createElement("i",{className:b()("iconfont icondanseshixintubiao-3",{hide:0===this.props.value.length}),onClick:this.clearInput}))}}]),t}(u.Component);y.defaultProps={type:"text",placeholder:""};var C,g=y,j=function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).state={},a}return Object(l.a)(t,e),Object(o.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onChange,a=e.redeemCode,n=e.exchange;return r.a.createElement("div",{className:"exchange-bar"},r.a.createElement(g,{placeholder:"\u8bf7\u8f93\u5165\u4f18\u60e0\u7801",onChange:t,value:a}),r.a.createElement("button",{className:b()({active:a&&a.length>0}),onClick:n},"\u5151\u6362"))}}]),t}(u.Component),O=(a(782),function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).pick=function(){var e=a.props,t=e.useCoupon;!e.invalid&&t&&t(a.props.id)},a.GoToUse=function(){a.props.useCoupon(a.props.id)},a}return Object(l.a)(t,e),Object(o.a)(t,[{key:"render",value:function(){var e=this.props,t=e.ctype,a=e.amount,n=e.format_expire_time,c=e.limit_course,o=e.invalid,s=e.course_title,i=e.id,l=e.selectedCouponId,u=e.showUseButton;return r.a.createElement("li",{className:"coupon",onClick:this.pick},r.a.createElement("div",{className:b()("coupon-info",o?"invalid":"coupon-type".concat(t))},r.a.createElement("p",{className:"type"},1===t?"\u4ee3\u91d1\u5238":"\u8bfe\u7a0b\u5238"),1===t?r.a.createElement("p",{className:"denomination"},a," ",r.a.createElement("span",null,"\u5143")):r.a.createElement("p",{className:"course-title"},s),r.a.createElement("p",{className:"expire"},"\u6709\u6548\u671f\u81f3\uff1a",n),l===i&&r.a.createElement("i",{className:b()("iconfont icondanseshixintubiao-5",{check:!o})}),r.a.createElement("ul",null,new Array(19).fill("a").map(function(e,t){return r.a.createElement("li",{key:t})}))),r.a.createElement("div",{className:"coupon-des"},r.a.createElement("span",{className:"limit"},0===c?"\u53ef\u7528\u4e8e\u5927\u4e8e\u4ee3\u91d1\u5238\u91d1\u989d\u7684\u8bfe\u7a0b":"\u4ec5\u9002\u7528\u4e8e\u300a".concat(s,"\u300b")),u&&r.a.createElement("button",{className:"use",onClick:this.GoToUse},"\u7acb\u5373\u4f7f\u7528")))}}]),t}(u.PureComponent)),N=a(3),k=a(64),I=a(38),_=a(21),A=Object(_.b)()(C=function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).state={selectedCouponId:0,redeemCode:"",couponList:[],valid_coupons:[],invalid_coupons:[],courseId:Object(N.c)("id"),showUseButton:!1},a.handleChange=function(e){var t=e?e.target.value:"";a.setState({redeemCode:t})},a.exchange=function(){var e=a.props.location.state,t=void 0===e?{}:e;""!==a.state.redeemCode?N.d.post("".concat(API.home,"/m/coupon/exchange"),{code:a.state.redeemCode}).then(function(e){var n=e.data;if(200===n.code){var c=n.data;if(a.state.showUseButton)a.setState({couponList:[].concat(Object(f.a)(a.state.couponList),[c]),redeemCode:""});else{var o=n.data;2==o.ctype&&o.limit_course!=a.state.courseId?a.setState({invalid_coupons:[].concat(Object(f.a)(a.state.invalid_coupons),[o]),showUseButton:null}):a.setState({valid_coupons:[].concat(Object(f.a)(a.state.valid_coupons),[o]),redeemCode:""})}v.a.info("\u5151\u6362\u6210\u529f"),"/my"===t.from&&a.getMyCoupons(),"/order"===t.from&&a.getAllCoupons()}else v.a.info(n.msg)}):v.a.info("\u8bf7\u8f93\u5165\u5151\u6362\u7801")},a.getMyCoupons=function(){N.d.get("".concat(API.home,"/m/coupon/all")).then(function(e){var t=e.data;200===t.code?a.setState({couponList:Object(I.isEmpty)(t.data)?[]:t.data}):v.a.info(t.msg)})},a.getAllCoupons=function(){N.d.post("".concat(API.home,"/m/coupon/select"),{course_id:a.state.courseId}).then(function(e){var t=e.data;if(200===t.code){var n=t.data.inuse_coupon;a.setState({valid_coupons:n?[].concat(Object(f.a)(n),Object(f.a)(t.data.valid_coupons)):t.data.valid_coupons,invalid_coupons:t.data.invalid_coupons,selectedCouponId:n.length?n[0].id:0})}else v.a.info(t.msg)})},a.useCoupon=function(e){var t=a.props,n=t.history,c=(t.dispatch,a.state.couponList.find(function(t){return t.id===e}));if(e)if(a.state.showUseButton){if(1!==c.ctype)return n.push("/detail?id=".concat(c.limit_course)),!1;n.push("/classify")}else{var o=a.state,s=o.courseId;o.selectedCouponId===e?N.d.post("".concat(API.home,"/m/coupon/cancel"),{course_id:s}).then(function(e){var t=e.data;200===t.code?a.setState({selectedCouponId:0}):v.a.info(t.msg)}):N.d.post("".concat(API.home,"/m/coupon/use"),{course_id:a.state.courseId,coupon_id:e}).then(function(t){var n=t&&t.data;200===n.code?(a.setState({selectedCouponId:e}),a.props.history.goBack()):v.a.info(n.msg)})}else v.a.info("\u672a\u77e5\u9519\u8bef"),location.reload()},a}return Object(l.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.history,a=e.location,n=this.props.location.state;n&&n.from&&("/my"===n.from?(this.getMyCoupons(),this.setState({showUseButton:!0})):(this.state.courseId||(a.state&&a.state.from?t.replace(a.state.from):t.goBack()),this.getAllCoupons()))}},{key:"render",value:function(){var e=this.props.location.state,t=this.state,a=t.showUseButton,n=t.selectedCouponId;return r.a.createElement("div",{className:"use-coupon"},r.a.createElement(j,{onChange:this.handleChange,exchange:this.exchange,redeemCode:this.state.redeemCode}),r.a.createElement("div",{className:"coupons-area"},r.a.createElement(w,{coupons:e&&e.from&&"/my"===e.from?this.state.couponList:this.state.valid_coupons,showUseButton:a,selectedCouponId:n,select:this.select,useCoupon:this.useCoupon}),this.state.invalid_coupons.length>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"invalid-title"},"- \u4e0d\u53ef\u4f7f\u7528\u7684\u4f18\u60e0\u5238 -"),r.a.createElement(w,{coupons:this.state.invalid_coupons,selectedCouponId:n,select:this.select,purpose:"use",invalid:"invalid"}))))}}]),t}(u.PureComponent))||C;function w(e){var t=e.coupons,a=Object(d.a)(e,["coupons"]);return 0===t.length?r.a.createElement("div",{className:"empty"},r.a.createElement("p",null,"\u6682\u65e0\u53ef\u4f7f\u7528\u7684\u4f18\u60e0\u5238")):r.a.createElement("ul",null,t.map(function(e){return r.a.createElement(O,Object.assign({key:e.id},e,{id:e.id},a))}))}var x=Object(k.a)(A),P=a(75),S=(a(783),a(30)),B=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(s.a)(this,Object(i.a)(t).call(this,e))).select=function(e,t){a.state.couponAmount>=t.amount&&a.setState({checkedIndex:e})},a.compound=function(){var e=Object(P.a)(Object(P.a)(a));a.state.couponAmount>=10&&N.d.post("".concat(API.home,"/sys/red_packet/compose"),{type:e.state.checkedIndex+1}).then(function(t){200===t.data.code?(e.setState({success:!0}),setTimeout(function(){e.getPatchList()},2e3)):v.a.info(t.data.msg,2)})},a.state={success:!1,checkedIndex:0,list:[{amount:10,desc:"\u5151\u6362\u540e7\u65e5\u5185\u6709\u6548",type:"\u4ee3\u91d1\u5238"},{amount:20,desc:"\u5151\u6362\u540e7\u65e5\u5185\u6709\u6548",type:"\u4ee3\u91d1\u5238"},{amount:50,desc:"\u5151\u6362\u540e7\u65e5\u5185\u6709\u6548",type:"\u4ee3\u91d1\u5238"},{amount:100,desc:"\u5151\u6362\u540e7\u65e5\u5185\u6709\u6548",type:"\u4ee3\u91d1\u5238"}],couponAmount:""},a}return Object(l.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){this.getPatchList()}},{key:"getPatchList",value:function(){var e=this;N.d.get("".concat(API.home,"/sys/red_packet/balance")).then(function(t){200===t.data.code?e.setState({couponAmount:t.data.data.coupon_amount,success:!1}):v.a.info(t.data.msg,2)})}},{key:"render",value:function(){return r.a.createElement("div",{className:"my-patch"},r.a.createElement("div",{className:"couponAmount"},"\u4ee3\u91d1\u5238\u788e\u7247\u4f59\u989d\uff1a",r.a.createElement("span",null,this.state.couponAmount,"\u5143")),r.a.createElement(U,{data:this.state.list,myAmount:this.state.couponAmount,select:this.select,checkedIndex:this.state.checkedIndex}),r.a.createElement("div",{className:"compound-button--compose"},r.a.createElement("button",{className:"compound ".concat(this.state.couponAmount>=10?"disable-active":"disable"),onClick:this.compound},"\u5408\u6210")),r.a.createElement("div",{className:"patch-desc"},r.a.createElement("p",{className:"title"},r.a.createElement("i",null),r.a.createElement("span",null,"\u4ee3\u91d1\u5238\u788e\u7247\u8bf4\u660e"),r.a.createElement("i",null)),r.a.createElement("p",{className:"desc-item"},"1. \u788e\u7247\u53ef\u901a\u8fc7\u201c\u5206\u4eab\u8bfe\u7a0b\u9886\u53d6\u7ea2\u5305\u201d\u83b7\u5f97\uff0c\u4e5f\u53ef\u901a\u8fc7\u7ebf\u4e0a\u6d3b\u52a8\u83b7\u5f97\uff0c\u5177\u4f53\u8bf7\u5173\u6ce8\u5b98\u7f51\u4fe1\u606f\uff1b"),r.a.createElement("p",{className:"desc-item"},"2. \u788e\u7247\u5728\u8d2d\u8bfe\u65f6\u4e0d\u80fd\u5355\u72ec\u4f7f\u7528\uff0c\u53ef\u5408\u6210\u5b8c\u6574\u4ee3\u91d1\u5238\u540e\u7528\u4ee3\u91d1\u5238\u62b5\u6263\u73b0\u91d1\uff1b"),r.a.createElement("p",{className:"desc-item"},"3. \u788e\u7247\u5408\u6210\u4ee3\u91d1\u5238\u540e7\u65e5\u5185\u6709\u6548\u3002")),this.state.success&&r.a.createElement("div",{className:"success"},"\u5151\u6362\u6210\u529f"))}}]),t}(u.PureComponent);function U(e){var t=e.data,a=e.myAmount,n=e.select,c=e.checkedIndex;return r.a.createElement("div",{className:"coupons"},t&&t.length>0&&t.map(function(e,t){return r.a.createElement("div",{className:"items-box",key:t,onClick:function(){return n(t,e)}},r.a.createElement("div",{className:"coupon-info ".concat(a>=e.amount?"active":null)},r.a.createElement("div",{className:"type"},e.type),r.a.createElement("div",{className:"amount"},r.a.createElement("span",null,e.amount),"\u5143"),a>=e.amount&&r.a.createElement("i",{className:"checkout ".concat(t===c?"iconfont icondanseshixintubiao-5":"nochecked")}),r.a.createElement("ul",null,new Array(19).fill("a").map(function(e,t){return r.a.createElement("li",{key:t})}))),r.a.createElement("div",{className:"coupon-des"},e.desc))}))}var L=Object(k.a)(B),F=(a(784),function(e){function t(){return Object(c.a)(this,t),Object(s.a)(this,Object(i.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(o.a)(t,[{key:"render",value:function(){var e=this.props,t=e.match,a=e.location;return r.a.createElement("div",{className:"coupons-box"},r.a.createElement(S.e,{title:"\u4f18\u60e0\u5238",arrow:!0}),r.a.createElement("section",{id:"coupons"},r.a.createElement("div",{className:"tab"},r.a.createElement("div",null,r.a.createElement(p.c,{to:{pathname:"".concat(t.url,"/my-coupon"),search:a.search,state:Object(n.a)({},this.props.location.state)},replace:!0,activeClassName:"tab-active"},"\u6211\u7684\u4f18\u60e0\u5238")),r.a.createElement("div",null,r.a.createElement(p.c,{to:{pathname:"".concat(t.url,"/my-patch"),search:a.search,state:Object(n.a)({},this.props.location.state)},replace:!0,activeClassName:"tab-active"},"\u788e\u7247\u5408\u6210"))),r.a.createElement("div",{className:"btm-border"}),r.a.createElement("div",{className:"coupons-container"},r.a.createElement(m.d,null,r.a.createElement(m.a,{exact:!0,from:"/coupons",to:{pathname:"coupons/my-coupon",search:a.search,state:{from:this.props.location.state&&this.props.location.state.from}}}),r.a.createElement(m.b,{path:"".concat(this.props.match.path,"/my-coupon"),component:x}),r.a.createElement(m.b,{path:"".concat(this.props.match.path,"/my-patch"),component:L})))))}}]),t}(u.Component));t.default=F},779:function(e,t,a){},780:function(e,t,a){},781:function(e,t,a){},782:function(e,t,a){},783:function(e,t,a){},784:function(e,t,a){}}]);
//# sourceMappingURL=coupons.60649292.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/coupons/Input/index.js","components/coupons/RedeemBar/index.js","components/coupons/Coupon/index.js","components/coupons/myCoupons/index.js","components/coupons/myPatch/index.js","components/coupons/index.js"],"names":["Input","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","clearInput","onChange","state","isFocus","_this2","_this$props","type","placeholder","react_default","a","createElement","className","classnames","custom-input--active","value","onBlur","setState","onFocus","hide","length","onClick","Component","defaultProps","RedeemBar","redeemCode","exchange","coupons_Input","active","Coupon","pick","useCoupon","invalid","id","GoToUse","_this$props2","ctype","amount","format_expire_time","limit_course","course_title","selectedCouponId","showUseButton","concat","check","Array","fill","map","item","index","key","PureComponent","UseCoupon","connect","couponList","valid_coupons","invalid_coupons","courseId","getParam","handleChange","e","target","_this$props$location$","location","http","post","API","home","code","then","res","data","coupon","toConsumableArray","toast_default","info","from","getMyCoupons","getAllCoupons","msg","get","isEmpty","course_id","inuse_coupon","val","history","dispatch","find","push","_this$state","coupon_id","goBack","reload","replace","_this$state2","coupons_RedeemBar","Content","coupons","select","Fragment","purpose","_ref","rest","objectWithoutProperties","coupons_Coupon","assign","WithFullSize","UsePatch","couponAmount","checkedIndex","compound","assertThisInitialized","success","setTimeout","getPatchList","list","desc","_this3","coupon_amount","myPatch_Coupon","myAmount","match","common","title","arrow","react_router_dom","to","pathname","url","search","objectSpread","activeClassName","react_router","exact","path","component","myCoupons","myPatch"],"mappings":"mQAKMA,cAEF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAMVQ,WAAa,WACTP,EAAKD,MAAMS,SAAS,KANpBR,EAAKS,MAAQ,CACTC,SAAS,GAHEV,wEAWV,IAAAW,EAAAR,KAAAS,EACqBT,KAAKJ,MAA1Bc,EADAD,EACAC,KAAMC,EADNF,EACME,YACHJ,EAAYP,KAAKM,MAAjBC,QACR,OACIK,EAAAC,EAAAC,cAAA,OAAKC,UAAU,wBACXH,EAAAC,EAAAC,cAAA,SACIJ,KAAMA,EACNK,UAAWC,IAAW,eAAe,CAACC,uBAAwBV,IAC9DI,YAAaA,EACbN,SAAUL,KAAKJ,MAAMS,SACrBa,MAAOlB,KAAKJ,MAAMsB,MA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C,EAAAC,cAAA,OAAKC,UAAU,OACXH,EAAAC,EAAAC,cAAA,WACIF,EAAAC,EAAAC,cAACkH,EAAA,EAAD,CAASC,GAAI,CACTC,SAAQ,GAAApF,OAAK8E,EAAMO,IAAX,cACRC,OAAQlE,EAASkE,OACjB9H,MAAMR,OAAAuI,EAAA,EAAAvI,CAAA,GAAKE,KAAKJ,MAAMsE,SAAS5D,QAE1B0F,SAAO,EACPsC,gBAAgB,cANzB,mCASJ1H,EAAAC,EAAAC,cAAA,WACIF,EAAAC,EAAAC,cAACkH,EAAA,EAAD,CAASC,GAAI,CACTC,SAAQ,GAAApF,OAAK8E,EAAMO,IAAX,aACRC,OAAQlE,EAASkE,OACjB9H,MAAMR,OAAAuI,EAAA,EAAAvI,CAAA,GAAKE,KAAKJ,MAAMsE,SAAS5D,QAE1B0F,SAAO,EACPsC,gBAAgB,cANzB,8BAUR1H,EAAAC,EAAAC,cAAA,OAAKC,UAAU,eAEfH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,qBACXH,EAAAC,EAAAC,cAACyH,EAAA,EAAD,KACI3H,EAAAC,EAAAC,cAACyH,EAAA,EAAD,CAAUC,OAAK,EAACzD,KAAK,WAAWkD,GAAI,CAChCC,SAAU,oBAAqBE,OAAQlE,EAASkE,OAAQ9H,MAAO,CAC3DyE,KAAM/E,KAAKJ,MAAMsE,SAAS5D,OAASN,KAAKJ,MAAMsE,SAAS5D,MAAMyE,SAGrEnE,EAAAC,EAAAC,cAACyH,EAAA,EAAD,CAAOE,KAAI,GAAA3F,OAAK9C,KAAKJ,MAAMgI,MAAMa,KAAtB,cAAwCC,UAAWC,IAC9D/H,EAAAC,EAAAC,cAACyH,EAAA,EAAD,CAAOE,KAAI,GAAA3F,OAAK9C,KAAKJ,MAAMgI,MAAMa,KAAtB,aAAuCC,UAAWE,eAvCnEnH,cAiDP2E","file":"mrstatic/js/coupons.60649292.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport './input.scss'\n\nimport classnames from 'classnames'\n\nclass Input extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isFocus: false\n }\n }\n\n clearInput = () => {\n this.props.onChange('')\n }\n\n render() {\n let {type, placeholder} = this.props\n const { isFocus } = this.state;\n return (\n <div className='custom-input-wrapper'>\n <input\n type={type}\n className={classnames('custom-input',{'custom-input--active': isFocus})}\n placeholder={placeholder}\n onChange={this.props.onChange}\n value={this.props.value}\n onBlur={() => {\n this.setState({\n isFocus: false\n })\n }}\n onFocus={() => {\n this.setState({\n isFocus: true\n })\n }}\n />\n <i\n className={classnames('iconfont icondanseshixintubiao-3', {\n hide: this.props.value.length === 0\n })}\n onClick={this.clearInput}\n />\n </div>\n );\n }\n}\n\n\nInput.defaultProps = {type: 'text', placeholder: ''}\n\nexport default Input;","import React, { Component } from 'react';\nimport './exchange-bar.scss'\nimport Input from '../Input'\nimport classnames from 'classnames'\n\nclass RedeemBar extends Component {\n state = {}\n\n render() {\n const {onChange, redeemCode, exchange} = this.props\n return (\n <div className=\"exchange-bar\">\n <Input\n placeholder={'请输入优惠码'}\n onChange={onChange}\n value={redeemCode}\n />\n <button className={classnames({\n active: redeemCode && redeemCode.length > 0\n })} onClick={exchange}>兑换\n </button>\n </div>\n );\n }\n}\n\nexport default RedeemBar;","import React, { PureComponent } from 'react'\nimport './coupon.scss'\nimport classnames from 'classnames'\n\nclass Coupon extends PureComponent {\n\n pick = () => {\n let {useCoupon, invalid} = this.props\n !invalid && useCoupon && useCoupon(this.props.id)\n }\n\n GoToUse = () => {\n this.props.useCoupon(this.props.id)\n }\n\n render() {\n let {\n ctype,\n amount,\n format_expire_time,\n limit_course,\n invalid,\n course_title,\n id,\n selectedCouponId,\n showUseButton\n } = this.props\n\n return (\n <li className='coupon' onClick={this.pick}>\n <div className={classnames('coupon-info', invalid ? 'invalid' : `coupon-type${ctype}`)}>\n <p className='type'>{ctype === 1 ? '代金券' : '课程券'}</p>\n {\n ctype === 1 ? <p className='denomination'>{amount} <span>元</span></p>\n : <p className='course-title'>{course_title}</p>\n\n }\n <p className='expire'>有效期至:{format_expire_time}</p>\n {\n selectedCouponId === id &&\n <i className={classnames('iconfont icondanseshixintubiao-5', {\n check: !invalid\n })}\n />\n }\n <ul>\n {\n new Array(19).fill('a').map((item, index) => {\n return <li key={index}/>\n })\n }\n </ul>\n </div>\n <div className=\"coupon-des\">\n <span className='limit'>{\n limit_course === 0 ? '可用于大于代金券金额的课程' : `仅适用于《${course_title}》`\n }</span>\n {\n showUseButton &&\n <button\n className='use'\n onClick={this.GoToUse}\n >立即使用\n </button>\n }\n\n </div>\n </li>\n );\n }\n}\n\nexport default Coupon","import React, { PureComponent } from 'react';\nimport './index.scss'\n\nimport RedeemBar from \"../RedeemBar\";\nimport Coupon from '../Coupon'\nimport { http, getParam } from '@/utils'\nimport { WithFullSize } from '@/HOCs'\nimport { Toast } from 'antd-mobile'\nimport { isEmpty } from 'lodash'\nimport { connect } from 'react-redux';\n\n@connect()\nclass UseCoupon extends PureComponent {\n\n state = {\n selectedCouponId: 0,\n redeemCode: '',\n couponList: [],\n valid_coupons: [],\n invalid_coupons: [],\n courseId: getParam('id'),\n showUseButton: false\n }\n\n componentDidMount() {\n\n const {history, location} = this.props\n\n const {state} = this.props.location\n if (state && state.from) {\n if (state.from === '/my') {\n this.getMyCoupons();\n this.setState({\n showUseButton: true\n })\n } else {\n if (!this.state.courseId) {\n location.state && location.state.from ? history.replace(location.state.from) : history.goBack()\n }\n this.getAllCoupons();\n }\n }\n }\n\n handleChange = e => {\n let value = e ? e.target.value : ''\n this.setState({redeemCode: value})\n }\n\n exchange = () => {\n const {location: {state = {}}} = this.props;\n if (this.state.redeemCode !== '') {\n http.post(`${API.home}/m/coupon/exchange`, {\n code: this.state.redeemCode\n })\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n const coupon = data.data\n\n if (this.state.showUseButton) {\n this.setState({\n couponList: [...this.state.couponList, coupon],\n redeemCode: ''\n })\n } else {\n\n const coupon = data.data\n\n if (coupon['ctype'] == 2\n && coupon['limit_course'] != this.state.courseId) {\n this.setState({\n invalid_coupons: [...this.state.invalid_coupons, coupon],\n showUseButton: null\n });\n } else {\n this.setState({\n valid_coupons: [...this.state.valid_coupons, coupon],\n redeemCode: ''\n })\n }\n\n }\n Toast.info('兑换成功')\n if (state.from === '/my') {\n this.getMyCoupons()\n }\n if (state.from === '/order') {\n this.getAllCoupons()\n }\n } else {\n Toast.info(data.msg)\n }\n })\n } else {\n Toast.info('请输入兑换码')\n }\n }\n\n getMyCoupons = () => {\n http.get(`${API.home}/m/coupon/all`)\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n this.setState({\n couponList: isEmpty(data.data) ? [] : data.data\n })\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n getAllCoupons = () => {\n http.post(`${API.home}/m/coupon/select`, {course_id: this.state.courseId})\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n const inuse_coupon = data.data['inuse_coupon'];\n\n\n this.setState({\n valid_coupons: inuse_coupon\n ? [...inuse_coupon, ...data.data.valid_coupons]\n : data.data.valid_coupons,\n invalid_coupons: data.data.invalid_coupons,\n selectedCouponId: inuse_coupon.length ? inuse_coupon[0].id : 0\n })\n\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n useCoupon = val => {\n const {history, dispatch} = this.props\n const coupon = this.state.couponList.find(item => item.id === val)\n\n if (val) {\n if (this.state.showUseButton) {\n\n if (coupon['ctype'] === 1) {\n history.push(`/classify`)\n } else {\n // dispatch(getCourses(coupon['limit_course'], () => {\n history.push(`/detail?id=${coupon['limit_course']}`);\n return false;\n // }));\n }\n\n } else {\n\n const {courseId, selectedCouponId} = this.state\n\n if (selectedCouponId === val) {\n\n\n http.post(`${API.home}/m/coupon/cancel`, {\n course_id: courseId\n }).then(res => {\n const data = res.data\n if (data.code === 200) {\n\n\n this.setState({\n selectedCouponId: 0\n })\n\n\n } else {\n Toast.info(data.msg)\n }\n })\n\n\n } else {\n http.post(`${API.home}/m/coupon/use`, {\n course_id: this.state.courseId,\n coupon_id: val\n })\n .then(res => {\n const data = res && res.data\n if (data.code === 200) {\n\n this.setState({selectedCouponId: val})\n this.props.history.goBack()\n\n\n } else {\n Toast.info(data.msg)\n }\n })\n\n }\n\n\n }\n\n } else {\n Toast.info('未知错误')\n location.reload()\n }\n\n }\n\n render() {\n const {state} = this.props.location\n const {showUseButton, selectedCouponId} = this.state\n return (\n <div className='use-coupon'>\n <RedeemBar onChange={this.handleChange}\n exchange={this.exchange}\n redeemCode={this.state.redeemCode}/>\n <div className=\"coupons-area\">\n <Content\n coupons={\n state\n && state.from\n && state.from === '/my'\n ? this.state.couponList\n : this.state.valid_coupons\n }\n showUseButton={showUseButton}\n selectedCouponId={selectedCouponId}\n select={this.select}\n useCoupon={this.useCoupon}\n />\n {\n this.state.invalid_coupons.length > 0 &&\n (\n <>\n <div className='invalid-title'>- 不可使用的优惠券 -</div>\n <Content\n coupons={this.state.invalid_coupons}\n selectedCouponId={selectedCouponId}\n select={this.select}\n purpose={'use'}\n invalid={'invalid'}\n />\n </>\n )\n }\n </div>\n </div>\n );\n }\n}\n\nfunction Content({coupons, ...rest}) {\n if (coupons.length === 0) {\n return (\n <div className='empty'>\n <p>暂无可使用的优惠券</p>\n </div>\n )\n }\n return (\n <ul>\n {\n coupons.map(item => {\n return (\n <Coupon\n key={item.id}\n {...item}\n id={item.id}\n {...rest}\n />\n )\n })\n }\n </ul>\n )\n}\n\nexport default WithFullSize(UseCoupon);","import React, {PureComponent} from 'react';\nimport './index.scss'\n\nimport {http, getParam} from '@/utils'\nimport {WithFullSize} from '@/HOCs'\nimport {Toast} from 'antd-mobile'\nimport {HeaderBar} from \"@/common\";\n\nclass UsePatch extends PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n success: false,\n checkedIndex: 0,\n list: [\n {\n amount: 10,\n desc: '兑换后7日内有效',\n type: '代金券'\n },\n {\n amount: 20,\n desc: '兑换后7日内有效',\n type: '代金券'\n },\n {\n amount: 50,\n desc: '兑换后7日内有效',\n type: '代金券'\n },\n {\n amount: 100,\n desc: '兑换后7日内有效',\n type: '代金券'\n }\n ],\n couponAmount: '', // 碎片额度\n };\n }\n\n componentDidMount() {\n this.getPatchList()\n }\n\n // 选中\n select = (index, item) => {\n if (this.state.couponAmount >= item.amount) {\n this.setState({\n checkedIndex: index\n })\n }\n }\n\n // 合成\n compound = () => {\n const _this = this\n if (this.state.couponAmount >= 10) {\n http.post(`${API.home}/sys/red_packet/compose`, {type: _this.state.checkedIndex + 1}).then((res) => {\n if (res.data.code === 200) {\n _this.setState({\n success: true\n })\n setTimeout(() => {\n _this.getPatchList()\n }, 2000)\n\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n\n getPatchList() {\n http.get(`${API.home}/sys/red_packet/balance`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n couponAmount: res.data.data.coupon_amount,\n success: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n render() {\n return (\n <div className='my-patch'>\n <div className={'couponAmount'}>\n 代金券碎片余额:<span>{this.state.couponAmount}元</span>\n </div>\n\n <Coupon data={this.state.list}\n myAmount={this.state.couponAmount}\n select={this.select}\n checkedIndex={this.state.checkedIndex}/>\n <div className=\"compound-button--compose\">\n <button\n className={`compound ${this.state.couponAmount >= 10 ? 'disable-active' : 'disable'}`}\n onClick={this.compound}>合成\n </button>\n </div>\n\n <div className=\"patch-desc\">\n <p className={'title'}><i></i><span>代金券碎片说明</span><i></i></p>\n <p className={'desc-item'}>1. 碎片可通过“分享课程领取红包”获得,也可通过线上活动获得,具体请关注官网信息;</p>\n <p className={'desc-item'}>2. 碎片在购课时不能单独使用,可合成完整代金券后用代金券抵扣现金;</p>\n <p className={'desc-item'}>3. 碎片合成代金券后7日内有效。</p>\n </div>\n \n {\n this.state.success &&\n <div className=\"success\">\n 兑换成功\n </div>\n }\n </div>\n );\n }\n}\n\nfunction Coupon(props) {\n const {data, myAmount, select, checkedIndex} = props\n return (\n <div className={'coupons'}>\n {\n data && data.length > 0 && data.map((item, index) => {\n return (\n <div className='items-box' key={index} onClick={() => select(index, item)}>\n <div className={`coupon-info ${myAmount >= item.amount ? 'active' : null}`}>\n <div className=\"type\">{item.type}</div>\n <div className={'amount'}><span>{item.amount}</span>元</div>\n\n {\n myAmount >= item.amount &&\n <i className={`checkout ${index === checkedIndex ? 'iconfont icondanseshixintubiao-5' : 'nochecked'}`}\n />\n }\n <ul>\n {\n new Array(19).fill('a').map((item, index) => {\n return <li key={index}/>\n })\n }\n </ul>\n </div>\n\n <div className={'coupon-des'}>\n {item.desc}\n </div>\n </div>\n )\n })\n }\n </div>\n )\n}\n\n\nexport default WithFullSize(UsePatch);","import React, { Component } from 'react'\nimport { NavLink, Route, Switch, Redirect } from \"react-router-dom\"\nimport myCoupons from \"./myCoupons\"\nimport myPatch from './myPatch'\nimport { HeaderBar } from \"@/common\";\nimport './coupons.scss'\n\n\nclass coupons extends Component {\n render() {\n const {match, location} = this.props;\n return (\n <div className={'coupons-box'}>\n <HeaderBar title='优惠券' arrow={true}/>\n <section id='coupons'>\n <div className='tab'>\n <div>\n <NavLink to={{\n pathname: `${match.url}/my-coupon`,\n search: location.search,\n state: {...this.props.location.state}\n }}\n replace\n activeClassName='tab-active'\n >我的优惠券</NavLink>\n </div>\n <div>\n <NavLink to={{\n pathname: `${match.url}/my-patch`,\n search: location.search,\n state: {...this.props.location.state}\n }}\n replace\n activeClassName='tab-active'\n >碎片合成</NavLink>\n </div>\n </div>\n <div className=\"btm-border\"></div>\n\n <div className=\"coupons-container\">\n <Switch>\n <Redirect exact from='/coupons' to={{\n pathname: 'coupons/my-coupon', search: location.search, state: {\n from: this.props.location.state && this.props.location.state.from\n }\n }}/>\n <Route path={`${this.props.match.path}/my-coupon`} component={myCoupons}/>\n <Route path={`${this.props.match.path}/my-patch`} component={myPatch}/>\n </Switch>\n </div>\n </section>\n </div>\n )\n }\n\n}\n\nexport default coupons;\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{1190:function(e,t,a){"use strict";a.r(t);var n=a(18),c=a(5),o=a(7),s=a(6),i=a(8),l=a(9),r=a(0),u=a.n(r),p=a(16),m=a(48),d=a(24),h=(a(44),a(14)),v=a.n(h),f=a(77),E=(a(779),a(780),a(781),a(15)),b=a.n(E),y=function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).clearInput=function(){a.props.onChange("")},a}return Object(l.a)(t,e),Object(o.a)(t,[{key:"render",value:function(){var e=this.props,t=e.type,a=e.placeholder;return u.a.createElement("div",{className:"custom-input-wrapper"},u.a.createElement("input",{type:t,className:b()("custom-input"),placeholder:a,onChange:this.props.onChange,value:this.props.value}),u.a.createElement("i",{className:b()("iconfont icondanseshixintubiao-3",{hide:0===this.props.value.length}),onClick:this.clearInput}))}}]),t}(r.Component);y.defaultProps={type:"text",placeholder:""};var C,g=y,j=function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).state={},a}return Object(l.a)(t,e),Object(o.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onChange,a=e.redeemCode,n=e.exchange;return u.a.createElement("div",{className:"exchange-bar"},u.a.createElement(g,{placeholder:"\u8bf7\u8f93\u5165\u4f18\u60e0\u7801",onChange:t,value:a}),u.a.createElement("button",{className:b()({active:a&&a.length>0}),onClick:n},"\u5151\u6362"))}}]),t}(r.Component),O=(a(782),function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).pick=function(){var e=a.props,t=e.useCoupon;!e.invalid&&t&&t(a.props.id)},a.GoToUse=function(){a.props.useCoupon(a.props.id)},a}return Object(l.a)(t,e),Object(o.a)(t,[{key:"render",value:function(){var e=this.props,t=e.ctype,a=e.amount,n=e.format_expire_time,c=e.limit_course,o=e.invalid,s=e.course_title,i=e.id,l=e.selectedCouponId,r=e.showUseButton;return u.a.createElement("li",{className:"coupon",onClick:this.pick},u.a.createElement("div",{className:b()("coupon-info",o?"invalid":"coupon-type".concat(t))},u.a.createElement("p",{className:"type"},1===t?"\u4ee3\u91d1\u5238":"\u8bfe\u7a0b\u5238"),1===t?u.a.createElement("p",{className:"denomination"},a," ",u.a.createElement("span",null,"\u5143")):u.a.createElement("p",{className:"course-title"},s),u.a.createElement("p",{className:"expire"},"\u6709\u6548\u671f\u81f3\uff1a",n),l===i&&u.a.createElement("i",{className:b()("iconfont icondanseshixintubiao-5",{check:!o})}),u.a.createElement("ul",null,new Array(19).fill("a").map(function(e,t){return u.a.createElement("li",{key:t})}))),u.a.createElement("div",{className:"coupon-des"},u.a.createElement("span",{className:"limit"},0===c?"\u53ef\u7528\u4e8e\u5927\u4e8e\u4ee3\u91d1\u5238\u91d1\u989d\u7684\u8bfe\u7a0b":"\u4ec5\u9002\u7528\u4e8e\u300a".concat(s,"\u300b")),r&&u.a.createElement("button",{className:"use",onClick:this.GoToUse},"\u7acb\u5373\u4f7f\u7528")))}}]),t}(r.PureComponent)),N=a(3),k=a(64),I=a(38),_=a(21),A=Object(_.b)()(C=function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).state={selectedCouponId:0,redeemCode:"",couponList:[],valid_coupons:[],invalid_coupons:[],courseId:Object(N.c)("id"),showUseButton:!1},a.handleChange=function(e){var t=e?e.target.value:"";a.setState({redeemCode:t})},a.exchange=function(){var e=a.props.location.state,t=void 0===e?{}:e;""!==a.state.redeemCode?N.d.post("".concat(API.home,"/m/coupon/exchange"),{code:a.state.redeemCode}).then(function(e){var n=e.data;if(200===n.code){var c=n.data;if(a.state.showUseButton)a.setState({couponList:[].concat(Object(f.a)(a.state.couponList),[c]),redeemCode:""});else{var o=n.data;2==o.ctype&&o.limit_course!=a.state.courseId?a.setState({invalid_coupons:[].concat(Object(f.a)(a.state.invalid_coupons),[o]),showUseButton:null}):a.setState({valid_coupons:[].concat(Object(f.a)(a.state.valid_coupons),[o]),redeemCode:""})}v.a.info("\u5151\u6362\u6210\u529f"),"/my"===t.from&&a.getMyCoupons(),"/order"===t.from&&a.getAllCoupons()}else v.a.info(n.msg)}):v.a.info("\u8bf7\u8f93\u5165\u5151\u6362\u7801")},a.getMyCoupons=function(){N.d.get("".concat(API.home,"/m/coupon/all")).then(function(e){var t=e.data;200===t.code?a.setState({couponList:Object(I.isEmpty)(t.data)?[]:t.data}):v.a.info(t.msg)})},a.getAllCoupons=function(){N.d.post("".concat(API.home,"/m/coupon/select"),{course_id:a.state.courseId}).then(function(e){var t=e.data;if(200===t.code){var n=t.data.inuse_coupon;a.setState({valid_coupons:n?[].concat(Object(f.a)(n),Object(f.a)(t.data.valid_coupons)):t.data.valid_coupons,invalid_coupons:t.data.invalid_coupons,selectedCouponId:n.length?n[0].id:0})}else v.a.info(t.msg)})},a.useCoupon=function(e){var t=a.props,n=t.history,c=(t.dispatch,a.state.couponList.find(function(t){return t.id===e}));if(e)if(a.state.showUseButton){if(1!==c.ctype)return n.push("/detail?id=".concat(c.limit_course)),!1;n.push("/classify")}else{var o=a.state,s=o.courseId;o.selectedCouponId===e?N.d.post("".concat(API.home,"/m/coupon/cancel"),{course_id:s}).then(function(e){var t=e.data;200===t.code?a.setState({selectedCouponId:0}):v.a.info(t.msg)}):N.d.post("".concat(API.home,"/m/coupon/use"),{course_id:a.state.courseId,coupon_id:e}).then(function(t){var n=t&&t.data;200===n.code?(a.setState({selectedCouponId:e}),a.props.history.goBack()):v.a.info(n.msg)})}else v.a.info("\u672a\u77e5\u9519\u8bef"),location.reload()},a}return Object(l.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.history,a=e.location,n=this.props.location.state;n&&n.from&&("/my"===n.from?(this.getMyCoupons(),this.setState({showUseButton:!0})):(this.state.courseId||(a.state&&a.state.from?t.replace(a.state.from):t.goBack()),this.getAllCoupons()))}},{key:"render",value:function(){var e=this.props.location.state,t=this.state,a=t.showUseButton,n=t.selectedCouponId;return u.a.createElement("div",{className:"use-coupon"},u.a.createElement(j,{onChange:this.handleChange,exchange:this.exchange,redeemCode:this.state.redeemCode}),u.a.createElement("div",{className:"coupons-area"},u.a.createElement(w,{coupons:e&&e.from&&"/my"===e.from?this.state.couponList:this.state.valid_coupons,showUseButton:a,selectedCouponId:n,select:this.select,useCoupon:this.useCoupon}),this.state.invalid_coupons.length>0&&u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{className:"invalid-title"},"- \u4e0d\u53ef\u4f7f\u7528\u7684\u4f18\u60e0\u5238 -"),u.a.createElement(w,{coupons:this.state.invalid_coupons,selectedCouponId:n,select:this.select,purpose:"use",invalid:"invalid"}))))}}]),t}(r.PureComponent))||C;function w(e){var t=e.coupons,a=Object(d.a)(e,["coupons"]);return 0===t.length?u.a.createElement("div",{className:"empty"},u.a.createElement("p",null,"\u6682\u65e0\u53ef\u4f7f\u7528\u7684\u4f18\u60e0\u5238")):u.a.createElement("ul",null,t.map(function(e){return u.a.createElement(O,Object.assign({key:e.id},e,{id:e.id},a))}))}var x=Object(k.a)(A),P=a(75),S=(a(783),a(30)),B=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(s.a)(this,Object(i.a)(t).call(this,e))).select=function(e,t){a.state.couponAmount>=t.amount&&a.setState({checkedIndex:e})},a.compound=function(){var e=Object(P.a)(Object(P.a)(a));a.state.couponAmount>=10&&N.d.post("".concat(API.home,"/sys/red_packet/compose"),{type:e.state.checkedIndex+1}).then(function(t){200===t.data.code?(e.setState({success:!0}),setTimeout(function(){e.getPatchList()},2e3)):v.a.info(t.data.msg,2)})},a.state={success:!1,checkedIndex:0,list:[{amount:10,desc:"\u5151\u6362\u540e7\u65e5\u5185\u6709\u6548",type:"\u4ee3\u91d1\u5238"},{amount:20,desc:"\u5151\u6362\u540e7\u65e5\u5185\u6709\u6548",type:"\u4ee3\u91d1\u5238"},{amount:50,desc:"\u5151\u6362\u540e7\u65e5\u5185\u6709\u6548",type:"\u4ee3\u91d1\u5238"},{amount:100,desc:"\u5151\u6362\u540e7\u65e5\u5185\u6709\u6548",type:"\u4ee3\u91d1\u5238"}],couponAmount:""},a}return Object(l.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){this.getPatchList()}},{key:"getPatchList",value:function(){var e=this;N.d.get("".concat(API.home,"/sys/red_packet/balance")).then(function(t){200===t.data.code?e.setState({couponAmount:t.data.data.coupon_amount,success:!1}):v.a.info(t.data.msg,2)})}},{key:"render",value:function(){return u.a.createElement("div",{className:"my-patch"},u.a.createElement("div",{className:"couponAmount"},"\u4ee3\u91d1\u5238\u788e\u7247\u4f59\u989d\uff1a",u.a.createElement("span",null,this.state.couponAmount,"\u5143")),u.a.createElement(U,{data:this.state.list,myAmount:this.state.couponAmount,select:this.select,checkedIndex:this.state.checkedIndex}),u.a.createElement("div",{className:"patch-desc"},u.a.createElement("p",{className:"title"},u.a.createElement("i",null),u.a.createElement("span",null,"\u4ee3\u91d1\u5238\u788e\u7247\u8bf4\u660e"),u.a.createElement("i",null)),u.a.createElement("p",{className:"desc-item"},"1. \u788e\u7247\u53ef\u901a\u8fc7\u201c\u5206\u4eab\u8bfe\u7a0b\u9886\u53d6\u7ea2\u5305\u201d\u83b7\u5f97\uff0c\u4e5f\u53ef\u901a\u8fc7\u7ebf\u4e0a\u6d3b\u52a8\u83b7\u5f97\uff0c\u5177\u4f53\u8bf7\u5173\u6ce8\u5b98\u7f51\u4fe1\u606f\uff1b"),u.a.createElement("p",{className:"desc-item"},"2. \u788e\u7247\u5728\u8d2d\u8bfe\u65f6\u4e0d\u80fd\u5355\u72ec\u4f7f\u7528\uff0c\u53ef\u5408\u6210\u5b8c\u6574\u4ee3\u91d1\u5238\u540e\u7528\u4ee3\u91d1\u5238\u62b5\u6263\u73b0\u91d1\uff1b"),u.a.createElement("p",{className:"desc-item"},"3. \u788e\u7247\u5408\u6210\u4ee3\u91d1\u5238\u540e7\u65e5\u5185\u6709\u6548\u3002")),u.a.createElement("button",{className:"compound ".concat(this.state.couponAmount>=10?"disable-active":"disable"),onClick:this.compound},"\u5408\u6210"),this.state.success&&u.a.createElement("div",{className:"success"},"\u5151\u6362\u6210\u529f"))}}]),t}(r.PureComponent);function U(e){var t=e.data,a=e.myAmount,n=e.select,c=e.checkedIndex;return u.a.createElement("div",{className:"coupons"},t&&t.length>0&&t.map(function(e,t){return u.a.createElement("div",{className:"items-box",key:t,onClick:function(){return n(t,e)}},u.a.createElement("div",{className:"coupon-info ".concat(a>=e.amount?"active":null)},u.a.createElement("div",{className:"type"},e.type),u.a.createElement("div",{className:"amount"},u.a.createElement("span",null,e.amount),"\u5143"),a>=e.amount&&u.a.createElement("i",{className:"checkout ".concat(t===c?"iconfont icondanseshixintubiao-5":"nochecked")}),u.a.createElement("ul",null,new Array(19).fill("a").map(function(e,t){return u.a.createElement("li",{key:t})}))),u.a.createElement("div",{className:"coupon-des"},e.desc))}))}var L=Object(k.a)(B),M=(a(784),function(e){function t(){return Object(c.a)(this,t),Object(s.a)(this,Object(i.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(o.a)(t,[{key:"render",value:function(){var e=this.props,t=e.match,a=e.location;return u.a.createElement("div",{className:"coupons-box"},u.a.createElement(S.e,{title:"\u4f18\u60e0\u5238",arrow:!0}),u.a.createElement("section",{id:"coupons"},u.a.createElement("div",{className:"tab"},u.a.createElement("div",null,u.a.createElement(p.c,{to:{pathname:"".concat(t.url,"/my-coupon"),search:a.search,state:Object(n.a)({},this.props.location.state)},replace:!0,activeClassName:"tab-active"},"\u6211\u7684\u4f18\u60e0\u5238")),u.a.createElement("div",null,u.a.createElement(p.c,{to:{pathname:"".concat(t.url,"/my-patch"),search:a.search,state:Object(n.a)({},this.props.location.state)},replace:!0,activeClassName:"tab-active"},"\u788e\u7247\u5408\u6210"))),u.a.createElement("div",{className:"btm-border"}),u.a.createElement("div",{className:"coupons-container"},u.a.createElement(m.d,null,u.a.createElement(m.a,{exact:!0,from:"/coupons",to:{pathname:"coupons/my-coupon",search:a.search,state:{from:this.props.location.state&&this.props.location.state.from}}}),u.a.createElement(m.b,{path:"".concat(this.props.match.path,"/my-coupon"),component:x}),u.a.createElement(m.b,{path:"".concat(this.props.match.path,"/my-patch"),component:L})))))}}]),t}(r.Component));t.default=M},779:function(e,t,a){},780:function(e,t,a){},781:function(e,t,a){},782:function(e,t,a){},783:function(e,t,a){},784:function(e,t,a){}}]);
//# sourceMappingURL=coupons.b214df27.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/coupons/Input/index.js","components/coupons/RedeemBar/index.js","components/coupons/Coupon/index.js","components/coupons/myCoupons/index.js","components/coupons/myPatch/index.js","components/coupons/index.js"],"names":["Input","clearInput","_this","props","onChange","_this$props","this","type","placeholder","react_default","a","createElement","className","classnames","value","hide","length","onClick","Component","defaultProps","RedeemBar","state","redeemCode","exchange","coupons_Input","active","Coupon","pick","useCoupon","invalid","id","GoToUse","_this$props2","ctype","amount","format_expire_time","limit_course","course_title","selectedCouponId","showUseButton","concat","check","Array","fill","map","item","index","key","PureComponent","UseCoupon","connect","couponList","valid_coupons","invalid_coupons","courseId","getParam","handleChange","e","target","setState","_this$props$location$","location","http","post","API","home","code","then","res","data","coupon","Object","toConsumableArray","toast_default","info","from","getMyCoupons","getAllCoupons","msg","get","isEmpty","course_id","inuse_coupon","val","history","dispatch","find","push","_this$state","coupon_id","goBack","reload","replace","_this$state2","coupons_RedeemBar","Content","coupons","select","Fragment","purpose","_ref","rest","objectWithoutProperties","coupons_Coupon","assign","WithFullSize","UsePatch","_this2","classCallCheck","possibleConstructorReturn","getPrototypeOf","call","couponAmount","checkedIndex","compound","assertThisInitialized","success","setTimeout","getPatchList","list","desc","_this3","coupon_amount","myPatch_Coupon","myAmount","match","common","title","arrow","react_router_dom","to","pathname","url","search","objectSpread","activeClassName","react_router","exact","path","component","myCoupons","myPatch"],"mappings":"mQAKMA,6MACFC,WAAa,WACTC,EAAKC,MAAMC,SAAS,6EAGf,IAAAC,EACqBC,KAAKH,MAA1BI,EADAF,EACAE,KAAMC,EADNH,EACMG,YACX,OACIC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,wBACXH,EAAAC,EAAAC,cAAA,SACIJ,KAAMA,EACNK,UAAWC,IAAW,gBACtBL,YAAaA,EACbJ,SAAUE,KAAKH,MAAMC,SACrBU,MAAOR,KAAKH,MAAMW,QAEtBL,EAAAC,EAAAC,cAAA,KACIC,UAAWC,IAAW,mCAAoC,CACtDE,KAAkC,IAA5BT,KAAKH,MAAMW,MAAME,SAE3BC,QAASX,KAAKL,qBApBdiB,aA4BpBlB,EAAMmB,aAAe,CAACZ,KAAM,OAAQC,YAAa,IAElCR,UCTAoB,6MApBXC,MAAQ,2EAEC,IAAAhB,EACoCC,KAAKH,MAAvCC,EADFC,EACED,SAAUkB,EADZjB,EACYiB,WAAYC,EADxBlB,EACwBkB,SAC7B,OACId,EAAAC,EAAAC,cAAA,OAAKC,UAAU,gBACXH,EAAAC,EAAAC,cAACa,EAAD,CACIhB,YAAa,uCACbJ,SAAUA,EACVU,MAAOQ,IAEXb,EAAAC,EAAAC,cAAA,UAAQC,UAAWC,IAAW,CAC1BY,OAAQH,GAAcA,EAAWN,OAAS,IAC1CC,QAASM,GAFb,wBAZQL,aCmETQ,qNAlEXC,KAAO,WAAM,IAAAtB,EACkBH,EAAKC,MAA3ByB,EADIvB,EACJuB,WADIvB,EACOwB,SACJD,GAAaA,EAAU1B,EAAKC,MAAM2B,OAGlDC,QAAU,WACN7B,EAAKC,MAAMyB,UAAU1B,EAAKC,MAAM2B,6EAG3B,IAAAE,EAWD1B,KAAKH,MATL8B,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AAD,CAAOE,KAAI,GAAAlG,OAAKlC,KAAKH,MAAM0H,MAAMa,KAAtB,cAAwCC,UAAWC,IAC9DnI,EAAAC,EAAAC,cAAC6H,EAAA,EAAD,CAAOE,KAAI,GAAAlG,OAAKlC,KAAKH,MAAM0H,MAAMa,KAAtB,aAAuCC,UAAWE,eAvCnE3H,cAiDP8E","file":"mrstatic/js/coupons.b214df27.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport './input.scss'\n\nimport classnames from 'classnames'\n\nclass Input extends Component {\n clearInput = () => {\n this.props.onChange('')\n }\n\n render() {\n let {type, placeholder} = this.props\n return (\n <div className='custom-input-wrapper'>\n <input\n type={type}\n className={classnames('custom-input')}\n placeholder={placeholder}\n onChange={this.props.onChange}\n value={this.props.value}\n />\n <i\n className={classnames('iconfont icondanseshixintubiao-3', {\n hide: this.props.value.length === 0\n })}\n onClick={this.clearInput}\n />\n </div>\n );\n }\n}\n\n\nInput.defaultProps = {type: 'text', placeholder: ''}\n\nexport default Input;","import React, { Component } from 'react';\nimport './exchange-bar.scss'\nimport Input from '../Input'\nimport classnames from 'classnames'\n\nclass RedeemBar extends Component {\n state = {}\n\n render() {\n const {onChange, redeemCode, exchange} = this.props\n return (\n <div className=\"exchange-bar\">\n <Input\n placeholder={'请输入优惠码'}\n onChange={onChange}\n value={redeemCode}\n />\n <button className={classnames({\n active: redeemCode && redeemCode.length > 0\n })} onClick={exchange}>兑换\n </button>\n </div>\n );\n }\n}\n\nexport default RedeemBar;","import React, { PureComponent } from 'react'\nimport './coupon.scss'\nimport classnames from 'classnames'\n\nclass Coupon extends PureComponent {\n\n pick = () => {\n let {useCoupon, invalid} = this.props\n !invalid && useCoupon && useCoupon(this.props.id)\n }\n\n GoToUse = () => {\n this.props.useCoupon(this.props.id)\n }\n\n render() {\n let {\n ctype,\n amount,\n format_expire_time,\n limit_course,\n invalid,\n course_title,\n id,\n selectedCouponId,\n showUseButton\n } = this.props\n\n return (\n <li className='coupon' onClick={this.pick}>\n <div className={classnames('coupon-info', invalid ? 'invalid' : `coupon-type${ctype}`)}>\n <p className='type'>{ctype === 1 ? '代金券' : '课程券'}</p>\n {\n ctype === 1 ? <p className='denomination'>{amount} <span>元</span></p>\n : <p className='course-title'>{course_title}</p>\n\n }\n <p className='expire'>有效期至:{format_expire_time}</p>\n {\n selectedCouponId === id &&\n <i className={classnames('iconfont icondanseshixintubiao-5', {\n check: !invalid\n })}\n />\n }\n <ul>\n {\n new Array(19).fill('a').map((item, index) => {\n return <li key={index}/>\n })\n }\n </ul>\n </div>\n <div className=\"coupon-des\">\n <span className='limit'>{\n limit_course === 0 ? '可用于大于代金券金额的课程' : `仅适用于《${course_title}》`\n }</span>\n {\n showUseButton &&\n <button\n className='use'\n onClick={this.GoToUse}\n >立即使用\n </button>\n }\n\n </div>\n </li>\n );\n }\n}\n\nexport default Coupon","import React, { PureComponent } from 'react';\nimport './index.scss'\n\nimport RedeemBar from \"../RedeemBar\";\nimport Coupon from '../Coupon'\nimport { http, getParam } from '@/utils'\nimport { WithFullSize } from '@/HOCs'\nimport { Toast } from 'antd-mobile'\nimport { isEmpty } from 'lodash'\nimport { connect } from 'react-redux';\n\n@connect()\nclass UseCoupon extends PureComponent {\n\n state = {\n selectedCouponId: 0,\n redeemCode: '',\n couponList: [],\n valid_coupons: [],\n invalid_coupons: [],\n courseId: getParam('id'),\n showUseButton: false\n }\n\n componentDidMount() {\n\n const {history, location} = this.props\n\n const {state} = this.props.location\n if (state && state.from) {\n if (state.from === '/my') {\n this.getMyCoupons();\n this.setState({\n showUseButton: true\n })\n } else {\n if (!this.state.courseId) {\n location.state && location.state.from ? history.replace(location.state.from) : history.goBack()\n }\n this.getAllCoupons();\n }\n }\n }\n\n handleChange = e => {\n let value = e ? e.target.value : ''\n this.setState({redeemCode: value})\n }\n\n exchange = () => {\n const {location: {state = {}}} = this.props;\n if (this.state.redeemCode !== '') {\n http.post(`${API.home}/m/coupon/exchange`, {\n code: this.state.redeemCode\n })\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n const coupon = data.data\n\n if (this.state.showUseButton) {\n this.setState({\n couponList: [...this.state.couponList, coupon],\n redeemCode: ''\n })\n } else {\n\n const coupon = data.data\n\n if (coupon['ctype'] == 2\n && coupon['limit_course'] != this.state.courseId) {\n this.setState({\n invalid_coupons: [...this.state.invalid_coupons, coupon],\n showUseButton: null\n });\n } else {\n this.setState({\n valid_coupons: [...this.state.valid_coupons, coupon],\n redeemCode: ''\n })\n }\n\n }\n Toast.info('兑换成功')\n if (state.from === '/my') {\n this.getMyCoupons()\n }\n if (state.from === '/order') {\n this.getAllCoupons()\n }\n } else {\n Toast.info(data.msg)\n }\n })\n } else {\n Toast.info('请输入兑换码')\n }\n }\n\n getMyCoupons = () => {\n http.get(`${API.home}/m/coupon/all`)\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n this.setState({\n couponList: isEmpty(data.data) ? [] : data.data\n })\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n getAllCoupons = () => {\n http.post(`${API.home}/m/coupon/select`, {course_id: this.state.courseId})\n .then(res => {\n const data = res.data\n if (data.code === 200) {\n\n const inuse_coupon = data.data['inuse_coupon'];\n\n\n this.setState({\n valid_coupons: inuse_coupon\n ? [...inuse_coupon, ...data.data.valid_coupons]\n : data.data.valid_coupons,\n invalid_coupons: data.data.invalid_coupons,\n selectedCouponId: inuse_coupon.length ? inuse_coupon[0].id : 0\n })\n\n } else {\n Toast.info(data.msg)\n }\n })\n }\n\n useCoupon = val => {\n const {history, dispatch} = this.props\n const coupon = this.state.couponList.find(item => item.id === val)\n\n if (val) {\n if (this.state.showUseButton) {\n\n if (coupon['ctype'] === 1) {\n history.push(`/classify`)\n } else {\n // dispatch(getCourses(coupon['limit_course'], () => {\n history.push(`/detail?id=${coupon['limit_course']}`);\n return false;\n // }));\n }\n\n } else {\n\n const {courseId, selectedCouponId} = this.state\n\n if (selectedCouponId === val) {\n\n\n http.post(`${API.home}/m/coupon/cancel`, {\n course_id: courseId\n }).then(res => {\n const data = res.data\n if (data.code === 200) {\n\n\n this.setState({\n selectedCouponId: 0\n })\n\n\n } else {\n Toast.info(data.msg)\n }\n })\n\n\n } else {\n http.post(`${API.home}/m/coupon/use`, {\n course_id: this.state.courseId,\n coupon_id: val\n })\n .then(res => {\n const data = res && res.data\n if (data.code === 200) {\n\n this.setState({selectedCouponId: val})\n this.props.history.goBack()\n\n\n } else {\n Toast.info(data.msg)\n }\n })\n\n }\n\n\n }\n\n } else {\n Toast.info('未知错误')\n location.reload()\n }\n\n }\n\n render() {\n const {state} = this.props.location\n const {showUseButton, selectedCouponId} = this.state\n return (\n <div className='use-coupon'>\n <RedeemBar onChange={this.handleChange}\n exchange={this.exchange}\n redeemCode={this.state.redeemCode}/>\n <div className=\"coupons-area\">\n <Content\n coupons={\n state\n && state.from\n && state.from === '/my'\n ? this.state.couponList\n : this.state.valid_coupons\n }\n showUseButton={showUseButton}\n selectedCouponId={selectedCouponId}\n select={this.select}\n useCoupon={this.useCoupon}\n />\n {\n this.state.invalid_coupons.length > 0 &&\n (\n <>\n <div className='invalid-title'>- 不可使用的优惠券 -</div>\n <Content\n coupons={this.state.invalid_coupons}\n selectedCouponId={selectedCouponId}\n select={this.select}\n purpose={'use'}\n invalid={'invalid'}\n />\n </>\n )\n }\n </div>\n </div>\n );\n }\n}\n\nfunction Content({coupons, ...rest}) {\n if (coupons.length === 0) {\n return (\n <div className='empty'>\n <p>暂无可使用的优惠券</p>\n </div>\n )\n }\n return (\n <ul>\n {\n coupons.map(item => {\n return (\n <Coupon\n key={item.id}\n {...item}\n id={item.id}\n {...rest}\n />\n )\n })\n }\n </ul>\n )\n}\n\nexport default WithFullSize(UseCoupon);","import React, {PureComponent} from 'react';\nimport './index.scss'\n\nimport {http, getParam} from '@/utils'\nimport {WithFullSize} from '@/HOCs'\nimport {Toast} from 'antd-mobile'\nimport {HeaderBar} from \"@/common\";\n\nclass UsePatch extends PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n success: false,\n checkedIndex: 0,\n list: [\n {\n amount: 10,\n desc: '兑换后7日内有效',\n type: '代金券'\n },\n {\n amount: 20,\n desc: '兑换后7日内有效',\n type: '代金券'\n },\n {\n amount: 50,\n desc: '兑换后7日内有效',\n type: '代金券'\n },\n {\n amount: 100,\n desc: '兑换后7日内有效',\n type: '代金券'\n }\n ],\n couponAmount: '', // 碎片额度\n };\n }\n\n componentDidMount() {\n this.getPatchList()\n }\n\n // 选中\n select = (index, item) => {\n if (this.state.couponAmount >= item.amount) {\n this.setState({\n checkedIndex: index\n })\n }\n }\n\n // 合成\n compound = () => {\n const _this = this\n if (this.state.couponAmount >= 10) {\n http.post(`${API.home}/sys/red_packet/compose`, {type: _this.state.checkedIndex + 1}).then((res) => {\n if (res.data.code === 200) {\n _this.setState({\n success: true\n })\n setTimeout(() => {\n _this.getPatchList()\n }, 2000)\n\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n }\n\n getPatchList() {\n http.get(`${API.home}/sys/red_packet/balance`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n couponAmount: res.data.data.coupon_amount,\n success: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n render() {\n return (\n <div className='my-patch'>\n <div className={'couponAmount'}>\n 代金券碎片余额:<span>{this.state.couponAmount}元</span>\n </div>\n\n <Coupon data={this.state.list}\n myAmount={this.state.couponAmount}\n select={this.select}\n checkedIndex={this.state.checkedIndex}/>\n\n\n <div className=\"patch-desc\">\n <p className={'title'}><i></i><span>代金券碎片说明</span><i></i></p>\n <p className={'desc-item'}>1. 碎片可通过“分享课程领取红包”获得,也可通过线上活动获得,具体请关注官网信息;</p>\n <p className={'desc-item'}>2. 碎片在购课时不能单独使用,可合成完整代金券后用代金券抵扣现金;</p>\n <p className={'desc-item'}>3. 碎片合成代金券后7日内有效。</p>\n </div>\n <button\n className={`compound ${this.state.couponAmount >= 10 ? 'disable-active' : 'disable'}`}\n onClick={this.compound}>合成\n </button>\n {\n this.state.success &&\n <div className=\"success\">\n 兑换成功\n </div>\n }\n </div>\n );\n }\n}\n\nfunction Coupon(props) {\n const {data, myAmount, select, checkedIndex} = props\n return (\n <div className={'coupons'}>\n {\n data && data.length > 0 && data.map((item, index) => {\n return (\n <div className='items-box' key={index} onClick={() => select(index, item)}>\n <div className={`coupon-info ${myAmount >= item.amount ? 'active' : null}`}>\n <div className=\"type\">{item.type}</div>\n <div className={'amount'}><span>{item.amount}</span>元</div>\n\n {\n myAmount >= item.amount &&\n <i className={`checkout ${index === checkedIndex ? 'iconfont icondanseshixintubiao-5' : 'nochecked'}`}\n />\n }\n <ul>\n {\n new Array(19).fill('a').map((item, index) => {\n return <li key={index}/>\n })\n }\n </ul>\n </div>\n\n <div className={'coupon-des'}>\n {item.desc}\n </div>\n </div>\n )\n })\n }\n </div>\n )\n}\n\n\nexport default WithFullSize(UsePatch);","import React, { Component } from 'react'\nimport { NavLink, Route, Switch, Redirect } from \"react-router-dom\"\nimport myCoupons from \"./myCoupons\"\nimport myPatch from './myPatch'\nimport { HeaderBar } from \"@/common\";\nimport './coupons.scss'\n\n\nclass coupons extends Component {\n render() {\n const {match, location} = this.props;\n return (\n <div className={'coupons-box'}>\n <HeaderBar title='优惠券' arrow={true}/>\n <section id='coupons'>\n <div className='tab'>\n <div>\n <NavLink to={{\n pathname: `${match.url}/my-coupon`,\n search: location.search,\n state: {...this.props.location.state}\n }}\n replace\n activeClassName='tab-active'\n >我的优惠券</NavLink>\n </div>\n <div>\n <NavLink to={{\n pathname: `${match.url}/my-patch`,\n search: location.search,\n state: {...this.props.location.state}\n }}\n replace\n activeClassName='tab-active'\n >碎片合成</NavLink>\n </div>\n </div>\n <div className=\"btm-border\"></div>\n\n <div className=\"coupons-container\">\n <Switch>\n <Redirect exact from='/coupons' to={{\n pathname: 'coupons/my-coupon', search: location.search, state: {\n from: this.props.location.state && this.props.location.state.from\n }\n }}/>\n <Route path={`${this.props.match.path}/my-coupon`} component={myCoupons}/>\n <Route path={`${this.props.match.path}/my-patch`} component={myPatch}/>\n </Switch>\n </div>\n </section>\n </div>\n )\n }\n\n}\n\nexport default coupons;\n"],"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.
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1172:function(e,t,n){"use strict";n.r(t);n(44);var a,o=n(14),r=n.n(o),s=n(5),i=n(7),l=n(6),c=n(8),u=n(9),p=(n(253),n(93)),d=n.n(p),m=n(0),h=n.n(m),f=(n(889),n(30)),v=n(159),g=n(3),b=n(16),y=n(63),E=n(619),L=n.n(E),w=n(38),_=(n(74),n(21)),N=d.a.alert,P=Object(_.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.d.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){N("\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.d.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;t.dispatch;return t.history.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.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(O,{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 O(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.deposit_cut))),"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=P},619:function(e,t,n){e.exports=n(646)},646: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},889:function(e,t,n){}}]);
//# sourceMappingURL=myorders.2957b1c3.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1172:function(e,t,n){"use strict";n.r(t);n(44);var a,o=n(14),r=n.n(o),s=n(5),i=n(7),l=n(6),c=n(8),u=n(9),p=(n(253),n(93)),d=n.n(p),m=n(0),h=n.n(m),f=(n(889),n(30)),v=n(159),g=n(3),b=n(17),y=n(63),E=n(619),L=n.n(E),w=n(38),_=(n(74),n(21)),N=d.a.alert,P=Object(_.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.d.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){N("\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.d.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;t.dispatch;return t.history.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.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(O,{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 O(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.deposit_cut))),"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=P},619:function(e,t,n){e.exports=n(646)},646: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},889:function(e,t,n){}}]);
//# sourceMappingURL=myorders.b388a40d.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","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","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","pay_amount","deposit_cut","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":"wSAaMA,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,iB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,UAAAhE,EAAAG,QAAAmF,OACA5C,WAAA1C,EAAAG,QAAAiF,KACAzI,UAAAqD,EAAAG,QAAAiF,MAEAhF,EAAAmF,aAAA,CACAd,QAAA,MACAjI,SAAA,EACA4G,aAAA,EACA7G,UAAA,EACAmI,IAAA,KACAV,UAAA,IACArH,WAAA,EACA+E,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAO,gBAAA,MAEAtE,EAAAsB,QAAAC,EACAxB,EAAAC,UAAA","file":"mrstatic/js/myorders.2957b1c3.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.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.deposit_cut}</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","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","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","pay_amount","deposit_cut","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":"wSAaMA,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,IA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,EAAA,GAEA,QAAAC,KAAAa,EACA0E,EAAAC,QAAAxF,IAAA,GACArG,OAAA6G,UAAAiF,eAAAzL,KAAA6G,EAAAb,KACAD,EAAAC,GAAAa,EAAAb,IAGA,OAAAD,EA8PA2F,CAAAR,EAAA,0JAEAzL,EAAA6L,IAAA,SAAAK,GACApJ,EAAAkG,gBAAAkD,EAEAL,GACAA,EAAAK,IAIA,IAAAC,EAAA,CAAAR,GAUA,OARAhI,IACAoG,EACAlB,EAAAsD,EAAAC,QAAArC,GAAAoC,EAAAxJ,KAAAoH,GACS3J,KAAA4J,gBACTnB,EAAAsD,EAAAC,QAAAhM,KAAA4J,eAAAmC,EAAAxJ,KAAAvC,KAAA4J,iBAIA/C,EAAAK,QAAAtE,cAAA4I,EAAA5L,EAAAmM,OAIA5E,EArPA,GAwPAA,EAAA8E,UAAA,CACAV,SAAAxE,EAAAG,QAAA4E,KAAAI,WACAV,QAAAzE,EAAAG,QAAA4E,KACAvI,QAAAwD,EAAAG,QAAAiF,KACAhC,YAAApD,EAAAG,QAAAiF,KACA1D,UAAA1B,EAAAG,QAAAiF,KACAxC,OAAA5C,EAAAG,QAAA4E,KACAtI,SAAAuD,EAAAG,QAAAkF,KAAAF,WACA5I,UAAAyD,EAAAG,QAAAmF,OACAZ,IAAA1E,EAAAG,QAAAkF,KACAlC,gBAAAnD,EAAAG,QAAAkF,KACArB,UAAAhE,EAAAG,QAAAmF,OACA5C,WAAA1C,EAAAG,QAAAiF,KACAzI,UAAAqD,EAAAG,QAAAiF,MAEAhF,EAAAmF,aAAA,CACAd,QAAA,MACAjI,SAAA,EACA4G,aAAA,EACA7G,UAAA,EACAmI,IAAA,KACAV,UAAA,IACArH,WAAA,EACA+E,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAO,gBAAA,MAEAtE,EAAAsB,QAAAC,EACAxB,EAAAC,UAAA","file":"mrstatic/js/myorders.b388a40d.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.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.deposit_cut}</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([[18],{1173:function(e,t,a){"use strict";a.r(t);a(44);var s=a(14),i=a.n(s),n=a(5),c=a(7),r=a(6),o=a(8),l=a(9),d=a(0),u=a.n(d),m=(a(890),a(30)),p=a(3),f=a(16),h=a(21),v=(a(74),a(63)),E=function(e){function t(e){var a;return Object(n.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).getList=function(){p.d.get("".concat(API.home,"/m/my/courses")).then(function(e){200===e.data.code?a.setState({data:e.data.data,isLoading:!1}):i.a.info(e.data.msg,2)})},a.toCourseDetail=function(e){var t=a.props;t.dispatch;t.history.push("/detail?id=".concat(e))},a.state={data:[],isLoading:!0},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"render",value:function(){var e=this,t=this.props.user,a=t&&t.data&&t.data.uid;return u.a.createElement("div",{className:"purchased-box"},u.a.createElement(m.e,{arrow:!0,title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,toHref:"/my"}),u.a.createElement(v.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?u.a.createElement("div",{className:"purchased-body"},u.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=u.a.createElement("div",{className:"info"},u.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),u.a.createElement("p",{className:"contact text-overflow-2"},t.simpledescription),t.is_aist?u.a.createElement("div",{className:"des"},"\u52a9\u6559\u5fae\u4fe1\uff1a",t.assist_weixin):u.a.createElement("div",{className:"des"},"QQ\u7fa4\uff1a",t.course_qq)),i=t.is_aist&&u.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return u.a.createElement(m.j,{key:a,img:t.image_name,id:t.course_id,info:s,status:i,toDetail:e.toCourseDetail})})):u.a.createElement("div",{className:"cart-tip"},u.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),u.a.createElement(f.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(d.Component);t.default=Object(h.b)(function(e){return{user:e.user}},null)(E)},890:function(e,t,a){}}]);
//# sourceMappingURL=purchased.fd53e3b4.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{1173:function(e,t,a){"use strict";a.r(t);a(44);var s=a(14),i=a.n(s),n=a(5),c=a(7),r=a(6),o=a(8),l=a(9),d=a(0),u=a.n(d),m=(a(890),a(30)),p=a(3),f=a(17),h=a(21),v=(a(74),a(63)),E=function(e){function t(e){var a;return Object(n.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).getList=function(){p.d.get("".concat(API.home,"/m/my/courses")).then(function(e){200===e.data.code?a.setState({data:e.data.data,isLoading:!1}):i.a.info(e.data.msg,2)})},a.toCourseDetail=function(e){var t=a.props;t.dispatch;t.history.push("/detail?id=".concat(e))},a.state={data:[],isLoading:!0},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"render",value:function(){var e=this,t=this.props.user,a=t&&t.data&&t.data.uid;return u.a.createElement("div",{className:"purchased-box"},u.a.createElement(m.e,{arrow:!0,title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,toHref:"/my"}),u.a.createElement(v.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?u.a.createElement("div",{className:"purchased-body"},u.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=u.a.createElement("div",{className:"info"},u.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),u.a.createElement("p",{className:"contact text-overflow-2"},t.simpledescription),t.is_aist?u.a.createElement("div",{className:"des"},"\u52a9\u6559\u5fae\u4fe1\uff1a",t.assist_weixin):u.a.createElement("div",{className:"des"},"QQ\u7fa4\uff1a",t.course_qq)),i=t.is_aist&&u.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return u.a.createElement(m.j,{key:a,img:t.image_name,id:t.course_id,info:s,status:i,toDetail:e.toCourseDetail})})):u.a.createElement("div",{className:"cart-tip"},u.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),u.a.createElement(f.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(d.Component);t.default=Object(h.b)(function(e){return{user:e.user}},null)(E)},890:function(e,t,a){}}]);
//# sourceMappingURL=purchased.44208014.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","push","state","_this2","user","uid","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_9__","arrow","title","cart","toHref","_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":"yOAUMA,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,SA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UACT3B,KAAMyB,EACNQ,OAAQA,EACRI,SAAU5B,EAAKP,oBAMjCU,EAAAb,EAAAc,cAAA,OAAKC,UAAU,YACbF,EAAAb,EAAAc,cAAA,KAAGC,UAAU,aAAb,mFACAF,EAAAb,EAAAc,cAACyB,EAAA,EAAD,CAAMC,GAAG,aAAT,gCAjFRC,aA2FTC,sBACX,SAAAjC,GAAK,MAAK,CAACE,KAAMF,EAAME,OACvB,KAFW+B,CAGbhE","file":"mrstatic/js/purchased.fd53e3b4.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 arrow={true} title='已购课程' cart={false} toHref='/my' />\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","push","state","_this2","user","uid","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_9__","arrow","title","cart","toHref","_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":"yOAUMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA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EAAKM,mBAEzCN,EAAKO,QACClB,EAAAb,EAAAc,cAAA,OAAKC,UAAU,OAAf,iCAA2BS,EAAKQ,eAChCnB,EAAAb,EAAAc,cAAA,OAAKC,UAAU,OAAf,iBAA0BS,EAAKS,YAI3CC,EACFV,EAAKO,SAAWlB,EAAAb,EAAAc,cAAA,QAAMC,UAAU,UAAhB,gBAEpB,OACIF,EAAAb,EAAAc,cAACE,EAAA,EAAD,CACImB,IAAKV,EACLW,IAAKZ,EAAKa,WACVjC,GAAIoB,EAAKI,UACT3B,KAAMyB,EACNQ,OAAQA,EACRI,SAAU5B,EAAKP,oBAMjCU,EAAAb,EAAAc,cAAA,OAAKC,UAAU,YACbF,EAAAb,EAAAc,cAAA,KAAGC,UAAU,aAAb,mFACAF,EAAAb,EAAAc,cAACyB,EAAA,EAAD,CAAMC,GAAG,aAAT,gCAjFRC,aA2FTC,sBACX,SAAAjC,GAAK,MAAK,CAACE,KAAMF,EAAME,OACvB,KAFW+B,CAGbhE","file":"mrstatic/js/purchased.44208014.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 arrow={true} title='已购课程' cart={false} toHref='/my' />\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 a,n,d=r[0],f=r[1],i=r[2],u=0,l=[];u<d.length;u++)n=d[u],o[n]&&l.push(o[n][0]),o[n]=0;for(a in f)Object.prototype.hasOwnProperty.call(f,a)&&(e[a]=f[a]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,i||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],a=!0,n=1;n<t.length;n++){var f=t[n];0!==o[f]&&(a=!1)}a&&(c.splice(r--,1),e=d(d.s=t[0]))}return e}var a={},n={19:0},o={19:0},c=[];function d(r){if(a[r])return a[r].exports;var t=a[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,d),t.l=!0,t.exports}d.e=function(e){var r=[];n[e]?r.push(n[e]):0!==n[e]&&{1:1,2:1,3:1,4:1,5:1,7:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,17:1,18:1,20:1,21:1,22:1,23:1,24:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1}[e]&&r.push(n[e]=new Promise(function(r,t){for(var a="mrstatic/css/"+({1:"BargainMiddlePage",2:"Classify",3:"CourseList",4:"DrawDocument",5:"Examination",6:"MyEdit",7:"Order",8:"Orderinfo",9:"PayOrder",10:"Preferential",11:"SearchResult",12:"ShopCart",13:"aist-share",14:"coupons",15:"detail",17:"myorders",18:"purchased",20:"search",21:"shareposter",22:"study",23:"togroup",24:"video"}[e]||e)+"."+{0:"31d6cfe0",1:"718dff83",2:"f2f19957",3:"c0829f24",4:"2e7d81ca",5:"f2cc3163",6:"31d6cfe0",7:"8bb031ea",8:"31d6cfe0",9:"e5315535",10:"cda7a495",11:"2649d43f",12:"3a4dbb7a",13:"bef8c404",14:"4a456833",15:"4c28ce89",17:"3ae12dec",18:"1daf107b",20:"fab97849",21:"f09a5959",22:"5e9927d1",23:"49988cae",24:"b57a1aec",26:"31d6cfe0",27:"4c706a4e",28:"2471f477",29:"0bb224f2",30:"5ed15c7e",31:"ecbb6f9a",32:"278ad3b1",33:"03fe7b57"}[e]+".chunk.css",o=d.p+a,c=document.getElementsByTagName("link"),f=0;f<c.length;f++){var i=(s=c[f]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(i===a||i===o))return r()}var u=document.getElementsByTagName("style");for(f=0;f<u.length;f++){var s;if((i=(s=u[f]).getAttribute("data-href"))===a||i===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var a=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");c.request=a,delete n[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){n[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var a=new Promise(function(r,a){t=o[e]=[r,a]});r.push(t[2]=a);var c,f=document.createElement("script");f.charset="utf-8",f.timeout=120,d.nc&&f.setAttribute("nonce",d.nc),f.src=function(e){return d.p+"mrstatic/js/"+({1:"BargainMiddlePage",2:"Classify",3:"CourseList",4:"DrawDocument",5:"Examination",6:"MyEdit",7:"Order",8:"Orderinfo",9:"PayOrder",10:"Preferential",11:"SearchResult",12:"ShopCart",13:"aist-share",14:"coupons",15:"detail",17:"myorders",18:"purchased",20:"search",21:"shareposter",22:"study",23:"togroup",24:"video"}[e]||e)+"."+{0:"aef3cf26",1:"f63f8cf2",2:"994277e1",3:"ab1190ce",4:"7730f3de",5:"df98c5b3",6:"30ed911f",7:"96622df3",8:"eaea6ad9",9:"3f5285c6",10:"c92167d3",11:"a9940fff",12:"023ad36a",13:"78a5ac9c",14:"b214df27",15:"c4409a6e",17:"2957b1c3",18:"fd53e3b4",20:"0053fea0",21:"1e04a897",22:"2bd0e879",23:"3e165b5f",24:"0d7cb00a",26:"b2e8d558",27:"4948c8d6",28:"a684e5c7",29:"cddce484",30:"58628dcc",31:"66e2dea5",32:"0e3712aa",33:"9869dd21"}[e]+".chunk.js"}(e),c=function(r){f.onerror=f.onload=null,clearTimeout(i);var t=o[e];if(0!==t){if(t){var a=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+a+": "+n+")");c.type=a,c.request=n,t[1](c)}o[e]=void 0}};var i=setTimeout(function(){c({type:"timeout",target:f})},12e4);f.onerror=f.onload=c,document.head.appendChild(f)}return Promise.all(r)},d.m=e,d.c=a,d.d=function(e,r,t){d.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},d.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.t=function(e,r){if(1&r&&(e=d(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(d.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)d.d(t,a,function(r){return e[r]}.bind(null,a));return t},d.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(r,"a",r),r},d.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},d.p="/",d.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var u=0;u<f.length;u++)r(f[u]);var s=i;t()}([]);
//# sourceMappingURL=runtime~main.a19408db.js.map
\ No newline at end of file
!function(e){function r(r){for(var a,n,d=r[0],i=r[1],u=r[2],f=0,l=[];f<d.length;f++)n=d[f],o[n]&&l.push(o[n][0]),o[n]=0;for(a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a]);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],a=!0,n=1;n<t.length;n++){var i=t[n];0!==o[i]&&(a=!1)}a&&(c.splice(r--,1),e=d(d.s=t[0]))}return e}var a={},n={19:0},o={19:0},c=[];function d(r){if(a[r])return a[r].exports;var t=a[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,d),t.l=!0,t.exports}d.e=function(e){var r=[];n[e]?r.push(n[e]):0!==n[e]&&{1:1,2:1,3:1,4:1,5:1,7:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,17:1,18:1,20:1,21:1,22:1,23:1,24:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1}[e]&&r.push(n[e]=new Promise(function(r,t){for(var a="mrstatic/css/"+({1:"BargainMiddlePage",2:"Classify",3:"CourseList",4:"DrawDocument",5:"Examination",6:"MyEdit",7:"Order",8:"Orderinfo",9:"PayOrder",10:"Preferential",11:"SearchResult",12:"ShopCart",13:"aist-share",14:"coupons",15:"detail",17:"myorders",18:"purchased",20:"search",21:"shareposter",22:"study",23:"togroup",24:"video"}[e]||e)+"."+{0:"31d6cfe0",1:"718dff83",2:"f2f19957",3:"c0829f24",4:"2e7d81ca",5:"f2cc3163",6:"31d6cfe0",7:"8bb031ea",8:"31d6cfe0",9:"e5315535",10:"cda7a495",11:"2649d43f",12:"3a4dbb7a",13:"bef8c404",14:"de0ae9dc",15:"4c28ce89",17:"3ae12dec",18:"1daf107b",20:"fab97849",21:"f09a5959",22:"5e9927d1",23:"49988cae",24:"b57a1aec",26:"31d6cfe0",27:"4c706a4e",28:"2471f477",29:"0bb224f2",30:"5ed15c7e",31:"ecbb6f9a",32:"278ad3b1",33:"03fe7b57"}[e]+".chunk.css",o=d.p+a,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===a||u===o))return r()}var f=document.getElementsByTagName("style");for(i=0;i<f.length;i++){var s;if((u=(s=f[i]).getAttribute("data-href"))===a||u===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var a=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");c.request=a,delete n[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){n[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var a=new Promise(function(r,a){t=o[e]=[r,a]});r.push(t[2]=a);var c,i=document.createElement("script");i.charset="utf-8",i.timeout=120,d.nc&&i.setAttribute("nonce",d.nc),i.src=function(e){return d.p+"mrstatic/js/"+({1:"BargainMiddlePage",2:"Classify",3:"CourseList",4:"DrawDocument",5:"Examination",6:"MyEdit",7:"Order",8:"Orderinfo",9:"PayOrder",10:"Preferential",11:"SearchResult",12:"ShopCart",13:"aist-share",14:"coupons",15:"detail",17:"myorders",18:"purchased",20:"search",21:"shareposter",22:"study",23:"togroup",24:"video"}[e]||e)+"."+{0:"aef3cf26",1:"f5bb0d59",2:"914a8251",3:"ab1190ce",4:"7730f3de",5:"df98c5b3",6:"30ed911f",7:"d0b6e74e",8:"eaea6ad9",9:"c0854efc",10:"c92167d3",11:"0c0c9343",12:"4c2987b1",13:"ca8ee328",14:"60649292",15:"2c2c806a",17:"b388a40d",18:"44208014",20:"e1881957",21:"1e04a897",22:"2c0ce1c1",23:"03b425a3",24:"41f298c2",26:"b2e8d558",27:"4948c8d6",28:"a684e5c7",29:"cddce484",30:"58628dcc",31:"66e2dea5",32:"0e3712aa",33:"9869dd21"}[e]+".chunk.js"}(e),c=function(r){i.onerror=i.onload=null,clearTimeout(u);var t=o[e];if(0!==t){if(t){var a=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+a+": "+n+")");c.type=a,c.request=n,t[1](c)}o[e]=void 0}};var u=setTimeout(function(){c({type:"timeout",target:i})},12e4);i.onerror=i.onload=c,document.head.appendChild(i)}return Promise.all(r)},d.m=e,d.c=a,d.d=function(e,r,t){d.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},d.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.t=function(e,r){if(1&r&&(e=d(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(d.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)d.d(t,a,function(r){return e[r]}.bind(null,a));return t},d.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(r,"a",r),r},d.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},d.p="/",d.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 f=0;f<i.length;f++)r(i[f]);var s=u;t()}([]);
//# sourceMappingURL=runtime~main.21ddada3.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","19","exports","module","l","e","promises","1","2","3","4","5","7","9","10","11","12","13","14","15","17","18","20","21","22","23","24","27","28","29","30","31","32","33","Promise","resolve","reject","href","6","8","0","26","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,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EAAAoG,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,kBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAxH,OAAAyH,OAAA,MAGA,GAFAzG,EAAAiG,EAAAO,GACAxH,OAAA8G,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAApG,EAAA0F,EAAAc,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAxG,EAAA4G,EAAA,SAAAtG,GACA,IAAAsF,EAAAtF,KAAAiG,WACA,WAA2B,OAAAjG,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAN,EAAA0F,EAAAE,EAAA,IAAAA,GACAA,GAIA5F,EAAA6F,EAAA,SAAAgB,EAAAC,GAAsD,OAAA9H,OAAAC,UAAAC,eAAAC,KAAA0H,EAAAC,IAGtD9G,EAAA8C,EAAA,IAGA9C,EAAA+G,GAAA,SAAA/C,GAA8D,MAApBgD,QAAA7B,MAAAnB,GAAoBA,GAE9D,IAAAiD,EAAAC,OAAA,aAAAA,OAAA,iBACAC,EAAAF,EAAAlI,KAAA4H,KAAAM,GACAA,EAAAlI,KAAAX,EACA6I,IAAAG,QACA,QAAAzI,EAAA,EAAgBA,EAAAsI,EAAApI,OAAuBF,IAAAP,EAAA6I,EAAAtI,IACvC,IAAAU,EAAA8H,EAIA1H","file":"mrstatic/js/runtime~main.a19408db.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\t19: 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\t19: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"mrstatic/js/\" + ({\"1\":\"BargainMiddlePage\",\"2\":\"Classify\",\"3\":\"CourseList\",\"4\":\"DrawDocument\",\"5\":\"Examination\",\"6\":\"MyEdit\",\"7\":\"Order\",\"8\":\"Orderinfo\",\"9\":\"PayOrder\",\"10\":\"Preferential\",\"11\":\"SearchResult\",\"12\":\"ShopCart\",\"13\":\"aist-share\",\"14\":\"coupons\",\"15\":\"detail\",\"17\":\"myorders\",\"18\":\"purchased\",\"20\":\"search\",\"21\":\"shareposter\",\"22\":\"study\",\"23\":\"togroup\",\"24\":\"video\"}[chunkId]||chunkId) + \".\" + {\"0\":\"aef3cf26\",\"1\":\"f63f8cf2\",\"2\":\"994277e1\",\"3\":\"ab1190ce\",\"4\":\"7730f3de\",\"5\":\"df98c5b3\",\"6\":\"30ed911f\",\"7\":\"96622df3\",\"8\":\"eaea6ad9\",\"9\":\"3f5285c6\",\"10\":\"c92167d3\",\"11\":\"a9940fff\",\"12\":\"023ad36a\",\"13\":\"78a5ac9c\",\"14\":\"b214df27\",\"15\":\"c4409a6e\",\"17\":\"2957b1c3\",\"18\":\"fd53e3b4\",\"20\":\"0053fea0\",\"21\":\"1e04a897\",\"22\":\"2bd0e879\",\"23\":\"3e165b5f\",\"24\":\"0d7cb00a\",\"26\":\"b2e8d558\",\"27\":\"4948c8d6\",\"28\":\"a684e5c7\",\"29\":\"cddce484\",\"30\":\"58628dcc\",\"31\":\"66e2dea5\",\"32\":\"0e3712aa\",\"33\":\"9869dd21\"}[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 = {\"1\":1,\"2\":1,\"3\":1,\"4\":1,\"5\":1,\"7\":1,\"9\":1,\"10\":1,\"11\":1,\"12\":1,\"13\":1,\"14\":1,\"15\":1,\"17\":1,\"18\":1,\"20\":1,\"21\":1,\"22\":1,\"23\":1,\"24\":1,\"27\":1,\"28\":1,\"29\":1,\"30\":1,\"31\":1,\"32\":1,\"33\":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 = \"mrstatic/css/\" + ({\"1\":\"BargainMiddlePage\",\"2\":\"Classify\",\"3\":\"CourseList\",\"4\":\"DrawDocument\",\"5\":\"Examination\",\"6\":\"MyEdit\",\"7\":\"Order\",\"8\":\"Orderinfo\",\"9\":\"PayOrder\",\"10\":\"Preferential\",\"11\":\"SearchResult\",\"12\":\"ShopCart\",\"13\":\"aist-share\",\"14\":\"coupons\",\"15\":\"detail\",\"17\":\"myorders\",\"18\":\"purchased\",\"20\":\"search\",\"21\":\"shareposter\",\"22\":\"study\",\"23\":\"togroup\",\"24\":\"video\"}[chunkId]||chunkId) + \".\" + {\"0\":\"31d6cfe0\",\"1\":\"718dff83\",\"2\":\"f2f19957\",\"3\":\"c0829f24\",\"4\":\"2e7d81ca\",\"5\":\"f2cc3163\",\"6\":\"31d6cfe0\",\"7\":\"8bb031ea\",\"8\":\"31d6cfe0\",\"9\":\"e5315535\",\"10\":\"cda7a495\",\"11\":\"2649d43f\",\"12\":\"3a4dbb7a\",\"13\":\"bef8c404\",\"14\":\"4a456833\",\"15\":\"4c28ce89\",\"17\":\"3ae12dec\",\"18\":\"1daf107b\",\"20\":\"fab97849\",\"21\":\"f09a5959\",\"22\":\"5e9927d1\",\"23\":\"49988cae\",\"24\":\"b57a1aec\",\"26\":\"31d6cfe0\",\"27\":\"4c706a4e\",\"28\":\"2471f477\",\"29\":\"0bb224f2\",\"30\":\"5ed15c7e\",\"31\":\"ecbb6f9a\",\"32\":\"278ad3b1\",\"33\":\"03fe7b57\"}[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","19","exports","module","l","e","promises","1","2","3","4","5","7","9","10","11","12","13","14","15","17","18","20","21","22","23","24","27","28","29","30","31","32","33","Promise","resolve","reject","href","6","8","0","26","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,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,QAAAzI,EAAA,EAAgBA,EAAAsI,EAAApI,OAAuBF,IAAAP,EAAA6I,EAAAtI,IACvC,IAAAU,EAAA8H,EAIA1H","file":"mrstatic/js/runtime~main.21ddada3.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\t19: 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\t19: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"mrstatic/js/\" + ({\"1\":\"BargainMiddlePage\",\"2\":\"Classify\",\"3\":\"CourseList\",\"4\":\"DrawDocument\",\"5\":\"Examination\",\"6\":\"MyEdit\",\"7\":\"Order\",\"8\":\"Orderinfo\",\"9\":\"PayOrder\",\"10\":\"Preferential\",\"11\":\"SearchResult\",\"12\":\"ShopCart\",\"13\":\"aist-share\",\"14\":\"coupons\",\"15\":\"detail\",\"17\":\"myorders\",\"18\":\"purchased\",\"20\":\"search\",\"21\":\"shareposter\",\"22\":\"study\",\"23\":\"togroup\",\"24\":\"video\"}[chunkId]||chunkId) + \".\" + {\"0\":\"aef3cf26\",\"1\":\"f5bb0d59\",\"2\":\"914a8251\",\"3\":\"ab1190ce\",\"4\":\"7730f3de\",\"5\":\"df98c5b3\",\"6\":\"30ed911f\",\"7\":\"d0b6e74e\",\"8\":\"eaea6ad9\",\"9\":\"c0854efc\",\"10\":\"c92167d3\",\"11\":\"0c0c9343\",\"12\":\"4c2987b1\",\"13\":\"ca8ee328\",\"14\":\"60649292\",\"15\":\"2c2c806a\",\"17\":\"b388a40d\",\"18\":\"44208014\",\"20\":\"e1881957\",\"21\":\"1e04a897\",\"22\":\"2c0ce1c1\",\"23\":\"03b425a3\",\"24\":\"41f298c2\",\"26\":\"b2e8d558\",\"27\":\"4948c8d6\",\"28\":\"a684e5c7\",\"29\":\"cddce484\",\"30\":\"58628dcc\",\"31\":\"66e2dea5\",\"32\":\"0e3712aa\",\"33\":\"9869dd21\"}[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 = {\"1\":1,\"2\":1,\"3\":1,\"4\":1,\"5\":1,\"7\":1,\"9\":1,\"10\":1,\"11\":1,\"12\":1,\"13\":1,\"14\":1,\"15\":1,\"17\":1,\"18\":1,\"20\":1,\"21\":1,\"22\":1,\"23\":1,\"24\":1,\"27\":1,\"28\":1,\"29\":1,\"30\":1,\"31\":1,\"32\":1,\"33\":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 = \"mrstatic/css/\" + ({\"1\":\"BargainMiddlePage\",\"2\":\"Classify\",\"3\":\"CourseList\",\"4\":\"DrawDocument\",\"5\":\"Examination\",\"6\":\"MyEdit\",\"7\":\"Order\",\"8\":\"Orderinfo\",\"9\":\"PayOrder\",\"10\":\"Preferential\",\"11\":\"SearchResult\",\"12\":\"ShopCart\",\"13\":\"aist-share\",\"14\":\"coupons\",\"15\":\"detail\",\"17\":\"myorders\",\"18\":\"purchased\",\"20\":\"search\",\"21\":\"shareposter\",\"22\":\"study\",\"23\":\"togroup\",\"24\":\"video\"}[chunkId]||chunkId) + \".\" + {\"0\":\"31d6cfe0\",\"1\":\"718dff83\",\"2\":\"f2f19957\",\"3\":\"c0829f24\",\"4\":\"2e7d81ca\",\"5\":\"f2cc3163\",\"6\":\"31d6cfe0\",\"7\":\"8bb031ea\",\"8\":\"31d6cfe0\",\"9\":\"e5315535\",\"10\":\"cda7a495\",\"11\":\"2649d43f\",\"12\":\"3a4dbb7a\",\"13\":\"bef8c404\",\"14\":\"de0ae9dc\",\"15\":\"4c28ce89\",\"17\":\"3ae12dec\",\"18\":\"1daf107b\",\"20\":\"fab97849\",\"21\":\"f09a5959\",\"22\":\"5e9927d1\",\"23\":\"49988cae\",\"24\":\"b57a1aec\",\"26\":\"31d6cfe0\",\"27\":\"4c706a4e\",\"28\":\"2471f477\",\"29\":\"0bb224f2\",\"30\":\"5ed15c7e\",\"31\":\"ecbb6f9a\",\"32\":\"278ad3b1\",\"33\":\"03fe7b57\"}[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([[20],{1146:function(e,t,n){},1147:function(e,t,n){},1196:function(e,t,n){"use strict";n.r(t);var a=n(73),o=n.n(a),r=n(109),s=n(77),i=n(5),c=n(7),l=n(6),u=n(8),h=n(9),f=n(0),p=n.n(f),d=n(700),m=(n(1146),function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(c.a)(t,[{key:"render",value:function(){return p.a.createElement("span",Object.assign({className:this.props.name},this.props),this.props.children)}}]),t}(f.PureComponent)),v=n(3),g=(n(1147),n(16)),y=n(63),C=function(e){function t(){var e,n;Object(i.a)(this,t);for(var a=arguments.length,o=new Array(a),r=0;r<a;r++)o[r]=arguments[r];return(n=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).state={searchHistory:JSON.parse(localStorage.getItem("searchHistory"))||[],hot_words:[],searchList:[],value:"",isLoading:!0},n.clearHistory=function(){localStorage.setItem("searchHistory",null),n.setState({searchHistory:[]})},n.handleChange=function(e){n.setState({value:e})},n.handleSearch=function(){n.state.value&&n.props.history.push("/search-result?word=".concat(encodeURIComponent(n.state.value)))},n.storeHistory=function(e){localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(s.a)(n.state.searchHistory),[e])))},n}return Object(h.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=Object(r.a)(o.a.mark(function e(){var t;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.d.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"},t.length>0&&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.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:"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},578: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},583:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(4),r=(a=o)&&a.__esModule?a:{default:a};t.getComponentLocale=function(e,t,n,a){var o={};if(t&&t.antLocale&&t.antLocale[n])o=t.antLocale[n];else{var s=a();o=s.default||s}var i=(0,r.default)({},o);e.locale&&(i=(0,r.default)({},i,e.locale),e.locale.lang&&(i.lang=(0,r.default)({},o.lang,e.locale.lang)));return i},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},601:function(e,t,n){"use strict";n(49),n(602)},602:function(e,t,n){},603:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=g(n(4)),o=g(n(34)),r=g(n(10)),s=g(n(12)),i=g(n(11)),c=g(n(13)),l=g(n(15)),u=v(n(0)),h=v(n(2)),f=g(n(153)),p=g(n(578)),d=n(583),m=n(604);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){(0,r.default)(this,t);var n=(0,i.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onSubmit=function(e){e.preventDefault(),n.props.onSubmit&&n.props.onSubmit(n.state.value||""),n.inputRef&&n.inputRef.blur()},n.onChange=function(e){n.state.focus||n.setState({focus:!0});var t=e.target.value;"value"in n.props||n.setState({value:t}),n.props.onChange&&n.props.onChange(t)},n.onFocus=function(){n.setState({focus:!0}),n.firstFocus=!0,n.props.onFocus&&n.props.onFocus()},n.onBlur=function(){var e;n.onBlurTimeout=(e=function(){n.blurFromOnClear||document.activeElement!==n.inputRef&&n.setState({focus:!1}),n.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),n.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),n.props.onBlur())},n.onClear=function(){n.doClear()},n.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.blurFromOnClear=e,"value"in n.props||n.setState({value:""}),n.props.onClear&&n.props.onClear(""),n.props.onChange&&n.props.onChange(""),e&&n.focus()},n.onCancel=function(){n.props.onCancel?n.props.onCancel(n.state.value||""):n.doClear(!1)},n.focus=function(){n.inputRef&&n.inputRef.focus()};var a=void 0;return a="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",n.state={value:a,focus:!1},n}return(0,c.default)(t,e),(0,s.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,r=this.props,s=r.prefixCls,i=r.showCancelButton,c=r.disabled,h=r.placeholder,m=r.className,v=r.style,g=r.maxLength,y=(0,d.getComponentLocale)(this.props,this.context,"SearchBar",function(){return n(605)}).cancelText,C=this.state,b=C.value,w=C.focus,E=(0,l.default)(s,m,(0,o.default)({},s+"-start",!!(w||b&&b.length>0))),O=(0,l.default)(s+"-clear",(0,o.default)({},s+"-clear-show",!!(w&&b&&b.length>0))),R=(0,l.default)(s+"-cancel",(e={},(0,o.default)(e,s+"-cancel-show",!!(i||w||b&&b.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&&!b?"visible":"hidden"}},h))),u.createElement("input",(0,a.default)({type:"search",className:s+"-value",value:b,disabled:c,placeholder:h,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:g},(0,p.default)(this.props))),u.createElement(f.default,{activeClassName:s+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:O}))),u.createElement("div",{className:R,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||y))}}]),t}(u.Component);t.default=y,y.defaultProps=m.defaultProps,y.contextTypes={antLocale:h.object},e.exports=t.default},604: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}},605:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},700:function(e,t,n){"use strict";n(601);var a=n(603),o=n.n(a),r=n(77),s=n(5),i=n(7),c=n(6),l=n(8),u=n(9),h=n(0),f=n.n(h),p=n(48),d=n(15),m=n.n(d),v=(n(701),function(e){function t(){var e,n;Object(s.a)(this,t);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return(n=Object(c.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(o)))).state={isFocus:!1},n.returnPage=function(){n.props.history.go(-1)},n.search=function(){n.storeKeyword(),n.props.handleSearch()},n.storeKeyword=function(){var e=n.props,t=e.searchHistory,a=void 0===t?[]:t,o=e.value;o&&localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(r.a)(a),[o])))},n.changeFontColor=function(e){n.setState({isFocus:e})},n}return Object(u.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.refs.search.focus()}},{key:"render",value:function(){var e=this,t=this.state.isFocus,n=m()("submit-btn",{"submit-btn--active":t});return f.a.createElement("div",{className:"search-head",style:this.props.style,ref:this.props.forwardedRef},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",onFocus:function(){return e.changeFontColor(!0)},onBlur:function(){return e.changeFontColor(!1)},onSubmit:this.search})),f.a.createElement("div",{className:"right right-btn",onClick:this.search},f.a.createElement("div",{className:n},"\u641c\u7d22")))}}]),t}(h.PureComponent));t.a=Object(p.g)(v)},701:function(e,t,n){}}]);
//# sourceMappingURL=search.0053fea0.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{1146:function(e,t,n){},1147:function(e,t,n){},1196:function(e,t,n){"use strict";n.r(t);var a=n(73),o=n.n(a),r=n(109),s=n(77),i=n(5),c=n(7),l=n(6),u=n(8),h=n(9),f=n(0),p=n.n(f),d=n(700),m=(n(1146),function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(c.a)(t,[{key:"render",value:function(){return p.a.createElement("span",Object.assign({className:this.props.name},this.props),this.props.children)}}]),t}(f.PureComponent)),v=n(3),g=(n(1147),n(17)),y=n(63),C=function(e){function t(){var e,n;Object(i.a)(this,t);for(var a=arguments.length,o=new Array(a),r=0;r<a;r++)o[r]=arguments[r];return(n=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).state={searchHistory:JSON.parse(localStorage.getItem("searchHistory"))||[],hot_words:[],searchList:[],value:"",isLoading:!0},n.clearHistory=function(){localStorage.setItem("searchHistory",null),n.setState({searchHistory:[]})},n.handleChange=function(e){n.setState({value:e})},n.handleSearch=function(){n.state.value&&n.props.history.push("/search-result?word=".concat(encodeURIComponent(n.state.value)))},n.storeHistory=function(e){localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(s.a)(n.state.searchHistory),[e])))},n}return Object(h.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=Object(r.a)(o.a.mark(function e(){var t;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.d.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"},t.length>0&&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.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:"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},578: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},583:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(4),r=(a=o)&&a.__esModule?a:{default:a};t.getComponentLocale=function(e,t,n,a){var o={};if(t&&t.antLocale&&t.antLocale[n])o=t.antLocale[n];else{var s=a();o=s.default||s}var i=(0,r.default)({},o);e.locale&&(i=(0,r.default)({},i,e.locale),e.locale.lang&&(i.lang=(0,r.default)({},o.lang,e.locale.lang)));return i},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},601:function(e,t,n){"use strict";n(49),n(602)},602:function(e,t,n){},603:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=g(n(4)),o=g(n(34)),r=g(n(10)),s=g(n(12)),i=g(n(11)),c=g(n(13)),l=g(n(15)),u=v(n(0)),h=v(n(2)),f=g(n(153)),p=g(n(578)),d=n(583),m=n(604);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){(0,r.default)(this,t);var n=(0,i.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onSubmit=function(e){e.preventDefault(),n.props.onSubmit&&n.props.onSubmit(n.state.value||""),n.inputRef&&n.inputRef.blur()},n.onChange=function(e){n.state.focus||n.setState({focus:!0});var t=e.target.value;"value"in n.props||n.setState({value:t}),n.props.onChange&&n.props.onChange(t)},n.onFocus=function(){n.setState({focus:!0}),n.firstFocus=!0,n.props.onFocus&&n.props.onFocus()},n.onBlur=function(){var e;n.onBlurTimeout=(e=function(){n.blurFromOnClear||document.activeElement!==n.inputRef&&n.setState({focus:!1}),n.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),n.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),n.props.onBlur())},n.onClear=function(){n.doClear()},n.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.blurFromOnClear=e,"value"in n.props||n.setState({value:""}),n.props.onClear&&n.props.onClear(""),n.props.onChange&&n.props.onChange(""),e&&n.focus()},n.onCancel=function(){n.props.onCancel?n.props.onCancel(n.state.value||""):n.doClear(!1)},n.focus=function(){n.inputRef&&n.inputRef.focus()};var a=void 0;return a="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",n.state={value:a,focus:!1},n}return(0,c.default)(t,e),(0,s.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,r=this.props,s=r.prefixCls,i=r.showCancelButton,c=r.disabled,h=r.placeholder,m=r.className,v=r.style,g=r.maxLength,y=(0,d.getComponentLocale)(this.props,this.context,"SearchBar",function(){return n(605)}).cancelText,C=this.state,b=C.value,w=C.focus,E=(0,l.default)(s,m,(0,o.default)({},s+"-start",!!(w||b&&b.length>0))),O=(0,l.default)(s+"-clear",(0,o.default)({},s+"-clear-show",!!(w&&b&&b.length>0))),R=(0,l.default)(s+"-cancel",(e={},(0,o.default)(e,s+"-cancel-show",!!(i||w||b&&b.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&&!b?"visible":"hidden"}},h))),u.createElement("input",(0,a.default)({type:"search",className:s+"-value",value:b,disabled:c,placeholder:h,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:g},(0,p.default)(this.props))),u.createElement(f.default,{activeClassName:s+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:O}))),u.createElement("div",{className:R,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||y))}}]),t}(u.Component);t.default=y,y.defaultProps=m.defaultProps,y.contextTypes={antLocale:h.object},e.exports=t.default},604: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}},605:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},700:function(e,t,n){"use strict";n(601);var a=n(603),o=n.n(a),r=n(77),s=n(5),i=n(7),c=n(6),l=n(8),u=n(9),h=n(0),f=n.n(h),p=n(48),d=n(15),m=n.n(d),v=(n(701),function(e){function t(){var e,n;Object(s.a)(this,t);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return(n=Object(c.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(o)))).state={isFocus:!1},n.returnPage=function(){n.props.history.go(-1)},n.search=function(){n.storeKeyword(),n.props.handleSearch()},n.storeKeyword=function(){var e=n.props,t=e.searchHistory,a=void 0===t?[]:t,o=e.value;o&&localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(r.a)(a),[o])))},n.changeFontColor=function(e){n.setState({isFocus:e})},n}return Object(u.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.refs.search.focus()}},{key:"render",value:function(){var e=this,t=this.state.isFocus,n=m()("submit-btn",{"submit-btn--active":t});return f.a.createElement("div",{className:"search-head",style:this.props.style,ref:this.props.forwardedRef},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",onFocus:function(){return e.changeFontColor(!0)},onBlur:function(){return e.changeFontColor(!1)},onSubmit:this.search})),f.a.createElement("div",{className:"right right-btn",onClick:this.search},f.a.createElement("div",{className:n},"\u641c\u7d22")))}}]),t}(h.PureComponent));t.a=Object(p.g)(v)},701:function(e,t,n){}}]);
//# sourceMappingURL=search.e1881957.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","length","onClick","map","v","i","react_router_dom","key","to","Tag_Tag","bind","style","textAlign","padding","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","isFocus","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__","changeFontColor","refs","cls","classnames","submit-btn--active","react__WEBPACK_IMPORTED_MODULE_8___default","forwardedRef","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","withRouter"],"mappings":"mPAEqBA,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,G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BsI,YAAY,2BACZ9C,QAAS,kBAAMvE,EAAKgJ,iBAAgB,IACpCvE,OAAQ,kBAAMzE,EAAKgJ,iBAAgB,IACnCjF,SAAWpG,KAAKgL,UAGxBU,EAAA/L,EAAAC,cAAA,OAAKG,UAAU,kBAAkB0C,QAASzC,KAAKgL,QAC3CU,EAAA/L,EAAAC,cAAA,OAAKG,UAAWwL,GAAhB,yBAvDKnL,kBA+DVyL,gBAAWjB","file":"mrstatic/js/search.0053fea0.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 {\n searchHistory.length > 0 &&\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\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 }\n </div>\n </div>\n }\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'\nimport classnames from 'classnames';\n\nimport './search_header.scss'\n\nclass SearchHead extends PureComponent {\n \n state = {\n isFocus: false\n }\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 changeFontColor = (isFocus) => {\n this.setState({\n isFocus\n });\n }\n\n render() {\n const { isFocus } = this.state;\n const cls = classnames('submit-btn', {'submit-btn--active': isFocus})\n return (\n <div className=\"search-head\" style={this.props.style} ref={this.props.forwardedRef}>\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 onFocus={() => this.changeFontColor(true)}\n onBlur={() => this.changeFontColor(false)}\n onSubmit={ this.search }\n />\n </div>\n <div className=\"right right-btn\" onClick={this.search}>\n <div className={cls}>搜索</div>\n </div>\n </div>\n\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","length","onClick","map","v","i","react_router_dom","key","to","Tag_Tag","bind","style","textAlign","padding","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","isFocus","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__","changeFontColor","refs","cls","classnames","submit-btn--active","react__WEBPACK_IMPORTED_MODULE_8___default","forwardedRef","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","withRouter"],"mappings":"mPAEqBA,4LAEb,OACIC,EAAAC,EAAAC,cAAA,OAAAC,OAAAC,OAAA,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UACX2L,EAAA/L,EAAAC,cAAAgM,EAAAjM,EAAA,CACImB,MAAOd,KAAKC,MAAMa,MAClBiI,kBAAgB,EAChBa,WAAY,IACZK,IAAI,SACJvD,OAAO,EACPD,SAAUzG,KAAKC,MAAMmB,aACrBsI,YAAY,2BACZ9C,QAAS,kBAAMvE,EAAKgJ,iBAAgB,IACpCvE,OAAQ,kBAAMzE,EAAKgJ,iBAAgB,IACnCjF,SAAWpG,KAAKgL,UAGxBU,EAAA/L,EAAAC,cAAA,OAAKG,UAAU,kBAAkB0C,QAASzC,KAAKgL,QAC3CU,EAAA/L,EAAAC,cAAA,OAAKG,UAAWwL,GAAhB,yBAvDKnL,kBA+DVyL,gBAAWjB","file":"mrstatic/js/search.e1881957.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 {\n searchHistory.length > 0 &&\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\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 }\n </div>\n </div>\n }\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'\nimport classnames from 'classnames';\n\nimport './search_header.scss'\n\nclass SearchHead extends PureComponent {\n \n state = {\n isFocus: false\n }\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 changeFontColor = (isFocus) => {\n this.setState({\n isFocus\n });\n }\n\n render() {\n const { isFocus } = this.state;\n const cls = classnames('submit-btn', {'submit-btn--active': isFocus})\n return (\n <div className=\"search-head\" style={this.props.style} ref={this.props.forwardedRef}>\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 onFocus={() => this.changeFontColor(true)}\n onBlur={() => this.changeFontColor(false)}\n onSubmit={ this.search }\n />\n </div>\n <div className=\"right right-btn\" onClick={this.search}>\n <div className={cls}>搜索</div>\n </div>\n </div>\n\n )\n }\n}\n\nexport default withRouter(SearchHead)"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{1192:function(e,t,a){"use strict";a.r(t);var s=a(5),n=a(7),o=a(6),r=a(8),i=a(9),l=a(0),c=a.n(l),u=(a(785),a(16)),p=a(48),d=a(644),h=(a(786),a(156)),m=a(21),f=a(86),v=a(619),g=a.n(v),b=a(38),y=a(30);var E=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,s=t.lesson_name,n="";if(s){var o=/\u7b2c[\s\S]+?\u8bfe/.exec(s);n+=o&&o[0]?o[0]:""}if(a){var r=function(e){return{hour:Math.floor(e/3600),min:Math.floor(e/60)%60,sec:e%60}}(a);n+=(r.hour?String(r.hour).padStart(2,"0")+":":"")+(r.min?String(r.min).padStart(2,"0")+":":"")+(r.sec?String(r.sec).padStart(2,"0"):"")}return c.a.createElement("span",{className:"record"},n.length?"\u5b66\u4e60\u5230".concat(n):null)}var w=c.a.memo(function(e){var t=e.item;if(t.ago||t.seconds){var a=new Date(1e3*t.ago),s=Object(h.isToday)(a)?Object(h.format)(a,"HH\u65f6mm\u5206"):Object(h.format)(a,"MM\u6708DD\u65e5");return c.a.createElement("div",{className:"des"},c.a.createElement("span",{className:"time"},s),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(s.a)(this,t);for(var n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).state={isLoading:!0},a.handleClick=function(e){a.props.history.push("/play/video?id=".concat(e))},a.addCourseClick=function(){a.props.history.push("/classify")},a.loadFunc=Object(b.debounce)(function(){a.props.courseList.length%10===0&&a.props.fetchCoursesListIfNeeded()},200),a}return Object(i.a)(t,e),Object(n.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,s=t.user;return c.a.createElement(y.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(!s.hasError&&this.props.user.data.uid)),c.a.createElement(g.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 s=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})),n=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:s,status:n,id:t.v_course_id}))}))),a.length%10!==0?c.a.createElement(E,{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.Component),N=Object(m.b)(function(e){return{courseList:e.myCourses.courseList,user:e.user,isLoading:e.myCourses.isLoading}},{fetchCoursesListIfNeeded:f.e,switchTab:f.f})(C),k=(a(44),a(14)),O=a.n(k),_=(a(787),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(3),M=a(15),j=a.n(M),P=(a(191),a(788),function(e){return c.a.createElement("div",{className:"bottom"},c.a.createElement(y.i,{className:e.className},e.text),c.a.createElement("span",null,e.audience,"\u4eba\u89c2\u770b"))}),T=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).page=1,a.num=10,a.state={courses:[],live:[],page:1,hasMore:!1},a.handleClick=function(e){a.props.history.push("/play/video?id=".concat(e))},a.getFreeCourses=function(){return S.d.get("".concat(API.home,"/m/free_course/").concat(a.page++,"/").concat(a.num))},a.getFreeLive=function(){return S.d.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.loadFunc=function(){a.state.hasMore&&a.setState({hasMore:a.state.courses.length%10===0},function(){a.getFreeCourses().then(function(e){var t=e.data;200==t.code?Array.isArray(t.data)&&a.setState({courses:a.state.courses.concat(t.data),hasMore:t.data.length%10===0}):O.a.info(t.msg)})})},a}return Object(i.a)(t,e),Object(n.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,hasMore:!0}):O.a.info(a.msg)}),this.getFreeLive().then(function(t){var a=t.data;200==a.code?e.setState({live:Object(b.isEmpty)(a.data)?[]:a.data}):O.a.info(a.msg,2,null,!1)})}},{key:"render",value:function(){var e=this;return c.a.createElement(g.a,{pageStart:0,loadMore:this.loadFunc,useWindow:!1,className:"free-courses",element:"ul",hasMore:this.state.hasMore,threshold:250},this.state.live.map(function(t,a){var s=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:j()("column","column-".concat(t+1))})})),c.a.createElement("div",{className:"time"},"".concat(t.live_start_time))),n=0==t.live_status?c.a.createElement(y.i,{className:"tag-soon top"},"\u5373\u5c06\u5f00\u59cb"):c.a.createElement(y.i,{className:"tag-playing top"},"\u6b63\u5728\u76f4\u64ad");return c.a.createElement(_,{img:t.live_cover,title:t.live_title,top:n,bottom:s,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(P,{audience:t.play_times,className:"tag-category",text:t.category}),id:t.v_course_id,key:a,className:"course-item"})}))}}]),t}(l.PureComponent),W=a(165),x=a(160),F=a(23),H=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).state={position:{}},a}return Object(i.a)(t,e),Object(n.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(F.d)(x.a,W.a)(H)},619:function(e,t,a){e.exports=a(646)},644:function(e,t,a){"use strict";var s=a(0),n=a.n(s);a(645);t.a=function(e){return n.a.createElement("li",{className:"v-list-base-item",onClick:e.handleClick.bind(void 0,e.id)},n.a.createElement("div",{className:"content"},n.a.createElement("div",{className:"cover"},e.status,n.a.createElement("img",{src:e.img,alt:""})),e.info),e.tab)}},645:function(e,t,a){},646:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,a,s){return a&&e(t.prototype,a),s&&e(t,s),t}}(),n=a(0),o=i(n),r=i(a(2));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.scrollListener=a.scrollListener.bind(a),a.eventListenerOptions=a.eventListenerOptions.bind(a),a.mousewheelListener=a.mousewheelListener.bind(a),a}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.Component),s(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),s=void 0;if(this.props.useWindow){var n=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:n.scrollTop;s=this.props.isReverse?o:this.calculateOffset(e,o)}else s=this.props.isReverse?a.scrollTop:e.scrollHeight-a.scrollTop-a.clientHeight;s<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,s=t.element,n=t.hasMore,r=(t.initialLoad,t.isReverse),i=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var a={};for(var s in e)t.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(e,s)&&(a[s]=e[s]);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 n&&(i?r?u.unshift(i):u.push(i):this.defaultLoader&&(r?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(s,c,u)}}]),t}();l.propTypes={children:r.default.node.isRequired,element:r.default.node,hasMore:r.default.bool,initialLoad:r.default.bool,isReverse:r.default.bool,loader:r.default.node,loadMore:r.default.func.isRequired,pageStart:r.default.number,ref:r.default.func,getScrollParent:r.default.func,threshold:r.default.number,useCapture:r.default.bool,useWindow:r.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},785:function(e,t,a){},786:function(e,t,a){},787:function(e,t,a){},788:function(e,t,a){}}]);
//# sourceMappingURL=study.2bd0e879.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{1192:function(e,t,a){"use strict";a.r(t);var s=a(5),n=a(7),o=a(6),r=a(8),i=a(9),l=a(0),c=a.n(l),u=(a(785),a(17)),p=a(48),d=a(644),h=(a(786),a(156)),m=a(21),f=a(86),v=a(619),g=a.n(v),b=a(38),y=a(30);var E=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,s=t.lesson_name,n="";if(s){var o=/\u7b2c[\s\S]+?\u8bfe/.exec(s);n+=o&&o[0]?o[0]:""}if(a){var r=function(e){return{hour:Math.floor(e/3600),min:Math.floor(e/60)%60,sec:e%60}}(a);n+=(r.hour?String(r.hour).padStart(2,"0")+":":"")+(r.min?String(r.min).padStart(2,"0")+":":"")+(r.sec?String(r.sec).padStart(2,"0"):"")}return c.a.createElement("span",{className:"record"},n.length?"\u5b66\u4e60\u5230".concat(n):null)}var w=c.a.memo(function(e){var t=e.item;if(t.ago||t.seconds){var a=new Date(1e3*t.ago),s=Object(h.isToday)(a)?Object(h.format)(a,"HH\u65f6mm\u5206"):Object(h.format)(a,"MM\u6708DD\u65e5");return c.a.createElement("div",{className:"des"},c.a.createElement("span",{className:"time"},s),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(s.a)(this,t);for(var n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).state={isLoading:!0},a.handleClick=function(e){a.props.history.push("/play/video?id=".concat(e))},a.addCourseClick=function(){a.props.history.push("/classify")},a.loadFunc=Object(b.debounce)(function(){a.props.courseList.length%10===0&&a.props.fetchCoursesListIfNeeded()},200),a}return Object(i.a)(t,e),Object(n.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,s=t.user;return c.a.createElement(y.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(!s.hasError&&this.props.user.data.uid)),c.a.createElement(g.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 s=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})),n=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:s,status:n,id:t.v_course_id}))}))),a.length%10!==0?c.a.createElement(E,{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"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u8d76\u5feb\u53bb\u9009\u8bfe\u5427~"),c.a.createElement("p",null,c.a.createElement(u.b,{className:"select-course",to:"/classify"},"\u53bb\u9009\u8bfe"))))}}]),t}(l.Component),N=Object(m.b)(function(e){return{courseList:e.myCourses.courseList,user:e.user,isLoading:e.myCourses.isLoading}},{fetchCoursesListIfNeeded:f.e,switchTab:f.f})(C),k=(a(44),a(14)),O=a.n(k),_=(a(787),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(3),M=a(15),j=a.n(M),P=(a(191),a(788),function(e){return c.a.createElement("div",{className:"bottom"},c.a.createElement(y.i,{className:e.className},e.text),c.a.createElement("span",null,e.audience,"\u4eba\u89c2\u770b"))}),T=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).page=1,a.num=10,a.state={courses:[],live:[],page:1,hasMore:!1},a.handleClick=function(e){a.props.history.push("/play/video?id=".concat(e))},a.getFreeCourses=function(){return S.d.get("".concat(API.home,"/m/free_course/").concat(a.page++,"/").concat(a.num))},a.getFreeLive=function(){return S.d.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.loadFunc=function(){a.state.hasMore&&a.setState({hasMore:a.state.courses.length%10===0},function(){a.getFreeCourses().then(function(e){var t=e.data;200==t.code?Array.isArray(t.data)&&a.setState({courses:a.state.courses.concat(t.data),hasMore:t.data.length%10===0}):O.a.info(t.msg)})})},a}return Object(i.a)(t,e),Object(n.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,hasMore:!0}):O.a.info(a.msg)}),this.getFreeLive().then(function(t){var a=t.data;200==a.code?e.setState({live:Object(b.isEmpty)(a.data)?[]:a.data}):O.a.info(a.msg,2,null,!1)})}},{key:"render",value:function(){var e=this;return c.a.createElement(g.a,{pageStart:0,loadMore:this.loadFunc,useWindow:!1,className:"free-courses",element:"ul",hasMore:this.state.hasMore,threshold:250},this.state.live.map(function(t,a){var s=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:j()("column","column-".concat(t+1))})})),c.a.createElement("div",{className:"time"},"".concat(t.live_start_time))),n=0==t.live_status?c.a.createElement(y.i,{className:"tag-soon top"},"\u5373\u5c06\u5f00\u59cb"):c.a.createElement(y.i,{className:"tag-playing top"},"\u6b63\u5728\u76f4\u64ad");return c.a.createElement(_,{img:t.live_cover,title:t.live_title,top:n,bottom:s,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(P,{audience:t.play_times,className:"tag-category",text:t.category}),id:t.v_course_id,key:a,className:"course-item"})}))}}]),t}(l.PureComponent),W=a(165),x=a(160),F=a(23),H=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(i)))).state={position:{}},a}return Object(i.a)(t,e),Object(n.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(F.d)(x.a,W.a)(H)},619:function(e,t,a){e.exports=a(646)},644:function(e,t,a){"use strict";var s=a(0),n=a.n(s);a(645);t.a=function(e){return n.a.createElement("li",{className:"v-list-base-item",onClick:e.handleClick.bind(void 0,e.id)},n.a.createElement("div",{className:"content"},n.a.createElement("div",{className:"cover"},e.status,n.a.createElement("img",{src:e.img,alt:""})),e.info),e.tab)}},645:function(e,t,a){},646:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,a,s){return a&&e(t.prototype,a),s&&e(t,s),t}}(),n=a(0),o=i(n),r=i(a(2));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.scrollListener=a.scrollListener.bind(a),a.eventListenerOptions=a.eventListenerOptions.bind(a),a.mousewheelListener=a.mousewheelListener.bind(a),a}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.Component),s(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),s=void 0;if(this.props.useWindow){var n=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:n.scrollTop;s=this.props.isReverse?o:this.calculateOffset(e,o)}else s=this.props.isReverse?a.scrollTop:e.scrollHeight-a.scrollTop-a.clientHeight;s<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,s=t.element,n=t.hasMore,r=(t.initialLoad,t.isReverse),i=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var a={};for(var s in e)t.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(e,s)&&(a[s]=e[s]);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 n&&(i?r?u.unshift(i):u.push(i):this.defaultLoader&&(r?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(s,c,u)}}]),t}();l.propTypes={children:r.default.node.isRequired,element:r.default.node,hasMore:r.default.bool,initialLoad:r.default.bool,isReverse:r.default.bool,loader:r.default.node,loadMore:r.default.func.isRequired,pageStart:r.default.number,ref:r.default.func,getScrollParent:r.default.func,threshold:r.default.number,useCapture:r.default.bool,useWindow:r.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},785:function(e,t,a){},786:function(e,t,a){},787:function(e,t,a){},788:function(e,t,a){}}]);
//# sourceMappingURL=study.2c0ce1c1.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","../node_modules/react-infinite-scroller/index.js","common/v-list-base/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","Component","connect","myCourses","Course","bind","top","src","alt","title","bottom","text","audience","FreeCourse","page","num","courses","live","getFreeCourses","http","get","API","home","getFreeLive","toLive","room_id","live_status","window","location","toast_default","setState","then","res","code","Array","isArray","msg","isEmpty","_this3","element","threshold","fill","classnames","LiveStatus","common_course_base","logo","freeCourses_Bottom","category","PureComponent","Study","position","match","url","replace","activeClassName","react_router","exact","from","path","component","FreeCourses","compose","WithFullSize","WithTab","module","exports","__webpack_require__","VList","react__WEBPACK_IMPORTED_MODULE_0___default","tab","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","offsetParent","calculateTopPosition","offsetHeight","innerHeight","offsetTop","renderProps","filterProps","children","keys","indexOf","hasOwnProperty","_objectWithoutProperties","node","childrenArray","unshift","propTypes","isRequired","bool","func","number","defaultProps"],"mappings":"gQAoBA,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,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iBAIAhD,EAAAK,QAAA9K,cAAA2H,EAAArF,EAAAiN,OAIAxE,EArPA,GAwPAA,EAAA0E,UAAA,CACAR,SAAAtE,EAAAG,QAAAwE,KAAAI,WACA/H,QAAAgD,EAAAG,QAAAwE,KACA7L,QAAAkH,EAAAG,QAAA6E,KACA7B,YAAAnD,EAAAG,QAAA6E,KACArD,UAAA3B,EAAAG,QAAA6E,KACAnC,OAAA7C,EAAAG,QAAAwE,KACA5L,SAAAiH,EAAAG,QAAA8E,KAAAF,WACAlM,UAAAmH,EAAAG,QAAA+E,OACAjM,IAAA+G,EAAAG,QAAA8E,KACA/B,gBAAAlD,EAAAG,QAAA8E,KACAhI,UAAA+C,EAAAG,QAAA+E,OACAvC,WAAA3C,EAAAG,QAAA6E,KACAhM,UAAAgH,EAAAG,QAAA6E,MAEA5E,EAAA+E,aAAA,CACAnI,QAAA,MACAlE,SAAA,EACAqK,aAAA,EACAtK,UAAA,EACAI,IAAA,KACAgE,UAAA,IACAjE,WAAA,EACA2I,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAK,gBAAA,MAEAxE,EAAAyB,QAAAC,EACA3B,EAAAC,UAAA","file":"mrstatic/js/study.2bd0e879.chunk.js","sourcesContent":["import React, { Component } 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 Component {\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'\nimport InfiniteScroll from \"react-infinite-scroller\";\nimport {HashLoader} from 'react-spinners'\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\n page = 1\n num = 10\n state = {\n courses: [],\n live: [],\n page: 1,\n hasMore: false\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 hasMore: true\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.page++}/${this.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 loadFunc = () => {\n if (this.state.hasMore) {\n this.setState({\n hasMore: this.state.courses.length % 10 === 0\n }, () => {\n this.getFreeCourses()\n .then(res => {\n let data = res.data\n if (data.code == 200) {\n Array.isArray(data.data) && this.setState({\n courses: this.state.courses.concat(data.data),\n hasMore: data.data.length % 10 === 0\n })\n } else {\n Toast.info(data.msg)\n }\n })\n })\n }\n }\n\n render() {\n return (\n <InfiniteScroll\n pageStart={0}\n loadMore={this.loadFunc}\n useWindow={false}\n className={'free-courses'}\n element={'ul'}\n hasMore={this.state.hasMore}\n threshold={250}\n >\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'] == 0 ? <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 </InfiniteScroll>\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)","module.exports = require('./dist/InfiniteScroll');","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;","'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","../node_modules/react-infinite-scroller/index.js","common/v-list-base/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","Component","connect","myCourses","Course","bind","top","src","alt","title","bottom","text","audience","FreeCourse","page","num","courses","live","getFreeCourses","http","get","API","home","getFreeLive","toLive","room_id","live_status","window","location","toast_default","setState","then","res","code","Array","isArray","msg","isEmpty","_this3","element","threshold","fill","classnames","LiveStatus","common_course_base","logo","freeCourses_Bottom","category","PureComponent","Study","position","match","url","replace","activeClassName","react_router","exact","from","path","component","FreeCourses","compose","WithFullSize","WithTab","module","exports","__webpack_require__","VList","react__WEBPACK_IMPORTED_MODULE_0___default","tab","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","offsetParent","calculateTopPosition","offsetHeight","innerHeight","offsetTop","renderProps","filterProps","children","keys","indexOf","hasOwnProperty","_objectWithoutProperties","node","childrenArray","unshift","propTypes","isRequired","bool","func","number","defaultProps"],"mappings":"gQAoBA,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,IA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,MAEA5E,EAAA+E,aAAA,CACAnI,QAAA,MACAlE,SAAA,EACAqK,aAAA,EACAtK,UAAA,EACAI,IAAA,KACAgE,UAAA,IACAjE,WAAA,EACA2I,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAK,gBAAA,MAEAxE,EAAAyB,QAAAC,EACA3B,EAAAC,UAAA","file":"mrstatic/js/study.2c0ce1c1.chunk.js","sourcesContent":["import React, { Component } 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 Component {\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'\nimport InfiniteScroll from \"react-infinite-scroller\";\nimport {HashLoader} from 'react-spinners'\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\n page = 1\n num = 10\n state = {\n courses: [],\n live: [],\n page: 1,\n hasMore: false\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 hasMore: true\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.page++}/${this.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 loadFunc = () => {\n if (this.state.hasMore) {\n this.setState({\n hasMore: this.state.courses.length % 10 === 0\n }, () => {\n this.getFreeCourses()\n .then(res => {\n let data = res.data\n if (data.code == 200) {\n Array.isArray(data.data) && this.setState({\n courses: this.state.courses.concat(data.data),\n hasMore: data.data.length % 10 === 0\n })\n } else {\n Toast.info(data.msg)\n }\n })\n })\n }\n }\n\n render() {\n return (\n <InfiniteScroll\n pageStart={0}\n loadMore={this.loadFunc}\n useWindow={false}\n className={'free-courses'}\n element={'ul'}\n hasMore={this.state.hasMore}\n threshold={250}\n >\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'] == 0 ? <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 </InfiniteScroll>\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)","module.exports = require('./dist/InfiniteScroll');","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;","'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([[23],{1174:function(e,a,t){"use strict";t.r(a);t(155);var n,s=t(76),c=t.n(s),r=(t(91),t(25)),i=t.n(r),o=(t(154),t(35)),l=t.n(o),m=(t(253),t(93)),u=t.n(m),d=(t(44),t(14)),p=t.n(d),E=t(5),f=t(7),v=t(6),N=t(8),h=t(9),_=t(0),g=t.n(_),b=(t(891),t(30)),y=t(3),w=t(21),C=t(16),k=Object(w.b)(function(e){return{user:e.user}})(n=function(e){function a(e){var t;return Object(E.a)(this,a),(t=Object(v.a)(this,Object(N.a)(a).call(this,e))).invitedFriends=function(){var e=t.state,a=e.pdd_price,n=e.number,s=e.data;if(y.b.isWeixin){var c=t.state.share;t.setState({share:!c}),Object(y.i)({title:"\u3010\u4ec5\u5269".concat(n,"\u4e2a\u540d\u989d\u3011\u6211").concat(a,"\u5143\u62fc\u4e86\u300a").concat(s.course_title,"\u300b"),desc:s.course_title,link:location.href,imgUrl:s.image_name})}else p.a.info("\u8bf7\u5728\u5fae\u4fe1\u4e2d\u4f7f\u7528\u5206\u4eab\u529f\u80fd\uff01",2)},t.toCourseDetail=function(e){return t.props.history.push("/detail?id=".concat(e),{href:"/classify"}),!1},t.handleToGroup=function(){var e=t.state,a=e.isBuy,n=void 0!==a&&a,s=e.data,c=void 0===s?{}:s,r=t.props,i=r.user,o=r.history,l=r.location;i.hasError?o.push("/passport",{from:l}):n?t.setState({modal:!0}):o.push("/order?id=".concat(c.course_id),{group:1})},t.state={data:{},share:!1,pdd_price:0,groupon_member:[],person_num:0,is_success:!1,number:0,isBuy:!1,modal:!1},t}return Object(h.a)(a,e),Object(f.a)(a,[{key:"componentDidMount",value:function(){var e=this;y.d.get("".concat(API["base-api"],"/pdd/info/").concat(Object(y.c)("id"))).then(function(a){if(0===a.data.errno){if(e.setState({data:a.data.data.course_info,pdd_price:a.data.data.pdd_price,groupon_member:a.data.data.groupon_member,is_success:a.data.data.is_success,person_num:a.data.data.person_num,course_list:a.data.data.course_list,number:a.data.data.number,countdown:"",isBuy:a.data.data.is_buy}),0===a.data.data.is_success){var t=1e3*a.data.data.end_time,n=0,s=0,c=0;setInterval(function(){t-=1e3,n="".concat(parseInt(t/36e5)).padStart(2,0),s="".concat(parseInt((t-36e5*n)/6e4)).padStart(2,0),c="".concat(parseInt((t-36e5*n-6e4*s)/1e3)).padStart(2,0),e.setState({countdown:"".concat(n,":").concat(s,":").concat(c)})},1e3)}}else p.a.info(a.data.msg,2)})}},{key:"render",value:function(){var e=this,a=this.state,t=a.data,n=t.course_id,s=t.course_title,c=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),d=g.a.createElement("div",{className:"info"},g.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(n)}},s),g.a.createElement("p",{className:"contact text-overflow-2"},c),g.a.createElement("div",{className:"des"},g.a.createElement("p",{className:"course-price"},g.a.createElement("span",{className:"new"},"\xa5",i),g.a.createElement("span",{className:"old"},"\xa5",r))));return g.a.createElement("div",{className:"to-group-box"},g.a.createElement(b.e,{title:"\u62fc\u56e2",cart:!1,toHref:"/"}),g.a.createElement(u.a,{transparent:!0,visible:this.state.modal,title:"\u63d0\u793a",footer:[{text:"\u786e\u5b9a",onPress:function(){e.setState({modal:!1}),e.props.history.push("/")}}]},g.a.createElement("p",null,"\u60a8\u5df2\u7ecf\u8d2d\u4e70\u8fc7\u8be5\u8bfe\u7a0b\uff5e")),!o&&g.a.createElement(b.j,{img:this.state.data.image_name,id:this.state.data.course_id,info:d,toDetail:this.toCourseDetail}),g.a.createElement(j,{data:this.state,invitedFriends:this.invitedFriends,handleToGroup:this.handleToGroup,userInfo:this.props.user}),g.a.createElement(l.a,null),g.a.createElement("div",{className:"group-course"},g.a.createElement("div",{className:"top-title"},g.a.createElement("span",null,"\u672c\u5468\u7279\u60e0"),g.a.createElement(C.b,{to:"/preferential",className:"more"},"\u66f4\u591a",g.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=g.a.createElement("div",{className:"info"},g.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(a.course_id)}},a.course_title),g.a.createElement("p",{className:"contact text-overflow-2"},a.simpledescription),g.a.createElement("div",{className:"des"},g.a.createElement("p",{className:"course-price"},g.a.createElement("span",{className:"new"},"\xa5",a.price1),g.a.createElement("span",{className:"old"},"\xa5",a.price0))));return g.a.createElement(b.j,{img:a.image_name,key:a.uid,id:a.course_id,info:t,toDetail:e.toCourseDetail})})))}}]),a}(_.Component))||n;function j(e){for(var a,t,n,s,r=e.data,o=r.pdd_price,l=r.data,m=r.groupon_member,u=r.is_success,d=r.person_num,p=r.share,E=r.number,f=r.countdown,v=e.userInfo,N=[],h=E;0!=h;)N.push(h),h--;if(s=g.a.createElement("div",{className:"group-user-list"},g.a.createElement(i.a,{justify:"center",className:"imgList"},m.map(function(e){return g.a.createElement("div",{className:"imgContainer",key:Math.random()},g.a.createElement("img",{className:"imgname",src:e.avatar,alt:""}),1===e.user_type?g.a.createElement("div",{className:"leaderFlag"},g.a.createElement("span",null,"\u56e2\u957f")):null)}),N.map(function(e){return g.a.createElement("div",{className:"imgContainer",key:Math.random()},g.a.createElement("div",{className:"imgname"},g.a.createElement("i",{className:"iconfont iconwode-xianxing no-body"})))}))),m&&m.length>0){var _=!1;!v.hasError&&m.map(function(e){e.uid==v.data.uid&&(_=!0)}),_?(a=g.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(l.price1-o,"\u5143")),t=g.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",f," \u540e\u7ed3\u675f"),n=g.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")):(a=g.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(l.price1-o,"\u5143")),t=g.a.createElement("a",{href:"javascript:;",className:"group-btn",onClick:e.handleToGroup},"\u4e00\u952e\u53c2\u56e2"))}return 1===u&&(a=g.a.createElement("p",{className:"success"},"\u62fc\u56e2\u6210\u529f"),t=g.a.createElement(C.b,{to:"/detail?id=".concat(l.course_id),className:"tostudy"},"\u53bb\u5b66\u4e60")),g.a.createElement("div",{className:"gorup-content"},p?g.a.createElement("div",{className:"groupSuccessMbc",onClick:e.invitedFriends},g.a.createElement("div",{className:"tipContent"},"\u8fd8\u5dee".concat(E,"\u4eba\uff0c\u5206\u4eab\u52303\u4e2a\u7fa4\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")),g.a.createElement("div",{className:"tipArrow"},g.a.createElement("i",{className:"iconfont iconyindao"}))):null,a,g.a.createElement(c.a,null,s),g.a.createElement(c.a,null,t),n,!u&&g.a.createElement("div",{className:"group-dec"},g.a.createElement("span",null,g.a.createElement("i",{className:"iconfont iconiconfront-1"}),"\xb7\u597d\u53cb\u53c2\u56e2 \xb7\u4eba\u6ee1\u6210\u4ea4 \xb7\u4eba\u4e0d\u6ee1\u9000\u6b3e"),g.a.createElement("span",{className:"allNum"},"\u7d2f\u8ba1".concat(d,"\u4eba\u6210\u56e2"))))}a.default=k},891:function(e,a,t){}}]);
//# sourceMappingURL=togroup.3e165b5f.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{1174:function(e,a,t){"use strict";t.r(a);t(155);var n,s=t(76),c=t.n(s),r=(t(91),t(25)),i=t.n(r),o=(t(154),t(35)),l=t.n(o),m=(t(253),t(93)),u=t.n(m),d=(t(44),t(14)),p=t.n(d),E=t(5),f=t(7),v=t(6),N=t(8),h=t(9),_=t(0),g=t.n(_),b=(t(891),t(30)),y=t(3),w=t(21),C=t(17),k=Object(w.b)(function(e){return{user:e.user}})(n=function(e){function a(e){var t;return Object(E.a)(this,a),(t=Object(v.a)(this,Object(N.a)(a).call(this,e))).invitedFriends=function(){var e=t.state,a=e.pdd_price,n=e.number,s=e.data;if(y.b.isWeixin){var c=t.state.share;t.setState({share:!c}),Object(y.i)({title:"\u3010\u4ec5\u5269".concat(n,"\u4e2a\u540d\u989d\u3011\u6211").concat(a,"\u5143\u62fc\u4e86\u300a").concat(s.course_title,"\u300b"),desc:s.course_title,link:location.href,imgUrl:s.image_name})}else p.a.info("\u8bf7\u5728\u5fae\u4fe1\u4e2d\u4f7f\u7528\u5206\u4eab\u529f\u80fd\uff01",2)},t.toCourseDetail=function(e){return t.props.history.push("/detail?id=".concat(e),{href:"/classify"}),!1},t.handleToGroup=function(){var e=t.state,a=e.isBuy,n=void 0!==a&&a,s=e.data,c=void 0===s?{}:s,r=t.props,i=r.user,o=r.history,l=r.location;i.hasError?o.push("/passport",{from:l}):n?t.setState({modal:!0}):o.push("/order?id=".concat(c.course_id),{group:1})},t.state={data:{},share:!1,pdd_price:0,groupon_member:[],person_num:0,is_success:!1,number:0,isBuy:!1,modal:!1},t}return Object(h.a)(a,e),Object(f.a)(a,[{key:"componentDidMount",value:function(){var e=this;y.d.get("".concat(API["base-api"],"/pdd/info/").concat(Object(y.c)("id"))).then(function(a){if(0===a.data.errno){if(e.setState({data:a.data.data.course_info,pdd_price:a.data.data.pdd_price,groupon_member:a.data.data.groupon_member,is_success:a.data.data.is_success,person_num:a.data.data.person_num,course_list:a.data.data.course_list,number:a.data.data.number,countdown:"",isBuy:a.data.data.is_buy}),0===a.data.data.is_success){var t=1e3*a.data.data.end_time,n=0,s=0,c=0;setInterval(function(){t-=1e3,n="".concat(parseInt(t/36e5)).padStart(2,0),s="".concat(parseInt((t-36e5*n)/6e4)).padStart(2,0),c="".concat(parseInt((t-36e5*n-6e4*s)/1e3)).padStart(2,0),e.setState({countdown:"".concat(n,":").concat(s,":").concat(c)})},1e3)}}else p.a.info(a.data.msg,2)})}},{key:"render",value:function(){var e=this,a=this.state,t=a.data,n=t.course_id,s=t.course_title,c=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),d=g.a.createElement("div",{className:"info"},g.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(n)}},s),g.a.createElement("p",{className:"contact text-overflow-2"},c),g.a.createElement("div",{className:"des"},g.a.createElement("p",{className:"course-price"},g.a.createElement("span",{className:"new"},"\xa5",i),g.a.createElement("span",{className:"old"},"\xa5",r))));return g.a.createElement("div",{className:"to-group-box"},g.a.createElement(b.e,{title:"\u62fc\u56e2",cart:!1,toHref:"/"}),g.a.createElement(u.a,{transparent:!0,visible:this.state.modal,title:"\u63d0\u793a",footer:[{text:"\u786e\u5b9a",onPress:function(){e.setState({modal:!1}),e.props.history.push("/")}}]},g.a.createElement("p",null,"\u60a8\u5df2\u7ecf\u8d2d\u4e70\u8fc7\u8be5\u8bfe\u7a0b\uff5e")),!o&&g.a.createElement(b.j,{img:this.state.data.image_name,id:this.state.data.course_id,info:d,toDetail:this.toCourseDetail}),g.a.createElement(j,{data:this.state,invitedFriends:this.invitedFriends,handleToGroup:this.handleToGroup,userInfo:this.props.user}),g.a.createElement(l.a,null),g.a.createElement("div",{className:"group-course"},g.a.createElement("div",{className:"top-title"},g.a.createElement("span",null,"\u672c\u5468\u7279\u60e0"),g.a.createElement(C.b,{to:"/preferential",className:"more"},"\u66f4\u591a",g.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=g.a.createElement("div",{className:"info"},g.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(a.course_id)}},a.course_title),g.a.createElement("p",{className:"contact text-overflow-2"},a.simpledescription),g.a.createElement("div",{className:"des"},g.a.createElement("p",{className:"course-price"},g.a.createElement("span",{className:"new"},"\xa5",a.price1),g.a.createElement("span",{className:"old"},"\xa5",a.price0))));return g.a.createElement(b.j,{img:a.image_name,key:a.uid,id:a.course_id,info:t,toDetail:e.toCourseDetail})})))}}]),a}(_.Component))||n;function j(e){for(var a,t,n,s,r=e.data,o=r.pdd_price,l=r.data,m=r.groupon_member,u=r.is_success,d=r.person_num,p=r.share,E=r.number,f=r.countdown,v=e.userInfo,N=[],h=E;0!=h;)N.push(h),h--;if(s=g.a.createElement("div",{className:"group-user-list"},g.a.createElement(i.a,{justify:"center",className:"imgList"},m.map(function(e){return g.a.createElement("div",{className:"imgContainer",key:Math.random()},g.a.createElement("img",{className:"imgname",src:e.avatar,alt:""}),1===e.user_type?g.a.createElement("div",{className:"leaderFlag"},g.a.createElement("span",null,"\u56e2\u957f")):null)}),N.map(function(e){return g.a.createElement("div",{className:"imgContainer",key:Math.random()},g.a.createElement("div",{className:"imgname"},g.a.createElement("i",{className:"iconfont iconwode-xianxing no-body"})))}))),m&&m.length>0){var _=!1;!v.hasError&&m.map(function(e){e.uid==v.data.uid&&(_=!0)}),_?(a=g.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(l.price1-o,"\u5143")),t=g.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",f," \u540e\u7ed3\u675f"),n=g.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")):(a=g.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(l.price1-o,"\u5143")),t=g.a.createElement("a",{href:"javascript:;",className:"group-btn",onClick:e.handleToGroup},"\u4e00\u952e\u53c2\u56e2"))}return 1===u&&(a=g.a.createElement("p",{className:"success"},"\u62fc\u56e2\u6210\u529f"),t=g.a.createElement(C.b,{to:"/detail?id=".concat(l.course_id),className:"tostudy"},"\u53bb\u5b66\u4e60")),g.a.createElement("div",{className:"gorup-content"},p?g.a.createElement("div",{className:"groupSuccessMbc",onClick:e.invitedFriends},g.a.createElement("div",{className:"tipContent"},"\u8fd8\u5dee".concat(E,"\u4eba\uff0c\u5206\u4eab\u52303\u4e2a\u7fa4\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")),g.a.createElement("div",{className:"tipArrow"},g.a.createElement("i",{className:"iconfont iconyindao"}))):null,a,g.a.createElement(c.a,null,s),g.a.createElement(c.a,null,t),n,!u&&g.a.createElement("div",{className:"group-dec"},g.a.createElement("span",null,g.a.createElement("i",{className:"iconfont iconiconfront-1"}),"\xb7\u597d\u53cb\u53c2\u56e2 \xb7\u4eba\u6ee1\u6210\u4ea4 \xb7\u4eba\u4e0d\u6ee1\u9000\u6b3e"),g.a.createElement("span",{className:"allNum"},"\u7d2f\u8ba1".concat(d,"\u4eba\u6210\u56e2"))))}a.default=k},891:function(e,a,t){}}]);
//# sourceMappingURL=togroup.03b425a3.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/detail/group/togroup.js"],"names":["ToGroup","connect","state","user","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_10__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_12__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_13__","call","invitedFriends","_this$state","pdd_price","number","data","browser","isWeixin","share","setState","wxShare","title","concat","course_title","desc","link","location","href","imgUrl","image_name","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_9___default","a","info","toCourseDetail","id","history","push","handleToGroup","_this$state2","_this$state2$isBuy","isBuy","_this$state2$data","_this$props","hasError","from","modal","course_id","group","groupon_member","person_num","is_success","_this2","http","get","API","getParam","then","res","errno","course_info","course_list","countdown","is_buy","date","end_time","hours","minutes","seconds","setInterval","parseInt","padStart","msg","_this3","_this$state3","_this$state3$data","simpledescription","price0","price1","Info","react__WEBPACK_IMPORTED_MODULE_15___default","createElement","className","onClick","_common__WEBPACK_IMPORTED_MODULE_17__","cart","toHref","antd_mobile_lib_modal__WEBPACK_IMPORTED_MODULE_7___default","transparent","visible","footer","text","onPress","img","toDetail","GorupContent","userInfo","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_5___default","react_router_dom__WEBPACK_IMPORTED_MODULE_20__","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","flag","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_1___default"],"mappings":"kUAUMA,EADLC,YAAQ,SAAAC,GAAK,MAAK,CAACC,KAAMD,EAAMC,sBAE5B,SAAAH,EAAYI,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAR,IACfK,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAN,GAAAW,KAAAH,KAAMJ,KAcVQ,eAAiB,WAAM,IAAAC,EACeR,EAAKH,MAAhCY,EADYD,EACZC,UAAWC,EADCF,EACDE,OAAQC,EADPH,EACOG,KAC1B,GAAIC,IAAQC,SAAU,CAClB,IAAIC,EAAQd,EAAKH,MAAMiB,MACvBd,EAAKe,SAAS,CACVD,OAAQA,IAEZE,YAAQ,CACJC,MAAK,qBAAAC,OAAQR,EAAR,kCAAAQ,OAAsBT,EAAtB,4BAAAS,OAAsCP,EAAKQ,aAA3C,UACLC,KAAMT,EAAKQ,aACXE,KAAMC,SAASC,KACfC,OAAQb,EAAKc,kBAIjBC,EAAAC,EAAMC,KAAK,2EAAgB,IA9BhB5B,EAsEnB6B,eAAiB,SAACC,GAGd,OAFkB9B,EAAKD,MAAhBgC,QACCC,KAAR,cAAAd,OAA2BY,GAAM,CAACP,KAAM,eACjC,GAzEQvB,EA4EnBiC,cAAgB,WAAM,IAAAC,EACiBlC,EAAKH,MADtBsC,EAAAD,EACXE,aADW,IAAA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,KACKgF,GAELhC,EAAAhD,EAAAiD,cAAA4C,EAAA7F,EAAA,KACK8E,GAEJC,GAEI5D,GACD6B,EAAAhD,EAAAiD,cAAA,OAAKC,UAAU,aACXF,EAAAhD,EAAAiD,cAAA,YACID,EAAAhD,EAAAiD,cAAA,KAAGC,UAAU,6BADjB,kGAIAF,EAAAhD,EAAAiD,cAAA,QAAMC,UAAU,UAAhB,eAAA3D,OAA+B2B,EAA/B,yBAOLlD","file":"mrstatic/js/togroup.3e165b5f.chunk.js","sourcesContent":["import React, { Component } from 'react'\nimport './togroup.scss'\nimport { HeaderBar, VList } from '../../../common'\nimport { getParam, http, browser, wxShare } from \"@/utils\";\nimport { connect } from \"react-redux\"\nimport { Link } from \"react-router-dom\"\nimport { WingBlank, WhiteSpace, Flex, Toast, Modal } from 'antd-mobile'\n\n\n@connect(state => ({user: state.user}))\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 number: 0, // 差几人成团\n isBuy: false,\n modal: false,\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 wxShare({\n title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`,\n desc: data.course_title,\n link: location.href,\n imgUrl: data.image_name,\n });\n\n } else {\n Toast.info('请在微信中使用分享功能!', 2);\n }\n }\n\n componentDidMount() {\n http.get(`${API['base-api']}/pdd/info/${getParam('id')}`).then(res => {\n if (res.data.errno !== 0) {\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 number: res.data.data.number,\n countdown: '',\n isBuy: res.data.data.is_buy\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 {history} = this.props;\n history.push(`/detail?id=${id}`, {href: '/classify'});\n return false;\n }\n\n handleToGroup = () => {\n const {isBuy = false, data = {}} = this.state;\n const {user, history, location} = this.props;\n if (user.hasError) {\n history.push('/passport', {from: location})\n return\n }\n\n\n if (!isBuy) {\n history.push(\n `/order?id=${data.course_id}`,\n {\n group: 1\n }\n )\n } else {\n this.setState({\n modal: true\n })\n }\n }\n\n render() {\n const {data: {course_id, course_title, simpledescription, price0, price1}, pdd_price, is_success, person_num, groupon_member, course_list} = this.state;\n const Info = (\n <div className=\"info\">\n <p className='title' 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={'/'}></HeaderBar>\n <Modal\n transparent\n visible={this.state.modal}\n title=\"提示\"\n footer={[\n {\n text: '确定',\n onPress: () => {\n this.setState({\n modal: false\n });\n this.props.history.push('/');\n }\n }\n ]}\n >\n <p>您已经购买过该课程~</p>\n </Modal>\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\n data={this.state}\n invitedFriends={this.invitedFriends}\n handleToGroup={this.handleToGroup}\n userInfo={this.props.user}\n />\n\n <WhiteSpace></WhiteSpace>\n <div className=\"group-course\">\n <div className=\"top-title\">\n <span>本周特惠</span>\n <Link to={`/preferential`} className='more'>更多<i\n 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, share, number, countdown} = props.data;\n const {userInfo} = props\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 flag = false;\n !userInfo.hasError && groupon_member.map(item => {\n if (item.uid == userInfo.data.uid) {\n flag = true\n }\n })\n\n if (flag) {\n tip = <p className='tip'>{`拼团省¥${data.price1 - 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'>{`拼团省¥${data.price1 - pdd_price}元`}</p>\n // btn = <Link to={{\n // pathname: '/order',\n // search: `?id=${data.course_id}`,\n // state: {\n // group: 1\n // }\n // }} className='group-btn'>一键参团</Link>\n btn = <a href=\"javascript:;\" className='group-btn' onClick={props.handleToGroup}>一键参团</a>\n }\n }\n\n if (is_success === 1) {\n tip = <p className='success'>拼团成功</p>\n btn = <Link to={`/detail?id=${data.course_id}`} 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","state","user","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_10__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_12__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_13__","call","invitedFriends","_this$state","pdd_price","number","data","browser","isWeixin","share","setState","wxShare","title","concat","course_title","desc","link","location","href","imgUrl","image_name","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_9___default","a","info","toCourseDetail","id","history","push","handleToGroup","_this$state2","_this$state2$isBuy","isBuy","_this$state2$data","_this$props","hasError","from","modal","course_id","group","groupon_member","person_num","is_success","_this2","http","get","API","getParam","then","res","errno","course_info","course_list","countdown","is_buy","date","end_time","hours","minutes","seconds","setInterval","parseInt","padStart","msg","_this3","_this$state3","_this$state3$data","simpledescription","price0","price1","Info","react__WEBPACK_IMPORTED_MODULE_15___default","createElement","className","onClick","_common__WEBPACK_IMPORTED_MODULE_17__","cart","toHref","antd_mobile_lib_modal__WEBPACK_IMPORTED_MODULE_7___default","transparent","visible","footer","text","onPress","img","toDetail","GorupContent","userInfo","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_5___default","react_router_dom__WEBPACK_IMPORTED_MODULE_20__","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","flag","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_1___default"],"mappings":"kUAUMA,EADLC,YAAQ,SAAAC,GAAK,MAAK,CAACC,KAAMD,EAAMC,sBAE5B,SAAAH,EAAYI,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAR,IACfK,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAN,GAAAW,KAAAH,KAAMJ,KAcVQ,eAAiB,WAAM,IAAAC,EACeR,EAAKH,MAAhCY,EADYD,EACZC,UAAWC,EADCF,EACDE,OAAQC,EADPH,EACOG,KAC1B,GAAIC,IAAQC,SAAU,CAClB,IAAIC,EAAQd,EAAKH,MAAMiB,MAC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,EAAAhD,EAAAiD,cAACiB,EAAA,EAAD,CAAMC,GAAE,cAAA5E,OAAgBP,EAAK+B,WAAamC,UAAU,WAApD,uBAGNF,EAAAhD,EAAAiD,cAAA,OAAKC,UAAU,iBAEP/D,EACI6D,EAAAhD,EAAAiD,cAAA,OAAKC,UAAU,kBAAkBC,QAAS/E,EAAMQ,gBAC5CoE,EAAAhD,EAAAiD,cAAA,OAAKC,UAAU,cAAf,eAAA3D,OAEUR,EAFV,uFAIAiE,EAAAhD,EAAAiD,cAAA,OAAKC,UAAU,YACXF,EAAAhD,EAAAiD,cAAA,KAAGC,UAAU,0BAGrB,KAGP2B,EACD7B,EAAAhD,EAAAiD,cAAA4C,EAAA7F,EAAA,KACKgF,GAELhC,EAAAhD,EAAAiD,cAAA4C,EAAA7F,EAAA,KACK8E,GAEJC,GAEI5D,GACD6B,EAAAhD,EAAAiD,cAAA,OAAKC,UAAU,aACXF,EAAAhD,EAAAiD,cAAA,YACID,EAAAhD,EAAAiD,cAAA,KAAGC,UAAU,6BADjB,kGAIAF,EAAAhD,EAAAiD,cAAA,QAAMC,UAAU,UAAhB,eAAA3D,OAA+B2B,EAA/B,yBAOLlD","file":"mrstatic/js/togroup.03b425a3.chunk.js","sourcesContent":["import React, { Component } from 'react'\nimport './togroup.scss'\nimport { HeaderBar, VList } from '../../../common'\nimport { getParam, http, browser, wxShare } from \"@/utils\";\nimport { connect } from \"react-redux\"\nimport { Link } from \"react-router-dom\"\nimport { WingBlank, WhiteSpace, Flex, Toast, Modal } from 'antd-mobile'\n\n\n@connect(state => ({user: state.user}))\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 number: 0, // 差几人成团\n isBuy: false,\n modal: false,\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 wxShare({\n title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`,\n desc: data.course_title,\n link: location.href,\n imgUrl: data.image_name,\n });\n\n } else {\n Toast.info('请在微信中使用分享功能!', 2);\n }\n }\n\n componentDidMount() {\n http.get(`${API['base-api']}/pdd/info/${getParam('id')}`).then(res => {\n if (res.data.errno !== 0) {\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 number: res.data.data.number,\n countdown: '',\n isBuy: res.data.data.is_buy\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 {history} = this.props;\n history.push(`/detail?id=${id}`, {href: '/classify'});\n return false;\n }\n\n handleToGroup = () => {\n const {isBuy = false, data = {}} = this.state;\n const {user, history, location} = this.props;\n if (user.hasError) {\n history.push('/passport', {from: location})\n return\n }\n\n\n if (!isBuy) {\n history.push(\n `/order?id=${data.course_id}`,\n {\n group: 1\n }\n )\n } else {\n this.setState({\n modal: true\n })\n }\n }\n\n render() {\n const {data: {course_id, course_title, simpledescription, price0, price1}, pdd_price, is_success, person_num, groupon_member, course_list} = this.state;\n const Info = (\n <div className=\"info\">\n <p className='title' 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={'/'}></HeaderBar>\n <Modal\n transparent\n visible={this.state.modal}\n title=\"提示\"\n footer={[\n {\n text: '确定',\n onPress: () => {\n this.setState({\n modal: false\n });\n this.props.history.push('/');\n }\n }\n ]}\n >\n <p>您已经购买过该课程~</p>\n </Modal>\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\n data={this.state}\n invitedFriends={this.invitedFriends}\n handleToGroup={this.handleToGroup}\n userInfo={this.props.user}\n />\n\n <WhiteSpace></WhiteSpace>\n <div className=\"group-course\">\n <div className=\"top-title\">\n <span>本周特惠</span>\n <Link to={`/preferential`} className='more'>更多<i\n 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, share, number, countdown} = props.data;\n const {userInfo} = props\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 flag = false;\n !userInfo.hasError && groupon_member.map(item => {\n if (item.uid == userInfo.data.uid) {\n flag = true\n }\n })\n\n if (flag) {\n tip = <p className='tip'>{`拼团省¥${data.price1 - 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'>{`拼团省¥${data.price1 - pdd_price}元`}</p>\n // btn = <Link to={{\n // pathname: '/order',\n // search: `?id=${data.course_id}`,\n // state: {\n // group: 1\n // }\n // }} className='group-btn'>一键参团</Link>\n btn = <a href=\"javascript:;\" className='group-btn' onClick={props.handleToGroup}>一键参团</a>\n }\n }\n\n if (is_success === 1) {\n tip = <p className='success'>拼团成功</p>\n btn = <Link to={`/detail?id=${data.course_id}`} 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([[24],{1191:function(e,t,a){"use strict";a.r(t);a(44);var n,c=a(14),i=a.n(c),o=a(5),s=a(7),r=a(6),d=a(8),l=a(9),u=a(75),p=(a(253),a(93)),m=a.n(p),h=a(0),f=a.n(h),v=a(163),y=(a(789),a(16)),g=a(48),b=a(3),_=a(21),E=(a(74),a(790),a(644)),S=function(e){var t=e.item;return f.a.createElement("div",{className:"bottom"},f.a.createElement("span",{className:"price"},"\xa5",t.price1),f.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},w=Object(_.b)()(n=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,c=new Array(n),s=0;s<n;s++)c[s]=arguments[s];return(a=Object(r.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(c)))).state={num:10,list:[],courseId:null},a.getRecommendation=function(){b.d.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;t.dispatch;t.history.push("/detail?id=".concat(e))},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.getRecommendation()}},{key:"render",value:function(){var e=this;return this.state.list.length?f.a.createElement("div",{className:"recommendation"},f.a.createElement("div",{className:"title"},"\u76f8\u5173\u63a8\u8350"),f.a.createElement("ul",null,this.state.list.map(function(t){var a=f.a.createElement("div",{className:"info"},f.a.createElement("p",{className:"title text-overflow-1"},t.course_title),f.a.createElement("p",{className:"des text-overflow-2"},t.simpledescription),f.a.createElement(S,{item:t}));return f.a.createElement(E.a,{key:t.course_id,img:t.image_name,handleClick:e.toCourseDetail,info:a,id:t.course_id})}))):null}}]),t}(h.PureComponent))||n,I=(a(791),a(15)),N=a.n(I),P=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return(a=Object(r.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(c)))).handleClick=function(e){a.props.selectVideo(e)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this;return f.a.createElement("div",{className:"video-catalog"},f.a.createElement("ul",null,this.props.videoCatalog.map(function(t,a){return f.a.createElement("li",{key:t.id,className:N()({active:e.props.activeIndex===a})},f.a.createElement("div",{className:"video-title",onClick:e.handleClick.bind(e,a)},f.a.createElement("span",{className:"title"},t.name),f.a.createElement("span",{className:"duration"},t.duration),f.a.createElement("i",{className:N()("iconfont",[0===t.video_auth?"iconiconfront-74":"iconplay_hovericon"])})),t.practice&&t.practice.qid?f.a.createElement(y.b,{to:{pathname:t.practice.is_tested?"/campResolve":"/campTest",search:"?keshi_id=".concat(t.id,"&qid=").concat(t.practice.qid),state:{from:"/play/video".concat(window.location.search)}}},f.a.createElement("div",{className:"exercise"},"\u8bfe\u540e\u7ec3\u4e60\uff1a",t.practice.title,f.a.createElement("i",{className:N()("iconfont",t.video_auth?t.practice.is_tested?"iconiconfront-3":"":"iconiconfront-74")}))):null)})))}}]),t}(h.Component),O=(a(792),a(794)),x=a.n(O),k=(a(795),function(e){function t(){return Object(o.a)(this,t),Object(r.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.datum;return f.a.createElement("div",{className:"datum-catalog"},f.a.createElement("p",{className:"prompt"},"\u8bfe\u7a0b\u8d44\u6599\u8bf7\u5230PC\u7aef\u64ad\u653e\u9875\u4e0b\u8f7d"),f.a.createElement(x.a,null,e&&e.length&&e.map(function(e,t){return f.a.createElement(x.a.Panel,{header:e.dir_name,key:t},e.files.map(function(e){return f.a.createElement("div",{key:e.file_id,className:"file-name"},e.file_name)}))})))}}]),t}(h.Component));k.defaultProps={datum:[{dir_name:"",files:[{file_name:"",file_id:0}]}]};var j=k,C=a(778),T=(a(841),a(30)),A=a(39),B=a.n(A),R=a(842),L=a.n(R),D=a(656),M=a(657),W=a(1169),J=C.a.getComponent("Component"),z=C.a.getComponent("Button"),V=function(e){function t(){return Object(o.a)(this,t),Object(r.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(s.a)(t,[{key:"createEl",value:function(){return Object(W.a)(Object(d.a)(t.prototype),"createEl",this).call(this,"div",{className:"vjs-custom-play-button-cover"})}},{key:"dispose",value:function(){this.el_&&(this.el_=null)}}]),t}(J),q=function(e){function t(e,a){var n;return Object(o.a)(this,t),(n=Object(r.a)(this,Object(d.a)(t).call(this,e,a))).on("tap",n.tap),n}return Object(l.a)(t,e),Object(s.a)(t,[{key:"createEl",value:function(){return Object(W.a)(Object(d.a)(t.prototype),"createEl",this).call(this,"button",{className:"vjs-custom-play-button"},{type:"button"})}},{key:"tap",value:function(){this.player_.play()}},{key:"dispose",value:function(){this.el_&&(this.off("tap",this.tap),this.el_=null)}}]),t}(z);J.registerComponent("CustomPlayButton",q),V.prototype.options_={children:["CustomPlayButton"]},J.registerComponent("CustomPlayButtonCover",V);var H=m.a.alert;function U(e){return e.isShow&&f.a.createElement("div",{className:"progress-share-modal-wrapper"},f.a.createElement("div",{className:"progress-share-modal"},f.a.createElement("div",{className:"title"},"\u6bcf\u65e5\u6253\u5361"),f.a.createElement("ul",{className:"progress-container"},f.a.createElement("li",null,f.a.createElement("div",{className:"title"},"\u7d2f\u8ba1\u5b66\u4e60"),f.a.createElement("div",{className:"number"},f.a.createElement("span",{className:"num"},e.data.learn_day_count),"\u5929")),f.a.createElement("li",null,f.a.createElement("div",{className:"title"},"\u884c\u52a8\u529b\u8d85\u8fc7"),f.a.createElement("div",{className:"number"},f.a.createElement("span",{className:"num"},parseFloat(e.data.action_power)),"%"))),f.a.createElement("div",{className:"share-container"},f.a.createElement("div",{className:"title"},"\u5206\u4eab\u5230"),f.a.createElement("ul",null,f.a.createElement("li",{className:"share-icon"},f.a.createElement("a",{style:{display:"block"},href:e.data.url},f.a.createElement("div",{className:"icon"},f.a.createElement("i",{className:"iconfont iconweixinzhifu"})),f.a.createElement("div",{className:"text"},"\u5fae\u4fe1\u597d\u53cb"))),f.a.createElement("li",{className:"share-icon"},f.a.createElement("a",{style:{display:"block"},href:e.data.url},f.a.createElement("div",{className:"icon"},f.a.createElement("i",{className:"iconfont iconpengyouquaniconx"})),f.a.createElement("div",{className:"text"},"\u670b\u53cb\u5708"))))),f.a.createElement("i",{className:"iconfont iconiconfront-2 close",onClick:e.closeShareModal})))}var F=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,c=new Array(n),s=0;s<n;s++)c[s]=arguments[s];return(a=Object(r.a)(this,(e=Object(d.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:{},salePrice:null,vCourseId:null,isLoading:!0,isShowShareModal:!1,shareData:{},singleBox:!1,singMess:"",singleType:1,nowPrice:0,laterPrice:0},a.tobuy=function(){var e=a.state.course,t=void 0===e?{}:e;b.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(t.course_id,"]")).then(function(e){0===e.data.errno?a.props.history.push("/order?id=".concat(t.course_id),{simple:1}):i.a.info(e.data.msg,2)})},a.toSingleset=function(e){a.setState({singleBox:!0,singleType:1,singMess:e}),window.localStorage.setItem("singMess",JSON.stringify(e))},a.boxHide=function(e){a.setState({singleBox:e,singleType:1})},a.payCallback=function(){var e=Object(u.a)(Object(u.a)(a));Object(b.c)("oid")&&(a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),e.intervalPayStatus=setInterval(function(){b.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(b.c)("oid"))).then(function(t){401===t.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,b.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(b.c)("oid"))).then(function(t){200===Number(t.data.data.errno)?e.setState({singleType:6}):201===Number(t.data.data.errno)?e.setState({singleType:4}):202===Number(t.data.data.errno)?e.setState({singleType:3}):203===Number(t.data.data.errno)?e.setState({nowPrice:t.data.data.data.now_price,laterPrice:t.data.data.data.three_day_later_price,singleType:2}):i.a.info(t.data.data.msg,2)}))})},1e3))},a.isweixinPay=function(){var e=Object(u.a)(Object(u.a)(a)),t=Object(b.c)("code");if(t){if(!Object(b.c)("oid"))return;a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),b.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(b.c)("oid"),"/code/").concat(t)).then(function(t){if(0===t.data.errno){var a=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(t){"get_brand_wcpay_request:ok"==t.err_msg?(i.a.info("\u652f\u4ed8\u6210\u529f",2),e.intervalPayStatus=setInterval(function(){b.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(b.c)("oid"))).then(function(t){401===t.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,b.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(b.c)("oid"))).then(function(t){200===Number(t.data.data.errno)?e.setState({singleType:6}):201===Number(t.data.data.errno)?e.setState({singleType:4}):202===Number(t.data.data.errno)?e.setState({singleType:3}):203===Number(t.data.data.errno)?e.setState({nowPrice:t.data.data.data.now_price,laterPrice:t.data.data.data.three_day_later_price,singleType:2}):i.a.info(t.data.data.msg,2)}))})},1e3)):H("\u652f\u4ed8\u5931\u8d25")})},n=t.data.data;"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",a,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",a),document.attachEvent("onWeixinJSBridgeReady",a)):a()}else i.a.info(t.data.msg,2)})}},a.check=function(e){a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),b.d.get("".concat(API["base-api"],"/class_order_status/").concat(e)).then(function(e){200===Number(e.data.data.errno)?a.setState({singleType:6}):201===Number(e.data.data.errno)?a.setState({singleType:4}):202===Number(e.data.data.errno)?a.setState({singleType:3}):203===Number(e.data.data.errno)?a.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,singleType:2}):i.a.info(e.data.data.msg,2)})},a.setupRecord=function(){a.recordSocket=L()(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&&1===a.ws.readyState&&a.ws.send(JSON.stringify(e))},a.getShareProgressInfo=function(){b.d.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(){var e=a.state,t=e.videoList,n=e.activeIndex,c=e.vCourseId,i=e.course,o=void 0===i?{}:i;0!==Number(o.course_id)&&""!==o.course_id?o.is_aist?a.sendMessage({mtype:"count_schedule",uid:a.props.user.data.uid,token:a.token,platform:5}):a.sendMessage({mtype:"c_count_schedule",uid:a.props.user.data.uid,token:a.token,platform:5,video_id:t[n].id,course_id:a.courseID,v_course_id:c}):console.log("\u514d\u8d39\u8bfe\u7a0b \u62e6\u622a")},a.sendWatchTime=function(e,t){var n=a.state,c=n.videoList,i=n.activeIndex,o=n.vCourseId,s=n.course,r=void 0===s?{}:s;if(0!==Number(r.course_id)&&""!==r.course_id){if(0!==Number(e)){var d="c_watch_time";r.is_aist&&(d="watch_time"),a.sendMessage({mtype:d,rate:t,time:e,video_id:c[i].id,course_id:a.courseID,v_course_id:o,uid:a.props.user.data.uid,token:a.token,platform:0})}}else console.log("\u514d\u8d39\u8bfe\u7a0b \u62e6\u622a")},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:!1,textTrackDisplay:!1,posterImage:!1,errorDisplay:!1,playbackRates:["0.75","1","1.5","2"],controlBar:{pictureInPictureToggle:!1}}),a.player.addChild("CustomPlayButtonCover"),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.countSchedule(),a.getShareProgressInfo(),clearInterval(a.timer)}),a.player.on("seeked",function(){a.sendRecord()})},a.sendLastRecord=function(){b.d.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.state.activeIndex)?(a.setPlayerSrc(a.state.videoList[e].play_url),a.sendLastRecord(),a.playVideo()):a.getCoursePrice()}))},a.getLastVideoIndex=function(e){return a.state.videoList.findIndex(function(t){return t.id==e})},a.getVideoList=function(){var e="";e=Object(b.c)("video_id")?"".concat(API.home,"/m/course/play/").concat(a.courseID+"?video_id="+Object(b.c)("video_id")):"".concat(API.home,"/m/course/play/").concat(a.courseID),b.d.get(e).then(function(e){var t=e.data,n=t.data,c=void 0===n?{}:n;200===t.code?a.setState(function(e){return{videoList:c.lessons,currentVideoSrc:c.lessons[e.activeIndex].play_url,course:c.course,courseId:c.course.course_id,vCourseId:c.course.v_course_id,title:c.course.course_title,isLoading:!1}},a.playSetup):i.a.info(c.msg)})},a.playSetup=function(){var e=a.state.course,t=void 0===e?{}:e;0===Number(t.course_id)||""===t.course_id?console.log("\u514d\u8d39\u8bfe\u7a0b \u62e6\u622a"):(a.setupWS(),a.setupTimer(),a.countSchedule());var n=a.getLastVideoIndex(t.last_video_id);n=n>=0?n:0,a.setState({activeIndex:n},function(){a.lessonAvailable(n)?a.hasAuth(n)?Promise.resolve().then(function(){a.initializePlayer(),a.playWithAuth()}):a.getCoursePrice():H("\u6682\u65e0\u89c6\u9891","",[{text:"OK",onPress:function(){a.props.history.push("/")}}])})},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(e){return 0!==a.state.videoList[e].video_size},a.getCoursePrice=function(){var e=a.state.course,t=void 0===e?{}:e;b.d.get("".concat(API.home,"/sys/course/price/").concat(t.course_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(n)&&a.setPlayerSrc(t[n].play_url)},a.hasAuth=function(e){return a.state.videoList[e].video_auth?(a.setState({isAuth:!0}),!0):(a.setState({isAuth:!1}),!1)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){if("https:"!==window.location.protocol)if(this.courseID=Object(b.c)("id"),this.courseID){this.setState({courseId:this.courseID});var e=this.props,t=(e.location,e.location.state),a=void 0===t?{}:t;a.oid&&this.check(a.oid),(1===Object(b.c)("is_class")||Object(b.c)("weixinpay"))&&this.payCallback(),b.b.isWeixin&&this.isweixinPay(),this.token=B.a.get("token"),this.getVideoList(),this.getDatumCatalog(),this.setupRecord()}else this.props.history.replace("/");else window.location.replace("http"+window.location.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.d.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=t.history,i=this.state,o=i.videoList,s=i.activeIndex,r=i.isAuth,d=i.salePrice,l=i.course,u=i.singleBox,p=i.singleType,m="";return n.state&&n.state.to&&"detail"===n.state.to&&(m="/detail?id=".concat(l.course_id)),f.a.createElement("div",{className:"play"},f.a.createElement(v.a,{title:this.state.title,arrow:!0,toHref:function(){m?c.push(m,{to:"classify"}):c.go(-1)}}),f.a.createElement(T.f,{isLoading:this.state.isLoading},f.a.createElement("div",{className:"video"},f.a.createElement("video",{className:"video-js",ref:function(t){return e.video=t}},f.a.createElement("source",{src:"/",type:"application/x-mpegURL"})),!r&&!!o[s].is_class&&f.a.createElement("div",{className:"purchase-box"},f.a.createElement("div",{className:"hint"},"\u60a8\u5c1a\u672a\u8d2d\u4e70\u8be5\u8bfe\u65f6\uff0c\u8bf7\u8d2d\u4e70\u540e\u5b66\u4e60\u3002"),f.a.createElement("div",{className:"btns"},f.a.createElement("button",{type:"button",onClick:this.tobuy,className:"purchase-class"},"\xa5",d," \u8d2d\u4e70\u8bfe\u7a0b"),f.a.createElement("button",{type:"button",onClick:this.toSingleset.bind(this,o[s]),className:"purchase-episode"},"\xa5",o.length&&o[s].class_price," \u8d2d\u4e70\u5355\u96c6"))),!r&&!!l.is_aist&&f.a.createElement("div",{className:"is-aist-box"},f.a.createElement("i",{className:"iconfont iconiconfront-21"}),f.a.createElement("p",{className:"time"},o[s].aist_start_time),f.a.createElement("p",{className:"time"},"\u8bf7\u8010\u5fc3\u7b49\u5f85..."))),f.a.createElement("div",{className:"tab"},f.a.createElement("div",null,f.a.createElement(y.c,{to:{pathname:"".concat(a.url,"/video"),search:"?id=".concat(this.courseID)},replace:!0,activeClassName:"active"},"\u89c6\u9891")),f.a.createElement("div",null,f.a.createElement(y.c,{to:{pathname:"".concat(a.url,"/datum"),search:"?id=".concat(this.courseID)},replace:!0,activeClassName:"active"},"\u8d44\u6599"))),u&&f.a.createElement(D.a,{courseId:l.course_id,singleBox:this.state.singleBox,boxHide:this.boxHide,data:this.state.singMess,singleType:this.state.singleType,vcourseId:l.v_course_id,videoId:this.state.singMess.video_id,check:this.check,title:this.state.singMess.course_tile}),1!==p&&f.a.createElement(M.a,{courseId:l.course_id,boxHide:this.boxHide,data:this.state.singMess,singleType:p,vcourseId:l.v_course_id,videoId:this.state.singMess.video_id,nowPrice:this.state.nowPrice,laterPrice:this.state.laterPrice})),f.a.createElement(g.d,null,f.a.createElement(g.a,{exact:!0,from:"/play",to:{pathname:"/play/video",search:n.search}}),f.a.createElement(g.b,{path:"".concat(a.path,"/video"),render:function(t){return f.a.createElement(P,Object.assign({activeIndex:e.state.activeIndex,selectVideo:e.selectVideo,videoCatalog:o},t))}}),f.a.createElement(g.b,{path:"".concat(a.path,"/datum"),render:function(t){return f.a.createElement(j,Object.assign({},t,{datum:e.state.datum}))}})),f.a.createElement(g.b,{render:function(t){return e.state.vCourseId?f.a.createElement(w,Object.assign({},t,{vCourseId:e.state.vCourseId})):null}}),f.a.createElement(U,{isShow:this.state.isShowShareModal,closeShareModal:function(){return e.setState({isShowShareModal:!1})},data:this.state.shareData}))}}]),t}(h.Component);t.default=Object(_.b)(function(e){return{user:e.user}},null)(F)},612:function(e,t,a){},644:function(e,t,a){"use strict";var n=a(0),c=a.n(n);a(645);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)}},645:function(e,t,a){},656:function(e,t,a){"use strict";a(44);var n=a(14),c=a.n(n),i=a(5),o=a(7),s=a(6),r=a(8),d=a(9),l=a(75),u=a(0),p=a.n(u),m=(a(612),a(3)),h=a(48),f=a(23),v=a(21),y=a(156),g=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(r.a)(t).call(this,e))).check=function(e){a.setState({payType:e})},a.toBuy=function(){var e=a.props.courseId,t=a.props.data.video_id||a.props.data.id;m.d.get("".concat(API.home,"/sys/createClassOrder/").concat(t)).then(function(t){200===t.data.code?(a.setState({orderId:t.data.data.order_id}),"1"===a.state.payType?a.alipayPay(t.data.data.order_id,e):a.weixinPay(t.data.data.order_id)):c.a.info(t.data.msg,2)})},a.weixinPay=function(e){m.b.isWeixin?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb&oid="+e).toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":m.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(t){0===t.data.errno?window.location.href=t.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1&oid="+e).toLowerCase():c.a.info(t.data.msg,2)})},a.alipayPay=function(e,t){m.d.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(window.location=e.data.data.url,t&&window.localStorage.setItem("payCourse",t)):c.a.info(e.data.msg,2)})},a.isweixinPay=function(){var e=Object(l.a)(Object(l.a)(a)),t=Object(m.c)("code");if(t){if(!Object(m.c)("oid"))return;m.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(m.c)("oid"),"/code/").concat(t)).then(function(t){if(0===t.data.errno){var a=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(t){"get_brand_wcpay_request:ok"==t.err_msg?(c.a.info("\u652f\u4ed8\u6210\u529f",2),e.intervalPayStatus=setInterval(function(){var t=this;m.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(m.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,m.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(m.c)("oid"))).then(function(e){200===Number(e.data.data.errno)?t.setState({status:6,showSingleBox:!0}):201===Number(e.data.data.errno)?t.setState({status:4,showSingleBox:!0}):202===Number(e.data.data.errno)?t.setState({status:3,showSingleBox:!0}):203===Number(e.data.data.errno)?t.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,status:2,showSingleBox:!0}):c.a.info(e.data.data.msg,2)}))})},1e3)):alert("\u652f\u4ed8\u5931\u8d25")})},n=t.data.data;"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",a,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",a),document.attachEvent("onWeixinJSBridgeReady",a)):a()}else c.a.info(t.data.msg,2)})}},a.payCallback=function(){var e=Object(l.a)(Object(l.a)(a));Object(m.c)("oid")&&(e.intervalPayStatus=setInterval(function(){var t=this;m.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(m.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,m.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(m.c)("oid"))).then(function(e){200===Number(e.data.data.errno)?t.setState({status:6,showSingleBox:!0}):201===Number(e.data.data.errno)?t.setState({status:4,showSingleBox:!0}):202===Number(e.data.data.errno)?t.setState({status:3,showSingleBox:!0}):203===Number(e.data.data.errno)?t.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,status:2,showSingleBox:!0}):c.a.info(e.data.data.msg,2)}))})},1e3))},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.c)("id")};m.d.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.d.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.d.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={orderId:"",nowPrice:"",laterPrice:"",hour:"",min:"",sec:"",endTime:"",groupOrderId:"",payType:"0",showSingleBox:!1},a}return Object(d.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){}},{key:"componentWillReceiveProps",value:function(e,t){}},{key:"render",value:function(){var e=this;this.state.showSingleBox;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 1===this.props.singleType&&p.a.createElement("div",null,p.a.createElement("div",{className:"popup-box"},p.a.createElement("div",{className:"content singleset-payment"},p.a.createElement("div",{className:"price-box"},p.a.createElement("span",null,"\u5b9e\u4ed8\u6b3e\uff1a"),p.a.createElement("p",null,this.props.data.class_price,"\u5143")),p.a.createElement("div",{className:"course-info"},p.a.createElement("p",{className:"text-overflow-1"},p.a.createElement("span",null,"\u8bfe\u7a0b\uff1a"),this.props.title),p.a.createElement("p",{className:"text-overflow-1"},p.a.createElement("span",null,"\u8bfe\u65f6\uff1a"),this.props.data.name)),p.a.createElement("div",{className:"payment-type"},p.a.createElement("label",null,"\u652f\u4ed8\u65b9\u5f0f\uff1a"),!m.b.isWeixin&&p.a.createElement("p",{onClick:this.check.bind(this,"1")},p.a.createElement("i",{className:"iconfont iconalipay"}),p.a.createElement("span",null,"\u652f\u4ed8\u5b9d"),p.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("1"===this.state.payType?"redioed":"")})),p.a.createElement("p",{onClick:this.check.bind(this,"0")},p.a.createElement("i",{className:"iconfont iconweixinzhifu buy"}),p.a.createElement("span",null,"\u5fae\u4fe1\u652f\u4ed8"),p.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("0"===this.state.payType?"redioed":"")}))),p.a.createElement("div",{className:"btn btn-18B4ED",onClick:this.toBuy},"\u786e\u8ba4\u8d2d\u4e70")),p.a.createElement("i",{onClick:this.colse,className:"iconfont iconiconfront-2 close"})))}}]),t}(u.Component);t.a=Object(f.d)(Object(v.b)(function(e){return{user:e.user}},null),h.g)(g)},657:function(e,t,a){"use strict";a(44);var n=a(14),c=a.n(n),i=a(5),o=a(7),s=a(6),r=a(8),d=a(9),l=a(0),u=a.n(l),p=(a(612),a(3)),m=a(48),h=a(23),f=a(21),v=a(156),y=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(r.a)(t).call(this,e))).check=function(e){a.setState({payType:e})},a.toBuy=function(){var e=a.props.data.video_id||a.props.data.id;p.d.get("".concat(API.home,"/sys/createClassOrder/").concat(e)).then(function(e){200===e.data.code?(a.setState({orderId:e.data.data.order_id}),"1"===a.state.payType?a.alipayPay(e.data.data.order_id):a.weixinPay(e.data.data.order_id)):c.a.info(e.data.msg,2)})},a.weixinPay=function(e){p.b.isWeixin?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb&oid="+e).toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":p.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(t){0===t.data.errno?window.location.href=t.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1&oid="+e).toLowerCase():c.a.info(t.data.msg,2)})},a.alipayPay=function(e){var t=Object(p.c)("id");p.d.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(window.location=e.data.data.url,t&&window.localStorage.setItem("payCourse",t)):c.a.info(e.data.msg,2)})},a.toBuyAll=function(e){if(1===Number(a.props.isPdd))a.props.history.push("/order?id=".concat(a.props.courseId),{group:1});else{var t=JSON.stringify([Number(e)]);p.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/").concat(t)).then(function(e){0===e.data.errno?a.props.history.push("/order?id="+e.data.data[0],{simple:1}):c.a.info(e.data.msg,2)})}},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(p.c)("id")};p.d.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){p.d.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){p.d.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.toLearn=function(e,t){a.props.boxHide(!1),a.props.history.push("/play/video?id=".concat(e,"&video_id=").concat(t))},a.colse=function(){a.props.boxHide(!1),a.setState({status:1})},a.state={orderId:"",nowPrice:"",laterPrice:"",hour:"",min:"",sec:"",endTime:"",groupOrderId:"",payType:"0"},a}return Object(d.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){}},{key:"componentWillReceiveProps",value:function(e,t){}},{key:"render",value:function(){var e=this;this.state.singleBox;if(this.state.endTime){var t=1e3*this.state.endTime,a=Date.now();setInterval(function(){t-=1e3;var n=Object(v.differenceInSeconds)(new Date(t),a)%60,c=Object(v.differenceInMinutes)(new Date(t),a)%60,i=Object(v.differenceInHours)(new Date(t),a)%24;e.setState({hour:i,min:c,sec:n})},1e3)}var n=this.props.singleType,c=this.props.data.video_id||this.props.data.id;return u.a.createElement("div",{className:"popup-box"},2===n&&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.props.nowPrice,"\u5143\u8d2d\u4e70\u3002"),u.a.createElement("div",{className:"dec"},"\xb7 \u8d85\u8fc73\u5929\uff0c\u6309\u7167\u672a\u8d2d\u96c6\u6570/\u5168\u90e8\u96c6\u6570\u7b49\u6bd4\u4f8b\u8ba1\u8d39\uff0c",this.props.laterPrice,"\u5143\u8d2d\u4e70\u5168\u96c6\u3002"),u.a.createElement("span",{onClick:function(){return e.toLearn(e.props.vcourseId,c)},className:"btn btn-18B4ED"},"\u5f00\u59cb\u5b66\u4e60"),u.a.createElement("div",{className:"btn btn-FF4000",onClick:function(){e.toBuyAll(e.props.courseId)}},"\uffe5",this.props.nowPrice,"\u8d2d\u4e70\u5168\u96c6")),3===n&&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===n&&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===n&&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("span",{onClick:function(){return e.toLearn(e.props.vcourseId,c)},className:"btn btn-18B4ED"},"\u53bb\u5b66\u4e60")),7===n&&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}(l.Component);t.a=Object(h.d)(Object(f.b)(function(e){return{user:e.user}},null),m.g)(y)},789:function(e,t,a){},790:function(e,t,a){},791:function(e,t,a){},795:function(e,t,a){},797:function(e,t){},865:function(e,t){}}]);
//# sourceMappingURL=video.0d7cb00a.chunk.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{1191:function(e,t,a){"use strict";a.r(t);a(44);var n,c=a(14),i=a.n(c),o=a(5),s=a(7),r=a(6),d=a(8),l=a(9),u=a(75),m=(a(253),a(93)),p=a.n(m),h=a(0),f=a.n(h),v=a(163),y=(a(789),a(17)),g=a(48),b=a(3),_=a(21),E=(a(74),a(790),a(644)),S=function(e){var t=e.item;return f.a.createElement("div",{className:"bottom"},f.a.createElement("span",{className:"price"},"\xa5",t.price1),f.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},w=Object(_.b)()(n=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,c=new Array(n),s=0;s<n;s++)c[s]=arguments[s];return(a=Object(r.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(c)))).state={num:10,list:[],courseId:null},a.getRecommendation=function(){b.d.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;t.dispatch;t.history.push("/detail?id=".concat(e))},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.getRecommendation()}},{key:"render",value:function(){var e=this;return this.state.list.length?f.a.createElement("div",{className:"recommendation"},f.a.createElement("div",{className:"title"},"\u76f8\u5173\u63a8\u8350"),f.a.createElement("ul",null,this.state.list.map(function(t){var a=f.a.createElement("div",{className:"info"},f.a.createElement("p",{className:"title text-overflow-1"},t.course_title),f.a.createElement("p",{className:"des text-overflow-2"},t.simpledescription),f.a.createElement(S,{item:t}));return f.a.createElement(E.a,{key:t.course_id,img:t.image_name,handleClick:e.toCourseDetail,info:a,id:t.course_id})}))):null}}]),t}(h.PureComponent))||n,I=(a(791),a(15)),N=a.n(I),O=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return(a=Object(r.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(c)))).handleClick=function(e){a.props.selectVideo(e)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this;return f.a.createElement("div",{className:"video-catalog"},f.a.createElement("ul",null,this.props.videoCatalog.map(function(t,a){return f.a.createElement("li",{key:t.id,className:N()({active:e.props.activeIndex===a})},f.a.createElement("div",{className:"video-title",onClick:e.handleClick.bind(e,a)},f.a.createElement("span",{className:"title"},t.name),f.a.createElement("span",{className:"duration"},t.duration),f.a.createElement("i",{className:N()("iconfont",[0===t.video_auth?"iconiconfront-74":"iconplay_hovericon"])})),t.practice&&t.practice.qid?f.a.createElement(y.b,{to:{pathname:t.practice.is_tested?"/campResolve":"/campTest",search:"?keshi_id=".concat(t.id,"&qid=").concat(t.practice.qid),state:{from:"/play/video".concat(window.location.search)}}},f.a.createElement("div",{className:"exercise"},"\u8bfe\u540e\u7ec3\u4e60\uff1a",t.practice.title,f.a.createElement("i",{className:N()("iconfont",t.video_auth?t.practice.is_tested?"iconiconfront-3":"":"iconiconfront-74")}))):null)})))}}]),t}(h.Component),P=(a(792),a(794)),j=a.n(P),x=(a(795),function(e){function t(){return Object(o.a)(this,t),Object(r.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.datum;return f.a.createElement("div",{className:"datum-catalog"},f.a.createElement("p",{className:"prompt"},"\u8bfe\u7a0b\u8d44\u6599\u8bf7\u5230PC\u7aef\u64ad\u653e\u9875\u4e0b\u8f7d"),f.a.createElement(j.a,null,e&&e.length&&e.map(function(e,t){return f.a.createElement(j.a.Panel,{header:e.dir_name,key:t},e.files.map(function(e){return f.a.createElement("div",{key:e.file_id,className:"file-name"},e.file_name)}))})))}}]),t}(h.Component));x.defaultProps={datum:[{dir_name:"",files:[{file_name:"",file_id:0}]}]};var k=x,C=a(778),T=(a(841),a(30)),A=a(39),B=a.n(A),R=a(842),L=a.n(R),D=a(656),M=a(657),W=a(1169),J=C.a.getComponent("Component"),z=C.a.getComponent("Button"),V=function(e){function t(){return Object(o.a)(this,t),Object(r.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(s.a)(t,[{key:"createEl",value:function(){return Object(W.a)(Object(d.a)(t.prototype),"createEl",this).call(this,"div",{className:"vjs-custom-play-button-cover"})}},{key:"dispose",value:function(){this.el_&&(this.el_=null)}}]),t}(J),q=function(e){function t(e,a){var n;return Object(o.a)(this,t),(n=Object(r.a)(this,Object(d.a)(t).call(this,e,a))).on("tap",n.tap),n}return Object(l.a)(t,e),Object(s.a)(t,[{key:"createEl",value:function(){return Object(W.a)(Object(d.a)(t.prototype),"createEl",this).call(this,"button",{className:"vjs-custom-play-button"},{type:"button"})}},{key:"tap",value:function(){this.player_.play()}},{key:"dispose",value:function(){this.el_&&(this.off("tap",this.tap),this.el_=null)}}]),t}(z);J.registerComponent("CustomPlayButton",q),V.prototype.options_={children:["CustomPlayButton"]},J.registerComponent("CustomPlayButtonCover",V);var H=p.a.alert;function U(e){return e.isShow&&f.a.createElement("div",{className:"progress-share-modal-wrapper"},f.a.createElement("div",{className:"progress-share-modal"},f.a.createElement("div",{className:"title"},"\u6bcf\u65e5\u6253\u5361"),f.a.createElement("ul",{className:"progress-container"},f.a.createElement("li",null,f.a.createElement("div",{className:"title"},"\u7d2f\u8ba1\u5b66\u4e60"),f.a.createElement("div",{className:"number"},f.a.createElement("span",{className:"num"},e.data.learn_day_count),"\u5929")),f.a.createElement("li",null,f.a.createElement("div",{className:"title"},"\u884c\u52a8\u529b\u8d85\u8fc7"),f.a.createElement("div",{className:"number"},f.a.createElement("span",{className:"num"},parseFloat(e.data.action_power)),"%"))),f.a.createElement("div",{className:"share-container"},f.a.createElement("div",{className:"title"},"\u5206\u4eab\u5230"),f.a.createElement("ul",null,f.a.createElement("li",{className:"share-icon"},f.a.createElement("a",{style:{display:"block"},href:e.data.url},f.a.createElement("div",{className:"icon"},f.a.createElement("i",{className:"iconfont iconweixinzhifu"})),f.a.createElement("div",{className:"text"},"\u5fae\u4fe1\u597d\u53cb"))),f.a.createElement("li",{className:"share-icon"},f.a.createElement("a",{style:{display:"block"},href:e.data.url},f.a.createElement("div",{className:"icon"},f.a.createElement("i",{className:"iconfont iconpengyouquaniconx"})),f.a.createElement("div",{className:"text"},"\u670b\u53cb\u5708"))))),f.a.createElement("i",{className:"iconfont iconiconfront-2 close",onClick:e.closeShareModal})))}var F=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,c=new Array(n),s=0;s<n;s++)c[s]=arguments[s];return(a=Object(r.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(c)))).previousPlaybackRate=1,a.currentPlaybackRate=1,a.reconnect=!0,a.timeEnough=!1,a.state={title:"",courseId:null,videoList:[],datum:[],currentVideoSrc:"",activeIndex:0,isAuth:!0,course:{},salePrice:null,vCourseId:null,isLoading:!0,isShowShareModal:!1,shareData:{},singleBox:!1,singMess:"",singleType:1,nowPrice:0,laterPrice:0},a.tobuy=function(){var e=a.state.course,t=void 0===e?{}:e;b.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(t.course_id,"]")).then(function(e){0===e.data.errno?a.props.history.push("/order?id=".concat(t.course_id),{simple:1}):i.a.info(e.data.msg,2)})},a.toSingleset=function(e){a.setState({singleBox:!0,singleType:1,singMess:e}),window.localStorage.setItem("singMess",JSON.stringify(e))},a.boxHide=function(e){a.setState({singleBox:e,singleType:1})},a.payCallback=function(){var e=Object(u.a)(Object(u.a)(a));Object(b.c)("oid")&&(a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),e.intervalPayStatus=setInterval(function(){b.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(b.c)("oid"))).then(function(t){401===t.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,b.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(b.c)("oid"))).then(function(t){200===Number(t.data.data.errno)?e.setState({singleType:6}):201===Number(t.data.data.errno)?e.setState({singleType:4}):202===Number(t.data.data.errno)?e.setState({singleType:3}):203===Number(t.data.data.errno)?e.setState({nowPrice:t.data.data.data.now_price,laterPrice:t.data.data.data.three_day_later_price,singleType:2}):i.a.info(t.data.data.msg,2)}))})},1e3))},a.isweixinPay=function(){var e=Object(u.a)(Object(u.a)(a)),t=Object(b.c)("code");if(t){if(!Object(b.c)("oid"))return;a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),b.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(b.c)("oid"),"/code/").concat(t)).then(function(t){if(0===t.data.errno){var a=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(t){"get_brand_wcpay_request:ok"==t.err_msg?(i.a.info("\u652f\u4ed8\u6210\u529f",2),e.intervalPayStatus=setInterval(function(){b.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(b.c)("oid"))).then(function(t){401===t.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,b.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(b.c)("oid"))).then(function(t){200===Number(t.data.data.errno)?e.setState({singleType:6}):201===Number(t.data.data.errno)?e.setState({singleType:4}):202===Number(t.data.data.errno)?e.setState({singleType:3}):203===Number(t.data.data.errno)?e.setState({nowPrice:t.data.data.data.now_price,laterPrice:t.data.data.data.three_day_later_price,singleType:2}):i.a.info(t.data.data.msg,2)}))})},1e3)):H("\u652f\u4ed8\u5931\u8d25")})},n=t.data.data;"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",a,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",a),document.attachEvent("onWeixinJSBridgeReady",a)):a()}else i.a.info(t.data.msg,2)})}},a.check=function(e){a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),b.d.get("".concat(API["base-api"],"/class_order_status/").concat(e)).then(function(e){200===Number(e.data.data.errno)?a.setState({singleType:6}):201===Number(e.data.data.errno)?a.setState({singleType:4}):202===Number(e.data.data.errno)?a.setState({singleType:3}):203===Number(e.data.data.errno)?a.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,singleType:2}):i.a.info(e.data.data.msg,2)})},a.setupRecord=function(){a.recordSocket=L()(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){var t=JSON.parse(e.data);4040==t.code&&(a.reconnect=!1),5001==t.code&&(a.timeEnough=!0)})},a.sendMessage=function(e){var t=a.ws.readyState,n=Object(u.a)(Object(u.a)(a));if(1===t)a.ws&&a.ws.send(JSON.stringify(e));else if(3===t){a.ws.close(),a.ws=null;var c=setTimeout(function(){clearTimeout(c),c=null,n.ws=new WebSocket(PROCESS_URL)},500)}},a.getShareProgressInfo=function(){b.d.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(){var e=a.state,t=e.videoList,n=e.activeIndex,c=e.vCourseId,i=e.course,o=void 0===i?{}:i;0!==Number(o.course_id)&&""!==o.course_id?a.timeEnough?console.log("5001 \u65f6\u95f4\u8db3\u591f"):o.is_aist?a.sendMessage({mtype:"count_schedule",uid:a.props.user.data.uid,token:a.token,platform:5}):a.sendMessage({mtype:"c_count_schedule",uid:a.props.user.data.uid,token:a.token,platform:5,video_id:t[n].id,course_id:a.state.courseId,v_course_id:c}):console.log("\u514d\u8d39\u8bfe\u7a0b \u62e6\u622a")},a.sendWatchTime=function(e,t){var n=a.state,c=n.videoList,i=n.activeIndex,o=n.vCourseId,s=n.course,r=void 0===s?{}:s;if(0!==Number(r.course_id)&&""!==r.course_id){if(0!==Number(e))if(a.timeEnough)console.log("5001 \u65f6\u95f4\u8db3\u591f");else{var d="c_watch_time";r.is_aist&&(d="watch_time"),a.sendMessage({mtype:d,rate:t,time:e,video_id:c[i].id,course_id:a.state.courseId,v_course_id:o,uid:a.props.user.data.uid,token:a.token,platform:5})}}else console.log("\u514d\u8d39\u8bfe\u7a0b \u62e6\u622a")},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:!1,textTrackDisplay:!1,posterImage:!1,errorDisplay:!1,playbackRates:["0.75","1","1.5","2"],controlBar:{pictureInPictureToggle:!1}}),a.player.addChild("CustomPlayButtonCover"),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(){console.log("ended"),a.sendWatchTime(a.watchSec,a.currentPlaybackRate),a.countSchedule(),a.state.course.is_aist&&a.getShareProgressInfo(),clearInterval(a.timer)}),a.player.on("seeked",function(){a.sendRecord()})},a.sendLastRecord=function(){b.d.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&&(console.log("selectVideo \u5148\u53d1\u9001\u65f6\u95f4 \u5728\u53d1\u9001\u8fdb\u5ea6 \u5728\u91cd\u7f6e\u5b9a\u65f6\u5668"),a.sendWatchTime(a.watchSec,a.currentPlaybackRate),a.countSchedule(),a.setupTimer(),a.setState({activeIndex:e},function(){a.hasAuth(a.state.activeIndex)?(a.setPlayerSrc(a.state.videoList[e].play_url),a.sendLastRecord(),a.playVideo()):a.getCoursePrice()}))},a.getLastVideoIndex=function(e){return a.state.videoList.findIndex(function(t){return t.id==e})},a.getVideoList=function(){var e="";e=Object(b.c)("video_id")?"".concat(API.home,"/m/course/play/").concat(a.courseID+"?video_id="+Object(b.c)("video_id")):"".concat(API.home,"/m/course/play/").concat(a.courseID),b.d.get(e).then(function(e){var t=e.data,n=t.data,c=void 0===n?{}:n;200===t.code?a.setState(function(e){return{videoList:c.lessons,currentVideoSrc:c.lessons[e.activeIndex].play_url,course:c.course,courseId:c.course.course_id,vCourseId:c.course.v_course_id,title:c.course.course_title,isLoading:!1}},a.playSetup):i.a.info(c.msg)})},a.playSetup=function(){var e=a.state.course,t=void 0===e?{}:e;if(0===Number(t.course_id)||""===t.course_id)console.log("\u514d\u8d39\u8bfe\u7a0b \u62e6\u622a");else{var n=Object(u.a)(Object(u.a)(a));a.setupWS(),a.setupTimer(),console.log("playSetup");var c=setTimeout(function(){clearTimeout(c),c=null,n.countSchedule()},1e3)}var i=a.getLastVideoIndex(t.last_video_id);i=i>=0?i:0,a.setState({activeIndex:i},function(){a.lessonAvailable(i)?a.hasAuth(i)?Promise.resolve().then(function(){a.initializePlayer(),a.playWithAuth()}):a.getCoursePrice():H("\u6682\u65e0\u89c6\u9891","",[{text:"OK",onPress:function(){a.props.history.push("/")}}])})},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(e){return 0!==a.state.videoList[e].video_size},a.getCoursePrice=function(){var e=a.state.course,t=void 0===e?{}:e;b.d.get("".concat(API.home,"/sys/course/price/").concat(t.course_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(n)&&a.setPlayerSrc(t[n].play_url)},a.hasAuth=function(e){return a.state.videoList[e].video_auth?(a.setState({isAuth:!0}),!0):(a.setState({isAuth:!1}),!1)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){if("https:"!==window.location.protocol)if(this.courseID=Object(b.c)("id"),this.courseID){this.setState({courseId:this.courseID});var e=this.props,t=(e.location,e.location.state),a=void 0===t?{}:t;a.oid&&this.check(a.oid),(1===Object(b.c)("is_class")||Object(b.c)("weixinpay"))&&this.payCallback(),b.b.isWeixin&&this.isweixinPay(),this.token=B.a.get("token"),this.getVideoList(),this.getDatumCatalog(),this.setupRecord()}else this.props.history.replace("/");else window.location.replace("http"+window.location.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.d.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=t.history,i=this.state,o=i.videoList,s=i.activeIndex,r=i.isAuth,d=i.salePrice,l=i.course,u=i.singleBox,m=i.singleType,p="";return n.state&&n.state.to&&"detail"===n.state.to&&(p="/detail?id=".concat(l.course_id)),f.a.createElement("div",{className:"play"},f.a.createElement(v.a,{title:this.state.title,arrow:!0,toHref:function(){p?c.push(p,{to:"classify"}):c.go(-1)}}),f.a.createElement(T.f,{isLoading:this.state.isLoading},f.a.createElement("div",{className:"video"},f.a.createElement("video",{className:"video-js",ref:function(t){return e.video=t}},f.a.createElement("source",{src:"/",type:"application/x-mpegURL"})),!r&&!!o[s].is_class&&f.a.createElement("div",{className:"purchase-box"},f.a.createElement("div",{className:"hint"},"\u60a8\u5c1a\u672a\u8d2d\u4e70\u8be5\u8bfe\u65f6\uff0c\u8bf7\u8d2d\u4e70\u540e\u5b66\u4e60\u3002"),f.a.createElement("div",{className:"btns"},f.a.createElement("button",{type:"button",onClick:this.tobuy,className:"purchase-class"},"\xa5",d," \u8d2d\u4e70\u8bfe\u7a0b"),f.a.createElement("button",{type:"button",onClick:this.toSingleset.bind(this,o[s]),className:"purchase-episode"},"\xa5",o.length&&o[s].class_price," \u8d2d\u4e70\u5355\u96c6"))),!r&&!!l.is_aist&&f.a.createElement("div",{className:"is-aist-box"},f.a.createElement("i",{className:"iconfont iconiconfront-21"}),f.a.createElement("p",{className:"time"},o[s].aist_start_time),f.a.createElement("p",{className:"time"},"\u8bf7\u8010\u5fc3\u7b49\u5f85..."))),f.a.createElement("div",{className:"tab"},f.a.createElement("div",null,f.a.createElement(y.c,{to:{pathname:"".concat(a.url,"/video"),search:"?id=".concat(this.courseID)},replace:!0,activeClassName:"active"},"\u89c6\u9891")),f.a.createElement("div",null,f.a.createElement(y.c,{to:{pathname:"".concat(a.url,"/datum"),search:"?id=".concat(this.courseID)},replace:!0,activeClassName:"active"},"\u8d44\u6599"))),u&&f.a.createElement(D.a,{courseId:l.course_id,singleBox:this.state.singleBox,boxHide:this.boxHide,data:this.state.singMess,singleType:this.state.singleType,vcourseId:l.v_course_id,videoId:this.state.singMess.video_id,check:this.check,title:this.state.singMess.course_tile}),1!==m&&f.a.createElement(M.a,{courseId:l.course_id,boxHide:this.boxHide,data:this.state.singMess,singleType:m,vcourseId:l.v_course_id,videoId:this.state.singMess.video_id,nowPrice:this.state.nowPrice,laterPrice:this.state.laterPrice})),f.a.createElement(g.d,null,f.a.createElement(g.a,{exact:!0,from:"/play",to:{pathname:"/play/video",search:n.search}}),f.a.createElement(g.b,{path:"".concat(a.path,"/video"),render:function(t){return f.a.createElement(O,Object.assign({activeIndex:e.state.activeIndex,selectVideo:e.selectVideo,videoCatalog:o},t))}}),f.a.createElement(g.b,{path:"".concat(a.path,"/datum"),render:function(t){return f.a.createElement(k,Object.assign({},t,{datum:e.state.datum}))}})),f.a.createElement(g.b,{render:function(t){return e.state.vCourseId?f.a.createElement(w,Object.assign({},t,{vCourseId:e.state.vCourseId})):null}}),f.a.createElement(U,{isShow:this.state.isShowShareModal,closeShareModal:function(){return e.setState({isShowShareModal:!1})},data:this.state.shareData}))}}]),t}(h.Component);t.default=Object(_.b)(function(e){return{user:e.user}},null)(F)},612:function(e,t,a){},644:function(e,t,a){"use strict";var n=a(0),c=a.n(n);a(645);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)}},645:function(e,t,a){},656:function(e,t,a){"use strict";a(44);var n=a(14),c=a.n(n),i=a(5),o=a(7),s=a(6),r=a(8),d=a(9),l=a(75),u=a(0),m=a.n(u),p=(a(612),a(3)),h=a(48),f=a(23),v=a(21),y=a(156),g=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(r.a)(t).call(this,e))).check=function(e){a.setState({payType:e})},a.toBuy=function(){var e=a.props.courseId,t=a.props.data.video_id||a.props.data.id;p.d.get("".concat(API.home,"/sys/createClassOrder/").concat(t)).then(function(t){200===t.data.code?(a.setState({orderId:t.data.data.order_id}),"1"===a.state.payType?a.alipayPay(t.data.data.order_id,e):a.weixinPay(t.data.data.order_id)):c.a.info(t.data.msg,2)})},a.weixinPay=function(e){p.b.isWeixin?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb&oid="+e).toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":p.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(t){0===t.data.errno?window.location.href=t.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1&oid="+e).toLowerCase():c.a.info(t.data.msg,2)})},a.alipayPay=function(e,t){p.d.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(window.location=e.data.data.url,t&&window.localStorage.setItem("payCourse",t)):c.a.info(e.data.msg,2)})},a.isweixinPay=function(){var e=Object(l.a)(Object(l.a)(a)),t=Object(p.c)("code");if(t){if(!Object(p.c)("oid"))return;p.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(p.c)("oid"),"/code/").concat(t)).then(function(t){if(0===t.data.errno){var a=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(t){"get_brand_wcpay_request:ok"==t.err_msg?(c.a.info("\u652f\u4ed8\u6210\u529f",2),e.intervalPayStatus=setInterval(function(){var t=this;p.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(p.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,p.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(p.c)("oid"))).then(function(e){200===Number(e.data.data.errno)?t.setState({status:6,showSingleBox:!0}):201===Number(e.data.data.errno)?t.setState({status:4,showSingleBox:!0}):202===Number(e.data.data.errno)?t.setState({status:3,showSingleBox:!0}):203===Number(e.data.data.errno)?t.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,status:2,showSingleBox:!0}):c.a.info(e.data.data.msg,2)}))})},1e3)):alert("\u652f\u4ed8\u5931\u8d25")})},n=t.data.data;"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",a,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",a),document.attachEvent("onWeixinJSBridgeReady",a)):a()}else c.a.info(t.data.msg,2)})}},a.payCallback=function(){var e=Object(l.a)(Object(l.a)(a));Object(p.c)("oid")&&(e.intervalPayStatus=setInterval(function(){var t=this;p.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(p.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,p.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(p.c)("oid"))).then(function(e){200===Number(e.data.data.errno)?t.setState({status:6,showSingleBox:!0}):201===Number(e.data.data.errno)?t.setState({status:4,showSingleBox:!0}):202===Number(e.data.data.errno)?t.setState({status:3,showSingleBox:!0}):203===Number(e.data.data.errno)?t.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,status:2,showSingleBox:!0}):c.a.info(e.data.data.msg,2)}))})},1e3))},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(p.c)("id")};p.d.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){p.d.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){p.d.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={orderId:"",nowPrice:"",laterPrice:"",hour:"",min:"",sec:"",endTime:"",groupOrderId:"",payType:"0",showSingleBox:!1},a}return Object(d.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){}},{key:"componentWillReceiveProps",value:function(e,t){}},{key:"render",value:function(){var e=this;this.state.showSingleBox;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 1===this.props.singleType&&m.a.createElement("div",null,m.a.createElement("div",{className:"popup-box"},m.a.createElement("div",{className:"content singleset-payment"},m.a.createElement("div",{className:"price-box"},m.a.createElement("span",null,"\u5b9e\u4ed8\u6b3e\uff1a"),m.a.createElement("p",null,this.props.data.class_price,"\u5143")),m.a.createElement("div",{className:"course-info"},m.a.createElement("p",{className:"text-overflow-1"},m.a.createElement("span",null,"\u8bfe\u7a0b\uff1a"),this.props.title),m.a.createElement("p",{className:"text-overflow-1"},m.a.createElement("span",null,"\u8bfe\u65f6\uff1a"),this.props.data.name)),m.a.createElement("div",{className:"payment-type"},m.a.createElement("label",null,"\u652f\u4ed8\u65b9\u5f0f\uff1a"),!p.b.isWeixin&&m.a.createElement("p",{onClick:this.check.bind(this,"1")},m.a.createElement("i",{className:"iconfont iconalipay"}),m.a.createElement("span",null,"\u652f\u4ed8\u5b9d"),m.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("1"===this.state.payType?"redioed":"")})),m.a.createElement("p",{onClick:this.check.bind(this,"0")},m.a.createElement("i",{className:"iconfont iconweixinzhifu buy"}),m.a.createElement("span",null,"\u5fae\u4fe1\u652f\u4ed8"),m.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("0"===this.state.payType?"redioed":"")}))),m.a.createElement("div",{className:"btn btn-18B4ED",onClick:this.toBuy},"\u786e\u8ba4\u8d2d\u4e70")),m.a.createElement("i",{onClick:this.colse,className:"iconfont iconiconfront-2 close"})))}}]),t}(u.Component);t.a=Object(f.d)(Object(v.b)(function(e){return{user:e.user}},null),h.g)(g)},657:function(e,t,a){"use strict";a(44);var n=a(14),c=a.n(n),i=a(5),o=a(7),s=a(6),r=a(8),d=a(9),l=a(0),u=a.n(l),m=(a(612),a(3)),p=a(48),h=a(23),f=a(21),v=a(156),y=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(r.a)(t).call(this,e))).check=function(e){a.setState({payType:e})},a.toBuy=function(){var e=a.props.data.video_id||a.props.data.id;m.d.get("".concat(API.home,"/sys/createClassOrder/").concat(e)).then(function(e){200===e.data.code?(a.setState({orderId:e.data.data.order_id}),"1"===a.state.payType?a.alipayPay(e.data.data.order_id):a.weixinPay(e.data.data.order_id)):c.a.info(e.data.msg,2)})},a.weixinPay=function(e){m.b.isWeixin?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb&oid="+e).toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":m.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(t){0===t.data.errno?window.location.href=t.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1&oid="+e).toLowerCase():c.a.info(t.data.msg,2)})},a.alipayPay=function(e){var t=Object(m.c)("id");m.d.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(window.location=e.data.data.url,t&&window.localStorage.setItem("payCourse",t)):c.a.info(e.data.msg,2)})},a.toBuyAll=function(e){if(1===Number(a.props.isPdd))a.props.history.push("/order?id=".concat(a.props.courseId),{group:1});else{var t=JSON.stringify([Number(e)]);m.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/").concat(t)).then(function(e){0===e.data.errno?a.props.history.push("/order?id="+e.data.data[0],{simple:1}):c.a.info(e.data.msg,2)})}},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.c)("id")};m.d.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.d.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.d.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.toLearn=function(e,t){a.props.boxHide(!1),a.props.history.push("/play/video?id=".concat(e,"&video_id=").concat(t))},a.colse=function(){a.props.boxHide(!1),a.setState({status:1})},a.state={orderId:"",nowPrice:"",laterPrice:"",hour:"",min:"",sec:"",endTime:"",groupOrderId:"",payType:"0"},a}return Object(d.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){}},{key:"componentWillReceiveProps",value:function(e,t){}},{key:"render",value:function(){var e=this;this.state.singleBox;if(this.state.endTime){var t=1e3*this.state.endTime,a=Date.now();setInterval(function(){t-=1e3;var n=Object(v.differenceInSeconds)(new Date(t),a)%60,c=Object(v.differenceInMinutes)(new Date(t),a)%60,i=Object(v.differenceInHours)(new Date(t),a)%24;e.setState({hour:i,min:c,sec:n})},1e3)}var n=this.props.singleType,c=this.props.data.video_id||this.props.data.id;return u.a.createElement("div",{className:"popup-box"},2===n&&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.props.nowPrice,"\u5143\u8d2d\u4e70\u3002"),u.a.createElement("div",{className:"dec"},"\xb7 \u8d85\u8fc73\u5929\uff0c\u6309\u7167\u672a\u8d2d\u96c6\u6570/\u5168\u90e8\u96c6\u6570\u7b49\u6bd4\u4f8b\u8ba1\u8d39\uff0c",this.props.laterPrice,"\u5143\u8d2d\u4e70\u5168\u96c6\u3002"),u.a.createElement("span",{onClick:function(){return e.toLearn(e.props.vcourseId,c)},className:"btn btn-18B4ED"},"\u5f00\u59cb\u5b66\u4e60"),u.a.createElement("div",{className:"btn btn-FF4000",onClick:function(){e.toBuyAll(e.props.courseId)}},"\uffe5",this.props.nowPrice,"\u8d2d\u4e70\u5168\u96c6")),3===n&&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===n&&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===n&&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("span",{onClick:function(){return e.toLearn(e.props.vcourseId,c)},className:"btn btn-18B4ED"},"\u53bb\u5b66\u4e60")),7===n&&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}(l.Component);t.a=Object(h.d)(Object(f.b)(function(e){return{user:e.user}},null),p.g)(y)},789:function(e,t,a){},790:function(e,t,a){},791:function(e,t,a){},795:function(e,t,a){},797:function(e,t){},865:function(e,t){}}]);
//# sourceMappingURL=video.41f298c2.chunk.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
self.__precacheManifest = [
{
"revision": "7bcd991ade7cb85cc431",
"url": "/mrstatic/js/search.0053fea0.chunk.js"
"revision": "77ec57dd9b7b6e20f1f7",
"url": "/mrstatic/js/search.e1881957.chunk.js"
},
{
"revision": "a9ef0fb43dd748967bda",
"url": "/mrstatic/js/0.aef3cf26.chunk.js"
},
{
"revision": "46d6f44455c834a87895",
"url": "/mrstatic/js/BargainMiddlePage.f63f8cf2.chunk.js"
"revision": "de62aba8eb390a0e879a",
"url": "/mrstatic/js/BargainMiddlePage.f5bb0d59.chunk.js"
},
{
"revision": "8edaf2ff2566ed17e2dd22cf4f8ad7ae",
"url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png"
},
{
"revision": "2ea597df865add3933b9",
"url": "/mrstatic/js/Classify.994277e1.chunk.js"
"revision": "da4c5b9c52d373ead12b",
"url": "/mrstatic/js/Classify.914a8251.chunk.js"
},
{
"revision": "c79abf5cb7ae8a82009cf68fe44d1078",
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "a999eb7686c310c7ecd7",
"url": "/mrstatic/js/CourseList.ab1190ce.chunk.js"
},
{
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
"revision": "c79abf5cb7ae8a82009cf68fe44d1078",
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
},
{
"revision": "e82fbe8c3278f95eb101",
......@@ -52,8 +52,8 @@ self.__precacheManifest = [
"url": "/mrstatic/media/progress-share-bg.80011994.png"
},
{
"revision": "646fc5cca54f863bfbe6",
"url": "/mrstatic/js/Order.96622df3.chunk.js"
"revision": "aaddea0132888822b923",
"url": "/mrstatic/js/Order.d0b6e74e.chunk.js"
},
{
"revision": "8e131e92a3d484c570d2",
......@@ -64,8 +64,8 @@ self.__precacheManifest = [
"url": "/mrstatic/media/kanjia_cg_icon.81a489ac.png"
},
{
"revision": "f3426cd4cd1b13d0b0ab",
"url": "/mrstatic/js/PayOrder.3f5285c6.chunk.js"
"revision": "48bf7a978aee321aaf62",
"url": "/mrstatic/js/PayOrder.c0854efc.chunk.js"
},
{
"revision": "f983caa7c06f105373e7e1aec42da261",
......@@ -80,68 +80,68 @@ self.__precacheManifest = [
"url": "/mrstatic/media/iconfont.14574278.ttf"
},
{
"revision": "7bfe4efdabd24546ff10",
"url": "/mrstatic/js/SearchResult.a9940fff.chunk.js"
"revision": "7a83eae82a30deb3638a",
"url": "/mrstatic/js/SearchResult.0c0c9343.chunk.js"
},
{
"revision": "cd1c41437a2e35a283e4b16b620a8c9e",
"url": "/mrstatic/media/iconfont.cd1c4143.eot"
},
{
"revision": "08f230d361a3c9ff2e43",
"url": "/mrstatic/js/ShopCart.023ad36a.chunk.js"
"revision": "f0cf90f514d5e6da0030",
"url": "/mrstatic/js/ShopCart.4c2987b1.chunk.js"
},
{
"revision": "7b542c778563daa7cc420d21ed1601b3",
"url": "/mrstatic/media/iconfont.7b542c77.woff"
},
{
"revision": "ff8be1dcface150533e8",
"url": "/mrstatic/js/aist-share.78a5ac9c.chunk.js"
"revision": "8d4fa98741a43b92d467",
"url": "/mrstatic/js/aist-share.ca8ee328.chunk.js"
},
{
"revision": "e6795a3dc4e414db9d5f",
"url": "/mrstatic/js/33.9869dd21.chunk.js"
},
{
"revision": "238ae857c1affb3a9f9f",
"url": "/mrstatic/js/coupons.b214df27.chunk.js"
"revision": "1181d9fd8494a9a38bbe",
"url": "/mrstatic/js/coupons.60649292.chunk.js"
},
{
"revision": "88a034d5fe29124ef41d",
"url": "/mrstatic/js/32.0e3712aa.chunk.js"
},
{
"revision": "82d6e743b5dfda42d42f",
"url": "/mrstatic/js/detail.c4409a6e.chunk.js"
"revision": "2cc43e4f8398212a1352",
"url": "/mrstatic/js/detail.2c2c806a.chunk.js"
},
{
"revision": "deeaf6164c442e8cf2bb",
"url": "/mrstatic/js/31.66e2dea5.chunk.js"
},
{
"revision": "916a10c861679b329495",
"url": "/mrstatic/js/main.b701803d.chunk.js"
"revision": "111fb76ccad1b6299d0c",
"url": "/mrstatic/js/main.0c0a0e50.chunk.js"
},
{
"revision": "9105b19a74cb68a48004",
"url": "/mrstatic/js/30.58628dcc.chunk.js"
},
{
"revision": "6db6fed8a42f1ae521ff",
"url": "/mrstatic/js/myorders.2957b1c3.chunk.js"
"revision": "024904e4dd2bcc28b669",
"url": "/mrstatic/js/myorders.b388a40d.chunk.js"
},
{
"revision": "8a11abae4a8306952d79",
"url": "/mrstatic/js/29.cddce484.chunk.js"
},
{
"revision": "9ed8e22b96aad75d3a04",
"url": "/mrstatic/js/purchased.fd53e3b4.chunk.js"
"revision": "2ee6108058fbdc375a84",
"url": "/mrstatic/js/purchased.44208014.chunk.js"
},
{
"revision": "e3590bd054783917f1b2",
"url": "/mrstatic/js/runtime~main.a19408db.js"
"revision": "ed70f738ad0da6e74e3d",
"url": "/mrstatic/js/runtime~main.21ddada3.js"
},
{
"revision": "6d70c0121fc329e49b58",
......@@ -160,35 +160,35 @@ self.__precacheManifest = [
"url": "/mrstatic/js/shareposter.1e04a897.chunk.js"
},
{
"revision": "735bb1660f8f35069e21",
"url": "/mrstatic/js/25.3dfc5c01.chunk.js"
"revision": "df3a85b3caa756a510ec",
"url": "/mrstatic/js/25.bc7deb84.chunk.js"
},
{
"revision": "3873e212f4bbf2ddca8f",
"url": "/mrstatic/js/study.2bd0e879.chunk.js"
"revision": "43a31770b2f88876ce76",
"url": "/mrstatic/js/study.2c0ce1c1.chunk.js"
},
{
"revision": "2fab45ee46f650a38644",
"url": "/mrstatic/js/video.0d7cb00a.chunk.js"
"revision": "246a7ded02a0b9156623",
"url": "/mrstatic/js/video.41f298c2.chunk.js"
},
{
"revision": "e22f914e073eb39bf2f3",
"url": "/mrstatic/js/togroup.3e165b5f.chunk.js"
"revision": "f5caca41afe2d4a2eb85",
"url": "/mrstatic/js/togroup.03b425a3.chunk.js"
},
{
"revision": "88a034d5fe29124ef41d",
"url": "/mrstatic/css/32.278ad3b1.chunk.css"
},
{
"revision": "2fab45ee46f650a38644",
"revision": "246a7ded02a0b9156623",
"url": "/mrstatic/css/video.b57a1aec.chunk.css"
},
{
"revision": "82d6e743b5dfda42d42f",
"revision": "2cc43e4f8398212a1352",
"url": "/mrstatic/css/detail.4c28ce89.chunk.css"
},
{
"revision": "735bb1660f8f35069e21",
"revision": "df3a85b3caa756a510ec",
"url": "/mrstatic/css/25.aebbab68.chunk.css"
},
{
......@@ -200,7 +200,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/27.4c706a4e.chunk.css"
},
{
"revision": "46d6f44455c834a87895",
"revision": "de62aba8eb390a0e879a",
"url": "/mrstatic/css/BargainMiddlePage.718dff83.chunk.css"
},
{
......@@ -208,7 +208,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/28.2471f477.chunk.css"
},
{
"revision": "7bcd991ade7cb85cc431",
"revision": "77ec57dd9b7b6e20f1f7",
"url": "/mrstatic/css/search.fab97849.chunk.css"
},
{
......@@ -216,7 +216,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/29.0bb224f2.chunk.css"
},
{
"revision": "9ed8e22b96aad75d3a04",
"revision": "2ee6108058fbdc375a84",
"url": "/mrstatic/css/purchased.1daf107b.chunk.css"
},
{
......@@ -224,7 +224,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/30.5ed15c7e.chunk.css"
},
{
"revision": "6db6fed8a42f1ae521ff",
"revision": "024904e4dd2bcc28b669",
"url": "/mrstatic/css/myorders.3ae12dec.chunk.css"
},
{
......@@ -232,15 +232,15 @@ self.__precacheManifest = [
"url": "/mrstatic/css/31.ecbb6f9a.chunk.css"
},
{
"revision": "916a10c861679b329495",
"revision": "111fb76ccad1b6299d0c",
"url": "/mrstatic/css/main.d9221c15.chunk.css"
},
{
"revision": "e22f914e073eb39bf2f3",
"revision": "f5caca41afe2d4a2eb85",
"url": "/mrstatic/css/togroup.49988cae.chunk.css"
},
{
"revision": "3873e212f4bbf2ddca8f",
"revision": "43a31770b2f88876ce76",
"url": "/mrstatic/css/study.5e9927d1.chunk.css"
},
{
......@@ -248,19 +248,19 @@ self.__precacheManifest = [
"url": "/mrstatic/css/33.03fe7b57.chunk.css"
},
{
"revision": "238ae857c1affb3a9f9f",
"url": "/mrstatic/css/coupons.4a456833.chunk.css"
"revision": "1181d9fd8494a9a38bbe",
"url": "/mrstatic/css/coupons.de0ae9dc.chunk.css"
},
{
"revision": "ff8be1dcface150533e8",
"revision": "8d4fa98741a43b92d467",
"url": "/mrstatic/css/aist-share.bef8c404.chunk.css"
},
{
"revision": "08f230d361a3c9ff2e43",
"revision": "f0cf90f514d5e6da0030",
"url": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css"
},
{
"revision": "7bfe4efdabd24546ff10",
"revision": "7a83eae82a30deb3638a",
"url": "/mrstatic/css/SearchResult.2649d43f.chunk.css"
},
{
......@@ -268,11 +268,11 @@ self.__precacheManifest = [
"url": "/mrstatic/css/Preferential.cda7a495.chunk.css"
},
{
"revision": "f3426cd4cd1b13d0b0ab",
"revision": "48bf7a978aee321aaf62",
"url": "/mrstatic/css/PayOrder.e5315535.chunk.css"
},
{
"revision": "646fc5cca54f863bfbe6",
"revision": "aaddea0132888822b923",
"url": "/mrstatic/css/Order.8bb031ea.chunk.css"
},
{
......@@ -288,11 +288,11 @@ self.__precacheManifest = [
"url": "/mrstatic/css/CourseList.c0829f24.chunk.css"
},
{
"revision": "2ea597df865add3933b9",
"revision": "da4c5b9c52d373ead12b",
"url": "/mrstatic/css/Classify.f2f19957.chunk.css"
},
{
"revision": "7fbec3d7210739f07af1474eb471991b",
"revision": "2b05e26efb3ddeef426df30bb171f252",
"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.3f5f2a3c7a01584265ba90175b926773.js"
"/precache-manifest.6fd5f509ced587e4c9cf72388cad6820.js"
);
workbox.clientsClaim();
......
......@@ -58,7 +58,7 @@ class App extends Component {
const routeMatchRule = /binding-tel|forgot|set-password/
const {history} = this.props
history.listen((location, action) => {
history.listen((location) => {
this.setNavigationRecord(location)
if (cookie.get('uid') && this.props.user.hasError) {
this.getUser()
......@@ -127,6 +127,10 @@ class App extends Component {
const {location} = this.props
this.previousLocation = location.pathname.startsWith('/passport') ?
this.previousLocation.pathname === '/' ? location : this.previousLocation : location
if (!this.props.user.hasError && getParam('redirect')) {
window.location.href = getParam('redirect')
}
}
......
......@@ -109,10 +109,10 @@ class Index extends Component {
}
toCourseDetail = (id) => {
const { dispatch, history } = this.props;
const {dispatch, history} = this.props;
// dispatch(getCourses(id, () => {
history.push(`/detail?id=${id}`);
return false;
history.push(`/detail?id=${id}`);
return false;
// }));
}
......@@ -138,7 +138,7 @@ class Index extends Component {
<div className='index-swiper'>
{
this.state.banner && this.state.banner.length > 0 &&
<TopSwiper bannerList={this.state.banner} />
<TopSwiper bannerList={this.state.banner}/>
}
</div>
......@@ -148,10 +148,10 @@ class Index extends Component {
this.state.tabdata.map((item, index) => {
return (
<li key={index}>
<Link to={item.href}>
<img src={item.src} alt="" />
<a href={item.href}>
<img src={item.src} alt=""/>
<span>{item.name}</span>
</Link>
</a>
</li>
)
})
......@@ -159,7 +159,7 @@ class Index extends Component {
</ul>
</div>
<p className="borderTop" />
<p className="borderTop"/>
{
......@@ -181,7 +181,7 @@ class Index extends Component {
modules={item}
toDetail={this.toCourseDetail}
/>
<p className="borderTop" />
<p className="borderTop"/>
</div>
)
}) : null
......@@ -366,7 +366,7 @@ function ScrollBox(props) {
{/*公开课需预约、付费课不需要预约*/}
{
( item.is_prepare || item.is_free === 0) && item.live_status === 0 &&
(item.is_prepare || item.is_free === 0) && item.live_status === 0 &&
<p className="item-time">时间:{item.live_start_time}</p>
}
{
......
......@@ -4,20 +4,39 @@ import './input.scss'
import classnames from 'classnames'
class Input extends Component {
constructor(props) {
super(props);
this.state = {
isFocus: false
}
}
clearInput = () => {
this.props.onChange('')
}
render() {
let {type, placeholder} = this.props
const { isFocus } = this.state;
return (
<div className='custom-input-wrapper'>
<input
type={type}
className={classnames('custom-input')}
className={classnames('custom-input',{'custom-input--active': isFocus})}
placeholder={placeholder}
onChange={this.props.onChange}
value={this.props.value}
onBlur={() => {
this.setState({
isFocus: false
})
}}
onFocus={() => {
this.setState({
isFocus: true
})
}}
/>
<i
className={classnames('iconfont icondanseshixintubiao-3', {
......
......@@ -20,6 +20,10 @@
}
}
.custom-input--active {
border-color: #09f;
}
.iconfont {
position: absolute;
right: 10px;
......
......@@ -3,7 +3,6 @@
justify-content: space-between;
width: 100%;
padding: 10px 12px;
border-bottom: 1px solid $border_e7eaf1;
position: absolute;
top: 96px;
left: 0;
......
......@@ -95,7 +95,12 @@ class UsePatch extends PureComponent {
myAmount={this.state.couponAmount}
select={this.select}
checkedIndex={this.state.checkedIndex}/>
<div className="compound-button--compose">
<button
className={`compound ${this.state.couponAmount >= 10 ? 'disable-active' : 'disable'}`}
onClick={this.compound}>合成
</button>
</div>
<div className="patch-desc">
<p className={'title'}><i></i><span>代金券碎片说明</span><i></i></p>
......@@ -103,10 +108,7 @@ class UsePatch extends PureComponent {
<p className={'desc-item'}>2. 碎片在购课时不能单独使用,可合成完整代金券后用代金券抵扣现金;</p>
<p className={'desc-item'}>3. 碎片合成代金券后7日内有效。</p>
</div>
<button
className={`compound ${this.state.couponAmount >= 10 ? 'disable-active' : 'disable'}`}
onClick={this.compound}>合成
</button>
{
this.state.success &&
<div className="success">
......
......@@ -97,7 +97,7 @@
}
.patch-desc {
padding: 0 12px;
padding: 0 12px 20px;
margin-top: 30px;
.title {
......@@ -132,10 +132,11 @@
}
.compound {
margin-top: 44px;
// margin-top: 44px;
width: 100%;
height: 40px;
border: none;
border-radius: 20px;
outline: none;
font-size: 16px;
color: #fff;
......@@ -164,4 +165,12 @@
margin-top: -15px;
margin-left: -50px;
}
}
.compound-button--compose {
padding: 0 12px;
.compound {
margin-top: 10px;
}
}
\ No newline at end of file
......@@ -579,8 +579,7 @@ class Detail extends Component {
<ShareRank courseInfo={course_info}/>
}
{
/**
{/**
* 拼团
* is_aist: 是否AI特训营
* group_status: 团状态,3:课程有小团 用户没参加小团;4:用户参加了小团
......
......@@ -74,15 +74,15 @@ const formikConfig = {
const {props, props: {history}} = formikBag
props.accountLogin({
username, password
})
// .then(res => {
// if (!res.hasError) {
// let {from} = props.location.state || {from: {pathname: '/', search: ''}}
// history.replace({pathname: from.pathname, search: from.search || ''})
// } else {
// Toast.info(res.msg, 2, null, false)
// }
// })
})/*.then(res => {
if (!res.hasError) {
let {from} = props.location.state || {from: {pathname: '/', search: ''}}
console.log(from, 'account');
history.replace({pathname: from.pathname, search: from.search || ''})
} else {
Toast.info(res.msg, 2, null, false)
}
})*/
}
}
......
......@@ -63,8 +63,6 @@ class Passport extends Component {
componentDidUpdate() {
this.routeWhenUserLoggedIn()
// console.log(this.props.location);
}
......@@ -75,9 +73,9 @@ class Passport extends Component {
if (history.action === 'POP' && history.length <= 3) {
history.push('/')
} else {
const {from} = location.state || {from: {pathname: '/', search: ''}};
history.replace(from);
// history.go(-1)
const { from } = location.state || {from: {pathname: '/', search: ''}};
const redirectURI = getParam('redirect')
redirectURI ? (window.location.href = redirectURI) : history.replace(from);
}
}
}
......
......@@ -13,7 +13,7 @@ import { connect } from 'react-redux';
import { compose } from 'redux';
import { isEmpty } from 'lodash'
import { Toast } from 'antd-mobile';
import { validateTel } from "@/utils";
import { validateTel, getParam } from "@/utils";
import { HeaderBar } from "@/common";
......@@ -28,11 +28,16 @@ class Login extends Component {
const item = loginWays.find(item => item.text === method)
let {from} = location.state || {from: {pathname: '/', search: '', hash: ''}};
let from = location.state && location.state.from || {
pathname: '/',
search: window.location.search,
hash: ''
};
const redirectURI = window.location.origin + from.pathname + from.search + from.hash;
switch (method) {
case '账号登录':
history.push('/passport/account-login', location.state)
history.push({pathname: '/passport/account-login', search: window.location.search}, location.state)
break;
case '微信':
window.location.assign(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=${encodeURIComponent(redirectURI)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`)
......
......@@ -167,7 +167,7 @@ class MyCourses extends Component {
:
<div className="empty">
<p><i className='iconfont iconfish'/></p>
<p className='empty-prompt'>还是咸鱼一条,快去翻身~</p>
<p className='empty-prompt'>您还没有课程哦,赶快去选课吧~</p>
<p>
<Link className='select-course' to='/classify'>去选课</Link>
</p>
......
......@@ -75,6 +75,7 @@ class Video extends Component {
previousPlaybackRate = 1
currentPlaybackRate = 1
reconnect = true
timeEnough = false
recordSocket
recordTimer
......@@ -382,12 +383,24 @@ class Video extends Component {
})
this.ws.addEventListener('message', e => {
const data = JSON.parse(e.data);
data.code == 4040 && (this.reconnect = false)
data.code == 4040 && (this.reconnect = false);
data.code == 5001 && (this.timeEnough = true);
})
}
sendMessage = message => {
this.ws && this.ws.readyState === 1 && this.ws.send(JSON.stringify(message))
let readyState = this.ws.readyState, _this = this;
if(readyState === 1) {
this.ws && this.ws.send(JSON.stringify(message))
}else if(readyState === 3) {
this.ws.close();
this.ws = null;
let reconnect = setTimeout(function() {
clearTimeout(reconnect);
reconnect = null;
_this.ws = new WebSocket(PROCESS_URL);
}, 500);
}
}
//视频结束请求接口
......@@ -408,6 +421,11 @@ class Video extends Component {
console.log('免费课程 拦截');
return;
}
// 时间足够不发送
if(this.timeEnough) {
console.log('5001 时间足够');
return;
}
if (course.is_aist) {
// 返现课程
this.sendMessage({
......@@ -424,7 +442,7 @@ class Video extends Component {
token: this.token,
platform: 5,
video_id: videoList[activeIndex]['id'],
course_id: this.courseID,
course_id: this.state.courseId,
v_course_id: vCourseId,
})
}
......@@ -442,6 +460,11 @@ class Video extends Component {
if (Number(sec) === 0) {
return;
}
// 时间足够不发送
if(this.timeEnough) {
console.log('5001 时间足够');
return;
}
let info_type = 'c_watch_time';
if (course.is_aist) {
info_type = 'watch_time';
......@@ -451,11 +474,11 @@ class Video extends Component {
rate,
time: sec,
video_id: videoList[activeIndex]['id'],
course_id: this.courseID,
course_id: this.state.courseId,
v_course_id: vCourseId,
uid: this.props.user.data.uid,
token: this.token,
platform: 0
platform: 5
})
}
......@@ -502,10 +525,14 @@ class Video extends Component {
this.previousPlaybackRate = this.currentPlaybackRate
})
this.player.on('ended', () => {
console.log('ended');
this.sendWatchTime(this.watchSec, this.currentPlaybackRate)
this.countSchedule(); // 计算进度
this.getShareProgressInfo()
clearInterval(this.timer)
// 返现课程才出现打卡记录
if(this.state.course.is_aist) {
this.getShareProgressInfo()
}
clearInterval(this.timer);
})
this.player.on('seeked', () => {
this.sendRecord()
......@@ -535,8 +562,10 @@ class Video extends Component {
if (index === this.state.activeIndex) {
return
}
console.log('selectVideo 先发送时间 在发送进度 在重置定时器');
this.sendWatchTime(this.watchSec, this.currentPlaybackRate)
this.countSchedule(); // 计算进度
this.setupTimer();
this.setState(
{
......@@ -551,7 +580,7 @@ class Video extends Component {
this.getCoursePrice();
}
}
)
);
}
getLastVideoIndex = lastIndex => {
......@@ -592,10 +621,16 @@ class Video extends Component {
const {course = {}} = this.state;
if (Number(course.course_id) === 0 || course.course_id === '') {
console.log('免费课程 拦截');
} else {
}else{
let _this = this;
this.setupWS();
this.setupTimer();
this.countSchedule();
console.log('playSetup');
let scheduleTime = setTimeout(function () {
clearTimeout(scheduleTime);
scheduleTime = null;
_this.countSchedule();
}, 1000);
}
let index = this.getLastVideoIndex(course.last_video_id);
index = index >= 0 ? index : 0;
......
......@@ -2,7 +2,7 @@ import { combineReducers } from 'redux';
import myCourses from '@/components/study/myCourses/reducers'
import courseInfo from '@/components/detail/reducers'
import user from './userReducer'
import country from '@/components/country/countryRedux';
import country from '@/components/country/countryRedux'
const reducer = combineReducers({
......
import { SET_CURRENT_USER, UPDATE_USER, START_FETCH_USER } from '@/store/userAction';
import { merge } from 'lodash'
const notLoggedIn = 4030
const initialState = {
hasError: false,
code: 0,
hasError: true,
code: notLoggedIn,
msg: '',
data: {
username: '',
......
......@@ -3768,6 +3768,13 @@ dom-walk@^0.1.0:
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"
integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=
dom7@^2.1.3:
version "2.1.3"
resolved "https://registry.npm.taobao.org/dom7/download/dom7-2.1.3.tgz#a736f9c3bfbc4ca039a81cd095f97d1d7f3de19c"
integrity sha1-pzb5w7+8TKA5qBzQlfl9HX894Zw=
dependencies:
ssr-window "^1.0.1"
domain-browser@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
......@@ -10586,6 +10593,11 @@ sshpk@^1.7.0:
safer-buffer "^2.0.2"
tweetnacl "~0.14.0"
ssr-window@^1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/ssr-window/download/ssr-window-1.0.1.tgz#30752a6a4666e7767f0b7e6aa6fc2fdbd0d9b369"
integrity sha1-MHUqakZm53Z/C35qpvwv29DZs2k=
ssri@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
......@@ -10859,6 +10871,14 @@ svgo@^1.0.0, svgo@^1.2.1:
unquote "~1.1.1"
util.promisify "~1.0.0"
swiper@^4.5.0:
version "4.5.0"
resolved "https://registry.npm.taobao.org/swiper/download/swiper-4.5.0.tgz#4d870bec4f5abe2fb259325849dd2641c9243c0d"
integrity sha1-TYcL7E9avi+yWTJYSd0mQckkPA0=
dependencies:
dom7 "^2.1.3"
ssr-window "^1.0.1"
symbol-observable@^1.0.4, symbol-observable@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
......
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