Commit a0e250db by FE

bargain btn modify

parent 8684be58
......@@ -2,74 +2,74 @@
"mrstatic/js/0.3cda4082.chunk.js": "/mrstatic/js/0.3cda4082.chunk.js",
"mrstatic/js/0.3cda4082.chunk.js.map": "/mrstatic/js/0.3cda4082.chunk.js.map",
"BargainMiddlePage.css": "/mrstatic/css/BargainMiddlePage.247ed778.chunk.css",
"BargainMiddlePage.js": "/mrstatic/js/BargainMiddlePage.33851e01.chunk.js",
"BargainMiddlePage.js.map": "/mrstatic/js/BargainMiddlePage.33851e01.chunk.js.map",
"BargainMiddlePage.js": "/mrstatic/js/BargainMiddlePage.c3392e0a.chunk.js",
"BargainMiddlePage.js.map": "/mrstatic/js/BargainMiddlePage.c3392e0a.chunk.js.map",
"Classify.css": "/mrstatic/css/Classify.127d35ae.chunk.css",
"Classify.js": "/mrstatic/js/Classify.d90ec769.chunk.js",
"Classify.js.map": "/mrstatic/js/Classify.d90ec769.chunk.js.map",
"Classify.js": "/mrstatic/js/Classify.90b28556.chunk.js",
"Classify.js.map": "/mrstatic/js/Classify.90b28556.chunk.js.map",
"CourseList.css": "/mrstatic/css/CourseList.edc539ff.chunk.css",
"CourseList.js": "/mrstatic/js/CourseList.2e4e2dee.chunk.js",
"CourseList.js.map": "/mrstatic/js/CourseList.2e4e2dee.chunk.js.map",
"CourseList.js": "/mrstatic/js/CourseList.84886b88.chunk.js",
"CourseList.js.map": "/mrstatic/js/CourseList.84886b88.chunk.js.map",
"DrawDocument.css": "/mrstatic/css/DrawDocument.1bd3da48.chunk.css",
"DrawDocument.js": "/mrstatic/js/DrawDocument.fe498fdd.chunk.js",
"DrawDocument.js.map": "/mrstatic/js/DrawDocument.fe498fdd.chunk.js.map",
"Examination.css": "/mrstatic/css/Examination.17af9370.chunk.css",
"Examination.js": "/mrstatic/js/Examination.d6cdc9b7.chunk.js",
"Examination.js.map": "/mrstatic/js/Examination.d6cdc9b7.chunk.js.map",
"MyEdit.js": "/mrstatic/js/MyEdit.fe4ce0d0.chunk.js",
"MyEdit.js.map": "/mrstatic/js/MyEdit.fe4ce0d0.chunk.js.map",
"Examination.js": "/mrstatic/js/Examination.2baf7abf.chunk.js",
"Examination.js.map": "/mrstatic/js/Examination.2baf7abf.chunk.js.map",
"MyEdit.js": "/mrstatic/js/MyEdit.89e50819.chunk.js",
"MyEdit.js.map": "/mrstatic/js/MyEdit.89e50819.chunk.js.map",
"Order.css": "/mrstatic/css/Order.e46f87f2.chunk.css",
"Order.js": "/mrstatic/js/Order.863bcecd.chunk.js",
"Order.js.map": "/mrstatic/js/Order.863bcecd.chunk.js.map",
"Orderinfo.js": "/mrstatic/js/Orderinfo.5dac860b.chunk.js",
"Orderinfo.js.map": "/mrstatic/js/Orderinfo.5dac860b.chunk.js.map",
"Order.js": "/mrstatic/js/Order.7967ef7f.chunk.js",
"Order.js.map": "/mrstatic/js/Order.7967ef7f.chunk.js.map",
"Orderinfo.js": "/mrstatic/js/Orderinfo.bbde0b54.chunk.js",
"Orderinfo.js.map": "/mrstatic/js/Orderinfo.bbde0b54.chunk.js.map",
"PayOrder.css": "/mrstatic/css/PayOrder.68a25070.chunk.css",
"PayOrder.js": "/mrstatic/js/PayOrder.8993c389.chunk.js",
"PayOrder.js.map": "/mrstatic/js/PayOrder.8993c389.chunk.js.map",
"PayOrder.js": "/mrstatic/js/PayOrder.33c0f4f6.chunk.js",
"PayOrder.js.map": "/mrstatic/js/PayOrder.33c0f4f6.chunk.js.map",
"Preferential.css": "/mrstatic/css/Preferential.312f2a43.chunk.css",
"Preferential.js": "/mrstatic/js/Preferential.9f4e6030.chunk.js",
"Preferential.js.map": "/mrstatic/js/Preferential.9f4e6030.chunk.js.map",
"Preferential.js": "/mrstatic/js/Preferential.fd7820b1.chunk.js",
"Preferential.js.map": "/mrstatic/js/Preferential.fd7820b1.chunk.js.map",
"SearchResult.css": "/mrstatic/css/SearchResult.b11acd73.chunk.css",
"SearchResult.js": "/mrstatic/js/SearchResult.6bd7cca1.chunk.js",
"SearchResult.js.map": "/mrstatic/js/SearchResult.6bd7cca1.chunk.js.map",
"SearchResult.js": "/mrstatic/js/SearchResult.23abbb99.chunk.js",
"SearchResult.js.map": "/mrstatic/js/SearchResult.23abbb99.chunk.js.map",
"ShopCart.css": "/mrstatic/css/ShopCart.887eb690.chunk.css",
"ShopCart.js": "/mrstatic/js/ShopCart.ab19bf02.chunk.js",
"ShopCart.js.map": "/mrstatic/js/ShopCart.ab19bf02.chunk.js.map",
"ShopCart.js": "/mrstatic/js/ShopCart.bd20f40a.chunk.js",
"ShopCart.js.map": "/mrstatic/js/ShopCart.bd20f40a.chunk.js.map",
"aist-share.css": "/mrstatic/css/aist-share.f4398072.chunk.css",
"aist-share.js": "/mrstatic/js/aist-share.f08f4fde.chunk.js",
"aist-share.js.map": "/mrstatic/js/aist-share.f08f4fde.chunk.js.map",
"aist-share.js": "/mrstatic/js/aist-share.785451c0.chunk.js",
"aist-share.js.map": "/mrstatic/js/aist-share.785451c0.chunk.js.map",
"coupons.css": "/mrstatic/css/coupons.cf38c16e.chunk.css",
"coupons.js": "/mrstatic/js/coupons.86ed52ec.chunk.js",
"coupons.js.map": "/mrstatic/js/coupons.86ed52ec.chunk.js.map",
"coupons.js": "/mrstatic/js/coupons.1f277415.chunk.js",
"coupons.js.map": "/mrstatic/js/coupons.1f277415.chunk.js.map",
"detail.css": "/mrstatic/css/detail.63ef174e.chunk.css",
"detail.js": "/mrstatic/js/detail.5aef7224.chunk.js",
"detail.js.map": "/mrstatic/js/detail.5aef7224.chunk.js.map",
"detail.js": "/mrstatic/js/detail.db4f5431.chunk.js",
"detail.js.map": "/mrstatic/js/detail.db4f5431.chunk.js.map",
"main.css": "/mrstatic/css/main.5c451943.chunk.css",
"main.js": "/mrstatic/js/main.7e89dc2d.chunk.js",
"main.js.map": "/mrstatic/js/main.7e89dc2d.chunk.js.map",
"main.js": "/mrstatic/js/main.72dd966c.chunk.js",
"main.js.map": "/mrstatic/js/main.72dd966c.chunk.js.map",
"myorders.css": "/mrstatic/css/myorders.e3d68b58.chunk.css",
"myorders.js": "/mrstatic/js/myorders.3ebf22ad.chunk.js",
"myorders.js.map": "/mrstatic/js/myorders.3ebf22ad.chunk.js.map",
"myorders.js": "/mrstatic/js/myorders.be372bac.chunk.js",
"myorders.js.map": "/mrstatic/js/myorders.be372bac.chunk.js.map",
"purchased.css": "/mrstatic/css/purchased.c9466779.chunk.css",
"purchased.js": "/mrstatic/js/purchased.f057da65.chunk.js",
"purchased.js.map": "/mrstatic/js/purchased.f057da65.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.fec949e6.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.fec949e6.js.map",
"purchased.js": "/mrstatic/js/purchased.0893278d.chunk.js",
"purchased.js.map": "/mrstatic/js/purchased.0893278d.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.5d074e46.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.5d074e46.js.map",
"search.css": "/mrstatic/css/search.e26f3ee9.chunk.css",
"search.js": "/mrstatic/js/search.5aa44ed1.chunk.js",
"search.js.map": "/mrstatic/js/search.5aa44ed1.chunk.js.map",
"search.js": "/mrstatic/js/search.4a7c2e79.chunk.js",
"search.js.map": "/mrstatic/js/search.4a7c2e79.chunk.js.map",
"shareposter.css": "/mrstatic/css/shareposter.cde549fc.chunk.css",
"shareposter.js": "/mrstatic/js/shareposter.1cc92e57.chunk.js",
"shareposter.js.map": "/mrstatic/js/shareposter.1cc92e57.chunk.js.map",
"shareposter.js": "/mrstatic/js/shareposter.3b77e330.chunk.js",
"shareposter.js.map": "/mrstatic/js/shareposter.3b77e330.chunk.js.map",
"study.css": "/mrstatic/css/study.c5bde985.chunk.css",
"study.js": "/mrstatic/js/study.87355657.chunk.js",
"study.js.map": "/mrstatic/js/study.87355657.chunk.js.map",
"study.js": "/mrstatic/js/study.7c72c07a.chunk.js",
"study.js.map": "/mrstatic/js/study.7c72c07a.chunk.js.map",
"togroup.css": "/mrstatic/css/togroup.ffd8be6c.chunk.css",
"togroup.js": "/mrstatic/js/togroup.c87a3e21.chunk.js",
"togroup.js.map": "/mrstatic/js/togroup.c87a3e21.chunk.js.map",
"togroup.js": "/mrstatic/js/togroup.17748920.chunk.js",
"togroup.js.map": "/mrstatic/js/togroup.17748920.chunk.js.map",
"video.css": "/mrstatic/css/video.b8d615d9.chunk.css",
"video.js": "/mrstatic/js/video.efa90744.chunk.js",
"video.js.map": "/mrstatic/js/video.efa90744.chunk.js.map",
"video.js": "/mrstatic/js/video.68d3668b.chunk.js",
"video.js.map": "/mrstatic/js/video.68d3668b.chunk.js.map",
"mrstatic/css/25.60a38a0f.chunk.css": "/mrstatic/css/25.60a38a0f.chunk.css",
"mrstatic/js/25.00f5dee6.chunk.js": "/mrstatic/js/25.00f5dee6.chunk.js",
"mrstatic/js/25.00f5dee6.chunk.js.map": "/mrstatic/js/25.00f5dee6.chunk.js.map",
......@@ -91,11 +91,11 @@
"mrstatic/js/31.f3d31bfc.chunk.js": "/mrstatic/js/31.f3d31bfc.chunk.js",
"mrstatic/js/31.f3d31bfc.chunk.js.map": "/mrstatic/js/31.f3d31bfc.chunk.js.map",
"mrstatic/css/32.6e885738.chunk.css": "/mrstatic/css/32.6e885738.chunk.css",
"mrstatic/js/32.f11af345.chunk.js": "/mrstatic/js/32.f11af345.chunk.js",
"mrstatic/js/32.f11af345.chunk.js.map": "/mrstatic/js/32.f11af345.chunk.js.map",
"mrstatic/js/32.3c62b0cd.chunk.js": "/mrstatic/js/32.3c62b0cd.chunk.js",
"mrstatic/js/32.3c62b0cd.chunk.js.map": "/mrstatic/js/32.3c62b0cd.chunk.js.map",
"mrstatic/css/33.400393b7.chunk.css": "/mrstatic/css/33.400393b7.chunk.css",
"mrstatic/js/33.d94fc9be.chunk.js": "/mrstatic/js/33.d94fc9be.chunk.js",
"mrstatic/js/33.d94fc9be.chunk.js.map": "/mrstatic/js/33.d94fc9be.chunk.js.map",
"mrstatic/js/33.6502a07c.chunk.js": "/mrstatic/js/33.6502a07c.chunk.js",
"mrstatic/js/33.6502a07c.chunk.js.map": "/mrstatic/js/33.6502a07c.chunk.js.map",
"index.html": "/index.html",
"mrstatic/css/25.60a38a0f.chunk.css.map": "/mrstatic/css/25.60a38a0f.chunk.css.map",
"mrstatic/css/27.0710e3e3.chunk.css.map": "/mrstatic/css/27.0710e3e3.chunk.css.map",
......@@ -130,6 +130,6 @@
"mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.e0655d4d.woff",
"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.a9f40c59e58ee7b05e086ba5dd32cf53.js": "/precache-manifest.a9f40c59e58ee7b05e086ba5dd32cf53.js",
"precache-manifest.6c9d5733e41fe58b10ff4ae5f192042f.js": "/precache-manifest.6c9d5733e41fe58b10ff4ae5f192042f.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.60a38a0f.chunk.css" rel="stylesheet"><link href="/mrstatic/css/main.5c451943.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/api.js"></script><script>!function(f){function e(e){for(var r,t,n=e[0],a=e[1],o=e[2],c=0,d=[];c<n.length;c++)t=n[c],l[t]&&d.push(l[t][0]),l[t]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(f[r]=a[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],n=!0,a=1;a<t.length;a++){var o=t[a];0!==l[o]&&(n=!1)}n&&(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,n){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:"247ed778",2:"127d35ae",3:"edc539ff",4:"1bd3da48",5:"17af9370",6:"31d6cfe0",7:"e46f87f2",8:"31d6cfe0",9:"68a25070",10:"312f2a43",11:"b11acd73",12:"887eb690",13:"f4398072",14:"cf38c16e",15:"63ef174e",17:"e3d68b58",18:"c9466779",20:"e26f3ee9",21:"cde549fc",22:"c5bde985",23:"ffd8be6c",24:"b8d615d9",26:"31d6cfe0",27:"0710e3e3",28:"51412fcd",29:"e292ab6b",30:"1133c967",31:"37fb0c23",32:"6e885738",33:"400393b7"}[u]+".chunk.css",a=p.p+r,t=document.getElementsByTagName("link"),o=0;o<t.length;o++){var c=(f=t[o]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(c===r||c===a))return e()}var d=document.getElementsByTagName("style");for(o=0;o<d.length;o++){var f;if((c=(f=d[o]).getAttribute("data-href"))===r||c===a)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||a,t=new Error("Loading CSS chunk "+u+" failed.\n("+r+")");t.request=r,delete s[u],i.parentNode.removeChild(i),n(t)},i.href=a,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 n,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:"3cda4082",1:"33851e01",2:"d90ec769",3:"2e4e2dee",4:"fe498fdd",5:"d6cdc9b7",6:"fe4ce0d0",7:"863bcecd",8:"5dac860b",9:"8993c389",10:"9f4e6030",11:"6bd7cca1",12:"ab19bf02",13:"f08f4fde",14:"86ed52ec",15:"5aef7224",17:"3ebf22ad",18:"f057da65",20:"5aa44ed1",21:"1cc92e57",22:"87355657",23:"c87a3e21",24:"efa90744",26:"56aeff83",27:"68a72ede",28:"8ed1b5c2",29:"072e25d8",30:"012adeac",31:"f3d31bfc",32:"f11af345",33:"d94fc9be"}[u]+".chunk.js",n=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),n=e&&e.target&&e.target.src,a=new Error("Loading chunk "+u+" failed.\n("+t+": "+n+")");a.type=t,a.request=n,r[1](a)}l[u]=void 0}};var c=setTimeout(function(){n({type:"timeout",target:o})},12e4);o.onerror=o.onload=n,document.head.appendChild(o)}return Promise.all(e)},p.m=f,p.c=t,p.d=function(e,r,t){p.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.t=function(r,e){if(1&e&&(r=p(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(p.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)p.d(t,n,function(e){return r[e]}.bind(null,n));return t},p.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(r,"a",r),r},p.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},p.p="/",p.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var a=0;a<r.length;a++)e(r[a]);var h=n;i()}([])</script><script src="/mrstatic/js/25.00f5dee6.chunk.js"></script><script src="/mrstatic/js/main.7e89dc2d.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.60a38a0f.chunk.css" rel="stylesheet"><link href="/mrstatic/css/main.5c451943.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/api.js"></script><script>!function(f){function e(e){for(var r,t,n=e[0],a=e[1],o=e[2],c=0,d=[];c<n.length;c++)t=n[c],l[t]&&d.push(l[t][0]),l[t]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(f[r]=a[r]);for(b&&b(e);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],n=!0,a=1;a<t.length;a++){var o=t[a];0!==l[o]&&(n=!1)}n&&(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,n){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:"247ed778",2:"127d35ae",3:"edc539ff",4:"1bd3da48",5:"17af9370",6:"31d6cfe0",7:"e46f87f2",8:"31d6cfe0",9:"68a25070",10:"312f2a43",11:"b11acd73",12:"887eb690",13:"f4398072",14:"cf38c16e",15:"63ef174e",17:"e3d68b58",18:"c9466779",20:"e26f3ee9",21:"cde549fc",22:"c5bde985",23:"ffd8be6c",24:"b8d615d9",26:"31d6cfe0",27:"0710e3e3",28:"51412fcd",29:"e292ab6b",30:"1133c967",31:"37fb0c23",32:"6e885738",33:"400393b7"}[u]+".chunk.css",a=p.p+r,t=document.getElementsByTagName("link"),o=0;o<t.length;o++){var c=(f=t[o]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(c===r||c===a))return e()}var d=document.getElementsByTagName("style");for(o=0;o<d.length;o++){var f;if((c=(f=d[o]).getAttribute("data-href"))===r||c===a)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||a,t=new Error("Loading CSS chunk "+u+" failed.\n("+r+")");t.request=r,delete s[u],i.parentNode.removeChild(i),n(t)},i.href=a,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 n,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:"3cda4082",1:"c3392e0a",2:"90b28556",3:"84886b88",4:"fe498fdd",5:"2baf7abf",6:"89e50819",7:"7967ef7f",8:"bbde0b54",9:"33c0f4f6",10:"fd7820b1",11:"23abbb99",12:"bd20f40a",13:"785451c0",14:"1f277415",15:"db4f5431",17:"be372bac",18:"0893278d",20:"4a7c2e79",21:"3b77e330",22:"7c72c07a",23:"17748920",24:"68d3668b",26:"56aeff83",27:"68a72ede",28:"8ed1b5c2",29:"072e25d8",30:"012adeac",31:"f3d31bfc",32:"3c62b0cd",33:"6502a07c"}[u]+".chunk.js",n=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),n=e&&e.target&&e.target.src,a=new Error("Loading chunk "+u+" failed.\n("+t+": "+n+")");a.type=t,a.request=n,r[1](a)}l[u]=void 0}};var c=setTimeout(function(){n({type:"timeout",target:o})},12e4);o.onerror=o.onload=n,document.head.appendChild(o)}return Promise.all(e)},p.m=f,p.c=t,p.d=function(e,r,t){p.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.t=function(r,e){if(1&e&&(r=p(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(p.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)p.d(t,n,function(e){return r[e]}.bind(null,n));return t},p.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(r,"a",r),r},p.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},p.p="/",p.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var a=0;a<r.length;a++)e(r[a]);var b=n;i()}([])</script><script src="/mrstatic/js/25.00f5dee6.chunk.js"></script><script src="/mrstatic/js/main.72dd966c.chunk.js"></script></body></html>
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{1169:function(e,t,a){},1190:function(e,t,a){"use strict";a.r(t);a(43);var n=a(13),c=a.n(n),o=a(5),r=a(7),i=a(6),s=a(8),l=a(89),u=a(9),m=a(0),d=a.n(m),p=(a(1169),a(27)),f=a(3),h=function(e){function t(e){var a;return Object(o.a)(this,t),(a=Object(i.a)(this,Object(s.a)(t).call(this,e))).toCourseDetail=function(e){Object(l.a)(a).state.fromApp?Object(f.a)("toCourse",e):a.props.history.push("/detail?id=".concat(e))},a.state={list:[],fromApp:!!Object(f.c)("from")},a}return Object(u.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this;f.d.get("".concat(API.home,"/sys/red_packet/share_course")).then(function(t){200===t.data.code?e.setState({list:t.data.data}):c.a.info(t.data.msg,2)})}},{key:"render",value:function(){var e=this,t=this.state.list;return d.a.createElement("div",{className:"share-course"},!this.state.fromApp&&d.a.createElement(p.e,{title:"\u5206\u4eab\u9886\u7ea2\u5305",arrow:!0}),t&&t.length>0?d.a.createElement("div",null,t.map(function(t,a){var n=d.a.createElement("div",{className:"info"},d.a.createElement("p",{className:"title text-overflow-1"},t.course_title),d.a.createElement("p",{className:"contact text-overflow-1"},t.simpledescription),d.a.createElement("button",null,"\u5206\u4eab\u9886\u7ea2\u5305"));return d.a.createElement("div",{key:a},d.a.createElement(p.j,{img:t.image_name,info:n,id:t.course_id,toDetail:e.toCourseDetail}))})):d.a.createElement("div",null,d.a.createElement("p",{className:"not-data"},"\u6682\u65f6\u6ca1\u6709\u53ef\u5206\u4eab\u7684\u8bfe\u7a0b\u54e6\u301c")))}}]),t}(m.Component);t.default=h}}]);
//# sourceMappingURL=32.f11af345.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=32.3c62b0cd.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/ShareCourse/index.js"],"names":["ShareCourse","props","_this2","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","toCourseDetail","id","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__","state","fromApp","SendMessageToApp","history","push","concat","list","getParam","_this3","http","get","API","home","then","res","data","code","setState","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","_this4","react__WEBPACK_IMPORTED_MODULE_8___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_10__","title","arrow","length","map","item","index","Info","course_title","simpledescription","key","img","image_name","course_id","toDetail","Component"],"mappings":"yOAOMA,cAEF,SAAAA,EAAYC,G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ACTC,SAAUlB,EAAKzB,qBAQvC0B,EAAAJ,EAAAK,cAAA,WACID,EAAAJ,EAAAK,cAAA,KAAGC,UAAU,YAAb,qFAnEFgB,aA4EXrD","file":"mrstatic/js/32.f11af345.chunk.js","sourcesContent":["import React, {Component} from 'react';\nimport './index.scss';\nimport {HeaderBar, VList} from '@/common';\nimport {http, getParam, SendMessageToApp} from '@/utils';\nimport {Toast} from 'antd-mobile';\n\n\nclass ShareCourse extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n list: [],\n fromApp: !getParam('from') ? false : true\n };\n }\n\n componentDidMount() {\n http.get(`${API.home}/sys/red_packet/share_course`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n list: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n toCourseDetail = (id) => {\n const _this = this\n if (_this.state.fromApp) {\n SendMessageToApp(\"toCourse\", id)\n } else {\n const {history} = this.props;\n history.push(`/detail?id=${id}`)\n }\n }\n\n render() {\n const {list} = this.state;\n return (\n <div className={'share-course'}>\n {\n !this.state.fromApp &&\n <HeaderBar title='分享领红包' arrow={true}/>\n }\n\n {\n list && list.length > 0 ? <div>\n {\n list.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className={'title text-overflow-1'}>{item.course_title}</p>\n <p className={'contact text-overflow-1'}>{item.simpledescription}</p>\n <button>分享领红包</button>\n </div>\n )\n return (\n <div key={index}>\n <VList\n img={item.image_name}\n info={Info}\n id={item.course_id}\n toDetail={this.toCourseDetail}\n />\n </div>\n\n )\n })\n }\n </div> :\n <div>\n <p className='not-data'>暂时没有可分享的课程哦〜</p>\n </div>\n }\n\n </div>\n )\n }\n}\n\nexport default ShareCourse;\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/ShareCourse/index.js"],"names":["ShareCourse","props","_this2","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","toCourseDetail","id","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__","state","fromApp","SendMessageToApp","history","push","concat","list","getParam","_this3","http","get","API","home","then","res","data","code","setState","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","_this4","react__WEBPACK_IMPORTED_MODULE_8___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_10__","title","arrow","length","map","item","index","Info","course_title","simpledescription","key","img","image_name","course_id","toDetail","Component"],"mappings":"yOAOMA,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,KAmBVQ,eAAiB,SAACC,GACHP,OAAAQ,EAAA,EAAAR,CAAAD,GACDU,MAAMC,QACZC,YAAiB,WAAYJ,GAEXR,EAAKD,MAAhBc,QACCC,KAAR,cAAAC,OAA2BP,KAxB/BR,EAAKU,MAAQ,CACTM,KAAM,GACNL,UAAUM,YAAS,SAJRjB,mFAQC,IAAAkB,EAAAf,KAChBgB,IAAKC,IAAL,GAAAL,OAAYM,IAAIC,KAAhB,iCAAoDC,KAAK,SAACC,GAChC,MAAlBA,EAAIC,KAAKC,KACTR,EAAKS,SAAS,CACVX,KAAMQ,EAAIC,KAAKA,OAGnBG,EAAAC,EAAMC,KAAKN,EAAIC,KAAKM,IAAK,sCAe5B,IAAAC,EAAA7B,KACEa,EAAQb,KAAKO,MAAbM,KACP,OACIiB,EAAAJ,EAAAK,cAAA,OAAKC,UAAW,iBAEPhC,KAAKO,MAAMC,SACZsB,EAAAJ,EAAAK,cAACE,EAAA,EAAD,CAAWC,MAAM,iCAAQC,OAAO,IAIhCtB,GAAQA,EAAKuB,OAAS,EAAIN,EAAAJ,EAAAK,cAAA,WAEdlB,EAAKwB,IAAI,SAACC,EAAMC,GACZ,IAAMC,EACFV,EAAAJ,EAAAK,cAAA,OAAKC,UAAU,QACXF,EAAAJ,EAAAK,cAAA,KAAGC,UAAW,yBAA0BM,EAAKG,cAC7CX,EAAAJ,EAAAK,cAAA,KAAGC,UAAW,2BAA4BM,EAAKI,mBAC/CZ,EAAAJ,EAAAK,cAAA,iDAGR,OACID,EAAAJ,EAAAK,cAAA,OAAKY,IAAKJ,GACNT,EAAAJ,EAAAK,cAACE,EAAA,EAAD,CACIW,IAAKN,EAAKO,WACVlB,KAAMa,EACNnC,GAAIiC,EAAKQ,UACTC,SAAUlB,EAAKzB,qBAQvC0B,EAAAJ,EAAAK,cAAA,WACID,EAAAJ,EAAAK,cAAA,KAAGC,UAAU,YAAb,qFAnEFgB,aA4EXrD","file":"mrstatic/js/32.3c62b0cd.chunk.js","sourcesContent":["import React, {Component} from 'react';\nimport './index.scss';\nimport {HeaderBar, VList} from '@/common';\nimport {http, getParam, SendMessageToApp} from '@/utils';\nimport {Toast} from 'antd-mobile';\n\n\nclass ShareCourse extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n list: [],\n fromApp: !getParam('from') ? false : true\n };\n }\n\n componentDidMount() {\n http.get(`${API.home}/sys/red_packet/share_course`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n list: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n toCourseDetail = (id) => {\n const _this = this\n if (_this.state.fromApp) {\n SendMessageToApp(\"toCourse\", id)\n } else {\n const {history} = this.props;\n history.push(`/detail?id=${id}`)\n }\n }\n\n render() {\n const {list} = this.state;\n return (\n <div className={'share-course'}>\n {\n !this.state.fromApp &&\n <HeaderBar title='分享领红包' arrow={true}/>\n }\n\n {\n list && list.length > 0 ? <div>\n {\n list.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className={'title text-overflow-1'}>{item.course_title}</p>\n <p className={'contact text-overflow-1'}>{item.simpledescription}</p>\n <button>分享领红包</button>\n </div>\n )\n return (\n <div key={index}>\n <VList\n img={item.image_name}\n info={Info}\n id={item.course_id}\n toDetail={this.toCourseDetail}\n />\n </div>\n\n )\n })\n }\n </div> :\n <div>\n <p className='not-data'>暂时没有可分享的课程哦〜</p>\n </div>\n }\n\n </div>\n )\n }\n}\n\nexport default ShareCourse;\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{1170:function(n,m,e){},1191:function(n,m,e){"use strict";e.r(m);var a=e(5),u=e(7),t=e(6),r=e(8),c=e(9),o=e(0),l=e.n(o),i=e(20),s=e(24),p=e(16),y=e.n(p),d=e(3),f=e(161),v=e(27),E=(e(1170),function(n){function m(n){var e;return Object(a.a)(this,m),(e=Object(t.a)(this,Object(r.a)(m).call(this,n))).judgeCurrentPosition=function(){var n=e.state.data,m=document.documentElement.scrollTop||document.body.scrollTop;n.map(function(n){var m=document.querySelector('[data-type="'.concat(n.type,'"]'));return m?m.offsetTop:""}).map(function(a,u){a&&m>=a&&e.setState({currentNav:n[u].type})})},e.toParentPage=function(n,m){var a=e.props,u=a.history;(0,a.addCountryNum)({num:m,code:Object(d.c)("share_code")}),u.go(-1),n.preventDefault()},e.scrollTo=function(n){var m=document.querySelector('[data-type="'.concat(n,'"]'));m&&(e.setState({currentNav:n}),window.scrollTo({left:0,top:m.offsetTop,behavior:"smooth"}))},e.state={currentNav:"A",data:[{type:"0",list:[{name:"\u4e2d\u56fd\u5927\u9646",num:"86"},{name:"\u7f8e\u56fd",num:"1"},{name:"\u65e5\u672c",num:"81"},{name:"\u4e2d\u56fd\u9999\u6e2f",num:"852"},{name:"\u4e2d\u56fd\u6fb3\u95e8",num:"853"},{name:"\u4e2d\u56fd\u53f0\u6e7e",num:"886"},{name:"\u6fb3\u5927\u5229\u4e9a",num:"61"},{name:"\u52a0\u62ff\u5927",num:"1"},{name:"\u82f1\u56fd",num:"44"},{name:"\u65b0\u897f\u5170",num:"64"}]},{type:"A",list:[{name:"\u963f\u5bcc\u6c57",num:"93"},{name:"\u963f\u5c14\u5df4\u5c3c\u4e9a",num:"355"},{name:"\u963f\u5c14\u53ca\u5229\u4e9a",num:"213"},{name:"\u5b89\u9053\u5c14",num:"376"},{name:"\u5b89\u54e5\u62c9",num:"244"},{name:"\u5b89\u572d\u62c9",num:"1264"},{name:"\u5b89\u63d0\u74dc\u548c\u5df4\u5e03\u8fbe",num:"1268"},{name:"\u963f\u6839\u5ef7",num:"54"},{name:"\u963f\u9c81\u5df4",num:"297"},{name:"\u963f\u585e\u62dc\u7586",num:"994"},{name:"\u57c3\u53ca",num:"20"},{name:"\u7231\u6c99\u5c3c\u4e9a",num:"372"},{name:"\u57c3\u585e\u4fc4\u6bd4\u4e9a",num:"251"},{name:"\u7231\u5c14\u5170",num:"353"},{name:"\u963f\u66fc",num:"968"},{name:"\u963f\u62c9\u4f2f\u8054\u5408\u914b\u957f\u56fd",num:"971"},{name:"\u7231\u6c99\u5c3c\u4e9a",num:"372"}]},{type:"B",list:[{name:"\u5df4\u54c8\u9a6c",num:"1242"},{name:"\u5df4\u6797",num:"973"},{name:"\u5df4\u5df4\u591a\u65af",num:"1246"},{name:"\u767d\u4fc4\u7f57\u65af",num:"375"},{name:"\u6bd4\u5229\u65f6",num:"32"},{name:"\u4f2f\u5229\u5179",num:"501"},{name:"\u8d1d\u5b81",num:"229"},{name:"\u767e\u6155\u5927\u7fa4\u5c9b",num:"1441"},{name:"\u4e0d\u4e39",num:"975"},{name:"\u73bb\u5229\u7ef4\u4e9a",num:"591"},{name:"\u6ce2\u65af\u5c3c\u4e9a\u548c\u9ed1\u585e\u54e5\u7ef4\u90a3",num:"387"},{name:"\u535a\u8328\u74e6\u7eb3",num:"267"},{name:"\u5df4\u897f",num:"55"},{name:"\u4fdd\u52a0\u5229\u4e9a",num:"359"},{name:"\u5e03\u57fa\u7eb3\u6cd5\u7d22",num:"226"},{name:"\u5e03\u9686\u8fea",num:"257"},{name:"\u51b0\u5c9b",num:"354"},{name:"\u5df4\u57fa\u65af\u5766",num:"92"},{name:"\u5df4\u52d2\u65af\u5766",num:"970"},{name:"\u5df4\u62ff\u9a6c",num:"507"},{name:"\u5df4\u5e03\u4e9a\u65b0\u51e0\u5185\u4e9a",num:"675"},{name:"\u5df4\u62c9\u572d",num:"51"},{name:"\u79d8\u9c81",num:"354"},{name:"\u6ce2\u5170",num:"48"},{name:"\u6ce2\u591a\u9ece\u5404",num:"1787"}]},{type:"C",list:[{name:"\u8d64\u9053\u51e0\u5185\u4e9a",num:"240"}]},{type:"D",list:[{name:"\u4e39\u9ea6",num:"45"},{name:"\u591a\u7c73\u5c3c\u52a0",num:"1767"},{name:"\u591a\u7c73\u5c3c\u52a0\u5171\u548c\u56fd",num:"1809"},{name:"\u5fb7\u56fd",num:"49"},{name:"\u4e1c\u5e1d\u6c76",num:"670"},{name:"\u591a\u54e5",num:"228"}]},{type:"E",list:[{name:"\u5384\u74dc\u591a\u5c14",num:"593"},{name:"\u5384\u7acb\u7279\u91cc\u4e9a",num:"291"},{name:"\u4fc4\u7f57\u65af",num:"7"}]},{type:"F",list:[{name:"\u6cd5\u7f57\u7fa4\u5c9b",num:"298"},{name:"\u6590\u6d4e",num:"679"},{name:"\u82ac\u5170",num:"358"},{name:"\u6cd5\u56fd",num:"594"},{name:"\u6cd5\u5c5e\u572d\u4e9a\u90a3",num:"45"},{name:"\u6cd5\u5c5e\u6ce2\u5229\u5c3c\u897f\u4e9a",num:"689"},{name:"\u83f2\u5f8b\u5bbe",num:"63"}]},{type:"G",list:[{name:"\u54e5\u4f26\u6bd4\u4e9a",num:"57"},{name:"\u54e5\u65af\u8fbe\u9ece\u52a0",num:"506"},{name:"\u53e4\u5df4",num:"53"},{name:"\u521a\u679c\u6c11\u4e3b\u5171\u548c\u56fd",num:"243"},{name:"\u5188\u6bd4\u4e9a",num:"220"},{name:"\u683c\u9c81\u5409\u4e9a",num:"995"},{name:"\u683c\u9675\u5170\u5c9b",num:"299"},{name:"\u683c\u6797\u7eb3\u8fbe",num:"1473"},{name:"\u74dc\u5fb7\u7f57\u666e\u5c9b",num:"590"},{name:"\u5173\u5c9b",num:"299"},{name:"\u74dc\u5730\u9a6c\u62c9",num:"502"},{name:"\u572d\u4e9a\u90a3",num:"592"},{name:"\u521a\u679c\u5171\u548c\u56fd",num:"242"}]},{type:"H",list:[{name:"\u6d77\u5730",num:"509"},{name:"\u6d2a\u90fd\u62c9\u65af",num:"504"},{name:"\u9ed1\u5c71",num:"382"},{name:"\u8377\u5170",num:"31"},{name:"\u97e9\u56fd",num:"82"}]},{type:"J",list:[{name:"\u52a0\u62ff\u5927",num:"1"},{name:"\u65e5\u672c",num:"81"},{name:"\u67ec\u57d4\u5be8",num:"855"},{name:"\u6377\u514b",num:"420"},{name:"\u5409\u5e03\u63d0",num:"253"},{name:"\u52a0\u84ec",num:"241"},{name:"\u52a0\u7eb3",num:"233"},{name:"\u51e0\u5185\u4e9a",num:"224"},{name:"\u51e0\u5185\u4e9a\u6bd4\u7ecd\u5171\u548c\u56fd",num:"245"},{name:"\u57fa\u91cc\u5df4\u65af",num:"686"},{name:"\u5409\u5c14\u5409\u65af\u65af\u5766",num:"996"},{name:"\u6d25\u5df4\u5e03\u97e6",num:"263"}]},{type:"K",list:[{name:"\u5580\u9ea6\u9686",num:"237"},{name:"\u5f00\u666e",num:"238"},{name:"\u5f00\u66fc\u7fa4\u5c9b",num:"1345"},{name:"\u79d1\u6469\u7f57",num:"269"},{name:"\u5e93\u514b\u7fa4\u5c9b",num:"682"},{name:"\u514b\u7f57\u5730\u4e9a",num:"385"},{name:"\u5e93\u62c9\u7d22",num:"599"},{name:"\u80af\u5c3c\u4e9a",num:"254"},{name:"\u79d1\u5a01\u7279",num:"965"},{name:"\u5361\u5854\u5c14",num:"974"},{name:"\u79d1\u7279\u8fea\u74e6",num:"225"}]},{type:"L",list:[{name:"\u8001\u631d",num:"856"},{name:"\u62c9\u8131\u7ef4\u4e9a",num:"371"},{name:"\u9ece\u5df4\u5ae9",num:"961"},{name:"\u83b1\u7d22\u6258",num:"266"},{name:"\u5229\u6bd4\u91cc\u4e9a",num:"231"},{name:"\u5229\u6bd4\u4e9a",num:"218"},{name:"\u5217\u652f\u6566\u58eb\u767b",num:"423"},{name:"\u7acb\u9676\u5b9b",num:"370"},{name:"\u5362\u68ee\u5821",num:"352"},{name:"\u7559\u5c3c\u6c6a",num:"262"},{name:"\u7f57\u9a6c\u5c3c\u4e9a",num:"40"},{name:"\u5362\u65fa\u8fbe",num:"423"}]},{type:"M",list:[{name:"\u7f8e\u5c5e\u8428\u6469\u4e9a",num:"1684"},{name:"\u5b5f\u52a0\u62c9\u56fd",num:"880"},{name:"\u9a6c\u5176\u987f",num:"389"},{name:"\u9a6c\u8fbe\u52a0\u65af\u52a0",num:"261"},{name:"\u9a6c\u62c9\u7ef4",num:"265"},{name:"\u9a6c\u6765\u897f\u4e9a",num:"60"},{name:"\u9a6c\u5c14\u4ee3\u592b",num:"960"},{name:"\u9a6c\u91cc",num:"223"},{name:"\u9a6c\u8033\u4ed6",num:"356"},{name:"\u9a6c\u63d0\u5c3c\u514b",num:"596"},{name:"\u6bdb\u91cc\u5854\u5c3c\u4e9a",num:"222"},{name:"\u6bdb\u91cc\u6c42\u65af",num:"230"},{name:"\u58a8\u897f\u54e5",num:"52"},{name:"\u6469\u5c14\u591a\u74e6",num:"373"},{name:"\u6469\u7eb3\u54e5",num:"377"},{name:"\u8499\u53e4",num:"976"},{name:"\u8499\u7279\u585e\u62c9\u7279\u5c9b",num:"1664"},{name:"\u6469\u6d1b\u54e5",num:"212"},{name:"\u83ab\u6851\u6bd4\u514b",num:"258"},{name:"\u7f05\u7538",num:"95"},{name:"\u7f8e\u5c5e\u7ef4\u5c14\u4eac\u7fa4\u5c9b",num:"1284"}]},{type:"N",list:[{name:"\u7eb3\u7c73\u6bd4\u4e9a",num:"264"},{name:"\u5c3c\u6cca\u5c14",num:"977"},{name:"\u5c3c\u52a0\u62c9\u74dc",num:"505"},{name:"\u5c3c\u65e5\u5c14",num:"227"},{name:"\u5c3c\u65e5\u5229\u4e9a",num:"234"},{name:"\u632a\u5a01",num:"47"},{name:"\u5357\u975e",num:"27"}]},{type:"O",list:[{name:"\u6fb3\u5927\u5229\u4e9a",num:"61"},{name:"\u5965\u5730\u5229",num:"43"}]},{type:"P",list:[{name:"\u5e15\u52b3",num:"680"},{name:"\u8461\u8404\u7259",num:"351"}]},{type:"R",list:[{name:"\u745e\u5178",num:"46"},{name:"\u745e\u58eb",num:"41"}]},{type:"S",list:[{name:"\u585e\u6d66\u8def\u65af",num:"357"},{name:"\u8428\u5c14\u74e6\u591a",num:"503"},{name:"\u5723\u57fa\u8328\u548c\u5c3c\u7ef4\u65af",num:"1869"},{name:"\u5723\u9732\u897f\u4e9a",num:"1758"},{name:"\u5723\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b",num:"508"},{name:"\u5723\u6587\u68ee\u7279\u548c\u683c\u6797\u7eb3\u4e01\u65af",num:"1784"},{name:"\u8428\u6469\u4e9a",num:"685"},{name:"\u5723\u9a6c\u529b\u8bfa",num:"378"},{name:"\u5723\u591a\u7f8e\u548c\u666e\u6797\u897f\u6bd4",num:"239"},{name:"\u6c99\u7279\u963f\u62c9\u4f2f",num:"966"},{name:"\u585e\u5185\u52a0\u5c14",num:"221"},{name:"\u585e\u5c14\u7ef4\u4e9a",num:"381"},{name:"\u585e\u820c\u5c14",num:"248"},{name:"\u585e\u62c9\u5229\u6602",num:"239"},{name:"\u5723\u9a6c\u4e01\u5c9b\uff08\u8377\u5170\u90e8\u5206\uff09",num:"1721"},{name:"\u65af\u6d1b\u4f10\u514b",num:"421"},{name:"\u65af\u6d1b\u6587\u5c3c\u4e9a",num:"386"},{name:"\u6240\u7f57\u95e8\u7fa4\u5c9b",num:"677"},{name:"\u7d22\u9a6c\u91cc",num:"252"},{name:"\u65af\u91cc\u5170\u5361",num:"94"},{name:"\u82cf\u4e39",num:"249"},{name:"\u82cf\u91cc\u5357",num:"597"},{name:"\u65af\u5a01\u58eb\u5170",num:"268"}]},{type:"T",list:[{name:"\u5854\u5409\u514b\u65af\u5766",num:"992"},{name:"\u5766\u6851\u5c3c\u4e9a",num:"255"},{name:"\u6cf0\u56fd",num:"66"},{name:"\u6c64\u52a0",num:"676"},{name:"\u7279\u7acb\u5c3c\u8fbe\u548c\u591a\u5df4\u54e5",num:"1868"},{name:"\u7a81\u5c3c\u65af",num:"216"},{name:"\u571f\u8033\u5176",num:"90"},{name:"\u571f\u5e93\u66fc\u65af\u5766",num:"993"},{name:"\u7279\u514b\u65af\u548c\u51ef\u79d1\u65af\u7fa4\u5c9b",num:"1649"}]},{type:"W",list:[{name:"\u6587\u83b1",num:"673"},{name:"\u4e4c\u5e72\u8fbe",num:"256"},{name:"\u4e4c\u514b\u5170",num:"380"},{name:"\u4e4c\u62c9\u572d",num:"598"},{name:"\u4e4c\u5179\u522b\u514b\u65af\u5766",num:"998"},{name:"\u74e6\u52aa\u963f\u56fe",num:"678"},{name:"\u59d4\u5185\u745e\u62c9",num:"58"}]},{type:"X",list:[{name:"\u65b0\u897f\u5170",num:"64"},{name:"\u5e0c\u814a",num:"30"},{name:"\u5308\u7259\u5229",num:"36"},{name:"\u65b0\u5580\u91cc\u591a\u5c3c\u4e9a",num:"687"},{name:"\u65b0\u52a0\u5761",num:"65"},{name:"\u897f\u73ed\u7259",num:"34"},{name:"\u53d9\u5229\u4e9a",num:"963"},{name:"\u4e9a\u7f8e\u5c3c\u4e9a",num:"374"}]},{type:"Y",list:[{name:"\u82f1\u56fd",num:"44"},{name:"\u5370\u5ea6",num:"91"},{name:"\u5370\u5ea6\u5c3c\u897f\u4e9a",num:"62"},{name:"\u4f0a\u6717",num:"98"},{name:"\u4f0a\u62c9\u514b",num:"964"},{name:"\u4ee5\u8272\u5217",num:"972"},{name:"\u610f\u5927\u5229",num:"39"},{name:"\u7259\u4e70\u52a0",num:"1876"},{name:"\u7ea6\u65e6",num:"962"},{name:"\u8d8a\u5357",num:"84"},{name:"\u82f1\u5c5e\u5904\u5973\u7fa4\u5c9b",num:"1340"},{name:"\u4e5f\u95e8",num:"967"}]},{type:"Z",list:[{name:"\u4e2d\u56fd",num:"86"},{name:"\u4e2d\u56fd\u9999\u6e2f",num:"852"},{name:"\u4e2d\u56fd\u6fb3\u95e8",num:"853"},{name:"\u4e2d\u56fd\u53f0\u6e7e",num:"886"},{name:"\u4e2d\u975e\u5171\u548c\u56fd",num:"236"},{name:"\u4e4d\u5f97",num:"235"},{name:"\u667a\u5229",num:"56"},{name:"\u76f4\u5e03\u7f57\u9640",num:"350"},{name:"\u8d5e\u6bd4\u4e9a",num:"260"}]}]},e}return Object(c.a)(m,n),Object(u.a)(m,[{key:"componentDidMount",value:function(){document.addEventListener("scroll",this.judgeCurrentPosition)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("scroll",this.judgeCurrentPosition)}},{key:"render",value:function(){var n=this,m=this.state,e=m.currentNav,a=m.data;return l.a.createElement(l.a.Fragment,null,l.a.createElement(v.e,{title:"\u9009\u62e9\u56fd\u5bb6\u548c\u5730\u533a",arrow:!0}),l.a.createElement("ul",{className:"letter-nav"},a.map(function(m){return l.a.createElement("li",{key:"nav-".concat(m.type),className:y()("letter-nav__item",{"letter-nav__item--active":e===m.type}),onClick:function(){return n.scrollTo(m.type)}},"0"===m.type?"\u5e38":m.type)})),l.a.createElement("div",{className:"page-body"},a.map(function(m,e){var a=m.type,u=m.list;return l.a.createElement("div",{key:e},l.a.createElement("h2",{className:"country-header","data-type":a},"0"===a?"\u5e38\u7528":a),l.a.createElement("ul",{className:"country-list"},u.map(function(m,a){return l.a.createElement("li",{className:"country-item",key:"".concat(e,"-").concat(a)},l.a.createElement("a",{className:"country-item__link",href:"#",onClick:function(e){return n.toParentPage(e,m.num)}},l.a.createElement("span",{className:"country-name"},m.name),l.a.createElement("span",{className:"country-num"},"+",m.num)))})))})))}}]),m}(o.Component));m.default=Object(i.b)(function(n){return{country:n.country}},function(n){return Object(s.b)({addCountryNum:f.a},n)})(E)}}]);
//# sourceMappingURL=33.d94fc9be.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=33.6502a07c.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/country/index.js"],"names":["Country","props","_this","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__","call","judgeCurrentPosition","data","state","top","document","documentElement","scrollTop","body","map","item","el","querySelector","concat","offsetTop","index","setState","currentNav","toParentPage","e","num","_this$props","history","addCountryNum","code","getParam","go","preventDefault","scrollTo","param","window","left","behavior","type","list","name","addEventListener","removeEventListener","_this2","_this$state","react__WEBPACK_IMPORTED_MODULE_5___default","a","createElement","Fragment","_common__WEBPACK_IMPORTED_MODULE_11__","title","arrow","className","key","classnames","letter-nav__item--active","onClick","_ref","data-type","val","href","Component","connect","_ref2","country","dispatch","bindActionCreators"],"mappings":"0OAUMA,uBAEJ,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACjBE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KA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 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport classnames from 'classnames';\nimport { getParam } from '@/utils';\nimport { addCountryNum } from './countryRedux';\nimport { HeaderBar } from '@/common'\n\nimport './index.scss';\n\nclass Country extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n currentNav: 'A',\n data: [\n {\n type: '0',\n list: [\n {\n name: '中国大陆',\n num: '86'\n },\n {\n name: '美国',\n num: '1'\n },\n {\n name: '日本',\n num: '81'\n },\n {\n name: '中国香港',\n num: '852'\n },\n {\n name: '中国澳门',\n num: '853'\n },\n {\n name: '中国台湾',\n num: '886'\n },\n {\n name: '澳大利亚',\n num: '61'\n },\n {\n name: '加拿大',\n num: '1'\n },\n {\n name: '英国',\n num: '44'\n },\n {\n name: '新西兰',\n num: '64'\n },\n ]\n },\n {\n type: 'A',\n list: [\n {\n name: '阿富汗',\n num: '93'\n },\n {\n name: '阿尔巴尼亚',\n num: '355'\n },\n {\n name: '阿尔及利亚',\n num: '213'\n },\n {\n name: '安道尔',\n num: '376'\n },\n {\n name: '安哥拉',\n num: '244'\n },\n {\n name: '安圭拉',\n num: '1264'\n },\n {\n name: '安提瓜和巴布达',\n num: '1268'\n },\n {\n name: '阿根廷',\n num: '54'\n },\n {\n name: '阿鲁巴',\n num: '297'\n },\n {\n name: '阿塞拜疆',\n num: '994'\n },\n {\n name: '埃及',\n num: '20'\n },\n {\n name: '爱沙尼亚',\n num: '372'\n },\n {\n name: '埃塞俄比亚',\n num: '251'\n },\n {\n name: '爱尔兰',\n num: '353'\n },\n {\n name: '阿曼',\n num: '968'\n },\n {\n name: '阿拉伯联合酋长国',\n num: '971'\n },\n {\n name: '爱沙尼亚',\n num: '372'\n }\n ]\n },\n {\n type: 'B',\n list: [\n {\n name: '巴哈马',\n num: '1242'\n },\n {\n name: '巴林',\n num: '973'\n },\n {\n name: '巴巴多斯',\n num: '1246'\n },\n {\n name: '白俄罗斯',\n num: '375'\n },\n {\n name: '比利时',\n num: '32'\n },\n {\n name: '伯利兹',\n num: '501'\n },\n {\n name: '贝宁',\n num: '229'\n },\n {\n name: '百慕大群岛',\n num: '1441'\n },\n {\n name: '不丹',\n num: '975'\n },\n {\n name: '玻利维亚',\n num: '591'\n },\n {\n name: '波斯尼亚和黑塞哥维那',\n num: '387'\n },\n {\n name: '博茨瓦纳',\n num: '267'\n },\n {\n name: '巴西',\n num: '55'\n },\n {\n name: '保加利亚',\n num: '359'\n },\n {\n name: '布基纳法索',\n num: '226'\n },\n {\n name: '布隆迪',\n num: '257'\n },\n {\n name: '冰岛',\n num: '354'\n },\n {\n name: '巴基斯坦',\n num: '92'\n },\n {\n name: '巴勒斯坦',\n num: '970'\n },\n {\n name: '巴拿马',\n num: '507'\n },\n {\n name: '巴布亚新几内亚',\n num: '675'\n },\n {\n name: '巴拉圭',\n num: '51'\n },\n {\n name: '秘鲁',\n num: '354'\n },\n {\n name: '波兰',\n num: '48'\n },\n {\n name: '波多黎各',\n num: '1787'\n }\n ]\n },\n {\n type: 'C',\n list: [\n {\n name: '赤道几内亚',\n num: '240'\n }\n ]\n },\n {\n type: 'D',\n list: [\n {\n name: '丹麦',\n num: '45'\n },\n {\n name: '多米尼加',\n num: '1767'\n },\n {\n name: '多米尼加共和国',\n num: '1809'\n },\n {\n name: '德国',\n num: '49'\n },\n {\n name: '东帝汶',\n num: '670'\n },\n {\n name: '多哥',\n num: '228'\n }\n ]\n },\n {\n type: 'E',\n list: [\n {\n name: '厄瓜多尔',\n num: '593'\n },\n {\n name: '厄立特里亚',\n num: '291'\n },\n {\n name: '俄罗斯',\n num: '7'\n }\n ]\n },\n {\n type: 'F',\n list: [\n {\n name: '法罗群岛',\n num: '298'\n },\n {\n name: '斐济',\n num: '679'\n },\n {\n name: '芬兰',\n num: '358'\n },\n {\n name: '法国',\n num: '594'\n },\n {\n name: '法属圭亚那',\n num: '45'\n },\n {\n name: '法属波利尼西亚',\n num: '689'\n },\n {\n name: '菲律宾',\n num: '63'\n }\n ]\n },\n {\n type: 'G',\n list: [\n {\n name: '哥伦比亚',\n num: '57'\n },\n {\n name: '哥斯达黎加',\n num: '506'\n },\n {\n name: '古巴',\n num: '53'\n },\n {\n name: '刚果民主共和国',\n num: '243'\n },\n {\n name: '冈比亚',\n num: '220'\n },\n {\n name: '格鲁吉亚',\n num: '995'\n },\n {\n name: '格陵兰岛',\n num: '299'\n },\n {\n name: '格林纳达',\n num: '1473'\n },\n {\n name: '瓜德罗普岛',\n num: '590'\n },\n {\n name: '关岛',\n num: '299'\n },\n {\n name: '瓜地马拉',\n num: '502'\n },\n {\n name: '圭亚那',\n num: '592'\n },\n {\n name: '刚果共和国',\n num: '242'\n }\n ]\n },\n {\n type: 'H',\n list: [\n {\n name: '海地',\n num: '509'\n },\n {\n name: '洪都拉斯',\n num: '504'\n },\n {\n name: '黑山',\n num: '382'\n },\n {\n name: '荷兰',\n num: '31'\n },\n {\n name: '韩国',\n num: '82'\n }\n ]\n },\n {\n type: 'J',\n list: [\n {\n name: '加拿大',\n num: '1'\n },\n {\n name: '日本',\n num: '81'\n },\n {\n name: '柬埔寨',\n num: '855'\n },\n {\n name: '捷克',\n num: '420'\n },\n {\n name: '吉布提',\n num: '253'\n },\n {\n name: '加蓬',\n num: '241'\n },\n {\n name: '加纳',\n num: '233'\n },\n {\n name: '几内亚',\n num: '224'\n },\n {\n name: '几内亚比绍共和国',\n num: '245'\n },\n {\n name: '基里巴斯',\n num: '686'\n },\n {\n name: '吉尔吉斯斯坦',\n num: '996'\n },\n {\n name: '津巴布韦',\n num: '263'\n }\n ]\n },\n {\n type: 'K',\n list: [\n {\n name: '喀麦隆',\n num: '237'\n },\n {\n name: '开普',\n num: '238'\n },\n {\n name: '开曼群岛',\n num: '1345'\n },\n {\n name: '科摩罗',\n num: '269'\n },\n {\n name: '库克群岛',\n num: '682'\n },\n {\n name: '克罗地亚',\n num: '385'\n },\n {\n name: '库拉索',\n num: '599'\n },\n {\n name: '肯尼亚',\n num: '254'\n },\n {\n name: '科威特',\n num: '965'\n },\n {\n name: '卡塔尔',\n num: '974'\n },\n {\n name: '科特迪瓦',\n num: '225'\n }\n ]\n },\n {\n type: 'L',\n list: [\n {\n name: '老挝',\n num: '856'\n },\n {\n name: '拉脱维亚',\n num: '371'\n },\n {\n name: '黎巴嫩',\n num: '961'\n },\n {\n name: '莱索托',\n num: '266'\n },\n {\n name: '利比里亚',\n num: '231'\n },\n {\n name: '利比亚',\n num: '218'\n },\n {\n name: '列支敦士登',\n num: '423'\n },\n {\n name: '立陶宛',\n num: '370'\n },\n {\n name: '卢森堡',\n num: '352'\n },\n {\n name: '留尼汪',\n num: '262'\n },\n {\n name: '罗马尼亚',\n num: '40'\n },\n {\n name: '卢旺达',\n num: '423'\n }\n ]\n },\n {\n type: 'M',\n list: [\n {\n name: '美属萨摩亚',\n num: '1684'\n },\n {\n name: '孟加拉国',\n num: '880'\n },\n {\n name: '马其顿',\n num: '389'\n },\n {\n name: '马达加斯加',\n num: '261'\n },\n {\n name: '马拉维',\n num: '265'\n },\n {\n name: '马来西亚',\n num: '60'\n },\n {\n name: '马尔代夫',\n num: '960'\n },\n {\n name: '马里',\n num: '223'\n },\n {\n name: '马耳他',\n num: '356'\n },\n {\n name: '马提尼克',\n num: '596'\n },\n {\n name: '毛里塔尼亚',\n num: '222'\n },\n {\n name: '毛里求斯',\n num: '230'\n },\n {\n name: '墨西哥',\n num: '52'\n },\n {\n name: '摩尔多瓦',\n num: '373'\n },\n {\n name: '摩纳哥',\n num: '377'\n },\n {\n name: '蒙古',\n num: '976'\n },\n {\n name: '蒙特塞拉特岛',\n num: '1664'\n },\n {\n name: '摩洛哥',\n num: '212'\n },\n {\n name: '莫桑比克',\n num: '258'\n },\n {\n name: '缅甸',\n num: '95'\n },\n {\n name: '美属维尔京群岛',\n num: '1284'\n }\n ]\n },\n {\n type: 'N',\n list: [\n {\n name: '纳米比亚',\n num: '264'\n },\n {\n name: '尼泊尔',\n num: '977'\n },\n {\n name: '尼加拉瓜',\n num: '505'\n },\n {\n name: '尼日尔',\n num: '227'\n },\n {\n name: '尼日利亚',\n num: '234'\n },\n {\n name: '挪威',\n num: '47'\n },\n {\n name: '南非',\n num: '27'\n }\n ]\n },\n {\n type: 'O',\n list: [\n {\n name: '澳大利亚',\n num: '61'\n },\n {\n name: '奥地利',\n num: '43'\n }\n ]\n },\n {\n type: 'P',\n list: [\n {\n name: '帕劳',\n num: '680'\n },\n {\n name: '葡萄牙',\n num: '351'\n }\n ]\n },\n {\n type: 'R',\n list: [\n {\n name: '瑞典',\n num: '46'\n },\n {\n name: '瑞士',\n num: '41'\n }\n ]\n },\n {\n type: 'S',\n list: [\n {\n name: '塞浦路斯',\n num: '357'\n },\n {\n name: '萨尔瓦多',\n num: '503'\n },\n {\n name: '圣基茨和尼维斯',\n num: '1869'\n },\n {\n name: '圣露西亚',\n num: '1758'\n },\n {\n name: '圣皮埃尔岛及密克隆岛',\n num: '508'\n },\n {\n name: '圣文森特和格林纳丁斯',\n num: '1784'\n },\n {\n name: '萨摩亚',\n num: '685'\n },\n {\n name: '圣马力诺',\n num: '378'\n },\n {\n name: '圣多美和普林西比',\n num: '239'\n },\n {\n name: '沙特阿拉伯',\n num: '966'\n },\n {\n name: '塞内加尔',\n num: '221'\n },\n {\n name: '塞尔维亚',\n num: '381'\n },\n {\n name: '塞舌尔',\n num: '248'\n },\n {\n name: '塞拉利昂',\n num: '239'\n },\n {\n name: '圣马丁岛(荷兰部分)',\n num: '1721'\n },\n {\n name: '斯洛伐克',\n num: '421'\n },\n {\n name: '斯洛文尼亚',\n num: '386'\n },\n {\n name: '所罗门群岛',\n num: '677'\n },\n {\n name: '索马里',\n num: '252'\n },\n {\n name: '斯里兰卡',\n num: '94'\n },\n {\n name: '苏丹',\n num: '249'\n },\n {\n name: '苏里南',\n num: '597'\n },\n {\n name: '斯威士兰',\n num: '268'\n }\n ]\n },\n {\n type: 'T',\n list: [\n {\n name: '塔吉克斯坦',\n num: '992'\n },\n {\n name: '坦桑尼亚',\n num: '255'\n },\n {\n name: '泰国',\n num: '66'\n },\n {\n name: '汤加',\n num: '676'\n },\n {\n name: '特立尼达和多巴哥',\n num: '1868'\n },\n {\n name: '突尼斯',\n num: '216'\n },\n {\n name: '土耳其',\n num: '90'\n },\n {\n name: '土库曼斯坦',\n num: '993'\n },\n {\n name: '特克斯和凯科斯群岛',\n num: '1649'\n }\n ]\n },\n {\n type: 'W',\n list: [\n {\n name: '文莱',\n num: '673'\n },\n {\n name: '乌干达',\n num: '256'\n },\n {\n name: '乌克兰',\n num: '380'\n },\n {\n name: '乌拉圭',\n num: '598'\n },\n {\n name: '乌兹别克斯坦',\n num: '998'\n },\n {\n name: '瓦努阿图',\n num: '678'\n },\n {\n name: '委内瑞拉',\n num: '58'\n }\n ]\n },\n {\n type: 'X',\n list: [\n {\n name: '新西兰',\n num: '64'\n },\n {\n name: '希腊',\n num: '30'\n },\n {\n name: '匈牙利',\n num: '36'\n },\n {\n name: '新喀里多尼亚',\n num: '687'\n },\n {\n name: '新加坡',\n num: '65'\n },\n {\n name: '西班牙',\n num: '34'\n },\n {\n name: '叙利亚',\n num: '963'\n },\n {\n name: '亚美尼亚',\n num: '374'\n }\n ]\n },\n {\n type: 'Y',\n list: [\n {\n name: '英国',\n num: '44'\n },\n {\n name: '印度',\n num: '91'\n },\n {\n name: '印度尼西亚',\n num: '62'\n },\n {\n name: '伊朗',\n num: '98'\n },\n {\n name: '伊拉克',\n num: '964'\n },\n {\n name: '以色列',\n num: '972'\n },\n {\n name: '意大利',\n num: '39'\n },\n {\n name: '牙买加',\n num: '1876'\n },\n {\n name: '约旦',\n num: '962'\n },\n {\n name: '越南',\n num: '84'\n },\n {\n name: '英属处女群岛',\n num: '1340'\n },\n {\n name: '也门',\n num: '967'\n }\n ]\n },\n {\n type: 'Z',\n list: [\n {\n name: '中国',\n num: '86'\n },\n {\n name: '中国香港',\n num: '852'\n },\n {\n name: '中国澳门',\n num: '853'\n },\n {\n name: '中国台湾',\n num: '886'\n },\n {\n name: '中非共和国',\n num: '236'\n },\n {\n name: '乍得',\n num: '235'\n },\n {\n name: '智利',\n num: '56'\n },\n {\n name: '直布罗陀',\n num: '350'\n },\n {\n name: '赞比亚',\n num: '260'\n }\n ]\n }\n ]\n }\n }\n\n componentDidMount() {\n // document.body.scrollIntoView();\n document.addEventListener('scroll', this.judgeCurrentPosition)\n }\n\n componentWillUnmount() {\n document.removeEventListener('scroll', this.judgeCurrentPosition)\n }\n\n judgeCurrentPosition = () => {\n const { data } = this.state;\n let top = document.documentElement.scrollTop || document.body.scrollTop;\n const lens = data.map(item => {\n let el = document.querySelector(`[data-type=\"${item['type']}\"]`);\n if(el) {\n return el.offsetTop;\n }\n return '';\n });\n lens.map((item,index) => {\n if(item && top >= item) {\n this.setState({\n currentNav: data[index]['type']\n })\n } \n/*\n if(item && (top + 200) > item) {\n this.setState({\n currentNav: data[index]['type']\n })\n }\n*/\n });\n }\n\n toParentPage = (e, num) => {\n const { history, addCountryNum } = this.props;\n addCountryNum({\n num,\n code: getParam('share_code')\n });\n // history.push(`/detail?id=${getParam('id')}`);\n history.go(-1)\n e.preventDefault();\n }\n\n scrollTo = (param) => {\n const el = document.querySelector(`[data-type=\"${param}\"]`)\n if(el) {\n this.setState({\n currentNav: param\n });\n window.scrollTo({left: 0, top: el.offsetTop, behavior: 'smooth'})\n/*\n el.scrollIntoView({\n behavior: 'smooth'\n });\n*/\n }\n }\n\n render() {\n const { currentNav, data } = this.state;\n return (\n <>\n <HeaderBar title=\"选择国家和地区\" arrow={true}/>\n <ul className=\"letter-nav\">\n {data.map(item => {\n return (\n <li \n key={`nav-${item['type']}`}\n className={classnames(\"letter-nav__item\", {\"letter-nav__item--active\": currentNav === item['type']})}\n onClick={() => this.scrollTo(item['type'])}\n >{item['type'] === '0' ? '常' : item['type']}</li>\n )\n })}\n </ul>\n <div className=\"page-body\">\n {data.map(({type, list}, index) => {\n return (\n <div key={index}>\n <h2 className=\"country-header\" data-type={type}>{type === '0'? '常用' : type}</h2>\n <ul className=\"country-list\">\n {list.map((val, key) => {\n return (\n <li className=\"country-item\" key={`${index}-${key}`}>\n <a className=\"country-item__link\" href=\"#\" onClick={(e) => this.toParentPage(e, val.num)}>\n <span className=\"country-name\">{val.name}</span>\n <span className=\"country-num\">+{val.num}</span>\n </a>\n </li>\n )\n })}\n \n </ul>\n </div>\n )\n })}\n </div>\n </>\n )\n }\n}\n\nexport default connect(\n ({country}) =>({\n country\n }),\n (dispatch) => {\n return bindActionCreators(\n {\n addCountryNum\n },\n dispatch\n );\n }\n)(Country);"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/country/index.js"],"names":["Country","props","_this","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__","call","judgeCurrentPosition","data","state","top","document","documentElement","scrollTop","body","map","item","el","querySelector","concat","offsetTop","index","setState","currentNav","toParentPage","e","num","_this$props","history","addCountryNum","code","getParam","go","preventDefault","scrollTo","param","window","left","behavior","type","list","name","addEventListener","removeEventListener","_this2","_this$state","react__WEBPACK_IMPORTED_MODULE_5___default","a","createElement","Fragment","_common__WEBPACK_IMPORTED_MODULE_11__","title","arrow","className","key","classnames","letter-nav__item--active","onClick","_ref","data-type","val","href","Component","connect","_ref2","country","dispatch","bindActionCreators"],"mappings":"0OAUMA,uBAEJ,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACjBE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAA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{ Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport classnames from 'classnames';\nimport { getParam } from '@/utils';\nimport { addCountryNum } from './countryRedux';\nimport { HeaderBar } from '@/common'\n\nimport './index.scss';\n\nclass Country extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n currentNav: 'A',\n data: [\n {\n type: '0',\n list: [\n {\n name: '中国大陆',\n num: '86'\n },\n {\n name: '美国',\n num: '1'\n },\n {\n name: '日本',\n num: '81'\n },\n {\n name: '中国香港',\n num: '852'\n },\n {\n name: '中国澳门',\n num: '853'\n },\n {\n name: '中国台湾',\n num: '886'\n },\n {\n name: '澳大利亚',\n num: '61'\n },\n {\n name: '加拿大',\n num: '1'\n },\n {\n name: '英国',\n num: '44'\n },\n {\n name: '新西兰',\n num: '64'\n },\n ]\n },\n {\n type: 'A',\n list: [\n {\n name: '阿富汗',\n num: '93'\n },\n {\n name: '阿尔巴尼亚',\n num: '355'\n },\n {\n name: '阿尔及利亚',\n num: '213'\n },\n {\n name: '安道尔',\n num: '376'\n },\n {\n name: '安哥拉',\n num: '244'\n },\n {\n name: '安圭拉',\n num: '1264'\n },\n {\n name: '安提瓜和巴布达',\n num: '1268'\n },\n {\n name: '阿根廷',\n num: '54'\n },\n {\n name: '阿鲁巴',\n num: '297'\n },\n {\n name: '阿塞拜疆',\n num: '994'\n },\n {\n name: '埃及',\n num: '20'\n },\n {\n name: '爱沙尼亚',\n num: '372'\n },\n {\n name: '埃塞俄比亚',\n num: '251'\n },\n {\n name: '爱尔兰',\n num: '353'\n },\n {\n name: '阿曼',\n num: '968'\n },\n {\n name: '阿拉伯联合酋长国',\n num: '971'\n },\n {\n name: '爱沙尼亚',\n num: '372'\n }\n ]\n },\n {\n type: 'B',\n list: [\n {\n name: '巴哈马',\n num: '1242'\n },\n {\n name: '巴林',\n num: '973'\n },\n {\n name: '巴巴多斯',\n num: '1246'\n },\n {\n name: '白俄罗斯',\n num: '375'\n },\n {\n name: '比利时',\n num: '32'\n },\n {\n name: '伯利兹',\n num: '501'\n },\n {\n name: '贝宁',\n num: '229'\n },\n {\n name: '百慕大群岛',\n num: '1441'\n },\n {\n name: '不丹',\n num: '975'\n },\n {\n name: '玻利维亚',\n num: '591'\n },\n {\n name: '波斯尼亚和黑塞哥维那',\n num: '387'\n },\n {\n name: '博茨瓦纳',\n num: '267'\n },\n {\n name: '巴西',\n num: '55'\n },\n {\n name: '保加利亚',\n num: '359'\n },\n {\n name: '布基纳法索',\n num: '226'\n },\n {\n name: '布隆迪',\n num: '257'\n },\n {\n name: '冰岛',\n num: '354'\n },\n {\n name: '巴基斯坦',\n num: '92'\n },\n {\n name: '巴勒斯坦',\n num: '970'\n },\n {\n name: '巴拿马',\n num: '507'\n },\n {\n name: '巴布亚新几内亚',\n num: '675'\n },\n {\n name: '巴拉圭',\n num: '51'\n },\n {\n name: '秘鲁',\n num: '354'\n },\n {\n name: '波兰',\n num: '48'\n },\n {\n name: '波多黎各',\n num: '1787'\n }\n ]\n },\n {\n type: 'C',\n list: [\n {\n name: '赤道几内亚',\n num: '240'\n }\n ]\n },\n {\n type: 'D',\n list: [\n {\n name: '丹麦',\n num: '45'\n },\n {\n name: '多米尼加',\n num: '1767'\n },\n {\n name: '多米尼加共和国',\n num: '1809'\n },\n {\n name: '德国',\n num: '49'\n },\n {\n name: '东帝汶',\n num: '670'\n },\n {\n name: '多哥',\n num: '228'\n }\n ]\n },\n {\n type: 'E',\n list: [\n {\n name: '厄瓜多尔',\n num: '593'\n },\n {\n name: '厄立特里亚',\n num: '291'\n },\n {\n name: '俄罗斯',\n num: '7'\n }\n ]\n },\n {\n type: 'F',\n list: [\n {\n name: '法罗群岛',\n num: '298'\n },\n {\n name: '斐济',\n num: '679'\n },\n {\n name: '芬兰',\n num: '358'\n },\n {\n name: '法国',\n num: '594'\n },\n {\n name: '法属圭亚那',\n num: '45'\n },\n {\n name: '法属波利尼西亚',\n num: '689'\n },\n {\n name: '菲律宾',\n num: '63'\n }\n ]\n },\n {\n type: 'G',\n list: [\n {\n name: '哥伦比亚',\n num: '57'\n },\n {\n name: '哥斯达黎加',\n num: '506'\n },\n {\n name: '古巴',\n num: '53'\n },\n {\n name: '刚果民主共和国',\n num: '243'\n },\n {\n name: '冈比亚',\n num: '220'\n },\n {\n name: '格鲁吉亚',\n num: '995'\n },\n {\n name: '格陵兰岛',\n num: '299'\n },\n {\n name: '格林纳达',\n num: '1473'\n },\n {\n name: '瓜德罗普岛',\n num: '590'\n },\n {\n name: '关岛',\n num: '299'\n },\n {\n name: '瓜地马拉',\n num: '502'\n },\n {\n name: '圭亚那',\n num: '592'\n },\n {\n name: '刚果共和国',\n num: '242'\n }\n ]\n },\n {\n type: 'H',\n list: [\n {\n name: '海地',\n num: '509'\n },\n {\n name: '洪都拉斯',\n num: '504'\n },\n {\n name: '黑山',\n num: '382'\n },\n {\n name: '荷兰',\n num: '31'\n },\n {\n name: '韩国',\n num: '82'\n }\n ]\n },\n {\n type: 'J',\n list: [\n {\n name: '加拿大',\n num: '1'\n },\n {\n name: '日本',\n num: '81'\n },\n {\n name: '柬埔寨',\n num: '855'\n },\n {\n name: '捷克',\n num: '420'\n },\n {\n name: '吉布提',\n num: '253'\n },\n {\n name: '加蓬',\n num: '241'\n },\n {\n name: '加纳',\n num: '233'\n },\n {\n name: '几内亚',\n num: '224'\n },\n {\n name: '几内亚比绍共和国',\n num: '245'\n },\n {\n name: '基里巴斯',\n num: '686'\n },\n {\n name: '吉尔吉斯斯坦',\n num: '996'\n },\n {\n name: '津巴布韦',\n num: '263'\n }\n ]\n },\n {\n type: 'K',\n list: [\n {\n name: '喀麦隆',\n num: '237'\n },\n {\n name: '开普',\n num: '238'\n },\n {\n name: '开曼群岛',\n num: '1345'\n },\n {\n name: '科摩罗',\n num: '269'\n },\n {\n name: '库克群岛',\n num: '682'\n },\n {\n name: '克罗地亚',\n num: '385'\n },\n {\n name: '库拉索',\n num: '599'\n },\n {\n name: '肯尼亚',\n num: '254'\n },\n {\n name: '科威特',\n num: '965'\n },\n {\n name: '卡塔尔',\n num: '974'\n },\n {\n name: '科特迪瓦',\n num: '225'\n }\n ]\n },\n {\n type: 'L',\n list: [\n {\n name: '老挝',\n num: '856'\n },\n {\n name: '拉脱维亚',\n num: '371'\n },\n {\n name: '黎巴嫩',\n num: '961'\n },\n {\n name: '莱索托',\n num: '266'\n },\n {\n name: '利比里亚',\n num: '231'\n },\n {\n name: '利比亚',\n num: '218'\n },\n {\n name: '列支敦士登',\n num: '423'\n },\n {\n name: '立陶宛',\n num: '370'\n },\n {\n name: '卢森堡',\n num: '352'\n },\n {\n name: '留尼汪',\n num: '262'\n },\n {\n name: '罗马尼亚',\n num: '40'\n },\n {\n name: '卢旺达',\n num: '423'\n }\n ]\n },\n {\n type: 'M',\n list: [\n {\n name: '美属萨摩亚',\n num: '1684'\n },\n {\n name: '孟加拉国',\n num: '880'\n },\n {\n name: '马其顿',\n num: '389'\n },\n {\n name: '马达加斯加',\n num: '261'\n },\n {\n name: '马拉维',\n num: '265'\n },\n {\n name: '马来西亚',\n num: '60'\n },\n {\n name: '马尔代夫',\n num: '960'\n },\n {\n name: '马里',\n num: '223'\n },\n {\n name: '马耳他',\n num: '356'\n },\n {\n name: '马提尼克',\n num: '596'\n },\n {\n name: '毛里塔尼亚',\n num: '222'\n },\n {\n name: '毛里求斯',\n num: '230'\n },\n {\n name: '墨西哥',\n num: '52'\n },\n {\n name: '摩尔多瓦',\n num: '373'\n },\n {\n name: '摩纳哥',\n num: '377'\n },\n {\n name: '蒙古',\n num: '976'\n },\n {\n name: '蒙特塞拉特岛',\n num: '1664'\n },\n {\n name: '摩洛哥',\n num: '212'\n },\n {\n name: '莫桑比克',\n num: '258'\n },\n {\n name: '缅甸',\n num: '95'\n },\n {\n name: '美属维尔京群岛',\n num: '1284'\n }\n ]\n },\n {\n type: 'N',\n list: [\n {\n name: '纳米比亚',\n num: '264'\n },\n {\n name: '尼泊尔',\n num: '977'\n },\n {\n name: '尼加拉瓜',\n num: '505'\n },\n {\n name: '尼日尔',\n num: '227'\n },\n {\n name: '尼日利亚',\n num: '234'\n },\n {\n name: '挪威',\n num: '47'\n },\n {\n name: '南非',\n num: '27'\n }\n ]\n },\n {\n type: 'O',\n list: [\n {\n name: '澳大利亚',\n num: '61'\n },\n {\n name: '奥地利',\n num: '43'\n }\n ]\n },\n {\n type: 'P',\n list: [\n {\n name: '帕劳',\n num: '680'\n },\n {\n name: '葡萄牙',\n num: '351'\n }\n ]\n },\n {\n type: 'R',\n list: [\n {\n name: '瑞典',\n num: '46'\n },\n {\n name: '瑞士',\n num: '41'\n }\n ]\n },\n {\n type: 'S',\n list: [\n {\n name: '塞浦路斯',\n num: '357'\n },\n {\n name: '萨尔瓦多',\n num: '503'\n },\n {\n name: '圣基茨和尼维斯',\n num: '1869'\n },\n {\n name: '圣露西亚',\n num: '1758'\n },\n {\n name: '圣皮埃尔岛及密克隆岛',\n num: '508'\n },\n {\n name: '圣文森特和格林纳丁斯',\n num: '1784'\n },\n {\n name: '萨摩亚',\n num: '685'\n },\n {\n name: '圣马力诺',\n num: '378'\n },\n {\n name: '圣多美和普林西比',\n num: '239'\n },\n {\n name: '沙特阿拉伯',\n num: '966'\n },\n {\n name: '塞内加尔',\n num: '221'\n },\n {\n name: '塞尔维亚',\n num: '381'\n },\n {\n name: '塞舌尔',\n num: '248'\n },\n {\n name: '塞拉利昂',\n num: '239'\n },\n {\n name: '圣马丁岛(荷兰部分)',\n num: '1721'\n },\n {\n name: '斯洛伐克',\n num: '421'\n },\n {\n name: '斯洛文尼亚',\n num: '386'\n },\n {\n name: '所罗门群岛',\n num: '677'\n },\n {\n name: '索马里',\n num: '252'\n },\n {\n name: '斯里兰卡',\n num: '94'\n },\n {\n name: '苏丹',\n num: '249'\n },\n {\n name: '苏里南',\n num: '597'\n },\n {\n name: '斯威士兰',\n num: '268'\n }\n ]\n },\n {\n type: 'T',\n list: [\n {\n name: '塔吉克斯坦',\n num: '992'\n },\n {\n name: '坦桑尼亚',\n num: '255'\n },\n {\n name: '泰国',\n num: '66'\n },\n {\n name: '汤加',\n num: '676'\n },\n {\n name: '特立尼达和多巴哥',\n num: '1868'\n },\n {\n name: '突尼斯',\n num: '216'\n },\n {\n name: '土耳其',\n num: '90'\n },\n {\n name: '土库曼斯坦',\n num: '993'\n },\n {\n name: '特克斯和凯科斯群岛',\n num: '1649'\n }\n ]\n },\n {\n type: 'W',\n list: [\n {\n name: '文莱',\n num: '673'\n },\n {\n name: '乌干达',\n num: '256'\n },\n {\n name: '乌克兰',\n num: '380'\n },\n {\n name: '乌拉圭',\n num: '598'\n },\n {\n name: '乌兹别克斯坦',\n num: '998'\n },\n {\n name: '瓦努阿图',\n num: '678'\n },\n {\n name: '委内瑞拉',\n num: '58'\n }\n ]\n },\n {\n type: 'X',\n list: [\n {\n name: '新西兰',\n num: '64'\n },\n {\n name: '希腊',\n num: '30'\n },\n {\n name: '匈牙利',\n num: '36'\n },\n {\n name: '新喀里多尼亚',\n num: '687'\n },\n {\n name: '新加坡',\n num: '65'\n },\n {\n name: '西班牙',\n num: '34'\n },\n {\n name: '叙利亚',\n num: '963'\n },\n {\n name: '亚美尼亚',\n num: '374'\n }\n ]\n },\n {\n type: 'Y',\n list: [\n {\n name: '英国',\n num: '44'\n },\n {\n name: '印度',\n num: '91'\n },\n {\n name: '印度尼西亚',\n num: '62'\n },\n {\n name: '伊朗',\n num: '98'\n },\n {\n name: '伊拉克',\n num: '964'\n },\n {\n name: '以色列',\n num: '972'\n },\n {\n name: '意大利',\n num: '39'\n },\n {\n name: '牙买加',\n num: '1876'\n },\n {\n name: '约旦',\n num: '962'\n },\n {\n name: '越南',\n num: '84'\n },\n {\n name: '英属处女群岛',\n num: '1340'\n },\n {\n name: '也门',\n num: '967'\n }\n ]\n },\n {\n type: 'Z',\n list: [\n {\n name: '中国',\n num: '86'\n },\n {\n name: '中国香港',\n num: '852'\n },\n {\n name: '中国澳门',\n num: '853'\n },\n {\n name: '中国台湾',\n num: '886'\n },\n {\n name: '中非共和国',\n num: '236'\n },\n {\n name: '乍得',\n num: '235'\n },\n {\n name: '智利',\n num: '56'\n },\n {\n name: '直布罗陀',\n num: '350'\n },\n {\n name: '赞比亚',\n num: '260'\n }\n ]\n }\n ]\n }\n }\n\n componentDidMount() {\n // document.body.scrollIntoView();\n document.addEventListener('scroll', this.judgeCurrentPosition)\n }\n\n componentWillUnmount() {\n document.removeEventListener('scroll', this.judgeCurrentPosition)\n }\n\n judgeCurrentPosition = () => {\n const { data } = this.state;\n let top = document.documentElement.scrollTop || document.body.scrollTop;\n const lens = data.map(item => {\n let el = document.querySelector(`[data-type=\"${item['type']}\"]`);\n if(el) {\n return el.offsetTop;\n }\n return '';\n });\n lens.map((item,index) => {\n if(item && top >= item) {\n this.setState({\n currentNav: data[index]['type']\n })\n } \n/*\n if(item && (top + 200) > item) {\n this.setState({\n currentNav: data[index]['type']\n })\n }\n*/\n });\n }\n\n toParentPage = (e, num) => {\n const { history, addCountryNum } = this.props;\n addCountryNum({\n num,\n code: getParam('share_code')\n });\n // history.push(`/detail?id=${getParam('id')}`);\n history.go(-1)\n e.preventDefault();\n }\n\n scrollTo = (param) => {\n const el = document.querySelector(`[data-type=\"${param}\"]`)\n if(el) {\n this.setState({\n currentNav: param\n });\n window.scrollTo({left: 0, top: el.offsetTop, behavior: 'smooth'})\n/*\n el.scrollIntoView({\n behavior: 'smooth'\n });\n*/\n }\n }\n\n render() {\n const { currentNav, data } = this.state;\n return (\n <>\n <HeaderBar title=\"选择国家和地区\" arrow={true}/>\n <ul className=\"letter-nav\">\n {data.map(item => {\n return (\n <li \n key={`nav-${item['type']}`}\n className={classnames(\"letter-nav__item\", {\"letter-nav__item--active\": currentNav === item['type']})}\n onClick={() => this.scrollTo(item['type'])}\n >{item['type'] === '0' ? '常' : item['type']}</li>\n )\n })}\n </ul>\n <div className=\"page-body\">\n {data.map(({type, list}, index) => {\n return (\n <div key={index}>\n <h2 className=\"country-header\" data-type={type}>{type === '0'? '常用' : type}</h2>\n <ul className=\"country-list\">\n {list.map((val, key) => {\n return (\n <li className=\"country-item\" key={`${index}-${key}`}>\n <a className=\"country-item__link\" href=\"#\" onClick={(e) => this.toParentPage(e, val.num)}>\n <span className=\"country-name\">{val.name}</span>\n <span className=\"country-num\">+{val.num}</span>\n </a>\n </li>\n )\n })}\n \n </ul>\n </div>\n )\n })}\n </div>\n </>\n )\n }\n}\n\nexport default connect(\n ({country}) =>({\n country\n }),\n (dispatch) => {\n return bindActionCreators(\n {\n addCountryNum\n },\n dispatch\n );\n }\n)(Country);"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1181:function(t,a,e){"use strict";e.r(a);var i,s=e(19),n=(e(43),e(13)),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(902),e(27)),h=e(3),b=e(15),E=e(49),f=e(670),v=e(155),j=e(631),y=e(20),N=(e(73),e(16)),S=e.n(N),A=Object(y.b)(function(t){return{user:t.user}})(i=function(t){function a(t){var i;return Object(c.a)(this,a),(i=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?i.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(i.state.bargainData.expire_time){var t=1e3*i.state.bargainData.expire_time,a=Date.now();clearInterval(i.timer),i.timer=setInterval(function(){var e=new Date(t-=1e3),s=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;i.setState({hour:r,min:n,sec:s,day:c})},1e3)}}):r.a.info(t.data.msg,2)})},i.getBargainCourse=function(){h.d.get("".concat(API.home,"/m/bargain/courseList")).then(function(t){200===t.data.code?i.setState({courseList:t.data.data}):r.a.info(t.data.msg,2)})},i.getBargainRankList=function(t,a){var e={courseId:t,type:a,bargain_code:Object(h.c)("bargaincode")||""};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(s.a)({},t,{rank:a[e]})});i.setState({list:t.data.data.list,outList:e})}else 4030==t.data.code||4040==t.data.code||r.a.info(t.data.msg,2)})},i.toCart=function(){h.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(h.c)("id"),"]")).then(function(t){0===t.data.errno?i.props.history.push("/order?id=[".concat(Object(h.c)("id"),"]"),{bargain:1}):r.a.info(t.data.msg,2)})},i.toCartBottom=function(t){h.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(t,"]")).then(function(t){0===t.data.errno?i.props.history.push("/order?id=[".concat(Object(h.c)("id"),"]"),{bargain:1}):r.a.info(t.data.msg,2)})},i.getMore=function(){i.setState({isShowMore:!0})},i.boxHide=function(t){i.setState({isShowMore:t})},i.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?i.setState({isShowOverlay:!0,status:5}):r.a.info(t.data.msg,2)})},i.useArtifact=function(){i.toKanjia(Object(h.c)("id"),2,0)},i.toKanjia=function(t,a,e){var s={course_id:t,type:a,parent_uid:e};h.d.post("".concat(API.home,"/m/bargain/toBargain"),s).then(function(t){if(200===t.data.code)i.setState({amount:t.data.data.amount}),2===a&&i.setState({isShowOverlay:!0,status:6}),1===t.data.data.is_success?i.setState({isShowOverlay:!0,status:4}):2===t.data.data.is_success?3===a?i.setState({isShowOverlay:!0,status:2}):4===a&&i.setState({isShowOverlay:!0,status:1,firendBaigainPrice:!1}):0===t.data.data.is_success&&(3===a?i.setState({isShowOverlay:!0,status:2}):4===a&&i.setState({isShowOverlay:!0,status:3})),i.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 s=e.lastIndexOf("code=");e=e.substr(0,s-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 i.props.history.push("/passport");else r.a.info(t.data.msg,2)})},i.friendBargainFirst=function(){i.toKanjia(Object(h.c)("id"),3,i.state.originatorUid)},i.friendBargainSecond=function(){i.toKanjia(Object(h.c)("id"),4,i.state.originatorUid)},i.shareFriendBargain=function(){i.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(i.state.bargainData.bargain_price,"\u5143\uff0c\u770b\u770b\u4f60\u80fd\u780d\u591a\u5c11"),link:encodeURI(location.href),imgUrl:i.state.course.course_img})},i.close=function(){i.setState({isShowOverlay:!1,status:""})},i.toCourseDetail=function(t){var a=i.props;a.dispatch;return a.history.push("/detail?id=".concat(t)),!1},i.state={isShowOverlay:!1,isOriginator:"",kanjiaIcon:e(630),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/"},i}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,i=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:i.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:i.toCourseDetail,bottom:g.a.createElement(k,{item:t,toCartBottom:i.toCartBottom.bind(i,t.course_id),toDetail:i.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,g.a.createElement("div",{className:"bargain-popup__content"},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-popup__button--close"}))))}}]),a}(d.Component))||i;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 2===t.item.bargain_status?a=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?(a=g.a.createElement(b.b,{to:"/play/video?id=".concat(t.item.v_course_id),className:S()("bargain","button--study")},"\u53bb\u5b66\u4e60"),139===t.item.course_id&&(a=g.a.createElement("a",{onClick:function(){return t.toDetail(t.item.course_id)},className:"bargain bargian-study"},"\u6211\u8981\u780d\u4ef7"))):a=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(673),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(673),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("a",{className:"bargain-href",href:"#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(903),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("a",{className:"bargain-href",href:"#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(673),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)},630: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="},631:function(t,a,e){"use strict";var i=e(5),s=e(7),n=e(6),r=e(8),c=e(9),o=e(0),l=e.n(o),m=e(25),u=e.n(m),d=(e(672),document.body||document.documentElement),g=["touchmove","mousewheel"],p=function(t){function a(t){var e;return Object(i.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(s.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},670:function(t,a,e){"use strict";var i=e(5),s=e(7),n=e(6),r=e(8),c=e(9),o=e(0),l=e.n(o),m=(e(671),function(t){function a(t){var s;return Object(i.a)(this,a),(s=Object(n.a)(this,Object(r.a)(a).call(this,t))).closeMore=function(){s.props.boxHide(!1)},s.state={kanjiaIcon:e(630)},s}return Object(c.a)(a,t),Object(s.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},671:function(t,a,e){},672:function(t,a,e){},673:function(t,a,e){t.exports=e.p+"mrstatic/media/kanjia_cg_icon.81a489ac.png"},902:function(t,a,e){},903:function(t,a){t.exports="data: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+f9bo//sDeuqkLv6/OX0IvF7BpnqMJYPC0xGf7hNy11jIIwEERheBrBQtBGBBHBxlKwUzyCt3jNMrYBDXY2c4Itt9lyNycIKcSbqUEhEyxMYL8LTPEPb03KAUkcSVkgiR0pYyQxImWKFPakTZDChlpmSGBLLRt8mcqWD1egjzxTr7+kljU+7J0lBOESnV0jM0u0uYr/K/+NhZld7gM68+JsFOGQoTanttUAtUr4JcL6HlccHvxmG/uiDVEz3gnfKxNP6KzwcMws4dzIom2/AS/mApgcPRSZsaW7WZVF2eEvz1bqZ0VBKIrj+NkILhLdSBBpROZKhtoV7QyKmHmKw8GW81AudJfaX4Ji6MlmIqaUbveY9Vnd3ZffWdxwtduHWIoKAh3knY50FpfqdEHAQ9Yqo4toj7wpCDT4CF1lJ2Q1Kl0sjOhmO0dWG+4YyIkp7wdZLbjTYqdklLfhx5gVKjsq2iPHrnCx+DIhTdJIcjJmCygotyWidB2crc/vI3J8uKeiXER0CP4lREtkdEBghnJESXCT8pURCBjclk2Qs8jYig4iDkotD0FeEnMHq4GIr6BMvChU1jv2sxTro8yqWFmE7BQxzUOJ+XcRylnwiDHGd3HgsZqK7/GhgYyr4Bv0gWFMX+40TOAZvSG+YKhrUIpmOx2sRrU0KE8b9CfK04mZD0/TvqzupNz1FM9xzTZU1/YH9qfu9prOSPXG9Tr+UerDsaeOnGbP1S3bbNXggV9XIWYP5SLNCwAAAABJRU5ErkJggg=="}}]);
//# sourceMappingURL=BargainMiddlePage.33851e01.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1181:function(t,a,e){"use strict";e.r(a);var i,s=e(19),n=(e(43),e(13)),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(902),e(27)),h=e(3),b=e(15),E=e(49),f=e(670),v=e(155),j=e(631),y=e(20),N=(e(73),e(16)),S=e.n(N),A=Object(y.b)(function(t){return{user:t.user}})(i=function(t){function a(t){var i;return Object(c.a)(this,a),(i=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?i.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(i.state.bargainData.expire_time){var t=1e3*i.state.bargainData.expire_time,a=Date.now();clearInterval(i.timer),i.timer=setInterval(function(){var e=new Date(t-=1e3),s=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;i.setState({hour:r,min:n,sec:s,day:c})},1e3)}}):r.a.info(t.data.msg,2)})},i.getBargainCourse=function(){h.d.get("".concat(API.home,"/m/bargain/courseList")).then(function(t){200===t.data.code?i.setState({courseList:t.data.data}):r.a.info(t.data.msg,2)})},i.getBargainRankList=function(t,a){var e={courseId:t,type:a,bargain_code:Object(h.c)("bargaincode")||""};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(s.a)({},t,{rank:a[e]})});i.setState({list:t.data.data.list,outList:e})}else 4030==t.data.code||4040==t.data.code||r.a.info(t.data.msg,2)})},i.toCart=function(){h.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(h.c)("id"),"]")).then(function(t){0===t.data.errno?i.props.history.push("/order?id=[".concat(Object(h.c)("id"),"]"),{bargain:1}):r.a.info(t.data.msg,2)})},i.toCartBottom=function(t){h.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(t,"]")).then(function(t){0===t.data.errno?i.props.history.push("/order?id=[".concat(Object(h.c)("id"),"]"),{bargain:1}):r.a.info(t.data.msg,2)})},i.getMore=function(){i.setState({isShowMore:!0})},i.boxHide=function(t){i.setState({isShowMore:t})},i.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?i.setState({isShowOverlay:!0,status:5}):r.a.info(t.data.msg,2)})},i.useArtifact=function(){i.toKanjia(Object(h.c)("id"),2,0)},i.toKanjia=function(t,a,e){var s={course_id:t,type:a,parent_uid:e};h.d.post("".concat(API.home,"/m/bargain/toBargain"),s).then(function(t){if(200===t.data.code)i.setState({amount:t.data.data.amount}),2===a&&i.setState({isShowOverlay:!0,status:6}),1===t.data.data.is_success?i.setState({isShowOverlay:!0,status:4}):2===t.data.data.is_success?3===a?i.setState({isShowOverlay:!0,status:2}):4===a&&i.setState({isShowOverlay:!0,status:1,firendBaigainPrice:!1}):0===t.data.data.is_success&&(3===a?i.setState({isShowOverlay:!0,status:2}):4===a&&i.setState({isShowOverlay:!0,status:3})),i.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 s=e.lastIndexOf("code=");e=e.substr(0,s-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 i.props.history.push("/passport");else r.a.info(t.data.msg,2)})},i.friendBargainFirst=function(){i.toKanjia(Object(h.c)("id"),3,i.state.originatorUid)},i.friendBargainSecond=function(){i.toKanjia(Object(h.c)("id"),4,i.state.originatorUid)},i.shareFriendBargain=function(){i.setState({isShowOverlay:!0,status:7,isshowYindao:!!h.b.isWeixin}),Object(h.h)({title:"\u6211\u53d1\u73b0\u4e00\u95e8\u597d\u8bfe\uff0c\u5feb\u6765\u5e2e\u6211\u780d\u4ef7\u5427\uff01",desc:"\u6211\u5df2\u7ecf\u780d\u4e86".concat(i.state.bargainData.bargain_price,"\u5143\uff0c\u770b\u770b\u4f60\u80fd\u780d\u591a\u5c11"),link:encodeURI(location.href),imgUrl:i.state.course.course_img})},i.close=function(){i.setState({isShowOverlay:!1,status:""})},i.toCourseDetail=function(t){var a=i.props;a.dispatch;return a.history.push("/detail?id=".concat(t)),!1},i.state={isShowOverlay:!1,isOriginator:"",kanjiaIcon:e(630),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/"},i}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,i=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:i.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:i.toCourseDetail,bottom:g.a.createElement(k,{item:t,toCartBottom:i.toCartBottom.bind(i,t.course_id),toDetail:i.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,g.a.createElement("div",{className:"bargain-popup__content"},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-popup__button--close"}))))}}]),a}(d.Component))||i;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 2===t.item.bargain_status?a=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?(a=g.a.createElement(b.b,{to:"/play/video?id=".concat(t.item.v_course_id),className:S()("bargain","button--study")},"\u53bb\u5b66\u4e60"),139===t.item.course_id&&(a=g.a.createElement("a",{onClick:function(){return t.toDetail(t.item.course_id)},className:"bargain bargian-study"},"\u6211\u8981\u780d\u4ef7"))):a=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(673),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(673),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("a",{className:"bargain-href",href:"#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(903),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("a",{className:"bargain-href",href:"#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(673),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)},630:function(t,a){t.exports="data:image/png;base64,i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Gc044xjpKWbU1dR5VTXu4MGCdj9hrrnEtBK4W1w7BfCZefcrrG6sLtOCUUB73KKe1om1sOQJMFKn39CFy6BBcD/CjPeRyuuXa0w9og4v9zyro/YuaG/wUr6uEw8kzquPp8dbe9fayv239RdvYu+x22vO/D6/dOb9cD/EONO7gZ+bVU9IAAAAASUVORK5CYII="},631:function(t,a,e){"use strict";var i=e(5),s=e(7),n=e(6),r=e(8),c=e(9),o=e(0),l=e.n(o),m=e(25),u=e.n(m),d=(e(672),document.body||document.documentElement),g=["touchmove","mousewheel"],p=function(t){function a(t){var e;return Object(i.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(s.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},670:function(t,a,e){"use strict";var i=e(5),s=e(7),n=e(6),r=e(8),c=e(9),o=e(0),l=e.n(o),m=(e(671),function(t){function a(t){var s;return Object(i.a)(this,a),(s=Object(n.a)(this,Object(r.a)(a).call(this,t))).closeMore=function(){s.props.boxHide(!1)},s.state={kanjiaIcon:e(630)},s}return Object(c.a)(a,t),Object(s.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},671:function(t,a,e){},672:function(t,a,e){},673:function(t,a,e){t.exports=e.p+"mrstatic/media/kanjia_cg_icon.81a489ac.png"},902:function(t,a,e){},903: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+z0B7cUu6oUDKrj3yzDZrZU3Gqz7iwDn2zjX60TSwm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GIr6BMvChU1jv2sxTro8yqWFmE7BQxzUOJ+XcRylnwiDHGd3HgsZqK7/GhgYyr4Bv0gWFMX+40TOAZvSG+YKhrUIpmOx2sRrU0KE8b9CfK04mZD0/TvqzupNz1FM9xzTZU1/YH9qfu9prOSPXG9Tr+UerDsaeOnGbP1S3bbNXggV9XIWYP5SLNCwAAAABJRU5ErkJggg=="}}]);
//# sourceMappingURL=BargainMiddlePage.c3392e0a.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1167:function(e,t,a){},1168: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="},1187:function(e,t,a){"use strict";a.r(t);a(43);var n,s=a(13),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(63),h=(a(1167),a(3)),f=a(15),E=a(27),v=a(62),x=a(20),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(1168),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)},1188:function(e,t,a){"use strict";a.r(t);a(43);var n=a(13),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(780),a(20)),h=a(781),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)},1189:function(e,t,a){"use strict";a.r(t);a(43);var n=a(13),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(780),a(781)),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},780:function(e,t,a){},781: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.d90ec769.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=Classify.90b28556.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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_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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jTXZHlssIwFAZpqVDc4bq7+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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_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,OAHiB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0KCgbEL1XwbEAAADqSURBVBjTXZHlssIwFAZpqVDc4bq7+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([[3],{1166:function(e,t,a){},1185:function(e,t,a){"use strict";a.r(t);a(154);var n,i=a(35),o=a.n(i),c=(a(158),a(91)),s=a.n(c),l=a(19),r=(a(43),a(13)),u=a.n(r),f=a(5),d=a(7),p=a(6),h=a(8),m=a(89),v=a(9),b=a(0),g=a.n(b),y=a(27),C=(a(1166),a(707)),E=a(3),w=a(62),_=a(20),N=a(164);function k(e){e.preventDefault()}var O=Object(_.b)(function(e){return{user:e.user}})(n=function(e){function t(e){var a;return Object(f.a)(this,t),(a=Object(p.a)(this,Object(h.a)(t).call(this,e))).getTabs=function(){E.d.get("".concat(API.home,"/m/course/classify/").concat(0)).then(function(e){var t=Object(m.a)(a);if(200===e.data.code){if(e.data.data.common.length>0){var n=[{basics:[]},{advanced:[]}],i=[];["basics","advanced"].forEach(function(t,a){n[t]=e.data.data.common[a],e.data.data.common[a].list.forEach(function(e,t){i.push({title:e.c_name,id:e.c_id})})}),t.setState({arr:n,allClass:i})}}else u.a.info(e.data.msg,2)}).catch(function(e){console.log(e)})},a.getList=function(){var e=Object(m.a)(a);E.d.get("".concat(API.home,"/m/course/list/").concat(Object(E.c)("id"))).then(function(t){200===t.data.code&&e.setState({data:t.data.data,isLoading:!1})})},a.ontabclick=function(e){a.props.history.push("/courselist?id=".concat(e.id,"&name=").concat(e.title)),a.getList(),a.setState({activeTab:decodeURIComponent(Object(E.c)("name"))})},a.pulldown=function(){a.setState(function(e){return{ispull:!e.ispull,display:e.ispull?"none":"block"}},function(){a.state.ispull?document.addEventListener("touchmove",k,{passive:!1}):document.removeEventListener("touchmove",k)})},a.labelclick=function(e){a.props.history.push("/courselist?id=".concat(e.c_id,"&name=").concat(e.c_name)),a.getList(),a.setState(function(e){return{ispull:!e.ispull,display:e.ispull?"none":"block",activeTab:decodeURIComponent(Object(E.c)("name"))}})},a.toCourseDetail=function(e){var t=a.props;t.dispatch;t.history.push("/detail?id=".concat(e))},a.toClassify=function(){a.props.history.replace("/classify")},a.state={ispull:!1,display:"none",arr:[{basics:[]},{advanced:[]}],allClass:[],data:[],activeTab:decodeURIComponent(Object(E.c)("name")),isLoading:!0,top:44},a}return Object(v.a)(t,e),Object(d.a)(t,[{key:"componentDidMount",value:function(){this.getTabs(),this.getList();var e=document.querySelector(".search-nav");this.setState({top:e.offsetHeight})}},{key:"componentWillUnmount",value:function(){document.removeEventListener("touchmove",k)}},{key:"render",value:function(){var e=this,t=this.props.user,a=void 0===t?{}:t,n=!(!a.data||!a.data.uid),i=g.a.createElement("i",{className:"iconfont iconiconfront-69 pull-down"}),c=g.a.createElement("i",{className:"iconfont iconiconfront-71 pull-down"}),r=this.state.allClass.findIndex(function(t){return t.title===e.state.activeTab});return g.a.createElement("div",{className:"class-child"},g.a.createElement(C.a,{isLogin:n,toHref:this.toClassify}),g.a.createElement(w.a,{isLoading:this.state.isLoading},g.a.createElement("div",{className:"class-content"},g.a.createElement("div",{onClick:this.pulldown.bind(this)},this.state.ispull?c:i),g.a.createElement(N.StickyContainer,null,g.a.createElement(s.a,{tabs:this.state.allClass,animated:!1,page:r,onChange:function(t){return e.ontabclick(t)},renderTabBar:function(t){return g.a.createElement(N.Sticky,null,function(a){var n=a.style;return g.a.createElement("div",{style:Object(l.a)({},n,{top:"".concat(e.state.top,"px"),zIndex:1})},g.a.createElement(s.a.DefaultTabBar,t))})}},g.a.createElement("div",{className:"tabs"},g.a.createElement("ul",null,this.state.data&&this.state.data.length>0&&this.state.data.map(function(t,a){var n=g.a.createElement("div",{className:"info"},g.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),g.a.createElement("p",{className:"contact text-overflow-2"},t.desc),g.a.createElement("div",{className:"des"},!t.is_buy&&g.a.createElement("p",{className:"course-price"},g.a.createElement("span",{className:"new"},"\xa5",t.price1),g.a.createElement("span",{className:"old"},"\xa5",t.price0)),t.is_buy&&g.a.createElement("span",{className:"isbuy"},"\u5df2\u8d2d\u4e70"))),i=!t.is_buy&&g.a.createElement("div",null,0===t.bargain_num&&0!==t.groupon_num&&g.a.createElement("p",{className:"course-status"},"\u62fc\u56e2\u51cf",t.groupon_num,"\u5143"),0!==t.bargain_num&&0===t.groupon_num&&g.a.createElement("p",{className:"course-status"},"\u780d\u4ef7\u51cf",t.bargain_num,"\u5143"),t.is_aist&&g.a.createElement("span",{className:"return_cash"}));return g.a.createElement(y.j,{key:a,status:i,img:t.image_name,id:t.course_id,info:n,toDetail:e.toCourseDetail})}))))),g.a.createElement(o.a,null)),g.a.createElement("div",{className:"mbc-box",style:{display:this.state.display}},this.state.arr.basics&&g.a.createElement("div",{className:"tabcontent"},g.a.createElement(R,{activeTab:this.state.activeTab,data:this.state.arr.basics.list,title:this.state.arr.basics.name,labelclick:this.labelclick}),g.a.createElement(R,{activeTab:this.state.activeTab,data:this.state.arr.advanced.list,title:this.state.arr.advanced.name,labelclick:this.labelclick})))))}}]),t}(b.Component))||n;function R(e){return g.a.createElement("div",{className:"class-course"},g.a.createElement("p",{className:"course-items-title"},e.title),g.a.createElement("div",{className:"items-box"},e.data&&e.data.length>0&&e.data.map(function(t,a){return g.a.createElement("span",{className:e.activeTab===t.c_name?"active-label":"item-label",key:a,onClick:function(a){return e.labelclick(t)}},t.c_name)})))}t.default=O},582:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,a){return"aria-"!==a.substr(0,5)&&"data-"!==a.substr(0,5)&&"role"!==a||(t[a]=e[a]),t},{})},e.exports=t.default},587:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=a(4),o=(n=i)&&n.__esModule?n:{default:n};t.getComponentLocale=function(e,t,a,n){var i={};if(t&&t.antLocale&&t.antLocale[a])i=t.antLocale[a];else{var c=n();i=c.default||c}var s=(0,o.default)({},i);e.locale&&(s=(0,o.default)({},s,e.locale),e.locale.lang&&(s.lang=(0,o.default)({},i.lang,e.locale.lang)));return s},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},605:function(e,t,a){"use strict";a(50),a(606)},606:function(e,t,a){},607:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=b(a(4)),i=b(a(34)),o=b(a(10)),c=b(a(12)),s=b(a(11)),l=b(a(14)),r=b(a(16)),u=v(a(0)),f=v(a(2)),d=b(a(153)),p=b(a(582)),h=a(587),m=a(608);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}var g=function(e){function t(e){(0,o.default)(this,t);var a=(0,s.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));a.onSubmit=function(e){e.preventDefault(),a.props.onSubmit&&a.props.onSubmit(a.state.value||""),a.inputRef&&a.inputRef.blur()},a.onChange=function(e){a.state.focus||a.setState({focus:!0});var t=e.target.value;"value"in a.props||a.setState({value:t}),a.props.onChange&&a.props.onChange(t)},a.onFocus=function(){a.setState({focus:!0}),a.firstFocus=!0,a.props.onFocus&&a.props.onFocus()},a.onBlur=function(){var e;a.onBlurTimeout=(e=function(){a.blurFromOnClear||document.activeElement!==a.inputRef&&a.setState({focus:!1}),a.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),a.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),a.props.onBlur())},a.onClear=function(){a.doClear()},a.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];a.blurFromOnClear=e,"value"in a.props||a.setState({value:""}),a.props.onClear&&a.props.onClear(""),a.props.onChange&&a.props.onChange(""),e&&a.focus()},a.onCancel=function(){a.props.onCancel?a.props.onCancel(a.state.value||""):a.doClear(!1)},a.focus=function(){a.inputRef&&a.inputRef.focus()};var n=void 0;return n="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",a.state={value:n,focus:!1},a}return(0,l.default)(t,e),(0,c.default)(t,[{key:"componentDidMount",value:function(){if(this.rightBtnRef){var e=window.getComputedStyle(this.rightBtnRef);this.rightBtnInitMarginleft=e.marginLeft}this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){if(this.syntheticPhRef)if(this.inputContainerRef&&this.inputContainerRef.className.indexOf(this.props.prefixCls+"-start")>-1){if(this.syntheticPhContainerRef){var e=this.syntheticPhContainerRef.getBoundingClientRect().width;this.syntheticPhRef.style.width=Math.ceil(e)+"px"}!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="0")}else this.syntheticPhRef.style.width="100%",!this.props.showCancelButton&&this.rightBtnRef&&(this.rightBtnRef.style.marginRight="-"+(this.rightBtnRef.offsetWidth+(null!=this.rightBtnInitMarginleft?parseInt(this.rightBtnInitMarginleft,10):0))+"px")}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"componentWillUnmount",value:function(){var e;this.onBlurTimeout&&(e=this.onBlurTimeout,window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),this.onBlurTimeout=null)}},{key:"render",value:function(){var e,t=this,o=this.props,c=o.prefixCls,s=o.showCancelButton,l=o.disabled,f=o.placeholder,m=o.className,v=o.style,b=o.maxLength,g=(0,h.getComponentLocale)(this.props,this.context,"SearchBar",function(){return a(609)}).cancelText,y=this.state,C=y.value,E=y.focus,w=(0,r.default)(c,m,(0,i.default)({},c+"-start",!!(E||C&&C.length>0))),_=(0,r.default)(c+"-clear",(0,i.default)({},c+"-clear-show",!!(E&&C&&C.length>0))),N=(0,r.default)(c+"-cancel",(e={},(0,i.default)(e,c+"-cancel-show",!!(s||E||C&&C.length>0)),(0,i.default)(e,c+"-cancel-anim",this.firstFocus),e));return u.createElement("form",{onSubmit:this.onSubmit,className:w,style:v,ref:function(e){return t.inputContainerRef=e},action:"#"},u.createElement("div",{className:c+"-input"},u.createElement("div",{className:c+"-synthetic-ph",ref:function(e){return t.syntheticPhRef=e}},u.createElement("span",{className:c+"-synthetic-ph-container",ref:function(e){return t.syntheticPhContainerRef=e}},u.createElement("i",{className:c+"-synthetic-ph-icon"}),u.createElement("span",{className:c+"-synthetic-ph-placeholder",style:{visibility:f&&!C?"visible":"hidden"}},f))),u.createElement("input",(0,n.default)({type:"search",className:c+"-value",value:C,disabled:l,placeholder:f,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:b},(0,p.default)(this.props))),u.createElement(d.default,{activeClassName:c+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:_}))),u.createElement("div",{className:N,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||g))}}]),t}(u.Component);t.default=g,g.defaultProps=m.defaultProps,g.contextTypes={antLocale:f.object},e.exports=t.default},608:function(e,t,a){"use strict";function n(){}Object.defineProperty(t,"__esModule",{value:!0});t.defaultProps={prefixCls:"am-search",placeholder:"",onSubmit:n,onChange:n,onFocus:n,onBlur:n,onClear:n,showCancelButton:!1,disabled:!1}},609:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},707:function(e,t,a){"use strict";a(605);var n=a(607),i=a.n(n),o=a(5),c=a(7),s=a(6),l=a(8),r=a(9),u=a(0),f=a.n(u),d=(a(708),function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,i=new Array(n),c=0;c<n;c++)i[c]=arguments[c];return(a=Object(s.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(i)))).goShop=function(){var e=a.props.isLogin,t=void 0!==e&&e?"/shopcart":"/passport";window.location.replace(t)},a}return Object(r.a)(t,e),Object(c.a)(t,[{key:"toSearch",value:function(){window.location.href="/search"}},{key:"return",value:function(){window.location.href="/"}},{key:"render",value:function(){return f.a.createElement("div",{className:"preferential"},f.a.createElement("div",{className:"search-nav"},!this.props.toHref&&f.a.createElement("i",{className:"iconfont iconiconfront-68 return",onClick:this.return.bind(this)}),this.props.toHref&&f.a.createElement("i",{className:"iconfont iconiconfront-68 return",onClick:this.props.toHref}),f.a.createElement(i.a,{placeholder:"\u641c\u7d22\u8bfe\u7a0b",cancelText:" ",onFocus:this.toSearch.bind(this),showCancelButton:!1}),f.a.createElement("i",{className:"iconfont icongouwuche-xianxing shopping-cart",onClick:this.goShop})))}}]),t}(u.Component));t.a=d},708:function(e,t,a){}}]);
//# sourceMappingURL=CourseList.2e4e2dee.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=CourseList.84886b88.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/classify/courselist.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","common/HeaderSearch/index.js"],"names":["stopScroll","e","preventDefault","Classify","connect","_ref","user","props","_this2","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_7__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_9__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_10__","call","getTabs","http","get","concat","API","home","then","res","_this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_11__","data","code","common","length","arr2","basics","advanced","arr3","forEach","item","index","list","push","title","c_name","id","c_id","setState","arr","allClass","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_6___default","a","info","msg","catch","err","console","log","getList","getParam","isLoading","ontabclick","tab","history","activeTab","decodeURIComponent","pulldown","status","ispull","display","state","document","addEventListener","passive","removeEventListener","labelclick","toCourseDetail","_this2$props","dispatch","toClassify","replace","top","el","querySelector","offsetHeight","_this3","_this$props$user","isLogin","uid","bottom","react__WEBPACK_IMPORTED_MODULE_13___default","createElement","className","page","findIndex","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_16__","toHref","_common_Loading__WEBPACK_IMPORTED_MODULE_18__","onClick","bind","react_sticky__WEBPACK_IMPORTED_MODULE_20__","antd_mobile_lib_tabs__WEBPACK_IMPORTED_MODULE_3___default","tabs","animated","onChange","renderTabBar","_ref2","style","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_4__","zIndex","DefaultTabBar","map","Info","course_id","course_title","desc","is_buy","price1","price0","bargain_num","groupon_num","is_aist","_common__WEBPACK_IMPORTED_MODULE_14__","key","img","image_name","toDetail","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_1___default","ClassCourse","name","Component","defineProperty","exports","value","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","inputRef","blur","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","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","action","visibility","type","activeClassName","defaultProps","contextTypes","object","noop","HeaderBar","goShop","_this$props$isLogin","url","location","href","react__WEBPACK_IMPORTED_MODULE_7___default","return","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","toSearch"],"mappings":"wUAWA,SAASA,EAAWC,GAChBA,EAAEC,qBAMAC,EAHLC,YAAQ,SAAAC,GAAA,MAAa,CAClBC,KADKD,EAAEC,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F,KAAKqO,kBAzCdnH,cAkDTkH","file":"mrstatic/js/CourseList.2e4e2dee.chunk.js","sourcesContent":["import React, { Component } from 'react'\nimport { VList } from '../../common'\nimport { Tabs, WhiteSpace, Toast } from 'antd-mobile'\nimport './courselist.scss'\nimport HeaderSearch from '../../common/HeaderSearch/index'\nimport { http, getParam } from \"@/utils\"\nimport Loading from '@/common/Loading'\nimport { connect } from 'react-redux';\nimport { StickyContainer, Sticky } from \"react-sticky\";\n\n\nfunction stopScroll(e) {\n e.preventDefault()\n}\n\n@connect(({user}) => ({\n user\n}))\nclass Classify extends Component {\n constructor(props) {\n super(props)\n this.state = {\n ispull: false,\n display: 'none',\n arr: [{basics: []}, {advanced: []}],\n allClass: [],\n data: [],\n activeTab: decodeURIComponent(getParam('name')),\n isLoading: true,\n top: 44\n }\n\n }\n\n componentDidMount() {\n this.getTabs()\n this.getList()\n\n const el = document.querySelector('.search-nav');\n this.setState({\n top: el.offsetHeight\n });\n }\n\n componentWillUnmount() {\n document.removeEventListener('touchmove', stopScroll)\n }\n\n\n // 获取tabs接口\n getTabs = () => {\n let data = 0\n http.get(`${API.home}/m/course/classify/${data}`)\n .then((res) => {\n const _this = this\n if (res.data.code === 200) {\n if (res.data.data.common.length > 0) {\n let arr = ['basics', 'advanced']\n let arr2 = [{basics: []}, {advanced: []}]\n let arr3 = []\n arr.forEach(function (item, index) {\n arr2[item] = res.data.data.common[index]\n res.data.data.common[index].list.forEach(function (item, index) {\n arr3.push({'title': item.c_name, 'id': item.c_id})\n })\n })\n _this.setState({\n arr: arr2,\n allClass: arr3\n })\n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n .catch(err => {\n console.log(err)\n })\n }\n\n // 获取课程接口\n getList = () => {\n const _this = this\n http.get(`${API.home}/m/course/list/${getParam('id')}`).then((res) => {\n if (res.data.code === 200) {\n _this.setState({\n data: res.data.data,\n isLoading: false\n })\n }\n })\n }\n\n\n // 点击横向滚动tab查询\n ontabclick = (tab) => {\n this.props.history.push(`/courselist?id=${tab.id}&name=${tab.title}`)\n this.getList()\n this.setState({\n activeTab: decodeURIComponent(getParam('name'))\n });\n }\n\n // 上下展示\n pulldown = () => {\n this.setState(status => ({\n ispull: !status.ispull,\n display: status.ispull ? 'none' : 'block'\n }), () => {\n this.state.ispull ? document.addEventListener('touchmove', stopScroll, {\n passive: false\n }) : document.removeEventListener('touchmove', stopScroll)\n });\n }\n\n // 弹窗里面tab点击查询\n labelclick = (item) => {\n this.props.history.push(`/courselist?id=${item.c_id}&name=${item.c_name}`)\n this.getList()\n this.setState(status => ({\n ispull: !status.ispull,\n display: status.ispull ? 'none' : 'block',\n activeTab: decodeURIComponent(getParam('name'))\n }))\n }\n\n toCourseDetail = (id) => {\n const {dispatch, history} = this.props;\n // dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\n // }));\n }\n\n toClassify = () => {\n this.props.history.replace('/classify');\n }\n\n render() {\n const {user = {}} = this.props;\n let isLogin = user.data && user.data.uid ? true : false;\n const bottom = (\n <i className={'iconfont iconiconfront-69 pull-down'}></i>\n )\n const top = (\n <i className={'iconfont iconiconfront-71 pull-down'}></i>\n )\n\n let page = this.state.allClass.findIndex((item) => item.title === this.state.activeTab)\n return (\n <div className='class-child'>\n <HeaderSearch\n isLogin={isLogin}\n toHref={this.toClassify}\n />\n <Loading isLoading={this.state.isLoading}>\n <div className='class-content'>\n {/* <WhiteSpace/> */}\n <div onClick={this.pulldown.bind(this)}>\n {this.state.ispull ? top : bottom}\n </div>\n <StickyContainer>\n {/* <Tabs\n tabs={this.state.allClass}\n animated={false}\n page={page}\n onChange={(tab) => this.ontabclick(tab)}\n renderTabBar={props => <div className={'custom-render-bar'}>\n <Tabs.DefaultTabBar {...props}/>\n </div>}\n > */}\n <Tabs\n tabs={this.state.allClass}\n animated={false}\n page={page}\n onChange={(tab) => this.ontabclick(tab)}\n renderTabBar={props => {\n return (\n <Sticky>\n {({ style }) => {\n return (\n <div style={{ ...style, top: `${this.state.top}px`, zIndex: 1 }}>\n <Tabs.DefaultTabBar {...props} />\n </div>\n )\n }}\n </Sticky>\n )\n }}\n >\n <div className='tabs'>\n <ul>\n {this.state.data && this.state.data.length > 0 && this.state.data.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title'\n onClick={() => this.toCourseDetail(item.course_id)}>\n {item.course_title}\n </p>\n <p className='contact text-overflow-2'>{item.desc}</p>\n <div className='des'>\n {!item.is_buy && <p className=\"course-price\">\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n }\n {item.is_buy &&\n <span className=\"isbuy\">已购买</span>\n }\n </div>\n </div>\n )\n const status = (\n !item.is_buy &&\n <div>\n {item.bargain_num === 0 && item.groupon_num !== 0 &&\n <p className='course-status'>拼团减{item.groupon_num}元</p>\n }\n {item.bargain_num !== 0 && item.groupon_num === 0 &&\n <p className='course-status'>砍价减{item.bargain_num}元</p>\n }\n {\n item.is_aist && <span className='return_cash'></span>\n }\n </div>\n )\n return (\n <VList\n key={index}\n status={status}\n img={item.image_name}\n id={item.course_id}\n info={Info}\n toDetail={this.toCourseDetail}\n />\n )\n })}\n </ul>\n </div>\n </Tabs>\n\n </StickyContainer>\n <WhiteSpace/>\n </div>\n <div className='mbc-box' style={{display: this.state.display}}>\n {\n this.state.arr.basics &&\n <div className=\"tabcontent\">\n <ClassCourse activeTab={this.state.activeTab} data={this.state.arr.basics.list}\n title={this.state.arr.basics.name} labelclick={this.labelclick}/>\n <ClassCourse activeTab={this.state.activeTab} data={this.state.arr.advanced.list}\n title={this.state.arr.advanced.name} labelclick={this.labelclick}/>\n </div>\n }\n </div>\n </Loading>\n </div>\n )\n }\n\n}\n\nfunction ClassCourse(props) {\n return (\n <div className=\"class-course\">\n <p className='course-items-title'>{props.title}</p>\n <div className='items-box'>\n {\n props.data && props.data.length > 0 && props.data.map((item, index) => {\n return (\n <span className={props.activeTab === item.c_name ? 'active-label' : 'item-label'}\n key={index} onClick={e => props.labelclick(item)}>{item.c_name}</span>\n )\n })\n }\n </div>\n </div>\n )\n}\n\nexport default Classify;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, {Component} from 'react'\nimport {SearchBar} from 'antd-mobile'\nimport './index.scss'\n\nclass HeaderBar extends Component {\n toSearch() {\n window.location.href = '/search';\n }\n\n return() {\n window.location.href = '/';\n }\n\n goShop = () => {\n const { isLogin = false } = this.props;\n let url = isLogin? '/shopcart' : '/passport';\n window.location.replace(url);\n }\n\n render() {\n return (\n <div className='preferential'>\n <div className=\"search-nav\">\n {\n !this.props.toHref &&\n <i \n className={'iconfont iconiconfront-68 return'} \n onClick={this.return.bind(this)}\n />\n }\n {\n this.props.toHref &&\n <i \n className={'iconfont iconiconfront-68 return'} \n onClick={this.props.toHref}\n />\n }\n <SearchBar\n placeholder=\"搜索课程\"\n cancelText={\" \"}\n onFocus={this.toSearch.bind(this)}\n showCancelButton={false}\n />\n <i \n className={'iconfont icongouwuche-xianxing shopping-cart'} \n onClick={this.goShop}\n />\n </div>\n </div>\n )\n }\n\n}\n\nexport default HeaderBar;\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/classify/courselist.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","common/HeaderSearch/index.js"],"names":["stopScroll","e","preventDefault","Classify","connect","_ref","user","props","_this2","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_7__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_9__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_10__","call","getTabs","http","get","concat","API","home","then","res","_this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_11__","data","code","common","length","arr2","basics","advanced","arr3","forEach","item","index","list","push","title","c_name","id","c_id","setState","arr","allClass","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_6___default","a","info","msg","catch","err","console","log","getList","getParam","isLoading","ontabclick","tab","history","activeTab","decodeURIComponent","pulldown","status","ispull","display","state","document","addEventListener","passive","removeEventListener","labelclick","toCourseDetail","_this2$props","dispatch","toClassify","replace","top","el","querySelector","offsetHeight","_this3","_this$props$user","isLogin","uid","bottom","react__WEBPACK_IMPORTED_MODULE_13___default","createElement","className","page","findIndex","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_16__","toHref","_common_Loading__WEBPACK_IMPORTED_MODULE_18__","onClick","bind","react_sticky__WEBPACK_IMPORTED_MODULE_20__","antd_mobile_lib_tabs__WEBPACK_IMPORTED_MODULE_3___default","tabs","animated","onChange","renderTabBar","_ref2","style","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_4__","zIndex","DefaultTabBar","map","Info","course_id","course_title","desc","is_buy","price1","price0","bargain_num","groupon_num","is_aist","_common__WEBPACK_IMPORTED_MODULE_14__","key","img","image_name","toDetail","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_1___default","ClassCourse","name","Component","defineProperty","exports","value","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","inputRef","blur","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","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","action","visibility","type","activeClassName","defaultProps","contextTypes","object","noop","HeaderBar","goShop","_this$props$isLogin","url","location","href","react__WEBPACK_IMPORTED_MODULE_7___default","return","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","toSearch"],"mappings":"wUAWA,SAASA,EAAW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KnF,MAC5ByM,kBAAkB,IAEtBiC,EAAAvM,EAAAwC,cAAA,KACIC,UAAW,+CACXM,QAASlF,KAAKqO,kBAzCdnH,cAkDTkH","file":"mrstatic/js/CourseList.84886b88.chunk.js","sourcesContent":["import React, { Component } from 'react'\nimport { VList } from '../../common'\nimport { Tabs, WhiteSpace, Toast } from 'antd-mobile'\nimport './courselist.scss'\nimport HeaderSearch from '../../common/HeaderSearch/index'\nimport { http, getParam } from \"@/utils\"\nimport Loading from '@/common/Loading'\nimport { connect } from 'react-redux';\nimport { StickyContainer, Sticky } from \"react-sticky\";\n\n\nfunction stopScroll(e) {\n e.preventDefault()\n}\n\n@connect(({user}) => ({\n user\n}))\nclass Classify extends Component {\n constructor(props) {\n super(props)\n this.state = {\n ispull: false,\n display: 'none',\n arr: [{basics: []}, {advanced: []}],\n allClass: [],\n data: [],\n activeTab: decodeURIComponent(getParam('name')),\n isLoading: true,\n top: 44\n }\n\n }\n\n componentDidMount() {\n this.getTabs()\n this.getList()\n\n const el = document.querySelector('.search-nav');\n this.setState({\n top: el.offsetHeight\n });\n }\n\n componentWillUnmount() {\n document.removeEventListener('touchmove', stopScroll)\n }\n\n\n // 获取tabs接口\n getTabs = () => {\n let data = 0\n http.get(`${API.home}/m/course/classify/${data}`)\n .then((res) => {\n const _this = this\n if (res.data.code === 200) {\n if (res.data.data.common.length > 0) {\n let arr = ['basics', 'advanced']\n let arr2 = [{basics: []}, {advanced: []}]\n let arr3 = []\n arr.forEach(function (item, index) {\n arr2[item] = res.data.data.common[index]\n res.data.data.common[index].list.forEach(function (item, index) {\n arr3.push({'title': item.c_name, 'id': item.c_id})\n })\n })\n _this.setState({\n arr: arr2,\n allClass: arr3\n })\n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n .catch(err => {\n console.log(err)\n })\n }\n\n // 获取课程接口\n getList = () => {\n const _this = this\n http.get(`${API.home}/m/course/list/${getParam('id')}`).then((res) => {\n if (res.data.code === 200) {\n _this.setState({\n data: res.data.data,\n isLoading: false\n })\n }\n })\n }\n\n\n // 点击横向滚动tab查询\n ontabclick = (tab) => {\n this.props.history.push(`/courselist?id=${tab.id}&name=${tab.title}`)\n this.getList()\n this.setState({\n activeTab: decodeURIComponent(getParam('name'))\n });\n }\n\n // 上下展示\n pulldown = () => {\n this.setState(status => ({\n ispull: !status.ispull,\n display: status.ispull ? 'none' : 'block'\n }), () => {\n this.state.ispull ? document.addEventListener('touchmove', stopScroll, {\n passive: false\n }) : document.removeEventListener('touchmove', stopScroll)\n });\n }\n\n // 弹窗里面tab点击查询\n labelclick = (item) => {\n this.props.history.push(`/courselist?id=${item.c_id}&name=${item.c_name}`)\n this.getList()\n this.setState(status => ({\n ispull: !status.ispull,\n display: status.ispull ? 'none' : 'block',\n activeTab: decodeURIComponent(getParam('name'))\n }))\n }\n\n toCourseDetail = (id) => {\n const {dispatch, history} = this.props;\n // dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\n // }));\n }\n\n toClassify = () => {\n this.props.history.replace('/classify');\n }\n\n render() {\n const {user = {}} = this.props;\n let isLogin = user.data && user.data.uid ? true : false;\n const bottom = (\n <i className={'iconfont iconiconfront-69 pull-down'}></i>\n )\n const top = (\n <i className={'iconfont iconiconfront-71 pull-down'}></i>\n )\n\n let page = this.state.allClass.findIndex((item) => item.title === this.state.activeTab)\n return (\n <div className='class-child'>\n <HeaderSearch\n isLogin={isLogin}\n toHref={this.toClassify}\n />\n <Loading isLoading={this.state.isLoading}>\n <div className='class-content'>\n {/* <WhiteSpace/> */}\n <div onClick={this.pulldown.bind(this)}>\n {this.state.ispull ? top : bottom}\n </div>\n <StickyContainer>\n {/* <Tabs\n tabs={this.state.allClass}\n animated={false}\n page={page}\n onChange={(tab) => this.ontabclick(tab)}\n renderTabBar={props => <div className={'custom-render-bar'}>\n <Tabs.DefaultTabBar {...props}/>\n </div>}\n > */}\n <Tabs\n tabs={this.state.allClass}\n animated={false}\n page={page}\n onChange={(tab) => this.ontabclick(tab)}\n renderTabBar={props => {\n return (\n <Sticky>\n {({ style }) => {\n return (\n <div style={{ ...style, top: `${this.state.top}px`, zIndex: 1 }}>\n <Tabs.DefaultTabBar {...props} />\n </div>\n )\n }}\n </Sticky>\n )\n }}\n >\n <div className='tabs'>\n <ul>\n {this.state.data && this.state.data.length > 0 && this.state.data.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title'\n onClick={() => this.toCourseDetail(item.course_id)}>\n {item.course_title}\n </p>\n <p className='contact text-overflow-2'>{item.desc}</p>\n <div className='des'>\n {!item.is_buy && <p className=\"course-price\">\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n }\n {item.is_buy &&\n <span className=\"isbuy\">已购买</span>\n }\n </div>\n </div>\n )\n const status = (\n !item.is_buy &&\n <div>\n {item.bargain_num === 0 && item.groupon_num !== 0 &&\n <p className='course-status'>拼团减{item.groupon_num}元</p>\n }\n {item.bargain_num !== 0 && item.groupon_num === 0 &&\n <p className='course-status'>砍价减{item.bargain_num}元</p>\n }\n {\n item.is_aist && <span className='return_cash'></span>\n }\n </div>\n )\n return (\n <VList\n key={index}\n status={status}\n img={item.image_name}\n id={item.course_id}\n info={Info}\n toDetail={this.toCourseDetail}\n />\n )\n })}\n </ul>\n </div>\n </Tabs>\n\n </StickyContainer>\n <WhiteSpace/>\n </div>\n <div className='mbc-box' style={{display: this.state.display}}>\n {\n this.state.arr.basics &&\n <div className=\"tabcontent\">\n <ClassCourse activeTab={this.state.activeTab} data={this.state.arr.basics.list}\n title={this.state.arr.basics.name} labelclick={this.labelclick}/>\n <ClassCourse activeTab={this.state.activeTab} data={this.state.arr.advanced.list}\n title={this.state.arr.advanced.name} labelclick={this.labelclick}/>\n </div>\n }\n </div>\n </Loading>\n </div>\n )\n }\n\n}\n\nfunction ClassCourse(props) {\n return (\n <div className=\"class-course\">\n <p className='course-items-title'>{props.title}</p>\n <div className='items-box'>\n {\n props.data && props.data.length > 0 && props.data.map((item, index) => {\n return (\n <span className={props.activeTab === item.c_name ? 'active-label' : 'item-label'}\n key={index} onClick={e => props.labelclick(item)}>{item.c_name}</span>\n )\n })\n }\n </div>\n </div>\n )\n}\n\nexport default Classify;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, {Component} from 'react'\nimport {SearchBar} from 'antd-mobile'\nimport './index.scss'\n\nclass HeaderBar extends Component {\n toSearch() {\n window.location.href = '/search';\n }\n\n return() {\n window.location.href = '/';\n }\n\n goShop = () => {\n const { isLogin = false } = this.props;\n let url = isLogin? '/shopcart' : '/passport';\n window.location.replace(url);\n }\n\n render() {\n return (\n <div className='preferential'>\n <div className=\"search-nav\">\n {\n !this.props.toHref &&\n <i \n className={'iconfont iconiconfront-68 return'} \n onClick={this.return.bind(this)}\n />\n }\n {\n this.props.toHref &&\n <i \n className={'iconfont iconiconfront-68 return'} \n onClick={this.props.toHref}\n />\n }\n <SearchBar\n placeholder=\"搜索课程\"\n cancelText={\" \"}\n onFocus={this.toSearch.bind(this)}\n showCancelButton={false}\n />\n <i \n className={'iconfont icongouwuche-xianxing shopping-cart'} \n onClick={this.goShop}\n />\n </div>\n </div>\n )\n }\n\n}\n\nexport default HeaderBar;\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{1198:function(e,t,a){"use strict";a.r(t);var n=a(5),s=a(7),r=a(6),c=a(8),o=a(9),i=a(0),l=a.n(i),m=(a(908),a(16)),u=a.n(m),p=a(27),w=(a(909),function(){return l.a.createElement("div",{className:"open-app"},l.a.createElement("p",{className:"left"},"\u66f4\u591a\u8bd5\u9898\u8bf7\u524d\u5f80App\u67e5\u770b"),l.a.createElement(p.a,{className:"right"},"\u5728APP\u6253\u5f00"))}),h=a(3),d=a(910);a.d(t,"default",function(){return f});var f=function(e){function t(e){var a;return Object(n.a)(this,t),(a=Object(r.a)(this,Object(c.a)(t).call(this,e))).showAnswer=function(){a.setState({isShowAnswer:!a.state.isShowAnswer})},a.state={isShowAnswer:!1,questionData:{}},a}return Object(o.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this;h.d.get("".concat(API.home,"/m/dailyQuestion")).then(function(t){var a=t.data,n=a.data;if(200===a.code){var s=d.Object.assign(n,{analysis:n.analysis.length>0?n.analysis.split("\n"):[]});e.setState({questionData:s})}})}},{key:"render",value:function(){var e=this.state,t=e.questionData,a=t.ques,n=t.type_id,s=t.options,r=t.analysis,c=t.category,o=e.isShowAnswer;return l.a.createElement("div",{className:"examination"},l.a.createElement(p.e,{title:"\u6bcf\u65e5\u4e00\u9898",arrow:!0,cart:!1}),l.a.createElement("div",{className:"question-container"},l.a.createElement("div",{className:"topic"},l.a.createElement(p.i,{className:"category-tag"},c),l.a.createElement("span",{dangerouslySetInnerHTML:{__html:a}})),1===n&&l.a.createElement(E,{className:"options",options:s,showCorrect:this.state.isShowAnswer}),!o&&l.a.createElement("div",{className:"show-answer",onClick:this.showAnswer},l.a.createElement("span",null,"\u67e5\u770b\u89e3\u6790",l.a.createElement("i",{className:"iconfont iconiconfront-69"})))),o&&l.a.createElement(v,{content:r,isShowAnswer:!0}),l.a.createElement(w,null))}}]),t}(i.PureComponent),E=l.a.memo(function(e){var t=e.options,a=e.showCorrect;return l.a.createElement("ul",{className:"options"},t.map(function(e,t){return l.a.createElement("li",{key:t,className:u()("option",{active:1===e.is_ans&&a})},l.a.createElement("span",{className:"alphabet"},String.fromCharCode(65+t)),e.des)}))}),v=l.a.memo(function(e){var t=e.content,a=e.isShowAnswer;return l.a.createElement("div",{className:u()("answer",{scale:a})},l.a.createElement("p",{className:"legend"},"\u89e3\u6790"),t.length>0&&t.map(function(e,t){return l.a.createElement("p",{key:t,className:"content",dangerouslySetInnerHTML:{__html:e}})}))})},908:function(e,t,a){},909:function(e,t,a){}}]);
//# sourceMappingURL=Examination.d6cdc9b7.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=Examination.2baf7abf.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/examination/OpenApp/index.js","components/examination/index.js"],"names":["OpenApp","react_default","a","createElement","className","common","Examination","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","showAnswer","setState","isShowAnswer","state","questionData","_this2","http","get","concat","API","home","then","res","_res$data","data","code","newData","assign","analysis","length","split","_this$state","_this$state$questionD","ques","type_id","options","category","title","arrow","cart","dangerouslySetInnerHTML","__html","MultiChoice","showCorrect","onClick","Answer","content","components_examination_OpenApp","PureComponent","React","memo","_ref","map","item","index","key","classnames","active","is_ans","String","fromCharCode","des","_ref2","scale"],"mappings":"2LAaeA,UATC,WACZ,OACIC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,YACXH,EAAAC,EAAAC,cAAA,KAAGC,UAAU,QAAb,6DACAH,EAAAC,EAAAC,cAACE,EAAA,EAAD,CAASD,UAAU,SAAnB,sFCISE,cAEjB,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ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AC,cAAA,KAAGC,UAAU,iCAMnCa,GAAgBhB,EAAAC,EAAAC,cAAC+C,EAAD,CAAQC,QAASlB,EAAUhB,cAAY,IAE3DhB,EAAAC,EAAAC,cAACiD,EAAD,cA3DyBC,iBAiEnCN,EAAcO,IAAMC,KAAK,SAAAC,GAA4B,IAA1BhB,EAA0BgB,EAA1BhB,QAASQ,EAAiBQ,EAAjBR,YACtC,OACI/C,EAAAC,EAAAC,cAAA,MAAIC,UAAU,WAENoC,EAAQiB,IAAI,SAACC,EAAMC,GAAP,OACR1D,EAAAC,EAAAC,cAAA,MAAIyD,IAAKD,EAAOvD,UAAWyD,IAAW,SAAU,CAACC,OAA0B,IAAhBJ,EAAKK,QAAgBf,KAC5E/C,EAAAC,EAAAC,cAAA,QAAMC,UAAU,YAAY4D,OAAOC,aAAa,GAAKN,IACpDD,EAAKQ,UAQxBhB,EAASI,IAAMC,KAAK,SAAAY,GAA6B,IAA3BhB,EAA2BgB,EAA3BhB,QAASlC,EAAkBkD,EAAlBlD,aACjC,OACIhB,EAAAC,EAAAC,cAAA,OAAKC,UAAWyD,IAAW,SAAU,CAACO,MAAOnD,KACzChB,EAAAC,EAAAC,cAAA,KAAGC,UAAU,UAAb,gBACC+C,EAAQjB,OAAO,GAAKiB,EAAQM,IAAI,SAACC,EAAMC,GAAP,OAAiB1D,EAAAC,EAAAC,cAAA,KAAGyD,IAAKD,EAAOvD,UAAU,UAAUyC,wBAAyB,CAACC,OAAQY","file":"mrstatic/js/Examination.d6cdc9b7.chunk.js","sourcesContent":["import React from 'react'\nimport './index.scss'\nimport { CallApp} from '../../../common'\n\nconst OpenApp = () => {\n return (\n <div className='open-app'>\n <p className='left'>更多试题请前往App查看</p>\n <CallApp className='right'>在APP打开</CallApp>\n </div>\n )\n}\n\nexport default OpenApp","import React, { PureComponent } from 'react'\nimport './examination.scss'\nimport classnames from 'classnames'\n\nimport {HeaderBar, Tag} from '../../common'\nimport OpenApp from './OpenApp'\nimport { http, html, htmlDecode} from '@/utils'\nimport { config } from 'rxjs';\nimport { Object } from 'core-js';\n\n\n\nexport default class Examination extends PureComponent {\n\n constructor(props) {\n super(props)\n this.state = {\n isShowAnswer: false,\n questionData: {}\n }\n }\n\n componentDidMount() {\n http.get(`${API.home}/m/dailyQuestion`)\n .then(res => {\n const { data: { data, code } } = res;\n if(code === 200) {\n const newData = Object.assign(data, {analysis: data.analysis.length> 0? data.analysis.split('\\n'): []})\n this.setState({\n questionData: newData\n })\n }\n })\n }\n\n showAnswer = () => {\n this.setState({isShowAnswer: !this.state.isShowAnswer})\n }\n\n render() {\n let {\n questionData: {\n ques, type_id, options, analysis, category\n },\n isShowAnswer\n } = this.state\n return (\n <div className='examination'>\n <HeaderBar title='每日一题' arrow={true} cart={false}></HeaderBar>\n <div className=\"question-container\">\n <div className=\"topic\">\n <Tag className='category-tag'>{category}</Tag>\n <span dangerouslySetInnerHTML={{__html: ques}}/>\n </div>\n {\n type_id === 1 && <MultiChoice className='options' options={options}\n showCorrect={this.state.isShowAnswer}\n />\n }\n {\n !isShowAnswer &&\n (\n <div className=\"show-answer\" onClick={this.showAnswer}>\n <span>查看解析<i className='iconfont iconiconfront-69'></i></span>\n </div>\n )\n }\n </div>\n {\n isShowAnswer && <Answer content={analysis} isShowAnswer/>\n }\n <OpenApp/>\n </div>\n )\n }\n}\n\nconst MultiChoice = React.memo(({options, showCorrect}) => {\n return (\n <ul className='options'>\n {\n options.map((item, index) => (\n <li key={index} className={classnames('option', {'active': item.is_ans === 1 && showCorrect})}>\n <span className=\"alphabet\">{String.fromCharCode(65 + index)}</span>\n {item.des}\n </li>\n ))\n }\n </ul>\n )\n})\n\nconst Answer = React.memo(({content, isShowAnswer}) => {\n return (\n <div className={classnames('answer', {scale: isShowAnswer})}>\n <p className='legend'>解析</p>\n {content.length>0 && content.map((item, index) => <p key={index} className='content' dangerouslySetInnerHTML={{__html: item}}/>)}\n </div>\n )\n})\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/examination/OpenApp/index.js","components/examination/index.js"],"names":["OpenApp","react_default","a","createElement","className","common","Examination","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","showAnswer","setState","isShowAnswer","state","questionData","_this2","http","get","concat","API","home","then","res","_res$data","data","code","newData","assign","analysis","length","split","_this$state","_this$state$questionD","ques","type_id","options","category","title","arrow","cart","dangerouslySetInnerHTML","__html","MultiChoice","showCorrect","onClick","Answer","content","components_examination_OpenApp","PureComponent","React","memo","_ref","map","item","index","key","classnames","active","is_ans","String","fromCharCode","des","_ref2","scale"],"mappings":"2LAaeA,UATC,WACZ,OACIC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,YACXH,EAAAC,EAAAC,cAAA,KAAGC,UAAU,QAAb,6DACAH,EAAAC,EAAAC,cAACE,EAAA,EAAD,CAASD,UAAU,SAAnB,sFCISE,cAEjB,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAoBVQ,WAAa,WACTP,EAAKQ,SAAS,CAACC,cAAeT,EAAKU,MAAMD,gBApBzCT,EAAKU,MAAQ,CACTD,cAAc,EACdE,aAAc,IAJHX,mFAQC,IAAAY,EAAAT,KAChBU,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,qBACKC,KAAK,SAAAC,GAAO,IAAAC,EACwBD,EAAzBE,KAAQA,EADPD,EACOC,KAChB,GAAY,MAFHD,EACaE,KACL,CACb,IAAMC,EAAUtB,SAAOuB,OAAOH,EAAM,CAACI,SAAUJ,EAAKI,SAASC,OAAQ,EAAGL,EAAKI,SAASE,MAAM,MAAO,KACnGf,EAAKJ,SAAS,CACVG,aAAcY,wCAUzB,IAAAK,EAMDzB,KAAKO,MANJmB,EAAAD,EAEDjB,aACImB,EAHHD,EAGGC,KAAMC,EAHT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C,KAAK,SAAAY,GAA6B,IAA3BhB,EAA2BgB,EAA3BhB,QAASlC,EAAkBkD,EAAlBlD,aACjC,OACIhB,EAAAC,EAAAC,cAAA,OAAKC,UAAWyD,IAAW,SAAU,CAACO,MAAOnD,KACzChB,EAAAC,EAAAC,cAAA,KAAGC,UAAU,UAAb,gBACC+C,EAAQjB,OAAO,GAAKiB,EAAQM,IAAI,SAACC,EAAMC,GAAP,OAAiB1D,EAAAC,EAAAC,cAAA,KAAGyD,IAAKD,EAAOvD,UAAU,UAAUyC,wBAAyB,CAACC,OAAQY","file":"mrstatic/js/Examination.2baf7abf.chunk.js","sourcesContent":["import React from 'react'\nimport './index.scss'\nimport { CallApp} from '../../../common'\n\nconst OpenApp = () => {\n return (\n <div className='open-app'>\n <p className='left'>更多试题请前往App查看</p>\n <CallApp className='right'>在APP打开</CallApp>\n </div>\n )\n}\n\nexport default OpenApp","import React, { PureComponent } from 'react'\nimport './examination.scss'\nimport classnames from 'classnames'\n\nimport {HeaderBar, Tag} from '../../common'\nimport OpenApp from './OpenApp'\nimport { http, html, htmlDecode} from '@/utils'\nimport { config } from 'rxjs';\nimport { Object } from 'core-js';\n\n\n\nexport default class Examination extends PureComponent {\n\n constructor(props) {\n super(props)\n this.state = {\n isShowAnswer: false,\n questionData: {}\n }\n }\n\n componentDidMount() {\n http.get(`${API.home}/m/dailyQuestion`)\n .then(res => {\n const { data: { data, code } } = res;\n if(code === 200) {\n const newData = Object.assign(data, {analysis: data.analysis.length> 0? data.analysis.split('\\n'): []})\n this.setState({\n questionData: newData\n })\n }\n })\n }\n\n showAnswer = () => {\n this.setState({isShowAnswer: !this.state.isShowAnswer})\n }\n\n render() {\n let {\n questionData: {\n ques, type_id, options, analysis, category\n },\n isShowAnswer\n } = this.state\n return (\n <div className='examination'>\n <HeaderBar title='每日一题' arrow={true} cart={false}></HeaderBar>\n <div className=\"question-container\">\n <div className=\"topic\">\n <Tag className='category-tag'>{category}</Tag>\n <span dangerouslySetInnerHTML={{__html: ques}}/>\n </div>\n {\n type_id === 1 && <MultiChoice className='options' options={options}\n showCorrect={this.state.isShowAnswer}\n />\n }\n {\n !isShowAnswer &&\n (\n <div className=\"show-answer\" onClick={this.showAnswer}>\n <span>查看解析<i className='iconfont iconiconfront-69'></i></span>\n </div>\n )\n }\n </div>\n {\n isShowAnswer && <Answer content={analysis} isShowAnswer/>\n }\n <OpenApp/>\n </div>\n )\n }\n}\n\nconst MultiChoice = React.memo(({options, showCorrect}) => {\n return (\n <ul className='options'>\n {\n options.map((item, index) => (\n <li key={index} className={classnames('option', {'active': item.is_ans === 1 && showCorrect})}>\n <span className=\"alphabet\">{String.fromCharCode(65 + index)}</span>\n {item.des}\n </li>\n ))\n }\n </ul>\n )\n})\n\nconst Answer = React.memo(({content, isShowAnswer}) => {\n return (\n <div className={classnames('answer', {scale: isShowAnswer})}>\n <p className='legend'>解析</p>\n {content.length>0 && content.map((item, index) => <p key={index} className='content' dangerouslySetInnerHTML={{__html: item}}/>)}\n </div>\n )\n})\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{1186:function(e,t,a){"use strict";a.r(t);a(43);var n=a(13),s=a.n(n),i=a(5),c=a(7),o=a(6),l=a(8),r=a(9),u=a(0),m=a.n(u),d=(a(257),a(20)),h=a(3),p=a(27),v=a(31),f=a(24),b=a(63),E=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(o.a)(this,Object(l.a)(t).call(this,e))).toEditName=function(e){a.setState({isShow:!0,value:e})},a.cancle=function(){a.setState({isShow:!1})},a.handleChange=function(e){a.setState({value:e.target.value})},a.outLogin=function(){a.props.logout(),s.a.info("\u5df2\u9000\u51fa",2),a.props.history.push("/my")},a.submit=function(){if(a.state.value.length>12)s.a.info("\u4e0d\u8d85\u8fc712\u4e2a\u5b57\u7b26",2);else if(0===a.state.value.length)s.a.info("\u8bf7\u8f93\u5165\u6635\u79f0",2);else{var e={user_name:a.state.value};h.d.post("".concat(API.home,"/m/user_info/update"),e).then(function(e){200===e.data.code?(a.setState({isShow:!1}),a.props.updateUser({data:{username:a.state.value}}),s.a.info("\u4fee\u6539\u6210\u529f",2)):4008===e.data.code?a.setState({isShow:!1}):s.a.info(e.data.msg,2)})}},a.state={isShow:!1,value:""},a}return Object(r.a)(t,e),Object(c.a)(t,[{key:"render",value:function(){var e=this.props.user,t=e&&e.data&&e.data.username,a=e&&e.data&&e.data.avatar;return m.a.createElement("div",{className:"edit-name"},m.a.createElement(p.e,{title:"\u8d26\u53f7",arrow:!0,cart:!1}),m.a.createElement("div",{className:"my-mess"},m.a.createElement("img",{src:a,alt:""}),m.a.createElement("span",{className:"name"},t),m.a.createElement("span",{onClick:this.toEditName.bind(this,t),className:"edit"},"\u7f16\u8f91")),m.a.createElement("div",{className:"out-login",onClick:this.outLogin},"\u9000\u51fa\u767b\u5f55"),this.state.isShow&&m.a.createElement("div",{className:"edit-mbc"},m.a.createElement("div",{className:"edit-content"},m.a.createElement("div",{className:"edit-title"},"\u4fee\u6539\u6635\u79f0"),m.a.createElement("input",{type:"text",placeholder:"\u8bf7\u8f93\u5165\u6635\u79f0\uff08\u4e0d\u8d85\u8fc712\u4e2a\u5b57\u7b26\uff09",value:this.state.value,onChange:this.handleChange.bind(this)}),m.a.createElement("div",{className:"edit-btn"},m.a.createElement("button",{className:"cancle",onClick:this.cancle},"\u53d6\u6d88"),m.a.createElement("button",{className:"submit",onClick:this.submit},"\u786e\u8ba4")))))}}]),t}(u.PureComponent);t.default=Object(f.d)(Object(d.b)(function(e){return{user:e.user}},{logout:v.e,updateUser:v.i}),b.a)(E)}}]);
//# sourceMappingURL=MyEdit.fe4ce0d0.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=MyEdit.89e50819.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/my/edit.js"],"names":["MyEdut","props","_this","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","toEditName","name","setState","isShow","value","cancle","handleChange","e","target","outLogin","logout","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","history","push","submit","state","length","data","user_name","http","post","concat","API","home","then","res","code","updateUser","username","msg","user","avatar","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_11__","title","arrow","cart","src","alt","onClick","bind","type","placeholder","onChange","PureComponent","compose","connect","WithFullSize"],"mappings":"wOAUMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAQVQ,WAAa,SAACC,GACVR,EAAKS,SAAS,CACVC,QAAQ,EACRC,MAAOH,KAZIR,EAgBnBY,OAAS,WACLZ,EAAKS,SAAS,CACVC,QAAQ,KAlBGV,EAuBnBa,aAAe,SAACC,GACZd,EAAKS,SAAS,CACVE,MAAOG,EAAEC,OAAOJ,SAzBLX,EA6BnBgB,SAAW,WACPhB,EAAKD,MAAMkB,SACXC,EAAAC,EAAMC,KAAK,qBAAO,GAClBpB,EAAKD,MAAMsB,QAAQC,KAAK,QAhCTtB,EAoCnBuB,OAAS,WACL,GAAIvB,EAAKwB,MAAMb,MAAMc,OAAS,GAC1BP,EAAAC,EAAMC,KAAK,yCAAY,QACpB,GAAgC,IAA5BpB,EAAKwB,MAAMb,MAAMc,OACxBP,EAAAC,EAAMC,KAAK,iCAAS,OACjB,CACH,IAAIM,E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AAuB,cAAA,SAAOU,KAAK,OAAOC,YAAY,mFACxB1C,MAAOR,KAAKqB,MAAMb,MAClB2C,SAAUnD,KAAKU,aAAasC,KAAKhD,QAExCsC,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,YACXF,EAAAtB,EAAAuB,cAAA,UAAQC,UAAU,SAASO,QAAS/C,KAAKS,QAAzC,gBACA6B,EAAAtB,EAAAuB,cAAA,UAAQC,UAAU,SAASO,QAAS/C,KAAKoB,QAAzC,2BA7FXgC,iBAwGNC,sBACXC,YACI,SAAAjC,GAAK,MAAK,CAACe,KAAMf,EAAMe,OACvB,CAACtB,WAAQmB,iBAEbsB,IALWF,CAMb1D","file":"mrstatic/js/MyEdit.fe4ce0d0.chunk.js","sourcesContent":["import React, {PureComponent} from 'react'\nimport './index.scss'\nimport {connect} from \"react-redux\"\nimport {Toast} from 'antd-mobile'\nimport {http} from \"@/utils\"\nimport {HeaderBar} from \"@/common\"\nimport {logout, updateUser} from '@/store/userAction'\nimport {compose} from \"redux\";\nimport {WithFullSize} from '@/HOCs'\n\nclass MyEdut extends PureComponent {\n constructor(props) {\n super(props)\n this.state = {\n isShow: false,\n value: ''\n }\n }\n\n // 点击编辑\n toEditName = (name) => {\n this.setState({\n isShow: true,\n value: name\n })\n }\n // 取消\n cancle = () => {\n this.setState({\n isShow: false\n })\n }\n\n // 获取input的值\n handleChange = (e) => {\n this.setState({\n value: e.target.value\n })\n }\n // 退出登录\n outLogin = () => {\n this.props.logout()\n Toast.info('已退出', 2)\n this.props.history.push('/my')\n }\n\n // 确定修改\n submit = () => {\n if (this.state.value.length > 12) {\n Toast.info('不超过12个字符', 2)\n } else if (this.state.value.length === 0) {\n Toast.info('请输入昵称', 2)\n } else {\n let data = {\n user_name: this.state.value\n }\n http.post(`${API.home}/m/user_info/update`, data).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n isShow: false\n })\n this.props.updateUser({data: {username: this.state.value}})\n Toast.info('修改成功', 2)\n } else if (res.data.code === 4008) {\n this.setState({\n isShow: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n }\n\n render() {\n const {user} = this.props\n const username = user && user.data && user.data.username\n const avatar = user && user.data && user.data.avatar\n return (\n <div className=\"edit-name\">\n <HeaderBar title='账号' arrow={true} cart={false}></HeaderBar>\n\n <div className='my-mess'>\n <img src={avatar} alt=\"\"/>\n <span className=\"name\">{username}</span>\n <span onClick={this.toEditName.bind(this, username)} className=\"edit\">编辑</span>\n </div>\n <div className=\"out-login\" onClick={this.outLogin}>\n 退出登录\n </div>\n\n {\n this.state.isShow &&\n <div className=\"edit-mbc\">\n <div className=\"edit-content\">\n <div className=\"edit-title\">修改昵称</div>\n <input type=\"text\" placeholder='请输入昵称(不超过12个字符)'\n value={this.state.value}\n onChange={this.handleChange.bind(this)}\n />\n <div className=\"edit-btn\">\n <button className='cancle' onClick={this.cancle}>取消</button>\n <button className='submit' onClick={this.submit}>确认</button>\n </div>\n </div>\n </div>\n }\n </div>\n )\n }\n\n}\n\nexport default compose(\n connect(\n state => ({user: state.user}),\n {logout, updateUser}\n ),\n WithFullSize\n)(MyEdut)\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/my/edit.js"],"names":["MyEdut","props","_this","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","toEditName","name","setState","isShow","value","cancle","handleChange","e","target","outLogin","logout","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","history","push","submit","state","length","data","user_name","http","post","concat","API","home","then","res","code","updateUser","username","msg","user","avatar","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_11__","title","arrow","cart","src","alt","onClick","bind","type","placeholder","onChange","PureComponent","compose","connect","WithFullSize"],"mappings":"wOAUMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAQVQ,WAAa,SAACC,GACVR,EAAKS,SAAS,CACVC,QAAQ,EACRC,MAAOH,KAZIR,EAgBnBY,OAAS,WACLZ,EAAKS,SAAS,CACVC,QAAQ,KAlBGV,EAuBnBa,aAAe,SAACC,GACZd,EAAKS,SAAS,CACVE,MAAOG,EAAEC,OAAOJ,SAzBLX,EA6BnBgB,SAAW,WACPhB,EAAKD,MAAMkB,SACXC,EAAAC,EAAMC,KAAK,qBAAO,GAClBpB,EAAKD,MAAMsB,QAAQC,KAAK,QAhCTtB,EAoCnBuB,OAAS,WACL,GAAIvB,EAAKwB,MAAMb,MAAMc,OAAS,GAC1BP,EAAAC,EAAMC,KAAK,yCAAY,QACpB,GAAgC,IAA5BpB,EAAKwB,MAAMb,MAAMc,OACxBP,EAAAC,EAAMC,KAAK,iCAAS,OACjB,CACH,IAAIM,EAAO,CACPC,UAAW3B,EAAKwB,MAAMb,OAE1BiB,IAAKC,KAAL,GAAAC,OAAaC,IAAIC,KAAjB,uBAA4CN,GAAMO,KAAK,SAACC,GAC9B,MAAlBA,EAAIR,KAAKS,MACTnC,EAAKS,SAAS,CACVC,QAAQ,IAEZV,EAAKD,MAAMqC,WAAW,CAACV,KAAM,CAACW,SAAUrC,EAAKwB,MAAMb,SACnDO,EAAAC,EAAMC,KAAK,2BAAQ,IACM,OAAlBc,EAAIR,KAAKS,KAChBnC,EAAKS,SAAS,CACVC,QAAQ,IAGZQ,EAAAC,EAAMC,KA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OACvB,CAACtB,WAAQmB,iBAEbsB,IALWF,CAMb1D","file":"mrstatic/js/MyEdit.89e50819.chunk.js","sourcesContent":["import React, {PureComponent} from 'react'\nimport './index.scss'\nimport {connect} from \"react-redux\"\nimport {Toast} from 'antd-mobile'\nimport {http} from \"@/utils\"\nimport {HeaderBar} from \"@/common\"\nimport {logout, updateUser} from '@/store/userAction'\nimport {compose} from \"redux\";\nimport {WithFullSize} from '@/HOCs'\n\nclass MyEdut extends PureComponent {\n constructor(props) {\n super(props)\n this.state = {\n isShow: false,\n value: ''\n }\n }\n\n // 点击编辑\n toEditName = (name) => {\n this.setState({\n isShow: true,\n value: name\n })\n }\n // 取消\n cancle = () => {\n this.setState({\n isShow: false\n })\n }\n\n // 获取input的值\n handleChange = (e) => {\n this.setState({\n value: e.target.value\n })\n }\n // 退出登录\n outLogin = () => {\n this.props.logout()\n Toast.info('已退出', 2)\n this.props.history.push('/my')\n }\n\n // 确定修改\n submit = () => {\n if (this.state.value.length > 12) {\n Toast.info('不超过12个字符', 2)\n } else if (this.state.value.length === 0) {\n Toast.info('请输入昵称', 2)\n } else {\n let data = {\n user_name: this.state.value\n }\n http.post(`${API.home}/m/user_info/update`, data).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n isShow: false\n })\n this.props.updateUser({data: {username: this.state.value}})\n Toast.info('修改成功', 2)\n } else if (res.data.code === 4008) {\n this.setState({\n isShow: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n }\n\n render() {\n const {user} = this.props\n const username = user && user.data && user.data.username\n const avatar = user && user.data && user.data.avatar\n return (\n <div className=\"edit-name\">\n <HeaderBar title='账号' arrow={true} cart={false}></HeaderBar>\n\n <div className='my-mess'>\n <img src={avatar} alt=\"\"/>\n <span className=\"name\">{username}</span>\n <span onClick={this.toEditName.bind(this, username)} className=\"edit\">编辑</span>\n </div>\n <div className=\"out-login\" onClick={this.outLogin}>\n 退出登录\n </div>\n\n {\n this.state.isShow &&\n <div className=\"edit-mbc\">\n <div className=\"edit-content\">\n <div className=\"edit-title\">修改昵称</div>\n <input type=\"text\" placeholder='请输入昵称(不超过12个字符)'\n value={this.state.value}\n onChange={this.handleChange.bind(this)}\n />\n <div className=\"edit-btn\">\n <button className='cancle' onClick={this.cancle}>取消</button>\n <button className='submit' onClick={this.submit}>确认</button>\n </div>\n </div>\n </div>\n }\n </div>\n )\n }\n\n}\n\nexport default compose(\n connect(\n state => ({user: state.user}),\n {logout, updateUser}\n ),\n WithFullSize\n)(MyEdut)\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{1165:function(e,t,a){},1184:function(e,t,a){"use strict";a.r(t);var o,r=a(19),c=(a(43),a(13)),n=a.n(c),s=a(5),i=a(7),l=a(6),d=a(8),p=a(9),u=(a(90),a(26)),m=a.n(u),f=(a(117),a(47)),h=a.n(f),b=a(0),g=a.n(b),E=a(27),v=a(15),y=a(3),x=a(41),O=a(20),S=(a(73),a(1165),h.a.Item);function j(e){var t=e.list;return g.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=g.a.createElement("span",{className:"order-newprice"},"\xa5",c);e.locationState&&e.locationState.group&&(p=g.a.createElement("span",{className:"order-newprice"},"\xa5",e.groupPrice));var u=g.a.createElement("div",{className:"order-info"},g.a.createElement("p",{className:"order-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},onClick:function(){return e.toDetail(o)}},i),g.a.createElement("p",{className:"order-content",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:"2",wordBreak:"break-all",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box"}},s),g.a.createElement("p",{className:"order-des"},p,g.a.createElement("span",{className:"order-price"},"\xa5",n)));return g.a.createElement(E.g,Object.assign({},t,{src:r,id:o,key:a,info:u,isaist:e.isaist,toDetail:e.toDetail}),e.locationState&&(e.locationState.type||e.locationState.simple)?g.a.createElement("div",{className:"order-prefer"},g.a.createElement(h.a,{key:a},g.a.createElement(S,{arrow:"horizontal",onClick:function(){}},g.a.createElement(v.b,{to:{pathname:"/coupons",search:"?id=".concat(o),state:{from:"/order"}}},g.a.createElement(m.a,{justify:"between"},g.a.createElement("span",{style:{color:"#333",fontSize:"15px"}},"\u4f18\u60e0\u5238"),g.a.createElement("span",{style:{fontSize:"14px",color:"#999999"}},d||(0===l?"\u65e0":"".concat(l,"\u5f20\u53ef\u7528")))))))):null)}))}var N=Object(O.b)()(o=function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(l.a)(this,Object(d.a)(t).call(this,e))).submitOrder=function(){a.state.total;if(0!==a.state.orderList.length){a.state.perfect||n.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(y.c)("id"),ischeck:a.state.useBalance,pdd_order_id:t.pdd_order_id}:{course_id:Object(y.c)("id"),ischeck:a.state.useBalance};y.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))):n.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"),y.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")):n.a.info(e.data.msg,2)})}}else n.a.info("\u6ca1\u6709\u8981\u63d0\u4ea4\u7684\u8ba2\u5355\uff01")},a.useBalance=function(){var e=a.state.useBalance;a.setState({useBalance:!e}),e?sessionStorage.removeItem("orderUseCacheObj"):(a.cacheObj=Object(r.a)({},a.state),sessionStorage.setItem("orderUseCacheObj",JSON.stringify(a.state))),a.computedMoney(e)},a.computedMoney=function(e){var t=parseFloat(a.cacheObj.total),o=parseFloat(a.cacheObj.user_account),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(p.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.props.location.state&&1===this.props.location.state.type?y.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()):n.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([y.d.get("".concat(API.home,"/m/course/detail/").concat(Object(y.c)("id"))),y.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()):n.a.info(a.data.msg,2)):n.a.info(o.data.msg,2)}):y.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()):n.a.info(t.data.msg,2)}):y.d.get("".concat(API["base-api"],"/m/order/preorder")).then(function(t){200===t.data.errno?(e.publicGetData(t.data.data),e.publicLocalStorage()):n.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,c=e.discount,n=e.useBalance,s=e.info,i=e.offset,l=e.groupPrice;return g.a.createElement("div",{className:"order-wrapper"},g.a.createElement(m.a,null,g.a.createElement(m.a.Item,null,g.a.createElement(E.e,{title:"\u8bfe\u7a0b\u62a5\u540d",arrow:!0}),g.a.createElement("div",{className:"order-list"},g.a.createElement(j,{list:a,compute:this.computedMoney,courseId:Object(y.c)("id"),locationState:this.props.location.state,groupPrice:l,toDetail:this.toCourseDetail})),g.a.createElement("div",{className:"order-balance"},g.a.createElement(h.a,null,g.a.createElement(S,{className:"order-prefer-text"},g.a.createElement(m.a,{justify:"between"},g.a.createElement(m.a,{align:"center"},g.a.createElement("span",null,"\u4f59\u989d\u62b5\u6263"),g.a.createElement("span",{className:"order-balanceprice"}," (\u4f59\u989d: ",g.a.createElement("i",{className:"order-money"},"".concat(o,"\u5143")),")"),g.a.createElement("i",{className:"iconfont iconiconfront-22 question-mark",onClick:this.showInfo})),g.a.createElement(m.a,null,n?g.a.createElement(g.a.Fragment,null,g.a.createElement("span",{style:{color:"#FF2121",fontSize:"15px",marginRight:"6px"}},"-\xa5".concat(i)),g.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 balance-used",onClick:Object(x.throttle)(this.useBalance,600)})):g.a.createElement("i",{className:"circle-icon",onClick:Object(x.throttle)(this.useBalance,600)})))))),g.a.createElement("div",{className:"order-bar"},g.a.createElement("div",{className:"order-course"},g.a.createElement("span",{className:"order-course-text"},"".concat(a.length,"\u95e8\u8bfe\u7a0b"))),g.a.createElement("div",{className:"order-bar-text"},g.a.createElement("div",{className:"order-amount"},g.a.createElement("span",{className:"order-amount-title"},"\u5408\u8ba1:"),g.a.createElement("span",{className:"order-amount-price"},"\uffe5".concat(r))),g.a.createElement("div",{className:"order-preprice"},g.a.createElement("span",{className:"order-preprice-title"},"\u5df2\u4f18\u60e0:"),g.a.createElement("span",{className:"order-preprice-price"},"\xa5".concat(c)))),t?g.a.createElement("button",{type:"button",className:"order-button has-info"},g.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355")):g.a.createElement("button",{type:"button",className:"order-button"},g.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355"))))),s?g.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",zIndex:"99"}},g.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%)"}},g.a.createElement(m.a,{direction:"column",justify:"between",align:"center",style:{height:"100%"}},g.a.createElement("p",{style:{fontSize:"16px",color:"#333333"}},"\u4f59\u989d\u62b5\u6263\u8bf4\u660e"),g.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"),g.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}(b.Component))||o;t.default=N}}]);
//# sourceMappingURL=Order.863bcecd.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=Order.7967ef7f.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_11___default","a","OrderList","props","listData","list","react__WEBPACK_IMPORTED_MODULE_12___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_13__","Object","assign","src","id","key","info","isaist","type","simple","arrow","react_router_dom__WEBPACK_IMPORTED_MODULE_14__","to","pathname","search","concat","state","from","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_9___default","justify","color","fontSize","Order","connect","_this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__","call","submitOrder","total","orderList","length","perfect","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_2___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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__","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","compute","courseId","align","Fragment","marginRight","throttle","position","top","left","width","height","backgroundColor","zIndex","padding","margin","transform","direction","lineHeight","textAlign","borderRadius","border","Component"],"mappings":"6SAYMA,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,Q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AAU,SAA7L,yBAIJ,aA7aM0G,iBAsbLzG","file":"mrstatic/js/Order.863bcecd.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_11___default","a","OrderList","props","listData","list","react__WEBPACK_IMPORTED_MODULE_12___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_13__","Object","assign","src","id","key","info","isaist","type","simple","arrow","react_router_dom__WEBPACK_IMPORTED_MODULE_14__","to","pathname","search","concat","state","from","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_9___default","justify","color","fontSize","Order","connect","_this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__","call","submitOrder","total","orderList","length","perfect","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_2___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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__","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","compute","courseId","align","Fragment","marginRight","throttle","position","top","left","width","height","backgroundColor","zIndex","padding","margin","transform","direction","lineHeight","textAlign","borderRadius","border","Component"],"mappings":"6SAYMA,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,GA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,EAAAL,EAAAM,cAAA,QAAMc,UAAU,oBAAoBS,QAASgC,KAAKI,aAAlD,gCAQZxB,EACEpC,EAAAL,EAAAM,cAAA,OAAKmB,MAAO,CAAE0H,SAAU,QAASC,IAAK,EAAGC,KAAM,EAAGC,MAAO,OAAQC,OAAQ,OAAQC,gBAAiB,qBAAsBC,OAAQ,OAC9HpJ,EAAAL,EAAAM,cAAA,OAAKmB,MAAO,CAAEiI,QAAS,OAAQF,gBAAiB,OAAQF,MAAO,QAASC,OAAQ,QAASI,OAAQ,SAAUR,SAAU,WAAYE,KAAM,MAAOD,IAAK,MAAOQ,UAAW,0BACnKvJ,EAAAL,EAAAM,cAAA+C,EAAArD,EAAA,CAAM6J,UAAU,SAASvG,QAAQ,UAAUyF,MAAM,SAAStH,MAAO,CAAE8H,OAAQ,SACzElJ,EAAAL,EAAAM,cAAA,KAAGmB,MAAO,CAAE+B,SAAU,OAAQD,MAAO,YAArC,wCACAlD,EAAAL,EAAAM,cAAA,KAAGmB,MAAO,CAAEqI,WAAY,OAAQtG,SAAU,OAAQD,MAAO,YAAzD,kRACAlD,EAAAL,EAAAM,cAAA,OAAKuB,QAASgC,KAAKsD,SAAU1F,MAAO,CAAE6H,MAAO,QAASC,OAAQ,OAAQO,WAAY,OAAQC,UAAW,SAAUC,aAAc,MAAOC,OAAQ,oBAAqB1G,MAAO,UAAWC,SAAU,SAA7L,yBAIJ,aA7aM0G,iBAsbLzG","file":"mrstatic/js/Order.7967ef7f.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([[8],{1183:function(e,a,n){"use strict";n.r(a);var o=n(5),r=n(7),t=n(6),l=n(8),i=n(9),c=(n(43),n(13)),s=n.n(c),p=n(19),u=(n(156),n(74)),d=n.n(u),f=(n(1153),n(1155)),h=n.n(f),m=(n(1156),n(1158)),v=n.n(m),b=n(0),q=n.n(b),g=n(18),E=n(27),j=n(3),y=Object(g.f)({mapPropsToValues:function(e){return Object(p.a)({},e.userInfo)},validate:function(e,a){return{}},handleSubmit:function(e,a){var n=e.real_name,o=e.cellphone,r=e.qq;if(n)if(0!=="".concat(n).replace(/\s+/g,"").length)if(o)if(/1\d{10}/g.test("".concat(o).replace(/\s+/g,"")))if(r)if(/\d{5,}/g.test(r)){var t=0;if(a.props.userInfo){var l=a.props.userInfo;l.real_name===n&&(t+=1),l.cellphone===o&&(t+=1),l.qq===r&&(t+=1)}var i="/order";a.props.userInfo.id&&(i=i+"?id="+a.props.userInfo.id),3!==t?j.d.post("".concat(API["base-api"],"/m/order/saveUserInfo"),{real_name:e.real_name,cellphone:"".concat(e.cellphone).replace(/\s+/g,""),qq:e.qq}).then(function(n){200===n.data.errno?(s.a.info("\u4fdd\u5b58\u6210\u529f\uff01",void 0,void 0,!1),a.props.history.replace(i,Object(p.a)({},e))):s.a.info(n.data.msg,void 0,void 0,!1)}):a.props.history.replace(i,Object(p.a)({},e))}else s.a.info("\u8bf7\u8f93\u5165\u6b63\u786eQQ\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165QQ\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u624b\u673a\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u59d3\u540d\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u59d3\u540d\uff01",void 0,void 0,!1)}})(function(e){var a=e.values,n=(e.errors,e.touched,e.setFieldValue),o=(e.handleBlur,e.handleSubmit);e.isSubmitting;return q.a.createElement("form",null,q.a.createElement(v.a,{clear:!0,name:"real_name",onChange:function(e){return n("real_name",e)},placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684\u771f\u5b9e\u59d3\u540d",value:a.real_name},"\u59d3\u540d"),q.a.createElement(v.a,{clear:!0,type:"phone",name:"cellphone",placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684\u624b\u673a\u53f7\u7801",onChange:function(e){return n("cellphone",e)},value:a.cellphone},"\u7535\u8bdd"),q.a.createElement(v.a,{clear:!0,name:"qq",placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684QQ\u53f7\u7801",maxLength:"15",onChange:function(e){return n("qq",e)},value:a.qq},"QQ"),q.a.createElement("div",{style:{marginTop:"21px"}},q.a.createElement(d.a,null,q.a.createElement(h.a,{type:"primary",onClick:o},"\u786e\u8ba4"))))}),O=function(e){function a(e){return Object(o.a)(this,a),Object(t.a)(this,Object(l.a)(a).call(this,e))}return Object(i.a)(a,e),Object(r.a)(a,[{key:"render",value:function(){return q.a.createElement("div",null,q.a.createElement(E.e,{title:"\u62a5\u540d\u4fe1\u606f",arrow:!0}),q.a.createElement(y,{history:this.props.history,userInfo:this.props.location.state}))}}]),a}(b.Component);a.default=O}}]);
//# sourceMappingURL=Orderinfo.5dac860b.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=Orderinfo.bbde0b54.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/order/orderinfo.js"],"names":["MyForm","withFormik","mapPropsToValues","props","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_7__","userInfo","validate","values","handleSubmit","FormBag","real_name","cellphone","qq","concat","replace","length","test","same","pathName","id","http","post","API","then","res","data","errno","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_6___default","a","info","undefined","history","msg","_ref","setFieldValue","errors","touched","handleBlur","isSubmitting","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","antd_mobile_lib_input_item__WEBPACK_IMPORTED_MODULE_13___default","clear","name","onChange","value","placeholder","type","maxLength","style","marginTop","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_9___default","antd_mobile_lib_button__WEBPACK_IMPORTED_MODULE_11___default","onClick","Orderinfo","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__","call","_common__WEBPACK_IMPORTED_MODULE_16__","title","arrow","location","state","Component"],"mappings":"qSAgDMA,EAASC,YAAW,CACtBC,iBAAkB,SAAAC,GAAK,OAAAC,OAAAC,EAAA,EAAAD,CAAA,GAAUD,EAAMG,WACvCC,SAAU,SAACC,EAAQL,GAEf,MADe,IAGnBM,aAAc,SACVD,EACAE,GACC,IACMC,EAA4BH,EAA5BG,UAAWC,EAAiBJ,EAAjBI,UAAWC,EAAML,EAANK,GAC7B,GAAKF,EAGC,GAAoD,IAAhD,GAAAG,OAAIH,GAAaI,QAAQ,OAAQ,IAAIC,OAI/C,GAAKJ,EAGE,GAAK,WAAWK,KAAK,GAAAH,OAAIF,GAAaG,QAAQ,OAAQ,KAI7D,GAAKF,EAGE,GAAK,UAAUI,KAAKJ,GAApB,CAIP,IAAIK,EAAO,EACX,GAAGR,EAAQP,MAAMG,SAAU,CACvB,IAAMA,EAAWI,EAAQP,MAAMG,SAC5BA,EAASK,YAAcA,IACtBO,GAAQ,GAETZ,EAASM,YAAcA,IACtBM,GAAQ,GAETZ,EAASO,KAAOA,IACfK,GAAQ,GAGhB,IAAIC,EAAW,SACZT,EAAQP,MAAMG,SAASc,KACtBD,EAAWA,EAAW,OAAST,EAAQP,MAAMG,SAASc,IAG9C,IAATF,EASHG,IAAKC,KAAL,GAAAR,OAAaS,IAAI,YAAjB,yB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,EAAOI,WANlB,gBAQA4B,EAAAX,EAAAY,cAAAC,EAAAb,EAAA,CACIc,OAAK,EACLC,KAAK,KACLG,YAAY,+CACZE,UAAU,KACVJ,SAAU,SAACC,GAAD,OAAWX,EAAc,KAAMW,IACzCA,MAAOtC,EAAOK,IANlB,MASA2B,EAAAX,EAAAY,cAAA,OAAKS,MAAO,CAAEC,UAAW,SACrBX,EAAAX,EAAAY,cAAAW,EAAAvB,EAAA,KACIW,EAAAX,EAAAY,cAAAY,EAAAxB,EAAA,CAAQmB,KAAK,UAAUM,QAAS7C,GAAhC,qBAkFd8C,cACF,SAAAA,EAAYpD,GAAQ,OAAAC,OAAAoD,EAAA,EAAApD,CAAAqD,KAAAF,GAAAnD,OAAAsD,EAAA,EAAAtD,CAAAqD,KAAArD,OAAAuD,EAAA,EAAAvD,CAAAmD,GAAAK,KAAAH,KACVtD,0EAIN,OACIqC,EAAAX,EAAAY,cAAA,WACID,EAAAX,EAAAY,cAACoB,EAAA,EAAD,CAAWC,MAAM,2BAAOC,OAAO,IAC/BvB,EAAAX,EAAAY,cAACzC,EAAD,CAAQgC,QAASyB,KAAKtD,MAAM6B,QAAS1B,SAAUmD,KAAKtD,MAAM6D,SAASC,gBAT3DC,aAgBTX","file":"mrstatic/js/Orderinfo.5dac860b.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, NavBar, List, InputItem, Button, WhiteSpace, WingBlank, Toast } from 'antd-mobile';\nimport { Formik, Field, Form, withFormik } from 'formik';\nimport {HeaderBar} from '../../common';\nimport { http } from \"@/utils\";\n\nconst InnerForm = ({\n values,\n errors,\n touched,\n setFieldValue,\n handleBlur,\n handleSubmit,\n isSubmitting,\n}) => (\n <form>\n <InputItem\n clear\n name=\"real_name\"\n onChange={(value) => setFieldValue('real_name', value)}\n placeholder=\"请输入您的真实姓名\"\n value={values.real_name}\n >姓名</InputItem>\n <InputItem\n clear\n type='phone'\n name='cellphone'\n placeholder=\"请输入您的手机号码\"\n onChange={(value) => setFieldValue('cellphone', value)}\n value={values.cellphone}\n >电话</InputItem>\n <InputItem\n clear\n name='qq'\n placeholder=\"请输入您的QQ号码\"\n maxLength='15'\n onChange={(value) => setFieldValue('qq', value)}\n value={values.qq}\n >QQ</InputItem>\n\n <div style={{ marginTop: '21px' }}>\n <WingBlank>\n <Button type='primary' onClick={handleSubmit}>确认</Button>\n </WingBlank>\n </div>\n </form>\n );\n\nconst MyForm = withFormik({\n mapPropsToValues: props => ({ ...props.userInfo }),\n validate: (values, props) => {\n const errors = {};\n return errors;\n },\n handleSubmit: (\n values,\n FormBag\n ) => {\n const {real_name, cellphone, qq} = values;\n if (!real_name) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }else if ((`${real_name}`).replace(/\\s+/g, '').length === 0) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }\n if (!cellphone) {\n Toast.info('请输入手机号!', undefined, undefined, false);\n return;\n } else if (!/1\\d{10}/g.test((`${cellphone}`).replace(/\\s+/g, ''))) {\n Toast.info('请输入正确的手机号!', undefined, undefined, false);\n return;\n }\n if (!qq) {\n Toast.info('请输入QQ号!', undefined, undefined, false);\n return;\n } else if (!/\\d{5,}/g.test(qq)) {\n Toast.info('请输入正确QQ号!', undefined, undefined, false);\n return;\n }\n let same = 0;\n if(FormBag.props.userInfo) {\n const userInfo = FormBag.props.userInfo;\n if(userInfo.real_name === real_name) {\n same += 1;\n }\n if(userInfo.cellphone === cellphone) {\n same += 1;\n }\n if(userInfo.qq === qq) {\n same += 1;\n }\n }\n let pathName = '/order';\n if(FormBag.props.userInfo.id) {\n pathName = pathName + '?id=' + FormBag.props.userInfo.id;\n }\n // console.log(values);\n if(same === 3) {\n FormBag.props.history.replace(\n pathName,\n {\n ...values,\n }\n );\n return;\n }\n http.post(`${API['base-api']}/m/order/saveUserInfo`, {real_name: values.real_name, cellphone: (`${values.cellphone}`).replace(/\\s+/g, ''), qq: values.qq}).then(res=>{\n // console.log(res);\n if(res.data.errno !== 200) {\n Toast.info(res.data.msg, undefined, undefined, false);\n return;\n }\n Toast.info('保存成功!', undefined, undefined, false);\n FormBag.props.history.replace(\n pathName,\n {\n ...values,\n }\n );\n });\n },\n})(InnerForm);\n\nclass Orderinfo extends Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n <div>\n <HeaderBar title='报名信息' arrow={true}></HeaderBar>\n <MyForm history={this.props.history} userInfo={this.props.location.state}/>\n </div>\n )\n }\n\n};\n\nexport default Orderinfo;"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/order/orderinfo.js"],"names":["MyForm","withFormik","mapPropsToValues","props","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_7__","userInfo","validate","values","handleSubmit","FormBag","real_name","cellphone","qq","concat","replace","length","test","same","pathName","id","http","post","API","then","res","data","errno","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_6___default","a","info","undefined","history","msg","_ref","setFieldValue","errors","touched","handleBlur","isSubmitting","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","antd_mobile_lib_input_item__WEBPACK_IMPORTED_MODULE_13___default","clear","name","onChange","value","placeholder","type","maxLength","style","marginTop","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_9___default","antd_mobile_lib_button__WEBPACK_IMPORTED_MODULE_11___default","onClick","Orderinfo","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__","call","_common__WEBPACK_IMPORTED_MODULE_16__","title","arrow","location","state","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,KAAAF,GAAAnD,OAAAsD,EAAA,EAAAtD,CAAAqD,KAAArD,OAAAuD,EAAA,EAAAvD,CAAAmD,GAAAK,KAAAH,KACVtD,0EAIN,OACIqC,EAAAX,EAAAY,cAAA,WACID,EAAAX,EAAAY,cAACoB,EAAA,EAAD,CAAWC,MAAM,2BAAOC,OAAO,IAC/BvB,EAAAX,EAAAY,cAACzC,EAAD,CAAQgC,QAASyB,KAAKtD,MAAM6B,QAAS1B,SAAUmD,KAAKtD,MAAM6D,SAASC,gBAT3DC,aAgBTX","file":"mrstatic/js/Orderinfo.bbde0b54.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, NavBar, List, InputItem, Button, WhiteSpace, WingBlank, Toast } from 'antd-mobile';\nimport { Formik, Field, Form, withFormik } from 'formik';\nimport {HeaderBar} from '../../common';\nimport { http } from \"@/utils\";\n\nconst InnerForm = ({\n values,\n errors,\n touched,\n setFieldValue,\n handleBlur,\n handleSubmit,\n isSubmitting,\n}) => (\n <form>\n <InputItem\n clear\n name=\"real_name\"\n onChange={(value) => setFieldValue('real_name', value)}\n placeholder=\"请输入您的真实姓名\"\n value={values.real_name}\n >姓名</InputItem>\n <InputItem\n clear\n type='phone'\n name='cellphone'\n placeholder=\"请输入您的手机号码\"\n onChange={(value) => setFieldValue('cellphone', value)}\n value={values.cellphone}\n >电话</InputItem>\n <InputItem\n clear\n name='qq'\n placeholder=\"请输入您的QQ号码\"\n maxLength='15'\n onChange={(value) => setFieldValue('qq', value)}\n value={values.qq}\n >QQ</InputItem>\n\n <div style={{ marginTop: '21px' }}>\n <WingBlank>\n <Button type='primary' onClick={handleSubmit}>确认</Button>\n </WingBlank>\n </div>\n </form>\n );\n\nconst MyForm = withFormik({\n mapPropsToValues: props => ({ ...props.userInfo }),\n validate: (values, props) => {\n const errors = {};\n return errors;\n },\n handleSubmit: (\n values,\n FormBag\n ) => {\n const {real_name, cellphone, qq} = values;\n if (!real_name) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }else if ((`${real_name}`).replace(/\\s+/g, '').length === 0) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }\n if (!cellphone) {\n Toast.info('请输入手机号!', undefined, undefined, false);\n return;\n } else if (!/1\\d{10}/g.test((`${cellphone}`).replace(/\\s+/g, ''))) {\n Toast.info('请输入正确的手机号!', undefined, undefined, false);\n return;\n }\n if (!qq) {\n Toast.info('请输入QQ号!', undefined, undefined, false);\n return;\n } else if (!/\\d{5,}/g.test(qq)) {\n Toast.info('请输入正确QQ号!', undefined, undefined, false);\n return;\n }\n let same = 0;\n if(FormBag.props.userInfo) {\n const userInfo = FormBag.props.userInfo;\n if(userInfo.real_name === real_name) {\n same += 1;\n }\n if(userInfo.cellphone === cellphone) {\n same += 1;\n }\n if(userInfo.qq === qq) {\n same += 1;\n }\n }\n let pathName = '/order';\n if(FormBag.props.userInfo.id) {\n pathName = pathName + '?id=' + FormBag.props.userInfo.id;\n }\n // console.log(values);\n if(same === 3) {\n FormBag.props.history.replace(\n pathName,\n {\n ...values,\n }\n );\n return;\n }\n http.post(`${API['base-api']}/m/order/saveUserInfo`, {real_name: values.real_name, cellphone: (`${values.cellphone}`).replace(/\\s+/g, ''), qq: values.qq}).then(res=>{\n // console.log(res);\n if(res.data.errno !== 200) {\n Toast.info(res.data.msg, undefined, undefined, false);\n return;\n }\n Toast.info('保存成功!', undefined, undefined, false);\n FormBag.props.history.replace(\n pathName,\n {\n ...values,\n }\n );\n });\n },\n})(InnerForm);\n\nclass Orderinfo extends Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n <div>\n <HeaderBar title='报名信息' arrow={true}></HeaderBar>\n <MyForm history={this.props.history} userInfo={this.props.location.state}/>\n </div>\n )\n }\n\n};\n\nexport default Orderinfo;"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{1179:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return P});t(156);var n=t(74),i=t.n(n),c=(t(90),t(26)),o=t.n(c),r=(t(154),t(35)),s=t.n(r),l=(t(43),t(13)),d=t.n(l),p=t(5),u=t(7),m=t(6),y=t(8),f=t(89),g=t(9),h=(t(896),t(898)),b=t.n(h),v=(t(117),t(47)),w=t.n(v),E=t(0),S=t.n(E),x=t(3),_=t(27),k=t(15),j=(t(900),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(f.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(f.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(f.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(g.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(k.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(j,{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(j,{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)},900:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.8993c389.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{1179:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return P});t(156);var n=t(74),i=t.n(n),c=(t(90),t(26)),o=t.n(c),r=(t(154),t(35)),s=t.n(r),l=(t(43),t(13)),d=t.n(l),p=t(5),u=t(7),m=t(6),y=t(8),g=t(89),h=t(9),f=(t(896),t(898)),b=t.n(f),v=(t(117),t(47)),w=t.n(v),E=t(0),S=t.n(E),x=t(3),_=t(27),k=t(15),j=(t(900),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.e)()?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb").toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":x.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)(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)(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)(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(h.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.e)()&&(this.setState({payType:1}),this.isweixinPay())}},{key:"render",value:function(){var e=this,a=this.state,t=a.orderId,n=a.pay_amount,c=a.payType,r=a.checkPeriod,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(k.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(j,{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(j,{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)},900:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.33c0f4f6.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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_8__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_10__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_12__","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,aA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KAA1C,4BAGIjB,EACI0F,EAAAjI,EAAAkI,cAAA,OAAKC,UAAU,iBACXF,EAAAjI,EAAAkI,cAAA,OAAKC,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.8993c389.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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_8__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_10__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_12__","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,O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I2F,EAAAjI,EAAAkI,cAAA,QAAMW,MAAO,CACTwB,MAAO,UACPC,SAAU,SAFd,GAAA3I,OAGOgB,EAHP,gBAAAhB,OAGyBkB,EAHzB,WAIA,MAGZoF,EAAAjI,EAAAkI,cAAAQ,EAAA1I,EAAA,CAAM2I,QAAQ,SACVV,EAAAjI,EAAAkI,cAAA,QAAMW,MAAO,CAACwB,MAAO,UAAWC,SAAU,SAA1C,oFAGPR,EAAEtJ,UAKvByH,EAAAjI,EAAAkI,cAAA,OAAKC,UAAU,WAAf,gJAEAF,EAAAjI,EAAAkI,cAAA,OAAKC,UAAU,aAAaoC,QAASxJ,KAAKyC,KAA1C,4BAGIjB,EACI0F,EAAAjI,EAAAkI,cAAA,OAAKC,UAAU,iBACXF,EAAAjI,EAAAkI,cAAA,OAAKC,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.33c0f4f6.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([[10],{1152:function(e,t,a){},1182:function(e,t,a){"use strict";a.r(t);a(158);var n,o=a(91),i=a.n(o),s=(a(154),a(35)),r=a.n(s),c=(a(43),a(13)),l=a.n(c),u=a(5),f=a(7),p=a(6),h=a(8),d=a(9),m=a(0),v=a.n(m),g=a(27),b=(a(1152),a(707)),C=a(3),y=a(62),w=a(20),E=Object(w.b)(function(e){return{user:e.user}})(n=function(e){function t(e){var a;return Object(u.a)(this,t),(a=Object(p.a)(this,Object(h.a)(t).call(this,e))).specialSale=function(){C.d.get("".concat(API.home,"/m/home/weekDiscounts")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data,isLoading:!1}):l.a.info(e.data.msg,2)})},a.bargain=function(){C.d.get("".concat(API.home,"/m/home/bargainZone")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data}):l.a.info(e.data.msg,2)})},a.group=function(){C.d.get("".concat(API.home,"/m/home/grouponList")).then(function(e){200===e.data.code?a.setState({dataList:e.data.data}):l.a.info(e.data.msg,2)})},a.ontabclick=function(e,t){switch(a.state.courseStatus=t,t){case 0:a.specialSale();break;case 1:a.bargain();break;default:a.group()}},a.toCourseDetail=function(e){var t=a.props;t.dispatch;t.history.push("/detail?id=".concat(e))},a.state={dataList:[],courseStatus:0,isLoading:!0},a}return Object(d.a)(t,e),Object(f.a)(t,[{key:"componentDidMount",value:function(){this.specialSale()}},{key:"render",value:function(){var e=this,t=this.props.user,a=void 0===t?{}:t,n=!(!a.data||!a.data.uid);return v.a.createElement("div",{className:"preferential"},v.a.createElement(b.a,{isLogin:n}),v.a.createElement(y.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"class-content"},v.a.createElement(r.a,null),v.a.createElement(i.a,{tabs:[{title:"\u9650\u65f6\u7279\u60e0"},{title:"\u780d\u4ef7\u4e13\u533a"},{title:"\u4e00\u952e\u62fc\u56e2"}],animated:!1,onChange:function(t,a){return e.ontabclick(t,a)},swipeable:!1,renderTabBar:function(e){return v.a.createElement("div",{className:"custom-tab-bar"},v.a.createElement(i.a.DefaultTabBar,e))}},v.a.createElement("div",{className:"tabs"},v.a.createElement("ul",null,this.state.dataList.map(function(t,a){var n=v.a.createElement("div",{className:"info"},v.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),v.a.createElement("p",{className:"contact text-overflow-2"},t.course_desc),v.a.createElement("div",{className:"des"},!t.is_buy&&v.a.createElement("p",{className:"course-price"},0===e.state.courseStatus&&v.a.createElement("span",{className:"price"},"\u7279\u60e0\u4ef7\uff1a"),v.a.createElement("span",{className:"new"},"\xa5",t.price1),v.a.createElement("span",{className:"old"},"\xa5",t.price0)),t.is_buy&&v.a.createElement("a",{className:"isbuy"},"\u5df2\u8d2d\u4e70"))),o=!t.is_buy&&v.a.createElement("div",null,1===e.state.courseStatus&&v.a.createElement("p",{className:"course-status"},"\u780d\u4ef7\u51cf",t.bargain_price,"\u5143"),2===e.state.courseStatus&&v.a.createElement("p",{className:"course-status"},"\u62fc\u56e2\u4ef7",t.price,"\u5143"),t.is_aist&&v.a.createElement("span",{className:"return_cash"}));return v.a.createElement(g.j,{key:a,img:t.image_name,id:t.course_id,status:o,info:n,toDetail:e.toCourseDetail})})))),v.a.createElement(r.a,null))))}}]),t}(m.Component))||n;t.default=E},582:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce(function(t,a){return"aria-"!==a.substr(0,5)&&"data-"!==a.substr(0,5)&&"role"!==a||(t[a]=e[a]),t},{})},e.exports=t.default},587:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=a(4),i=(n=o)&&n.__esModule?n:{default:n};t.getComponentLocale=function(e,t,a,n){var o={};if(t&&t.antLocale&&t.antLocale[a])o=t.antLocale[a];else{var s=n();o=s.default||s}var r=(0,i.default)({},o);e.locale&&(r=(0,i.default)({},r,e.locale),e.locale.lang&&(r.lang=(0,i.default)({},o.lang,e.locale.lang)));return r},t.getLocaleCode=function(e){var t=e.antLocale&&e.antLocale.locale;if(e.antLocale&&e.antLocale.exist&&!t)return"zh-cn";return t}},605:function(e,t,a){"use strict";a(50),a(606)},606:function(e,t,a){},607:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=g(a(4)),o=g(a(34)),i=g(a(10)),s=g(a(12)),r=g(a(11)),c=g(a(14)),l=g(a(16)),u=v(a(0)),f=v(a(2)),p=g(a(153)),h=g(a(582)),d=a(587),m=a(608);function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}var b=function(e){function t(e){(0,i.default)(this,t);var a=(0,r.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));a.onSubmit=function(e){e.preventDefault(),a.props.onSubmit&&a.props.onSubmit(a.state.value||""),a.inputRef&&a.inputRef.blur()},a.onChange=function(e){a.state.focus||a.setState({focus:!0});var t=e.target.value;"value"in a.props||a.setState({value:t}),a.props.onChange&&a.props.onChange(t)},a.onFocus=function(){a.setState({focus:!0}),a.firstFocus=!0,a.props.onFocus&&a.props.onFocus()},a.onBlur=function(){var e;a.onBlurTimeout=(e=function(){a.blurFromOnClear||document.activeElement!==a.inputRef&&a.setState({focus:!1}),a.blurFromOnClear=!1},window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1)),a.props.onBlur&&(setTimeout(function(){document.body&&(document.body.scrollTop=document.body.scrollTop)},100),a.props.onBlur())},a.onClear=function(){a.doClear()},a.doClear=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];a.blurFromOnClear=e,"value"in a.props||a.setState({value:""}),a.props.onClear&&a.props.onClear(""),a.props.onChange&&a.props.onChange(""),e&&a.focus()},a.onCancel=function(){a.props.onCancel?a.props.onCancel(a.state.value||""):a.doClear(!1)},a.focus=function(){a.inputRef&&a.inputRef.focus()};var n=void 0;return n="value"in e?e.value||"":"defaultValue"in e?e.defaultValue:"",a.state={value:n,focus:!1},a}return(0,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,i=this.props,s=i.prefixCls,r=i.showCancelButton,c=i.disabled,f=i.placeholder,m=i.className,v=i.style,g=i.maxLength,b=(0,d.getComponentLocale)(this.props,this.context,"SearchBar",function(){return a(609)}).cancelText,C=this.state,y=C.value,w=C.focus,E=(0,l.default)(s,m,(0,o.default)({},s+"-start",!!(w||y&&y.length>0))),N=(0,l.default)(s+"-clear",(0,o.default)({},s+"-clear-show",!!(w&&y&&y.length>0))),_=(0,l.default)(s+"-cancel",(e={},(0,o.default)(e,s+"-cancel-show",!!(r||w||y&&y.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:f&&!y?"visible":"hidden"}},f))),u.createElement("input",(0,n.default)({type:"search",className:s+"-value",value:y,disabled:c,placeholder:f,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return t.inputRef=e},maxLength:g},(0,h.default)(this.props))),u.createElement(p.default,{activeClassName:s+"-clear-active"},u.createElement("a",{onClick:this.onClear,className:N}))),u.createElement("div",{className:_,onClick:this.onCancel,ref:function(e){return t.rightBtnRef=e}},this.props.cancelText||b))}}]),t}(u.Component);t.default=b,b.defaultProps=m.defaultProps,b.contextTypes={antLocale:f.object},e.exports=t.default},608:function(e,t,a){"use strict";function n(){}Object.defineProperty(t,"__esModule",{value:!0});t.defaultProps={prefixCls:"am-search",placeholder:"",onSubmit:n,onChange:n,onFocus:n,onBlur:n,onClear:n,showCancelButton:!1,disabled:!1}},609:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},707:function(e,t,a){"use strict";a(605);var n=a(607),o=a.n(n),i=a(5),s=a(7),r=a(6),c=a(8),l=a(9),u=a(0),f=a.n(u),p=(a(708),function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return(a=Object(r.a)(this,(e=Object(c.a)(t)).call.apply(e,[this].concat(o)))).goShop=function(){var e=a.props.isLogin,t=void 0!==e&&e?"/shopcart":"/passport";window.location.replace(t)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"toSearch",value:function(){window.location.href="/search"}},{key:"return",value:function(){window.location.href="/"}},{key:"render",value:function(){return f.a.createElement("div",{className:"preferential"},f.a.createElement("div",{className:"search-nav"},!this.props.toHref&&f.a.createElement("i",{className:"iconfont iconiconfront-68 return",onClick:this.return.bind(this)}),this.props.toHref&&f.a.createElement("i",{className:"iconfont iconiconfront-68 return",onClick:this.props.toHref}),f.a.createElement(o.a,{placeholder:"\u641c\u7d22\u8bfe\u7a0b",cancelText:" ",onFocus:this.toSearch.bind(this),showCancelButton:!1}),f.a.createElement("i",{className:"iconfont icongouwuche-xianxing shopping-cart",onClick:this.goShop})))}}]),t}(u.Component));t.a=p},708:function(e,t,a){}}]);
//# sourceMappingURL=Preferential.9f4e6030.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=Preferential.fd7820b1.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/preferential/index.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","common/HeaderSearch/index.js"],"names":["Preferential","connect","_ref","user","props","_this","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_9__","call","specialSale","http","get","concat","API","home","then","res","data","code","setState","dataList","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_5___default","a","info","msg","bargain","group","ontabclick","tab","index","state","courseStatus","toCourseDetail","id","_this$props","dispatch","history","push","_this2","_this$props$user","isLogin","uid","react__WEBPACK_IMPORTED_MODULE_11___default","createElement","className","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_14__","_common_Loading__WEBPACK_IMPORTED_MODULE_16__","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_3___default","antd_mobile_lib_tabs__WEBPACK_IMPORTED_MODULE_1___default","tabs","title","animated","onChange","swipeable","renderTabBar","DefaultTabBar","map","item","Info","onClick","course_id","course_title","course_desc","is_buy","price1","price0","status","bargain_price","price","is_aist","_common__WEBPACK_IMPORTED_MODULE_12__","key","img","image_name","toDetail","Component","defineProperty","exports","value","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","e","preventDefault","inputRef","blur","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","document","activeElement","window","requestAnimationFrame","setTimeout","body","scrollTop","onClear","doClear","arguments","length","undefined","onCancel","defaultValue","rightBtnRef","initBtn","getComputedStyle","rightBtnInitMarginleft","marginLeft","componentDidUpdate","syntheticPhRef","inputContainerRef","indexOf","prefixCls","syntheticPhContainerRef","realWidth","getBoundingClientRect","width","style","Math","ceil","showCancelButton","marginRight","offsetWidth","parseInt","nextProps","nextFrameId","cancelAnimationFrame","clearTimeout","_classnames3","_props","disabled","placeholder","maxLength","cancelText","_state","wrapCls","clearCls","cancelCls","ref","el","action","visibility","type","activeClassName","defaultProps","contextTypes","object","noop","HeaderBar","goShop","_this$props$isLogin","url","location","replace","href","react__WEBPACK_IMPORTED_MODULE_7___default","toHref","return","bind","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","toSearch"],"mappings":"gTAYMA,EAHLC,YAAQ,SAAAC,GAAA,MAAa,CAClBC,KADKD,EAAEC,sBAIP,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,KAaVQ,YAAc,WACVC,IAAKC,IAAL,GAAAC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CfA/K,OAAA0E,eAAAC,EAAA,cACAC,OAAA,IAEAD,EAAA,SACAuG,WAAA,gBAEAjG,EAAAN,UAAA,0HCJMsH,qNASFC,OAAS,WAAM,IAAAC,EACiBpM,EAAKD,MAAzBwC,QACJ8J,OAFO,IAAAD,KAEQ,YAAc,YACjC3D,OAAO6D,SAASC,QAAQF,8EAVxB5D,OAAO6D,SAASE,KAAO,2CAIvB/D,OAAO6D,SAASE,KAAO,qCAUvB,OACIC,EAAApL,EAAAqB,cAAA,OAAKC,UAAU,gBACX8J,EAAApL,EAAAqB,cAAA,OAAKC,UAAU,eAENxC,KAAKJ,MAAM2M,QACZD,EAAApL,EAAAqB,cAAA,KACIC,UAAW,mCACXe,QAASvD,KAAKwM,OAAOC,KAAKzM,QAI9BA,KAAKJ,MAAM2M,QACXD,EAAApL,EAAAqB,cAAA,KACIC,UAAW,mCACXe,QAASvD,KAAKJ,MAAM2M,SAG5BD,EAAApL,EAAAqB,cAAAmK,EAAAxL,EAAA,CACI4J,YAAY,2BACZE,WAAY,IACZlD,QAAS9H,KAAK2M,SAASF,KAAKzM,MAC5BmK,kBAAkB,IAEtBmC,EAAApL,EAAAqB,cAAA,KACIC,UAAW,+CACXe,QAASvD,KAAKgM,kBAzCdzH,cAkDTwH","file":"mrstatic/js/Preferential.9f4e6030.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport {VList} from '../../common'\nimport {Tabs, WhiteSpace, Toast} from 'antd-mobile'\nimport './index.scss'\nimport HeaderSearch from '../../common/HeaderSearch/index'\nimport {http} from \"@/utils\"\nimport Loading from '@/common/Loading'\nimport {connect} from 'react-redux';\n\n@connect(({user}) => ({\n user\n}))\nclass Preferential extends Component {\n constructor(props) {\n super(props)\n this.state = {\n dataList: [],\n courseStatus: 0,\n isLoading: true\n }\n }\n\n componentDidMount() {\n this.specialSale()\n }\n\n // 限时特惠\n specialSale = () => {\n http.get(`${API.home}/m/home/weekDiscounts`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data,\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n // 砍价专区\n bargain = () => {\n http.get(`${API.home}/m/home/bargainZone`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // 一键拼团\n group = () => {\n http.get(`${API.home}/m/home/grouponList`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // tab 切换\n ontabclick = (tab, index) => {\n this.state.courseStatus = index\n switch (index) {\n case 0:\n this.specialSale()\n break\n case 1:\n this.bargain()\n break\n default:\n this.group()\n }\n }\n\n toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n // dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\n // }));\n }\n\n render() {\n const tabs = [\n {title: '限时特惠'},\n {title: '砍价专区'},\n {title: '一键拼团'}\n ]\n const { user ={} } = this.props;\n let isLogin = user.data && user.data.uid? true : false;\n return (\n <div className='preferential'>\n <HeaderSearch isLogin={isLogin} />\n <Loading isLoading={this.state.isLoading}>\n <div className='class-content'>\n <WhiteSpace/>\n\n <Tabs\n tabs={tabs}\n animated={false}\n onChange={(tab, index) => this.ontabclick(tab, index)}\n swipeable={false}\n renderTabBar={props => <div className={'custom-tab-bar'}>\n <Tabs.DefaultTabBar {...props}/>\n </div>}\n >\n <div className='tabs'>\n <ul>\n {this.state.dataList.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title' onClick={() => this.toCourseDetail(item.course_id)}>\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\n {item.course_title}\n {/* </Link> */}\n </p>\n <p className='contact text-overflow-2'>{item.course_desc}</p>\n <div className='des'>\n {!item.is_buy &&\n <p className=\"course-price\">\n {this.state.courseStatus === 0 &&\n <span className='price'>特惠价:</span>\n }\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n }\n {item.is_buy &&\n <a className=\"isbuy\">已购买</a>\n }\n </div>\n </div>\n )\n const status = (\n !item.is_buy &&\n <div>\n {this.state.courseStatus === 1 &&\n <p className='course-status'>砍价减{item.bargain_price}元</p>\n }\n {this.state.courseStatus === 2 &&\n <p className='course-status'>拼团价{item.price}元</p>\n }\n {\n item.is_aist && <span className='return_cash'></span>\n }\n </div>\n )\n return (\n <VList\n key={index}\n img={item.image_name}\n id={item.course_id}\n status={status}\n info={Info}\n toDetail={this.toCourseDetail}\n />\n )\n })}\n </ul>\n\n </div>\n </Tabs>\n <WhiteSpace/>\n </div>\n </Loading>\n </div>\n )\n }\n\n}\n\nexport default Preferential;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, {Component} from 'react'\nimport {SearchBar} from 'antd-mobile'\nimport './index.scss'\n\nclass HeaderBar extends Component {\n toSearch() {\n window.location.href = '/search';\n }\n\n return() {\n window.location.href = '/';\n }\n\n goShop = () => {\n const { isLogin = false } = this.props;\n let url = isLogin? '/shopcart' : '/passport';\n window.location.replace(url);\n }\n\n render() {\n return (\n <div className='preferential'>\n <div className=\"search-nav\">\n {\n !this.props.toHref &&\n <i \n className={'iconfont iconiconfront-68 return'} \n onClick={this.return.bind(this)}\n />\n }\n {\n this.props.toHref &&\n <i \n className={'iconfont iconiconfront-68 return'} \n onClick={this.props.toHref}\n />\n }\n <SearchBar\n placeholder=\"搜索课程\"\n cancelText={\" \"}\n onFocus={this.toSearch.bind(this)}\n showCancelButton={false}\n />\n <i \n className={'iconfont icongouwuche-xianxing shopping-cart'} \n onClick={this.goShop}\n />\n </div>\n </div>\n )\n }\n\n}\n\nexport default HeaderBar;\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/preferential/index.js","../node_modules/antd-mobile/lib/_util/getDataAttr.js","../node_modules/antd-mobile/lib/_util/getLocale.js","../node_modules/antd-mobile/lib/search-bar/style/css.js","../node_modules/antd-mobile/lib/search-bar/index.js","../node_modules/antd-mobile/lib/search-bar/PropsType.js","../node_modules/antd-mobile/lib/search-bar/locale/zh_CN.js","common/HeaderSearch/index.js"],"names":["Preferential","connect","_ref","user","props","_this","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_9__","call","specialSale","http","get","concat","API","home","then","res","data","code","setState","dataList","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_5___default","a","info","msg","bargain","group","ontabclick","tab","index","state","courseStatus","toCourseDetail","id","_this$props","dispatch","history","push","_this2","_this$props$user","isLogin","uid","react__WEBPACK_IMPORTED_MODULE_11___default","createElement","className","_common_HeaderSearch_index__WEBPACK_IMPORTED_MODULE_14__","_common_Loading__WEBPACK_IMPORTED_MODULE_16__","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_3___default","antd_mobile_lib_tabs__WEBPACK_IMPORTED_MODULE_1___default","tabs","title","animated","onChange","swipeable","renderTabBar","DefaultTabBar","map","item","Info","onClick","course_id","course_title","course_desc","is_buy","price1","price0","status","bargain_price","price","is_aist","_common__WEBPACK_IMPORTED_MODULE_12__","key","img","image_name","toDetail","Component","defineProperty","exports","value","keys","reduce","prev","substr","module","obj","_extends2","__webpack_require__","_extends3","__esModule","default","getComponentLocale","context","componentName","getDefaultLocale","locale","antLocale","defaultLocale","result","lang","getLocaleCode","localeCode","exist","_interopRequireDefault","_defineProperty3","_classCallCheck3","_createClass3","_possibleConstructorReturn3","_inherits3","_classnames5","React","_interopRequireWildcard","PropTypes","_rmcFeedback2","_getDataAttr2","_getLocale","_PropsType","newObj","prototype","hasOwnProperty","SearchBar","_React$Component","__proto__","getPrototypeOf","onSubmit","e","preventDefault","inputRef","blur","focus","target","onFocus","firstFocus","onBlur","cb","onBlurTimeout","blurFromOnClear","document","activeElement","window","requestAnimationFrame","setTimeout","body","scrollTop","onClear","doClear","arguments","length","undefined","onCancel","defaultValue","rightBtnRef","initBtn","getComputedStyle","rightBtnInitMarginleft","marginLeft","componentDidUpdate","syntheticPhRef","inputContainerRef","indexOf","prefixCls","syntheticPhContainerRef","realWidth","getBoundingClientRect","width","style","Math","ceil","showCancelButton","marginRight","offsetWidth","parseInt","nextProps","nextFrameId","cancelAnimationFrame","clearTimeout","_classnames3","_props","disabled","placeholder","maxLength","cancelText","_state","wrapCls","clearCls","cancelCls","ref","el","action","visibility","type","activeClassName","defaultProps","contextTypes","object","noop","HeaderBar","goShop","_this$props$isLogin","url","location","replace","href","react__WEBPACK_IMPORTED_MODULE_7___default","toHref","return","bind","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","toSearch"],"mappings":"gTAYMA,EAHLC,YAAQ,SAAAC,GA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UAAAgB,EAAAkF,QAEA9G,EAAAN,UAAA,0CC5WA,SAAAqH,KAJAhM,OAAA0E,eAAAC,EAAA,cACAC,OAAA,IAKAD,EAAAkH,aAAA,CACAhC,UAAA,YACAmB,YAAA,GACAvD,SAAAuE,EACA9I,SAAA8I,EACAhE,QAAAgE,EACA9D,OAAA8D,EACAnD,QAAAmD,EACA3B,kBAAA,EACAU,UAAA,qCCfA/K,OAAA0E,eAAAC,EAAA,cACAC,OAAA,IAEAD,EAAA,SACAuG,WAAA,gBAEAjG,EAAAN,UAAA,0HCJMsH,qNASFC,OAAS,WAAM,IAAAC,EACiBpM,EAAKD,MAAzBwC,QACJ8J,OAFO,IAAAD,KAEQ,YAAc,YACjC3D,OAAO6D,SAASC,QAAQF,8EAVxB5D,OAAO6D,SAASE,KAAO,2CAIvB/D,OAAO6D,SAASE,KAAO,qCAUvB,OACIC,EAAApL,EAAAqB,cAAA,OAAKC,UAAU,gBACX8J,EAAApL,EAAAqB,cAAA,OAAKC,UAAU,eAENxC,KAAKJ,MAAM2M,QACZD,EAAApL,EAAAqB,cAAA,KACIC,UAAW,mCACXe,QAASvD,KAAKwM,OAAOC,KAAKzM,QAI9BA,KAAKJ,MAAM2M,QACXD,EAAApL,EAAAqB,cAAA,KACIC,UAAW,mCACXe,QAASvD,KAAKJ,MAAM2M,SAG5BD,EAAApL,EAAAqB,cAAAmK,EAAAxL,EAAA,CACI4J,YAAY,2BACZE,WAAY,IACZlD,QAAS9H,KAAK2M,SAASF,KAAKzM,MAC5BmK,kBAAkB,IAEtBmC,EAAApL,EAAAqB,cAAA,KACIC,UAAW,+CACXe,QAASvD,KAAKgM,kBAzCdzH,cAkDTwH","file":"mrstatic/js/Preferential.fd7820b1.chunk.js","sourcesContent":["import React, {Component} from 'react'\nimport {VList} from '../../common'\nimport {Tabs, WhiteSpace, Toast} from 'antd-mobile'\nimport './index.scss'\nimport HeaderSearch from '../../common/HeaderSearch/index'\nimport {http} from \"@/utils\"\nimport Loading from '@/common/Loading'\nimport {connect} from 'react-redux';\n\n@connect(({user}) => ({\n user\n}))\nclass Preferential extends Component {\n constructor(props) {\n super(props)\n this.state = {\n dataList: [],\n courseStatus: 0,\n isLoading: true\n }\n }\n\n componentDidMount() {\n this.specialSale()\n }\n\n // 限时特惠\n specialSale = () => {\n http.get(`${API.home}/m/home/weekDiscounts`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data,\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n // 砍价专区\n bargain = () => {\n http.get(`${API.home}/m/home/bargainZone`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // 一键拼团\n group = () => {\n http.get(`${API.home}/m/home/grouponList`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n dataList: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n // tab 切换\n ontabclick = (tab, index) => {\n this.state.courseStatus = index\n switch (index) {\n case 0:\n this.specialSale()\n break\n case 1:\n this.bargain()\n break\n default:\n this.group()\n }\n }\n\n toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n // dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\n // }));\n }\n\n render() {\n const tabs = [\n {title: '限时特惠'},\n {title: '砍价专区'},\n {title: '一键拼团'}\n ]\n const { user ={} } = this.props;\n let isLogin = user.data && user.data.uid? true : false;\n return (\n <div className='preferential'>\n <HeaderSearch isLogin={isLogin} />\n <Loading isLoading={this.state.isLoading}>\n <div className='class-content'>\n <WhiteSpace/>\n\n <Tabs\n tabs={tabs}\n animated={false}\n onChange={(tab, index) => this.ontabclick(tab, index)}\n swipeable={false}\n renderTabBar={props => <div className={'custom-tab-bar'}>\n <Tabs.DefaultTabBar {...props}/>\n </div>}\n >\n <div className='tabs'>\n <ul>\n {this.state.dataList.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title' onClick={() => this.toCourseDetail(item.course_id)}>\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\n {item.course_title}\n {/* </Link> */}\n </p>\n <p className='contact text-overflow-2'>{item.course_desc}</p>\n <div className='des'>\n {!item.is_buy &&\n <p className=\"course-price\">\n {this.state.courseStatus === 0 &&\n <span className='price'>特惠价:</span>\n }\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n }\n {item.is_buy &&\n <a className=\"isbuy\">已购买</a>\n }\n </div>\n </div>\n )\n const status = (\n !item.is_buy &&\n <div>\n {this.state.courseStatus === 1 &&\n <p className='course-status'>砍价减{item.bargain_price}元</p>\n }\n {this.state.courseStatus === 2 &&\n <p className='course-status'>拼团价{item.price}元</p>\n }\n {\n item.is_aist && <span className='return_cash'></span>\n }\n </div>\n )\n return (\n <VList\n key={index}\n img={item.image_name}\n id={item.course_id}\n status={status}\n info={Info}\n toDetail={this.toCourseDetail}\n />\n )\n })}\n </ul>\n\n </div>\n </Tabs>\n <WhiteSpace/>\n </div>\n </Loading>\n </div>\n )\n }\n\n}\n\nexport default Preferential;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports['default'] = function (props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n};\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getComponentLocale = getComponentLocale;\nexports.getLocaleCode = getLocaleCode;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction getComponentLocale(props, context, componentName, getDefaultLocale) {\n var locale = {};\n\n if (context && context.antLocale && context.antLocale[componentName]) {\n locale = context.antLocale[componentName];\n } else {\n var defaultLocale = getDefaultLocale(); // TODO: make default lang of antd be English\n // https://github.com/ant-design/ant-design/issues/6334\n\n locale = defaultLocale['default'] || defaultLocale;\n }\n\n var result = (0, _extends3['default'])({}, locale);\n\n if (props.locale) {\n result = (0, _extends3['default'])({}, result, props.locale);\n\n if (props.locale.lang) {\n result.lang = (0, _extends3['default'])({}, locale.lang, props.locale.lang);\n }\n }\n\n return result;\n}\n\nfunction getLocaleCode(context) {\n var localeCode = context.antLocale && context.antLocale.locale; // Had use LocaleProvide but didn't set locale\n\n if (context.antLocale && context.antLocale.exist && !localeCode) {\n return 'zh-cn';\n }\n\n return localeCode;\n}","'use strict';\n\nrequire('../../style/css');\n\nrequire('./index.css');","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _classnames4 = require('classnames');\n\nvar _classnames5 = _interopRequireDefault(_classnames4);\n\nvar _react = require('react');\n\nvar React = _interopRequireWildcard(_react);\n\nvar _propTypes = require('prop-types');\n\nvar PropTypes = _interopRequireWildcard(_propTypes);\n\nvar _rmcFeedback = require('rmc-feedback');\n\nvar _rmcFeedback2 = _interopRequireDefault(_rmcFeedback);\n\nvar _getDataAttr = require('../_util/getDataAttr');\n\nvar _getDataAttr2 = _interopRequireDefault(_getDataAttr);\n\nvar _getLocale = require('../_util/getLocale');\n\nvar _PropsType = require('./PropsType');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj['default'] = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\nvar SearchBar = function (_React$Component) {\n (0, _inherits3['default'])(SearchBar, _React$Component);\n\n function SearchBar(props) {\n (0, _classCallCheck3['default'])(this, SearchBar);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));\n\n _this.onSubmit = function (e) {\n e.preventDefault();\n\n if (_this.props.onSubmit) {\n _this.props.onSubmit(_this.state.value || '');\n }\n\n if (_this.inputRef) {\n _this.inputRef.blur();\n }\n };\n\n _this.onChange = function (e) {\n if (!_this.state.focus) {\n _this.setState({\n focus: true\n });\n }\n\n var value = e.target.value;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(value);\n }\n };\n\n _this.onFocus = function () {\n _this.setState({\n focus: true\n });\n\n _this.firstFocus = true;\n\n if (_this.props.onFocus) {\n _this.props.onFocus();\n }\n };\n\n _this.onBlur = function () {\n _this.onBlurTimeout = onNextFrame(function () {\n if (!_this.blurFromOnClear) {\n if (document.activeElement !== _this.inputRef) {\n _this.setState({\n focus: false\n });\n }\n }\n\n _this.blurFromOnClear = false;\n });\n\n if (_this.props.onBlur) {\n // fix autoFocus item blur with flash\n setTimeout(function () {\n // fix ios12 wechat browser click failure after input\n if (document.body) {\n document.body.scrollTop = document.body.scrollTop;\n }\n }, 100);\n\n _this.props.onBlur();\n }\n };\n\n _this.onClear = function () {\n _this.doClear();\n };\n\n _this.doClear = function () {\n var blurFromOnClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n _this.blurFromOnClear = blurFromOnClear;\n\n if (!('value' in _this.props)) {\n _this.setState({\n value: ''\n });\n }\n\n if (_this.props.onClear) {\n _this.props.onClear('');\n }\n\n if (_this.props.onChange) {\n _this.props.onChange('');\n }\n\n if (blurFromOnClear) {\n _this.focus();\n }\n };\n\n _this.onCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel(_this.state.value || '');\n } else {\n _this.doClear(false);\n }\n };\n\n _this.focus = function () {\n if (_this.inputRef) {\n _this.inputRef.focus();\n }\n };\n\n var value = void 0;\n\n if ('value' in props) {\n value = props.value || '';\n } else if ('defaultValue' in props) {\n value = props.defaultValue;\n } else {\n value = '';\n }\n\n _this.state = {\n value: value,\n focus: false\n };\n return _this;\n }\n\n (0, _createClass3['default'])(SearchBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.rightBtnRef) {\n var initBtn = window.getComputedStyle(this.rightBtnRef);\n this.rightBtnInitMarginleft = initBtn.marginLeft;\n }\n\n this.componentDidUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.syntheticPhRef) {\n if (this.inputContainerRef && this.inputContainerRef.className.indexOf(this.props.prefixCls + '-start') > -1) {\n // 检测是否包含名为 ${this.props.prefixCls}-start 样式,生成动画\n // offsetWidth 某些时候是向上取整,某些时候是向下取整,不能用\n if (this.syntheticPhContainerRef) {\n var realWidth = this.syntheticPhContainerRef.getBoundingClientRect().width; // 包含小数\n\n this.syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';\n }\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '0';\n }\n } else {\n this.syntheticPhRef.style.width = '100%';\n\n if (!this.props.showCancelButton && this.rightBtnRef) {\n this.rightBtnRef.style.marginRight = '-' + (this.rightBtnRef.offsetWidth + (this.rightBtnInitMarginleft != null ? parseInt(this.rightBtnInitMarginleft, 10) : 0)) + 'px';\n }\n }\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('value' in nextProps && nextProps.value !== this.state.value) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onBlurTimeout) {\n clearNextFrameAction(this.onBlurTimeout);\n this.onBlurTimeout = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _classnames3,\n _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n showCancelButton = _props.showCancelButton,\n disabled = _props.disabled,\n placeholder = _props.placeholder,\n className = _props.className,\n style = _props.style,\n maxLength = _props.maxLength; // tslint:disable-next-line:variable-name\n\n var _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'SearchBar', function () {\n return require('./locale/zh_CN');\n });\n\n var cancelText = _locale.cancelText;\n var _state = this.state,\n value = _state.value,\n focus = _state.focus;\n var wrapCls = (0, _classnames5['default'])(prefixCls, className, (0, _defineProperty3['default'])({}, prefixCls + '-start', !!(focus || value && value.length > 0)));\n var clearCls = (0, _classnames5['default'])(prefixCls + '-clear', (0, _defineProperty3['default'])({}, prefixCls + '-clear-show', !!(focus && value && value.length > 0)));\n var cancelCls = (0, _classnames5['default'])(prefixCls + '-cancel', (_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-show', !!(showCancelButton || focus || value && value.length > 0)), (0, _defineProperty3['default'])(_classnames3, prefixCls + '-cancel-anim', this.firstFocus), _classnames3));\n return React.createElement('form', {\n onSubmit: this.onSubmit,\n className: wrapCls,\n style: style,\n ref: function ref(el) {\n return _this2.inputContainerRef = el;\n },\n action: '#'\n }, React.createElement('div', {\n className: prefixCls + '-input'\n }, React.createElement('div', {\n className: prefixCls + '-synthetic-ph',\n ref: function ref(el) {\n return _this2.syntheticPhRef = el;\n }\n }, React.createElement('span', {\n className: prefixCls + '-synthetic-ph-container',\n ref: function ref(el) {\n return _this2.syntheticPhContainerRef = el;\n }\n }, React.createElement('i', {\n className: prefixCls + '-synthetic-ph-icon'\n }), React.createElement('span', {\n className: prefixCls + '-synthetic-ph-placeholder' // tslint:disable-next-line:jsx-no-multiline-js\n ,\n style: {\n visibility: placeholder && !value ? 'visible' : 'hidden'\n }\n }, placeholder))), React.createElement('input', (0, _extends3['default'])({\n type: 'search',\n className: prefixCls + '-value',\n value: value,\n disabled: disabled,\n placeholder: placeholder,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: function ref(el) {\n return _this2.inputRef = el;\n },\n maxLength: maxLength\n }, (0, _getDataAttr2['default'])(this.props))), React.createElement(_rmcFeedback2['default'], {\n activeClassName: prefixCls + '-clear-active'\n }, React.createElement('a', {\n onClick: this.onClear,\n className: clearCls\n }))), React.createElement('div', {\n className: cancelCls,\n onClick: this.onCancel,\n ref: function ref(el) {\n return _this2.rightBtnRef = el;\n }\n }, this.props.cancelText || cancelText));\n }\n }]);\n return SearchBar;\n}(React.Component);\n\nexports['default'] = SearchBar;\nSearchBar.defaultProps = _PropsType.defaultProps;\nSearchBar.contextTypes = {\n antLocale: PropTypes.object\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction noop() {}\n\nvar defaultProps = exports.defaultProps = {\n prefixCls: 'am-search',\n placeholder: '',\n onSubmit: noop,\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onClear: noop,\n showCancelButton: false,\n disabled: false\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = {\n cancelText: '取消'\n};\nmodule.exports = exports['default'];","import React, {Component} from 'react'\nimport {SearchBar} from 'antd-mobile'\nimport './index.scss'\n\nclass HeaderBar extends Component {\n toSearch() {\n window.location.href = '/search';\n }\n\n return() {\n window.location.href = '/';\n }\n\n goShop = () => {\n const { isLogin = false } = this.props;\n let url = isLogin? '/shopcart' : '/passport';\n window.location.replace(url);\n }\n\n render() {\n return (\n <div className='preferential'>\n <div className=\"search-nav\">\n {\n !this.props.toHref &&\n <i \n className={'iconfont iconiconfront-68 return'} \n onClick={this.return.bind(this)}\n />\n }\n {\n this.props.toHref &&\n <i \n className={'iconfont iconiconfront-68 return'} \n onClick={this.props.toHref}\n />\n }\n <SearchBar\n placeholder=\"搜索课程\"\n cancelText={\" \"}\n onFocus={this.toSearch.bind(this)}\n showCancelButton={false}\n />\n <i \n className={'iconfont icongouwuche-xianxing shopping-cart'} \n onClick={this.goShop}\n />\n </div>\n </div>\n )\n }\n\n}\n\nexport default HeaderBar;\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{1138:function(e,t,a){},1139:function(e,t,a){},1199:function(e,t,a){"use strict";a.r(t);var n,r=a(5),s=a(7),c=a(6),o=a(8),i=a(9),l=a(0),u=a.n(l),h=a(704),p=a(162),d=a(3),m=(a(1138),a(43),a(13)),f=a.n(m),v=a(20),g=(a(1139),a(27)),w=a(49),y=(a(73),Object(v.b)()(n=function(e){function t(){var e,a;Object(r.a)(this,t);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(a=Object(c.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(1140),S=a.n(E),N=u.a.forwardRef(function(e,t){return u.a.createElement(h.a,Object.assign({},e,{forwardedRef:t}))}),C=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))},O=function(e){function t(){var e,a;Object(r.a)(this,t);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(a=Object(c.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(C,{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=O},704:function(e,t,a){"use strict";a(605);var n=a(607),r=a.n(n),s=a(5),c=a(7),o=a(6),i=a(8),l=a(9),u=a(0),h=a.n(u),p=a(49),d=a(16),m=a.n(d),f=(a(705),function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,r=new Array(n),c=0;c<n;c++)r[c]=arguments[c];return(a=Object(o.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(r)))).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,r=e.value,s=n.some(function(e){return e===r})?n:n.concat([r]);localStorage.setItem("searchHistory",JSON.stringify(s))},a.changeFontColor=function(e){a.setState({isFocus:e})},a}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){this.refs.search.focus()}},{key:"render",value:function(){var e=this,t=this.state.isFocus,a=m()("submit-btn",{"submit-btn--active":t});return h.a.createElement("div",{className:"search-head",style:this.props.style,ref:this.props.forwardedRef},h.a.createElement("div",{className:"left",onClick:this.returnPage},h.a.createElement("i",{className:"iconfont iconiconfront-68"})),h.a.createElement("div",{className:"center"},h.a.createElement(r.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})),h.a.createElement("div",{className:"right right-btn",onClick:this.search},h.a.createElement("div",{className:a},"\u641c\u7d22")))}}]),t}(u.PureComponent));t.a=Object(p.g)(f)},705:function(e,t,a){}}]);
//# sourceMappingURL=SearchResult.6bd7cca1.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=SearchResult.23abbb99.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","some","setItem","stringify","changeFontColor","refs","focus","cls","classnames","submit-btn--active","react__WEBPACK_IMPORTED_MODULE_7___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,QA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kG,KAAKP,OAAOQ,yCAqBZ,IAAApG,EAAAC,KACGwF,EAAYxF,KAAKZ,MAAjBoG,QACFY,EAAMC,IAAW,aAAc,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,yBAzDKd,kBAiEV1D,gBAAW2D","file":"mrstatic/js/SearchResult.6bd7cca1.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 const {searchHistory = [], value} = this.props;\n const data = searchHistory.some(item =>item === value)? searchHistory : searchHistory.concat([value]);\n // value && localStorage.setItem('searchHistory', JSON.stringify([...searchHistory, value]))\n localStorage.setItem('searchHistory', JSON.stringify(data));\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","some","setItem","stringify","changeFontColor","refs","focus","cls","classnames","submit-btn--active","react__WEBPACK_IMPORTED_MODULE_7___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,EAAQ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gD,IAE9FM,aAAa2C,QAAQ,gBAAiB7C,KAAK8C,UAAU1F,OAGzD2F,gBAAkB,SAACT,GACf/F,EAAKe,SAAS,CACVgF,gGAjBJxF,KAAKkG,KAAKP,OAAOQ,yCAqBZ,IAAApG,EAAAC,KACGwF,EAAYxF,KAAKZ,MAAjBoG,QACFY,EAAMC,IAAW,aAAc,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,yBAzDKd,kBAiEV1D,gBAAW2D","file":"mrstatic/js/SearchResult.23abbb99.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 const {searchHistory = [], value} = this.props;\n const data = searchHistory.some(item =>item === value)? searchHistory : searchHistory.concat([value]);\n // value && localStorage.setItem('searchHistory', JSON.stringify([...searchHistory, value]))\n localStorage.setItem('searchHistory', JSON.stringify(data));\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],{1197:function(e,t,a){"use strict";a.r(t);a(739);var c=a(740),n=a.n(c),r=a(19),s=(a(43),a(13)),i=a.n(s),o=a(5),l=a(7),u=a(6),d=a(8),h=a(9),m=(a(254),a(92)),p=a.n(m),f=a(0),v=a.n(f),k=a(20),g=a(27),E=a(62),b=a(15),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(907),a(16)),O=a.n(y),w=a(3),I=(a(73),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)},907:function(e,t,a){}}]);
//# sourceMappingURL=ShopCart.ab19bf02.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=ShopCart.bd20f40a.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,UAAU,cACXH,EAAAC,EAAAC,cAAA,KAAGC,UAAU,gCAAgCC,QAAS,kBAAIN,EAAKjB,MAAMwB,SAASd,EAAKe,aAE9Ef,EAAKgB,cAGVP,EAAAC,EAAAC,cAAA,KAAGC,UAAU,iCAAiCZ,EAAKiB,mBACnDR,EAAAC,EAAAC,cAAA,KAAGC,UAAU,aACTH,EAAAC,EAAAC,cAAA,QAAMC,UAAU,kBAAhB,OAAmCZ,EAAKkB,QACxCT,EAAAC,EAAAC,cAAA,QAAMC,UAAU,eAAhB,OAAgCZ,EAAKmB,UAKjD,OACQV,EAAAC,EAAAC,cAAA,OAAKC,UAAU,eACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,gBACXH,EAAAC,EAAAC,cAAAS,EAAAV,EAAA,CAAUN,QAASJ,EAAKqB,MAAOC,SAAU,SAACpB,GACtCK,EAAKe,SAASpB,EAAGF,EA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D,WAC3B3C,EAAAC,EAAAC,cAAA,OAAKC,UAAU,aACXH,EAAAC,EAAAC,cAACgF,EAAD,CACIrF,YAAaZ,KAAKY,YAAYsF,KAAKlG,MACnCmC,KAAMnC,KAAKI,MAAM+B,KACjBf,SAAUpB,KAAK4E,iBAGnB7D,EAAAC,EAAAC,cAAA,OAAKC,UAAU,eACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,cACXH,EAAAC,EAAAC,cAAAS,EAAAV,EAAA,CAAUY,SAAU,SAACpB,GACjB+E,EAAKY,UAAU3F,MAEnBO,EAAAC,EAAAC,cAAA,4BAEJF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,aACXH,EAAAC,EAAAC,cAAA,SACIF,EAAAC,EAAAC,cAAA,kCACAF,EAAAC,EAAAC,cAAA,qBAAQjB,KAAKI,MAAMuE,YAG3B5D,EAAAC,EAAAC,cAAA,OAAKC,UAAWkF,IAAW,CACvBC,OAAUrG,KAAKI,MAAMsE,WAAa,IAClCvD,QAAS,WACLoE,EAAKnF,MAAMsE,WAAa,GACxBa,EAAK1B,UAJb,eAOM9C,EAAAC,EAAAC,cAAA,kBAAUjB,KAAKI,MAAMsE,WAArB,mBAxMfzC,aAqNJqE,wBAAUxD","file":"mrstatic/js/ShopCart.ab19bf02.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,EAAKiB,mBACnDR,EAAAC,EAAAC,cAAA,KAAGC,UAAU,aACTH,EAAAC,EAAAC,cAAA,QAAMC,UAAU,kBAAhB,OAAmCZ,EAAKkB,QACxCT,EAAAC,EAAAC,cAAA,QAAMC,UAAU,eAAhB,OAAgCZ,EAAKmB,UAKjD,OACQV,EAAAC,EAAAC,cAAA,OAAKC,UAAU,eACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,gBACXH,EAAAC,EAAAC,cAAAS,EAAAV,EAAA,CAAUN,QAASJ,EAAKqB,MAAOC,SAAU,SAACpB,GACtCK,EAAKe,SAASpB,EAAGF,EAAKe,eAI9BN,EAAAC,EAAAC,cAAA,OAAKC,UAAU,aACXH,EAAAC,EAAAC,cAACY,EAAA,EAAD,CACIC,KAAMhB,EACNiB,IAAKzB,EAAK0B,WACVvB,GAAIH,EAAKe,UACTD,SAAUpB,KAAKJ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KAAK4E,iBAGnB7D,EAAAC,EAAAC,cAAA,OAAKC,UAAU,eACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,cACXH,EAAAC,EAAAC,cAAAS,EAAAV,EAAA,CAAUY,SAAU,SAACpB,GACjB+E,EAAKY,UAAU3F,MAEnBO,EAAAC,EAAAC,cAAA,4BAEJF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,aACXH,EAAAC,EAAAC,cAAA,SACIF,EAAAC,EAAAC,cAAA,kCACAF,EAAAC,EAAAC,cAAA,qBAAQjB,KAAKI,MAAMuE,YAG3B5D,EAAAC,EAAAC,cAAA,OAAKC,UAAWkF,IAAW,CACvBC,OAAUrG,KAAKI,MAAMsE,WAAa,IAClCvD,QAAS,WACLoE,EAAKnF,MAAMsE,WAAa,GACxBa,EAAK1B,UAJb,eAOM9C,EAAAC,EAAAC,cAAA,kBAAUjB,KAAKI,MAAMsE,WAArB,mBAxMfzC,aAqNJqE,wBAAUxD","file":"mrstatic/js/ShopCart.bd20f40a.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
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{1171:function(e,a,t){},1192: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(1171),t(160)),d=t(3),u=(t(146),t(15)),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.f08f4fde.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{1171:function(e,a,t){},1192: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(1171),t(160)),d=t(3),u=(t(146),t(15)),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.h)({title:t.share_title,desc:t.share_desc,imgUrl:t.image_name,link:location.href})}})}},{key:"render",value:function(){var e=this.state,a=e.user,t=e.course,s=e.progress;return m.a.createElement("div",{className:"aist-share"},m.a.createElement("div",{className:"content"},m.a.createElement("div",{className:"user"},m.a.createElement("img",{src:a.avatar,alt:"\u5934\u50cf"}),m.a.createElement("span",{className:"username"},a.name),m.a.createElement("span",{className:"time"},a.time)),m.a.createElement(u.b,{to:{pathname:"/detail",search:"?id=".concat(this.state.course.id)}},m.a.createElement("div",{className:"course"},m.a.createElement("div",{className:"course-cover"},m.a.createElement("img",{src:t.img,alt:"\u8bfe\u7a0b\u5c01\u9762"})),m.a.createElement("div",{className:"course-info"},m.a.createElement("div",{className:"title"},t.title),m.a.createElement("div",{className:"des"},t.des)))),m.a.createElement("ul",{className:"progress"},m.a.createElement("li",null,m.a.createElement("div",{className:"title"},"\u7d2f\u8ba1\u5b66\u4e60"),m.a.createElement("div",{className:"progress-value"},m.a.createElement("span",{className:"num"},s.days),"\u5929")),m.a.createElement("li",null,m.a.createElement("div",{className:"title"},"\u884c\u52a8\u529b\u8d85\u8fc7"),m.a.createElement("div",{className:"progress-value"},m.a.createElement("span",{className:"num"},s.action),"%"))),m.a.createElement("div",{className:"recommend-app"},m.a.createElement("div",{className:"text"},m.a.createElement("div",{className:"bold"},m.a.createElement("div",null,"\u7acb\u5373\u4e0b\u8f7d\u3010\u4e03\u6708\u5728\u7ebf\u3011"),m.a.createElement("div",null,"\u4f17\u591a\u597d\u8bfe\u514d\u8d39\u5b66")),m.a.createElement("div",{className:"light"},"\u957f\u6309\u8bc6\u522b\u53f3\u4fa7\u4e8c\u7ef4\u7801",m.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/aist/arrow.png",alt:""}))),m.a.createElement("div",{className:"qrcode"},m.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_app.png",alt:""})))))}}]),a}(i.PureComponent);a.default=Object(o.a)(v)}}]);
//# sourceMappingURL=aist-share.785451c0.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,MA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ourcesContent":["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,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,EA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AC,cAAA,OAAKC,UAAU,kBAAiBH,EAAAC,EAAAC,cAAA,QAAMC,UAAU,OAAO1C,EAASC,MAAhE,WAEJsC,EAAAC,EAAAC,cAAA,UACIF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SAAf,kCACAH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,kBAAiBH,EAAAC,EAAAC,cAAA,QAAMC,UAAU,OAAO1C,EAASE,QAAhE,OAGRqC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,iBACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,QACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,QACXH,EAAAC,EAAAC,cAAA,2EACAF,EAAAC,EAAAC,cAAA,0DAEJF,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SAAf,yDAEIH,EAAAC,EAAAC,cAAA,OAAKE,IAAI,gFACJC,IAAI,OAGjBL,EAAAC,EAAAC,cAAA,OAAKC,UAAU,UACXH,EAAAC,EAAAC,cAAA,OAAKE,IAAI,+EACJC,IAAI,gBApGbI,iBA6GTC,sBAAaxD","file":"mrstatic/js/aist-share.785451c0.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],{1194:function(e,t,a){"use strict";a.r(t);var n=a(19),c=a(5),o=a(7),s=a(6),i=a(8),l=a(9),u=a(0),r=a.n(u),p=a(15),m=a(49),d=a(21),h=(a(43),a(13)),v=a.n(h),f=a(148),E=(a(783),a(784),a(785),a(16)),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(786),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(63),I=a(41),_=a(20),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(89),S=(a(787),a(27)),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)(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(788),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},783:function(e,t,a){},784:function(e,t,a){},785:function(e,t,a){},786:function(e,t,a){},787:function(e,t,a){},788:function(e,t,a){}}]);
//# sourceMappingURL=coupons.86ed52ec.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=coupons.1f277415.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":"oQAKMA,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,MAClBC,OAAQ,WACJX,EAAKY,SAAS,CACVb,SAAS,KAGjBc,QAAS,WACLb,EAAKY,SAAS,CACVb,SAAS,OAIrBK,EAAAC,EAAAC,cAAA,KACIC,UAAWC,IAAW,mCAAoC,CACtDM,KAAkC,IAA5BtB,KAAKJ,MAAMsB,MAAMK,SAE3BC,QAASxB,KAAKI,qBAvCdqB,aA+CpB9B,EAAM+B,aAAe,CAAChB,KAAM,OAAQC,YAAa,IAElChB,UC5BAgC,6MApBXrB,MAAQ,2EAEC,IAAAG,EACoCT,KAAKJ,MAAvCS,EADFI,EACEJ,SAAUuB,EADZnB,EACYmB,WAAYC,EADxBpB,EACwBoB,SAC7B,OACIjB,EAAAC,EAAAC,cAAA,OAAKC,UAAU,gBACXH,EAAAC,EAAAC,cAACgB,EAAD,CACInB,YAAa,uCACbN,SAAU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ANzB,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.86ed52ec.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
{"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":"oQAKMA,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,MAClBC,OAAQ,WACJX,EAAKY,SAAS,CACVb,SAAS,KAGjBc,QAAS,WACLb,EAAKY,SAAS,CACVb,SAAS,OAIrBK,EAAAC,EAAAC,cAAA,KACIC,UAAWC,IAAW,mCAAoC,CACtDM,KAAkC,IAA5BtB,KAAKJ,MAAMsB,MAAMK,SAE3BC,QAASxB,KAAKI,qBAvCdqB,aA+CpB9B,EAAM+B,aAAe,CAAChB,KAAM,OAAQC,YAAa,IAElChB,UC5BAgC,6MApBXrB,MAAQ,2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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.1f277415.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
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1176:function(e,t,n){"use strict";n.r(t);n(43);var a,o=n(13),r=n.n(o),s=n(5),i=n(7),l=n(6),c=n(8),u=n(9),p=(n(254),n(92)),d=n.n(p),m=n(0),h=n.n(m),f=(n(893),n(27)),v=n(159),g=n(3),b=n(15),y=n(62),E=n(623),L=n.n(E),w=n(41),_=(n(73),n(20)),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},623:function(e,t,n){e.exports=n(650)},650:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=n(0),r=i(o),s=i(n(2));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.Component),a(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(n){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),a=void 0;if(this.props.useWindow){var o=document.documentElement||document.body.parentNode||document.body,r=void 0!==t.pageYOffset?t.pageYOffset:o.scrollTop;a=this.props.isReverse?r:this.calculateOffset(e,r)}else a=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;a<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"===typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,a=t.element,o=t.hasMore,s=(t.initialLoad,t.isReverse),i=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return o&&(i?s?u.unshift(i):u.push(i):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),r.default.createElement(a,c,u)}}]),t}();l.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},893:function(e,t,n){}}]);
//# sourceMappingURL=myorders.3ebf22ad.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=myorders.be372bac.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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","page","getMore","debounce","state","data","length","getList","http","get","concat","API","home","then","res","code","setState","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","info","msg","cancel","oid","text","onPress","console","log","order_id","post","location","reload","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,IAAInB,EAAO,CACPsB,SAAUL,GAEdd,I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,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.3ebf22ad.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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","page","getMore","debounce","state","data","length","getList","http","get","concat","API","home","then","res","code","setState","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","info","msg","cancel","oid","text","onPress","console","log","order_id","post","location","reload","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,IAAInB,EAAO,CACPsB,SAAUL,GAEdd,IAAKoB,KAAL,GAAAlB,OAAaC,IAAIC,KAAjB,mBAAwCP,GAAMQ,KAAK,SAACC,GAC1B,MAAlBA,EAAIT,KAAKU,KACTc,SAASC,SAETZ,EAAA5B,EAAM6B,KAAKL,EAAIT,KAAKe,IAAK,UAjD9B1B,EAyDnBqC,eAAiB,SAACC,GAAO,IAAAC,EACSvC,EAAKD,MADdwC,EACbC,SAGJ,OAJiBD,EACHE,QAENC,KAAR,cAAA1B,OAA2BsB,KACpB,GA3DXtC,EAAKU,MAAQ,CACTC,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BACTnB,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.be372bac.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],{1177:function(e,t,a){"use strict";a.r(t);a(43);var s=a(13),i=a.n(s),c=a(5),n=a(7),r=a(6),o=a(8),l=a(9),u=a(0),d=a.n(u),m=(a(894),a(27)),p=a(3),f=a(15),h=a(20),v=(a(73),a(62)),E=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).getList=function(){p.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(n.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"render",value:function(){var e=this,t=this.props.user,a=t&&t.data&&t.data.uid;return d.a.createElement("div",{className:"purchased-box"},d.a.createElement(m.e,{arrow:!0,title:"\u5df2\u8d2d\u8bfe\u7a0b",cart:!1,toHref:"/my"}),d.a.createElement(v.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?d.a.createElement("div",{className:"purchased-body"},d.a.createElement("div",{className:"tip"},"\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a",a),this.state.data.map(function(t,a){var s=d.a.createElement("div",{className:"info"},d.a.createElement("p",{className:"title",onClick:function(){return e.toCourseDetail(t.course_id)}},t.course_title),d.a.createElement("p",{className:"contact text-overflow-2"},t.simpledescription),t.is_aist&&d.a.createElement("div",{className:"des"},"\u52a9\u6559\u5fae\u4fe1\uff1a",t.assist_weixin),!t.is_aist&&1==t.contact_type&&t.course_qq&&d.a.createElement("div",{className:"des"},"QQ\u7fa4\uff1a",t.course_qq),!t.is_aist&&2==t.contact_type&&t.course_qq&&d.a.createElement("div",{className:"des"},"\u73ed\u4e3b\u4efb\u5fae\u4fe1\uff1a",t.course_qq)),i=t.is_aist&&d.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return d.a.createElement(m.j,{key:a,img:t.image_name,id:t.course_id,info:s,status:i,toDetail:e.toCourseDetail})})):d.a.createElement("div",{className:"cart-tip"},d.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),d.a.createElement(f.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(u.Component);t.default=Object(h.b)(function(e){return{user:e.user}},null)(E)},894:function(e,t,a){}}]);
//# sourceMappingURL=purchased.f057da65.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=purchased.0893278d.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/purchased/index.js"],"names":["Purchased","props","_this","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","getList","http","get","concat","API","home","then","res","data","code","setState","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","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","contact_type","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,SAACC,GAAO,IAAAC,EACSzB,EAAKD,MADd0B,EACbC,SADaD,EACHE,QAENC,KAAR,cAAAlB,OAA2Bc,KA3B/BxB,EAAK6B,MAAQ,CACTd,KAAM,GACNG,WAAW,GAJAlB,mFASfG,KAAKI,2CAyBA,IAAAuB,EAAA3B,KACE4B,EAAQ5B,KAAKJ,MAAbgC,KACDC,EAAMD,GAAQA,EAAKhB,MAAQgB,EAAKhB,KAAKiB,IAC3C,OACIC,EAAAb,EAAAc,cAAA,OAAKC,UAAU,iBACXF,EAAAb,EAAAc,cAACE,EAAA,EAAD,CAAWC,OAAO,EAAMC,MAAM,2B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TC,sBACX,SAAAlC,GAAK,MAAK,CAACE,KAAMF,EAAME,OACvB,KAFWgC,CAGbjE","file":"mrstatic/js/purchased.f057da65.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 {\n item.is_aist &&\n <div className='des'>助教微信:{item.assist_weixin}</div>\n }\n {\n !item.is_aist && item.contact_type == 1 && item.course_qq &&\n <div className='des'>QQ群:{item.course_qq}</div>\n }\n {\n !item.is_aist && item.contact_type == 2 && item.course_qq &&\n <div className='des'>班主任微信:{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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","getList","http","get","concat","API","home","then","res","data","code","setState","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","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","contact_type","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,G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AAKC,UAAU,OAAf,iCAA2BS,EAAKQ,gBAGpCR,EAAKO,SAAgC,GAArBP,EAAKS,cAAqBT,EAAKU,WAChDrB,EAAAb,EAAAc,cAAA,OAAKC,UAAU,OAAf,iBAA0BS,EAAKU,YAG9BV,EAAKO,SAAgC,GAArBP,EAAKS,cAAqBT,EAAKU,WAChDrB,EAAAb,EAAAc,cAAA,OAAKC,UAAU,OAAf,uCAA4BS,EAAKU,YAIvCC,EACFX,EAAKO,SAAWlB,EAAAb,EAAAc,cAAA,QAAMC,UAAU,UAAhB,gBAEpB,OACIF,EAAAb,EAAAc,cAACE,EAAA,EAAD,CACIoB,IAAKX,EACLY,IAAKb,EAAKc,WACVlC,GAAIoB,EAAKI,UACT3B,KAAMyB,EACNS,OAAQA,EACRI,SAAU7B,EAAKP,oBAMjCU,EAAAb,EAAAc,cAAA,OAAKC,UAAU,YACbF,EAAAb,EAAAc,cAAA,KAAGC,UAAU,aAAb,mFACAF,EAAAb,EAAAc,cAAC0B,EAAA,EAAD,CAAMC,GAAG,aAAT,gCAzFRC,aAmGTC,sBACX,SAAAlC,GAAK,MAAK,CAACE,KAAMF,EAAME,OACvB,KAFWgC,CAGbjE","file":"mrstatic/js/purchased.0893278d.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 {\n item.is_aist &&\n <div className='des'>助教微信:{item.assist_weixin}</div>\n }\n {\n !item.is_aist && item.contact_type == 1 && item.course_qq &&\n <div className='des'>QQ群:{item.course_qq}</div>\n }\n {\n !item.is_aist && item.contact_type == 2 && item.course_qq &&\n <div className='des'>班主任微信:{item.course_qq}</div>\n }\n </div>\n )\n const status = (\n item.is_aist && <span className='status'>返现</span>\n )\n return (\n <VList\n key={index}\n img={item.image_name}\n id={item.course_id}\n info={Info}\n status={status}\n toDetail={this.toCourseDetail}\n />\n )\n })\n }\n </div>\n : <div className=\"cart-tip\">\n <p className='cart-mess'>您还没有课程哦,快去逛逛吧~</p>\n <Link to='/classify'>去逛逛</Link>\n </div>\n }\n </Loading>\n\n </div>\n )\n }\n}\n\nexport default connect(\n state => ({user: state.user}),\n null\n)(Purchased)\n"],"sourceRoot":""}
\ No newline at end of file
!function(e){function r(r){for(var n,a,d=r[0],f=r[1],i=r[2],u=0,l=[];u<d.length;u++)a=d[u],o[a]&&l.push(o[a][0]),o[a]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,i||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,a=1;a<t.length;a++){var f=t[a];0!==o[f]&&(n=!1)}n&&(c.splice(r--,1),e=d(d.s=t[0]))}return e}var n={},a={19:0},o={19:0},c=[];function d(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,d),t.l=!0,t.exports}d.e=function(e){var r=[];a[e]?r.push(a[e]):0!==a[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(a[e]=new Promise(function(r,t){for(var n="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:"247ed778",2:"127d35ae",3:"edc539ff",4:"1bd3da48",5:"17af9370",6:"31d6cfe0",7:"e46f87f2",8:"31d6cfe0",9:"68a25070",10:"312f2a43",11:"b11acd73",12:"887eb690",13:"f4398072",14:"cf38c16e",15:"63ef174e",17:"e3d68b58",18:"c9466779",20:"e26f3ee9",21:"cde549fc",22:"c5bde985",23:"ffd8be6c",24:"b8d615d9",26:"31d6cfe0",27:"0710e3e3",28:"51412fcd",29:"e292ab6b",30:"1133c967",31:"37fb0c23",32:"6e885738",33:"400393b7"}[e]+".chunk.css",o=d.p+n,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===n||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"))===n||i===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var n=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.request=n,delete a[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){a[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var c,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:"3cda4082",1:"33851e01",2:"d90ec769",3:"2e4e2dee",4:"fe498fdd",5:"d6cdc9b7",6:"fe4ce0d0",7:"863bcecd",8:"5dac860b",9:"8993c389",10:"9f4e6030",11:"6bd7cca1",12:"ab19bf02",13:"f08f4fde",14:"86ed52ec",15:"5aef7224",17:"3ebf22ad",18:"f057da65",20:"5aa44ed1",21:"1cc92e57",22:"87355657",23:"c87a3e21",24:"efa90744",26:"56aeff83",27:"68a72ede",28:"8ed1b5c2",29:"072e25d8",30:"012adeac",31:"f3d31bfc",32:"f11af345",33:"d94fc9be"}[e]+".chunk.js"}(e),c=function(r){f.onerror=f.onload=null,clearTimeout(i);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");c.type=n,c.request=a,t[1](c)}o[e]=void 0}};var i=setTimeout(function(){c({type:"timeout",target:f})},12e4);f.onerror=f.onload=c,document.head.appendChild(f)}return Promise.all(r)},d.m=e,d.c=n,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 n in e)d.d(t,n,function(r){return e[r]}.bind(null,n));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.fec949e6.js.map
\ No newline at end of file
!function(e){function r(r){for(var n,a,d=r[0],f=r[1],i=r[2],u=0,l=[];u<d.length;u++)a=d[u],o[a]&&l.push(o[a][0]),o[a]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,i||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,a=1;a<t.length;a++){var f=t[a];0!==o[f]&&(n=!1)}n&&(c.splice(r--,1),e=d(d.s=t[0]))}return e}var n={},a={19:0},o={19:0},c=[];function d(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,d),t.l=!0,t.exports}d.e=function(e){var r=[];a[e]?r.push(a[e]):0!==a[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(a[e]=new Promise(function(r,t){for(var n="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:"247ed778",2:"127d35ae",3:"edc539ff",4:"1bd3da48",5:"17af9370",6:"31d6cfe0",7:"e46f87f2",8:"31d6cfe0",9:"68a25070",10:"312f2a43",11:"b11acd73",12:"887eb690",13:"f4398072",14:"cf38c16e",15:"63ef174e",17:"e3d68b58",18:"c9466779",20:"e26f3ee9",21:"cde549fc",22:"c5bde985",23:"ffd8be6c",24:"b8d615d9",26:"31d6cfe0",27:"0710e3e3",28:"51412fcd",29:"e292ab6b",30:"1133c967",31:"37fb0c23",32:"6e885738",33:"400393b7"}[e]+".chunk.css",o=d.p+n,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===n||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"))===n||i===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var n=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.request=n,delete a[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){a[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var c,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:"3cda4082",1:"c3392e0a",2:"90b28556",3:"84886b88",4:"fe498fdd",5:"2baf7abf",6:"89e50819",7:"7967ef7f",8:"bbde0b54",9:"33c0f4f6",10:"fd7820b1",11:"23abbb99",12:"bd20f40a",13:"785451c0",14:"1f277415",15:"db4f5431",17:"be372bac",18:"0893278d",20:"4a7c2e79",21:"3b77e330",22:"7c72c07a",23:"17748920",24:"68d3668b",26:"56aeff83",27:"68a72ede",28:"8ed1b5c2",29:"072e25d8",30:"012adeac",31:"f3d31bfc",32:"3c62b0cd",33:"6502a07c"}[e]+".chunk.js"}(e),c=function(r){f.onerror=f.onload=null,clearTimeout(i);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");c.type=n,c.request=a,t[1](c)}o[e]=void 0}};var i=setTimeout(function(){c({type:"timeout",target:f})},12e4);f.onerror=f.onload=c,document.head.appendChild(f)}return Promise.all(r)},d.m=e,d.c=n,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 n in e)d.d(t,n,function(r){return e[r]}.bind(null,n));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.5d074e46.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,IA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5F,GACA,qBAAA6F,eAAAC,aACAnH,OAAA8G,eAAAzF,EAAA6F,OAAAC,YAAA,CAAwDC,MAAA,WAExDpH,OAAA8G,eAAAzF,EAAA,cAAiD+F,OAAA,KAQjDpG,EAAAqG,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAApG,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.fec949e6.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\":\"3cda4082\",\"1\":\"33851e01\",\"2\":\"d90ec769\",\"3\":\"2e4e2dee\",\"4\":\"fe498fdd\",\"5\":\"d6cdc9b7\",\"6\":\"fe4ce0d0\",\"7\":\"863bcecd\",\"8\":\"5dac860b\",\"9\":\"8993c389\",\"10\":\"9f4e6030\",\"11\":\"6bd7cca1\",\"12\":\"ab19bf02\",\"13\":\"f08f4fde\",\"14\":\"86ed52ec\",\"15\":\"5aef7224\",\"17\":\"3ebf22ad\",\"18\":\"f057da65\",\"20\":\"5aa44ed1\",\"21\":\"1cc92e57\",\"22\":\"87355657\",\"23\":\"c87a3e21\",\"24\":\"efa90744\",\"26\":\"56aeff83\",\"27\":\"68a72ede\",\"28\":\"8ed1b5c2\",\"29\":\"072e25d8\",\"30\":\"012adeac\",\"31\":\"f3d31bfc\",\"32\":\"f11af345\",\"33\":\"d94fc9be\"}[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\":\"247ed778\",\"2\":\"127d35ae\",\"3\":\"edc539ff\",\"4\":\"1bd3da48\",\"5\":\"17af9370\",\"6\":\"31d6cfe0\",\"7\":\"e46f87f2\",\"8\":\"31d6cfe0\",\"9\":\"68a25070\",\"10\":\"312f2a43\",\"11\":\"b11acd73\",\"12\":\"887eb690\",\"13\":\"f4398072\",\"14\":\"cf38c16e\",\"15\":\"63ef174e\",\"17\":\"e3d68b58\",\"18\":\"c9466779\",\"20\":\"e26f3ee9\",\"21\":\"cde549fc\",\"22\":\"c5bde985\",\"23\":\"ffd8be6c\",\"24\":\"b8d615d9\",\"26\":\"31d6cfe0\",\"27\":\"0710e3e3\",\"28\":\"51412fcd\",\"29\":\"e292ab6b\",\"30\":\"1133c967\",\"31\":\"37fb0c23\",\"32\":\"6e885738\",\"33\":\"400393b7\"}[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,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAKA,IAFAe,KAAAhB,GAEAO,EAAAC,QACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,IAAAf,EAAAgB,KAAAF,GAAA,GAEAA,IACAL,EAAAQ,OAAApB,IAAA,GACAe,EAAAM,IAAAC,EAAAN,EAAA,KAGA,OAAAD,EAIA,IAAAQ,EAAA,GAGAC,EAAA,CACAC,GAAA,GAMAtB,EAAA,CACAsB,GAAA,GAGAb,EAAA,GAQA,SAAAS,EAAA1B,GAGA,GAAA4B,EAAA5B,GACA,OAAA4B,EAAA5B,GAAA+B,QAGA,IAAAC,EAAAJ,EAAA5B,GAAA,CACAK,EAAAL,EACAiC,GAAA,EACAF,QAAA,IAUA,OANAjB,EAAAd,GAAAa,KAAAmB,EAAAD,QAAAC,IAAAD,QAAAL,GAGAM,EAAAC,GAAA,EAGAD,EAAAD,QAKAL,EAAAQ,EAAA,SAAAjC,GACA,IAAAkC,EAAA,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AGA9C,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.5d074e46.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\":\"3cda4082\",\"1\":\"c3392e0a\",\"2\":\"90b28556\",\"3\":\"84886b88\",\"4\":\"fe498fdd\",\"5\":\"2baf7abf\",\"6\":\"89e50819\",\"7\":\"7967ef7f\",\"8\":\"bbde0b54\",\"9\":\"33c0f4f6\",\"10\":\"fd7820b1\",\"11\":\"23abbb99\",\"12\":\"bd20f40a\",\"13\":\"785451c0\",\"14\":\"1f277415\",\"15\":\"db4f5431\",\"17\":\"be372bac\",\"18\":\"0893278d\",\"20\":\"4a7c2e79\",\"21\":\"3b77e330\",\"22\":\"7c72c07a\",\"23\":\"17748920\",\"24\":\"68d3668b\",\"26\":\"56aeff83\",\"27\":\"68a72ede\",\"28\":\"8ed1b5c2\",\"29\":\"072e25d8\",\"30\":\"012adeac\",\"31\":\"f3d31bfc\",\"32\":\"3c62b0cd\",\"33\":\"6502a07c\"}[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\":\"247ed778\",\"2\":\"127d35ae\",\"3\":\"edc539ff\",\"4\":\"1bd3da48\",\"5\":\"17af9370\",\"6\":\"31d6cfe0\",\"7\":\"e46f87f2\",\"8\":\"31d6cfe0\",\"9\":\"68a25070\",\"10\":\"312f2a43\",\"11\":\"b11acd73\",\"12\":\"887eb690\",\"13\":\"f4398072\",\"14\":\"cf38c16e\",\"15\":\"63ef174e\",\"17\":\"e3d68b58\",\"18\":\"c9466779\",\"20\":\"e26f3ee9\",\"21\":\"cde549fc\",\"22\":\"c5bde985\",\"23\":\"ffd8be6c\",\"24\":\"b8d615d9\",\"26\":\"31d6cfe0\",\"27\":\"0710e3e3\",\"28\":\"51412fcd\",\"29\":\"e292ab6b\",\"30\":\"1133c967\",\"31\":\"37fb0c23\",\"32\":\"6e885738\",\"33\":\"400393b7\"}[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],{1150:function(e,t,n){},1151:function(e,t,n){},1200:function(e,t,n){"use strict";n.r(t);var a=n(72),o=n.n(a),r=n(108),s=n(5),i=n(7),c=n(6),l=n(8),u=n(9),h=n(0),f=n.n(h),d=n(704),p=(n(1150),function(e){function t(){return Object(s.a)(this,t),Object(c.a)(this,Object(l.a)(t).apply(this,arguments))}return Object(u.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){return f.a.createElement("span",Object.assign({className:this.props.name},this.props),this.props.children)}}]),t}(h.PureComponent)),m=n(3),v=(n(1151),n(15)),g=n(62),y=function(e){function t(){var e,n;Object(s.a)(this,t);for(var a=arguments.length,o=new Array(a),r=0;r<a;r++)o[r]=arguments[r];return(n=Object(c.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(o)))).state={searchHistory:JSON.parse(localStorage.getItem("searchHistory"))||[],hot_words:[],defaultWord:"",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(){var e=n.state,t=e.defaultWord,a=e.value||t;a&&n.props.history.push("/search-result?word=".concat(encodeURIComponent(a)))},n.storeHistory=function(e){var t=n.state.searchHistory,a=t.some(function(t){return t===e})?t:t.concat([e]);localStorage.setItem("searchHistory",JSON.stringify(a))},n}return Object(u.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=Object(r.a)(o.a.mark(function e(){var t,n,a,r;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.d.get("".concat(API["search-api"],"/search_hot_word"));case 2:t=e.sent,n=t.data,a=n.errno,r=n.data,0===a&&this.setState({hot_words:r.info.hot_words,defaultWord:r.info.recommend_word,isLoading:!1});case 5: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 f.a.createElement("div",{className:"search-page"},f.a.createElement(d.a,{searchHistory:this.state.searchHistory,value:this.state.value||this.state.defaultWord,handleChange:this.handleChange,handleSearch:this.handleSearch}),f.a.createElement(g.a,{isLoading:this.state.isLoading},f.a.createElement("div",{className:"search-main"},t.length>0&&f.a.createElement("div",{className:"search-land"},f.a.createElement("div",{className:"search-history"},f.a.createElement("span",null,"\u6700\u8fd1\u641c\u7d22"),f.a.createElement("i",{className:"iconfont iconiconfront-56",onClick:this.clearHistory})),f.a.createElement("div",{className:"search-tag"},t.map(function(e,t){return f.a.createElement(v.b,{key:t,to:"/search-result?word=".concat(encodeURIComponent(e))},f.a.createElement(p,{name:"tagLately"},e))}))),f.a.createElement("div",{className:"search-land search-hot"},f.a.createElement("label",{className:"search-history"},f.a.createElement("span",null,"\u70ed\u95e8\u641c\u7d22")),f.a.createElement("div",{className:"search-tag"},this.state.hot_words.length>0?this.state.hot_words.map(function(t,n){return f.a.createElement(v.b,{key:n,to:"/search-result?word=".concat(encodeURIComponent(t)),onClick:e.storeHistory.bind(e,t)},f.a.createElement(p,{name:"tagHot"},t))}):f.a.createElement("div",{style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u70ed\u95e8"))))))}}]),t}(h.PureComponent);t.default=y},582: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},587: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}},605:function(e,t,n){"use strict";n(50),n(606)},606:function(e,t,n){},607: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(14)),l=g(n(16)),u=v(n(0)),h=v(n(2)),f=g(n(153)),d=g(n(582)),p=n(587),m=n(608);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,p.getComponentLocale)(this.props,this.context,"SearchBar",function(){return n(609)}).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,d.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},608: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}},609:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={cancelText:"\u53d6\u6d88"},e.exports=t.default},704:function(e,t,n){"use strict";n(605);var a=n(607),o=n.n(a),r=n(5),s=n(7),i=n(6),c=n(8),l=n(9),u=n(0),h=n.n(u),f=n(49),d=n(16),p=n.n(d),m=(n(705),function(e){function t(){var e,n;Object(r.a)(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(n=Object(i.a)(this,(e=Object(c.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,r=a.some(function(e){return e===o})?a:a.concat([o]);localStorage.setItem("searchHistory",JSON.stringify(r))},n.changeFontColor=function(e){n.setState({isFocus:e})},n}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.refs.search.focus()}},{key:"render",value:function(){var e=this,t=this.state.isFocus,n=p()("submit-btn",{"submit-btn--active":t});return h.a.createElement("div",{className:"search-head",style:this.props.style,ref:this.props.forwardedRef},h.a.createElement("div",{className:"left",onClick:this.returnPage},h.a.createElement("i",{className:"iconfont iconiconfront-68"})),h.a.createElement("div",{className:"center"},h.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})),h.a.createElement("div",{className:"right right-btn",onClick:this.search},h.a.createElement("div",{className:n},"\u641c\u7d22")))}}]),t}(u.PureComponent));t.a=Object(f.g)(m)},705:function(e,t,n){}}]);
//# sourceMappingURL=search.5aa44ed1.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=search.4a7c2e79.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","defaultWord","searchList","value","isLoading","clearHistory","setItem","_this","setState","handleChange","handleSearch","_this$state","val","history","push","concat","encodeURIComponent","storeHistory","keyword","data","some","item","stringify","http","get","API","res","errno","info","recommend_word","_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","changeFontColor","refs","cls","classnames","submit-btn--active","react__WEBPACK_IMPORTED_MODULE_7___default","forwardedRef","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","withRouter"],"mappings":"2OAEqBA,4LAEb,OACIC,EAAAC,EAAAC,cAAA,OAAAC,OAAAC,OAAA,CAAMC,UAAWC,KAAKC,MAAMC,MAAUF,KAAKC,OACtCD,KAAKC,MAAME,iBAJKC,mDCO3BC,6MAEFC,MAAQ,CACJC,cAAeC,KAAKC,MAAMC,aAAaC,QAAQ,mBAAqB,GACpEC,UAAW,GACXC,YAAa,GACbC,WAAY,GACZC,MAAO,GACPC,WAAW,KAefC,aAAe,WACXP,aAAaQ,QAAQ,gBAAiB,MACtCC,EAAKC,SAAS,CACVb,cAAe,QAIvBc,aAAe,SAAAN,GACXI,EAAKC,SAAS,CAACL,aAGnBO,aAAe,WAAM,IAAAC,EACcJ,EAAKb,MAA5BO,EADSU,EACTV,YACFW,EAFWD,EACIR,OACAF,EACrBW,GAAOL,EAAKlB,M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BAAgB,IACnChF,SAAWzG,KAAKqL,UAGxBS,EAAAnM,EAAAC,cAAA,OAAKG,UAAU,kBAAkB+C,QAAS9C,KAAKqL,QAC3CS,EAAAnM,EAAAC,cAAA,OAAKG,UAAW4L,GAAhB,yBAzDKvL,kBAiEV6L,gBAAWhB","file":"mrstatic/js/search.5aa44ed1.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 defaultWord: '',\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 const { errno, data } = res.data; \n if (errno === 0) {\n this.setState({\n hot_words: data.info.hot_words,\n defaultWord: data.info.recommend_word,\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 const { defaultWord, value } = this.state;\n const val = value || defaultWord;\n val && this.props.history.push(`/search-result?word=${encodeURIComponent(val)}`)\n }\n\n storeHistory = keyword => {\n const { searchHistory } = this.state;\n const data = searchHistory.some(item => item === keyword)? searchHistory : searchHistory.concat([keyword]);\n localStorage.setItem('searchHistory', JSON.stringify(data));\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 || this.state.defaultWord}\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 const {searchHistory = [], value} = this.props;\n const data = searchHistory.some(item =>item === value)? searchHistory : searchHistory.concat([value]);\n // value && localStorage.setItem('searchHistory', JSON.stringify([...searchHistory, value]))\n localStorage.setItem('searchHistory', JSON.stringify(data));\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","defaultWord","searchList","value","isLoading","clearHistory","setItem","_this","setState","handleChange","handleSearch","_this$state","val","history","push","concat","encodeURIComponent","storeHistory","keyword","data","some","item","stringify","http","get","API","res","errno","info","recommend_word","_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","changeFontColor","refs","cls","classnames","submit-btn--active","react__WEBPACK_IMPORTED_MODULE_7___default","forwardedRef","antd_mobile_lib_search_bar__WEBPACK_IMPORTED_MODULE_1___default","withRouter"],"mappings":"2OAEqB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nM,EAAAC,cAAA,OAAKG,UAAU,cAAcwD,MAAOvD,KAAKC,MAAMsD,MAAO+G,IAAKtK,KAAKC,MAAM8L,cAElED,EAAAnM,EAAAC,cAAA,OAAKG,UAAU,OAAO+C,QAAS9C,KAAKmL,YAChCW,EAAAnM,EAAAC,cAAA,KAAGG,UAAU,+BAGjB+L,EAAAnM,EAAAC,cAAA,OAAKG,UAAU,UACX+L,EAAAnM,EAAAC,cAAAoM,EAAArM,EAAA,CACIoB,MAAOf,KAAKC,MAAMc,MAClBqI,kBAAgB,EAChBa,WAAY,IACZK,IAAI,SACJvD,OAAO,EACPD,SAAU9G,KAAKC,MAAMoB,aACrB0I,YAAY,2BACZ9C,QAAS,kBAAMvE,EAAK+I,iBAAgB,IACpCtE,OAAQ,kBAAMzE,EAAK+I,iBAAgB,IACnChF,SAAWzG,KAAKqL,UAGxBS,EAAAnM,EAAAC,cAAA,OAAKG,UAAU,kBAAkB+C,QAAS9C,KAAKqL,QAC3CS,EAAAnM,EAAAC,cAAA,OAAKG,UAAW4L,GAAhB,yBAzDKvL,kBAiEV6L,gBAAWhB","file":"mrstatic/js/search.4a7c2e79.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 defaultWord: '',\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 const { errno, data } = res.data; \n if (errno === 0) {\n this.setState({\n hot_words: data.info.hot_words,\n defaultWord: data.info.recommend_word,\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 const { defaultWord, value } = this.state;\n const val = value || defaultWord;\n val && this.props.history.push(`/search-result?word=${encodeURIComponent(val)}`)\n }\n\n storeHistory = keyword => {\n const { searchHistory } = this.state;\n const data = searchHistory.some(item => item === keyword)? searchHistory : searchHistory.concat([keyword]);\n localStorage.setItem('searchHistory', JSON.stringify(data));\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 || this.state.defaultWord}\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 const {searchHistory = [], value} = this.props;\n const data = searchHistory.some(item =>item === value)? searchHistory : searchHistory.concat([value]);\n // value && localStorage.setItem('searchHistory', JSON.stringify([...searchHistory, value]))\n localStorage.setItem('searchHistory', JSON.stringify(data));\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([[21],{1175:function(e,t,a){"use strict";a.r(t);a(43);var n=a(13),c=a.n(n),r=a(5),i=a(7),s=a(6),o=a(8),d=a(89),l=a(9),m=a(0),u=a.n(m),g=(a(872),a(27)),v=a(3),h=a(733),f=a.n(h),p=function(e){function t(e){var a;return Object(r.a)(this,t),(a=Object(s.a)(this,Object(o.a)(t).call(this,e))).initCanvas=function(e,t){var n=Object(d.a)(a),c=e[t].poster,r=450*e[t].header_position_x,i=800*e[t].header_position_y,s=(e[t].qr_code_x,e[t].qr_code_y,e[t].qr_code_width,e[t].qr_code_height,"https://m.julyedu.com/detail?id=".concat(Object(v.c)("courseId"),"&dist_code").concat(Object(v.c)("dist_code")),document.getElementById("canvas")),o=s.getContext("2d");n.getBase64(c).then(function(a){var c=new Image;c.src=a;var s=document.getElementById("qrcode"),d=navigator.userAgent.toLowerCase();d.indexOf("Android")>-1||d.indexOf("Adr"),d.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?s=document.getElementById("qrcode"):/(Android)/i.test(navigator.userAgent)&&(s=document.getElementById("qrcode")),c.setAttribute("crossOrigin","anonymous"),c.onload=function(){o.drawImage(c,0,0,450,800),o.drawImage(s,320,685,100,100),o.fillStyle=e[t].username_color,o.font="16px serif",o.fillText("@"+n.state.name,r+50+20,i+25),o.font="14px serif",o.fillText("\u6b63\u5728\u5b66\u4e60\u8be5\u8bfe\u7a0b",r+50+20,i+25+20),o.restore()}}).then(function(){n.getBase64(n.state.imgUrl).then(function(e){var t=new Image;t.src=e,t.setAttribute("crossOrigin","anonymous"),t.setAttribute("border-Radius","50%"),t.onload=function(){n.imgPosition(o,t,r,i,24),o.drawImage(t,r,i,48,48),o.restore(),n.setState({billSrc:n.convertCanvasToImage(s)})}})})},a.children=function(e,t){var a=e.childNodes,n=[];if(/MSIE(6|7|8)/.test(navigator.userAgent))for(var c=0;c<a.length;c++){var r=a[c];1===r.nodeType&&(n[n.length]=r)}else n=Array.prototype.slice.call(e.children);if("string"===typeof t)for(var i=0;i<n.length;i++)(e=n[i]).nodeName.toLowerCase()!==t.toLowerCase()&&(n.splice(i,1),i--);return n},a.imgPosition=function(e,t,a,n,c){e.save();var r=a+c,i=n+c;e.beginPath(),e.arc(r,i,c,0,2*Math.PI),e.clip()},a.getBase64Image=function(e){var t=document.createElement("canvas");t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0,e.width,e.height);var a=e.src.substring(e.src.lastIndexOf(".")+1).toLowerCase();return t.toDataURL("image/"+a)},a.convertCanvasToImage=function(e){var t=new Image;return t.src=e.toDataURL("image/png"),t},a.squareClick=function(e){a.setState({smallactive:e}),a.initCanvas(a.state.bgImage,e)},a.state={codeSrc:"",billSrc:"",imgUrl:"",smallListImg:[],smallactive:0,distPrice:"",name:"",bgImage:[]},a}return Object(l.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.getCodeWe(),v.d.get("".concat(API.home,"/m/dist/posters/").concat(Object(v.c)("courseId"),"/").concat(Object(v.c)("uid"))).then(function(t){200===t.data.code?(e.setState({imgUrl:t.data.data.avatar,smallListImg:t.data.data.list,distPrice:t.data.data.dist_course,bgImage:t.data.data.list,name:t.data.data.username}),e.initCanvas(e.state.bgImage,0)):c.a.info(t.data.msg,2)})}},{key:"getCodeWe",value:function(){var e=this,t="https://m.julyedu.com/detail?id=".concat(Object(v.c)("courseId"),"&dist_code=").concat(Object(v.c)("dist_code"));return new Promise(function(a){f.a.toDataURL(t,{},function(t,a){e.setState({codeSrc:a})}),a()})}},{key:"getBase64",value:function(e){var t=this;return new Promise(function(a){var n=null,c=new Image,r=+new Date;c.setAttribute("crossOrigin","anonymous"),c.src=e+"?"+r,c.onload=function(){n=t.getBase64Image(c),a(n)},c.onerror=function(){var a=+new Date;t.getBase64(e+"?"+a)}})}},{key:"render",value:function(){var e=this,t=this.state,a=t.distPrice,n=void 0===a?{}:a,c=t.smallListImg,r=void 0===c?[]:c,i=t.smallactive;return u.a.createElement("div",{className:"share-poster"},u.a.createElement(g.e,{title:"\u751f\u6210\u4e13\u5c5e\u6d77\u62a5",arrow:!0,cart:!1}),u.a.createElement("div",{className:"total-container"},u.a.createElement("div",{className:"placard-img-container",id:"imgWrapper"},u.a.createElement("img",{src:this.state.billSrc.src,alt:""})),u.a.createElement("img",{src:this.state.codeSrc,alt:"",id:"qrcode",className:"placard-code"}),u.a.createElement("canvas",{id:"canvas",width:"450",height:"800",className:""===this.state.billSrc?"":"hide"})),u.a.createElement("div",{className:"placard-desc"},u.a.createElement("span",{className:"placard-sharetxt"},"\u957f\u6309\u4fdd\u5b58\u6d77\u62a5\u5206\u4eab\u7ed9\u597d\u53cb\uff0c\u6bcf\u6709\u4e00\u4eba\u901a\u8fc7\u60a8\u7684\u5206\u4eab\u8d2d\u4e70\u8be5\u8bfe\u7a0b\uff0c\u60a8\u53ef\u4ee5",0===n.count_type&&u.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97",n.first_level_tip,"\u5143\u7684\u4f63\u91d1\u5956\u52b1\u3002"),1===n.count_type&&u.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97\u6210\u4ea4\u91d1\u989d\u7684",n.first_level_scale,"%\u4f5c\u4e3a\u4f63\u91d1\u5956\u52b1\u3002"))),u.a.createElement("div",{className:"placard-swiper"},u.a.createElement("ul",{className:"placard-list"},r.length>0&&r.map(function(t,a){return u.a.createElement("li",{onClick:e.squareClick.bind(e,a),key:a,className:i===a?"active":""},u.a.createElement("img",{src:t.square,alt:""}))}))))}}]),t}(m.Component);t.default=p},872:function(e,t,a){}}]);
//# sourceMappingURL=shareposter.1cc92e57.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=shareposter.3b77e330.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/sharePoster/index.js"],"names":["SharePoster","props","_this2","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","initCanvas","imgList","index","_this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__","imgSrc1","poster","avatarPositionX","header_position_x","avatarPositionY","header_position_y","canvas","qr_code_x","qr_code_y","qr_code_width","qr_code_height","concat","getParam","document","getElementById","context","getContext","getBase64","then","img","bgImage","Image","src","qrCodeImg","ua","navigator","userAgent","toLowerCase","indexOf","match","test","setAttribute","onload","drawImage","fillStyle","username_color","font","fillText","state","name","avatarHeight","restore","imgUrl","imgPosition","setState","billSrc","convertCanvasToImage","children","curEle","tagName","nodeList","childNodes","ary","i","length","curNode","nodeType","Array","prototype","slice","k","nodeName","splice","ctx","x","y","r","save","cx","cy","beginPath","arc","Math","PI","clip","getBase64Image","createElement","width","height","ext","substring","lastIndexOf","toDataURL","image","squareClick","smallactive","codeSrc","smallListImg","distPrice","_this3","getCodeWe","http","get","API","home","res","data","code","avatar","list","dist_course","username","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","qrCodeLink","Promise","resolve","QRCode","err","url","base64","timeStamp","Date","onerror","_this4","_this$state","_this$state$distPrice","_this$state$smallList","react__WEBPACK_IMPORTED_MODULE_8___default","className","_common__WEBPACK_IMPORTED_MODULE_10__","title","arrow","cart","id","alt","count_type","first_level_tip","first_level_scale","map","item","onClick","bind","key","square","Component"],"mappings":"mOAOMA,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,KAiCVQ,WAAa,SAACC,EAASC,GACnB,IAAIC,EAAKT,OAAAU,EAAA,EAAAV,CAAAD,GACLY,EAAUJ,EAAQC,GAAOI,OAKzBC,EAJS,IAIUN,EAAQC,GAAOM,kBAClCC,EAJU,IAISR,EAAQC,GAAOQ,kBASlCC,GAPkBV,EAAQC,GAAOU,UACfX,EAAQC,GAAOW,UAClBZ,EAAQC,GAAOY,cACdb,EAAQC,GAAOa,eAErB,mCAAAC,OAAsCC,YAAS,YAA/C,cAAAD,OAAuEC,YAAS,cAEjFC,SAASC,eAAe,WACjCC,EAAUT,EAAOU,WAAW,MAEhClB,EAAMmB,UAAUjB,GAEXkB,KAAK,SAACC,GACH,IAAIC,EAAU,IAAIC,MAClBD,EAAQE,IAAMH,EACd,IAAII,EAAYV,SAASC,eAAe,UACpCU,EAAKC,UAAUC,UAAUC,cAEbH,EAAGI,QAAQ,YAAc,GAAKJ,EAAGI,QAAQ,OAE3CJ,EAAGK,MAAM,iCACnB,0BAA0BC,KAAKL,UAAUC,WACzCH,EAAYV,SAASC,eAAe,UAC7B,aAAagB,KAAKL,UAAUC,aAEnCH,EAAYV,SAASC,eAAe,WAIxCM,EAAQW,aAAa,cAAe,aACpCX,EAAQY,OAAS,WACbjB,EAAQkB,UAAUb,EAAS,EAAG,EAAG,IAAK,KACtCL,EAAQkB,UAAUV,EAAW,IAAK,IAAK,IAAK,KAC5CR,EAAQmB,UAAYtC,EAAQC,GAAOsC,eACnCpB,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EAAA3B,cAAA,UACIkD,GAAG,SACHjD,MAAM,MACNC,OAAO,MACP2C,UAAkC,KAAvBlI,KAAK+C,MAAMO,QAAiB,GAAK,UAGpD2E,EAAAjB,EAAA3B,cAAA,OAAK6C,UAAU,gBACXD,EAAAjB,EAAA3B,cAAA,QAAM6C,UAAU,oBAAhB,6LAGiC,IAAzBjC,EAAUwC,YACVR,EAAAjB,EAAA3B,cAAA,QAAM6C,UAAU,iBAAhB,eACOjC,EAAUyC,gBADjB,8CAKyB,IAAzBzC,EAAUwC,YACVR,EAAAjB,EAAA3B,cAAA,QAAM6C,UAAU,iBAAhB,6CACYjC,EAAU0C,kBADtB,iDAMZV,EAAAjB,EAAA3B,cAAA,OAAK6C,UAAU,kBACXD,EAAAjB,EAAA3B,cAAA,MAAI6C,UAAU,gBAENlC,EAAajC,OAAS,GAAKiC,EAAa4C,IAAI,SAACC,EAAMvI,GAC/C,OACI2H,EAAAjB,EAAA3B,cAAA,MACIyD,QAASjB,EAAKhC,YAAYkD,KAAKlB,EAAMvH,GACrC0I,IAAK1I,EACL4H,UAAWpC,IAAgBxF,EAAQ,SAAW,IAE9C2H,EAAAjB,EAAA3B,cAAA,OAAKtD,IAAK8G,EAAKI,OAAQT,IAAI,kBAhRzCU,aA4RXvJ","file":"mrstatic/js/shareposter.1cc92e57.chunk.js","sourcesContent":["import React, {Component} from 'react';\nimport './index.scss';\nimport {HeaderBar} from '@/common';\nimport {http, getParam} from '@/utils';\nimport QRCode from 'qrcode';\nimport { Toast} from 'antd-mobile';\n\nclass SharePoster extends Component {\n constructor(props) {\n super(props)\n this.state = {\n codeSrc: '',\n billSrc: '', // 图片链接\n imgUrl: '',\n smallListImg: [], // 小图片地址\n smallactive: 0, // 小图选中标记\n distPrice: '', // 分销价格\n name: '', // 用户姓名\n bgImage: [] // 背景图\n }\n }\n\n componentDidMount() {\n this.getCodeWe();\n http.get(`${API.home}/m/dist/posters/${getParam('courseId')}/${getParam('uid')}`).then((res) => {\n // console.log(res);\n if (res.data.code === 200) {\n this.setState({\n imgUrl: res.data.data.avatar,\n smallListImg: res.data.data.list,\n distPrice: res.data.data.dist_course,\n bgImage: res.data.data.list,\n name: res.data.data.username\n })\n this.initCanvas(this.state.bgImage, 0)\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n // 初始化海报\n initCanvas = (imgList, index) => {\n let _this = this;\n let imgSrc1 = imgList[index].poster;\n let $width = 450;\n let $height = 800;\n let avatarWidth = 50 // imgList[index].poster_width // 头像宽度\n let avatarHeight = 50 // imgList[index].poster_height // 头像高度\n let avatarPositionX = (imgList[index].header_position_x * $width) // 头像x轴位置\n let avatarPositionY = (imgList[index].header_position_y * $height) // 头像Y轴位置\n\n let qrCodePositionX = imgList[index].qr_code_x * $width // 二维码x轴位置\n let qrCodePositionY = imgList[index].qr_code_y * $height // 二维码y轴位置\n let qrCodeWidth = (imgList[index].qr_code_width * $width) // 二维码宽度\n let qrCodeHeight = (imgList[index].qr_code_height * $height) - avatarHeight / 2 // 二维码高度\n\n let qrCodeLink = `https://m.julyedu.com/detail?id=${getParam('courseId')}&dist_code${getParam('dist_code')}`\n\n var canvas = document.getElementById(\"canvas\"),\n context = canvas.getContext(\"2d\");\n // console.log(_this);\n _this.getBase64(imgSrc1)\n // 背景图片合成\n .then((img) => {\n let bgImage = new Image();\n bgImage.src = img;\n let qrCodeImg = document.getElementById('qrcode');\n let ua = navigator.userAgent.toLowerCase();\n // Android终端\n let isAndroid = ua.indexOf('Android') > -1 || ua.indexOf('Adr') > -1;\n // Ios终端\n let isiOS = !!ua.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/);\n if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {\n qrCodeImg = document.getElementById('qrcode');\n } else if (/(Android)/i.test(navigator.userAgent)) {\n //Android终端\n qrCodeImg = document.getElementById('qrcode');\n\n }\n\n bgImage.setAttribute('crossOrigin', 'anonymous');\n bgImage.onload = function () {\n context.drawImage(bgImage, 0, 0, 450, 800);\n context.drawImage(qrCodeImg, 320, 685, 100, 100);\n context.fillStyle = imgList[index].username_color;\n context.font = \"16px serif\";\n context.fillText('@' + _this.state.name, (avatarPositionX + avatarWidth) + 20, (avatarPositionY + avatarHeight / 2));\n context.font = \"14px serif\";\n context.fillText('正在学习该课程', (avatarPositionX + avatarWidth) + 20, (avatarPositionY + avatarHeight / 2) + 20);\n context.restore();\n }\n\n })\n // 头像生成\n .then(() => {\n _this.getBase64(_this.state.imgUrl)\n .then((img) => {\n let bgImage = new Image();\n bgImage.src = img;\n bgImage.setAttribute('crossOrigin', 'anonymous');\n bgImage.setAttribute('border-Radius', '50%');\n bgImage.onload = function () {\n _this.imgPosition(context, bgImage, avatarPositionX, avatarPositionY, 24);\n context.drawImage(bgImage, avatarPositionX, avatarPositionY, 48, 48);\n context.restore();\n _this.setState({\n billSrc: _this.convertCanvasToImage(canvas)\n })\n\n }\n })\n\n })\n }\n children = (curEle, tagName) => {\n var nodeList = curEle.childNodes;\n var ary = [];\n if (/MSIE(6|7|8)/.test(navigator.userAgent)) {\n for (var i = 0; i < nodeList.length; i++) {\n var curNode = nodeList[i];\n if (curNode.nodeType === 1) {\n ary[ary.length] = curNode;\n }\n }\n } else {\n ary = Array.prototype.slice.call(curEle.children);\n }\n\n // 获取指定子元素\n if (typeof tagName === \"string\") {\n for (var k = 0; k < ary.length; k++) {\n curEle = ary[k];\n if (curEle.nodeName.toLowerCase() !== tagName.toLowerCase()) {\n ary.splice(k, 1);\n k--;\n }\n }\n }\n\n return ary;\n }\n\n // 合成图片位置\n imgPosition = (ctx, img, x, y, r) => {\n ctx.save();\n var d = 2 * r;\n var cx = x + r;\n var cy = y + r;\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, 2 * Math.PI);\n ctx.clip();\n }\n\n // 获取二维码\n getCodeWe() {\n let _this = this\n let qrCodeLink = `https://m.julyedu.com/detail?id=${getParam('courseId')}&dist_code=${getParam('dist_code')}`\n return new Promise(resolve => {\n QRCode.toDataURL(qrCodeLink, {}, function (err, url) {\n _this.setState({\n codeSrc: url\n })\n })\n /*\n let qrcode = new QRCode(document.getElementById('qrcode'), {\n text: qrCodeLink,\n width: 160,\n height: 160,\n colorDark: \"#000000\", // 生成的二维码的深色部分\n colorLight: \"#ffffff\", //生成二维码的浅色部分\n })\n */\n resolve()\n })\n }\n\n // 图片路径转成base64\n getBase64(img) {\n let _this = this;\n return new Promise(resolve => {\n let base64 = null;\n let image = new Image();\n let timeStamp = +new Date();\n image.setAttribute('crossOrigin', 'anonymous');\n image.src = img + '?' + timeStamp;\n image.onload = () => {\n base64 = _this.getBase64Image(image)\n resolve(base64)\n }\n image.onerror = function () {\n let timeStamp = +new Date();\n _this.getBase64(img + '?' + timeStamp);\n }\n })\n\n }\n\n // 图片路径放入canvas转成base64\n getBase64Image = (img) => {\n let canvas = document.createElement(\"canvas\");\n canvas.width = img.width;\n canvas.height = img.height;\n\n let ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0, img.width, img.height);\n let ext = img.src.substring(img.src.lastIndexOf(\".\") + 1).toLowerCase();\n let dataURL = canvas.toDataURL(\"image/\" + ext);\n return dataURL;\n }\n\n // canvas转换成img图片\n convertCanvasToImage = (canvas) => {\n let image = new Image();\n image.src = canvas.toDataURL(\"image/png\");\n return image;\n }\n\n // 小图切换\n squareClick = (index) => {\n this.setState({\n smallactive: index\n });\n this.initCanvas(this.state.bgImage, index);\n }\n\n render() {\n const { distPrice={}, smallListImg=[], smallactive } = this.state;\n return (\n <div className='share-poster'>\n <HeaderBar \n title='生成专属海报' \n arrow={true} \n cart={false}\n />\n <div className=\"total-container\">\n <div className='placard-img-container' id='imgWrapper'>\n <img src={this.state.billSrc.src} alt=\"\" />\n </div>\n <img \n src={this.state.codeSrc} \n alt=\"\" \n id='qrcode' \n className='placard-code'\n />\n <canvas \n id='canvas' \n width='450' \n height='800'\n className={this.state.billSrc === '' ? '' : 'hide'}\n />\n </div>\n <div className='placard-desc'>\n <span className='placard-sharetxt'>\n 长按保存海报分享给好友,每有一人通过您的分享购买该课程,您可以\n {\n distPrice.count_type === 0 &&\n <span className='placard-price'>\n 获得{distPrice.first_level_tip}元的佣金奖励。\n </span>\n }\n {\n distPrice.count_type === 1 &&\n <span className='placard-price'>\n 获得成交金额的{distPrice.first_level_scale}%作为佣金奖励。\n </span>\n }\n </span>\n </div>\n <div className='placard-swiper'>\n <ul className='placard-list'>\n {\n smallListImg.length > 0 && smallListImg.map((item, index) => {\n return (\n <li \n onClick={this.squareClick.bind(this, index)} \n key={index}\n className={smallactive === index ? 'active' : ''}\n >\n <img src={item.square} alt=\"\" />\n </li>\n );\n })\n }\n </ul>\n </div>\n </div>\n );\n }\n}\n\nexport default SharePoster;\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/sharePoster/index.js"],"names":["SharePoster","props","_this2","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","initCanvas","imgList","index","_this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__","imgSrc1","poster","avatarPositionX","header_position_x","avatarPositionY","header_position_y","canvas","qr_code_x","qr_code_y","qr_code_width","qr_code_height","concat","getParam","document","getElementById","context","getContext","getBase64","then","img","bgImage","Image","src","qrCodeImg","ua","navigator","userAgent","toLowerCase","indexOf","match","test","setAttribute","onload","drawImage","fillStyle","username_color","font","fillText","state","name","avatarHeight","restore","imgUrl","imgPosition","setState","billSrc","convertCanvasToImage","children","curEle","tagName","nodeList","childNodes","ary","i","length","curNode","nodeType","Array","prototype","slice","k","nodeName","splice","ctx","x","y","r","save","cx","cy","beginPath","arc","Math","PI","clip","getBase64Image","createElement","width","height","ext","substring","lastIndexOf","toDataURL","image","squareClick","smallactive","codeSrc","smallListImg","distPrice","_this3","getCodeWe","http","get","API","home","res","data","code","avatar","list","dist_course","username","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","qrCodeLink","Promise","resolve","QRCode","err","url","base64","timeStamp","Date","onerror","_this4","_this$state","_this$state$distPrice","_this$state$smallList","react__WEBPACK_IMPORTED_MODULE_8___default","className","_common__WEBPACK_IMPORTED_MODULE_10__","title","arrow","cart","id","alt","count_type","first_level_tip","first_level_scale","map","item","onClick","bind","key","square","Component"],"mappings":"mOAOMA,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,KAiCVQ,WAAa,SAACC,EAASC,GACnB,IAAIC,EAAKT,OAAAU,EAAA,EAAAV,CAAAD,GACLY,EAAUJ,EAAQC,GAAOI,OAKzBC,EAJS,IAIUN,EAAQC,GAAOM,kBAClCC,EAJU,IAISR,EAAQC,GAAOQ,kBASlCC,GAPkBV,EAAQC,GAAOU,UACfX,EAAQC,GAAOW,UAClBZ,EAAQC,GAAOY,cACdb,EAAQC,GAAOa,eAErB,mCAAAC,OAAsCC,YAAS,YAA/C,cAAAD,OAAuEC,YAAS,cAEjFC,SAASC,eAAe,WACjCC,EAAUT,EAAOU,WAAW,MAEhClB,EAAMmB,UAAUjB,GAEXkB,KAAK,SAACC,GACH,IAAIC,EAAU,IAAIC,MAClBD,EAAQE,IAAMH,EACd,IAAII,EAAYV,SAASC,eAAe,UACpCU,EAAKC,UAAUC,UAAUC,cAEbH,EAAGI,QAAQ,YAAc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A,EAAD,CACIC,MAAM,uCACNC,OAAO,EACPC,MAAM,IAEVL,EAAAjB,EAAA3B,cAAA,OAAK6C,UAAU,mBACXD,EAAAjB,EAAA3B,cAAA,OAAK6C,UAAU,wBAAwBK,GAAG,cACtCN,EAAAjB,EAAA3B,cAAA,OAAKtD,IAAK/B,KAAK+C,MAAMO,QAAQvB,IAAKyG,IAAI,MAE1CP,EAAAjB,EAAA3B,cAAA,OACItD,IAAK/B,KAAK+C,MAAMgD,QAChByC,IAAI,GACJD,GAAG,SACHL,UAAU,iBAEdD,EAAAjB,EAAA3B,cAAA,UACIkD,GAAG,SACHjD,MAAM,MACNC,OAAO,MACP2C,UAAkC,KAAvBlI,KAAK+C,MAAMO,QAAiB,GAAK,UAGpD2E,EAAAjB,EAAA3B,cAAA,OAAK6C,UAAU,gBACXD,EAAAjB,EAAA3B,cAAA,QAAM6C,UAAU,oBAAhB,6LAGiC,IAAzBjC,EAAUwC,YACVR,EAAAjB,EAAA3B,cAAA,QAAM6C,UAAU,iBAAhB,eACOjC,EAAUyC,gBADjB,8CAKyB,IAAzBzC,EAAUwC,YACVR,EAAAjB,EAAA3B,cAAA,QAAM6C,UAAU,iBAAhB,6CACYjC,EAAU0C,kBADtB,iDAMZV,EAAAjB,EAAA3B,cAAA,OAAK6C,UAAU,kBACXD,EAAAjB,EAAA3B,cAAA,MAAI6C,UAAU,gBAENlC,EAAajC,OAAS,GAAKiC,EAAa4C,IAAI,SAACC,EAAMvI,GAC/C,OACI2H,EAAAjB,EAAA3B,cAAA,MACIyD,QAASjB,EAAKhC,YAAYkD,KAAKlB,EAAMvH,GACrC0I,IAAK1I,EACL4H,UAAWpC,IAAgBxF,EAAQ,SAAW,IAE9C2H,EAAAjB,EAAA3B,cAAA,OAAKtD,IAAK8G,EAAKI,OAAQT,IAAI,kBAhRzCU,aA4RXvJ","file":"mrstatic/js/shareposter.3b77e330.chunk.js","sourcesContent":["import React, {Component} from 'react';\nimport './index.scss';\nimport {HeaderBar} from '@/common';\nimport {http, getParam} from '@/utils';\nimport QRCode from 'qrcode';\nimport { Toast} from 'antd-mobile';\n\nclass SharePoster extends Component {\n constructor(props) {\n super(props)\n this.state = {\n codeSrc: '',\n billSrc: '', // 图片链接\n imgUrl: '',\n smallListImg: [], // 小图片地址\n smallactive: 0, // 小图选中标记\n distPrice: '', // 分销价格\n name: '', // 用户姓名\n bgImage: [] // 背景图\n }\n }\n\n componentDidMount() {\n this.getCodeWe();\n http.get(`${API.home}/m/dist/posters/${getParam('courseId')}/${getParam('uid')}`).then((res) => {\n // console.log(res);\n if (res.data.code === 200) {\n this.setState({\n imgUrl: res.data.data.avatar,\n smallListImg: res.data.data.list,\n distPrice: res.data.data.dist_course,\n bgImage: res.data.data.list,\n name: res.data.data.username\n })\n this.initCanvas(this.state.bgImage, 0)\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n // 初始化海报\n initCanvas = (imgList, index) => {\n let _this = this;\n let imgSrc1 = imgList[index].poster;\n let $width = 450;\n let $height = 800;\n let avatarWidth = 50 // imgList[index].poster_width // 头像宽度\n let avatarHeight = 50 // imgList[index].poster_height // 头像高度\n let avatarPositionX = (imgList[index].header_position_x * $width) // 头像x轴位置\n let avatarPositionY = (imgList[index].header_position_y * $height) // 头像Y轴位置\n\n let qrCodePositionX = imgList[index].qr_code_x * $width // 二维码x轴位置\n let qrCodePositionY = imgList[index].qr_code_y * $height // 二维码y轴位置\n let qrCodeWidth = (imgList[index].qr_code_width * $width) // 二维码宽度\n let qrCodeHeight = (imgList[index].qr_code_height * $height) - avatarHeight / 2 // 二维码高度\n\n let qrCodeLink = `https://m.julyedu.com/detail?id=${getParam('courseId')}&dist_code${getParam('dist_code')}`\n\n var canvas = document.getElementById(\"canvas\"),\n context = canvas.getContext(\"2d\");\n // console.log(_this);\n _this.getBase64(imgSrc1)\n // 背景图片合成\n .then((img) => {\n let bgImage = new Image();\n bgImage.src = img;\n let qrCodeImg = document.getElementById('qrcode');\n let ua = navigator.userAgent.toLowerCase();\n // Android终端\n let isAndroid = ua.indexOf('Android') > -1 || ua.indexOf('Adr') > -1;\n // Ios终端\n let isiOS = !!ua.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/);\n if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {\n qrCodeImg = document.getElementById('qrcode');\n } else if (/(Android)/i.test(navigator.userAgent)) {\n //Android终端\n qrCodeImg = document.getElementById('qrcode');\n\n }\n\n bgImage.setAttribute('crossOrigin', 'anonymous');\n bgImage.onload = function () {\n context.drawImage(bgImage, 0, 0, 450, 800);\n context.drawImage(qrCodeImg, 320, 685, 100, 100);\n context.fillStyle = imgList[index].username_color;\n context.font = \"16px serif\";\n context.fillText('@' + _this.state.name, (avatarPositionX + avatarWidth) + 20, (avatarPositionY + avatarHeight / 2));\n context.font = \"14px serif\";\n context.fillText('正在学习该课程', (avatarPositionX + avatarWidth) + 20, (avatarPositionY + avatarHeight / 2) + 20);\n context.restore();\n }\n\n })\n // 头像生成\n .then(() => {\n _this.getBase64(_this.state.imgUrl)\n .then((img) => {\n let bgImage = new Image();\n bgImage.src = img;\n bgImage.setAttribute('crossOrigin', 'anonymous');\n bgImage.setAttribute('border-Radius', '50%');\n bgImage.onload = function () {\n _this.imgPosition(context, bgImage, avatarPositionX, avatarPositionY, 24);\n context.drawImage(bgImage, avatarPositionX, avatarPositionY, 48, 48);\n context.restore();\n _this.setState({\n billSrc: _this.convertCanvasToImage(canvas)\n })\n\n }\n })\n\n })\n }\n children = (curEle, tagName) => {\n var nodeList = curEle.childNodes;\n var ary = [];\n if (/MSIE(6|7|8)/.test(navigator.userAgent)) {\n for (var i = 0; i < nodeList.length; i++) {\n var curNode = nodeList[i];\n if (curNode.nodeType === 1) {\n ary[ary.length] = curNode;\n }\n }\n } else {\n ary = Array.prototype.slice.call(curEle.children);\n }\n\n // 获取指定子元素\n if (typeof tagName === \"string\") {\n for (var k = 0; k < ary.length; k++) {\n curEle = ary[k];\n if (curEle.nodeName.toLowerCase() !== tagName.toLowerCase()) {\n ary.splice(k, 1);\n k--;\n }\n }\n }\n\n return ary;\n }\n\n // 合成图片位置\n imgPosition = (ctx, img, x, y, r) => {\n ctx.save();\n var d = 2 * r;\n var cx = x + r;\n var cy = y + r;\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, 2 * Math.PI);\n ctx.clip();\n }\n\n // 获取二维码\n getCodeWe() {\n let _this = this\n let qrCodeLink = `https://m.julyedu.com/detail?id=${getParam('courseId')}&dist_code=${getParam('dist_code')}`\n return new Promise(resolve => {\n QRCode.toDataURL(qrCodeLink, {}, function (err, url) {\n _this.setState({\n codeSrc: url\n })\n })\n /*\n let qrcode = new QRCode(document.getElementById('qrcode'), {\n text: qrCodeLink,\n width: 160,\n height: 160,\n colorDark: \"#000000\", // 生成的二维码的深色部分\n colorLight: \"#ffffff\", //生成二维码的浅色部分\n })\n */\n resolve()\n })\n }\n\n // 图片路径转成base64\n getBase64(img) {\n let _this = this;\n return new Promise(resolve => {\n let base64 = null;\n let image = new Image();\n let timeStamp = +new Date();\n image.setAttribute('crossOrigin', 'anonymous');\n image.src = img + '?' + timeStamp;\n image.onload = () => {\n base64 = _this.getBase64Image(image)\n resolve(base64)\n }\n image.onerror = function () {\n let timeStamp = +new Date();\n _this.getBase64(img + '?' + timeStamp);\n }\n })\n\n }\n\n // 图片路径放入canvas转成base64\n getBase64Image = (img) => {\n let canvas = document.createElement(\"canvas\");\n canvas.width = img.width;\n canvas.height = img.height;\n\n let ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0, img.width, img.height);\n let ext = img.src.substring(img.src.lastIndexOf(\".\") + 1).toLowerCase();\n let dataURL = canvas.toDataURL(\"image/\" + ext);\n return dataURL;\n }\n\n // canvas转换成img图片\n convertCanvasToImage = (canvas) => {\n let image = new Image();\n image.src = canvas.toDataURL(\"image/png\");\n return image;\n }\n\n // 小图切换\n squareClick = (index) => {\n this.setState({\n smallactive: index\n });\n this.initCanvas(this.state.bgImage, index);\n }\n\n render() {\n const { distPrice={}, smallListImg=[], smallactive } = this.state;\n return (\n <div className='share-poster'>\n <HeaderBar \n title='生成专属海报' \n arrow={true} \n cart={false}\n />\n <div className=\"total-container\">\n <div className='placard-img-container' id='imgWrapper'>\n <img src={this.state.billSrc.src} alt=\"\" />\n </div>\n <img \n src={this.state.codeSrc} \n alt=\"\" \n id='qrcode' \n className='placard-code'\n />\n <canvas \n id='canvas' \n width='450' \n height='800'\n className={this.state.billSrc === '' ? '' : 'hide'}\n />\n </div>\n <div className='placard-desc'>\n <span className='placard-sharetxt'>\n 长按保存海报分享给好友,每有一人通过您的分享购买该课程,您可以\n {\n distPrice.count_type === 0 &&\n <span className='placard-price'>\n 获得{distPrice.first_level_tip}元的佣金奖励。\n </span>\n }\n {\n distPrice.count_type === 1 &&\n <span className='placard-price'>\n 获得成交金额的{distPrice.first_level_scale}%作为佣金奖励。\n </span>\n }\n </span>\n </div>\n <div className='placard-swiper'>\n <ul className='placard-list'>\n {\n smallListImg.length > 0 && smallListImg.map((item, index) => {\n return (\n <li \n onClick={this.squareClick.bind(this, index)} \n key={index}\n className={smallactive === index ? 'active' : ''}\n >\n <img src={item.square} alt=\"\" />\n </li>\n );\n })\n }\n </ul>\n </div>\n </div>\n );\n }\n}\n\nexport default SharePoster;\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{1196: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),c=a(0),l=a.n(c),u=(a(789),a(15)),p=a(49),d=a(648),h=(a(790),a(155)),m=a(20),f=a(84),v=a(623),y=a.n(v),g=a(41),b=a(27);var E=l.a.memo(function(e){var t=e.addCourseClick;return l.a.createElement("div",{className:"add-course"},l.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 l.a.createElement("span",{className:"record"},n.length?"\u5b66\u4e60\u5230".concat(n):null)}var w=l.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 l.a.createElement("div",{className:"des"},l.a.createElement("span",{className:"time"},s),l.a.createElement(L,{record:t}))}return l.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),c=0;c<n;c++)i[c]=arguments[c];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(g.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 l.a.createElement(b.f,{isLoading:this.props.isLoading},a&&0!==a.length?l.a.createElement(l.a.Fragment,null,l.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)),l.a.createElement(y.a,{pageStart:0,hasMore:!0,loadMore:this.loadFunc,useWindow:!1},l.a.createElement("ul",{ref:function(t){return e.list=t}},a.map(function(t,a){var s=l.a.createElement("div",{className:"info"},l.a.createElement("div",{className:"title"},t.course_title),t.is_aist&&l.a.createElement("div",{className:"contact"},"\u52a9\u6559\u5fae\u4fe1\uff1a",t.assist_weixin),!t.is_aist&&1==t.contact_type&&t.course_qq&&l.a.createElement("div",{className:"contact"},"QQ\u7fa4\uff1a",t.course_qq),!t.is_aist&&2==t.contact_type&&t.course_qq&&l.a.createElement("div",{className:"contact"},"\u73ed\u4e3b\u4efb\u5fae\u4fe1\uff1a",t.course_qq),t.is_aist&&t.aist_schedule&&l.a.createElement("div",{className:"process-status"},l.a.createElement("div",{className:"process-wrapper"},l.a.createElement("div",{className:"process-bar",style:{width:"".concat(parseFloat(t.aist_schedule),"%")}})),l.a.createElement("div",{className:"process-text"},t.aist_schedule)),l.a.createElement(w,{item:t})),n=t.is_aist&&l.a.createElement("span",{className:"status"},"\u8fd4\u73b0");return l.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?l.a.createElement(E,{addCourseClick:this.addCourseClick}):null):l.a.createElement("div",{className:"empty"},l.a.createElement("p",null,l.a.createElement("i",{className:"iconfont iconfish"})),l.a.createElement("p",{className:"empty-prompt"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u8d76\u5feb\u53bb\u9009\u8bfe\u5427~"),l.a.createElement("p",null,l.a.createElement(u.b,{className:"select-course",to:"/classify"},"\u53bb\u9009\u8bfe"))))}}]),t}(c.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),_=(a(43),a(13)),k=a.n(_),O=(a(791),function(e){return l.a.createElement("li",{className:"course-base-item ".concat(e.className),onClick:e.handleClick.bind(void 0,e.id)},e.top,l.a.createElement("img",{src:e.img,alt:""}),l.a.createElement("p",{className:"course-title"},e.title),e.bottom)}),S=a(3),M=a(16),j=a.n(M),P=(a(191),a(792),function(e){return l.a.createElement("div",{className:"bottom"},l.a.createElement(b.i,{className:e.className},e.text),l.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),c=0;c<n;c++)i[c]=arguments[c];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)):k.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}):k.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}):k.a.info(a.msg)}),this.getFreeLive().then(function(t){var a=t.data;200==a.code?e.setState({live:Object(g.isEmpty)(a.data)?[]:a.data}):k.a.info(a.msg,2,null,!1)})}},{key:"render",value:function(){var e=this;return l.a.createElement(y.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=l.a.createElement("div",{className:"bottom"},l.a.createElement("div",{className:"animation-box"},new Array(4).fill("a").map(function(e,t){return l.a.createElement("i",{key:t,className:j()("column","column-".concat(t+1))})})),l.a.createElement("div",{className:"time"},"".concat(t.live_start_time))),n=0==t.live_status?l.a.createElement(b.i,{className:"tag-soon top"},"\u5373\u5c06\u5f00\u59cb"):l.a.createElement(b.i,{className:"tag-playing top"},"\u6b63\u5728\u76f4\u64ad");return l.a.createElement(O,{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 l.a.createElement(O,{img:t.logo,title:t.video_course_name,handleClick:e.handleClick,bottom:l.a.createElement(P,{audience:t.play_times,className:"tag-category",text:t.category}),id:t.v_course_id,key:a,className:"course-item"})}))}}]),t}(c.PureComponent),W=a(165),x=a(160),F=a(24),q=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,i=new Array(n),c=0;c<n;c++)i[c]=arguments[c];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 l.a.createElement("section",{id:"study"},l.a.createElement("div",{className:"tab"},l.a.createElement("div",null,l.a.createElement(u.c,{to:"".concat(e.url,"/my-course"),replace:!0,activeClassName:"active"},"\u6211\u7684\u8bfe\u7a0b")),l.a.createElement("div",null,l.a.createElement(u.c,{to:"".concat(e.url,"/free-course"),replace:!0,activeClassName:"active"},"\u514d\u8d39\u8bfe\u7a0b"))),l.a.createElement("div",{className:"study-container"},l.a.createElement(p.d,null,l.a.createElement(p.a,{exact:!0,from:"/study",to:"study/my-course"}),l.a.createElement(p.b,{path:"".concat(this.props.match.path,"/my-course"),component:N}),l.a.createElement(p.b,{path:"".concat(this.props.match.path,"/free-course"),component:T}))))}}]),t}(c.Component);t.default=Object(F.d)(x.a,W.a)(q)},623:function(e,t,a){e.exports=a(650)},648:function(e,t,a){"use strict";var s=a(0),n=a.n(s);a(649);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)}},649:function(e,t,a){},650: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 c=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,c=(t.loadMore,t.pageStart,t.ref),l=(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"]));l.ref=function(t){e.scrollComponent=t,c&&c(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,l,u)}}]),t}();c.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},c.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=c,e.exports=t.default},789:function(e,t,a){},790:function(e,t,a){},791:function(e,t,a){},792:function(e,t,a){}}]);
//# sourceMappingURL=study.87355657.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=study.7c72c07a.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","contact_type","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,O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ACAA,EAAA2L,IAIA,IAAAC,EAAA,CAAAN,GAUA,OARAzL,IACAgK,EACAlB,EAAAiD,EAAAC,QAAAhC,GAAA+B,EAAAhN,KAAAiL,GACS5K,KAAA6K,gBACTnB,EAAAiD,EAAAC,QAAA5M,KAAA6K,eAAA8B,EAAAhN,KAAAK,KAAA6K,iBAIAhD,EAAAK,QAAA/K,cAAA4H,EAAAtF,EAAAkN,OAIAxE,EArPA,GAwPAA,EAAA0E,UAAA,CACAR,SAAAtE,EAAAG,QAAAwE,KAAAI,WACA/H,QAAAgD,EAAAG,QAAAwE,KACA9L,QAAAmH,EAAAG,QAAA6E,KACA7B,YAAAnD,EAAAG,QAAA6E,KACArD,UAAA3B,EAAAG,QAAA6E,KACAnC,OAAA7C,EAAAG,QAAAwE,KACA7L,SAAAkH,EAAAG,QAAA8E,KAAAF,WACAnM,UAAAoH,EAAAG,QAAA+E,OACAlM,IAAAgH,EAAAG,QAAA8E,KACA/B,gBAAAlD,EAAAG,QAAA8E,KACAhI,UAAA+C,EAAAG,QAAA+E,OACAvC,WAAA3C,EAAAG,QAAA6E,KACAjM,UAAAiH,EAAAG,QAAA6E,MAEA5E,EAAA+E,aAAA,CACAnI,QAAA,MACAnE,SAAA,EACAsK,aAAA,EACAvK,UAAA,EACAI,IAAA,KACAiE,UAAA,IACAlE,WAAA,EACA4I,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAK,gBAAA,MAEAxE,EAAAyB,QAAAC,EACA3B,EAAAC,UAAA","file":"mrstatic/js/study.87355657.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 }\n {\n !item.is_aist && item.contact_type == 1 && item.course_qq &&\n <div className='contact'>QQ群:{item.course_qq}</div>\n }\n {\n !item.is_aist && item.contact_type == 2 && item.course_qq &&\n <div className='contact'>班主任微信:{item.course_qq}</div>\n }\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","contact_type","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,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AK,KAAA6K,iBAIAhD,EAAAK,QAAA/K,cAAA4H,EAAAtF,EAAAkN,OAIAxE,EArPA,GAwPAA,EAAA0E,UAAA,CACAR,SAAAtE,EAAAG,QAAAwE,KAAAI,WACA/H,QAAAgD,EAAAG,QAAAwE,KACA9L,QAAAmH,EAAAG,QAAA6E,KACA7B,YAAAnD,EAAAG,QAAA6E,KACArD,UAAA3B,EAAAG,QAAA6E,KACAnC,OAAA7C,EAAAG,QAAAwE,KACA7L,SAAAkH,EAAAG,QAAA8E,KAAAF,WACAnM,UAAAoH,EAAAG,QAAA+E,OACAlM,IAAAgH,EAAAG,QAAA8E,KACA/B,gBAAAlD,EAAAG,QAAA8E,KACAhI,UAAA+C,EAAAG,QAAA+E,OACAvC,WAAA3C,EAAAG,QAAA6E,KACAjM,UAAAiH,EAAAG,QAAA6E,MAEA5E,EAAA+E,aAAA,CACAnI,QAAA,MACAnE,SAAA,EACAsK,aAAA,EACAvK,UAAA,EACAI,IAAA,KACAiE,UAAA,IACAlE,WAAA,EACA4I,WAAA,EACAgB,YAAA,EACAE,OAAA,KACAK,gBAAA,MAEAxE,EAAAyB,QAAAC,EACA3B,EAAAC,UAAA","file":"mrstatic/js/study.7c72c07a.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 }\n {\n !item.is_aist && item.contact_type == 1 && item.course_qq &&\n <div className='contact'>QQ群:{item.course_qq}</div>\n }\n {\n !item.is_aist && item.contact_type == 2 && item.course_qq &&\n <div className='contact'>班主任微信:{item.course_qq}</div>\n }\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],{1178:function(e,a,t){"use strict";t.r(a);t(156);var n,s=t(74),c=t.n(s),r=(t(90),t(26)),i=t.n(r),o=(t(154),t(35)),l=t.n(o),m=(t(254),t(92)),u=t.n(m),d=(t(43),t(13)),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(895),t(27)),y=t(3),w=t(20),C=t(15),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},895:function(e,a,t){}}]);
//# sourceMappingURL=togroup.c87a3e21.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{1178:function(e,a,t){"use strict";t.r(a);t(156);var n,s=t(74),c=t.n(s),r=(t(90),t(26)),i=t.n(r),o=(t(154),t(35)),l=t.n(o),m=(t(254),t(92)),u=t.n(m),d=(t(43),t(13)),p=t.n(d),E=t(5),f=t(7),h=t(6),v=t(8),N=t(9),_=t(0),g=t.n(_),b=(t(895),t(27)),y=t(3),w=t(20),C=t(15),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(h.a)(this,Object(v.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.h)({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(N.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,h=e.userInfo,v=[],N=E;0!=N;)v.push(N),N--;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)}),v.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;!h.hasError&&m.map(function(e){e.uid==h.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},895:function(e,a,t){}}]);
//# sourceMappingURL=togroup.17748920.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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_10__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_12__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_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,CA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AA3D,OAA2BP,EAAK8D,OAAShE,EAAzC,WAQNgG,EAAM9B,EAAAhD,EAAAiD,cAAA,KAAGrD,KAAK,eAAesD,UAAU,YAAYC,QAAS/E,EAAMkC,eAA5D,6BAQd,OAJmB,IAAfa,IACA0D,EAAM7B,EAAAhD,EAAAiD,cAAA,KAAGC,UAAU,WAAb,4BACN4B,EAAM9B,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.c87a3e21.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_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_10__","this","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_12__","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_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,IAAAD,KAAAE,EAAAH,EACIvB,YADJ,IAAA0B,EACW,GADXA,EAAAC,EAEgBtC,EAA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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.17748920.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],{1195:function(e,t,a){"use strict";a.r(t);a(43);var n,c=a(13),i=a.n(c),o=a(5),s=a(7),r=a(6),d=a(8),l=a(89),u=a(9),m=(a(254),a(92)),p=a.n(m),h=a(0),f=a.n(h),v=a(163),y=(a(793),a(15)),g=a(49),b=a(3),_=a(20),E=(a(73),a(794),a(648)),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(u.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(795),a(16)),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(u.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(796),a(798)),x=a.n(O),k=(a(799),function(e){function t(){return Object(o.a)(this,t),Object(r.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(u.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(782),T=(a(845),a(27)),A=a(38),B=a.n(A),R=a(846),L=a.n(R),D=a(660),M=a(661),W=a(1173),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(u.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(u.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(l.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(l.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(l.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(l.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(u.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(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)},616:function(e,t,a){},648:function(e,t,a){"use strict";var n=a(0),c=a.n(n);a(649);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)}},649:function(e,t,a){},660:function(e,t,a){"use strict";a(43);var n=a(13),c=a.n(n),i=a(5),o=a(7),s=a(6),r=a(8),d=a(89),l=a(9),u=a(0),m=a.n(u),p=(a(616),a(3)),h=a(49),f=a(24),v=a(20),y=a(155),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(d.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(d.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(l.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)},661:function(e,t,a){"use strict";a(43);var n=a(13),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(616),a(3)),p=a(49),h=a(24),f=a(20),v=a(155),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)},793:function(e,t,a){},794:function(e,t,a){},795:function(e,t,a){},799:function(e,t,a){},801:function(e,t){},869:function(e,t){}}]);
//# sourceMappingURL=video.efa90744.chunk.js.map
\ No newline at end of file
//# sourceMappingURL=video.68d3668b.chunk.js.map
\ No newline at end of file
self.__precacheManifest = [
{
"revision": "5e885ef19495aea96832",
"url": "/mrstatic/js/search.5aa44ed1.chunk.js"
"revision": "ebe497e7859273b9aec4",
"url": "/mrstatic/js/search.4a7c2e79.chunk.js"
},
{
"revision": "13541f5d2fc1e1fb3660",
"url": "/mrstatic/js/0.3cda4082.chunk.js"
},
{
"revision": "3a1c7c5b091126cf587c",
"url": "/mrstatic/js/BargainMiddlePage.33851e01.chunk.js"
"revision": "03085c908ff7382fcb4f",
"url": "/mrstatic/js/BargainMiddlePage.c3392e0a.chunk.js"
},
{
"revision": "8edaf2ff2566ed17e2dd22cf4f8ad7ae",
"url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png"
},
{
"revision": "19120dd94fdb9ae79557",
"url": "/mrstatic/js/Classify.d90ec769.chunk.js"
"revision": "6299d4652e0d585469a3",
"url": "/mrstatic/js/Classify.90b28556.chunk.js"
},
{
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "fd3df4232c891f13258f",
"url": "/mrstatic/js/CourseList.2e4e2dee.chunk.js"
"revision": "8953456c68a3188c4615",
"url": "/mrstatic/js/CourseList.84886b88.chunk.js"
},
{
"revision": "c79abf5cb7ae8a82009cf68fe44d1078",
......@@ -40,108 +40,108 @@ self.__precacheManifest = [
"url": "/mrstatic/media/hb_bj.79139f6a.png"
},
{
"revision": "1b72cb6c4b5433b59724",
"url": "/mrstatic/js/Examination.d6cdc9b7.chunk.js"
"revision": "9cd631d03ff714c39d7c",
"url": "/mrstatic/js/Examination.2baf7abf.chunk.js"
},
{
"revision": "a69550bb34ec48c49c7b",
"url": "/mrstatic/js/MyEdit.fe4ce0d0.chunk.js"
"revision": "7463137848e41742a9a7",
"url": "/mrstatic/js/MyEdit.89e50819.chunk.js"
},
{
"revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/mrstatic/media/progress-share-bg.80011994.png"
},
{
"revision": "2f96fb7af319f57067ad",
"url": "/mrstatic/js/Order.863bcecd.chunk.js"
"revision": "32571b36bcebbc88eb6d",
"url": "/mrstatic/js/Order.7967ef7f.chunk.js"
},
{
"revision": "1c70ab32f15fde28e736",
"url": "/mrstatic/js/Orderinfo.5dac860b.chunk.js"
"revision": "e66304168a889a8dd597",
"url": "/mrstatic/js/Orderinfo.bbde0b54.chunk.js"
},
{
"revision": "81a489ac63f2f2df5ab412e0782bd54c",
"url": "/mrstatic/media/kanjia_cg_icon.81a489ac.png"
},
{
"revision": "f60ba5c1c6170d65bc92",
"url": "/mrstatic/js/PayOrder.8993c389.chunk.js"
"revision": "7e1f1f52af078a01c4a6",
"url": "/mrstatic/js/PayOrder.33c0f4f6.chunk.js"
},
{
"revision": "b9b072e1116fd1830cc8f425dc163a6b",
"url": "/mrstatic/media/iconfont.b9b072e1.svg"
},
{
"revision": "9dc707b0631ebb0282d1",
"url": "/mrstatic/js/Preferential.9f4e6030.chunk.js"
"revision": "a60741bed543d2b43c05",
"url": "/mrstatic/js/Preferential.fd7820b1.chunk.js"
},
{
"revision": "258b4b114d3d9be3018cd113b2470a13",
"url": "/mrstatic/media/iconfont.258b4b11.ttf"
},
{
"revision": "8ccab0fa2dd2fb503235",
"url": "/mrstatic/js/SearchResult.6bd7cca1.chunk.js"
"revision": "edfce0bfe3a8fe3b7544",
"url": "/mrstatic/js/SearchResult.23abbb99.chunk.js"
},
{
"revision": "7aa984cefad739ea18edb76c541aa1fd",
"url": "/mrstatic/media/iconfont.7aa984ce.eot"
},
{
"revision": "8f604a467328fc3b733a",
"url": "/mrstatic/js/ShopCart.ab19bf02.chunk.js"
"revision": "8e2f2094dcae8d9fd88b",
"url": "/mrstatic/js/ShopCart.bd20f40a.chunk.js"
},
{
"revision": "e0655d4da66dce391e6b5227b400e037",
"url": "/mrstatic/media/iconfont.e0655d4d.woff"
},
{
"revision": "b39a7c8496b0ff55d7b5",
"url": "/mrstatic/js/aist-share.f08f4fde.chunk.js"
"revision": "06cd9aefc0218d108c94",
"url": "/mrstatic/js/aist-share.785451c0.chunk.js"
},
{
"revision": "6782d9c4c5c69e7e4bdf",
"url": "/mrstatic/js/33.d94fc9be.chunk.js"
"revision": "316cbb9a28037693abd2",
"url": "/mrstatic/js/33.6502a07c.chunk.js"
},
{
"revision": "26c341a3965f7fb2fba4",
"url": "/mrstatic/js/coupons.86ed52ec.chunk.js"
"revision": "b9cf2b36eeeb64d36e75",
"url": "/mrstatic/js/coupons.1f277415.chunk.js"
},
{
"revision": "88be4f4af3153a4412cf",
"url": "/mrstatic/js/32.f11af345.chunk.js"
"revision": "5c35de38dd4390949dc4",
"url": "/mrstatic/js/32.3c62b0cd.chunk.js"
},
{
"revision": "768ee176302f8cb27fdd",
"url": "/mrstatic/js/detail.5aef7224.chunk.js"
"revision": "e1b50f71d02919c1b678",
"url": "/mrstatic/js/detail.db4f5431.chunk.js"
},
{
"revision": "d5b92beaffa74f331eb8",
"url": "/mrstatic/js/31.f3d31bfc.chunk.js"
},
{
"revision": "0092d971eaa68da9044c",
"url": "/mrstatic/js/main.7e89dc2d.chunk.js"
"revision": "007b5ff9b1ea5781322d",
"url": "/mrstatic/js/main.72dd966c.chunk.js"
},
{
"revision": "e42a192f087059b09d74",
"url": "/mrstatic/js/30.012adeac.chunk.js"
},
{
"revision": "fadf9d2fdf3a74ed4852",
"url": "/mrstatic/js/myorders.3ebf22ad.chunk.js"
"revision": "98ee0ae2b23196b6a8cb",
"url": "/mrstatic/js/myorders.be372bac.chunk.js"
},
{
"revision": "f807d0af636880f4a0a8",
"url": "/mrstatic/js/29.072e25d8.chunk.js"
},
{
"revision": "45d0efb7c64ec82b8e5e",
"url": "/mrstatic/js/purchased.f057da65.chunk.js"
"revision": "49f90bb677ae29a06f2c",
"url": "/mrstatic/js/purchased.0893278d.chunk.js"
},
{
"revision": "7cb74b37191b4819fb4b",
"url": "/mrstatic/js/runtime~main.fec949e6.js"
"revision": "d362a2cf4318bba8185b",
"url": "/mrstatic/js/runtime~main.5d074e46.js"
},
{
"revision": "bba2330b2fbf43c212d7",
......@@ -156,35 +156,35 @@ self.__precacheManifest = [
"url": "/mrstatic/js/26.56aeff83.chunk.js"
},
{
"revision": "131ead15a5da9aa48cb4",
"url": "/mrstatic/js/shareposter.1cc92e57.chunk.js"
"revision": "ac27b6e19f120e021b61",
"url": "/mrstatic/js/shareposter.3b77e330.chunk.js"
},
{
"revision": "299e9bb73798652ddbeb",
"url": "/mrstatic/js/25.00f5dee6.chunk.js"
},
{
"revision": "ec9b1c70fd5f11e44c82",
"url": "/mrstatic/js/study.87355657.chunk.js"
"revision": "db460996036c22b15b95",
"url": "/mrstatic/js/study.7c72c07a.chunk.js"
},
{
"revision": "b8cab55eb81300cde238",
"url": "/mrstatic/js/video.efa90744.chunk.js"
"revision": "f5a454a4c066c26f4135",
"url": "/mrstatic/js/video.68d3668b.chunk.js"
},
{
"revision": "3f811c42464b8e844734",
"url": "/mrstatic/js/togroup.c87a3e21.chunk.js"
"revision": "24f4a6322e8784280c92",
"url": "/mrstatic/js/togroup.17748920.chunk.js"
},
{
"revision": "88be4f4af3153a4412cf",
"revision": "5c35de38dd4390949dc4",
"url": "/mrstatic/css/32.6e885738.chunk.css"
},
{
"revision": "b8cab55eb81300cde238",
"revision": "f5a454a4c066c26f4135",
"url": "/mrstatic/css/video.b8d615d9.chunk.css"
},
{
"revision": "768ee176302f8cb27fdd",
"revision": "e1b50f71d02919c1b678",
"url": "/mrstatic/css/detail.63ef174e.chunk.css"
},
{
......@@ -192,7 +192,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/25.60a38a0f.chunk.css"
},
{
"revision": "131ead15a5da9aa48cb4",
"revision": "ac27b6e19f120e021b61",
"url": "/mrstatic/css/shareposter.cde549fc.chunk.css"
},
{
......@@ -200,7 +200,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/27.0710e3e3.chunk.css"
},
{
"revision": "3a1c7c5b091126cf587c",
"revision": "03085c908ff7382fcb4f",
"url": "/mrstatic/css/BargainMiddlePage.247ed778.chunk.css"
},
{
......@@ -208,7 +208,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/28.51412fcd.chunk.css"
},
{
"revision": "5e885ef19495aea96832",
"revision": "ebe497e7859273b9aec4",
"url": "/mrstatic/css/search.e26f3ee9.chunk.css"
},
{
......@@ -216,7 +216,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/29.e292ab6b.chunk.css"
},
{
"revision": "45d0efb7c64ec82b8e5e",
"revision": "49f90bb677ae29a06f2c",
"url": "/mrstatic/css/purchased.c9466779.chunk.css"
},
{
......@@ -224,7 +224,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/30.1133c967.chunk.css"
},
{
"revision": "fadf9d2fdf3a74ed4852",
"revision": "98ee0ae2b23196b6a8cb",
"url": "/mrstatic/css/myorders.e3d68b58.chunk.css"
},
{
......@@ -232,51 +232,51 @@ self.__precacheManifest = [
"url": "/mrstatic/css/31.37fb0c23.chunk.css"
},
{
"revision": "0092d971eaa68da9044c",
"revision": "007b5ff9b1ea5781322d",
"url": "/mrstatic/css/main.5c451943.chunk.css"
},
{
"revision": "3f811c42464b8e844734",
"revision": "24f4a6322e8784280c92",
"url": "/mrstatic/css/togroup.ffd8be6c.chunk.css"
},
{
"revision": "ec9b1c70fd5f11e44c82",
"revision": "db460996036c22b15b95",
"url": "/mrstatic/css/study.c5bde985.chunk.css"
},
{
"revision": "6782d9c4c5c69e7e4bdf",
"revision": "316cbb9a28037693abd2",
"url": "/mrstatic/css/33.400393b7.chunk.css"
},
{
"revision": "26c341a3965f7fb2fba4",
"revision": "b9cf2b36eeeb64d36e75",
"url": "/mrstatic/css/coupons.cf38c16e.chunk.css"
},
{
"revision": "b39a7c8496b0ff55d7b5",
"revision": "06cd9aefc0218d108c94",
"url": "/mrstatic/css/aist-share.f4398072.chunk.css"
},
{
"revision": "8f604a467328fc3b733a",
"revision": "8e2f2094dcae8d9fd88b",
"url": "/mrstatic/css/ShopCart.887eb690.chunk.css"
},
{
"revision": "8ccab0fa2dd2fb503235",
"revision": "edfce0bfe3a8fe3b7544",
"url": "/mrstatic/css/SearchResult.b11acd73.chunk.css"
},
{
"revision": "9dc707b0631ebb0282d1",
"revision": "a60741bed543d2b43c05",
"url": "/mrstatic/css/Preferential.312f2a43.chunk.css"
},
{
"revision": "f60ba5c1c6170d65bc92",
"revision": "7e1f1f52af078a01c4a6",
"url": "/mrstatic/css/PayOrder.68a25070.chunk.css"
},
{
"revision": "2f96fb7af319f57067ad",
"revision": "32571b36bcebbc88eb6d",
"url": "/mrstatic/css/Order.e46f87f2.chunk.css"
},
{
"revision": "1b72cb6c4b5433b59724",
"revision": "9cd631d03ff714c39d7c",
"url": "/mrstatic/css/Examination.17af9370.chunk.css"
},
{
......@@ -284,15 +284,15 @@ self.__precacheManifest = [
"url": "/mrstatic/css/DrawDocument.1bd3da48.chunk.css"
},
{
"revision": "fd3df4232c891f13258f",
"revision": "8953456c68a3188c4615",
"url": "/mrstatic/css/CourseList.edc539ff.chunk.css"
},
{
"revision": "19120dd94fdb9ae79557",
"revision": "6299d4652e0d585469a3",
"url": "/mrstatic/css/Classify.127d35ae.chunk.css"
},
{
"revision": "0c8a9b27fdead7ef934c6578074c5c57",
"revision": "b462dff9b67b0b7039bc0df808d61381",
"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.a9f40c59e58ee7b05e086ba5dd32cf53.js"
"/precache-manifest.6c9d5733e41fe58b10ff4ae5f192042f.js"
);
workbox.clientsClaim();
......
......@@ -3,7 +3,12 @@ import './index.scss'
const VList = (props) => {
return (
<li className='v-list-item' onClick={() => props.toDetail(props.id)}>
<li
className='v-list-item'
onClick={() => {
typeof props.toDetail === 'function' && props.toDetail(props.id)
}}
>
<div className="content">
<div className="cover">
{props.status}
......
......@@ -721,3 +721,19 @@
color: #fff;
}
.course-button__buy--done {
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 61px;
height: 18px;
margin: auto 0;
border-radius: 9px;
font-size: 12px;
color: $white;
text-align: center;
line-height: 18px;
background-color: $bg_active;
}
......@@ -339,6 +339,7 @@ class BargainMiddlePage extends Component {
}
render() {
// console.log(this.state.data);
let thirdRow, btn
// is_artifact 0-再邀请多少人可以使用 1-可以使用未领取 2-已领取 3-已使用
if (this.state.bargainData.is_artifact === 0) {
......@@ -353,19 +354,38 @@ class BargainMiddlePage extends Component {
btn = <button className={'artifact-btn'} onClick={this.useArtifact}>立即使用</button>
}
let bargainBtn
if (this.state.isOriginator !== 1 && this.state.data.assist_status === 0 && this.state.data.bargain_status === 0) {
bargainBtn = <button className='active-btn' onClick={this.friendBargainFirst}>帮好友砍一刀</button>
} else if (this.state.isOriginator !== 1 && this.state.data.assist_status === 1) {
bargainBtn = <button className='active-btn' onClick={this.friendBargainSecond}>再砍一刀</button>
} else if (this.state.isOriginator !== 1 && this.state.data.assist_status === 2) {
bargainBtn = <button className={'invalid-btn'}>已帮好友助力</button>
} else if (this.state.data.bargain_status === 1 || this.state.data.bargain_status === 2) {
bargainBtn = <button className={'invalid-btn'}>砍价结束</button>
} else if (this.state.isOriginator === 1 && this.state.data.bargain_status === 0) {
bargainBtn = <button className='active-btn' onClick={this.shareFriendBargain}>邀请好友砍价</button>
const { data: { is_originator = 0, assist_status = 0, bargain_status = 0 } } = this.state;
let bargainBtn = '';
// assist_status 助力状态 0-未助力,1-已助力一次 2-已助力两次,不能再助力
// is_originator 是否发起人 0-否 1-是
// bargain_status 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买
if(is_originator) {
if(bargain_status === 0) {
bargainBtn = <button className='active-btn' onClick={this.shareFriendBargain}>邀请好友砍价</button>
}
}else {
if(assist_status === 0 && bargain_status === 0) {
bargainBtn = <button className='active-btn' onClick={this.friendBargainFirst}>帮好友砍一刀</button>
}else if (assist_status === 1 && bargain_status === 0) {
bargainBtn = <button className='active-btn' onClick={this.friendBargainSecond}>再砍一刀</button>
}else if (assist_status === 2 && bargain_status === 0) {
bargainBtn = <button className={'invalid-btn'}>已帮好友助力</button>
}else if (bargain_status !== 0) {
bargainBtn = <button className={'invalid-btn'}>砍价结束</button>
}
}
// if (this.state.isOriginator !== 1 && this.state.data.assist_status === 0 && this.state.data.bargain_status === 0) {
// bargainBtn = <button className='active-btn' onClick={this.friendBargainFirst}>帮好友砍一刀</button>
// } else if (this.state.isOriginator !== 1 && this.state.data.assist_status === 1) {
// bargainBtn = <button className='active-btn' onClick={this.friendBargainSecond}>再砍一刀1</button>
// } else if (this.state.isOriginator !== 1 && this.state.data.assist_status === 2) {
// bargainBtn = <button className={'invalid-btn'}>已帮好友助力</button>
// } else if (this.state.data.bargain_status === 1 || this.state.data.bargain_status === 2) {
// bargainBtn = <button className={'invalid-btn'}>砍价结束</button>
// } else if (this.state.isOriginator === 1 && this.state.data.bargain_status === 0) {
// bargainBtn = <button className='active-btn' onClick={this.shareFriendBargain}>邀请好友砍价</button>
// }
return (
<div className={'bargain-middle-page'}>
<HeaderBar title='砍价详情' arrow={true} cart={true} toHref={'/'}></HeaderBar>
......@@ -571,24 +591,30 @@ class BargainMiddlePage extends Component {
}
}
// 课程信息 -- 右侧
function CourseDes(props) {
const data = props.data && props.data.course
const { data: { bargain_status = 0, course = {}, is_originator = 0 }, toCart } = props;
return (
<div className={'des'}>
<div className="course-title text-overflow-2">
{data.course_title}
{course.course_title}
</div>
<div className="price-bar">
<span className={'discount-price'}>{data.course_price}</span>
<span className={'discount-price'}>{course.course_price}</span>
{/* is_originator 是否发起人 0-否 1-是 */}
{
props.isOriginator === 1 &&
<button className={'purchase-btn'}
onClick={props.toCart}>¥{data.pay_price}去支付
(is_originator === 1 && bargain_status !== 3) &&
<button className={'purchase-btn'} onClick={toCart}>
¥{course.pay_price}去支付
</button>
}
{
(is_originator === 1 && bargain_status === 3) &&
<span className="course-button__buy--done">已购买</span>
}
</div>
</div>
)
);
}
function CourseBottom(props) {
......
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