Commit 6d8132bf by zhanghaozhe

Merge branch '11-11' into live

parents 5444dc2c 174840bf
{
"mrstatic/js/0.cc475f61.chunk.js": "/mrstatic/js/0.cc475f61.chunk.js",
"mrstatic/js/0.cc475f61.chunk.js.map": "/mrstatic/js/0.cc475f61.chunk.js.map",
"mrstatic/js/1.5926cefc.chunk.js": "/mrstatic/js/1.5926cefc.chunk.js",
"mrstatic/js/1.5926cefc.chunk.js.map": "/mrstatic/js/1.5926cefc.chunk.js.map",
"BargainMiddlePage.css": "/mrstatic/css/BargainMiddlePage.fc53c3d0.chunk.css",
"BargainMiddlePage.js": "/mrstatic/js/BargainMiddlePage.47d6d11b.chunk.js",
"BargainMiddlePage.js.map": "/mrstatic/js/BargainMiddlePage.47d6d11b.chunk.js.map",
"Classify.css": "/mrstatic/css/Classify.f2f19957.chunk.css",
"Classify.js": "/mrstatic/js/Classify.f4b0e95e.chunk.js",
"Classify.js.map": "/mrstatic/js/Classify.f4b0e95e.chunk.js.map",
"Country.css": "/mrstatic/css/Country.16a64650.chunk.css",
"Country.js": "/mrstatic/js/Country.2f1e3ba6.chunk.js",
"Country.js.map": "/mrstatic/js/Country.2f1e3ba6.chunk.js.map",
"CourseList.css": "/mrstatic/css/CourseList.85889ffd.chunk.css",
"CourseList.js": "/mrstatic/js/CourseList.ad80ef1f.chunk.js",
"CourseList.js.map": "/mrstatic/js/CourseList.ad80ef1f.chunk.js.map",
"DrawDocument.css": "/mrstatic/css/DrawDocument.2e7d81ca.chunk.css",
"DrawDocument.js": "/mrstatic/js/DrawDocument.b607db8f.chunk.js",
"DrawDocument.js.map": "/mrstatic/js/DrawDocument.b607db8f.chunk.js.map",
"Examination.css": "/mrstatic/css/Examination.f2cc3163.chunk.css",
"Examination.js": "/mrstatic/js/Examination.97026877.chunk.js",
"Examination.js.map": "/mrstatic/js/Examination.97026877.chunk.js.map",
"MyEdit.js": "/mrstatic/js/MyEdit.d9cf1de7.chunk.js",
"MyEdit.js.map": "/mrstatic/js/MyEdit.d9cf1de7.chunk.js.map",
"Order.css": "/mrstatic/css/Order.8bb031ea.chunk.css",
"Order.js": "/mrstatic/js/Order.1956906f.chunk.js",
"Order.js.map": "/mrstatic/js/Order.1956906f.chunk.js.map",
"Orderinfo.js": "/mrstatic/js/Orderinfo.c5a68e88.chunk.js",
"Orderinfo.js.map": "/mrstatic/js/Orderinfo.c5a68e88.chunk.js.map",
"PayOrder.css": "/mrstatic/css/PayOrder.e5315535.chunk.css",
"PayOrder.js": "/mrstatic/js/PayOrder.8534c9f2.chunk.js",
"PayOrder.js.map": "/mrstatic/js/PayOrder.8534c9f2.chunk.js.map",
"Preferential.css": "/mrstatic/css/Preferential.cda7a495.chunk.css",
"Preferential.js": "/mrstatic/js/Preferential.b9de8327.chunk.js",
"Preferential.js.map": "/mrstatic/js/Preferential.b9de8327.chunk.js.map",
"SearchResult.css": "/mrstatic/css/SearchResult.bb7c3056.chunk.css",
"SearchResult.js": "/mrstatic/js/SearchResult.82c4db68.chunk.js",
"SearchResult.js.map": "/mrstatic/js/SearchResult.82c4db68.chunk.js.map",
"ShareCourse.css": "/mrstatic/css/ShareCourse.278ad3b1.chunk.css",
"ShareCourse.js": "/mrstatic/js/ShareCourse.543c57d3.chunk.js",
"ShareCourse.js.map": "/mrstatic/js/ShareCourse.543c57d3.chunk.js.map",
"ShopCart.css": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css",
"ShopCart.js": "/mrstatic/js/ShopCart.d6804bde.chunk.js",
"ShopCart.js.map": "/mrstatic/js/ShopCart.d6804bde.chunk.js.map",
"aist-share.css": "/mrstatic/css/aist-share.bef8c404.chunk.css",
"aist-share.js": "/mrstatic/js/aist-share.cde60f9d.chunk.js",
"aist-share.js.map": "/mrstatic/js/aist-share.cde60f9d.chunk.js.map",
"coupons.css": "/mrstatic/css/coupons.2fcc3e06.chunk.css",
"coupons.js": "/mrstatic/js/coupons.1ee98542.chunk.js",
"coupons.js.map": "/mrstatic/js/coupons.1ee98542.chunk.js.map",
"detail.css": "/mrstatic/css/detail.8d310f0f.chunk.css",
"detail.js": "/mrstatic/js/detail.ea824723.chunk.js",
"detail.js.map": "/mrstatic/js/detail.ea824723.chunk.js.map",
"main.css": "/mrstatic/css/main.9977dcb1.chunk.css",
"main.js": "/mrstatic/js/main.62a77b84.chunk.js",
"main.js.map": "/mrstatic/js/main.62a77b84.chunk.js.map",
"myorders.css": "/mrstatic/css/myorders.3ae12dec.chunk.css",
"myorders.js": "/mrstatic/js/myorders.21588e23.chunk.js",
"myorders.js.map": "/mrstatic/js/myorders.21588e23.chunk.js.map",
"purchased.css": "/mrstatic/css/purchased.dd7556e0.chunk.css",
"purchased.js": "/mrstatic/js/purchased.1623b0b5.chunk.js",
"purchased.js.map": "/mrstatic/js/purchased.1623b0b5.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.62f2beae.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.62f2beae.js.map",
"search.css": "/mrstatic/css/search.fab97849.chunk.css",
"search.js": "/mrstatic/js/search.f7766add.chunk.js",
"search.js.map": "/mrstatic/js/search.f7766add.chunk.js.map",
"shareposter.css": "/mrstatic/css/shareposter.f09a5959.chunk.css",
"shareposter.js": "/mrstatic/js/shareposter.456c17f8.chunk.js",
"shareposter.js.map": "/mrstatic/js/shareposter.456c17f8.chunk.js.map",
"study.css": "/mrstatic/css/study.b002c899.chunk.css",
"study.js": "/mrstatic/js/study.0512da7d.chunk.js",
"study.js.map": "/mrstatic/js/study.0512da7d.chunk.js.map",
"togroup.css": "/mrstatic/css/togroup.49988cae.chunk.css",
"togroup.js": "/mrstatic/js/togroup.34d5a4fa.chunk.js",
"togroup.js.map": "/mrstatic/js/togroup.34d5a4fa.chunk.js.map",
"video.css": "/mrstatic/css/video.b57a1aec.chunk.css",
"video.js": "/mrstatic/js/video.71e4de46.chunk.js",
"video.js.map": "/mrstatic/js/video.71e4de46.chunk.js.map",
"mrstatic/css/28.aebbab68.chunk.css": "/mrstatic/css/28.aebbab68.chunk.css",
"mrstatic/js/28.421bdc56.chunk.js": "/mrstatic/js/28.421bdc56.chunk.js",
"mrstatic/js/28.421bdc56.chunk.js.map": "/mrstatic/js/28.421bdc56.chunk.js.map",
"mrstatic/css/29.4c706a4e.chunk.css": "/mrstatic/css/29.4c706a4e.chunk.css",
"mrstatic/js/29.55833d30.chunk.js": "/mrstatic/js/29.55833d30.chunk.js",
"mrstatic/js/29.55833d30.chunk.js.map": "/mrstatic/js/29.55833d30.chunk.js.map",
"mrstatic/css/30.2471f477.chunk.css": "/mrstatic/css/30.2471f477.chunk.css",
"mrstatic/js/30.5be43a00.chunk.js": "/mrstatic/js/30.5be43a00.chunk.js",
"mrstatic/js/30.5be43a00.chunk.js.map": "/mrstatic/js/30.5be43a00.chunk.js.map",
"mrstatic/css/31.0bb224f2.chunk.css": "/mrstatic/css/31.0bb224f2.chunk.css",
"mrstatic/js/31.00acec59.chunk.js": "/mrstatic/js/31.00acec59.chunk.js",
"mrstatic/js/31.00acec59.chunk.js.map": "/mrstatic/js/31.00acec59.chunk.js.map",
"mrstatic/css/32.5ed15c7e.chunk.css": "/mrstatic/css/32.5ed15c7e.chunk.css",
"mrstatic/js/32.63ff864e.chunk.js": "/mrstatic/js/32.63ff864e.chunk.js",
"mrstatic/js/32.63ff864e.chunk.js.map": "/mrstatic/js/32.63ff864e.chunk.js.map",
"mrstatic/css/33.ecbb6f9a.chunk.css": "/mrstatic/css/33.ecbb6f9a.chunk.css",
"mrstatic/js/33.900c665c.chunk.js": "/mrstatic/js/33.900c665c.chunk.js",
"mrstatic/js/33.900c665c.chunk.js.map": "/mrstatic/js/33.900c665c.chunk.js.map",
"index.html": "/index.html",
"mrstatic/css/28.aebbab68.chunk.css.map": "/mrstatic/css/28.aebbab68.chunk.css.map",
"mrstatic/css/29.4c706a4e.chunk.css.map": "/mrstatic/css/29.4c706a4e.chunk.css.map",
"mrstatic/css/30.2471f477.chunk.css.map": "/mrstatic/css/30.2471f477.chunk.css.map",
"mrstatic/css/31.0bb224f2.chunk.css.map": "/mrstatic/css/31.0bb224f2.chunk.css.map",
"mrstatic/css/32.5ed15c7e.chunk.css.map": "/mrstatic/css/32.5ed15c7e.chunk.css.map",
"mrstatic/css/33.ecbb6f9a.chunk.css.map": "/mrstatic/css/33.ecbb6f9a.chunk.css.map",
"mrstatic/css/BargainMiddlePage.fc53c3d0.chunk.css.map": "/mrstatic/css/BargainMiddlePage.fc53c3d0.chunk.css.map",
"mrstatic/css/Classify.f2f19957.chunk.css.map": "/mrstatic/css/Classify.f2f19957.chunk.css.map",
"mrstatic/css/Country.16a64650.chunk.css.map": "/mrstatic/css/Country.16a64650.chunk.css.map",
"mrstatic/css/CourseList.85889ffd.chunk.css.map": "/mrstatic/css/CourseList.85889ffd.chunk.css.map",
"mrstatic/css/DrawDocument.2e7d81ca.chunk.css.map": "/mrstatic/css/DrawDocument.2e7d81ca.chunk.css.map",
"mrstatic/css/Examination.f2cc3163.chunk.css.map": "/mrstatic/css/Examination.f2cc3163.chunk.css.map",
"mrstatic/css/Order.8bb031ea.chunk.css.map": "/mrstatic/css/Order.8bb031ea.chunk.css.map",
"mrstatic/css/PayOrder.e5315535.chunk.css.map": "/mrstatic/css/PayOrder.e5315535.chunk.css.map",
"mrstatic/css/Preferential.cda7a495.chunk.css.map": "/mrstatic/css/Preferential.cda7a495.chunk.css.map",
"mrstatic/css/SearchResult.bb7c3056.chunk.css.map": "/mrstatic/css/SearchResult.bb7c3056.chunk.css.map",
"mrstatic/css/ShareCourse.278ad3b1.chunk.css.map": "/mrstatic/css/ShareCourse.278ad3b1.chunk.css.map",
"mrstatic/css/ShopCart.3a4dbb7a.chunk.css.map": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css.map",
"mrstatic/css/aist-share.bef8c404.chunk.css.map": "/mrstatic/css/aist-share.bef8c404.chunk.css.map",
"mrstatic/css/coupons.2fcc3e06.chunk.css.map": "/mrstatic/css/coupons.2fcc3e06.chunk.css.map",
"mrstatic/css/detail.8d310f0f.chunk.css.map": "/mrstatic/css/detail.8d310f0f.chunk.css.map",
"mrstatic/css/main.9977dcb1.chunk.css.map": "/mrstatic/css/main.9977dcb1.chunk.css.map",
"mrstatic/css/myorders.3ae12dec.chunk.css.map": "/mrstatic/css/myorders.3ae12dec.chunk.css.map",
"mrstatic/css/purchased.dd7556e0.chunk.css.map": "/mrstatic/css/purchased.dd7556e0.chunk.css.map",
"mrstatic/css/search.fab97849.chunk.css.map": "/mrstatic/css/search.fab97849.chunk.css.map",
"mrstatic/css/shareposter.f09a5959.chunk.css.map": "/mrstatic/css/shareposter.f09a5959.chunk.css.map",
"mrstatic/css/study.b002c899.chunk.css.map": "/mrstatic/css/study.b002c899.chunk.css.map",
"mrstatic/css/togroup.49988cae.chunk.css.map": "/mrstatic/css/togroup.49988cae.chunk.css.map",
"mrstatic/css/video.b57a1aec.chunk.css.map": "/mrstatic/css/video.b57a1aec.chunk.css.map",
"mrstatic/media/index.scss": "/mrstatic/media/redb_sp_bj@2x.6902434f.png",
"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.543dcc7fca119c88406da24906433f0d.js": "/precache-manifest.543dcc7fca119c88406da24906433f0d.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/28.aebbab68.chunk.css" rel="stylesheet"><link href="/mrstatic/css/main.9977dcb1.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={22:0},l={22: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]&&{2:1,3:1,4:1,5:1,6:1,7:1,9:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,20:1,21:1,23:1,24:1,25:1,26:1,27: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/"+({2:"BargainMiddlePage",3:"Classify",4:"Country",5:"CourseList",6:"DrawDocument",7:"Examination",8:"MyEdit",9:"Order",10:"Orderinfo",11:"PayOrder",12:"Preferential",13:"SearchResult",14:"ShareCourse",15:"ShopCart",16:"aist-share",17:"coupons",18:"detail",20:"myorders",21:"purchased",23:"search",24:"shareposter",25:"study",26:"togroup",27:"video"}[u]||u)+"."+{0:"31d6cfe0",1:"31d6cfe0",2:"fc53c3d0",3:"f2f19957",4:"16a64650",5:"85889ffd",6:"2e7d81ca",7:"f2cc3163",8:"31d6cfe0",9:"8bb031ea",10:"31d6cfe0",11:"e5315535",12:"cda7a495",13:"bb7c3056",14:"278ad3b1",15:"3a4dbb7a",16:"bef8c404",17:"2fcc3e06",18:"8d310f0f",20:"3ae12dec",21:"dd7556e0",23:"fab97849",24:"f09a5959",25:"b002c899",26:"49988cae",27:"b57a1aec",29:"4c706a4e",30:"2471f477",31:"0bb224f2",32:"5ed15c7e",33:"ecbb6f9a"}[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/"+({2:"BargainMiddlePage",3:"Classify",4:"Country",5:"CourseList",6:"DrawDocument",7:"Examination",8:"MyEdit",9:"Order",10:"Orderinfo",11:"PayOrder",12:"Preferential",13:"SearchResult",14:"ShareCourse",15:"ShopCart",16:"aist-share",17:"coupons",18:"detail",20:"myorders",21:"purchased",23:"search",24:"shareposter",25:"study",26:"togroup",27:"video"}[u]||u)+"."+{0:"cc475f61",1:"5926cefc",2:"47d6d11b",3:"f4b0e95e",4:"2f1e3ba6",5:"ad80ef1f",6:"b607db8f",7:"97026877",8:"d9cf1de7",9:"1956906f",10:"c5a68e88",11:"8534c9f2",12:"b9de8327",13:"82c4db68",14:"543c57d3",15:"d6804bde",16:"cde60f9d",17:"1ee98542",18:"ea824723",20:"21588e23",21:"1623b0b5",23:"f7766add",24:"456c17f8",25:"0512da7d",26:"34d5a4fa",27:"71e4de46",29:"55833d30",30:"5be43a00",31:"00acec59",32:"63ff864e",33:"900c665c"}[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/28.421bdc56.chunk.js"></script><script src="/mrstatic/js/main.62a77b84.chunk.js"></script></body></html>
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{1123:function(e,t,a){},1124:function(e,t,a){},1125:function(e,t,a){},1126:function(e,t){e.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="},1127:function(e,t,a){e.exports=a.p+"mrstatic/media/kanjia_cg_icon.81a489ac.png"},1128:function(e,t,a){},1129:function(e,t,a){},1130:function(e,t,a){},1131:function(e,t,a){},1132:function(e,t,a){},1133:function(e,t,a){},1134:function(e,t,a){"use strict";var n=a(1135).CopyToClipboard;n.CopyToClipboard=n,e.exports=n},1135:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},o=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),c=i(a(0)),s=i(a(1136));function i(e){return e&&e.__esModule?e:{default:e}}function r(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}(t.CopyToClipboard=function(e){function t(){var e,a,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),l=0;l<o;l++)i[l]=arguments[l];return a=n=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.onClick=function(e){var t=n.props,a=t.text,o=t.onCopy,i=t.children,r=t.options,l=c.default.Children.only(i),d=(0,s.default)(a,r);o&&o(a,d),l&&l.props&&"function"===typeof l.props.onClick&&l.props.onClick(e)},r(n,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,c.default.PureComponent),o(t,[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),a=function(e,t){var a={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}(e,["text","onCopy","options","children"]),o=c.default.Children.only(t);return c.default.cloneElement(o,n({},a,{onClick:this.onClick}))}}]),t}()).defaultProps={onCopy:void 0,options:void 0}},1136:function(e,t,a){"use strict";var n=a(1137),o="Copy to clipboard: #{key}, Enter";e.exports=function(e,t){var a,c,s,i,r,l,d=!1;t||(t={}),a=t.debug||!1;try{if(s=n(),i=document.createRange(),r=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(a){a.stopPropagation(),t.format&&(a.preventDefault(),a.clipboardData.clearData(),a.clipboardData.setData(t.format,e))}),document.body.appendChild(l),i.selectNodeContents(l),r.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(u){a&&console.error("unable to copy using execCommand: ",u),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),d=!0}catch(u){a&&console.error("unable to copy using clipboardData: ",u),a&&console.error("falling back to prompt"),c=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:o),window.prompt(c,e)}}finally{r&&("function"==typeof r.removeRange?r.removeRange(i):r.removeAllRanges()),l&&document.body.removeChild(l),s()}return d}},1137:function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,a=[],n=0;n<e.rangeCount;n++)a.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||a.forEach(function(t){e.addRange(t)}),t&&t.focus()}}},1138:function(e,t,a){},1139:function(e,t,a){},1194:function(e,t,a){"use strict";a.r(t);var n=a(19),o=(a(41),a(13)),c=a.n(o),s=a(5),i=a(7),r=a(6),l=a(8),d=a(9),u=a(74),p=a(0),m=a.n(p),f=(a(1123),a(83)),h=(a(90),a(25)),b=a.n(h),g=(a(1124),a(632)),_=a(82),v=(a(1125),a(3)),E=a(15),y=a(16),N=a.n(y),S=function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(a=Object(r.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(o)))).state={mobile:"",code:"",num:"86",isBargain:!0,isFocus:!1,bindInfo:{},isTip:!1,seconds:60,isTimer:!1},a.handleChange=function(e){var t=e.target,n=t.name,o=t.value;a.setState(Object(_.a)({},n,o))},a.sendCode=function(){var e=a.props.country,t=a.state,n=t.mobile,o=t.isTimer,s=t.seconds;if(!o){if(!/^\d+$/.test(n))return void c.a.info("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7");v.d.post("".concat(API["passport-api"],"/m/personal/bindPhoneSendCode"),{area_code:"00".concat(e),phone_num:n}).then(function(e){var t=e.data,n=t.errno,o=t.msg;200===n?(c.a.info("\u9a8c\u8bc1\u7801\u53d1\u9001\u6210\u529f",2,null,!1),a.timer=window.setInterval(function(){console.log(s),s<=0?(window.clearInterval(a.timer),a.setState({isTimer:!1,seconds:60})):a.setState({isTimer:!0,seconds:--s})},1e3)):c.a.info(o)})}},a.handleClick=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=a.props,n=t.country,o=t.iWantBargain,s=a.state,i=s.code,r=s.mobile;r?i?v.d.post("".concat(API["passport-api"],"/m/personal/bindPhone"),{area_code:"00".concat(n),phone_num:r,code:i,type:1,is_valid:e}).then(function(t){var n=t.data,s=n.errno,i=n.data,r=n.msg;200===s?e&&i.tip_info?a.setState({isTip:!0,bindInfo:i.tip_info}):o():c.a.info(r)}):c.a.info("\u8bf7\u586b\u5199\u9a8c\u8bc1\u7801"):c.a.info("\u8bf7\u586b\u624b\u673a\u53f7\u7801")},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){var e=this,t=this.props,a=t.country,n=t.toClose,o=this.state,c=o.mobile,s=o.code,i=o.isBargain,r=o.isFocus,l=o.bindInfo,d=o.isTip,u=o.isTimer,p=o.seconds,f=/^\d+$/.test(c);return m.a.createElement(m.a.Fragment,null,d&&m.a.createElement("div",{className:"popup-bind popup-bind--bargain"},m.a.createElement("div",{className:"popup-bind__content"},m.a.createElement("h4",{className:"popup-bind__title"},"\u7ed1\u5b9a\u786e\u8ba4"),m.a.createElement("p",{className:"popup-bind__desc"},"\u8be5\u624b\u673a\u53f7\u5df2\u7ed1\u5b9a\u5230\u4ee5\u4e0b\u8d26\u53f7\uff0c\u7ee7\u7eed\u7ed1\u5b9a\u5c06\u89e3\u9664\u4ee5\u4e0b\u7ed1\u5b9a\u72b6\u6001"),m.a.createElement("ul",{className:"popup-bind__list"},l.email&&m.a.createElement("li",{className:"popup-bind__account"},m.a.createElement("i",{className:"iconfont iconduanxin"}),m.a.createElement("p",{className:"popup-bind__account--name"},l.email)),l.wechat_nickname&&m.a.createElement("li",{className:"popup-bind__account"},m.a.createElement("i",{className:"icon-wachat"}),m.a.createElement("p",{className:"popup-bind__account--name"},l.wechat_nickname)),l.qq_nickname&&m.a.createElement("li",{className:"popup-bind__account"},m.a.createElement("i",{className:"icon-qq"}),m.a.createElement("p",{className:"popup-bind__account--name"},l.qq_nickname)),l.sina_nickname&&m.a.createElement("li",{className:"popup-bind__account"},m.a.createElement("i",{className:"icon-sina"}),m.a.createElement("p",{className:"popup-bind__account--name"},l.sina_nickname))),m.a.createElement("div",{className:"popup-bind__button"},m.a.createElement("button",{className:"popup-bind__button--cancle",onClick:n},"\u53d6\u6d88"),m.a.createElement("button",{className:"popup-bind__button--confirm",onClick:function(){return e.handleClick(0)}},"\u7ee7\u7eed\u7ed1\u5b9a")))),!d&&m.a.createElement("div",{className:"bargain-phone-popup"},m.a.createElement("h2",{className:"bargain-phone-popup__title"},"\u7ed1\u5b9a\u624b\u673a\uff0c\u5148\u780d\u4e00\u5200"),m.a.createElement("div",{className:N()("bargain-phone-popup__item",{active:r})},m.a.createElement(E.b,{className:"bargain-phone-popup__button--num",to:"/country?id=".concat(Object(v.c)("id"),"&from=bargain")},"+",a,m.a.createElement("i",{className:"iconfont iconiconfront-69"})),m.a.createElement("input",{className:"bargain-phone-popup__ipt",type:"tel",onChange:this.handleChange,onFocus:function(){e.setState({isFocus:!0})},onBlur:function(){e.setState({isFocus:!1})},name:"mobile",placeholder:"\u624b\u673a\u53f7",maxLength:11})),m.a.createElement("div",{className:"bargain-phone-popup__item"},m.a.createElement("input",{type:"tel",id:"code",onChange:this.handleChange,name:"code",placeholder:"\u9a8c\u8bc1\u7801",maxLength:6}),m.a.createElement("button",{type:"button",className:N()("bargain-phone-popup__button--send",{active:f}),onClick:this.sendCode},u?"\u91cd\u65b0\u53d1\u9001".concat(p,"s"):"\u53d1\u9001\u9a8c\u8bc1\u7801")),i?m.a.createElement("button",{type:"button",onClick:function(){return e.handleClick()},className:N()("bargain-phone-popup__button--bargain",{active:f&&s})},"\u5148\u780d\u4e00\u5200"):m.a.createElement(E.b,{className:"bargain-phone-popup__button--bargain active",to:"/passport/login"},"\u53bb\u767b\u5f55")))}}]),t}(p.Component),w=a(156),k=a(672),j=a(23),C=a(48),I=a(20),O=(a(742),function(e){function t(e){var n;return Object(s.a)(this,t),(n=Object(r.a)(this,Object(l.a)(t).call(this,e))).judgePopupTypeFromCountry=function(){var e=n.props,t=e.country,a=e.delCountryNum;t.from&&"bargain"===t.from&&(n.setState({country:t.num,isShowOverlay:!0,status:3}),a())},n.getBargainRankList=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v.d.post("".concat(API.home,"/m/bargain/rankList"),e).then(function(e){200===e.data.code?n.setState({list:e.data.data.list,outList:e.data.data.list[0]}):c.a.info(e.data.msg,2)})},n.getBargainInfo=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={courseId:Object(v.c)("id")};v.d.post("".concat(API.home,"/m/bargain/courseDetail"),t).then(function(t){var a=t.data,o=a.code,s=a.data,i=a.msg,r=void 0===i?"":i;200===o?(n.setState({barInfo:s}),e&&(0!==s.bargain_status&&1!==s.bargain_status||n.getBargainRankList({type:0,bargain_code:s.bargain_code}))):c.a.info(r,2)})},n.getMore=function(){n.setState({isShowMore:!0})},n.boxHide=function(e){n.setState({isShowMore:e})},n.toArtifact=function(){var e={courseId:Object(v.c)("id")};v.d.post("".concat(API.home,"/m/bargain/receiveLimit"),e).then(function(e){200===e.data.code?(n.setState({isShowOverlay:!0,status:1}),n.getBargainInfo(!1)):c.a.info(e.data.msg,2)})},n.useArtifact=function(){n.toKanjia(Object(v.c)("id"),2,0)},n.toCart=function(){var e={course_id:Object(v.c)("id")};v.d.post("".concat(API.home,"/m/cart/add"),e).then(function(e){200===e.data.code||15001===e.data.code?n.props.history.push("/shopcart"):c.a.info(e.data.msg,2)})},n.continueBargain=function(){var e=n.state.barInfo,t=(void 0===e?{}:e).bargain_code;n.props.history.push("/bargain-middle-page?id=".concat(Object(v.c)("id"),"&bargaincode=").concat(t,"&is_originator=1"))},n.iWantBargain=function(){var e=n.props,t=e.history,a=e.user;a&&a.data&&a.data.uid?n.toKanjia(Object(v.c)("id"),1,0):t.push("/passport/login")},n.toKanjia=function(e,t,a){var o={course_id:e,type:t,parent_uid:a},s=n.props.history;v.d.post("".concat(API.home,"/m/bargain/toBargain"),o).then(function(e){var a=e.data,o=a.data;200===a.code?2===o.user_status?n.setState({isShowOverlay:!0,status:3}):2===t?(n.setState({isShowOverlay:!0,status:2,price:o.amount,sum:o.bargain_price}),n.getBargainInfo(!1),n.getBargainRankList({type:0,bargain_code:o.bargain_code})):s.push("/bargain-middle-page?id=".concat(Object(v.c)("id"),"&bargaincode=").concat(o.bargain_code,"&is_originator=1")):c.a.info(e.data.msg,2)})},n.close=function(){n.setState({isShowOverlay:!1,status:""})},n.state={isShowOverlay:!1,kanjiaIcon:a(1126),info:"",outList:[],list:[],limitPeople:"",status:"",bargainCode:"",time:"",barInfo:{},country:"86",price:0,sum:0},n}return Object(d.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.getBargainInfo(),this.judgePopupTypeFromCountry()}},{key:"render",value:function(){var e=this.state,t=e.list,a=e.outList,n=e.barInfo,o=e.country,c=e.price,s=e.sum,i=this.props.user,r=i&&i.data&&i.data.uid;return m.a.createElement("div",{className:"bargain-func"},(2===n.bargain_status||"139"===Object(v.c)("id")&&3===n.bargain_status||!r)&&m.a.createElement(P,{limitPeople:n.limit_people,iWantBargain:this.iWantBargain}),(0===n.bargain_status||1===n.bargain_status)&&r&&m.a.createElement(x,{info:n,outList:a,getMore:this.getMore,toArtifact:this.toArtifact,useArtifact:this.useArtifact,continueBargain:this.continueBargain}),this.state.isShowOverlay&&m.a.createElement(g.a,null,3===this.state.status&&m.a.createElement(S,{country:o,iWantBargain:this.iWantBargain,toClose:this.close}),1===this.state.status&&m.a.createElement(A,{useArtifact:this.useArtifact}),2===this.state.status&&m.a.createElement(T,{price:c,sum:s,toCart:this.toCart}),0!==this.state.status&&m.a.createElement("i",{onClick:this.close,className:"iconfont iconiconfront-2 bargain-close"})),m.a.createElement(k.a,{list:t,icon:this.state.kanjiaIcon,limitPeople:n.limit_people,isShowMore:this.state.isShowMore,boxHide:this.boxHide}))}}]),t}(p.Component));function P(e){return m.a.createElement("div",{className:"intro-outer"},m.a.createElement("div",{className:"intro-inner"},m.a.createElement(b.a,{direction:"column",justify:"center",className:"intro-wrapper"},m.a.createElement("p",null,"\u9080\u8bf7",m.a.createElement("span",{className:"indicator"},e.limitPeople,"\u4f4d"),"\u597d\u53cb\u5e2e\u5fd9\u780d\u4ef7\u53ef\u83b7\u5f97",m.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),m.a.createElement("p",null,"\u4e00\u5200\u7edd\u6740\uff0c\u780d\u7206\u5e95\u4ef7"),m.a.createElement(b.a.Item,null,m.a.createElement("button",{onClick:e.iWantBargain},"\u6211\u8981\u780d\u4ef7")))))}function x(e){var t,a,n=Object(p.useState)(0),o=Object(f.a)(n,2),c=o[0],s=o[1],i=Object(p.useState)(0),r=Object(f.a)(i,2),l=r[0],d=r[1],u=Object(p.useState)(0),h=Object(f.a)(u,2),g=h[0],_=h[1],v=Object(p.useState)(0),E=Object(f.a)(v,2),y=E[0],N=E[1];0===e.info.is_artifact?t=m.a.createElement("div",null,"\u518d\u9080\u8bf7",m.a.createElement("span",{className:"indicator"},e.info.invit_num),"\u4f4d\u597d\u53cb\u52a9\u529b\u5373\u53ef\u83b7\u5f97",m.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")):1===e.info.is_artifact?(t=m.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",m.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),a=m.a.createElement("button",{onClick:e.toArtifact},"\u7acb\u5373\u9886\u53d6")):2===e.info.is_artifact&&(t=m.a.createElement("div",null,"\u606d\u559c\u4f60\u83b7\u5f97",m.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011")),a=m.a.createElement("button",{onClick:e.useArtifact},"\u7acb\u5373\u4f7f\u7528"));var S=1e3*e.info.end_time,k=Date.now();return setInterval(function(){S-=1e3,N(Object(w.differenceInSeconds)(new Date(S),k)%60),_(Object(w.differenceInMinutes)(new Date(S),k)%60),d(Object(w.differenceInHours)(new Date(S),k)%24),s(Object(w.differenceInDays)(new Date(S),k)%24)},1e3),m.a.createElement("div",{className:"status-outer"},0===e.info.bargain_status&&m.a.createElement("div",{className:"status-inner"},m.a.createElement(b.a,{direction:"column"},m.a.createElement("div",{className:"first-row"},m.a.createElement("div",null,"\u5df2\u780d",m.a.createElement("span",{className:"indicator"},e.info.bargain_price,"\u5143"),m.a.createElement("span",{className:"time hour"},String(l).padStart(2,0))," :\xa0",m.a.createElement("span",{className:"time min"},String(g).padStart(2,0))," :\xa0",m.a.createElement("span",{className:"time sec"},String(y).padStart(2,0)),m.a.createElement("span",{className:"over"},"\u540e\u780d\u4ef7\u7ed3\u675f")),m.a.createElement("div",{onClick:e.getMore},e.info.assist_num,"\u4f4d\u597d\u53cb\u52a9\u529b>")),m.a.createElement("div",{className:"sec-row"},m.a.createElement("div",null,m.a.createElement("img",{src:e.outList.avatar_file,alt:""}),m.a.createElement("span",{className:"name"},e.outList.user_name)),m.a.createElement("div",null,m.a.createElement("div",null,"\u780d\u6389",m.a.createElement("span",{className:"indicator"},e.outList.amount,"\u5143")),m.a.createElement("button",{onClick:e.continueBargain},"\u7ee7\u7eed\u780d\u4ef7"))),m.a.createElement("div",{className:"third-row"},t,a))),1===e.info.bargain_status&&m.a.createElement("div",{className:"status-inner status-over"},m.a.createElement(b.a,{direction:"column"},m.a.createElement("div",{className:"first-row"},m.a.createElement("div",null,"\u5df2\u780d",m.a.createElement("span",{className:"indicator"},e.info.bargain_price,"\u5143"),m.a.createElement("span",{className:"bargain-over"},"\u780d\u4ef7\u7ed3\u675f")),m.a.createElement("div",{onClick:e.getMore},e.info.assist_num,"\u4f4d\u597d\u53cb\u52a9\u529b>")),m.a.createElement("div",{className:"time-tobuy"},"\u780d\u4ef7\u91d1\u989d\u5c06\u4e8e",m.a.createElement("span",{className:"time hour"},String(c).padStart(2,0)),m.a.createElement("span",{className:"unit"}," \u5929 "),m.a.createElement("span",{className:"time min"},String(l).padStart(2,0)),m.a.createElement("span",{className:"unit"}," \u65f6 "),m.a.createElement("span",{className:"time sec"},String(g).padStart(2,0)),m.a.createElement("span",{className:"unit"},"\u5206"),"\u540e\u6e05\u96f6\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u652f\u4ed8"))))}function A(e){return m.a.createElement("div",{className:"artifact-box"},m.a.createElement("p",{className:"top-tip"},"\u606d\u559c\u4f60\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011\uff01"),m.a.createElement("p",{className:"middle-tip"},"\u60a8\u53ef\u4ee5\u4f7f\u7528",m.a.createElement("span",{className:"indicator"},"\u3010\u780d\u4ef7\u795e\u5668\u3011"),"\u518d\u780d\u4e00\u5200"),m.a.createElement("button",{className:"use-artifact",onClick:e.useArtifact},"\u7acb\u5373\u4f7f\u7528"))}function T(e){var t=e.sum,n=e.price;return m.a.createElement("div",{className:"use-artifact-box"},m.a.createElement("img",{className:"top-img",src:a(1127),alt:""}),m.a.createElement("p",{className:"top-tip"},"\u5389\u5bb3\u4e86\uff0c\u53c8\u780d\u6389\u4e86",n,"\u5143\uff01"),m.a.createElement("p",{className:"middle-tip"},"\u4f60\u5df2\u7ecf\u780d\u4e86",m.a.createElement("span",{className:"indicator"},t,"\u5143"),"\u6ca1\u89c1\u8fc7\u4f60\u8fd9\u4e48\u80fd\u780d\u7684\u4eba..."),m.a.createElement("p",{className:"btm-tip"},"\u4e0d\u80fd\u518d\u780d\u4e86\u54e6~"),m.a.createElement("button",{className:"tubuy",onClick:e.toCart},"\u53bb\u652f\u4ed8"))}var B=Object(j.d)(Object(I.b)(function(e){return{user:e.user}},null),C.g)(O),D=(a(1128),function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(r.a)(this,Object(l.a)(t).call(this,e))).getMore=function(){a.setState({isShowMore:!0})},a.closeMore=function(){a.setState({isShowMore:!1})},a.toPay=function(e){var t=a.props,n=t.courseInfo,o=t.history;3===n.group_status?o.push("/order?id=".concat(Object(v.c)("id")),{group:1,pdd_order_id:e}):a.setState({isShowMore:!1,alreadyIn:!0})},a.invitedFriends=function(){a.setState({isShowMore:!1,alreadyIn:!1}),a.props.invitedFriends()},a.hideMbc=function(){a.setState({alreadyIn:!1})},a.formatTimeByMillisecond=function(e){var t,a,n,o=1e3*e;return o-=1e3,t="".concat(parseInt(o/36e5)).padStart(2,0),a="".concat(parseInt((o-36e5*t)/6e4)).padStart(2,0),n="".concat(parseInt((o-36e5*t-6e4*a)/1e3)).padStart(2,0),"".concat(t,":").concat(a,":").concat(n)},a.state={isShowMore:!1,alreadyIn:!1,pdd_price:0,number:0,data:{},countdown:e.countdown,now_groupon_list:[]},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"componentWillReceiveProps",value:function(e){if(e.courseInfo&&e.courseInfo.courseInfo&&e.courseInfo.courseInfo.course_info&&e.courseInfo.courseInfo.course_info.pdd_group_info){var t=e.courseInfo.courseInfo.course_info.pdd_group_info.now_groupon_list;t&&t.length>0&&(t.map(function(e){return e.end_time-=1,e}),this.setState({now_groupon_list:t}))}this.setState({countdown:e.countdown})}},{key:"componentDidMount",value:function(){var e=this,t=this.props.courseInfo,a=void 0===t?{}:t;if(a.pdd_group_info){var n=a.pdd_group_info.now_groupon_list;n&&n.length>0&&setInterval(function(){n.map(function(e){return e.end_time-=1,e}),e.setState({now_groupon_list:n})},1e3)}}},{key:"render",value:function(){var e=this,t=this.props.courseInfo,a=this.state,n=a.alreadyIn,o=a.countdown,c=(a.now_groupon_list,""),s="",i=-1,r=null;if(t&&(s=(c=t.pdd_group_info).groupon_member,i=t.group_status),4===i&&s.member){for(var l=[],d=s.number;0!=d;)l.push(d),d--;var u=m.a.createElement("div",{className:"group-user-list"},m.a.createElement(b.a,{justify:"center",className:"imgList"},s.member.map(function(e){return m.a.createElement("div",{className:"imgContainer",key:Math.random()},m.a.createElement("img",{className:"imgname",src:e.avatar,alt:""}),1===e.user_type?m.a.createElement("div",{className:"leaderFlag"},m.a.createElement("span",null,"\u56e2\u957f")):null)}),l.map(function(e){return m.a.createElement("div",{className:"imgContainer",key:Math.random()},m.a.createElement("div",{className:"imgname"},m.a.createElement("i",{className:"iconfont iconwode-xianxing no-body"})))})));r=m.a.createElement("div",{className:"groupSuccessMbc",onClick:this.hideMbc},m.a.createElement("div",{className:"content"},m.a.createElement("p",null,"\u4f60\u5df2\u53c2\u56e2"),u,m.a.createElement("div",{className:"group-btn",onClick:this.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",o," \u540e\u7ed3\u675f"),m.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")))}return m.a.createElement("div",{className:"group-box"},m.a.createElement("div",{className:"group-title"},m.a.createElement("span",null,c.now_groupon_total,"\u4eba\u6b63\u5728\u5f00\u56e2\uff0c\u53ef\u76f4\u63a5\u53c2\u4e0e"),m.a.createElement("span",{className:"more",onClick:this.getMore},"\u67e5\u770b\u66f4\u591a",m.a.createElement("i",{className:"iconfont iconiconfront-70"}))),m.a.createElement("ul",{className:"group-list"},c.now_groupon_list&&c.now_groupon_list.length>0&&c.now_groupon_list.map(function(t,a){return m.a.createElement("li",{key:a,className:"group-item"},m.a.createElement("img",{className:"avatar",src:t.avatar,alt:""}),m.a.createElement("div",{className:"user-name text-overflow-one"},t.user_name),m.a.createElement("div",{className:"group-status"},m.a.createElement("p",null,"\u8fd8\u5dee",m.a.createElement("span",{className:"red"},t.number,"\u4eba"),"\u62fc\u6210"),m.a.createElement("p",null,"\u5269\u4f59 ",e.formatTimeByMillisecond(t.end_time))),m.a.createElement("span",{onClick:function(){e.toPay(t.pdd_order_id)},className:"topay"},"\u53bb\u53c2\u56e2"))})),m.a.createElement("div",{className:"group-dec"},m.a.createElement("span",null,m.a.createElement("i",{className:"iconfont iconiconfront-1"}),"\xb7\u597d\u53cb\u53c2\u56e2 \xb7\u4eba\u6ee1\u6210\u4ea4 \xb7\u4eba\u4e0d\u6ee1\u9000\u6b3e"),m.a.createElement("span",{className:"allNum"},"\u7d2f\u8ba1".concat(c.person_num,"\u4eba\u6210\u56e2"))),n&&4===i&&m.a.createElement(m.a.Fragment,null,r),this.state.isShowMore&&m.a.createElement("div",{className:"moreMbc"},m.a.createElement("div",{className:"content"},m.a.createElement("div",{className:"title-box"},"\u6b63\u5728\u62fc\u56e2"),m.a.createElement("ul",{className:"more-group-list"},c.now_groupon_list&&c.now_groupon_list.length>0&&c.now_groupon_list.map(function(t,a){return m.a.createElement("li",{key:a,className:"group-item"},m.a.createElement("img",{className:"avatar",src:t.avatar,alt:""}),m.a.createElement("div",{className:"user-name"},m.a.createElement("p",{className:"name text-overflow-one"},t.user_name),m.a.createElement("p",{className:"time"},"\u5269\u4f59 ",e.formatTimeByMillisecond(t.end_time))),m.a.createElement("p",{className:"group-status"},"\u8fd8\u5dee",t.number,"\u4eba"),m.a.createElement("span",{onClick:function(){e.toPay(t.pdd_order_id)},className:"topay"},"\u53bb\u53c2\u56e2"))})),m.a.createElement("div",{className:"more-group-dec"},"\u4ec5\u663e\u793a10\u4e2a\u6b63\u5728\u5f00\u56e2\u7684\u4eba"),m.a.createElement("i",{onClick:this.closeMore,className:"iconfont iconiconfront-2 close"}))))}}]),t}(p.Component)),M=(a(159),a(91)),R=a.n(M),z=(a(155),a(35)),F=a.n(z),L=(a(1129),a(165)),W=a(26),U=function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(r.a)(this,Object(l.a)(t).call(this,e))).htmlDecode=function(e){return e&&(e=(e=(e=(e=(e=e.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/&amp;gt;/g,"")).replace(/&quot;/g,'"')).replace(/&amp;nbsp;/g,"")),e},a.getList=function(){v.d.get("".concat(API.home,"/m/course/syllabuses/").concat(Object(v.c)("id"))).then(function(e){200===e.data.code?a.setState({stageInfo:e.data.data}):c.a.info(e.data.msg,2)})},a.changeTab=function(e,t){a.setState({tab:t})},a.state={stageInfo:[],tab:0},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"render",value:function(){var e=this,t="";return this.props.data&&(t=this.props.data),m.a.createElement("div",{className:"course-detail"},m.a.createElement(F.a,null),m.a.createElement(L.StickyContainer,null,m.a.createElement(R.a,{tabs:[{title:"\u4ecb\u7ecd"},{title:"\u5927\u7eb2"}],initialPage:0,swipeable:!1,onTabClick:function(t,a){return e.changeTab(t,a)}}),0===this.state.tab?m.a.createElement("div",{className:"introduce"},m.a.createElement("p",null,"\u8bb2\u5e08\uff1a",t.teachers),m.a.createElement("p",null,"\u8bfe\u65f6\uff1a",t.course_hour),m.a.createElement("p",null,"\u65f6\u95f4\uff1a",t.start_time),m.a.createElement("div",{className:"dec",dangerouslySetInnerHTML:{__html:this.htmlDecode(t.intro)}})):null,1===this.state.tab?m.a.createElement("div",{className:"outline"},this.state.stageInfo&&this.state.stageInfo.length>0&&this.state.stageInfo.map(function(a,n){return m.a.createElement("div",{className:"stagebox",key:n},m.a.createElement("h1",{className:"stage text-overflow-1"},a.stage_name),a.lesson.map(function(a,n){return m.a.createElement("ul",{key:n},m.a.createElement("h2",{className:"classhour"},m.a.createElement("span",{className:"title text-overflow-1"},a.name),!t.is_aist&&(6===a.class_status||5===a.class_status)&&m.a.createElement("span",{className:"btn-right-10 audition",onClick:function(n){return e.props.toAudition(t.v_course_id,a.video_id)}},"\u8bd5\u542c",m.a.createElement("i",{className:"iconfont iconcelluar"})),!t.is_aist&&0===a.class_status&&m.a.createElement("i",{className:"iconfont iconiconfront-74 icon-right-22"}),!t.is_aist&&1===a.class_status&&m.a.createElement("span",{className:"btn-right-10 singleset",onClick:function(t){return e.props.toSingleset(a)}},"\xa5 ",a.class_price),!t.is_aist&&4===a.class_status&&1===a.video_auth&&4===a.is_video&&m.a.createElement("span",{className:"live icon-right-22"},"\u6b63\u5728\u76f4\u64ad",m.a.createElement("i",{className:"iconfont icondanseshixintubiao-23"})),!t.is_aist&&2===a.class_status&&m.a.createElement(E.b,{to:"/play/video?id=".concat(t.v_course_id+"&video_id="+a.video_id),className:"iconfont icondanseshixintubiao-23 icon-right-22"}),t.is_aist&&a.is_open&&1===t.is_baoming&&m.a.createElement(E.b,{to:"/play/video?id=".concat(t.v_course_id+"&video_id="+a.video_id),className:"aist aist_open"}),t.is_aist&&(!a.is_open||0===t.is_baoming)&&m.a.createElement("i",{className:"aist iconfont iconiconfront-74"})),a.point&&a.point.length>0&&a.point.map(function(e,t){var a=m.a.createElement("span",null,1===e.type&&m.a.createElement("span",null,"\u77e5\u8bc6\u70b9",t+1,"\uff1a"),2===e.type&&m.a.createElement("span",{className:"red"},"\u5b9e\u6218\u9879\u76ee\uff1a"));return m.a.createElement("li",{className:"points text-overflow-1",key:t},a,e.name)}),m.a.createElement(m.a.Fragment,null,t.is_aist&&""!==a.practice.title&&(!a.is_open||0===t.is_baoming)&&m.a.createElement("span",{className:"camp camp_test",key:n},m.a.createElement("span",null,"\u8bfe\u540e\u7ec3\u4e60\uff1a",a.practice.title),m.a.createElement("i",{className:"exam exam_close"})),t.is_aist&&""!==a.practice.title&&a.is_open&&1===t.is_baoming&&!a.practice.is_tested&&m.a.createElement(E.b,{to:{pathname:"/campTest",search:"?keshi_id=".concat(a.video_id,"&qid=").concat(a.practice.qid),state:{from:"/detail".concat(window.location.search)}},className:"camp camp_test",key:n},m.a.createElement("span",null,"\u8bfe\u540e\u7ec3\u4e60\uff1a",a.practice.title)),t.is_aist&&""!==a.practice.title&&a.is_open&&1===t.is_baoming&&a.practice.is_tested&&m.a.createElement(E.b,{to:{pathname:"/campResolve",search:"?keshi_id=".concat(a.video_id,"&qid=").concat(a.practice.qid),state:{from:"/detail".concat(window.location.search)}},className:"camp camp_test",key:n},m.a.createElement("span",null,"\u8bfe\u540e\u7ec3\u4e60\uff1a",a.practice.title),m.a.createElement("i",{className:"exam exam_open"}))))}))})):null),m.a.createElement(F.a,null))}}]),t}(p.Component),q=(a(1130),function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(r.a)(this,Object(l.a)(t).call(this,e))).getRankList=function(){v.d.get("".concat(API.home,"/dist/rankList/").concat(Object(v.c)("id"))).then(function(e){200===e.data.code?a.setState({list:e.data.data,rankingslice:e.data.data.slice(0,2)}):c.a.info(e.data.msg,2)})},a.getCode=function(){var e=a.props.user;if(e&&e.data&&e.data.uid){var t={course_id:Object(v.c)("id")};v.d.post("".concat(API.home,"/dist/createCode"),t).then(function(e){200===e.data.code?a.setState({code:e.data.data.code}):c.a.info(e.data.msg,2)})}},a.share=function(e){var t=a.props.user;if(t&&t.data&&t.data.uid){var n=Object(v.c)("id"),o=e.dist_first_level_ti,c=e.uid,s=a.state.code;a.props.history.push("/shareposter?courseId=".concat(n,"&dist_first=").concat(o,"&uid=").concat(c,"&dist_code=").concat(s))}else a.props.history.push("/passport/login")},a.openRanking=function(){a.setState({shareRank:!0})},a.colse=function(){a.setState({shareRank:!1})},a.state={list:[],rankingslice:[],code:"",shareRank:!1},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.getRankList(),this.getCode()}},{key:"render",value:function(){var e=this.props.courseInfo,t=void 0===e?"":e;return m.a.createElement("div",{className:"share-ranking"},m.a.createElement(b.a,{className:"share-container",justify:"between"},m.a.createElement(b.a,{className:"share-list"},m.a.createElement("span",{className:"title"},"\u6392\u884c\u699c\uff1a"),m.a.createElement("div",{className:"ranking-box",onClick:this.openRanking},this.state.rankingslice&&this.state.rankingslice.length>0&&this.state.rankingslice.map(function(e,t){return m.a.createElement("span",{key:t,className:"ranking-mess"},m.a.createElement("img",{src:e.head_imgurl,alt:""}),m.a.createElement("i",null,e.amount,"\u5143"))}))),m.a.createElement(b.a,{className:"share-money",justify:"between",align:"center"},m.a.createElement("img",{onClick:this.openRanking,className:"ranking-ellipsis",src:"https://julyedu-img.oss-cn-beijing.aliyuncs.com/Image/train/ellipsis.png",alt:""}),m.a.createElement("button",{className:"share",onClick:this.share.bind(this,t)},"\u5206\u4eab\u8d5a",t.dist_first_level_ti,"\u5143"))),this.state.shareRank&&m.a.createElement("div",{className:"shareMbc"},m.a.createElement("div",{className:"content"},m.a.createElement("div",{className:"title-box"},m.a.createElement("span",{className:"lable"},"\u8d5a\u94b1\u6392\u884c\u699c"),m.a.createElement("span",{className:"tips"},"\u53ea\u5c55\u793a\u524d9\u540d\u7528\u6237")),m.a.createElement("ul",null,this.state.list&&this.state.list.length>0&&this.state.list.map(function(e,t){return m.a.createElement("li",{key:t},m.a.createElement("img",{src:e.head_imgurl,alt:""}),m.a.createElement("span",{className:"course-title"},e.user_name),m.a.createElement("span",{className:"course-price"},e.amount,"\u5143"))})),m.a.createElement("div",{className:"shareBtn"},m.a.createElement("button",{onClick:this.share.bind(this,t)},"\u5206\u4eab\u8d5a",t.dist_first_level_ti,"\u5143")),m.a.createElement("i",{onClick:this.colse,className:"iconfont iconiconfront-2 close"}))))}}]),t}(p.Component)),J=Object(j.d)(Object(I.b)(function(e){return{user:e.user}},null),C.g)(q),H=(a(1131),function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(r.a)(this,Object(l.a)(t).call(this,e))).colse=function(){a.props.boxHide(!1)},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){return m.a.createElement("div",null,this.props.auditionBox&&m.a.createElement("div",{className:"popup-box"},m.a.createElement("div",{className:"content audition-box"},m.a.createElement("p",{className:"audition-header"},"\u5f53\u524d\u9875\u9762\u4e0d\u652f\u6301\u8bd5\u542c"),m.a.createElement("p",{className:"audition-dec"},"\u8bf7\u524d\u5f80APP\u8bd5\u542c"),m.a.createElement(W.a,{className:"btn btn-18B4ED",text:"\u7acb\u5373\u524d\u5f80"})),m.a.createElement("i",{onClick:this.colse,className:"iconfont iconiconfront-2 close"})))}}]),t}(p.Component)),Q=a(661),K=a(662),G=a(73),V=(a(1132),function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(r.a)(this,Object(l.a)(t).call(this,e))).signUpNow=function(){if(a.props.user.hasError)a.props.history.push("/passport");else{var e=JSON.stringify([Number(Object(v.c)("id"))]);v.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/").concat(e,"?type=1")).then(function(e){0===e.data.errno?a.props.history.push("/order?id="+e.data.data[0],{type:1}):c.a.info(e.data.msg,2)})}},a.simpleCourse=function(){a.props.user.hasError?a.props.history.push("/passport"):v.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(v.c)("id"),"]")).then(function(e){0===e.data.errno?a.props.history.push("/order?id=".concat(Object(v.c)("id")),{simple:1}):c.a.info(e.data.msg,2)})},a.formatDate=function(e){var t=e.split("-");return"".concat(t[1],"\u6708").concat(t[2],"\u65e5\u5f00\u8bfe")},a.tobuy=function(){var e=a.props.user,t=a.state.barInfo;e&&e.data&&e.data.uid?2===t.bargain_status?a.simpleCourse():a.setState({isShowOverlay:!0,bargainStatus:1}):a.props.history.push("/passport/login")},a.keyToGroup=function(){a.props.user.hasError?a.props.history.push("/passport"):a.props.history.push("/order?id=".concat(Object(v.c)("id")),{group:1})},a.bargainToOrder=function(){a.props.user.hasError?a.props.history.push("/passport"):v.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(v.c)("id"),"]")).then(function(e){0===e.data.errno?a.props.history.push("/order?id=[".concat(Object(v.c)("id"),"]"),{bargain:1}):c.a.info(e.data.msg,2)})},a.cancel=function(){var e={courseId:Object(v.c)("id")};v.d.post("".concat(API.home,"/m/bargain/cancel"),e).then(function(e){200===e.data.code?(a.setState({isShowOverlay:!1,bargainStatus:""}),v.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/[").concat(Object(v.c)("id"),"]")).then(function(e){0===e.data.errno?a.props.history.push("/order?id=[".concat(Object(v.c)("id"),"]"),{simple:1}):c.a.info(e.data.msg,2)})):c.a.info(e.data.msg,2)})},a.close=function(){a.setState({isShowOverlay:!1,bargainStatus:""})},a.toKanjia=function(){var e=a.props,t=e.user,n=e.history,o=t&&t.data&&t.data.uid,s=Object(v.c)("id");if(o){var i={course_id:s,type:1,parent_uid:0};v.d.post("".concat(API.home,"/m/bargain/toBargain"),i).then(function(e){var t=e.data,a=t.data,o=t.code,i=t.msg;200===o?n.push("/bargain-middle-page?id=".concat(s,"&bargaincode=").concat(a.bargain_code,"&is_originator=1")):c.a.info(i,2)})}else a.props.history.push("/passport/login")},a.toStudy=function(e,t){var n=a.props.history;0==t?c.a.info("\u5c1a\u672a\u5f00\u8bfe\uff0c\u5f00\u8bfe\u540e\u7acb\u5373\u4e0a\u4f20\u8bfe\u7a0b\uff5e",2):n.push("/play/video?id=".concat(e))},a.getBargainInfo=function(){var e=a.props.user,t=(e&&e.data&&e.data.uid,{courseId:Object(v.c)("id")});v.d.post("".concat(API.home,"/m/bargain/courseDetail"),t).then(function(e){200===e.data.code?a.setState({barInfo:e.data.data}):c.a.info(e.data.msg,2)})},a.state={isbuy:1,is_baoming:0,group_status:3,in_cart:!1,countdown:0,barInfo:{}},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.group=!1}},{key:"componentWillReceiveProps",value:function(e){var t=e.data,a=void 0===t?{}:t,n=e.user,o=void 0===n?{}:n;a.is_bargain&&o.data&&o.data.uid&&this.getBargainInfo(),this.setState({courseInfo:a,countdown:e.countdown})}},{key:"render",value:function(){var e=this,t=this.props,a=t.user,n=void 0===a?{}:a,o=t.toCart,c=this.state,s=c.countdown,i=c.barInfo,r=c.courseInfo,l=void 0===r?{}:r,d=n.data&&n.data.uid;return m.a.createElement("div",null,0===l.is_baoming&&3!==l.group_status&&m.a.createElement("div",{className:"btns-box"},m.a.createElement("a",{className:"consult consult-s",href:"https://q.url.cn/AB8aue?_type=wpa&qidian=true"},m.a.createElement("i",{className:"iconfont iconerji"}),m.a.createElement("span",null,"\u8bfe\u7a0b\u54a8\u8be2")),l.in_cart&&m.a.createElement(E.b,{to:"/shopcart",className:"btn btn-s bg-FCCD05"},"\u53bb\u8d2d\u7269\u8f66\u7ed3\u7b97"),!l.in_cart&&m.a.createElement("button",{className:"btn btn-s bg-FCCD05",onClick:function(e){return o(1)}},"\u52a0\u5165\u8d2d\u7269\u8f66"),m.a.createElement("span",{className:"btn btn-s bg-FD7700",onClick:function(t){return e.simpleCourse()}},"\u7acb\u5373\u62a5\u540d")),1===l.is_baoming&&m.a.createElement("div",{className:"btns-box"},m.a.createElement("a",{className:"consult consult-m",href:"https://q.url.cn/AB8aue?_type=wpa&qidian=true"},m.a.createElement("i",{className:"iconfont iconerji"}),m.a.createElement("span",null,"\u8bfe\u7a0b\u54a8\u8be2")),m.a.createElement("a",{className:"btn btn-m bg-09f",onClick:function(){return e.toStudy(l.v_course_id,l.is_have_video)}},"\u5f00\u59cb\u5b66\u4e60")),0===l.is_baoming&&3===l.group_status&&m.a.createElement("div",{className:"btns-box"},m.a.createElement("a",{className:"consult consult-s",href:"https://q.url.cn/AB8aue?_type=wpa&qidian=true"},m.a.createElement("i",{className:"iconfont iconerji"}),m.a.createElement("span",null,"\u8bfe\u7a0b\u54a8\u8be2")),m.a.createElement("button",{className:"btn btn-s bg-F4AAA7",onClick:this.simpleCourse},m.a.createElement("span",null,"\xa5 ".concat(l.price1)),m.a.createElement("span",null,"\u76f4\u63a5\u8d2d\u4e70")),m.a.createElement("button",{className:"btn btn-s bg-E02E24"},m.a.createElement("span",{onClick:this.keyToGroup},m.a.createElement("span",null,"\xa5 ".concat(l.pdd_group_info.price)),m.a.createElement("span",null,"\u4e00\u952e\u5f00\u56e2")))),0===l.is_baoming&&4===l.group_status&&m.a.createElement("div",{className:"btns-box"},m.a.createElement("a",{className:"consult consult-s",href:"https://q.url.cn/AB8aue?_type=wpa&qidian=true"},m.a.createElement("i",{className:"iconfont iconerji"}),m.a.createElement("span",null,"\u8bfe\u7a0b\u54a8\u8be2")),m.a.createElement("div",{className:"btn btn-l bg-E02E24",onClick:this.props.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",s," \u540e\u7ed3\u675f")),0===l.is_baoming&&this.props.data&&this.props.data.is_bargain&&m.a.createElement("div",{className:"btns-box"},m.a.createElement("a",{className:"consult consult-s",href:"https://q.url.cn/AB8aue?_type=wpa&qidian=true"},m.a.createElement("i",{className:"iconfont iconerji"}),m.a.createElement("span",null,"\u8bfe\u7a0b\u54a8\u8be2")),m.a.createElement("button",{className:"btn btn-s bg-F4AAA7"},m.a.createElement("span",null,"\xa5",l.price1),m.a.createElement("span",{onClick:this.tobuy},"\u76f4\u63a5\u8d2d\u4e70")),(2===i.bargain_status||"139"===Object(v.c)("id")&&3===i.bargain_status||!d)&&m.a.createElement("button",{className:"btn btn-s bg-E02E24",onClick:this.toKanjia},"\u6211\u8981\u780d\u4ef7"),(0===i.bargain_status||1===i.bargain_status)&&d&&m.a.createElement("button",{className:"btn btn-s bg-E02E24"},m.a.createElement("span",null,"\xa5",i.amount),m.a.createElement("span",{onClick:this.bargainToOrder},"\u53bb\u652f\u4ed8"))),20===this.state.isbuy&&m.a.createElement("div",{className:"btns-box"},m.a.createElement("a",{className:"consult-l",href:"https://q.url.cn/AB8aue?_type=wpa&qidian=true"},m.a.createElement("i",{className:"iconfont iconerji"}),m.a.createElement("span",null,"\u8bfe\u7a0b\u54a8\u8be2"))),l.is_aist&&(this.props.user.hasError||0===l.is_baoming)&&m.a.createElement("div",{className:"btns-box"},m.a.createElement("a",{className:"consult consult-m",href:"https://q.url.cn/AB8aue?_type=wpa&qidian=true"},m.a.createElement("i",{className:"iconfont iconerji"}),m.a.createElement("span",null,"\u8bfe\u7a0b\u54a8\u8be2")),m.a.createElement("button",{className:"btn sign-up-now",onClick:function(t){return e.signUpNow()}},m.a.createElement("span",null,"\u7acb\u5373\u62a5\u540d"))),l.is_aist&&!this.props.user.hasError&&1===l.is_baoming&&m.a.createElement("div",{className:"btns-box"},m.a.createElement("a",{className:"consult consult-m",href:"https://q.url.cn/AB8aue?_type=wpa&qidian=true"},m.a.createElement("i",{className:"iconfont iconerji"}),m.a.createElement("span",null,"\u8bfe\u7a0b\u54a8\u8be2")),""===l.aist_start_time?m.a.createElement("a",{className:"btn btn-m bg-09f",onClick:function(){return e.toStudy(l.v_course_id,l.is_have_video)}},"\u5f00\u59cb\u5b66\u4e60"):m.a.createElement("button",{className:"btn btn-m wait-open"},m.a.createElement("span",null,this.formatDate(l.aist_start_time)))),this.state.isShowOverlay&&m.a.createElement(g.a,null,1===this.state.bargainStatus&&m.a.createElement(Z,{close:this.close,cancel:this.cancel}),m.a.createElement("i",{onClick:this.close,className:"iconfont iconiconfront-2 bargain-close"})))}}]),t}(p.Component));function Z(e){return m.a.createElement("div",{className:"cancel-bargain"},m.a.createElement("p",{className:"top-img"},m.a.createElement("i",{className:"iconfont icondanseshixintubiao-8"})),m.a.createElement("p",{className:"tip-mess"},"\u60a8\u5df2\u53d1\u8d77\u780d\u4ef7\uff0c\u76f4\u63a5\u8d2d\u4e70\u5c06\u6e05\u9664\u5df2\u780d\u91d1\u989d\u3002\u76f4\u63a5\u8d2d\u4e70\u53ef\u4f7f\u7528\u4f18\u60e0\u5238~"),m.a.createElement("div",{className:"btns"},m.a.createElement("button",{onClick:e.close},"\u53d6\u6d88"),m.a.createElement("button",{onClick:e.cancel},"\u786e\u5b9a")))}var Y=Object(I.b)(function(e){return{user:e.user}},{getCourses:G.d})(V),X=(a(157),a(75)),$=a.n(X),ee=(a(1133),function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(r.a)(this,Object(l.a)(t).call(this,e))).setupBarrage=function(){for(var e=[{start:0,end:7,interval:6e4},{start:7,end:8,interval:3e4},{start:8,end:23,interval:15e3},{start:23,end:24,interval:3e4}],t=new Date(Date.now()).getHours(),n=0;n<e.length;n++){var o=e[n];if(t>=o.start&&t<=o.end){a.timer=setTimeout(function(){a.getList()},o.interval);break}}},a.getList=function(){var e={course_id:Object(v.c)("id")};v.d.post("".concat(API.home,"/m/course/barrages"),e).then(function(e){200===e.data.code&&a.setState({list:e.data.data,isShowBarrage:!0},function(){a.barageTimer=setTimeout(function(){a.setState({isShowBarrage:!a.state.isShowBarrage}),a.setupBarrage()},5e3)})})},a.state={list:[],isShowBarrage:!1},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this,a=this.props.isShow;e.isShow!==a&&void 0!==a&&(a&&setTimeout(function(){t.getList()},5e3),this.componentDidUpdate=null)}},{key:"componentWillUnmount",value:function(){this.timer&&clearTimeout(this.timer),this.barageTimer&&clearTimeout(this.barageTimer)}},{key:"render",value:function(){return m.a.createElement($.a,null,m.a.createElement("div",{className:"my-carousel",style:{opacity:this.state.isShowBarrage?1:0}},this.state.list&&m.a.createElement("div",{className:"v-item text-overflow-one"},m.a.createElement("img",{src:this.state.list.avatar,alt:""}),this.state.list.user_name," ",this.state.list.live_msg)))}}]),t}(p.Component)),te=a(162),ae=a(1134),ne=a(39),oe=a(18),ce=a(71),se=(a(1138),a(663)),ie=a.n(se),re=function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(r.a)(this,Object(l.a)(t).call(this,e))).state={src:"",codeSrc:""},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props&&this.props.user&&this.props.user.data.uid;v.d.get("".concat(API["base-api"],"/wx/user_temporary_qrcode/").concat(t)).then(function(t){if(0==t.data.errno)return e.setState({src:t.data.data.url}),new Promise(function(t){ie.a.toDataURL(e.state.src,{},function(t,a){e.setState({codeSrc:a})}),t()});c.a.info(t.data.msg,2)})}},{key:"render",value:function(){return m.a.createElement("div",{className:"followQRcode-box"},m.a.createElement("div",{className:"followQRcode"},m.a.createElement("div",{className:"content"},m.a.createElement("p",{className:"title"},"\u5173\u6ce8\u516c\u4f17\u53f7"),m.a.createElement("p",{className:"desc"},m.a.createElement("span",null,"1"),"\u6709\u4eba\u901a\u8fc7\u60a8\u5206\u4eab\u7684\u94fe\u63a5\u9886\u53d6\u7ea2\u5305\u540e\uff0c\u4f1a\u7b2c\u4e00\u65f6\u95f4\u901a\u8fc7\u5fae\u4fe1\u670d\u52a1\u53f7\u901a\u77e5\u60a8\u3002"),m.a.createElement("p",{className:"desc"},m.a.createElement("span",null,"2"),"\u8bf7\u7528\u4e2a\u4eba\u5fae\u4fe1\u626b\u63cf\uff0c\u5173\u6ce8\u670d\u52a1\u53f7\u540e\u53ef\u63d0\u73b0\u7ea2\u5305\u5230\u5fae\u4fe1\u96f6\u94b1\u3002"),m.a.createElement("img",{src:this.state.codeSrc,alt:""}),m.a.createElement("p",{className:"tip"},"\u957f\u6309\u4e8c\u7ef4\u7801\u4fdd\u5b58\u5230\u76f8\u518c")),m.a.createElement("div",{className:"close"},m.a.createElement("i",{className:"iconfont iconiconfront-2",onClick:this.props.toClose}))))}}]),t}(p.Component),le=Object(I.b)(function(e){return{user:e.user}})(re),de=(a(1139),a(37)),ue=a.n(de),pe=function(e){function t(e){var a;return Object(s.a)(this,t),a=Object(r.a)(this,Object(l.a)(t).call(this,e)),a.removeStatisticsCookie=function(){ue.a.remove("share_code",{path:"/",domain:".julyedu.com"})},a.fetchShareInfo=function(){var e=Object(v.c)("share_code");v.d.get("".concat(API.home,"/sys/redPacket/shareUrl/").concat(Object(v.c)("id"))).then(function(t){var n=t.data,o=n.code,c=n.data;200===o&&a.setState({shareInfo:e?Object.assign({},c,{share_code:e}):c})})},a.judgePopupType=function(){var e=Object(v.c)("share_code"),t=a.state.shareInfo;e&&"null"!==e&&(a.setState({shareInfo:Object.assign({},t,{share_code:e})}),v.d.post("".concat(API.home,"/sys/redPacket/split"),{action:"check",share_code:e}).then(function(e){var t=e.data,n=t.code,o=t.data;200===n&&(o.is_overdue?a.setState({type:7}):o.is_receive?a.judgeReceiveStatus(o):a.setState({type:v.b.isWeixin?2:3})),4030!==n&&4040!==n||a.setState({type:v.b.isWeixin?2:3})}))},a.judgePopupTypeFromCountry=function(){var e=a.props.country,t=a.state.shareInfo;e.code&&(a.setState({country:e,shareInfo:Object.assign({},t,{share_code:e.code})}),v.d.post("".concat(API.home,"/sys/redPacket/split"),{action:"check",share_code:e.code}).then(function(e){console.log(e);var t=e.data,n=t.code,o=t.data;200===n&&(o.is_receive?a.judgeReceiveStatus(o,8):a.setState({type:3}),a.props.delCountryNum())}))},a.judgeReceiveStatus=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n="",o="";1===e.receive_type&&(o="\u8d8a\u591a\u597d\u53cb\u9886\u53d6\uff0c\u4f60\u6240\u5f97\u8d8a\u591a\uff01"),2===e.receive_type&&(o="\u6bcf\u5929\u53ea\u80fd\u5e2e\u597d\u53cb\u9886\u53d6\u4e00\u6b21\u54e6~"),n=e.is_overdue?1===e.red_packet_type?"\u60a8\u5df2\u7ecf\u9886\u8fc7\u8be5\u7ea2\u5305 ".concat(e.amount,"\u5143\u73b0\u91d1\uff01"):"\u60a8\u5df2\u7ecf\u9886\u8fc7\u8be5\u7ea2\u5305 ".concat(e.amount,"\u5143\u4ee3\u91d1\u5238\u788e\u7247\uff01"):1===e.red_packet_type?"\u4eca\u65e5\u5df2\u9886\u53d6".concat(e.amount,"\u5143\u73b0\u91d1\uff01"):"\u4eca\u65e5\u5df2\u9886\u53d6".concat(e.amount,"\u5143\u4ee3\u91d1\u5238\u788e\u7247\uff01"),1===e.receive_status?a.setState({type:9,doneInfo:{status:1,txt:n,desc:o}}):2===e.receive_status?(a.setState({type:t,money:e.amount,endTime:e.end_time}),a.startCountDown()):3===e.receive_status&&a.setState({type:9,doneInfo:{status:2,txt:"\u624b\u673a\u53f7\u7ed1\u5b9a\u8d85\u65f6\uff0c\u7ea2\u5305\u5df2\u5931\u6548!",desc:o}})},a.startCountDown=function(){a.countdownTimer&&window.clearInterval(a.countdownTimer);var e=a.state.endTime,t=0,n=0;a.countdownTimer=window.setInterval(function(){e<=0&&(window.clearInterval(a.countdownTimer),a.setState({endTime:0})),e-=1,t="".concat(Math.floor(e/60)).padStart(2,0),n="".concat(e%60).padStart(2,0),a.setState({countdown:"".concat(t,"\u5206").concat(n,"\u79d2")})},1e3)},a.handleToShare=function(){var e=a.props,t=e.history,n=e.userInfo;v.b.isWeixin?(a.setState({type:2}),t.push("/detail?id=".concat(Object(v.c)("id"),"&wechat=1"))):n&&n.uid?v.d.get("".concat(API.home,"/sys/redPacket/shareUrl/").concat(Object(v.c)("id"))).then(function(e){var t=e.data,n=t.code,o=t.data;200===n&&a.setState({shareInfo:o,type:1})}):t.push("/passport/login")},a.openTip=function(){a.state.shareInfo.is_follow||a.setState({type:11})},a.handleToOpen=function(){var e=a.props.history,t=a.state.shareInfo.share_code,n=void 0===t?"":t;v.d.post("".concat(API.home,"/sys/redPacket/split"),{action:"receive",share_code:n}).then(function(t){var n=t.data,o=n.code,c=n.data;200===o?c.is_receive?a.judgeReceiveStatus(c):2===c.red_packet_type?a.setState({type:6,money:c.amount}):1===c.red_packet_type&&(1===c.receive_status?1===c.red_packet_type?a.setState({type:5,money:c.amount}):2===c.red_packet_type&&a.setState({type:6,money:c.amount}):2===c.receive_status?(a.setState({type:4,money:c.amount,endTime:c.end_time}),a.startCountDown()):3===c.receive_status&&a.setState({type:9,doneInfo:{status:2,txt:"\u624b\u673a\u53f7\u7ed1\u5b9a\u8d85\u65f6\uff0c\u7ea2\u5305\u5df2\u5931\u6548!",desc:1===c.receive_type?"\u8d8a\u591a\u597d\u53cb\u9886\u53d6\uff0c\u4f60\u6240\u5f97\u8d8a\u591a\uff01":2===c.receive_type?"\u6bcf\u5929\u53ea\u80fd\u5e2e\u597d\u53cb\u9886\u53d6\u4e00\u6b21\u54e6~":""}})):4030!==o&&4040!==o||e.push("/passport/login")})},a.handleToClose=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var n=a.state.shareInfo.share_code,o=void 0===n?"":n;v.d.post("".concat(API.home,"/sys/redPacket/split"),{action:"check",share_code:o}).then(function(e){var t=e.data,n=t.code,o=t.data;200===n&&(o.is_receive?a.judgeReceiveStatus(o):a.setState({type:3}))})}else{if(t)a.props.history.push("/detail?id=".concat(Object(v.c)("id")));a.setState({type:0})}},a.clickMask=function(){2===a.state.type&&a.setState({type:0})},a.getCaptchaInstance=function(e){a.setState({captchaInstance:e})},a.onVerify=function(e,t){e?console.log(e):a.setState({validate:t.validate})},a.handleToSend=function(e){var t=e.tel,n=(e.code,a.state),o=n.validate,s=n.seconds,i=n.isFirst,r=n.isTimer,l=n.captchaInstance,d=n.country.num,u=void 0===d?"86":d;if(o){if(!i)return c.a.info("\u8bf7\u91cd\u65b0\u8fdb\u884c\u6ed1\u5757\u9a8c\u8bc1",2,null,!1),l.refresh(),void a.setState({isFirst:!0});r||(t?/^\d+$/.test(t)?v.d.post("".concat(API["passport-api"],"/m/personal/bindPhoneSendCode"),{area_code:"00".concat(u),phone_num:t}).then(function(e){var t=e.data,n=t.errno,o=t.msg;200===n?(c.a.info("\u9a8c\u8bc1\u7801\u53d1\u9001\u6210\u529f",2,null,!1),a.timer=window.setInterval(function(){s<=0?(window.clearInterval(a.timer),a.setState({isTimer:!1,seconds:60})):a.setState({isTimer:!0,seconds:--s})},1e3),a.setState({isFirst:!1})):c.a.info(o,2,null,!1)}):c.a.info("\u8bf7\u8f93\u5165\u6b63\u786e\u683c\u5f0f\u7684\u624b\u673a\u53f7\u7801",2,null,!1):c.a.info("\u624b\u673a\u53f7\u7801\u4e0d\u80fd\u4e3a\u7a7a",2,null,!1))}return!1},a.receviceAfterBind=function(){v.d.get("".concat(API.home,"/sys/red_packet/receive")).then(function(e){var t=e.data,n=t.code,o=t.data,s=t.msg;200===n?1===o.receive_status?1===o.red_packet_type?a.setState({type:5,money:o.amount}):2===o.red_packet_type&&a.setState({type:6,money:o.amount}):2===o.receive_status?(a.setState({type:4,money:o.amount,endTime:o.end_time}),a.startCountDown()):3===o.receive_status&&a.setState({type:9,doneInfo:{status:2,txt:"\u624b\u673a\u53f7\u7ed1\u5b9a\u8d85\u65f6\uff0c\u7ea2\u5305\u5df2\u5931\u6548!",desc:1===o.receive_type?"\u8d8a\u591a\u597d\u53cb\u9886\u53d6\uff0c\u4f60\u6240\u5f97\u8d8a\u591a\uff01":2===o.receive_type?"\u6bcf\u5929\u53ea\u80fd\u5e2e\u597d\u53cb\u9886\u53d6\u4e00\u6b21\u54e6~":""}}):c.a.info(s,2,null,!1)})},a.toContinueBind=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=a.state,n=t.accountInfo,o=n.tel,s=n.code,i=t.country.num,r=void 0===i?"86":i;v.d.post("".concat(API["passport-api"],"/m/personal/bindPhone"),{area_code:"00".concat(r),phone_num:o,code:s,type:1,is_valid:e}).then(function(t){var n=t.data,o=n.errno,s=n.data,i=n.msg;200===o?e&&s.tip_info?a.setState({type:10,bindInfo:s.tip_info}):a.receviceAfterBind():c.a.info(i,2,null,!1)})},a.setRelativeCookie=function(){ue.a.set("share_code",Object(v.c)("share_code")?Object(v.c)("share_code"):"share_code",{path:"/",domain:".julyedu.com"})},a.state={type:0,isCopy:!1,validate:"",captchaInstance:null,seconds:60,isFirst:!0,timer:null,isTimer:!1,shareInfo:{url:"",share_code:"",command:"\u3010\u4e03\u6708\u5728\u7ebf\u9001\u4f60\u4e00\u4e2a\u7ea2\u5305\u3011https://www.julyedu.com/"},doneInfo:{status:2,txt:"\u624b\u673a\u53f7\u7ed1\u5b9a\u8d85\u65f6\uff0c\u7ea2\u5305\u5df2\u5931\u6548!",desc:""},money:"",endTime:10,countdownTimer:null,countdown:"00\u520600\u79d2",accountInfo:{},bindInfo:{},country:{num:"86"}},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.judgePopupTypeFromCountry(),this.judgePopupType(),window.addEventListener("beforeunload",this.removeStatisticsCookie);var t=Object(v.c)("wechat"),a=this.props.userInfo;(a&&a.uid||this.setRelativeCookie(),"1"!==t||v.b.isWeixin)||(a&&a.uid?"split"===window.localStorage.getItem("redpacket-click")?v.d.get("".concat(API.home,"/sys/redPacket/shareUrl/").concat(Object(v.c)("id"))).then(function(t){var a=t.data,n=a.code,o=a.data;200===n&&v.d.post("".concat(API.home,"/sys/redPacket/split"),{action:"check",share_code:o.share_code}).then(function(t){var a=t.data,n=a.code,o=a.data;200===n&&(window.localStorage.removeItem("redpacket-click"),o.is_receive?e.judgeReceiveStatus(o,8):e.setState({type:3}))})}):(this.setState({type:1}),window.localStorage.removeItem("redpacket-click")):(this.setRelativeCookie(),this.setState({type:1})));this.fetchShareInfo()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.removeStatisticsCookie)}},{key:"render",value:function(){var e=this,t=this.props,a=t.history,o=t.userInfo,c=this.state,s=c.type,i=c.isCopy,r=c.validate,l=c.isTimer,d=c.seconds,u=c.shareInfo,p=u.command,f=void 0===p?"":p,h=u.share_code,b=void 0===h?"":h,g=c.money,_=c.doneInfo,y=c.countdown,S=c.endTime,w=c.bindInfo,k=c.country,j=N()("popup-mask",{"popup-mask--no":2!==s});return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{className:"red-packet"},m.a.createElement("p",{className:"red-packet__title"},"\u5206\u4eab\u8bfe\u7a0b\u7ed9\u597d\u53cb\uff0c\u4f60\u548c\u597d\u53cb\u90fd\u53ef\u4ee5\u9886\u7ea2\u5305\u54e6\u301c"),m.a.createElement("button",{className:"red-packet__button",onClick:this.handleToShare},"\u5206\u4eab\u9886\u7ea2\u5305")),0!==s&&m.a.createElement("div",{className:j,onClick:this.clickMask},2==s&&m.a.createElement("div",{className:"pupup-wechat"},m.a.createElement("h4",{className:"popup-wechat__title"},"\u5f53\u524d\u73af\u5883\u4e0d\u652f\u6301\u9886\u7ea2\u5305\u6d3b\u52a8"),m.a.createElement("p",{className:"popup-wechat__desc"},"\u8bf7\u70b9\u51fb\u53f3\u4e0a\u89d2\u201c \xb7\xb7\xb7 \u201d\uff0c\u9009\u62e9\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00 \u7136\u540e\u53c2\u4e0e\u6d3b\u52a8\uff01"),m.a.createElement("i",{className:"popup-wechat__icon"})),1===s&&m.a.createElement("div",{className:"popup-password"},m.a.createElement("div",{className:"popup-password__content"},m.a.createElement("h4",{className:"popup-password__header"},"\u590d\u5236\u53e3\u4ee4\u53d1\u9001\u7ed9\u597d\u53cb"),m.a.createElement("div",{className:"popup-password__body"},m.a.createElement("p",{id:"password",className:"popup-passowrd__info"},f.length>16?"".concat(f.substr(0,16),"..."):f),i?m.a.createElement("p",{className:"popup-password__success"},"\u590d\u5236\u6210\u529f\uff0c\u5feb\u53d1\u9001\u7ed9\u597d\u53cb\u5427~"):o&&o.uid?m.a.createElement(ae.CopyToClipboard,{text:f,onCopy:function(){return e.setState({isCopy:!0})}},m.a.createElement("button",{className:"popup-password__button--copy"},"\u590d\u5236\u53e3\u4ee4")):m.a.createElement("button",{className:"popup-password__button--copy",onClick:function(){window.localStorage.setItem("redpacket-click","copy"),a.push("/passport/login")}},"\u590d\u5236\u53e3\u4ee4")),m.a.createElement("p",{className:"popup-password__footer"},"\u597d\u53cb\u9886\u53d6\u7ea2\u5305\u540e\uff0c\u4f60\u5c06\u83b7\u5f97\u540c\u6837\u5956\u52b1\u3002",m.a.createElement("br",null),"\u81ea\u5df1\u4e5f\u53ef\u4ee5\u9886\u53d6\u54e6~")),m.a.createElement("i",{className:"popup-password__button--close iconfont iconiconfront-2",onClick:function(){"1"===Object(v.c)("wechat")?o&&o.uid?(e.handleToClose(!0),a.push("/detail?id=".concat(Object(v.c)("id")))):(e.setState({type:3}),window.localStorage.setItem("redpacket-click","split")):e.handleToClose(!0),e.setState({isCopy:!1})}})),3===s&&m.a.createElement(me,{type:3,packetInfo:{title:"\u4e03\u6708\u5728\u7ebf\u7ed9\u4f60\u53d1\u4e86\u4e2a\u7ea2\u5305\uff5e"},handleToClose:function(){return e.handleToClose(!1)},handleToOpen:this.handleToOpen}),4===s&&m.a.createElement(me,{type:4,packetInfo:{money:g,tip:["\u4e3a\u4e86\u60a8\u7684\u8d44\u91d1\u5b89\u5168\uff0c\u8bf7\u4e8e5\u5206\u949f\u4e4b\u5185\u7ed1\u5b9a\u624b\u673a\u53f7\uff0c\u8d85\u65f6\u7ea2\u5305\u5c06\u5931\u6548"],btn:{txt:"\u7acb\u5373\u7ed1\u5b9a\uff08".concat(y,"\uff09"),onClick:function(){e.setState({type:8})}}},handleToClose:function(){return e.handleToClose(!1)}}),5===s&&m.a.createElement(me,{type:5,packetInfo:{money:g,tip:["\u53ef\u524d\u5f80\u3010\u4e03\u6708\u5728\u7ebf\u3011APP","- \u8d26\u6237\u8d44\u91d1\u4e2d\u63d0\u73b0"],btn:{txt:"\u83b7\u53d6\u66f4\u591a\u5956\u52b1",onClick:function(){a.push("/ShareCourse")}}},handleToClose:function(){var t=!!Object(v.c)("share_code");e.handleToClose(!1,t),e.openTip()}}),6===s&&m.a.createElement(me,{type:6,packetInfo:{money:g,tip:["\u53ef\u524d\u5f80\u3010\u4e03\u6708\u5728\u7ebf\u3011APP","- \u6211\u7684\u4f18\u60e0\u5238\u4e2d\u5408\u6210\u4ee3\u91d1\u5238"],btn:{txt:"\u83b7\u53d6\u66f4\u591a\u5956\u52b1",onClick:function(){a.push("/ShareCourse")}}},handleToClose:function(){var t=!!Object(v.c)("share_code");e.handleToClose(!1,t),e.openTip()}}),7===s&&m.a.createElement(me,{type:7,packetInfo:{btn:{txt:"\u83b7\u53d6\u66f4\u591a\u5956\u52b1",onClick:function(){a.push("/ShareCourse")}}},handleToClose:function(){var t=!!Object(v.c)("share_code");e.handleToClose(!1,t)}}),8===s&&m.a.createElement("div",{className:"popup-form"},m.a.createElement(oe.d,{initialValues:{tel:"",code:""},validate:function(e){var t=e.tel,a=e.code,n={};return/^\d+$/.test(t)||(n.tel="\u8bf7\u586b\u5199\u6b63\u786e\u683c\u5f0f\u7684\u624b\u673a\u53f7"),/[0-9]{6}/.test(a)||(n.code="\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"),n},onSubmit:function(t,a){a.setStatus,a.setSubmitting;e.setState({accountInfo:Object(n.a)({},t)}),e.toContinueBind()},render:function(t){var n=t.values,o=n.tel,c=n.code,s=t.errors;return m.a.createElement(oe.c,{className:"popup-form__content"},m.a.createElement("h4",{className:"popup-form__title"},"\u7ed1\u5b9a\u624b\u673a\u53f7"),m.a.createElement("div",{className:"popup-form__item"},m.a.createElement(E.b,{className:"popup-form__button--num",to:"/country?id=".concat(Object(v.c)("id"),"&share_code=").concat(b)},"+",k.num,m.a.createElement("i",{className:"iconfont iconiconfront-69"})),m.a.createElement(oe.b,{name:"tel",render:function(e){var t=e.field;return m.a.createElement("input",Object.assign({},t,{className:"popup-form__ipt","data-bdrs":"0 6px 6px 0","data-type":"tel",type:"text",placeholder:"\u8bf7\u586b\u5199\u624b\u673a\u53f7"}))}})),m.a.createElement(ce.a,{mrBtm:15,getInstance:e.getCaptchaInstance,onVerify:e.onVerify}),0===S?m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{className:"popup-form__item"},m.a.createElement("p",{className:"popup-form__tip"},m.a.createElement("i",{className:"iconfont icondanseshixintubiao-8"}),"\u7ed1\u5b9a\u8d85\u65f6\uff0c\u7ea2\u5305\u5df2\u5931\u6548!")),m.a.createElement("button",{className:"popup-packet__button--bundle","data-status":"do",type:"button",onClick:function(){a.push("/ShareCourse")}},"\u83b7\u53d6\u66f4\u591a\u5956\u52b1")):m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{className:"popup-form__item"},m.a.createElement(oe.b,{name:"code",render:function(e){var t=e.field;return m.a.createElement("input",Object.assign({},t,{className:"popup-form__ipt popup-form__ipt--left",type:"text",placeholder:"\u8f93\u5165\u9a8c\u8bc1\u7801"}))}}),m.a.createElement("button",{className:"popup-form__button--code","data-status":r&&!l?"do":"",type:"button",onClick:function(){return e.handleToSend({tel:o,code:c})}},l?"\u91cd\u65b0\u53d1\u9001".concat(d,"s"):"\u53d1\u9001\u9a8c\u8bc1\u7801")),m.a.createElement("button",{className:"popup-packet__button--bundle","data-status":o&&c&&Object(ne.isEmpty)(s)?"do":"done",type:"submit"},"\u5b8c\u6210\u7ed1\u5b9a(".concat(y,")"))))}}),m.a.createElement("i",{className:"popup-password__button--close iconfont iconiconfront-2",onClick:function(){return e.handleToClose(!1)}})),9===s&&m.a.createElement("div",{className:"popup-done"},m.a.createElement("div",{className:"popup-done__content"},m.a.createElement("h4",{className:N()("popup-done__title",{"popup-done__title--overtime":2===_.status})},2===_.status&&m.a.createElement("i",{className:"iconfont icondanseshixintubiao-8"}),_.txt),m.a.createElement("p",{className:"popup-done__desc"},_.desc),m.a.createElement("button",{className:"popup-packet__button--bundle","data-status":"do",type:"submit",onClick:function(){a.push("/ShareCourse")}},"\u83b7\u53d6\u66f4\u591a\u5956\u52b1")),m.a.createElement("i",{className:"popup-password__button--close iconfont iconiconfront-2",onClick:function(){var t=!!Object(v.c)("share_code");e.handleToClose(!1,t)}})),10===s&&m.a.createElement("div",{className:"popup-bind"},m.a.createElement("div",{className:"popup-bind__content"},m.a.createElement("h4",{className:"popup-bind__title"},"\u7ed1\u5b9a\u786e\u8ba4"),m.a.createElement("p",{className:"popup-bind__desc"},"\u8be5\u624b\u673a\u53f7\u5df2\u7ed1\u5b9a\u5230\u4ee5\u4e0b\u8d26\u53f7\uff0c\u7ee7\u7eed\u7ed1\u5b9a\u5c06\u89e3\u9664\u4ee5\u4e0b\u7ed1\u5b9a\u72b6\u6001"),m.a.createElement("ul",{className:"popup-bind__list"},w.email&&m.a.createElement("li",{className:"popup-bind__account"},m.a.createElement("i",{className:"iconfont iconduanxin"}),m.a.createElement("p",{className:"popup-bind__account--name"},w.email)),w.wechat_nickname&&m.a.createElement("li",{className:"popup-bind__account"},m.a.createElement("i",{className:"icon-wachat"}),m.a.createElement("p",{className:"popup-bind__account--name"},w.wechat_nickname)),w.qq_nickname&&m.a.createElement("li",{className:"popup-bind__account"},m.a.createElement("i",{className:"icon-qq"}),m.a.createElement("p",{className:"popup-bind__account--name"},w.qq_nickname)),w.sina_nickname&&m.a.createElement("li",{className:"popup-bind__account"},m.a.createElement("i",{className:"icon-sina"}),m.a.createElement("p",{className:"popup-bind__account--name"},w.sina_nickname))),m.a.createElement("div",{className:"popup-bind__button"},m.a.createElement("button",{className:"popup-bind__button--cancle",onClick:function(){return e.handleToClose(!1)}},"\u53d6\u6d88"),m.a.createElement("button",{className:"popup-bind__button--confirm",onClick:function(){return e.toContinueBind(0)}},"\u7ee7\u7eed\u7ed1\u5b9a"))),m.a.createElement("i",{className:"popup-password__button--close iconfont iconiconfront-2",onClick:function(){return e.handleToClose(!1)}})),11===s&&m.a.createElement(le,{toClose:function(){return e.handleToClose(!1)}})))}}]),t}(p.PureComponent),me=function(e){var t=e.type,a=e.packetInfo,n=e.handleToClose,o=e.handleToOpen,c=N()("popup-packet__content",{"popup-packet__content--open":4===t,"popup-packet__content--money":5===t,"popup-packet__content--fragment":6===t,"popup-packet__content--late":7===t}),s=a.money,i=a.tip,r=void 0===i?[]:i,l=a.btn;return m.a.createElement("div",{className:N()("popup-packet")},m.a.createElement("div",{className:c},3===t&&m.a.createElement(m.a.Fragment,null,m.a.createElement("p",{className:"popup-packet__title"},"\u4e03\u6708\u5728\u7ebf\u7ed9\u4f60\u53d1\u4e86\u4e2a\u7ea2\u5305\uff5e"),m.a.createElement("button",{className:"popup-packet__button--split",onClick:o})),(4===t||5===t||6===t)&&m.a.createElement(m.a.Fragment,null,m.a.createElement("h4",{className:"popup-packet__label"},"\u606d\u559c\u60a8\u83b7\u5f97"),m.a.createElement("p",{className:"popup-packet__value"},s,m.a.createElement("span",{className:"popup-packet__value--unit"},"\u5143")),m.a.createElement("p",{className:"popup-packet__tip"},r.map(function(e,t){return t!==r.lenght-1?m.a.createElement(m.a.Fragment,null,e,m.a.createElement("br",null)):e})),m.a.createElement("button",{className:"popup-packet__button--bundle",onClick:l.onClick},l.txt)),7===t&&m.a.createElement(m.a.Fragment,null,m.a.createElement("h4",{className:"popup-packet__label"},"\u60a8\u6765\u665a\u4e86\uff01"),m.a.createElement("p",{className:"popup-packet__value"},"\u7ea2\u5305\u4ec5\u80fd\u5f53\u65e5\u9886\u53d6\uff0c\u4e0b\u6b21",m.a.createElement("br",null),"\u65e9\u70b9\u6765\u54e6~"),m.a.createElement("button",{className:"popup-packet__button--bundle",onClick:l.onClick},l.txt))),m.a.createElement("i",{className:"popup-password__button--close iconfont iconiconfront-2",onClick:n}))},fe=pe,he=function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(r.a)(this,Object(l.a)(t).call(this,e))).judgeIsRedPacket=function(){v.d.get("".concat(API.home,"/sys/redPacket/showShareActive/").concat(Object(v.c)("id"))).then(function(e){var t=e.data,n=t.code,o=t.data;200===n&&a.setState({isRedPacket:o.is_show})})},a.payCallback=function(){var e=Object(u.a)(Object(u.a)(a));Object(v.c)("oid")&&(a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),e.intervalPayStatus=setInterval(function(){v.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(v.c)("oid"))).then(function(t){401===t.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,v.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(v.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,isPdd:t.data.data.data.is_pdd}):c.a.info(t.data.data.msg,2)}))})},1e3))},a.isweixinPay=function(){var e=Object(u.a)(Object(u.a)(a)),t=Object(v.c)("code");if(t){if(!Object(v.c)("oid"))return;a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),v.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(v.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(){v.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(v.c)("oid"))).then(function(t){401===t.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,v.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(v.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,isPdd:t.data.data.data.is_pdd}):c.a.info(t.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.check=function(e){a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),v.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,isPdd:e.data.data.data.is_pdd}):c.a.info(e.data.data.msg,2)})},a.payCallBack=function(e,t,n){var o=Object(u.a)(Object(u.a)(a));2===e?o.setState({singleType:e,nowPrice:t,laterPrice:n}):o.setState({singleType:e})},a.fetchCourseInfo=function(){var e=Object(v.c)("id");v.d.get("".concat(API.home,"/m/course/detail/").concat(e)).then(function(e){var t=e.data,n=t.data;if(200===t.code&&(""!==n.redirect_url&&(window.location.href=n.redirect_url),a.setState({course:n}),n.course_info)){var o=n.course_info;if(document.title="".concat(o.course_title," - \u4e03\u6708\u5728\u7ebf"),3===o.group_status||4===o.group_status){var c=1e3*o.pdd_group_info.groupon_member.end_time,s=0,i=0,r=0;setInterval(function(){c-=1e3,s="".concat(parseInt(c/36e5)).padStart(2,0),i="".concat(parseInt((c-36e5*s)/6e4)).padStart(2,0),r="".concat(parseInt((c-36e5*s-6e4*i)/1e3)).padStart(2,0),a.setState({countdown:"".concat(s,":").concat(i,":").concat(r)})},1e3)}Object(v.i)({title:o.course_title,desc:o.index_description,link:encodeURI(location.origin+"/detail?id="+Object(v.c)("id")),imgUrl:o.image_name})}})},a.toAudition=function(e,t){var n=a.props.user;if(n&&n.data&&n.data.uid){if(""==t||0==t||void 0==t)return!1;v.d.post("".concat(API["base-api"],"/sys/get_class_audition?video_id=").concat(t)).then(function(n){200==n.data.errno?a.props.history.push("/play/video?id=".concat(e+"&video_id="+t)):c.a.info(n.data.msg,2)})}else a.props.history.push("/passport/login")},a.toSingleset=function(e){var t=a.props.user;t&&t.data&&t.data.uid?(a.setState({singleBox:!0,singleType:1,singMess:e}),window.localStorage.setItem("singMess",JSON.stringify(e))):a.props.history.push("/passport/login")},a.toCart=function(e){var t=a.props,n=t.history,o=t.addCourseToCart,s={course_id:Object(v.c)("id")};v.d.post("".concat(API.home,"/m/cart/add"),s).then(function(t){200===t.data.code?1===e?(c.a.info("\u5df2\u52a0\u5165\u8d2d\u7269\u8f66",2),o(),a.fetchCourseInfo()):(n.replace("/shopcart"),\u00df):15001===t.data.code?n.replace("/shopcart"):4030===t.data.code?n.replace("/passport"):c.a.info(t.data.msg,2)})},a.invitedFriends=function(){var e=a.props.history,t=a.state.course,n=void 0===t?{}:t;n.course_info&&n.course_info.self_oid&&e.push("/togroup?id=".concat(n.course_info.self_oid))},a.boxHide=function(e){a.setState({auditionBox:e,singleBox:e,singleType:1}),a.props.history.push("/detail?id=".concat(Object(v.c)("id")))},a.state={isbuy:0,isvip:0,auditionBox:!1,singleBox:!1,singleType:1,shareRank:!1,singMess:"",barInfo:"",share:!1,countdown:"00:00:00",outList:[],list:[],course:{},nowPrice:0,laterPrice:0,isPdd:0,isRedPacket:!0},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){this.fetchCourseInfo();var e=this.props.location.state,t=void 0===e?{}:e;t.oid&&this.check(t.oid),(1===Object(v.c)("is_class")||Object(v.c)("weixinpay"))&&this.payCallback(),v.b.isWeixin&&this.isweixinPay(),this.judgeIsRedPacket(),Object(v.c)("share_code")&&this.setState({isRedPacket:!0})}},{key:"componentDidUpdate",value:function(e){e.user.hasError!==this.props.user.hasError&&this.fetchCourseInfo()}},{key:"render",value:function(){var e=this,t=this.state,a=t.course.course_info,n=void 0===a?{}:a,o=(t.barInfo,t.singleBox),c=t.singleType,s=t.isRedPacket,i=0;3!==n.group_status&&4!==n.group_status||(i=n.pdd_group_info.groupon_member.number);var r=this.state,l=r.share,d=r.countdown,u=(r.list,r.outList,""),p=this.props.location.state,f=void 0===p?{}:p;return f.to&&"classify"===f.to&&(u="/classify"),f.oid&&(u="/classify"),Object(v.c)("dist_code")&&(u="/"),m.a.createElement("div",null,m.a.createElement("div",{className:"detail-box"},m.a.createElement(W.e,{title:"\u8bfe\u7a0b\u8be6\u60c5",arrow:!0,cart:!0,toHref:u}),m.a.createElement(W.a,{className:"toapp",path:"/detail/id=".concat(Object(v.c)("id"))}),m.a.createElement(ee,{isShow:n.is_show}),m.a.createElement("div",{className:"course-content"},m.a.createElement("div",{className:"cover"},m.a.createElement("img",{src:n.image_name,alt:""}),n.is_aist&&m.a.createElement("span",{className:"return_cash"})),m.a.createElement("div",{className:"info"},m.a.createElement("p",{className:"title"},n.course_title),m.a.createElement("p",{className:"contact text-overflow-2"},n.simpledescription),m.a.createElement("div",{className:"des"},0===n.is_baoming&&m.a.createElement("p",{className:"course-price"},m.a.createElement("span",{className:"new"},"\xa5",n.price1),m.a.createElement("span",{className:"old"},"\xa5",n.price0))))),1===n.is_baoming&&1==n.is_pay&&1==n.contact_type&&n.course_qq&&m.a.createElement("div",{className:"group"},"\u4e0a\u8bfeQQ\u7fa4\uff1a",n.course_qq,"\uff0c\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a",n.uid),1===n.is_baoming&&1==n.is_pay&&2==n.contact_type&&n.course_qq&&m.a.createElement("div",{className:"group"},"\u8bf7\u6dfb\u52a0\u73ed\u4e3b\u4efb\u5fae\u4fe1\uff1a",n.course_qq,"\uff0c\u6dfb\u52a0\u65f6\u5907\u6ce8\u5b66\u53f7\uff1a",n.uid),n.vip_range&&1==n.is_vip&&0==n.is_pay&&1==n.contact_type&&n.course_qq&&m.a.createElement("div",{className:"vip"},m.a.createElement("p",null,"\u5df2\u5f00\u901a\u5e74\u4f1a\u5458\uff1a",n.vip_range),m.a.createElement("p",null,"\u4e0a\u8bfeQQ\u7fa4\uff1a",n.course_qq,"\uff0c\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a",n.uid)),n.vip_range&&1==n.is_vip&&0==n.is_pay&&2==n.contact_type&&n.course_qq&&m.a.createElement("div",{className:"vip"},m.a.createElement("p",null,"\u5df2\u5f00\u901a\u5e74\u4f1a\u5458\uff1a",n.vip_range),m.a.createElement("p",null,"\u8bf7\u6dfb\u52a0\u73ed\u4e3b\u4efb\u5fae\u4fe1\uff1a",n.course_qq,"\uff0c\u6dfb\u52a0\u65f6\u5907\u6ce8\u5b66\u53f7\uff1a",n.uid)),m.a.createElement("div",{className:"promise"},m.a.createElement("label",null,"\u670d\u52a1\u627f\u8bfa"),m.a.createElement("p",null,n.service&&n.service.length>0&&n.service.map(function(e,t){return m.a.createElement("span",{key:t}," ",e," ")}))),m.a.createElement(H,{auditionBox:this.state.auditionBox,boxHide:this.boxHide}),o&&m.a.createElement(Q.a,{singleType:this.state.singleType,singleBox:this.state.singleBox,boxHide:this.boxHide,data:this.state.singMess,vcourseId:n.v_course_id,videoId:this.state.singMess.video_id,title:n.course_title,check:this.check,courseId:n.course_id}),1!==c&&m.a.createElement(K.a,{boxHide:this.boxHide,data:this.state.singMess,singleType:c,vcourseId:n.v_course_id,videoId:this.state.singMess.video_id,nowPrice:this.state.nowPrice,isPdd:this.state.isPdd,laterPrice:this.state.laterPrice,courseId:n.course_id}),s&&m.a.createElement(fe,{history:this.props.history,country:this.props.country,delCountryNum:this.props.delCountryNum,userInfo:this.props.user.data}),n.is_dist&&m.a.createElement(J,{courseInfo:n}),!n.is_aist&&(3===n.group_status||4===n.group_status)&&m.a.createElement(D,{courseInfo:n,history:this.props.history,countdown:d,invitedFriends:this.invitedFriends}),0===n.is_baoming&&!n.is_aist&&n.is_bargain&&m.a.createElement(B,{country:this.props.country,delCountryNum:this.props.delCountryNum}),m.a.createElement(U,{data:n,toAudition:this.toAudition,toSingleset:this.toSingleset}),n&&m.a.createElement(Y,{countdown:d,data:n,user:this.props.user,invitedFriends:this.invitedFriends,toCart:this.toCart,history:this.props.history}),l?m.a.createElement("div",{className:"groupSuccessMbc",onClick:function(){e.setState({share:!1})}},m.a.createElement("div",{className:"tipContent"},"\u8fd8\u5dee".concat(i,"\u4eba\uff0c\u5206\u4eab\u52303\u4e2a\u7fa4\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")),m.a.createElement("div",{className:"tipArrow"},m.a.createElement("i",{className:"iconfont iconyindao"}))):null))}}]),t}(p.Component);t.default=Object(I.b)(function(e){return{user:Object(n.a)({},e.user),country:e.country}},function(e){return Object(j.b)({getCourses:G.d,addCourseToCart:G.c,delCountryNum:te.c},e)})(he)},617:function(e,t,a){},631:function(e,t){e.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="},632:function(e,t,a){"use strict";var n=a(5),o=a(7),c=a(6),s=a(8),i=a(9),r=a(0),l=a.n(r),d=a(24),u=a.n(d),p=(a(674),document.body||document.documentElement),m=["touchmove","mousewheel"],f=function(e){function t(e){var a;return Object(n.a)(this,t),(a=Object(c.a)(this,Object(s.a)(t).call(this,e))).preventScroll=function(e){e.preventDefault()},a.overlayBox=null,a}return Object(i.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){var e=this;m.forEach(function(t){e.overlayBox.addEventListener(t,e.preventScroll,{passive:!1})})}},{key:"componentWillUnmount",value:function(){var e=this;m.forEach(function(t){e.overlayBox.removeEventListener(t,e.preventScroll)})}},{key:"render",value:function(){var e=this;return u.a.createPortal(l.a.createElement("div",{className:"overlay",ref:function(t){return e.overlayBox=t},style:{top:"".concat(window.scrollY,"px")}},this.props.children),p)}}]),t}(r.Component);t.a=f},661:function(e,t,a){"use strict";a(41);var n=a(13),o=a.n(n),c=a(5),s=a(7),i=a(6),r=a(8),l=a(9),d=a(74),u=a(0),p=a.n(u),m=(a(617),a(3)),f=a(48),h=a(23),b=a(20),g=a(156),_=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(i.a)(this,Object(r.a)(t).call(this,e))).check=function(e){a.setState({payType:e})},a.toBuy=function(){var e=a.props.courseId,t=a.props.data.video_id||a.props.data.id;m.d.get("".concat(API.home,"/sys/createClassOrder/").concat(t)).then(function(t){200===t.data.code?(a.setState({orderId:t.data.data.order_id}),"1"===a.state.payType?a.alipayPay(t.data.data.order_id,e):a.weixinPay(t.data.data.order_id)):o.a.info(t.data.msg,2)})},a.weixinPay=function(e){m.b.isWeixin?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb&oid="+e).toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":m.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(t){0===t.data.errno?window.location.href=t.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1&oid="+e).toLowerCase():o.a.info(t.data.msg,2)})},a.alipayPay=function(e,t){m.d.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(window.location=e.data.data.url,t&&window.localStorage.setItem("payCourse",t)):o.a.info(e.data.msg,2)})},a.isweixinPay=function(){var e=Object(d.a)(Object(d.a)(a)),t=Object(m.c)("code");if(t){if(!Object(m.c)("oid"))return;m.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(m.c)("oid"),"/code/").concat(t)).then(function(t){if(0===t.data.errno){var a=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(t){"get_brand_wcpay_request:ok"==t.err_msg?(o.a.info("\u652f\u4ed8\u6210\u529f",2),e.intervalPayStatus=setInterval(function(){var t=this;m.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(m.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,m.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(m.c)("oid"))).then(function(e){200===Number(e.data.data.errno)?t.setState({status:6,showSingleBox:!0}):201===Number(e.data.data.errno)?t.setState({status:4,showSingleBox:!0}):202===Number(e.data.data.errno)?t.setState({status:3,showSingleBox:!0}):203===Number(e.data.data.errno)?t.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,status:2,showSingleBox:!0}):o.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 o.a.info(t.data.msg,2)})}},a.payCallback=function(){var e=Object(d.a)(Object(d.a)(a));Object(m.c)("oid")&&(e.intervalPayStatus=setInterval(function(){var t=this;m.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(m.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,m.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(m.c)("oid"))).then(function(e){200===Number(e.data.data.errno)?t.setState({status:6,showSingleBox:!0}):201===Number(e.data.data.errno)?t.setState({status:4,showSingleBox:!0}):202===Number(e.data.data.errno)?t.setState({status:3,showSingleBox:!0}):203===Number(e.data.data.errno)?t.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,status:2,showSingleBox:!0}):o.a.info(e.data.data.msg,2)}))})},1e3))},a.toBuyAll=function(){},a.zerobuyReceive=function(){o.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)):o.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):o.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}):o.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(s.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(g.differenceInSeconds)(new Date(t),a)%60,o=Object(g.differenceInMinutes)(new Date(t),a)%60,c=Object(g.differenceInHours)(new Date(t),a)%24;e.setState({hour:c,min:o,sec:n})},1e3)}return 1===this.props.singleType&&p.a.createElement("div",null,p.a.createElement("div",{className:"popup-box"},p.a.createElement("div",{className:"content singleset-payment"},p.a.createElement("div",{className:"price-box"},p.a.createElement("span",null,"\u5b9e\u4ed8\u6b3e\uff1a"),p.a.createElement("p",null,this.props.data.class_price,"\u5143")),p.a.createElement("div",{className:"course-info"},p.a.createElement("p",{className:"text-overflow-1"},p.a.createElement("span",null,"\u8bfe\u7a0b\uff1a"),this.props.title),p.a.createElement("p",{className:"text-overflow-1"},p.a.createElement("span",null,"\u8bfe\u65f6\uff1a"),this.props.data.name)),p.a.createElement("div",{className:"payment-type"},p.a.createElement("label",null,"\u652f\u4ed8\u65b9\u5f0f\uff1a"),p.a.createElement("p",{onClick:this.check.bind(this,"0")},p.a.createElement("i",{className:"iconfont iconweixinzhifu buy"}),p.a.createElement("span",null,"\u5fae\u4fe1\u652f\u4ed8"),p.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("0"===this.state.payType?"redioed":"")})),!m.b.isWeixin&&p.a.createElement("p",{onClick:this.check.bind(this,"1")},p.a.createElement("i",{className:"iconfont iconalipay"}),p.a.createElement("span",null,"\u652f\u4ed8\u5b9d"),p.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("1"===this.state.payType?"redioed":"")}))),p.a.createElement("div",{className:"btn btn-18B4ED",onClick:this.toBuy},"\u786e\u8ba4\u8d2d\u4e70")),p.a.createElement("i",{onClick:this.colse,className:"iconfont iconiconfront-2 close"})))}}]),t}(u.Component);t.a=Object(h.d)(Object(b.b)(function(e){return{user:e.user}},null),f.g)(_)},662:function(e,t,a){"use strict";a(41);var n=a(13),o=a.n(n),c=a(5),s=a(7),i=a(6),r=a(8),l=a(9),d=a(0),u=a.n(d),p=(a(617),a(3)),m=a(48),f=a(23),h=a(20),b=a(156),g=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(i.a)(this,Object(r.a)(t).call(this,e))).check=function(e){a.setState({payType:e})},a.toBuy=function(){var e=a.props.data.video_id||a.props.data.id;p.d.get("".concat(API.home,"/sys/createClassOrder/").concat(e)).then(function(e){200===e.data.code?(a.setState({orderId:e.data.data.order_id}),"1"===a.state.payType?a.alipayPay(e.data.data.order_id):a.weixinPay(e.data.data.order_id)):o.a.info(e.data.msg,2)})},a.weixinPay=function(e){p.b.isWeixin?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb&oid="+e).toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":p.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(t){0===t.data.errno?window.location.href=t.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1&oid="+e).toLowerCase():o.a.info(t.data.msg,2)})},a.alipayPay=function(e){var t=Object(p.c)("id");p.d.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(window.location=e.data.data.url,t&&window.localStorage.setItem("payCourse",t)):o.a.info(e.data.msg,2)})},a.toBuyAll=function(e){if(1===Number(a.props.isPdd))a.props.history.push("/order?id=".concat(a.props.courseId),{group:1});else{var t=JSON.stringify([Number(e)]);p.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/").concat(t)).then(function(e){0===e.data.errno?a.props.history.push("/order?id="+e.data.data[0],{simple:1}):o.a.info(e.data.msg,2)})}},a.zerobuyReceive=function(){o.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)):o.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):o.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}):o.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(l.a)(t,e),Object(s.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(b.differenceInSeconds)(new Date(t),a)%60,o=Object(b.differenceInMinutes)(new Date(t),a)%60,c=Object(b.differenceInHours)(new Date(t),a)%24;e.setState({hour:c,min:o,sec:n})},1e3)}var n=this.props.singleType,o=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,o)},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,o)},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}(d.Component);t.a=Object(f.d)(Object(h.b)(function(e){return{user:e.user}},null),m.g)(g)},672:function(e,t,a){"use strict";var n=a(5),o=a(7),c=a(6),s=a(8),i=a(9),r=a(0),l=a.n(r),d=(a(673),function(e){function t(e){var o;return Object(n.a)(this,t),(o=Object(c.a)(this,Object(s.a)(t).call(this,e))).closeMore=function(){o.props.boxHide(!1)},o.state={kanjiaIcon:a(631)},o}return Object(i.a)(t,e),Object(o.a)(t,[{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}))}}]),t}(r.Component));function u(e){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"},e.list&&e.list.length>0&&e.list.map(function(t,a){return l.a.createElement("li",{key:a,className:"bargain-item"},l.a.createElement("img",{className:"avatar",src:t.avatar_file,alt:""}),l.a.createElement("p",{className:"name"},t.user_name),l.a.createElement("p",{className:"bargain-status"},l.a.createElement("img",{className:"kanjia-icon",src:e.img,alt:""}),"\u780d\u6389",l.a.createElement("span",{className:"price"},t.amount)))})),l.a.createElement("div",{className:"more-bargain-dec"},"\u8d85\u8fc7",e.limitPeople,"\u4f4d\u597d\u53cb\u52a9\u529b\u53ef\u83b7\u5f97\u3010\u780d\u4ef7\u795e\u5668\u3011")),l.a.createElement("i",{onClick:e.closeMore,className:"iconfont iconiconfront-2 close"}))}t.a=d},673:function(e,t,a){},674:function(e,t,a){}}]);
//# sourceMappingURL=detail.ea824723.chunk.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
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.
!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={22:0},o={22: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]&&{2:1,3:1,4:1,5:1,6:1,7:1,9:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,20:1,21:1,23:1,24:1,25:1,26:1,27: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/"+({2:"BargainMiddlePage",3:"Classify",4:"Country",5:"CourseList",6:"DrawDocument",7:"Examination",8:"MyEdit",9:"Order",10:"Orderinfo",11:"PayOrder",12:"Preferential",13:"SearchResult",14:"ShareCourse",15:"ShopCart",16:"aist-share",17:"coupons",18:"detail",20:"myorders",21:"purchased",23:"search",24:"shareposter",25:"study",26:"togroup",27:"video"}[e]||e)+"."+{0:"31d6cfe0",1:"31d6cfe0",2:"fc53c3d0",3:"f2f19957",4:"16a64650",5:"85889ffd",6:"2e7d81ca",7:"f2cc3163",8:"31d6cfe0",9:"8bb031ea",10:"31d6cfe0",11:"e5315535",12:"cda7a495",13:"bb7c3056",14:"278ad3b1",15:"3a4dbb7a",16:"bef8c404",17:"2fcc3e06",18:"8d310f0f",20:"3ae12dec",21:"dd7556e0",23:"fab97849",24:"f09a5959",25:"b002c899",26:"49988cae",27:"b57a1aec",29:"4c706a4e",30:"2471f477",31:"0bb224f2",32:"5ed15c7e",33:"ecbb6f9a"}[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/"+({2:"BargainMiddlePage",3:"Classify",4:"Country",5:"CourseList",6:"DrawDocument",7:"Examination",8:"MyEdit",9:"Order",10:"Orderinfo",11:"PayOrder",12:"Preferential",13:"SearchResult",14:"ShareCourse",15:"ShopCart",16:"aist-share",17:"coupons",18:"detail",20:"myorders",21:"purchased",23:"search",24:"shareposter",25:"study",26:"togroup",27:"video"}[e]||e)+"."+{0:"cc475f61",1:"5926cefc",2:"47d6d11b",3:"f4b0e95e",4:"2f1e3ba6",5:"ad80ef1f",6:"b607db8f",7:"97026877",8:"d9cf1de7",9:"1956906f",10:"c5a68e88",11:"8534c9f2",12:"b9de8327",13:"82c4db68",14:"543c57d3",15:"d6804bde",16:"cde60f9d",17:"1ee98542",18:"ea824723",20:"21588e23",21:"1623b0b5",23:"f7766add",24:"456c17f8",25:"0512da7d",26:"34d5a4fa",27:"71e4de46",29:"55833d30",30:"5be43a00",31:"00acec59",32:"63ff864e",33:"900c665c"}[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.62f2beae.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","22","exports","module","l","e","promises","2","3","4","5","6","7","9","11","12","13","14","15","16","17","18","20","21","23","24","25","26","27","29","30","31","32","33","Promise","resolve","reject","href","8","10","0","1","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,GAKAN,EAAA5B,GAAAkC,EAAA1B,KAAAoB,EAAA5B,IACA,IAAA4B,EAAA5B,IAFA,CAAoBmC,EAAA,EAAAC,EAAA,EAAAC,EAAA,EAAAC,EAAA,EAAAC,EAAA,EAAAC,EAAA,EAAAC,EAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,EAAAC,GAAA,GAEpB7D,IACAkC,EAAA1B,KAAAoB,EAAA5B,GAAA,IAAA8D,QAAA,SAAAC,EAAAC,GAIA,IAHA,IAAAC,EAAA,kBAAoC9B,EAAA,oBAAAC,EAAA,WAAAC,EAAA,UAAAC,EAAA,aAAAC,EAAA,eAAAC,EAAA,cAAA0B,EAAA,SAAAzB,EAAA,QAAA0B,GAAA,YAAAzB,GAAA,WAAAC,GAAA,eAAAC,GAAA,eAAAC,GAAA,cAAAC,GAAA,WAAAC,GAAA,aAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,WAAAC,GAAA,YAAAC,GAAA,SAAAC,GAAA,cAAAC,GAAA,QAAAC,GAAA,UAAAC,GAAA,SAA0YxD,OAAA,KAA6BoE,EAAA,WAAAC,EAAA,WAAAlC,EAAA,WAAAC,EAAA,WAAAC,EAAA,WAAAC,EAAA,WAAAC,EAAA,WAAAC,EAAA,WAAA0B,EAAA,WAAAzB,EAAA,WAAA0B,GAAA,WAAAzB,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,YAAse7D,GAAA,aACj7BsE,EAAA7C,EAAA8C,EAAAN,EACAO,EAAAC,SAAAC,qBAAA,QACAtE,EAAA,EAAmBA,EAAAoE,EAAAlE,OAA6BF,IAAA,CAChD,IACAuE,GADAC,EAAAJ,EAAApE,IACAyE,aAAA,cAAAD,EAAAC,aAAA,QACA,kBAAAD,EAAAE,MAAAH,IAAAV,GAAAU,IAAAL,GAAA,OAAAP,IAEA,IAAAgB,EAAAN,SAAAC,qBAAA,SACA,IAAAtE,EAAA,EAAmBA,EAAA2E,EAAAzE,OAA8BF,IAAA,CACjD,IAAAwE,EAEA,IADAD,GADAC,EAAAG,EAAA3E,IACAyE,aAAA,gBACAZ,GAAAU,IAAAL,EAAA,OAAAP,IAEA,IAAAiB,EAAAP,SAAAQ,cAAA,QACAD,EAAAF,IAAA,aACAE,EAAAE,KAAA,WACAF,EAAAG,OAAApB,EACAiB,EAAAI,QAAA,SAAAC,GACA,IAAAC,EAAAD,KAAAE,QAAAF,EAAAE,OAAAC,KAAAlB,EACAmB,EAAA,IAAAC,MAAA,qBAAA1F,EAAA,cAAAsF,EAAA,KACAG,EAAAH,iBACA1D,EAAA5B,GACAgF,EAAAW,WAAAC,YAAAZ,GACAhB,EAAAyB,IAEAT,EAAAf,KAAAK,EAEAG,SAAAC,qBAAA,WACAmB,YAAAb,KACKc,KAAA,WACLlE,EAAA5B,GAAA,KAMA,IAAA+F,EAAAxF,EAAAP,GACA,OAAA+F,EAGA,GAAAA,EACA7D,EAAA1B,KAAAuF,EAAA,QACK,CAEL,IAAAC,EAAA,IAAAlC,QAAA,SAAAC,EAAAC,GACA+B,EAAAxF,EAAAP,GAAA,CAAA+D,EAAAC,KAEA9B,EAAA1B,KAAAuF,EAAA,GAAAC,GAGA,IACAC,EADAC,EAAAzB,SAAAQ,cAAA,UAGAiB,EAAAC,QAAA,QACAD,EAAAE,QAAA,IACA3E,EAAA4E,IACAH,EAAAI,aAAA,QAAA7E,EAAA4E,IAEAH,EAAAV,IAlGA,SAAAxF,GACA,OAAAyB,EAAA8C,EAAA,iBAAqDpC,EAAA,oBAAAC,EAAA,WAAAC,EAAA,UAAAC,EAAA,aAAAC,EAAA,eAAAC,EAAA,cAAA0B,EAAA,SAAAzB,EAAA,QAAA0B,GAAA,YAAAzB,GAAA,WAAAC,GAAA,eAAAC,GAAA,eAAAC,GAAA,cAAAC,GAAA,WAAAC,GAAA,aAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,WAAAC,GAAA,YAAAC,GAAA,SAAAC,GAAA,cAAAC,GAAA,QAAAC,GAAA,UAAAC,GAAA,SAA0YxD,OAAA,KAA6BoE,EAAA,WAAAC,EAAA,WAAAlC,EAAA,WAAAC,EAAA,WAAAC,EAAA,WAAAC,EAAA,WAAAC,EAAA,WAAAC,EAAA,WAAA0B,EAAA,WAAAzB,EAAA,WAAA0B,GAAA,WAAAzB,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,WAAAC,GAAA,YAAse7D,GAAA,YAiGl8BuG,CAAAvG,GAEAiG,EAAA,SAAAZ,GAEAa,EAAAd,QAAAc,EAAAf,OAAA,KACAqB,aAAAJ,GACA,IAAAK,EAAAlG,EAAAP,GACA,OAAAyG,EAAA,CACA,GAAAA,EAAA,CACA,IAAAC,EAAArB,IAAA,SAAAA,EAAAH,KAAA,UAAAG,EAAAH,MACAyB,EAAAtB,KAAAE,QAAAF,EAAAE,OAAAC,IACAoB,EAAA,IAAAlB,MAAA,iBAAA1F,EAAA,cAAA0G,EAAA,KAAAC,EAAA,KACAC,EAAA1B,KAAAwB,EACAE,EAAAtB,QAAAqB,EACAF,EAAA,GAAAG,GAEArG,EAAAP,QAAA6G,IAGA,IAAAT,EAAAU,WAAA,WACAb,EAAA,CAAwBf,KAAA,UAAAK,OAAAW,KAClB,MACNA,EAAAd,QAAAc,EAAAf,OAAAc,EACAxB,SAAAsC,KAAAlB,YAAAK,GAGA,OAAApC,QAAAkD,IAAA9E,IAIAT,EAAAwF,EAAApG,EAGAY,EAAAyF,EAAAvF,EAGAF,EAAA0F,EAAA,SAAArF,EAAAsF,EAAAC,GACA5F,EAAA6F,EAAAxF,EAAAsF,IACA3G,OAAA8G,eAAAzF,EAAAsF,EAAA,CAA0CI,YAAA,EAAAC,IAAAJ,KAK1C5F,EAAAiG,EAAA,SAAA5F,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.62f2beae.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\t22: 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\t22: 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/\" + ({\"2\":\"BargainMiddlePage\",\"3\":\"Classify\",\"4\":\"Country\",\"5\":\"CourseList\",\"6\":\"DrawDocument\",\"7\":\"Examination\",\"8\":\"MyEdit\",\"9\":\"Order\",\"10\":\"Orderinfo\",\"11\":\"PayOrder\",\"12\":\"Preferential\",\"13\":\"SearchResult\",\"14\":\"ShareCourse\",\"15\":\"ShopCart\",\"16\":\"aist-share\",\"17\":\"coupons\",\"18\":\"detail\",\"20\":\"myorders\",\"21\":\"purchased\",\"23\":\"search\",\"24\":\"shareposter\",\"25\":\"study\",\"26\":\"togroup\",\"27\":\"video\"}[chunkId]||chunkId) + \".\" + {\"0\":\"cc475f61\",\"1\":\"5926cefc\",\"2\":\"47d6d11b\",\"3\":\"f4b0e95e\",\"4\":\"2f1e3ba6\",\"5\":\"ad80ef1f\",\"6\":\"b607db8f\",\"7\":\"97026877\",\"8\":\"d9cf1de7\",\"9\":\"1956906f\",\"10\":\"c5a68e88\",\"11\":\"8534c9f2\",\"12\":\"b9de8327\",\"13\":\"82c4db68\",\"14\":\"543c57d3\",\"15\":\"d6804bde\",\"16\":\"cde60f9d\",\"17\":\"1ee98542\",\"18\":\"ea824723\",\"20\":\"21588e23\",\"21\":\"1623b0b5\",\"23\":\"f7766add\",\"24\":\"456c17f8\",\"25\":\"0512da7d\",\"26\":\"34d5a4fa\",\"27\":\"71e4de46\",\"29\":\"55833d30\",\"30\":\"5be43a00\",\"31\":\"00acec59\",\"32\":\"63ff864e\",\"33\":\"900c665c\"}[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 = {\"2\":1,\"3\":1,\"4\":1,\"5\":1,\"6\":1,\"7\":1,\"9\":1,\"11\":1,\"12\":1,\"13\":1,\"14\":1,\"15\":1,\"16\":1,\"17\":1,\"18\":1,\"20\":1,\"21\":1,\"23\":1,\"24\":1,\"25\":1,\"26\":1,\"27\":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/\" + ({\"2\":\"BargainMiddlePage\",\"3\":\"Classify\",\"4\":\"Country\",\"5\":\"CourseList\",\"6\":\"DrawDocument\",\"7\":\"Examination\",\"8\":\"MyEdit\",\"9\":\"Order\",\"10\":\"Orderinfo\",\"11\":\"PayOrder\",\"12\":\"Preferential\",\"13\":\"SearchResult\",\"14\":\"ShareCourse\",\"15\":\"ShopCart\",\"16\":\"aist-share\",\"17\":\"coupons\",\"18\":\"detail\",\"20\":\"myorders\",\"21\":\"purchased\",\"23\":\"search\",\"24\":\"shareposter\",\"25\":\"study\",\"26\":\"togroup\",\"27\":\"video\"}[chunkId]||chunkId) + \".\" + {\"0\":\"31d6cfe0\",\"1\":\"31d6cfe0\",\"2\":\"fc53c3d0\",\"3\":\"f2f19957\",\"4\":\"16a64650\",\"5\":\"85889ffd\",\"6\":\"2e7d81ca\",\"7\":\"f2cc3163\",\"8\":\"31d6cfe0\",\"9\":\"8bb031ea\",\"10\":\"31d6cfe0\",\"11\":\"e5315535\",\"12\":\"cda7a495\",\"13\":\"bb7c3056\",\"14\":\"278ad3b1\",\"15\":\"3a4dbb7a\",\"16\":\"bef8c404\",\"17\":\"2fcc3e06\",\"18\":\"8d310f0f\",\"20\":\"3ae12dec\",\"21\":\"dd7556e0\",\"23\":\"fab97849\",\"24\":\"f09a5959\",\"25\":\"b002c899\",\"26\":\"49988cae\",\"27\":\"b57a1aec\",\"29\":\"4c706a4e\",\"30\":\"2471f477\",\"31\":\"0bb224f2\",\"32\":\"5ed15c7e\",\"33\":\"ecbb6f9a\"}[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([[27],{1196:function(e,t,a){"use strict";a.r(t);a(41);var n,i=a(13),c=a.n(i),o=a(5),s=a(7),r=a(6),d=a(8),l=a(9),u=a(74),p=(a(254),a(92)),m=a.n(p),h=a(0),f=a.n(h),v=a(164),y=(a(795),a(15)),g=a(48),b=a(3),_=a(20),E=(a(73),a(796),a(649)),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,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return(a=Object(r.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(i)))).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:[]}):c.a.info(t.msg)})},a.toCourseDetail=function(e){var t=a.props;t.dispatch;t.history.push("/detail?id=".concat(e))},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.getRecommendation()}},{key:"render",value:function(){var e=this;return this.state.list.length?f.a.createElement("div",{className:"recommendation"},f.a.createElement("div",{className:"title"},"\u76f8\u5173\u63a8\u8350"),f.a.createElement("ul",null,this.state.list.map(function(t){var a=f.a.createElement("div",{className:"info"},f.a.createElement("p",{className:"title text-overflow-1"},t.course_title),f.a.createElement("p",{className:"des text-overflow-2"},t.simpledescription),f.a.createElement(S,{item:t}));return f.a.createElement(E.a,{key:t.course_id,img:t.image_name,handleClick:e.toCourseDetail,info:a,id:t.course_id})}))):null}}]),t}(h.PureComponent))||n,I=(a(797),a(16)),N=a.n(I),P=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(r.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(i)))).handleClick=function(e){a.props.selectVideo(e)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this;return f.a.createElement("div",{className:"video-catalog"},f.a.createElement("ul",null,this.props.videoCatalog.map(function(t,a){return f.a.createElement("li",{key:t.id,className:N()({active:e.props.activeIndex===a})},f.a.createElement("div",{className:"video-title",onClick:e.handleClick.bind(e,a)},f.a.createElement("span",{className:"title"},t.name),f.a.createElement("span",{className:"duration"},t.duration),f.a.createElement("i",{className:N()("iconfont",[0===t.video_auth?"iconiconfront-74":"iconplay_hovericon"])})),t.practice&&t.practice.qid?f.a.createElement(y.b,{to:{pathname:t.practice.is_tested?"/campResolve":"/campTest",search:"?keshi_id=".concat(t.id,"&qid=").concat(t.practice.qid),state:{from:"/play/video".concat(window.location.search)}}},f.a.createElement("div",{className:"exercise"},"\u8bfe\u540e\u7ec3\u4e60\uff1a",t.practice.title,f.a.createElement("i",{className:N()("iconfont",t.video_auth?t.practice.is_tested?"iconiconfront-3":"":"iconiconfront-74")}))):null)})))}}]),t}(h.Component),O=(a(798),a(800)),x=a.n(O),j=(a(801),function(e){function t(){return Object(o.a)(this,t),Object(r.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.datum;return f.a.createElement("div",{className:"datum-catalog"},f.a.createElement("p",{className:"prompt"},"\u8bfe\u7a0b\u8d44\u6599\u8bf7\u5230PC\u7aef\u64ad\u653e\u9875\u4e0b\u8f7d"),f.a.createElement(x.a,null,e&&e.length&&e.map(function(e,t){return f.a.createElement(x.a.Panel,{header:e.dir_name,key:t},e.files.map(function(e){return f.a.createElement("div",{key:e.file_id,className:"file-name"},e.file_name)}))})))}}]),t}(h.Component));j.defaultProps={datum:[{dir_name:"",files:[{file_name:"",file_id:0}]}]};var k=j,C=a(784),T=(a(847),a(26)),A=a(37),B=a.n(A),R=a(848),L=a.n(R),D=a(661),W=a(662),M=a(1175),J=C.a.getComponent("Component"),V=C.a.getComponent("Button"),z=function(e){function t(){return Object(o.a)(this,t),Object(r.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(s.a)(t,[{key:"createEl",value:function(){return Object(M.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),H=function(e){function t(e,a){var n;return Object(o.a)(this,t),(n=Object(r.a)(this,Object(d.a)(t).call(this,e,a))).on("tap",n.tap),n}return Object(l.a)(t,e),Object(s.a)(t,[{key:"createEl",value:function(){return Object(M.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}(V);J.registerComponent("CustomPlayButton",H),z.prototype.options_={children:["CustomPlayButton"]},J.registerComponent("CustomPlayButtonCover",z);var F=m.a.alert;function U(e){return e.isShow&&f.a.createElement("div",{className:"progress-share-modal-wrapper"},f.a.createElement("div",{className:"progress-share-modal"},f.a.createElement("div",{className:"title"},"\u6bcf\u65e5\u6253\u5361"),f.a.createElement("ul",{className:"progress-container"},f.a.createElement("li",null,f.a.createElement("div",{className:"title"},"\u7d2f\u8ba1\u5b66\u4e60"),f.a.createElement("div",{className:"number"},f.a.createElement("span",{className:"num"},e.data.learn_day_count),"\u5929")),f.a.createElement("li",null,f.a.createElement("div",{className:"title"},"\u884c\u52a8\u529b\u8d85\u8fc7"),f.a.createElement("div",{className:"number"},f.a.createElement("span",{className:"num"},parseFloat(e.data.action_power)),"%"))),f.a.createElement("div",{className:"share-container"},f.a.createElement("div",{className:"title"},"\u5206\u4eab\u5230"),f.a.createElement("ul",null,f.a.createElement("li",{className:"share-icon"},f.a.createElement("a",{style:{display:"block"},href:e.data.url},f.a.createElement("div",{className:"icon"},f.a.createElement("i",{className:"iconfont iconweixinzhifu"})),f.a.createElement("div",{className:"text"},"\u5fae\u4fe1\u597d\u53cb"))),f.a.createElement("li",{className:"share-icon"},f.a.createElement("a",{style:{display:"block"},href:e.data.url},f.a.createElement("div",{className:"icon"},f.a.createElement("i",{className:"iconfont iconpengyouquaniconx"})),f.a.createElement("div",{className:"text"},"\u670b\u53cb\u5708"))))),f.a.createElement("i",{className:"iconfont iconiconfront-2 close",onClick:e.closeShareModal})))}var q=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return(a=Object(r.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(i)))).previousPlaybackRate=1,a.currentPlaybackRate=1,a.reconnect=!0,a.isCurrentVideoFirstPlay=!0,a.WATCHTIME="watch_time",a.COUNTSCHEDULE="count_schedule",a.RECENTLEARN="recent_learn",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}):c.a.info(e.data.msg,2)})},a.toSingleset=function(e){a.setState({singleBox:!0,singleType:1,singMess:e}),window.localStorage.setItem("singMess",JSON.stringify(e))},a.boxHide=function(e){a.setState({singleBox:e,singleType:1})},a.payCallback=function(){var e=Object(u.a)(Object(u.a)(a));Object(b.c)("oid")&&(a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),e.intervalPayStatus=setInterval(function(){b.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(b.c)("oid"))).then(function(t){401===t.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,b.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(b.c)("oid"))).then(function(t){200===Number(t.data.data.errno)?e.setState({singleType:6}):201===Number(t.data.data.errno)?e.setState({singleType:4}):202===Number(t.data.data.errno)?e.setState({singleType:3}):203===Number(t.data.data.errno)?e.setState({nowPrice:t.data.data.data.now_price,laterPrice:t.data.data.data.three_day_later_price,singleType:2}):c.a.info(t.data.data.msg,2)}))})},1e3))},a.isweixinPay=function(){var e=Object(u.a)(Object(u.a)(a)),t=Object(b.c)("code");if(t){if(!Object(b.c)("oid"))return;a.setState({singMess:JSON.parse(window.localStorage.getItem("singMess"))}),b.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(b.c)("oid"),"/code/").concat(t)).then(function(t){if(0===t.data.errno){var a=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(t){"get_brand_wcpay_request:ok"==t.err_msg?(c.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}):c.a.info(t.data.data.msg,2)}))})},1e3)):F("\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.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}):c.a.info(e.data.data.msg,2)})},a.setupRecord=function(){a.recordSocket=L()(API.record,{transports:["websocket"],forceNew:!0}),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.timer=null}),a.ws.addEventListener("message",function(e){var t=JSON.parse(e.data);4040==t.code&&(a.reconnect=!1),0===t.code&&(console.log("\u4e0a\u6b21\u7684\u5b66\u4e60\u8bb0\u5f55"+JSON.stringify(t)),t.data&&t.data.position&&a.player.currentTime(t.data.position))})},a.sendMessage=function(e){var t=a.ws.readyState,n=Object(u.a)(Object(u.a)(a));if(1===t)a.ws&&a.ws.send(JSON.stringify(e));else if(3===t){a.ws.close(),a.ws=null;var i=setTimeout(function(){clearTimeout(i),i=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,i=e.vCourseId,c=e.course,o=void 0===c?{}:c;if(0!==Number(o.course_id)&&""!==o.course_id){var s=0;o.is_aist&&(s=2),a.sendMessage({mtype:"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:i,ctype:s})}else console.log("\u514d\u8d39\u8bfe\u7a0b \u62e6\u622a")},a.sendWatchTime=function(e,t){var n=a.state,i=n.videoList,c=n.activeIndex,o=n.vCourseId,s=n.course,r=void 0===s?{}:s;if(0!==Number(e)){var d=0;r.is_aist&&(d=2),a.sendMessage({mtype:"watch_time",rate:t,time:e,video_id:i[c].id,course_id:a.state.courseId,v_course_id:o,uid:a.props.user.data.uid,token:a.token,platform:5,position:parseInt(a.player.currentTime()),ctype:d})}},a.setupTimer=function(){a.count=0,a.watchSec=0,clearInterval(a.timer),a.timer=null,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.player.paused()&&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("play",function(){var e=a.state,t=e.videoList,n=e.activeIndex,i=e.vCourseId;e.course;a.isCurrentVideoFirstPlay&&(a.isCurrentVideoFirstPlay=!1,a.ws.send(JSON.stringify({mtype:a.RECENTLEARN,uid:a.props.user.data.uid,token:a.token,platform:5,video_id:t[n].id,course_id:a.state.courseId,v_course_id:i,is_live:0}))),a.timer||a.setupTimer()}),a.player.on("ratechange",function(){a.currentPlaybackRate=a.player.playbackRate(),a.sendWatchTime(a.watchSec,a.previousPlaybackRate),a.count=a.watchSec=0,a.previousPlaybackRate=a.currentPlaybackRate}),a.player.on("ended",function(){a.sendWatchTime(a.watchSec,a.currentPlaybackRate),a.count=a.watchSec=0,a.countSchedule(),a.state.course.is_aist&&a.getShareProgressInfo(),clearInterval(a.timer),a.timer=null}),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 \u518d\u53d1\u9001\u8fdb\u5ea6 \u5728\u91cd\u7f6e\u5b9a\u65f6\u5668"),a.isCurrentVideoFirstPlay=!0,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="";Object(b.c)("video_id")?(e="".concat(API.home,"/m/course/play/").concat(a.courseID+"?video_id="+Object(b.c)("video_id")),b.d.post("".concat(API["base-api"],"/sys/get_class_audition"),{video_id:Object(b.c)("video_id")})):e="".concat(API.home,"/m/course/play/").concat(a.courseID),b.d.get(e).then(function(e){var t=e.data,n=t.data,i=void 0===n?{}:n;200===t.code?a.setState(function(e){return{videoList:i.lessons,currentVideoSrc:i.lessons[e.activeIndex].play_url,course:i.course,courseId:i.course.course_id,vCourseId:i.course.v_course_id,title:i.course.course_title,isLoading:!1}},a.playSetup):c.a.info(i.msg)})},a.playSetup=function(){var e=a.state.course,t=void 0===e?{}:e,n=Object(u.a)(Object(u.a)(a));a.setupWS(),a.setupTimer();var i=setTimeout(function(){clearTimeout(i),i=null,n.countSchedule()},1e3),c=a.getLastVideoIndex(t.last_video_id);c=c>=0?c:0,a.setState({activeIndex:c},function(){a.lessonAvailable(c)?a.hasAuth(c)?Promise.resolve().then(function(){a.initializePlayer(),a.playWithAuth()}):a.getCoursePrice():F("\u6682\u65e0\u89c6\u9891","",[{text:"OK",onPress:function(){a.props.history.push("/")}}])})},a.setPlayerSrc=function(e){a.player||a.initializePlayer(),a.player.src({src:e,type:"application/x-mpegURL"})},a.playVideo=function(){a.player.play()},a.lessonAvailable=function(e){return 0!==a.state.videoList[e].video_size},a.getCoursePrice=function(){var e=a.state.course,t=void 0===e?{}:e;b.d.get("".concat(API.home,"/sys/course/price/").concat(t.course_id)).then(function(e){var t=e.data;200===t.code&&a.setState({salePrice:t.data.sale_price})})},a.playWithAuth=function(){var e=a.state,t=e.videoList,n=e.activeIndex;a.hasAuth(n)&&a.setPlayerSrc(t[n].play_url)},a.hasAuth=function(e){return a.state.videoList[e].video_auth?(a.setState({isAuth:!0}),!0):(a.setState({isAuth:!1}),!1)},a}return Object(l.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){if("https:"!==window.location.protocol)if(this.courseID=Object(b.c)("id"),this.courseID){this.setState({courseId:this.courseID});var e=this.props,t=(e.location,e.location.state),a=void 0===t?{}:t;a.oid&&this.check(a.oid),(1===Object(b.c)("is_class")||Object(b.c)("weixinpay"))&&this.payCallback(),b.b.isWeixin&&this.isweixinPay(),this.token=B.a.get("token"),this.getVideoList(),this.getDatumCatalog(),this.setupRecord()}else this.props.history.replace("/");else window.location.replace("http"+window.location.href.slice(5))}},{key:"componentWillUnmount",value:function(){this.player&&this.player.dispose(),clearInterval(this.timer),this.timer=null,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}):c.a.info(a.msg)})}},{key:"render",value:function(){var e=this,t=this.props,a=t.match,n=t.location,i=t.history,c=this.state,o=c.videoList,s=c.activeIndex,r=c.isAuth,d=c.salePrice,l=c.course,u=c.singleBox,p=c.singleType,m="";return n.state&&n.state.to&&"detail"===n.state.to&&(m="/detail?id=".concat(l.course_id)),f.a.createElement("div",{className:"play"},f.a.createElement(v.a,{title:this.state.title,arrow:!0,toHref:function(){m?i.push(m,{to:"classify"}):i.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},"webkit-playsinline":"true",playsInline:!0,"x-webkit-airplay":"allow","x5-video-player-type":"h5"},f.a.createElement("source",{src:"/",type:"application/x-mpegURL"})),!r&&!!o[s].is_class&&f.a.createElement("div",{className:"purchase-box"},f.a.createElement("div",{className:"hint"},"\u60a8\u5c1a\u672a\u8d2d\u4e70\u8be5\u8bfe\u65f6\uff0c\u8bf7\u8d2d\u4e70\u540e\u5b66\u4e60\u3002"),f.a.createElement("div",{className:"btns"},f.a.createElement("button",{type:"button",onClick:this.tobuy,className:"purchase-class"},"\xa5",d," \u8d2d\u4e70\u8bfe\u7a0b"),f.a.createElement("button",{type:"button",onClick:this.toSingleset.bind(this,o[s]),className:"purchase-episode"},"\xa5",o.length&&o[s].class_price," \u8d2d\u4e70\u5355\u96c6"))),!r&&!!l.is_aist&&f.a.createElement("div",{className:"is-aist-box"},f.a.createElement("i",{className:"iconfont iconiconfront-21"}),f.a.createElement("p",{className:"time"},o[s].aist_start_time),f.a.createElement("p",{className:"time"},"\u8bf7\u8010\u5fc3\u7b49\u5f85..."))),f.a.createElement("div",{className:"tab"},f.a.createElement("div",null,f.a.createElement(y.c,{to:{pathname:"".concat(a.url,"/video"),search:"?id=".concat(this.courseID)},replace:!0,activeClassName:"active"},"\u89c6\u9891")),f.a.createElement("div",null,f.a.createElement(y.c,{to:{pathname:"".concat(a.url,"/datum"),search:"?id=".concat(this.courseID)},replace:!0,activeClassName:"active"},"\u8d44\u6599"))),u&&f.a.createElement(D.a,{courseId:l.course_id,singleBox:this.state.singleBox,boxHide:this.boxHide,data:this.state.singMess,singleType:this.state.singleType,vcourseId:l.v_course_id,videoId:this.state.singMess.video_id,check:this.check,title:this.state.singMess.course_tile}),1!==p&&f.a.createElement(W.a,{courseId:l.course_id,boxHide:this.boxHide,data:this.state.singMess,singleType:p,vcourseId:l.v_course_id,videoId:this.state.singMess.video_id,nowPrice:this.state.nowPrice,laterPrice:this.state.laterPrice})),f.a.createElement(g.d,null,f.a.createElement(g.a,{exact:!0,from:"/play",to:{pathname:"/play/video",search:n.search}}),f.a.createElement(g.b,{path:"".concat(a.path,"/video"),render:function(t){return f.a.createElement(P,Object.assign({activeIndex:e.state.activeIndex,selectVideo:e.selectVideo,videoCatalog:o},t))}}),f.a.createElement(g.b,{path:"".concat(a.path,"/datum"),render:function(t){return f.a.createElement(k,Object.assign({},t,{datum:e.state.datum}))}})),f.a.createElement(g.b,{render:function(t){return e.state.vCourseId?f.a.createElement(w,Object.assign({},t,{vCourseId:e.state.vCourseId})):null}}),f.a.createElement(U,{isShow:this.state.isShowShareModal,closeShareModal:function(){return e.setState({isShowShareModal:!1})},data:this.state.shareData}))}}]),t}(h.Component);t.default=Object(_.b)(function(e){return{user:e.user}},null)(q)},617:function(e,t,a){},649:function(e,t,a){"use strict";var n=a(0),i=a.n(n);a(650);t.a=function(e){return i.a.createElement("li",{className:"v-list-base-item",onClick:e.handleClick.bind(void 0,e.id)},i.a.createElement("div",{className:"content"},i.a.createElement("div",{className:"cover"},e.status,i.a.createElement("img",{src:e.img,alt:""})),e.info),e.tab)}},650:function(e,t,a){},661:function(e,t,a){"use strict";a(41);var n=a(13),i=a.n(n),c=a(5),o=a(7),s=a(6),r=a(8),d=a(9),l=a(74),u=a(0),p=a.n(u),m=(a(617),a(3)),h=a(48),f=a(23),v=a(20),y=a(156),g=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(s.a)(this,Object(r.a)(t).call(this,e))).check=function(e){a.setState({payType:e})},a.toBuy=function(){var e=a.props.courseId,t=a.props.data.video_id||a.props.data.id;m.d.get("".concat(API.home,"/sys/createClassOrder/").concat(t)).then(function(t){200===t.data.code?(a.setState({orderId:t.data.data.order_id}),"1"===a.state.payType?a.alipayPay(t.data.data.order_id,e):a.weixinPay(t.data.data.order_id)):i.a.info(t.data.msg,2)})},a.weixinPay=function(e){m.b.isWeixin?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb&oid="+e).toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":m.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(t){0===t.data.errno?window.location.href=t.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1&oid="+e).toLowerCase():i.a.info(t.data.msg,2)})},a.alipayPay=function(e,t){m.d.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(window.location=e.data.data.url,t&&window.localStorage.setItem("payCourse",t)):i.a.info(e.data.msg,2)})},a.isweixinPay=function(){var e=Object(l.a)(Object(l.a)(a)),t=Object(m.c)("code");if(t){if(!Object(m.c)("oid"))return;m.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(m.c)("oid"),"/code/").concat(t)).then(function(t){if(0===t.data.errno){var a=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(t){"get_brand_wcpay_request:ok"==t.err_msg?(i.a.info("\u652f\u4ed8\u6210\u529f",2),e.intervalPayStatus=setInterval(function(){var t=this;m.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(m.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,m.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(m.c)("oid"))).then(function(e){200===Number(e.data.data.errno)?t.setState({status:6,showSingleBox:!0}):201===Number(e.data.data.errno)?t.setState({status:4,showSingleBox:!0}):202===Number(e.data.data.errno)?t.setState({status:3,showSingleBox:!0}):203===Number(e.data.data.errno)?t.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,status:2,showSingleBox:!0}):i.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 i.a.info(t.data.msg,2)})}},a.payCallback=function(){var e=Object(l.a)(Object(l.a)(a));Object(m.c)("oid")&&(e.intervalPayStatus=setInterval(function(){var t=this;m.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(m.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,m.d.get("".concat(API["base-api"],"/class_order_status/").concat(Object(m.c)("oid"))).then(function(e){200===Number(e.data.data.errno)?t.setState({status:6,showSingleBox:!0}):201===Number(e.data.data.errno)?t.setState({status:4,showSingleBox:!0}):202===Number(e.data.data.errno)?t.setState({status:3,showSingleBox:!0}):203===Number(e.data.data.errno)?t.setState({nowPrice:e.data.data.data.now_price,laterPrice:e.data.data.data.three_day_later_price,status:2,showSingleBox:!0}):i.a.info(e.data.data.msg,2)}))})},1e3))},a.toBuyAll=function(){},a.zerobuyReceive=function(){i.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)):i.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):i.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}):i.a.info(e.data.msg,2)})},a.toGroup=function(){a.props.history.push("/togroup?id=".concat(a.state.groupOrderId))},a.colse=function(){a.props.boxHide(!1),a.setState({status:1})},a.state={orderId:"",nowPrice:"",laterPrice:"",hour:"",min:"",sec:"",endTime:"",groupOrderId:"",payType:"0",showSingleBox:!1},a}return Object(d.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){}},{key:"componentWillReceiveProps",value:function(e,t){}},{key:"render",value:function(){var e=this;this.state.showSingleBox;if(this.state.endTime){var t=1e3*this.state.endTime,a=Date.now();setInterval(function(){t-=1e3;var n=Object(y.differenceInSeconds)(new Date(t),a)%60,i=Object(y.differenceInMinutes)(new Date(t),a)%60,c=Object(y.differenceInHours)(new Date(t),a)%24;e.setState({hour:c,min:i,sec:n})},1e3)}return 1===this.props.singleType&&p.a.createElement("div",null,p.a.createElement("div",{className:"popup-box"},p.a.createElement("div",{className:"content singleset-payment"},p.a.createElement("div",{className:"price-box"},p.a.createElement("span",null,"\u5b9e\u4ed8\u6b3e\uff1a"),p.a.createElement("p",null,this.props.data.class_price,"\u5143")),p.a.createElement("div",{className:"course-info"},p.a.createElement("p",{className:"text-overflow-1"},p.a.createElement("span",null,"\u8bfe\u7a0b\uff1a"),this.props.title),p.a.createElement("p",{className:"text-overflow-1"},p.a.createElement("span",null,"\u8bfe\u65f6\uff1a"),this.props.data.name)),p.a.createElement("div",{className:"payment-type"},p.a.createElement("label",null,"\u652f\u4ed8\u65b9\u5f0f\uff1a"),p.a.createElement("p",{onClick:this.check.bind(this,"0")},p.a.createElement("i",{className:"iconfont iconweixinzhifu buy"}),p.a.createElement("span",null,"\u5fae\u4fe1\u652f\u4ed8"),p.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("0"===this.state.payType?"redioed":"")})),!m.b.isWeixin&&p.a.createElement("p",{onClick:this.check.bind(this,"1")},p.a.createElement("i",{className:"iconfont iconalipay"}),p.a.createElement("span",null,"\u652f\u4ed8\u5b9d"),p.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 redio ".concat("1"===this.state.payType?"redioed":"")}))),p.a.createElement("div",{className:"btn btn-18B4ED",onClick:this.toBuy},"\u786e\u8ba4\u8d2d\u4e70")),p.a.createElement("i",{onClick:this.colse,className:"iconfont iconiconfront-2 close"})))}}]),t}(u.Component);t.a=Object(f.d)(Object(v.b)(function(e){return{user:e.user}},null),h.g)(g)},662:function(e,t,a){"use strict";a(41);var n=a(13),i=a.n(n),c=a(5),o=a(7),s=a(6),r=a(8),d=a(9),l=a(0),u=a.n(l),p=(a(617),a(3)),m=a(48),h=a(23),f=a(20),v=a(156),y=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(s.a)(this,Object(r.a)(t).call(this,e))).check=function(e){a.setState({payType:e})},a.toBuy=function(){var e=a.props.data.video_id||a.props.data.id;p.d.get("".concat(API.home,"/sys/createClassOrder/").concat(e)).then(function(e){200===e.data.code?(a.setState({orderId:e.data.data.order_id}),"1"===a.state.payType?a.alipayPay(e.data.data.order_id):a.weixinPay(e.data.data.order_id)):i.a.info(e.data.msg,2)})},a.weixinPay=function(e){p.b.isWeixin?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb&oid="+e).toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":p.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(t){0===t.data.errno?window.location.href=t.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1&oid="+e).toLowerCase():i.a.info(t.data.msg,2)})},a.alipayPay=function(e){var t=Object(p.c)("id");p.d.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(window.location=e.data.data.url,t&&window.localStorage.setItem("payCourse",t)):i.a.info(e.data.msg,2)})},a.toBuyAll=function(e){if(1===Number(a.props.isPdd))a.props.history.push("/order?id=".concat(a.props.courseId),{group:1});else{var t=JSON.stringify([Number(e)]);p.d.get("".concat(API["base-api"],"/m/cart/addtopreorder/").concat(t)).then(function(e){0===e.data.errno?a.props.history.push("/order?id="+e.data.data[0],{simple:1}):i.a.info(e.data.msg,2)})}},a.zerobuyReceive=function(){i.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)):i.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):i.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}):i.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,i=Object(v.differenceInMinutes)(new Date(t),a)%60,c=Object(v.differenceInHours)(new Date(t),a)%24;e.setState({hour:c,min:i,sec:n})},1e3)}var n=this.props.singleType,i=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,i)},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,i)},className:"btn btn-18B4ED"},"\u53bb\u5b66\u4e60")),7===n&&u.a.createElement("div",{className:"content group"},u.a.createElement("div",{className:"header"},u.a.createElement("i",{className:"iconfont icondanseshixintubiao-5"}),u.a.createElement("span",null,"\u53c2\u56e2\u6210\u529f")),u.a.createElement("div",{className:"group-img"},u.a.createElement("img",{src:this.props.user.data.avatar,alt:""}),u.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/images/weekend/train7/ellipsis.png",alt:""}),u.a.createElement("img",{src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/images/weekend/train7/ellipsis.png",alt:""})),u.a.createElement("div",{className:"btn-l btn-FF4000",onClick:this.toGroup},"\u5269\u4f59",String(this.state.hour).padStart(2,0),"\uff1a",String(this.state.min).padStart(2,0),"\uff1a",String(this.state.sec).padStart(2,0),"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2")),u.a.createElement("i",{onClick:this.colse,className:"iconfont iconiconfront-2 close"}))}}]),t}(l.Component);t.a=Object(h.d)(Object(f.b)(function(e){return{user:e.user}},null),m.g)(y)},795:function(e,t,a){},796:function(e,t,a){},797:function(e,t,a){},801:function(e,t,a){},803:function(e,t){},871:function(e,t){}}]);
//# sourceMappingURL=video.71e4de46.chunk.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
self.__precacheManifest = [
{
"revision": "69a292f24cf01684f3e8",
"url": "/mrstatic/js/myorders.21588e23.chunk.js"
},
{
"revision": "a1e160f9da0cec735c1e",
"url": "/mrstatic/js/0.cc475f61.chunk.js"
},
{
"revision": "8edaf2ff2566ed17e2dd22cf4f8ad7ae",
"url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png"
},
{
"revision": "d460474a908cc2d67c63",
"url": "/mrstatic/js/BargainMiddlePage.47d6d11b.chunk.js"
},
{
"revision": "c79abf5cb7ae8a82009cf68fe44d1078",
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
},
{
"revision": "9a482b6a6a2851eb9d56",
"url": "/mrstatic/js/Classify.f4b0e95e.chunk.js"
},
{
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "a641ac9b606f7ab060ee",
"url": "/mrstatic/js/Country.2f1e3ba6.chunk.js"
},
{
"revision": "79139f6aad350256e151f9f73c226348",
"url": "/mrstatic/media/hb_bj.79139f6a.png"
},
{
"revision": "46bf4ead85006bfed40b",
"url": "/mrstatic/js/CourseList.ad80ef1f.chunk.js"
},
{
"revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/mrstatic/media/progress-share-bg.80011994.png"
},
{
"revision": "70559589cce9ba888f82",
"url": "/mrstatic/js/DrawDocument.b607db8f.chunk.js"
},
{
"revision": "81a489ac63f2f2df5ab412e0782bd54c",
"url": "/mrstatic/media/kanjia_cg_icon.81a489ac.png"
},
{
"revision": "bbb71af74995c3434dea",
"url": "/mrstatic/js/Examination.97026877.chunk.js"
},
{
"revision": "c680c98e22470e94be27",
"url": "/mrstatic/js/MyEdit.d9cf1de7.chunk.js"
},
{
"revision": "b9b072e1116fd1830cc8f425dc163a6b",
"url": "/mrstatic/media/iconfont.b9b072e1.svg"
},
{
"revision": "21549f965423895702ec",
"url": "/mrstatic/js/Order.1956906f.chunk.js"
},
{
"revision": "6c6651eb532e371714f8",
"url": "/mrstatic/js/Orderinfo.c5a68e88.chunk.js"
},
{
"revision": "258b4b114d3d9be3018cd113b2470a13",
"url": "/mrstatic/media/iconfont.258b4b11.ttf"
},
{
"revision": "6a0af3b93231533c7920",
"url": "/mrstatic/js/PayOrder.8534c9f2.chunk.js"
},
{
"revision": "7aa984cefad739ea18edb76c541aa1fd",
"url": "/mrstatic/media/iconfont.7aa984ce.eot"
},
{
"revision": "aef4b392bfb4e88325ec",
"url": "/mrstatic/js/Preferential.b9de8327.chunk.js"
},
{
"revision": "e0655d4da66dce391e6b5227b400e037",
"url": "/mrstatic/media/iconfont.e0655d4d.woff"
},
{
"revision": "d02f233f05f59d368a78",
"url": "/mrstatic/js/SearchResult.82c4db68.chunk.js"
},
{
"revision": "e1a2c9227576c0d61412",
"url": "/mrstatic/js/33.900c665c.chunk.js"
},
{
"revision": "d73cc80d15d96316f4de",
"url": "/mrstatic/js/ShareCourse.543c57d3.chunk.js"
},
{
"revision": "257831b315aec41d7e39",
"url": "/mrstatic/js/32.63ff864e.chunk.js"
},
{
"revision": "adf6dcb74f05609deb43",
"url": "/mrstatic/js/ShopCart.d6804bde.chunk.js"
},
{
"revision": "8308ba11690a91b877f6",
"url": "/mrstatic/js/31.00acec59.chunk.js"
},
{
"revision": "f0d549af21b17a886eb9",
"url": "/mrstatic/js/aist-share.cde60f9d.chunk.js"
},
{
"revision": "91440335000b6c3bf36b",
"url": "/mrstatic/js/30.5be43a00.chunk.js"
},
{
"revision": "b573f065cd1731c98546",
"url": "/mrstatic/js/coupons.1ee98542.chunk.js"
},
{
"revision": "ac15be779087898ae74b",
"url": "/mrstatic/js/29.55833d30.chunk.js"
},
{
"revision": "753ad7d2c623726d2159",
"url": "/mrstatic/js/detail.ea824723.chunk.js"
},
{
"revision": "7b1d7e35cb93582e1c95",
"url": "/mrstatic/js/28.421bdc56.chunk.js"
},
{
"revision": "37468f1d23ce99ce61c7",
"url": "/mrstatic/js/main.62a77b84.chunk.js"
},
{
"revision": "a158381e0ddcb1d3db70",
"url": "/mrstatic/js/video.71e4de46.chunk.js"
},
{
"revision": "34bd0c306743ff791d16",
"url": "/mrstatic/js/1.5926cefc.chunk.js"
},
{
"revision": "d5b97c707c04d13c5561",
"url": "/mrstatic/js/togroup.34d5a4fa.chunk.js"
},
{
"revision": "befc46c3bd02a63dacc2",
"url": "/mrstatic/js/purchased.1623b0b5.chunk.js"
},
{
"revision": "2ba1b051cd710549cef2",
"url": "/mrstatic/js/runtime~main.62f2beae.js"
},
{
"revision": "2dc90f0f37dfa04c6dc9",
"url": "/mrstatic/js/study.0512da7d.chunk.js"
},
{
"revision": "aa35286c69f052ea69ea",
"url": "/mrstatic/js/search.f7766add.chunk.js"
},
{
"revision": "ac3aed7a62101fb42282",
"url": "/mrstatic/js/shareposter.456c17f8.chunk.js"
},
{
"revision": "257831b315aec41d7e39",
"url": "/mrstatic/css/32.5ed15c7e.chunk.css"
},
{
"revision": "ac3aed7a62101fb42282",
"url": "/mrstatic/css/shareposter.f09a5959.chunk.css"
},
{
"revision": "2dc90f0f37dfa04c6dc9",
"url": "/mrstatic/css/study.b002c899.chunk.css"
},
{
"revision": "d5b97c707c04d13c5561",
"url": "/mrstatic/css/togroup.49988cae.chunk.css"
},
{
"revision": "a158381e0ddcb1d3db70",
"url": "/mrstatic/css/video.b57a1aec.chunk.css"
},
{
"revision": "e1a2c9227576c0d61412",
"url": "/mrstatic/css/33.ecbb6f9a.chunk.css"
},
{
"revision": "befc46c3bd02a63dacc2",
"url": "/mrstatic/css/purchased.dd7556e0.chunk.css"
},
{
"revision": "aa35286c69f052ea69ea",
"url": "/mrstatic/css/search.fab97849.chunk.css"
},
{
"revision": "d02f233f05f59d368a78",
"url": "/mrstatic/css/SearchResult.bb7c3056.chunk.css"
},
{
"revision": "37468f1d23ce99ce61c7",
"url": "/mrstatic/css/main.9977dcb1.chunk.css"
},
{
"revision": "69a292f24cf01684f3e8",
"url": "/mrstatic/css/myorders.3ae12dec.chunk.css"
},
{
"revision": "aef4b392bfb4e88325ec",
"url": "/mrstatic/css/Preferential.cda7a495.chunk.css"
},
{
"revision": "91440335000b6c3bf36b",
"url": "/mrstatic/css/30.2471f477.chunk.css"
},
{
"revision": "8308ba11690a91b877f6",
"url": "/mrstatic/css/31.0bb224f2.chunk.css"
},
{
"revision": "f0d549af21b17a886eb9",
"url": "/mrstatic/css/aist-share.bef8c404.chunk.css"
},
{
"revision": "d460474a908cc2d67c63",
"url": "/mrstatic/css/BargainMiddlePage.fc53c3d0.chunk.css"
},
{
"revision": "adf6dcb74f05609deb43",
"url": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css"
},
{
"revision": "753ad7d2c623726d2159",
"url": "/mrstatic/css/detail.8d310f0f.chunk.css"
},
{
"revision": "d73cc80d15d96316f4de",
"url": "/mrstatic/css/ShareCourse.278ad3b1.chunk.css"
},
{
"revision": "9a482b6a6a2851eb9d56",
"url": "/mrstatic/css/Classify.f2f19957.chunk.css"
},
{
"revision": "b573f065cd1731c98546",
"url": "/mrstatic/css/coupons.2fcc3e06.chunk.css"
},
{
"revision": "6a0af3b93231533c7920",
"url": "/mrstatic/css/PayOrder.e5315535.chunk.css"
},
{
"revision": "21549f965423895702ec",
"url": "/mrstatic/css/Order.8bb031ea.chunk.css"
},
{
"revision": "bbb71af74995c3434dea",
"url": "/mrstatic/css/Examination.f2cc3163.chunk.css"
},
{
"revision": "70559589cce9ba888f82",
"url": "/mrstatic/css/DrawDocument.2e7d81ca.chunk.css"
},
{
"revision": "46bf4ead85006bfed40b",
"url": "/mrstatic/css/CourseList.85889ffd.chunk.css"
},
{
"revision": "a641ac9b606f7ab060ee",
"url": "/mrstatic/css/Country.16a64650.chunk.css"
},
{
"revision": "ac15be779087898ae74b",
"url": "/mrstatic/css/29.4c706a4e.chunk.css"
},
{
"revision": "7b1d7e35cb93582e1c95",
"url": "/mrstatic/css/28.aebbab68.chunk.css"
},
{
"revision": "0aea54fb490e6fa3dcdbfa5436e01d21",
"url": "/index.html"
}
];
\ No newline at end of file
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts(
"/precache-manifest.543dcc7fca119c88406da24906433f0d.js"
);
workbox.clientsClaim();
/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.suppressWarnings();
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.routing.registerNavigationRoute("/index.html", {
blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/],
});
import React from 'react'
import { Modal } from 'antd-mobile'
import './index.scss'
export default function ({
amount,
limit_amount,
onCancel = () => {
},
onConfirm
}) {
const content = (
<>
<div className="end-expansion-alert-ques">
{`你的${amount}元优惠券正在膨胀中,
确定要结束膨胀吗?`}
</div>
<div className="end-expansion-alert-hint">
{`离${limit_amount}元只差一点点了!继续膨胀,优惠更多哦`}
</div>
</>
)
Modal.alert('温馨提示', content, [
{text: '再考虑下', onPress: onCancel, style: {color: '#333'}},
{text: '确定结束膨胀', onPress: onConfirm}
])
}
.am-modal {
width: 300px;
&-title {
font-size: 15px;
}
}
.end-expansion-alert {
&-ques {
width: 200px;
margin: 0 auto 20px;
text-align: center;
color: #666;
font-size: 15px;
}
&-hint {
color: #999;
font-size: 12px;
}
}
import React, {Component} from 'react'
import './index.scss'
import {http} from '@/utils'
import { Link } from "react-router-dom"
import {Toast} from "antd-mobile";
class ExpandActiveToast extends Component {
constructor(props) {
super(props);
this.state = {
expandLength: 0,
isShowExpand:true
}
}
componentDidMount() {
http.get(`${API['base-api']}/sys/deposit/notice`).then((res) => {
if (res.data.errno == 200) {
const {data} = res.data
this.setState({
expandLength: data.num
})
} else {
Toast.info(res.data.msg, 2)
}
})
}
cleseExpand = () => {
this.setState({isShowExpand: false})
}
render() {
return (
<div>
{
this.state.expandLength > 0 && this.state.isShowExpand &&
<div className="expand-active-toast">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/guanggao.png" alt=''/>
<div className="expand-toast-swiper">
<p>您有<span className="red">{this.state.expandLength}</span>待支付尾款的课程 再不支付就要过期了!</p>
</div>
<Link to='/final-deposit-order?source=1'>查看</Link>
<img
onClick={e => this.cleseExpand()}
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/guanbi.png"
alt=''
/>
</div>
}
</div>
);
}
}
export default ExpandActiveToast
.expand-active-toast {
font-size: 14px;
background-color: #e8f6ff;
display: flex;
justify-content: space-between;
padding: 0 15px;
height: 33px;
line-height: 33px;
margin-bottom: 10px;
.expand-toast-swiper {
width: 240px;
overflow: hidden;
position: relative;
p {
width: 375px;
position: absolute;
-webkit-animation: scollLeft 10s linear 0s infinite;
}
}
.red {
color: #ff3131;
}
img {
width: 15px;
height: 15px;
margin-top: 9px;
}
a {
display: inline-block;
width: 44px;
height: 22px;
background: linear-gradient(90deg, #0099ff 0%, #0080ff 100%);
border-radius: 11px;
color: #fff;
font-size: 12px;
line-height: 22px;
margin-top: 5px;
text-align: center;
}
@-webkit-keyframes scollLeft {
from {
right: -100%;
}
to {
right: 100%;
}
}
@keyframes scollLeft {
from {
right: -100%;
}
to {
right: 100%;
}
}
@-moz-keyframes scollLeft {
from {
right: -100%;
}
to {
right: 100%;
}
}
@-o-keyframes scollLeft {
from {
right: -100%;
}
to {
right: 100%;
}
}
}
......@@ -11,6 +11,7 @@ import { Link } from "react-router-dom"
import { Toast } from 'antd-mobile'
import { connect } from "react-redux";
import TopSwiper from './TopSwiper'
import ExpandActiveToast from './expandActiveToast'
// const animateTypes = Swiper.animateTypes
......@@ -135,6 +136,10 @@ class Index extends Component {
/>
</div>
<div className='zw_height'></div>
<ExpandActiveToast/>
<div className='index-swiper'>
{
this.state.banner && this.state.banner.length > 0 &&
......
......@@ -38,8 +38,11 @@
}
}
.zw_height {
height: 44px;
}
.index-swiper {
margin-top: 44px;
height: 168px;
.swiper-container {
......
import React, {Component} from 'react';
import {http} from '@/utils';
import listFrame from './../listFrame/index';
import './index.scss';
import {Toast} from "antd-mobile"
import {connect} from "react-redux";
import {Link, withRouter} from "react-router-dom"
class ReserveCourse extends Component {
constructor(props) {
super(props);
this.state = {
courseData: [],
isShowMore: false
};
}
componentDidMount() {
this.fetchAICourse();
}
fetchAICourse = () => {
http.get(`${API.home}/sys/pre_coursee`).then(res => {
const {code, data, msg} = res.data;
if (code === 200) {
this.setState({
courseData: data.filter((item, index) => index < 4),
courseDataAll: data
})
} else {
Toast.info(msg, 2);
}
});
}
// 立即付定金
expandPaydj = (courseId) => {
const {user, history} = this.props;
const uid = user && user.data && user.data.uid;
if (!uid) {
this.props.history.push('/passport/login')
} else {
this.props.history.push(
`/deposit-order?oid=${courseId}&source=${2}`,
{
id: courseId,
isexpand: 1,
sourcenum: 2
}
)
}
}
// 立即付尾款
expandPaywk = (courseId, day) => {
const {user, history} = this.props;
const uid = user && user.data && user.data.uid;
if (!uid) {
this.props.history.push('/passport/login')
} else {
Toast.info("付尾款时间将在" + day + "开启", 2);
}
}
// 去学习
tostudy = (courseId) => {
this.props.history.push(`/getDetail?id=${courseId}`)
}
// 查看更多
showMoreData = () => {
this.setState({
isShowMore:!this.state.isShowMore,
courseData: this.state.isShowMore ? this.state.courseDataAll.filter((item, index) => index < 4) : this.state.courseDataAll,
})
}
render() {
const {courseData, isShowMore} = this.state;
return (
<div className='reserve-course-module'>
<CourseList courseData={courseData}
expandPaydj={this.expandPaydj}
expandPaywk={this.expandPaywk}
tostudy={this.tostudy}/>
<button className="more-button" onClick={this.showMoreData}>
{isShowMore ? '收起' : '展开更多'}
</button>
</div>
)
}
}
function CourseList(props) {
const {courseData, expandPaydj, expandPaywk, tostudy} = props
return (
<div className="course-list">
<ul>
{
courseData.map((item, index) => {
return (
<li className="course-item-box" key={index}>
<Link to={`/getDetail?id=${item.course_id}`}>
<div className="top">
<div className="square">
<p className="circular">
到手最低¥<span>{Number(item.price) - Number(item.deduction_amount) - Number(item.limit_amount)}</span>
</p>
</div>
<img className="course-img" src={item.image_name} alt=""/>
</div>
</Link>
<p className="count-price">
=原价¥{item.price}
<span>-抵扣¥<i>{item.deduction_amount}</i></span>
<span>-膨胀券¥<i>{item.limit_amount}</i></span>
</p>
<div className="btn">
{
item.is_buy === 0 &&
<button className="to-expand-buy1"
onClick={() => expandPaydj(item.course_id)}>立即付定金</button>
}
{
item.is_buy === 1 &&
<button className="to-expand-buy2"
onClick={() => expandPaywk(item.course_id, item.final_start_time)}>立即付尾款</button>
}
{
item.is_buy === 2 &&
<button className="to-study"
onClick={() => tostudy(item.course_id)}>开始学习</button>
}
</div>
</li>
)
})
}
</ul>
</div>
)
}
export default listFrame(connect(
state => ({
user: state.user
}),
)(withRouter(ReserveCourse)))
.reserve-course-module {
margin: 20px 15px 5px 20px;
.course-list {
ul {
display: flex;
justify-content: space-between;
flex-direction: row;
flex-wrap: wrap;
.course-item-box {
width: 48%;
padding: 4px;
background-color: #fff;
border-radius: 2px;
margin-bottom: 15px;
text-align: left;
.top {
width: 100%;
height: 108px;
position: relative;
.course-img {
width: 100%;
height: 108px;
}
.square {
background-image: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/course-label-bg.png");
background-repeat: no-repeat;
background-size: cover;
width: 60px;
height: 60px;
position: absolute;
left: 0;
bottom: 0;
.circular {
height: 100%;
width: 100%;
color: #fff;
padding-top: 15px;
text-align: left;
padding-left: 5px;
span {
font-size: 16px;
margin-left: 3px;
}
}
}
}
.count-price {
text-align: left;
color: #555;
margin-top: 8px;
line-height: 15px;
span {
color: #FF4000;
i {
font-size: 16px;
font-style: normal;
margin-left: 3px;
}
}
}
.btn {
width: 100%;
padding: 0 5px;
margin-top: 8px;
margin-bottom: 5px;
button {
width: 100%;
height: 24px;
border-radius: 2px;
font-size: 12px;
color: #fff;
border: none;
}
.to-expand-buy1 {
background: linear-gradient(-90deg, #7800FF 0%, #FF4BF0 100%);
}
.to-expand-buy2 {
background: linear-gradient(-90deg, #FF8C1B 0%, #FF3B05 100%);
}
.to-study {
background: linear-gradient(-90deg, #2ECEF0 0%, #2D56F0 100%);
}
}
}
}
}
.more-button {
display: block;
width: 100px;
height: 27px;
margin: 5px auto 15px;
border: 1px solid #fff;
border-radius: 14px;
font-size: 13px;
font-weight: 300;
color: #fff;
background-color: transparent;
cursor: pointer;
outline: none;
}
}
......@@ -2,6 +2,7 @@ import React, { Component } from 'react'
import RulePopup from './rulePopup/index'
import CoursePopup from './coursePopup/index'
import CourseList from './courseList/index';
import ReserveCourse from './ReserveCourse/index';
import ListHeader from './listHeader/index';
import './index.scss'
import { Popup } from '@/common'
......@@ -38,7 +39,11 @@ class BlessingPreheat extends Component {
return (
<div id={'blessing-preheat'}>
{/*定金--只在预热期间显示*/}
<ListHeader text="预付1元定金,最高可省100元" styles={{margin: '0 0 15px'}} />
<ReserveCourse/>
{/* 精品课程特惠专区 */}
<ListHeader text="精品课程特惠专区" styles={{margin: '0 0 15px'}} />
<CourseList></CourseList>
......
$bg_type1: #FE6161;
$bg_type2: #E0B97B;
$bg_voucher: #FE6161;
$bg_free: #E0B97B;
$bg_expand: #8361FE;
.coupon {
position: relative;
margin-bottom: 15px;
......@@ -27,13 +28,14 @@ $bg_type2: #E0B97B;
}
}
.course-title{
.course-title {
width: 68.37%;
margin: 0 auto 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: $font_16;
text-align: center;
}
.expire {
......@@ -43,14 +45,18 @@ $bg_type2: #E0B97B;
}
&.coupon-type1 {
background: $bg_type1;
background: $bg_voucher;
}
&.coupon-type2 {
background: $E0B97B;
}
&.invalid{
&.coupon-type4 {
background: $bg_expand;
}
&.invalid {
background: $color_999;
}
......@@ -87,6 +93,44 @@ $bg_type2: #E0B97B;
transform: translateY(50%);
}
}
.progress-container {
width: 299px;
margin: 0 auto;
.denomination {
font-size: 15px;
line-height: 1.3em;
color: #F8E71C;
span{
transform: scale(0.9);
}
}
.progress-bar-container {
position: relative;
height: 7px;
background: #5C2FFF;
border-radius: 4px;
overflow: hidden;
margin-bottom: 6px;
.progress-bar {
position: absolute;
left: 0;
top: 0;
height: 100%;
background: #F8E71C;
border-radius: 4px;
}
}
.money {
display: flex;
justify-content: space-between;
}
}
}
.coupon-des {
......@@ -117,5 +161,15 @@ $bg_type2: #E0B97B;
background: transparent;
-webkit-appearance: none;
}
.stop-expanding {
padding: 3px 8px;
border: 1px solid #FF3131;
border-radius: 10px;
-webkit-appearance: none;
background: transparent;
color: #FF3131;
font-size: 10px;
}
}
}
\ No newline at end of file
}
import React, { PureComponent } from 'react'
import './coupon.scss'
import classnames from 'classnames'
import { http } from "@/utils"
import showAlert from '@common/deposit/end-expansion-alert'
import {Toast} from 'antd-mobile'
class Coupon extends PureComponent {
VOUCHER = 1 //代金券
FREE = 2 //免单券
EXPAND = 4 //膨胀全
pick = () => {
let {useCoupon, invalid} = this.props
!invalid && useCoupon && useCoupon(this.props.id)
......@@ -14,73 +22,191 @@ class Coupon extends PureComponent {
this.props.useCoupon(this.props.id)
}
ExchangeCourse = (e) => {
this.props.toExchangeCourse(e,this.props.code)
this.props.toExchangeCourse(e, this.props.code)
}
stopExpanding = (id, e) => {
const {amount, limit_amount} = this.props
e.stopPropagation()
showAlert({
amount,
limit_amount,
onConfirm: () => {
http.post(`${API.home}/m/end_expansion`, {
id
})
.then(res => {
const {data} = res
if (data.code == 200) {
this.props.endExpansion(id)
}else {
Toast.info(data.msg)
}
})
}
})
}
render() {
let {
ctype,
amount,
format_expire_time,
limit_course,
invalid,
course_title,
showUseButton,
id,
code,
selectedCouponId,
showUseButton
format_expire_time,
start_amount,
limit_amount
} = this.props
return (
<li className='coupon' onClick={this.pick}>
<div className={classnames('coupon-info', invalid ? 'invalid' : `coupon-type${ctype}`)}>
<p className='type'>{ctype === 1 ? '代金券' : '课程券'}</p>
{
ctype === 1 ? <p className='denomination'>{amount} <span></span></p>
: <p className='course-title'>{course_title}</p>
let top, bottom
}
<p className='expire'>有效期至:{format_expire_time}</p>
{
selectedCouponId === id &&
<i className={classnames('iconfont icondanseshixintubiao-5', {
check: !invalid
})}
/>
}
<ul>
switch (ctype) {
case this.VOUCHER:
top = (
<>
<p className='denomination'>{amount} <span></span></p>
<p className='expire'>有效期至:{format_expire_time}</p>
</>
)
bottom = (
<>
<span className={'limit'}>可用于大于代金券金额的课程</span>
{
new Array(19).fill('a').map((item, index) => {
return <li key={index}/>
})
showUseButton && ctype == this.VOUCHER &&
<button
className='use'
onClick={this.GoToUse}
>立即使用
</button>
}
</ul>
</div>
<div className="coupon-des">
<span className='limit'>{
limit_course === 0 ? '可用于大于代金券金额的课程' : `仅适用于《${course_title}》`
}</span>
{
showUseButton && ctype == 1 &&
<button
className='use'
onClick={this.GoToUse}
>立即使用
</button>
}
{
showUseButton && ctype == 2 &&
<button
className='use'
onClick={(e)=>this.ExchangeCourse(e)}
>立即兑换
</button>
}
</>
)
break
case this.FREE:
top = (
<>
<p className='course-title'>{course_title}</p>
<p className='expire'>有效期至:{format_expire_time}</p>
</div>
</li>
);
</>
)
bottom = (
<>
<span className={'limit'}>{`仅适用于《${course_title}》`}</span>
{
showUseButton && ctype == this.FREE &&
<button
className='use'
onClick={(e) => this.ExchangeCourse(e)}
>立即兑换
</button>
}
</>
)
break
case this.EXPAND:
if (!start_amount) {
top = (
<>
<p className='denomination'>{amount} <span></span></p>
<p className='expire'>有效期至:{format_expire_time}</p>
</>
)
} else {
top = (
<>
<div className="progress-container">
<p className='denomination'>{amount} <span></span></p>
<div className={'progress-bar-container'}>
<span className={'progress-bar'}
style={{width: `${Math.round((amount - start_amount) / limit_amount * 100)}%`}}
></span>
</div>
<div className={'money'}>
<span>{start_amount}</span>
<span>{limit_amount}</span>
</div>
</div>
</>
)
}
bottom = (
<>
<span className={'limit'}>全场通用</span>
{
start_amount
&& <button className='stop-expanding'
onClick={this.stopExpanding.bind(this, id)}>立即结束膨胀</button>
}
</>
)
break
}
return (
<BaseCoupon
{...this.props}
top={top}
VOUCHER={this.VOUCHER}
FREE={this.FREE}
EXPAND={this.EXPAND}
pick={this.pick}
bottom={bottom}
/>
)
}
}
function BaseCoupon(
{
pick,
ctype,
invalid,
top,
VOUCHER,
FREE,
EXPAND,
selectedCouponId,
id,
bottom
}) {
let couponTypes = {
[VOUCHER]: '代金券',
[FREE]: '课程券',
[EXPAND]: '膨胀券'
}
return (
<li className='coupon' onClick={pick}>
<div className={classnames('coupon-info', invalid ? 'invalid' : `coupon-type${ctype}`)}>
<p className='type'>{couponTypes[ctype]}</p>
{top}
{
selectedCouponId === id &&
<i className={classnames('iconfont icondanseshixintubiao-5', {
check: !invalid
})}
/>
}
<ul>
{
new Array(19).fill('a').map((item, index) => {
return <li key={index}/>
})
}
</ul>
</div>
<div className="coupon-des">
{bottom}
</div>
</li>
)
}
export default Coupon
\ No newline at end of file
export default Coupon
import React, { PureComponent } from 'react'
import './coupon.scss'
import classnames from 'classnames'
class Coupon extends PureComponent {
VOUCHER = 1 //代金券
FREE = 2 //免单券
EXPAND = 4 //膨胀全
pick = () => {
let {useCoupon, invalid} = this.props
!invalid && useCoupon && useCoupon(this.props.id)
}
GoToUse = () => {
this.props.useCoupon(this.props.id)
}
ExchangeCourse = (e) => {
this.props.toExchangeCourse(e, this.props.code)
}
render() {
let {
ctype,
amount,
format_expire_time,
limit_course,
invalid,
course_title,
id,
code,
selectedCouponId,
showUseButton
} = this.props
return (
<li className='coupon' onClick={this.pick}>
<div className={classnames('coupon-info', invalid ? 'invalid' : `coupon-type${ctype}`)}>
<p className='type'>{ctype === this.VOUCHER ? '代金券' : '课程券'}</p>
{
ctype === this.VOUCHER ? <p className='denomination'>{amount} <span>元</span></p>
: <p className='course-title'>{course_title}</p>
}
<p className='expire'>有效期至:{format_expire_time}</p>
{
selectedCouponId === id &&
<i className={classnames('iconfont icondanseshixintubiao-5', {
check: !invalid
})}
/>
}
<ul>
{
new Array(19).fill('a').map((item, index) => {
return <li key={index}/>
})
}
</ul>
</div>
<div className="coupon-des">
<span className='limit'>{
limit_course === 0 ? '可用于大于代金券金额的课程' : `仅适用于《${course_title}》`
}</span>
{
showUseButton && ctype == this.VOUCHER &&
<button
className='use'
onClick={this.GoToUse}
>立即使用
</button>
}
{
showUseButton && ctype == this.FREE &&
<button
className='use'
onClick={(e) => this.ExchangeCourse(e)}
>立即兑换
</button>
}
</div>
</li>
)
}
}
function BaseCoupon(
{
pick,
ctype,
invalid,
top,
VOUCHER,
FREE,
EXPAND,
limitMessage,
bottomButton
}) {
let couponTypes = {
[VOUCHER]: '代金券',
[FREE]: '课程券',
[EXPAND]: '膨胀券'
}
return (
<li className='coupon' onClick={pick}>
<div className={classnames('coupon-info', invalid ? 'invalid' : `coupon-type${ctype}`)}>
<p className='type'>{couponTypes[ctype]}</p>
{top}
<ul>
{
new Array(19).fill('a').map((item, index) => {
return <li key={index}/>
})
}
</ul>
</div>
<div className="coupon-des">
<span className='limit'>
{limitMessage}
</span>
{bottomButton}
</div>
</li>
)
}
export default Coupon
import React, {PureComponent} from 'react';
import React, { PureComponent } from 'react'
import './index.scss'
import RedeemBar from "../RedeemBar";
import RedeemBar from "../RedeemBar"
import Coupon from '../Coupon'
import {http, getParam} from '@/utils'
import {WithFullSize} from '@/HOCs'
import {Toast} from 'antd-mobile'
import {isEmpty} from 'lodash'
import {connect} from 'react-redux';
import { http, getParam } from '@/utils'
import { WithFullSize } from '@/HOCs'
import { Toast } from 'antd-mobile'
import { isEmpty } from 'lodash'
import { connect } from 'react-redux'
@connect()
class UseCoupon extends PureComponent {
......@@ -30,7 +30,7 @@ class UseCoupon extends PureComponent {
const {state} = this.props.location
if (state && state.from) {
if (state.from === '/my') {
this.getMyCoupons();
this.getMyCoupons()
this.setState({
showUseButton: true
})
......@@ -38,7 +38,7 @@ class UseCoupon extends PureComponent {
if (!this.state.courseId) {
location.state && location.state.from ? history.replace(location.state.from) : history.goBack()
}
this.getAllCoupons();
this.getAllCoupons()
}
}
}
......@@ -50,7 +50,7 @@ class UseCoupon extends PureComponent {
// 兑换
exchange = () => {
const {location: {state = {}}} = this.props;
const {location: {state = {}}} = this.props
if (this.state.redeemCode !== '') {
http.post(`${API.home}/m/coupon/exchange`, {
code: this.state.redeemCode,
......@@ -88,7 +88,7 @@ class UseCoupon extends PureComponent {
invalid_coupons: [...this.state.invalid_coupons, coupon],
showUseButton: null,
redeemCode: ''
});
})
} else {
this.setState({
valid_coupons: [...this.state.valid_coupons, coupon],
......@@ -109,45 +109,72 @@ class UseCoupon extends PureComponent {
}
getMyCoupons = () => {
http.get(`${API.home}/m/coupon/all`)
.then(res => {
const data = res.data
if (data.code === 200) {
this.setState({
couponList: isEmpty(data.data) ? [] : data.data
})
} else {
Toast.info(data.msg)
}
Promise.all([
http.get(`${API.home}/m/coupon/all`),
http.get(`${API.home}/m/coupon/expansion`)
]).then((coupons) => {
let myCoupons = []
const [allCoupons, expansionCoupons] = coupons
const {data: all} = allCoupons
const {data: expansion} = expansionCoupons
if (all.code == 200) {
Array.isArray(all.data) && (myCoupons = myCoupons.concat(all.data))
} else {
Toast.info(all.msg)
}
if (expansion.code == 200) {
Array.isArray(expansion.data)
&& (expansion.data = expansion.data.map(item => (item.ctype = 4, item)))
&& (myCoupons = myCoupons.concat(expansion.data))
} else {
Toast.info(expansion.msg)
}
this.setState({
couponList: myCoupons
})
})
}
getAllCoupons = () => {
http.post(`${API.home}/m/coupon/select`, {course_id: this.state.courseId})
.then(res => {
const data = res.data
if (data.code === 200) {
const inuse_coupon = data.data['inuse_coupon'];
Promise.all([
http.post(`${API.home}/m/coupon/select`, {course_id: this.state.courseId}),
http.get(`${API.home}/m/coupon/expansion`)
]).then((coupons) => {
const [selectCoupons, expansionCoupons] = coupons
const {data: select} = selectCoupons
const {data: expansion} = expansionCoupons
if (select.code === 200) {
const inuse_coupon = select.data['inuse_coupon']
this.setState({
valid_coupons: inuse_coupon
? [...inuse_coupon, ...select.data.valid_coupons]
: select.data.valid_coupons,
invalid_coupons: select.data.invalid_coupons,
selectedCouponId: inuse_coupon.length ? inuse_coupon[0].id : 0
})
} else {
Toast.info(data.msg)
}
if (expansion.code == 200) {
Array.isArray(expansion.data)
&& (expansion.data = expansion.data.map(item => (item.ctype = 4, item)))
&& (this.setState({
valid_coupons: this.state.valid_coupons.concat(expansion.data)
}))
} else {
Toast.info(expansion.msg)
}
this.setState({
valid_coupons: inuse_coupon
? [...inuse_coupon, ...data.data.valid_coupons]
: data.data.valid_coupons,
invalid_coupons: data.data.invalid_coupons,
selectedCouponId: inuse_coupon.length ? inuse_coupon[0].id : 0
})
} else {
Toast.info(data.msg)
}
})
})
}
// 立即兑换课程
toExchangeCourse = (e, code) => {
e.stopPropagation();
e.stopPropagation()
http.post(`${API['base-api']}/pay/miandan/${code}`, {}).then(res => {
const data = res.data
if (data.errno === 200) {
......@@ -163,7 +190,7 @@ class UseCoupon extends PureComponent {
}
useCoupon = val => {
const {history, dispatch} = this.props
const {history} = this.props
const coupon = this.state.couponList.find(item => item.id === val)
if (val) {
......@@ -172,8 +199,8 @@ class UseCoupon extends PureComponent {
if (coupon['limit_course'] === 0) {
history.push(`/classify`)
} else {
history.push(`/detail?id=${coupon['limit_course']}`);
return false;
history.push(`/detail?id=${coupon['limit_course']}`)
return false
}
} else {
......@@ -233,7 +260,7 @@ class UseCoupon extends PureComponent {
// 开始学习
toStudy = (vCourseId, isHaveVideo) => {
const {history} = this.props;
const {history} = this.props
if (isHaveVideo == 0) {
Toast.info('尚未开课,开课后立即上传课程~', 2)
} else {
......@@ -251,6 +278,18 @@ class UseCoupon extends PureComponent {
})
}
endExpansion = id => {
this.setState({
couponList: this.state.couponList.map(item => {
if (item.id === id) {
delete item.start_amount
}
return item
})
})
}
render() {
const {state} = this.props.location
const {showUseButton, selectedCouponId} = this.state
......@@ -273,6 +312,7 @@ class UseCoupon extends PureComponent {
select={this.select}
useCoupon={this.useCoupon}
toExchangeCourse={this.toExchangeCourse}
endExpansion={this.endExpansion}
/>
{
this.state.invalid_coupons.length > 0 &&
......@@ -296,7 +336,7 @@ class UseCoupon extends PureComponent {
courseCouponData={this.state.courseCouponData}/>
}
</div>
);
)
}
}
......@@ -351,4 +391,4 @@ function FreeCouponCourse(props) {
)
}
export default WithFullSize(UseCoupon);
\ No newline at end of file
export default WithFullSize(UseCoupon)
......@@ -243,6 +243,41 @@ class BtnStatus extends Component {
})
}
// 付定金 付尾款
expandPay = (info,type)=>{
// type 等于1是定金 等于2是尾款
const {user, history} = this.props;
const uid = user && user.data && user.data.uid;
if (!uid) {
this.props.history.push('/passport/login')
} else {
if(type == 1){
this.props.history.push(
`/deposit-order?oid=${getParam('id')}&source=${1}`,
{
id: getParam('id'),
isexpand: 1,
sourcenum: 1
}
)
} else {
let timeStamp = Date.parse(new Date()) / 1000;
if (timeStamp >= info.start_timestamp) {
this.props.history.push(
'/final-deposit-order?source=1',
{
id: getParam('id'),
sourcenum: 1
}
)
} else {
Toast.info("付尾款时间将在" + info.final_start_time + "开启",2);
}
}
}
}
render() {
// data 课程信息;barInfo 砍价信息
const { user = {}, toCart } = this.props;
......@@ -271,6 +306,22 @@ class BtnStatus extends Component {
</div>
}
{/* 定金课程 is_deposit 是否定金课程 0-否 1-付定金 2-付尾款*/}
{
info.is_baoming === 0 && info.is_deposit != 0 &&
<div className='btns-box'>
<a className='consult consult-m' href="https://q.url.cn/AB8aue?_type=wpa&qidian=true">
<i className='iconfont iconerji' />
<span>课程咨询</span>
</a>
<div className='btn btn-m bg-FD7700' onClick={()=>this.expandPay(info.deposit_info,info.is_deposit)}>
{info.is_deposit == 1 ? '立即付定金':'立即付尾款'}
</div>
</div>
}
{/*已购买*/}
{
info.is_baoming === 1 &&
......
import React, {Component} from 'react'
import './index.scss'
import {connect} from "react-redux"
import {withRouter} from 'react-router-dom'
import {compose} from "redux"
class Deposit extends Component {
constructor(props) {
super(props)
this.state = {}
}
render() {
const {courseInfo} = this.props;
let info = ''
if (courseInfo) {
info = courseInfo.deposit_info
}
return (
<div className="buy-expand">
<p className="buy-time">付定金时间:{info.deposit_start_time}-{info.deposit_end_time}</p>
<p className="buy-time">付尾款时间:{info.final_start_time}-{info.final_end_time}</p>
<div className="expand-bgimg">
<img
className="four-year"
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/dj-1111.png"
alt=''
/>
<span className="dingjin">定金{info.deposit_amount}元,可抵扣{info.deduction_amount}</span>
<p className="small">
到手价最低:¥
<span>{info.low_price}</span>
</p>
<p className="else-tip">另可获得最高{info.deposit_coupon}元代金券进行叠加</p>
</div>
</div>
);
}
}
export default compose(
connect(
state => ({
user: state.user
}),
null
),
withRouter
)(Deposit)
.buy-expand {
margin-top: 5px;
.buy-time {
color: #999;
font-size: 12px;
text-align: left;
padding-left: 15px;
margin-bottom: 8px;
}
.expand-bgimg {
position: relative;
width: 100%;
height: 70px;
background-size: cover;
background-image: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/detail-expand-bg.png");
.four-year {
width: 104px;
height: 32px;
position: absolute;
left: 12px;
top: 7px;
}
.dingjin {
color: #f5f5f5;
font-size: 15px;
position: absolute;
right: 12px;
top: 20px;
}
.small {
color: #f5f5f5;
font-size: 14px;
position: absolute;
left: 12px;
bottom: 6px;
span {
font-size: 18px;
}
}
.else-tip {
color: #f5f5f5;
font-size: 12px;
position: absolute;
right: 12px;
bottom: 10px;
}
}
}
......@@ -10,6 +10,7 @@ import Single from "./single"
import SingleSuccess from './single/singleSuccess';
import BtnStatus from "./btnstatus"
import Barrage from './barrage'
import Deposit from './deposit'
import {connect} from "react-redux"
import {getCourses, addCourseToCart} from "./actions"
import {getParam, http, browser, wxShare} from "@/utils"
......@@ -19,6 +20,7 @@ import {delCountryNum} from './../country/countryRedux';
import RedPacket from './redPacket';
import {Link} from "react-router-dom";
import ExpandActiveToast from "../Index/expandActiveToast";
class Detail extends Component {
......@@ -475,6 +477,10 @@ class Detail extends Component {
cart={true}
toHref={href}
/>
<ExpandActiveToast/>
<CallApp className='toapp' path={`/detail/id=${getParam('id')}`} />
{/*弹幕*/}
......@@ -500,10 +506,13 @@ class Detail extends Component {
<span className="old">¥{course_info.price0}</span>
</p>
}
{/*{*/}
{/*course_info.is_baoming === 1 &&*/}
{/*<span className="isbuy">已购买</span>*/}
{/*}*/}
{
!!course_info.is_deposit && course_info.is_deposit!= 0 &&
<div className="openExpand">
支付定金¥{course_info.deposit_info.deposit_amount},可抵扣¥{course_info.deposit_info.deduction_amount}
</div>
}
</div>
</div>
</div>
......@@ -550,6 +559,15 @@ class Detail extends Component {
</div>
}
{/*定金相关信息*/}
{
!!course_info.is_deposit && course_info.is_deposit!= 0 &&
<Deposit courseInfo={course_info}/>
}
{/*服务承诺*/}
<div className='promise'>
<label>服务承诺</label>
......@@ -643,9 +661,9 @@ class Detail extends Component {
*/}
{
course_info.is_baoming === 0 && (!course_info.is_aist) && course_info.is_bargain &&
<Bargain
country={this.props.country}
delCountryNum={this.props.delCountryNum}
<Bargain
country={this.props.country}
delCountryNum={this.props.delCountryNum}
/>
}
......@@ -719,4 +737,4 @@ const mapDispatchToProps = (dispatch) => {
}
export default connect(mapStateToProps, mapDispatchToProps)(Detail)
\ No newline at end of file
export default connect(mapStateToProps, mapDispatchToProps)(Detail)
......@@ -222,4 +222,11 @@
}
}
}
.openExpand {
font-size: 14px;
color: #ff2121;
font-weight: 500;
width: 215px;
}
}
\ No newline at end of file
import React, {Component} from 'react'
import './callback.scss'
import {http, getParam} from '@/utils'
import {Toast} from 'antd-mobile'
import {connect} from "react-redux";
class ExpandCallback extends Component {
state = {
data: ''
}
componentDidMount() {
this.getIndexData()
}
// 获取膨胀券相关
getIndexData = () => {
http.post(`${API['base-api']}/m/deposit/coupon`, {order_id: getParam('order_id')}).then((res) => {
if (res.data.errno == 200) {
const {data} = res.data
this.setState({
data: data,
})
} else {
Toast.info(res.data.msg, 2)
}
})
}
// 邀请好友助力
invitation = (url) => {
const {user, history} = this.props;
const uid = user && user.data && user.data.uid;
if (!uid) {
this.props.history.push('/passport/login')
} else {
window.location.href = url
}
}
render() {
let data = this.state.data
return (
<div className="callback-box">
<div className="banner"></div>
<div className="content">
<div className="title">恭喜你,获得一张</div>
<div className="coupon">
<p className="coupon-name">膨胀券</p>
<p className="coupon-price"><span>{data.amount}</span>元</p>
<p className="coupon-time">有效期至:{data.expire_time}</p>
</div>
<div className="tip">
<ul>
{
new Array(19).fill('1').map((item, index) => {
return <li key={index}/>
})
}
</ul>
全场通用
</div>
<div className="expand">
<span className="expand-small">{data.amount}</span>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/expand.png" alt=""/>
<span className="expand-big">{data.limit_amount}</span>
</div>
<button className="invitation"
onClick={() => this.invitation(data.share_url)}>邀请好友助力,{data.amount}元变{data.limit_amount}
</button>
<div className="active-time">活动时间:{data.start_time}-{data.end_time}</div>
<div className="active-tip">送助力好友{data.limit_amount}元!</div>
</div>
</div>
)
}
}
export default connect(
state => ({
user: state.user
}),
)(ExpandCallback)
.callback-box {
width: 100%;
height: 100%;
position: relative;
.banner {
width: 100%;
height: 258px;
background-image: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/bg-img.png");
background-repeat: no-repeat;
background-size: contain;
}
.content {
position: absolute;
top: 13px;
left: 10px;
width: 355px;
background-color: #fff;
border-radius: 4px;
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, .06);
padding: 18px 10px 25px 10px;
.title {
text-align: center;
color: #FF3131;
font-size: 18px;
font-weight:500;
}
.coupon {
background-color: #8361FE;
width: 335px;
height: 95px;
border-radius: 3px 3px 0 0;
margin-top: 10px;
padding: 10px 12px;
color: #fff;
p {
width: 100%;
text-align: center;
font-size: 12px;
}
.coupon-name {
text-align: left;
font-size: 14px;
height: 16px;
line-height: 16px;
}
.coupon-price {
height: 28px;
line-height: 28px;
span {
font-size: 26px;
}
}
.coupon-time {
margin-top: 3px;
}
}
.tip {
width: 335px;
height: 37px;
padding-left: 12px;
text-align: left;
font-size: 12px;
color: #666;
line-height: 37px;
background-color: #fff;
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, .1);
border-radius: 0 0 3px 3px;
position: relative;
ul {
position: absolute;
top: -5px;
left: 0;
width: 100%;
display: flex;
justify-content: space-around;
li {
width: 10px;
height: 10px;
border-radius: 50%;
background-color: #fff;
}
}
}
.expand {
color: #FF3131;
margin-top: 15px;
font-size: 22px;
text-align: center;
img {
margin: 0 15px;
}
.expand-big {
font-size: 30px;
}
}
.invitation {
width: 320px;
height: 44px;
background-color: #8361FE;
border-radius: 4px;
font-size: 16px;
color: #fff;
margin-top: 15px;
border: none;
}
.active-time {
color: #999;
font-size: 14px;
margin-top: 10px;
text-align: center;
}
.active-tip {
color: #8361FE;
font-size: 16px;
margin-top: 13px;
text-align: center;
}
}
}
import React, {Component} from 'react'
import './share.scss'
import {http, getParam, browser, wxShare} from '@/utils'
import {Toast} from 'antd-mobile'
import {connect} from "react-redux";
import {Link} from "react-router-dom";
import showAlert from '@common/deposit/end-expansion-alert'
class ExpandShare extends Component {
state = {
isShow: false, //活动规则
step: 0, // 区分弹窗
data: '', //膨胀券相关
courseList: [], // 预售课程列表
isshowMore: true, // 是否显示查看更多
pageCount: 1, // 页码
helpData: '',// 帮助好友助力数据
courseListMore: '', // 所有课程
}
componentDidMount() {
this.getListorData()
this.getCourseList()
wxShare({
title: '七月在线4岁啦,80元红包等你来拿!',
desc: '重磅好课1元购,大奖、红包轰趴7天7夜',
link: window.location.href,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/717/shareimg.png',
})
}
// 获取膨胀券相关
getListorData = () => {
http.get(`${API['base-api']}/sys/help_list/${getParam('deposit_code')}`).then((res) => {
const {data, errno, msg} = res.data
if (errno == 200) {
this.setState({
data: data
})
} else {
Toast.info(msg, 2)
}
})
}
// 获取课程列表
getCourseList = () => {
const _this = this
http.get(`${API['base-api']}/anniversary2019/pre_course`).then((res) => {
const {data, errno, msg} = res.data
if (errno == 200) {
if (JSON.stringify(data) == '{}') {
_this.setState({
isshowMore: false,
courseList: []
})
} else if (data.length <= 6) {
_this.setState({
isshowMore: false,
courseList: data
})
} else {
_this.setState({
isshowMore: true,
courseList: data.slice(0, 6),
courseListMore: data
})
}
} else {
Toast.info(msg, 2)
}
})
}
// 获取更多课程
getMoreCourseList = () => {
this.setState({
courseList: this.state.courseListMore,
isshowMore: false
})
}
// 立即付定金
expandPaydj = (courseId) => {
const {user, history} = this.props;
const uid = user && user.data && user.data.uid;
if (!uid) {
this.props.history.push('/passport/login')
} else {
this.props.history.push(
`/deposit-order?oid=${getParam('id')}&source=${1}`,
{
id: courseId,
isexpand: 1,
sourcenum: 1
}
)
}
}
// 立即付尾款
expandPaywk = (courseId, time, day) => {
const {user, history} = this.props;
const uid = user && user.data && user.data.uid;
if (!uid) {
this.props.history.push('/passport/login')
} else {
let timeStamp = Date.parse(new Date()) / 1000;
if (timeStamp >= time) {
this.props.history.push(
'/final-deposit-order?source=1',
{
id: courseId,
sourcenum: 1
}
)
} else {
Toast.info("付尾款时间将在" + day + "开启", 2);
}
}
}
// 去学习
tostudy = (courseId) => {
this.props.history.push(`/getDetail?id=${courseId}`)
}
// 显示活动规则
showRule = () => {
this.setState({
isShow: true,
step: 1
})
}
// 邀请好友
share = () => {
const {user, history} = this.props;
const uid = user && user.data && user.data.uid;
if (!uid) {
this.props.history.push('/passport/login')
} else {
this.setState({
isShow: true,
step: 0
})
}
}
// 帮好友助力
helpFriend = (id) => {
const {user, history} = this.props;
const uid = user && user.data && user.data.uid;
if (!uid) {
this.props.history.push('/passport/login')
} else {
http.post(`${API['base-api']}/sys/help/${id}`).then((res) => {
const {data, errno, msg} = res.data
if (errno == 200) {
this.setState({
isShow: true,
step: 2,
helpData: data
})
console.log(data)
} else if (errno === 17018 || errno === 17020) {
this.setState({
isShow: true,
step: 4
})
} else {
Toast.info(msg, 2)
}
})
}
}
// 结束助力
isendExpand = (data) => {
const {user, history} = this.props;
const uid = user && user.data && user.data.uid;
if (!uid) {
this.props.history.push('/passport/login')
} else {
const {amount, limit_amount, id} = data
showAlert({
amount,
limit_amount,
onCancel: () => {
this.setState({
isShow: false
})
},
onConfirm: () => {
http.post(`${API['base-api']}/sys/end_expansion`, {
id
})
.then(res => {
const {errno, msg} = res.data
if (errno == 200) {
this.setState({
isShow: false
})
this.getListorData()
} else {
Toast.info(msg)
}
})
}
})
}
}
// 关闭弹窗
close = () => {
this.setState({
isShow: false
})
}
render() {
const {isShow, step, data, courseList, isshowMore, helpData} = this.state
return (
<div className="expand-box">
<div className="banner">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/dj-banner.png" alt=""/>
<span onClick={() => this.showRule()}/>
</div>
<div className="all-contnet">
<div className="content">
{/*进度||膨胀券*/}
{
<ExpansionStatus data={data}/>
}
{/*button*/}
{
<ButtonStatus data={data} share={this.share} helpFriend={this.helpFriend}
isendExpand={this.isendExpand}/>
}
</div>
{/*好友助力列表*/}
{
(data.oneself === 1 || data.help_list && data.help_list.length !== 0) &&
<FriendList data={data}/>
}
{/*预售课程列表*/}
{
<CourseList data={courseList}
isshowMore={isshowMore}
getMoreCourseList={this.getMoreCourseList}
expandPaydj={this.expandPaydj}
expandPaywk={this.expandPaywk}
tostudy={this.tostudy}
/>
}
</div>
{
isShow &&
<div className='mbc-box'>
{
step === 0 &&
<ShareBox close={this.close} share={this.share} data={data}/>
}
{
step === 1 &&
<ActiveRule/>
}
{
step === 2 &&
<AssistanceSuccess share={this.share} data={data} helpData={helpData}/>
}
{
step === 4 &&
<AssistanceErron close={this.close}/>
}
{
(step === 1 || step === 2) &&
<img className="close"
onClick={() => this.close()}
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/Public/img/guanbi_icon.png"
alt=""/>
}
</div>
}
</div>
)
}
}
// 活动规则
function ActiveRule() {
return (
<div className='content active-rule'>
<div className="title">活动规则</div>
<p>1、本活动期间,可以助力1位好友不同课程发起的膨胀,但是只能为同一好友;</p>
<p>2、好友发起膨胀后,可以随时终止膨胀;</p>
<p>3、膨胀券膨胀完成后,以优惠券形式发放到参与活动的账号(包括所有助力好友),该膨胀券为全场通用券,可在购买任一课程后进行抵扣(包括已付定金课程);</p>
<p>4、如有疑问,可联系七月在线客服微信:julyedukefu</p>
<p>*本活动最终解释权归七月在线所有</p>
</div>
)
}
// 邀请好友 分享弹窗
function ShareBox(props) {
const {close, data} = props
return (
<div className='content'>
<div onClick={() => close()} className="fiexd"></div>
<div className="share-box">
{
browser.isWeixin &&
<img src="//julyedu-cdn.oss-cn-beijing.aliyuncs.com/share/throw_icon.png" alt=""/>
}
<p>邀请好友助力</p>
<p>膨胀券翻倍膨胀,{data.start_amount}元变{data.limit_amount}元!</p>
<span>送助力好友{data.limit_amount}</span>
</div>
</div>
)
}
//助力成功弹窗
function AssistanceSuccess(props) {
const {helpData, share, data} = props
return (
<div className='content assistance-success'>
<div className="title">助力成功</div>
<p className="add-price">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/add-money.png" alt=""/>
+{helpData.help_amount}
</p>
<p className="all-price">
<span>{helpData.sale_amount}</span>
</p>
<p className="assistance-tip">感谢你的助力,你们离{data.limit_amount}元又更近了哦!<br/>可以邀请其他小伙伴一起助力~</p>
<button onClick={() => share()}>邀请更多好友拿{data.limit_amount}</button>
</div>
)
}
// 助力失败弹窗
function AssistanceErron(props) {
const {close} = props
return (
<div className="content assistance-erron">
<div className="title">温馨提示</div>
<p>很遗憾~</p>
<p>你已经帮别的好友助过力了,</p>
<p>不能再帮这位好友助力!</p>
<button onClick={() => close()}>知道了</button>
</div>
)
}
// 判断是否结束膨胀
function ExpansionStatus(props) {
const {data} = props
//is_end: 0 判断活动是否结束 0否1是
// is_end_expansion: 0,是否是自己结束膨胀 0否1是
if (data.is_end === 0 && data.is_end_expansion === 0) {
return (
<ProgressData data={data}/>
)
} else {
return (
<EndExpansion data={data}/>
)
}
}
// 没有结束膨胀的情况
function ProgressData(props) {
const data = props.data
return (
<div>
<div className="user-mess">
<img src={data.avatar_file} alt="user"/>
帮我助力,送你{data.limit_amount}
</div>
<div className="progress-box">
<div className="progress-base">
<span className="progress-active"
style={{width: (data.amount - data.start_amount) / data.limit_amount * 100 + '%'}}>
<span className="ending">
<span className="tip">{data.amount} <i/></span>
</span>
</span>
</div>
<div className="progress-price">
<span>{data.start_amount}</span>
<span>{data.limit_amount}</span>
</div>
</div>
{
data.help_list.length === 0 &&
<div className="help-mess no">还没有好友为{data.oneself === 1 ? '你' : 'Ta'}助力哦~</div>
}
{
data.help_list.length > 0 &&
<div className="help-mess has">已有<span className="FF19A0">{data.help_list.length}</span>位好友助力</div>
}
</div>
)
}
// 结束膨胀的情况
function EndExpansion(props) {
const data = props.data
return (
<div className='coupon-box'>
<div className="coupon">
<p className="coupon-name">红包膨胀优惠券</p>
<p className="coupon-price"><span>{data.amount}</span>元</p>
<p className="coupon-time">有效期至:{data.expire_time}</p>
</div>
<div className="tip">
<ul>
{
new Array(19).fill('1').map((item, index) => {
return <li key={index}/>
})
}
</ul>
全场通用
</div>
<p className="over-mess">该礼券已成功发放至账户</p>
<p className="over-mess">可在七月在线pc/app-我的-优惠券查看</p>
</div>
)
}
// 按钮
function ButtonStatus(props) {
const {data, share, helpFriend, isendExpand} = props
// data.oneself 判断是否是自己 0帮好友助力 1自己
// data.is_help 是否已经帮好友助力 0 未助力 1已助力
// data.s_end: 0 判断活动是否结束 0否1是
// data.is_end_expansion: 0,是否是自己结束膨胀 0否1是
return (
<div>
{
data.is_end === 0 &&
<div className='btns'>
{
data.oneself === 1 && data.is_end_expansion === 0 &&
<button className="active" onClick={() => share()}>邀请好友助力</button>
}
{
data.oneself === 1 && data.is_end_expansion === 1 && data.amount !== data.limit_amount &&
<button className="over">您已结束膨胀</button>
}
{
data.oneself === 1 && data.is_end_expansion === 1 && data.amount === data.limit_amount &&
<button className="over">达到膨胀上限,快去使用吧</button>
}
{
data.oneself === 0 && data.is_help === 0 && data.is_end_expansion === 0 &&
<button className="active" onClick={() => helpFriend(data.id)}>ta助力</button>
}
{
data.oneself === 0 && data.is_help === 1 && data.is_end_expansion === 0 &&
<button className="active" onClick={() => share()}>邀请更多好友拿{data.limit_amount}</button>
}
{
data.oneself === 0 && data.is_end_expansion === 1 && data.amount === data.limit_amount &&
<button className="over">达到膨胀上限,快去使用吧</button>
}
{
data.oneself === 0 && data.is_end_expansion === 1 && data.amount !== data.limit_amount &&
<button className="over">你的好友已结束助力</button>
}
</div>
}
{
data.is_end === 1 &&
<div className="btns">
<button className="over">活动已结束</button>
</div>
}
{
data.is_end === 0 && data.is_end_expansion === 0 && data.oneself === 1 &&
<div className="overBtn">
<p onClick={() => isendExpand(data)}>结束助力使用礼券</p>
</div>
}
</div>
)
}
// 好友助力列表
function FriendList(props) {
const data = props.data
return (
<div className="friend-list">
<p className="title">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/expand-right.png" alt=""/>
<span>好友助力</span>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/expand-left.png" alt=""/>
</p>
{
data.help_list.length === 0 &&
<div className="null-list">
<p className="tips first-tips">还没有好友为你助力,</p>
<p className="tips">赶紧去邀请好友吧!</p>
</div>
}
{
data.help_list.length > 0 &&
<div className="all-list">
<p className="friend-status"><span className="FF19A0">{data.help_list.length}</span>位好友共助力<span
className="FF19A0">{data.amount - data.start_amount}</span>元</p>
<ul className="all-list-box">
{
data.help_list.map((item, index) => {
return (
<li className="item" key={index}>
<img className="avait" src={item.avatar} alt=""/>
<span className="time">助力时间:{item.add_time}</span>
<span className="zlprice FF19A0">{item.amount}</span>
</li>
)
})
}
</ul>
</div>
}
</div>
)
}
//预售课程
function CourseList(props) {
const {data, isshowMore, getMoreCourseList, expandPaydj, expandPaywk, tostudy} = props
return (
<div className="advance-sale-course">
<p className="title">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/expand-right.png" alt=""/>
<span>预售课程</span>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/expand-left.png" alt=""/>
</p>
<div className="course-list">
<ul>
{
data.map((item, index) => {
return (
<li className="course-item" key={index}>
<Link to={`/getDetail?id=${item.course_id}`}>
<img className="course-img" src={item.image_name} alt=""/>
</Link>
<p className="old-price">原价:<span>¥{item.price}</span></p>
<p className="handsel">定金¥{item.deposit_amount},可抵扣¥{item.deduction_amount}</p>
<div className="btn">
{
item.is_buy === 0 &&
<a className="to-expand-buy1"
onClick={() => expandPaydj(item.course_id)}>立即付定金</a>
}
{
item.is_buy === 1 &&
<a className="to-expand-buy2"
onClick={() => expandPaywk(item.course_id, item.start_timestamp, item.final_start_time)}>立即付尾款</a>
}
{
item.is_buy === 2 &&
<button className="to-study"
onClick={() => tostudy(item.course_id)}>开始学习</button>
}
</div>
</li>
)
})
}
</ul>
</div>
{
isshowMore &&
<div className="more">
<div onClick={() => getMoreCourseList()}>
查看更多
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/expand-btm.png"
alt=""/>
</div>
</div>
}
</div>
)
}
export default connect(
state => ({
user: state.user
}),
)(ExpandShare)
.expand-box {
width: 100%;
height: 100%;
position: relative;
.FF19A0{
color: #FF19A0;
}
.banner {
width: 100%;
height: 323px;
position: relative;
z-index: 1;
span {
position: absolute;
top: 48px;
right: 22px;
width: 30px;
height: 83px;
}
}
.all-contnet {
position: absolute;
top: 180px;
width: 100%;
background-color: #f5f5f5;
.content {
position: relative;
z-index: 2;
background-color: #fff;
width: 355px;
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, .06);
padding: 17px 19px;
border-radius: 8px 8px 4px 4px;
margin-left: 10px;
.user-mess {
text-align: left;
color: #111;
font-size: 14px;
img {
width: 24px;
height: 24px;
border-radius: 50%;
vertical-align: middle;
margin-right: 9px;
}
}
.progress-box {
margin-top: 50px;
.progress-base {
width: 318px;
height: 8px;
line-height: 8px;
background-color: #DCDCDC;
border-radius: 4px;
text-align: left;
.progress-active {
display: inline-block;
height: 100%;
border-radius: 4px;
background-color: #FF19A0;
padding-left: 10px;
position: relative;
.ending {
display: inline-block;
width: 14px;
height: 14px;
border-radius: 50%;
background-color: #fff;
position: absolute;
right: 0;
top: -3px;
border: 3px solid #FF19A0;
.tip {
display: inline-block;
width: 55px;
height: 20px;
line-height: 21px;
background-color: #FF19A0;
border-radius: 3px;
position: absolute;
top: -30px;
left: -23px;
text-align: center;
color: #fff;
i {
display: inline-block;
width: 6px;
height: 6px;
background-color: #FF19A0;
transform: rotate(45deg);
position: absolute;
bottom: -3px;
left: 50%;
margin-left: -3px;
}
}
}
}
}
.progress-price {
width: 100%;
display: flex;
justify-content: space-between;
color: #FF19A0;
font-size: 14px;
margin-top: 3px;
}
}
.help-mess {
font-size: 15px;
margin-top: 10px;
text-align: center;
}
.no {
color: #666;
}
.has {
color: #000011;
}
.coupon-box {
.coupon {
background-color: #8361FE;
width: 316px;
height: 85px;
border-radius: 3px 3px 0 0;
padding: 10px 12px;
color: #fff;
p {
width: 100%;
text-align: center;
font-size: 12px;
}
.coupon-name {
text-align: left;
font-size: 14px;
height: 16px;
line-height: 16px;
}
.coupon-price {
height: 28px;
line-height: 28px;
span {
font-size: 26px;
}
}
}
.tip {
width: 316px;
height: 33px;
padding-left: 12px;
text-align: left;
font-size: 12px;
color: #666;
line-height: 33px;
background-color: #fff;
box-shadow: 0 6px 12px 0 rgba(131, 97, 254, 0.1);
border-radius: 0 0 3px 3px;
position: relative;
margin-bottom: 16px;
ul {
position: absolute;
top: -5px;
left: 0;
width: 100%;
display: flex;
justify-content: space-around;
li {
width: 10px;
height: 10px;
border-radius: 50%;
background-color: #fff;
}
}
}
.over-mess {
text-align: center;
font-size: 12px;
color: #333;
}
}
.btns {
button {
width: 318px;
height: 44px;
border-radius: 22px;
box-shadow: 0 6px 12px 0 rgba(131, 97, 254, 0.1);
color: #fff;
font-size: 16px;
border: none;
}
.active {
margin-top: 25px;
background-color: #8361FE;
}
.over {
margin-top: 15px;
background-color: #CCCCCC;
}
}
.overBtn {
width: 100%;
margin-top: 15px;
font-size: 14px;
color: #666;
text-decoration: underline;
text-align: center;
}
}
.friend-list {
width: 100%;
margin-top: 12px;
padding: 17px 28px 24px 28px;
background-color: #fff;
.title {
font-size: 18px;
color: #111;
font-weight: 500;
text-align: center;
margin: 0 5px;
img {
width: 59px;
height: 11px;
vertical-align: middle;
}
span {
margin: 0 10px;
}
}
.null-list {
text-align: center;
margin-bottom: 20px;
.tips {
font-size: 15px;
color: #999;
margin-top: 5px;
}
.first-tips {
margin-top: 35px;
}
}
.all-list {
margin-top: 10px;
.friend-status {
font-size: 14px;
color: #333;
text-align: center;
}
.all-list-box {
margin-top: 7px;
width: 100%;
.item {
margin-top: 15px;
height: 24px;
line-height: 24px;
text-align: left;
font-size: 14px;
.avait {
width: 24px;
height: 24px;
border-radius: 50%;
vertical-align: middle;
}
.time {
margin-left: 26px;
}
.zlprice {
float: right;
}
}
}
}
}
.advance-sale-course {
width: 100%;
margin-top: 12px;
background-color: #fff;
padding: 15px 10px 20px 10px;
.title {
text-align: center;
font-size: 18px;
color: #111;
font-weight: 500;
img {
width: 59px;
height: 11px;
vertical-align: middle;
}
span {
margin: 0 10px;
}
}
.course-list {
margin-top: 15px;
ul {
display: flex;
justify-content: space-between;
flex-direction: row;
flex-wrap: wrap;
.course-item {
width: 48.4%;
background-color: #fff;
padding-bottom: 14px;
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, .06);
border-radius: 2px;
margin-bottom: 10px;
text-align: left;
margin-top: 0;
.course-img {
width: 100%;
height: 124px;
border-radius: 2px;
}
.old-price {
margin-top: 8px;
font-size: 12px;
color: #999;
padding-left: 10px;
span {
font-size: 15px;
color: #FF3131;
}
}
.handsel {
margin-top: 5px;
font-size: 12px;
color: #666;
padding-left: 10px;
}
.btn {
width: 100%;
padding: 0 10px;
margin-top: 12px;
button {
width: 100%;
height: 27px;
border-radius: 2px;
font-size: 12px;
color: #fff;
border: none;
}
.to-expand-buy1, .to-expand-buy2 {
display: inline-block;
width: 100%;
text-align: center;
height: 27px;
line-height: 27px;
border-radius: 2px;
font-size: 12px;
color: #fff;
}
.to-expand-buy1 {
background-color: #8361FE;
}
.to-expand-buy2 {
background-color: #FF4000;
}
.to-study {
background-color: #0099FF;
}
}
}
}
}
.more {
font-size: 14px;
color: #666;
height: 56px;
line-height: 56px;
text-align: center;
div {
width: 130px;
margin: auto;
}
img {
width: 13px;
height: 12px;
margin-left: 8px;
margin-top: -3px;
vertical-align: middle;
}
}
}
}
.mbc-box {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, .6);
z-index: 3;
.content {
border-radius: 8px;
background-color: #fff;
margin: 0 auto 24px auto;
width: 300px;
.title {
text-align: center;
font-size: 21px;
color: #333;
font-weight: 600;
}
}
.active-rule {
margin-top: 122px;
padding: 20px;
p {
text-align: left;
font-size: 14px;
color: #666;
margin-top: 15px;
}
}
.fiexd {
position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 0;
}
.share-box {
padding: 17px 0 20px 0;
margin-top: 100px;
text-align: center;
position: relative;
img {
position: absolute;
width: 60px;
height: 44px;
right: 0;
top: -48px;
}
p {
color: #333;
font-size: 15px;
margin-bottom: 10px;
height: 17px;
line-height: 17px;
}
span {
display: inline-block;
color: #999;
font-size: 12px;
margin-top: 10px;
height: 14px;
line-height: 14px;
}
}
.assistance-success {
margin-top: 197px;
text-align: center;
padding: 20px 0;
.add-price {
margin-top: 10px;
color: #FF3131;
font-size: 12px;
img {
width:8px;
height: 12px;
vertical-align: text-top;
}
}
.all-price {
margin-top: 10px;
color: #FF3131;
font-size: 12px;
span {
font-size: 30px;
}
}
.assistance-tip {
margin-top: 10px;
color: #999;
font-size: 14px;
}
button {
width: 225px;
height:36px;
background-color: #8361FE;
box-shadow: 0 6px 12px 0 rgba(131, 97, 254, .1);
border-radius: 18px;
color: #fff;
font-size: 15px;
margin-top: 20px;
}
}
.assistance-erron {
margin-top: 220px;
text-align: center;
padding: 20px 0;
.title {
margin-bottom: 15px;
}
p {
color: #666;
font-size: 14px;
margin-top: 8px;
}
button {
margin-top: 15px;
width: 146px;
height: 33px;
background-color: #8361FE;
border-radius: 17px;
color: #fff;
font-size: 15px;
}
}
.close {
width: 30px;
height: 30px;
position: absolute;
left: 50%;
margin-left: -15px;
}
}
}
\ No newline at end of file
......@@ -16,6 +16,7 @@ const alert = Modal.alert
@connect()
class MyOrders extends Component {
page = 1
constructor(props) {
super(props)
this.state = {
......@@ -31,7 +32,7 @@ class MyOrders extends Component {
}
getMore = debounce(() => {
if(this.state.data.length % 10 === 0){
if (this.state.data.length % 10 === 0) {
this.getList(++this.page)
}
}, 200)
......@@ -74,10 +75,10 @@ class MyOrders extends Component {
}
toCourseDetail = (id) => {
const { dispatch, history } = this.props;
const {dispatch, history} = this.props;
// dispatch(getCourses(id, () => {
history.push(`/detail?id=${id}`);
return false;
history.push(`/detail?id=${id}`);
return false;
// }));
}
......@@ -88,7 +89,7 @@ class MyOrders extends Component {
<HeaderBar title='我的订单' arrow={true} cart={false}></HeaderBar>
<Loading isLoading={this.state.isLoading}>
{
this.state.data && JSON.stringify(this.state.data) !== '[{}]'?
this.state.data && JSON.stringify(this.state.data) !== '[{}]' ?
<InfiniteScroll
pageStart={0}
hasMore={true}
......@@ -104,10 +105,9 @@ class MyOrders extends Component {
item.course && item.course.length > 0 && item.course.map((item, index) => {
const Info = (
<div className="order-info">
<p className='order-title text-overflow-one' onClick={() => this.toCourseDetail(item.course_id)}>
{/* <Link to={`/detail?id=${item.course_id}`}> */}
{item.course_title}
{/* </Link> */}
<p className='order-title text-overflow-one'
onClick={() => this.toCourseDetail(item.course_id)}>
{item.course_title}
</p>
<p className='order-content text-overflow-2'>{item.description}</p>
<p className='order-des'>
......@@ -133,6 +133,14 @@ class MyOrders extends Component {
}
<PayInfo item={item} cancel={this.cancel}/>
{
item.type == 5 && item.is_buy == 0 &&
<div className={'expand-pay-wk'}>
<span className={'expand-pay-time'}>{item.final_end_time}结束付尾款</span>
<span>还需支付尾款</span>
</div>
}
</div>
)
})
......@@ -167,11 +175,20 @@ function OrderInfo(props) {
}
function PayInfo(props) {
// type 0普通订单 1团购 2小团 3砍价 4单集购买 5定金课定金 6定金课尾款
let type = ''
if (props.item.type == 5) {
type = '(定金)'
}
if (props.item.type == 6) {
type = '(尾款)'
}
return (
<div className='order-btm'>
<div className='price-info'>
<p>
<span className='payable'>应付:</span>
<span className='payable'>应付{type}</span>
<span className='price'>¥{props.item.pay_amount}</span>
</p>
<p>
......
......@@ -25,7 +25,8 @@
font-size: 14px;
color: $redprice;
}
.oid-success{
.oid-success {
font-size: 14px;
color: $color_333;
}
......@@ -37,8 +38,9 @@
background-color: $bg_fff;
border-bottom: 1px solid $border_e7eaf1;
}
.order-info {
.order-des{
.order-des {
position: absolute;
bottom: 0;
}
......@@ -53,7 +55,7 @@
justify-content: space-between;
.price-info {
width: 120px;
width: 150px;
display: flex;
flex-direction: column;
align-self: center;
......@@ -105,6 +107,26 @@
}
}
}
.expand-pay-wk {
height: 35px;
background-color: $bg_fff;
line-height: 35px;
padding: 0 10px;
font-size: 12px;
display: flex;
justify-content: space-between;
border-top: 1px solid #E7EAF1;
span {
color: #999;
}
.expand-pay-time {
color: #09f;
}
}
}
.cart-tip {
......
import React, { Component } from 'react'
import { Flex, List, Toast } from 'antd-mobile'
import { OrderItem } from '@common/index'
import { Link } from 'react-router-dom'
import { http, getParam } from "@/utils"
import { HeaderBar } from '@common/index'
import "./index.scss"
const Item = List.Item
function OrderList(props) {
const listData = props.list
return (
<div>
{
listData.map((item, index) => {
const {is_coupon, course_id, image_name, sale_price, simpledescription, course_title, coupon_num, coupon_desc} = item
let NewPrice = (<span className='order-newprice'>¥{sale_price}</span>)
if (props.locationState && props.locationState.group) {
NewPrice = (<span className='order-newprice'>¥{props.groupPrice}</span>)
}
const Info = (
<div className="order-info">
<p
className='order-title'
style={{
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
}}
onClick={() => props.toDetail(course_id)}
>
{course_title}
</p>
<p className='order-content' style={{
WebkitBoxOrient: 'vertical',
WebkitLineClamp: '2',
wordBreak: 'break-all',
overflow: 'hidden',
textOverflow: 'ellipsis',
display: '-webkit-box'
}}>{simpledescription}</p>
<p className='order-des'>
{NewPrice}
<span className={'price-des'}>(预付定金)</span>
</p>
</div>
)
return (
<OrderItem
{...item}
src={image_name}
id={course_id}
key={index}
info={Info}
isaist={props.isaist}
toDetail={props.toDetail}
>
{
(props.locationState && (props.locationState.type || props.locationState.simple)) ? (
<div className="order-prefer">
<List key={index}>
<Item
arrow="horizontal"
onClick={() => {
}}
>
<Link to={{
pathname: `/coupons`,
search: `?id=${course_id}`,
state: {
from: '/order'
}
}}>
<Flex justify='between'>
<span
style={{
color: '#333',
fontSize: '15px'
}}
>优惠券</span>
<span
style={{
fontSize: '14px',
color: '#999999'
}}
>
{!coupon_desc ? (coupon_num === 0 ? '无' : `${coupon_num}张可用`) : (coupon_desc)}
</span>
</Flex>
</Link>
</Item>
</List>
</div>
) : null
}
</OrderItem>
)
})
}
</div>
)
}
class Order extends Component {
constructor(props) {
super(props)
this.state = {
groupPrice: '',
total: 0.00, // 需要支付总金额
discount: 0.00, //
useBalance: false,
orderList: [],
info: false,
offset: 0,
depositPrice: 0,
course_id: getParam('oid'),
user_account: '',
finalStartTime: '',
}
}
// 提交订单
submitOrder = () => {
http.post(`${API["base-api"]}/m/deposit/create`, {
plat_form: 5,
source: getParam('source'), //来源 1-详情页 2-活动页,
course_id: this.state.course_id,
is_deduction: this.state.useBalance ? 1 : 0
}).then(res => {
const {data} = res
if (data.errno == 200) {
if (data.data['pay_jump']) {
this.props.history.replace(`/expand/callback?order_id=${data.data['order_id']}`)
} else {
this.props.history.replace({
pathname: '/deposit-pay-order',
search: `?oid=${data.data['order_id']}`
})
}
} else {
Toast.info(data.msg)
}
})
}
showInfo = () => {
this.setState((prevState) => ({
info: !prevState.info
}))
}
componentDidMount() {
http.post(`${API["base-api"]}/m/deposit/preorder`, {
course_id: this.state.course_id
})
.then(res => {
const {data} = res
if (data.errno == 200) {
this.setState({
orderList: [data.data.course],
depositPrice: data.data.course['sale_price'],
user_account: data.data['user_account'],
finalStartTime: data.data['final_start_time']
})
} else {
Toast.info(data.msg)
}
})
};
toCourseDetail = (id) => {
const {history} = this.props
history.push(`/detail?id=${id}`)
}
useBalance = () => {
let {user_account, depositPrice} = this.state
if (parseFloat(user_account) === 0) {
return
}
let offset = parseFloat(user_account) - parseFloat(depositPrice)
offset = offset > 0 ? depositPrice : user_account
this.setState(prevState => ({useBalance: !prevState.useBalance, offset}))
}
updateUserAccount = () => {
}
render() {
const {
orderList,
discount,
groupPrice,
depositPrice,
user_account,
useBalance,
info,
offset,
finalStartTime
} = this.state
return (
<div className="order-wrapper">
<Flex>
<Flex.Item>
<HeaderBar title='课程报名' arrow={true}/>
<div className="order-list">
<OrderList
list={orderList}
courseId={getParam('id')}
locationState={this.props.location.state}
groupPrice={groupPrice}
toDetail={this.toCourseDetail}
/>
</div>
<div className="order-balance">
<List>
<Item
className="order-prefer-text"
>
<Flex justify='between'>
<Flex align='center'>
<span>余额抵扣</span>
<span className="order-balanceprice"> (余额: <i
className="order-money">{`${user_account}元`}</i>)</span>
<i className="iconfont iconiconfront-22 question-mark"
onClick={this.showInfo}></i>
</Flex>
<Flex>
{
useBalance ? (
<>
<span style={{
color: '#FF2121',
fontSize: '15px',
marginRight: "6px"
}}>{`-¥${offset}`}</span>
<i className={`iconfont icondanseshixintubiao-5 balance-used`}
onClick={this.useBalance}></i>
</>
) : (
<i className='circle-icon' onClick={this.useBalance}></i>
)
}
</Flex>
</Flex>
</Item>
</List>
</div>
<ul className={'deposit-limit-time'}>
<li>· {finalStartTime}开始支付尾款</li>
<li>· 代金券只能在支付尾款时使用</li>
</ul>
<div className="order-bar">
<div className="order-course">
<span className="order-course-text">{`${orderList.length}门课程`}</span>
</div>
<div className="order-bar-text">
<div className="order-amount">
<span className="order-amount-title">合计:</span>
<span className="order-amount-price">{`¥${depositPrice}`}</span>
</div>
<div className="order-preprice">
<span className="order-preprice-title">已优惠:</span>
<span className="order-preprice-price">{${discount}`}</span>
</div>
</div>
<button type="button" className="order-button has-info">
<span className="order-button-text" onClick={this.submitOrder}>确定订单</span>
</button>
</div>
</Flex.Item>
</Flex>
{
info ? (
<div style={{
position: 'fixed',
top: 0,
left: 0,
width: '100%',
height: '100%',
backgroundColor: 'rgba(0, 0, 0, 0.8)',
zIndex: '99'
}}>
<div style={{
padding: '20px',
backgroundColor: '#FFF',
width: '300px',
height: '170px',
margin: '0 auto',
position: 'absolute',
left: '50%',
top: '50%',
transform: 'translate(-50%, -50%)'
}}>
<Flex direction='column' justify='between' align='center' style={{height: '100%'}}>
<p style={{fontSize: '16px', color: '#333333'}}>余额抵扣说明</p>
<p style={{
lineHeight: '20px',
fontSize: '13px',
color: '#666666'
}}>分销课程或者参与七月在线的相关活动,可获得资金奖励。账户资金可直接提现,也可抵扣课程费用。</p>
<div onClick={this.showInfo} style={{
width: '260px',
height: '30px',
lineHeight: '30px',
textAlign: 'center',
borderRadius: '3px',
border: '1px solid #0099FF',
color: '#0099FF',
fontSize: '15px'
}}>知道了
</div>
</Flex>
</div>
</div>
) : null
}
</div>
)
}
}
export default Order
.order-wrapper {
width: 100%;
height: 100vh;
margin-bottom: 50px;
background-color: $bg_f5f5f5;
.order-tab {
color: $black;
background: $bg_f7f9fc;
}
.order-information {
display: flex;
width: 100%;
overflow: hidden;
padding: 29px 15px;
color: $color_555;
background-color: $bg_fff;
position: relative;
}
.order-information::before {
content: '';
left: 0;
right: 0;
bottom: 0;
height: 2px;
position: absolute;
background: -webkit-repeating-linear-gradient(135deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
background: repeating-linear-gradient(-45deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
background-size: 80px;
}
.order-information2 {
height: 80px;
background-color: #FFF;
margin-top: 8px;
position: relative;
.user-icon {
font-size: 28px;
flex-basis: 40px;
}
.order-cell {
height: 50px;
font-size: 13px;
color: $color_333;
line-height: 20px;
flex: 1 1 auto;
.name {
margin-bottom: 10px;
}
}
}
.order-information2::before {
content: '';
left: 0;
right: 0;
bottom: 0;
height: 2px;
position: absolute;
background: -webkit-repeating-linear-gradient(135deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
background: repeating-linear-gradient(-45deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
background-size: 80px;
}
.order-addsize {
font-size: 22px !important;
margin-bottom: 0px;
height: 22px;
color: $active;
line-height: 22px;
}
.order-next {
line-height: 22px;
margin-bottom: 0px;
}
.order-list {
margin-top: 8px;
background-color: #F5F5F5;
.public-content {
padding: 10px 15px;
}
}
.order-infotext {
flex: 1;
height: 22px;
line-height: 22px;
margin-left: 10px;
font-size: $font_14;
color: $color_555;
}
.order-info {
color: $color_666;
font-size: $font_14;
min-width: 160px;
flex: 1 1 auto;
display: flex;
flex-direction: column;
justify-content: space-around;
.order-title {
color: $color_333;
font-size: $font_16;
}
.order-content {
color: $color_666;
font-size: $font_14;
line-height: 18px;
}
.order-newprice {
color: $redprice;
font-size: $font_16;
margin-right: 8px;
}
.price-des{
color: #999;
font-size: 11px;
}
}
.order-bar {
width: 100%;
position: fixed;
bottom: 0;
z-index: 2;
height: 50px;
display: flex;
font-size: 14px;
align-items: center;
background-color: $bg_fff;
}
.order-course {
margin-left: 20px;
.order-course-text {
font-size: $font_16;
color: $color_333;
}
}
.order-bar-text {
flex: 1;
text-align: right;
color: #323233;
padding-right: 20px;
.order-amount {
font-size: $font_14;
color: $color_333;
.order-amount-price {
color: $redprice;
}
}
.order-preprice {
font-size: $font_12;
color: $color_555;
}
}
.order-button {
width: 110px;
height: 50px;
display: inline-block;
padding: 0;
background-color: $bg_ff9898;
color: $white;
line-height: 48px;
font-size: 16px;
border-radius: 0px;
text-align: center;
box-sizing: border-box;
-webkit-appearance: none;
-webkit-text-size-adjust: 100%;
border: 1px solid transparent;
}
.has-info {
background-color: #FF3131;
}
.v-list-item {
margin-top: 8px;
padding: 10px 15px 0 15px;
.content {
border-bottom: none;
}
}
.order-prefer {
.am-list-body{
&::after{
display: none;
}
}
.am-list-content {
font-size: 15px !important;
}
.am-list-line {
padding: 0 15px;
}
}
.am-list-item .am-list-line .am-list-content {
color: $color_333;
}
.order-list {
.am-list-item {
padding-left: 0 !important;
}
}
.deposit-limit-time{
background: #fff;
padding: 11px 15px;
border-top: 1px solid #E5E5E5;
border-bottom: 1px solid #E5E5E5;
font-size: 13px;
color: #666;
line-height: 1.7;
}
.order-balance {
line-height: 44px;
background: #fff;
margin: 8px 0;
.am-list-item {
padding-left: 0 !important;
}
.am-list-line {
padding: 0 15px;
}
.am-list-content {
color: $color_333;
font-size: $font_16;
.iconiconfront-22 {
font-size: 18px;
margin-left: 15px;
}
}
.order-balanceprice {
color: $color_666;
font-size: $font_12;
.order-money {
color: #ff2121;
font-size: $font_12 !important;
font-weight: normal;
font-style: inherit;
vertical-align: middle;
margin: 0;
}
}
.iconiconfront-22.question-mark {
font-size: 24px;
margin-left: 15px;
}
.am-list-body {
&::before, &::after {
display: none;
}
}
.balance-used {
font-size: 24px;
color: #0099FF;
}
.circle-icon {
width: 20px;
height: 20px;
border: 1px solid #BFBFBF;
border-radius: 50%;
margin-right: 2px;
}
}
}
import React, { Component } from 'react'
import { Flex, WingBlank, WhiteSpace, List, Radio, Toast, Checkbox } from 'antd-mobile'
import { http, getParam, is_weixin, browser } from '@/utils'
import { OrderItem, HeaderBar } from '@common/index'
import { Link } from 'react-router-dom'
import './index.scss'
import { VList } from '@/common'
import { WithFullSize } from '@/HOCs'
import classnames from 'classnames'
const RadioItem = Radio.RadioItem
let mockData = []
if (browser.isWeixin) {
mockData = [
{value: 1, label: '微信支付', icon: 'iconweixinzhifu'}
]
} else {
mockData = [
{value: 1, label: '微信支付', icon: 'iconweixinzhifu'},
{value: 0, label: '支付宝', icon: 'iconalipay'},
]
}
class PayOrder extends Component {
constructor(props) {
super(props)
this.state = {
pay_amount: 0,
payType: 1,
stageNumber: 0,
checkPeriod: false,
singleMoney: 0,
periodNumber: 0,
orderId: getParam('oid'),
huabei: false,
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: [],
agree: false
}
}
onChange = (value) => {
this.setState({
payType: value,
checkPeriod: false,
})
if (value === 2) {
this.setState({
huabei: true,
})
}
}
// 确定购买
pay = () => {
const {payType, orderId} = this.state
if(!this.state.agree){
return
}
if (payType === 0) {
this.alipayPay(orderId)
} else if (payType === 1) {
this.weixinPay(orderId)
}
}
// 微信支付
weixinPay = (orderId) => {
// 微信内部-支付
if (is_weixin()) {
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"
} else {
// 微信外部-支付
http.get(`${API['base-api']}/pay/wxpay/wap_charge/oid/${orderId}`).then((res) => {
if (res.data.errno === 0) {
window.location.href = res.data.data.url + "&redirect_url=" + encodeURIComponent(window.location.href + "&weixinpay=1").toLowerCase()
} else {
Toast.info(res.data.msg, 2)
}
})
}
}
// 微信内部支付
isweixinPay = () => {
let _this = this
let weixin_code = getParam('code')
if (weixin_code) {
if (getParam('oid') === undefined) {
return
} else {
http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => {
if (res.data.errno === 0) {
let data = res.data.data
function onBridgeReady() {
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
appId: data.appId, //公众号名称,由商户传入
timeStamp: data.timeStamp, //时间戳,自1970年以来的秒数
nonceStr: data.nonceStr, //随机串
package: data.package,
signType: data.signType, //微信签名方式:
paySign: data.paySign //微信签名
},
function (res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
Toast.info('支付成功', 2)
_this.intervalPayStatus = setInterval(function () {
http.get(`${API['base-api']}/m/orderState/oid/${getParam('oid')}`).then(res => {
if (res.data.errno === 401) {
clearInterval(_this.intervalPayStatus)
_this.intervalPayStatus = null
_this.props.history.replace(`/expand/callback?order_id=${getParam('oid')}`)
}
})
}, 1000)
} else {
alert('支付失败')
}
}
)
}
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false)
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', onBridgeReady)
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady)
}
} else {
onBridgeReady()
}
} else {
Toast.info(res.data.msg, 2)
}
})
}
}
}
// 支付完成之后获取状态
payCallback = () => {
const _this = this
// 支付回调
// 定时器轮训获取订单状态
_this.intervalPayStatus = setInterval(function () {
http.get(`${API['base-api']}/m/orderState/oid/${getParam('oid')}`).then(res => {
if (res.data.errno === 401) {
clearInterval(_this.intervalPayStatus)
_this.intervalPayStatus = null
window.location.href = '/expand/callback?order_id=' + getParam('oid')
}
})
}, 1000)
}
onBridgeReady1 = (data) => {
let _this = this
data = data || _this.BridgeData
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": "wx23dac6775ac82877", //公众号名称,由商户传入
"timeStamp": data.timeStamp, //时间戳,自1970年以来的秒数
"nonceStr": data.nonceStr, //随机串
"package": data.package,
"signType": data.signType, //微信签名方式:
"paySign": data.paySign //微信签名
},
function (res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
Toast.info('支付成功', 2)
_this.payCallback()
} else {
alert('支付失败')
}
}
)
}
// 支付宝支付
alipayPay = (orderId) => {
http.get(`${API['base-api']}/pay/alipay/wap_charge_new/oid/${orderId}`).then((res) => {
if (res.data.errno === 0) {
this.payCallback()
window.location = res.data.data.url
} else {
Toast.info(res.data.msg, 2)
}
})
}
componentDidMount() {
if (getParam('weixinpay')) {
this.payCallback()
}
if (browser.isWeixin) {
this.isweixinPay(getParam('oid'))
}
http.post(`${API["base-api"]}/m/deposit/detail`, {
order_id: this.state.orderId
}).then(res => {
const {data} = res
if (data.errno == 200) {
this.setState({
categoryList: [data.data.course_info],
salePrice: data.data.course_info.sale_price
})
} else {
Toast.info(data.msg)
}
})
}
changeAgreement = () => {
this.setState((prevState) => ({agree: !prevState.agree}))
}
render() {
const {
orderId,
salePrice,
payType,
checkPeriod,
singleMoney,
periodNumber,
categoryList,
agree
} = this.state
return (
<div className='pay-order'>
<HeaderBar title='确认支付' arrow={true}></HeaderBar>
<WhiteSpace size='sm'></WhiteSpace>
<div className='order-number'>
<WingBlank>
<Flex justify='between' align='center' style={{height: '44px'}}>
<span>订单号</span>
<span className='number'>{orderId}</span>
</Flex>
</WingBlank>
</div>
<WhiteSpace size='md'></WhiteSpace>
{
categoryList.map((item, index) => {
const Info = (
<div className="order-info">
<p className='order-title text-overflow-one'>
<Link to={`/detail?id=${item.course_id}`}>{item.course_title}</Link>
</p>
<p className='order-content text-overflow-2'>{item.simpledescription}</p>
<p className='order-des'>
<span className='order-newprice'>¥{item.sale_price}</span>
<span className={'price-des'}>(预付定金)</span>
</p>
</div>
)
return (
<VList key={index} img={item.image_name}
id={item.course_id}
info={Info}></VList>
)
})
}
<WhiteSpace size='md'></WhiteSpace>
<div className='order-number'>
<WingBlank>
<Flex justify='between' align='center' style={{height: '44px'}}>
<span>支付金额</span>
<span className='money'>{`¥${salePrice}`}</span>
</Flex>
</WingBlank>
</div>
<WhiteSpace size='md'></WhiteSpace>
<List renderHeader={() => '支付方式'} className='pay-type-list'>
{mockData.map(i => (
<RadioItem
thumb={<i className={`iconfont ${i.icon} ${payType === i.value ? 'checked' : ''}`}></i>}
key={i.value}
checked={payType === i.value}
onChange={() => this.onChange(i.value)}>
{
i.value === 2 ? (
<Flex direction='column' align='start' style={{width: '100%', marginTop: '6px'}}>
<Flex direction='row' justify='between'
style={{width: '100%', paddingRight: '30px'}}>
<span style={{color: '#555555', fontSize: '14px'}}>{i.label}</span>
{
checkPeriod ? (
<span style={{
color: '#333333',
fontSize: '12px'
}}>{`${singleMoney}元 × ${periodNumber}期`}</span>
) : null
}
</Flex>
<Flex justify='start'>
<span style={{color: '#999999', fontSize: '12px'}}>支付上限受限于您的花呗额度</span>
</Flex>
</Flex>
) : (i.label)
}
</RadioItem>
))}
</List>
<Flex>
<Flex.Item className={'agreement'}>
<Checkbox.AgreeItem onChange={this.changeAgreement}>
我已同意定金不退
</Checkbox.AgreeItem>
</Flex.Item>
</Flex>
{/*<div className='pay-tip'>请在15分钟内完成支付,否则届时系统将关闭该订单。</div>*/}
<div className={classnames(['pay-button', !agree && 'invalid'])} onClick={this.pay}>确认支付</div>
</div>
)
}
}
export default WithFullSize(PayOrder)
.pay-order {
width: 100%;
height: calc(100% - 44px);
background-color: #f5f5f5;
.order-number {
background-color: #fff;
span {
font-size: 15px;
color: #333333;
}
.number {
font-size: 12px;
color: #666666;
}
.money {
color: #ff3131;
}
}
.pay-type-list {
.am-list-body {
&::after {
display: none;
}
}
.am-list-header {
color: #333333;
font-size: 15px;
background-color: #fff;
}
.iconalipay {
font-size: 22px;
color: #01aaef;
}
.iconweixinzhifu {
font-size: 22px;
color: #3baf34;
}
.iconhuabei {
font-size: 22px;
color: #01aaef;
}
.am-radio-inner {
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #c1c1c1;
}
.am-radio-inner:after {
display: block;
border-color: #fff;
top: 0;
right: 6px;
}
.am-radio.am-radio-checked .am-radio-inner {
background-color: #009aff;
border-radius: 50%;
width: 20px;
height: 20px;
}
.am-radio.am-radio-checked .am-radio-inner:after {
display: block;
}
}
.agreement {
margin-top: 8px;
background: #fff;
.am-checkbox-agree{
.am-checkbox {
left: unset;
right: 6px;
}
.am-checkbox-agree-label{
margin-left: 3px;
}
}
}
.pay-tip {
width: 100%;
height: 30px;
line-height: 30px;
text-align: center;
font-size: 12px;
color: #ff3131;
background-color: #fff4ce;
}
.pay-button {
position: fixed;
bottom: 0;
width: 100%;
height: 44px;
line-height: 44px;
text-align: center;
color: #fff;
font-size: 18px;
background-color: #18b4ed;
z-index: 9;
&.invalid{
background: #BBB;
}
}
.check-staging {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, $alpha: 0.6);
z-index: 19;
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 300px;
border-radius: 6px;
background-color: #FFF;
padding-bottom: 10px;
.check-title {
color: #333333;
font-size: 16px;
text-align: center;
width: 100%;
height: 44px;
line-height: 44px;
border-bottom: 1px solid #DDDDDD;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
}
}
.am-list-item .am-list-line .am-list-extra {
flex-basis: 16%;
}
.am-radio-inner {
width: 20px;
height: 20px;
border-radius: 50%;
border: 1px solid #BFBFBF;
background-color: #fff;
}
.am-radio-inner:after {
display: block;
border-color: #fff;
top: 0;
right: 6px;
}
.am-radio.am-radio-checked .am-radio-inner {
background-color: #009aff;
border: 1px solid #FFF;
border-radius: 50%;
width: 20px;
height: 20px;
}
.am-radio.am-radio-checked .am-radio-inner:after {
display: block;
}
}
.order-info {
position: relative;
flex: 1;
.order-title {
font-size: 16px;
color: $color_333;
}
.order-content {
font-size: 14px;
color: $color_666;
margin-top: 14px;
line-height: 18px;
}
.order-des {
height: 24px;
line-height: 33px;
position: absolute;
bottom: 0;
.order-newprice {
font-size: 16px;
color: $redprice;
}
.order-price {
font-size: 12px;
color: $color_999;
margin-left: 15px;
text-decoration: line-through;
}
}
}
.v-list-item {
padding: 10px 15px;
background-color: #fff;
.content {
border: none;
padding-bottom: 0;
.cover {
flex: inherit;
width: 42.2%;
img {
width: 100%;
height: 100%;
}
.course-status {
background-color: rgba(224, 46, 36, 0.6);
}
}
.price-des {
color: #999;
font-size: 11px;
}
}
.info {
width: 52.3%;
position: relative;
display: block;
.title {
font-size: 16px;
color: $color_333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 16px;
line-height: 16px;
}
.contact {
font-size: 14px;
color: $color_666;
margin-top: 14px;
}
.des {
position: absolute;
bottom: 0;
.course-price {
.price {
color: $red;
font-size: 12px;
}
.new {
color: $red;
font-size: 16px;
}
.old {
color: $color_999;
font-size: 12px;
display: inline-block;
margin-left: 15px;
text-decoration: line-through;
}
}
.isbuy {
display: inline-block;
width: 61px;
height: 18px;
background-color: $bg_active;
border-radius: 9px;
color: $white;
font-size: 12px;
text-align: center;
line-height: 18px;
}
}
}
}
}
import React, { Component } from 'react'
import { Checkbox, Flex, List, Radio, Toast, WhiteSpace, WingBlank } from 'antd-mobile'
import { browser, getParam, http, is_weixin } from '@/utils'
import { HeaderBar } from '@common/index'
import VlistBase from '@/common/v-list-base'
import './index.scss'
import { WithFullSize } from '@/HOCs'
import { Link } from "react-router-dom"
import app from "@/utils/app"
const RadioItem = Radio.RadioItem
const Item = Flex.Item
function OrderList({courses, toggleSelectedCourse}) {
return (
<Flex wrap={'wrap'}>
{courses.length && courses.map(course => {
const {image_name: img, course_id, coupon_desc, coupon_num} = course
const info = (
<div className="info">
<div className="title">{course.course_title}</div>
<div className="des">
<div className={'deposit-discount'}>
定金折扣:<span className={'price'}>-¥{course.deduction_amount}</span>
</div>
{
course.coupon_amount != 0 &&
<div className={'coupon-amount'}>
使用优惠券:<span className={'price'}>-¥{course.coupon_amount}</span>
</div>
}
</div>
<div className="prices">
<span className={'sale-price price'}>¥{course.sale_price}</span>
<span className={'former-price'}>¥{course.price1}</span>
</div>
</div>
)
return (
<React.Fragment key={course.course_id}>
<Item className={'order-item'}>
<Flex className="select-bar" justify={'between'}>
<Item>
<Checkbox defaultChecked onChange={() => {
toggleSelectedCourse(course)
}}/>
</Item>
<Item className={'final-payment-hint'}>
待付尾款
</Item>
</Flex>
<VlistBase img={img}
handleClick={() => {
}}
info={info}
/>
</Item>
<div className="order-prefer">
<List key={course_id}>
<List.Item
arrow="horizontal"
onClick={() => {
}}
>
<Link to={{
pathname: `/coupons`,
search: `?id=${course_id}`,
state: {
from: '/order'
}
}}>
<Flex justify='between'>
<span
style={{
color: '#333',
fontSize: '15px'
}}
>优惠券</span>
<span
style={{
fontSize: '14px',
color: '#999999'
}}
>
{!coupon_desc ? (coupon_num === 0 ? '无' : `${coupon_num}张可用`) : (coupon_desc)}
</span>
</Flex>
</Link>
</List.Item>
</List>
</div>
</React.Fragment>
)
})}
</Flex>
)
}
let mockData = []
if (browser.isWeixin) {
mockData = [
{value: 1, label: '微信支付', icon: 'iconweixinzhifu'}
]
} else {
mockData = [
{value: 1, label: '微信支付', icon: 'iconweixinzhifu'},
{value: 0, label: '支付宝', icon: 'iconalipay'},
]
}
class FinalDepositOrder extends Component {
constructor(props) {
super(props)
this.state = {
pay_amount: 0,
payType: 1,
stageNumber: 0,
orderId: getParam('oid'),
categoryList: [],
selectedCourses: [],
salePrice: '',
user_account: '',
useBalance: false,
info: false,
order_id: '',
moneyOffRules: [],
finalEndTime: '',
offset: 0,
appliedMoneyOffRule: {}
}
}
onChange = (value) => {
this.setState({
payType: value,
checkPeriod: false,
})
if (value === 2) {
this.setState({
huabei: true,
})
}
}
// 确定购买
pay = () => {
const {payType, order_id} = this.state
if (payType === 0) {
this.alipayPay(order_id)
} else if (payType === 1) {
this.weixinPay(order_id)
}
}
//提交
submit = () => {
this.createOrder().then(res => {
if (res.data.errno == 200) {
this.setState({
order_id: res.data.data.order_id
}, () => {
if (res.data.data.pay_jump === 1) {
this.props.history.push('/purchased')
} else {
this.pay()
}
})
} else {
Toast.info(res.data.msg)
}
})
}
//创建订单
createOrder = () => {
const {selectedCourses, salePrice, useBalance, user_account} = this.state
return http.post(`${API["base-api"]}/m/deposit/final/create`, {
course_ids: selectedCourses.map(item => item.course_id),
cut_amount: 0,
pay_amount: salePrice,
is_deduction: useBalance ? 1 : 0,
deduction_amount: useBalance ? this.getBalanceOffset() : 0,
plat_form: 5,
source: getParam('source')
})
}
// 微信支付
weixinPay = (orderId) => {
// 微信内部-支付
if (is_weixin()) {
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"
} else {
// 微信外部-支付
http.get(`${API['base-api']}/pay/wxpay/wap_charge/oid/${orderId}`).then((res) => {
if (res.data.errno === 0) {
window.location.href = res.data.data.url + "&redirect_url=" + encodeURIComponent(window.location.href + "&weixinpay=1").toLowerCase()
} else {
Toast.info(res.data.msg, 2)
}
})
}
}
// 微信内部支付
isweixinPay = () => {
let _this = this
let weixin_code = getParam('code')
if (weixin_code) {
if (getParam('oid') === undefined) {
return
} else {
http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => {
if (res.data.errno === 0) {
let data = res.data.data
function onBridgeReady() {
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
appId: data.appId, //公众号名称,由商户传入
timeStamp: data.timeStamp, //时间戳,自1970年以来的秒数
nonceStr: data.nonceStr, //随机串
package: data.package,
signType: data.signType, //微信签名方式:
paySign: data.paySign //微信签名
},
function (res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
Toast.info('支付成功', 2)
_this.intervalPayStatus = setInterval(function () {
http.get(`${API['base-api']}/m/orderState/oid/${getParam('oid')}`).then(res => {
if (res.data.errno === 401) {
clearInterval(_this.intervalPayStatus)
_this.intervalPayStatus = null
_this.props.history.replace(`/expand/callback?order_id=${getParam('oid')}`)
}
})
}, 1000)
} else {
alert('支付失败')
}
}
)
}
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false)
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', onBridgeReady)
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady)
}
} else {
onBridgeReady()
}
} else {
Toast.info(res.data.msg, 2)
}
})
}
}
}
// 支付完成之后获取状态
payCallback = () => {
const _this = this
// 支付回调
// 定时器轮训获取订单状态
_this.intervalPayStatus = setInterval(function () {
http.get(`${API['base-api']}/m/orderState/oid/${getParam('oid')}`).then(res => {
if (res.data.errno === 401) {
clearInterval(_this.intervalPayStatus)
_this.intervalPayStatus = null
window.location.href = '/expand/callback?order_id=' + getParam('oid')
}
})
}, 1000)
}
// 支付宝支付
alipayPay = (orderId) => {
http.get(`${API['base-api']}/pay/alipay/wap_charge_new/oid/${orderId}`).then((res) => {
if (res.data.errno === 0) {
this.payCallback()
window.location = res.data.data.url
} else {
Toast.info(res.data.msg, 2)
}
})
}
componentDidMount() {
if (getParam('weixinpay')) {
this.payCallback()
}
if (browser.isWeixin) {
this.isweixinPay(getParam('oid'))
}
http.get(`${API["base-api"]}/m/deposit/final/preorder`)
.then(res => {
const {data} = res
if (data.errno == 200) {
this.setState({
categoryList: [...data.data.courses],
salePrice: this.getTotalPrice({
courses: [...data.data.courses],
moneyOffRules: data.data['full_rule']
}),
selectedCourses: [...data.data.courses],
user_account: data.data.user_account,
moneyOffRules: data.data['full_rule'],
finalEndTime: data.data['final_end_time']
})
} else {
Toast.info(data.msg)
}
})
}
// 展示余额抵扣规则
showInfo = () => {
this.setState((prevState) => ({
info: !prevState.info
}))
}
toggleSelectedCourse = course => {
this.setState(prevState => {
const {selectedCourses} = prevState
let index = prevState.selectedCourses.findIndex(item => item.course_id == course.course_id)
if (index == -1) {
selectedCourses.push(course)
} else {
selectedCourses.splice(index, 1)
}
let totalPrice = this.getTotalPrice(selectedCourses)
return {selectedCourses, salePrice: totalPrice, offset: this.getBalanceOffset(totalPrice)}
})
}
//获取支付价格
getTotalPrice = (
{
courses = this.state.selectedCourses,
useBalance = this.state.useBalance,
moneyOffRules = this.state.moneyOffRules
} = {}
) => {
let totalPrice = this.getOriginTotalPrice({courses})
totalPrice = this.moneyOff(totalPrice, moneyOffRules)
if (useBalance) {
totalPrice -= parseFloat(this.state.user_account)
}
return totalPrice < 0 ? 0 : totalPrice.toFixed(2)
}
//满减计算
moneyOff = (totalPrice, moneyOffRules = this.state.moneyOffRules) => {
let rules = moneyOffRules.sort((a, b) => b.full_amount - a.full_amount)
let result = parseFloat(totalPrice)
for (let i = 0; i < rules.length; i++) {
let rule = rules[i]
if (result >= rule.full_amount) {
this.setState({
appliedMoneyOffRule: rule
})
return result - parseFloat(rule.cut_amount)
}
}
return result
}
//使用余额
useBalance = () => {
this.setState(prevState => {
const useBalance = !prevState.useBalance
let totalPrice = this.getTotalPrice({useBalance})
return {
useBalance,
salePrice: totalPrice,
offset: this.getBalanceOffset(totalPrice)
}
})
}
getOriginTotalPrice = ({courses = this.state.selectedCourses} = {}) => {
return courses.reduce((accu, item) => {
return accu + parseFloat(item['sale_price'])
}, 0)
}
getBalanceOffset = () => {
let originalTotalPrice = this.getOriginTotalPrice()
let offset = parseFloat(this.state.user_account) - parseFloat(originalTotalPrice)
offset = offset >= 0 ? originalTotalPrice : this.state.user_account
return offset
}
render() {
const {
orderId,
salePrice,
payType,
categoryList,
user_account,
useBalance,
info,
finalEndTime,
offset,
appliedMoneyOffRule
} = this.state
return (
<div className='deposit-pay-order'>
<HeaderBar title='课程报名' arrow={true}></HeaderBar>
<WhiteSpace size='sm'></WhiteSpace>
{/*<div className='order-number'>
<WingBlank>
<Flex justify='between' align='center' style={{height: '44px'}}>
<span>订单号</span>
<span className='number'>{orderId}</span>
</Flex>
</WingBlank>
</div>*/}
<WhiteSpace size='md'></WhiteSpace>
<div className={'order-list'}>
<OrderList courses={categoryList}
toggleSelectedCourse={this.toggleSelectedCourse}
/>
</div>
<div className="order-balance">
<List>
<Item
className="order-prefer-text"
>
<Flex justify='between'>
<Flex align='center'>
<span>余额抵扣</span>
<span className="order-balanceprice"> (余额: <i
className="order-money">{`${user_account}元`}</i>)</span>
<i className="iconfont iconiconfront-22 question-mark" onClick={this.showInfo}></i>
</Flex>
<Flex>
{
useBalance ? (
<>
<span style={{
color: '#FF2121',
fontSize: '15px',
marginRight: "6px"
}}>{`-¥${offset}`}</span>
<i className={`iconfont icondanseshixintubiao-5 balance-used`}
onClick={this.useBalance}></i>
</>
) : (
<i className='circle-icon' onClick={this.useBalance}></i>
)
}
</Flex>
</Flex>
</Item>
</List>
</div>
<WhiteSpace size='md'></WhiteSpace>
<div className='order-number'>
<WingBlank>
<Flex justify='between' align='center' style={{height: '44px'}}>
<span>支付金额</span>
<span className='money'>{`¥${salePrice}`}</span>
</Flex>
</WingBlank>
</div>
<WhiteSpace/>
{
appliedMoneyOffRule.full_amount &&
<div className="money-off">
<WingBlank>
<Flex justify='end' align='center' style={{height: '44px'}}>
<span>{appliedMoneyOffRule.full_amount}{appliedMoneyOffRule.cut_amount}</span>
<span className='money'>{`-¥${appliedMoneyOffRule.cut_amount}`}</span>
</Flex>
</WingBlank>
</div>
}
<WhiteSpace size='md'></WhiteSpace>
<List renderHeader={() => '支付方式'} className='pay-type-list'>
{mockData.map(i => (
<RadioItem
thumb={<i className={`iconfont ${i.icon} ${payType === i.value ? 'checked' : ''}`}></i>}
key={i.value}
checked={payType === i.value}
onChange={() => this.onChange(i.value)}>
{i.label}
</RadioItem>
))}
</List>
<div className='pay-tip'>{`${finalEndTime}结束支付尾款`}</div>
<div className='pay-button' onClick={this.submit}>确认支付</div>
{
info ? (
<div style={{
position: 'fixed',
top: 0,
left: 0,
width: '100%',
height: '100%',
backgroundColor: 'rgba(0, 0, 0, 0.8)',
zIndex: '99'
}}>
<div style={{
padding: '20px',
backgroundColor: '#FFF',
width: '300px',
height: '170px',
margin: '0 auto',
position: 'absolute',
left: '50%',
top: '50%',
transform: 'translate(-50%, -50%)'
}}>
<Flex direction='column' justify='between' align='center' style={{height: '100%'}}>
<p style={{fontSize: '16px', color: '#333333'}}>余额抵扣说明</p>
<p style={{
lineHeight: '20px',
fontSize: '13px',
color: '#666666'
}}>分销课程或者参与七月在线的相关活动,可获得资金奖励。账户资金可直接提现,也可抵扣课程费用。</p>
<div onClick={this.showInfo} style={{
width: '260px',
height: '30px',
lineHeight: '30px',
textAlign: 'center',
borderRadius: '3px',
border: '1px solid #0099FF',
color: '#0099FF',
fontSize: '15px'
}}>知道了
</div>
</Flex>
</div>
</div>
) : null
}
</div>
)
}
}
export default WithFullSize(FinalDepositOrder)
.deposit-pay-order {
width: 100%;
background-color: #f5f5f5;
box-sizing: content-box;
padding-bottom: 44px;
.order-number {
background-color: #fff;
span {
font-size: 15px;
color: #333333;
}
.number {
font-size: 12px;
color: #666666;
}
.money {
color: #ff3131;
}
}
.money-off{
font-size: 14px;
background: #fff;
color: #999;
.money{
color: #FF3131;
}
}
.pay-type-list {
.am-list-body {
&::after {
display: none;
}
}
.am-list-header {
color: #333333;
font-size: 15px;
background-color: #fff;
}
.iconalipay {
font-size: 22px;
color: #01aaef;
}
.iconweixinzhifu {
font-size: 22px;
color: #3baf34;
}
.iconhuabei {
font-size: 22px;
color: #01aaef;
}
.am-radio-inner {
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #c1c1c1;
}
.am-radio-inner:after {
display: block;
border-color: #fff;
top: 0;
right: 6px;
}
.am-radio.am-radio-checked .am-radio-inner {
background-color: #009aff;
border-radius: 50%;
width: 20px;
height: 20px;
}
.am-radio.am-radio-checked .am-radio-inner:after {
display: block;
}
}
/*.agreement {
margin-top: 8px;
background: #fff;
.am-checkbox-agree{
.am-checkbox {
left: unset;
right: 6px;
}
.am-checkbox-agree-label{
margin-left: 3px;
}
}
}*/
.price {
color: #FF3131;
margin-right: 10px;
font-size: 12px;
&.sale-price {
font-size: 15px;
}
}
.former-price {
text-decoration: line-through;
color: #999;
}
.pay-tip {
width: 100%;
padding: 21px;
text-align: center;
font-size: 12px;
color: #ff3131;
}
.pay-button {
position: fixed;
bottom: 0;
width: 100%;
height: 44px;
line-height: 44px;
text-align: center;
color: #fff;
font-size: 18px;
background-color: #18b4ed;
z-index: 9;
}
.check-staging {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, $alpha: 0.6);
z-index: 19;
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 300px;
border-radius: 6px;
background-color: #FFF;
padding-bottom: 10px;
.check-title {
color: #333333;
font-size: 16px;
text-align: center;
width: 100%;
height: 44px;
line-height: 44px;
border-bottom: 1px solid #DDDDDD;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
}
}
.am-list-item .am-list-line .am-list-extra {
flex-basis: 16%;
}
.am-radio-inner {
width: 20px;
height: 20px;
border-radius: 50%;
border: 1px solid #BFBFBF;
background-color: #fff;
}
.am-radio-inner:after {
display: block;
border-color: #fff;
top: 0;
right: 6px;
}
.am-radio.am-radio-checked .am-radio-inner {
background-color: #009aff;
border: 1px solid #FFF;
border-radius: 50%;
width: 20px;
height: 20px;
}
.am-radio.am-radio-checked .am-radio-inner:after {
display: block;
}
}
.select-bar {
background: #fff;
padding: 11px 15px;
border-bottom: 1px solid #E5E5E5;
.am-flexbox-item {
flex: 0 1 auto;
}
.final-payment-hint {
padding: 4px 6px 5px;
background: $bg-active;
border-radius: 3px;
color: #fff;
}
}
.order-item {
}
.v-list-base-item {
padding: 10px 15px;
background-color: #fff;
.content {
border: none;
padding-bottom: 0;
.cover {
flex: inherit;
width: 42.2%;
img {
width: 100%;
height: 100%;
}
.course-status {
background-color: rgba(224, 46, 36, 0.6);
}
}
.price-des {
color: #999;
font-size: 11px;
}
}
.info {
width: 52.3%;
position: relative;
.title {
font-size: 15px;
color: $color_333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 16px;
line-height: 16px;
margin-bottom: 16px;
}
.contact {
font-size: 14px;
color: $color_666;
margin-top: 14px;
}
.des {
color: #999;
.course-price {
.price {
color: $red;
font-size: 12px;
}
.new {
color: $red;
font-size: 16px;
}
.old {
color: $color_999;
font-size: 12px;
display: inline-block;
margin-left: 15px;
text-decoration: line-through;
}
}
.isbuy {
display: inline-block;
width: 61px;
height: 18px;
background-color: $bg_active;
border-radius: 9px;
color: $white;
font-size: 12px;
text-align: center;
line-height: 18px;
}
}
& .prices:last-child {
position: absolute;
bottom: 0;
}
}
}
//order.scss
.order-balance {
height: 44px;
line-height: 44px;
padding: 0 15px;
background: #fff;
.am-list-item {
padding-left: 0 !important;
}
.am-list-line {
padding: 0 15px;
}
.am-list-content {
color: $color_333;
font-size: $font_16;
.iconiconfront-22 {
font-size: 18px;
margin-left: 15px;
}
}
.order-balanceprice {
color: $color_666;
font-size: $font_12;
.order-money {
color: #ff2121;
font-size: $font_12 !important;
font-weight: normal;
font-style: inherit;
vertical-align: middle;
margin: 0;
}
}
.iconiconfront-22.question-mark {
font-size: 24px;
margin-left: 15px;
}
.am-list-body {
&::before, &::after {
display: none;
}
}
.balance-used {
font-size: 24px;
color: #0099FF;
}
.circle-icon {
width: 20px;
height: 20px;
border: 1px solid #BFBFBF;
border-radius: 50%;
margin-right: 2px;
}
}
.order-prefer {
width: 100%;
margin-bottom: 6px;
.am-list-body {
&::after {
display: none;
}
}
.am-list-content {
font-size: 15px !important;
}
}
.order-list{
.am-flexbox-item{
margin-left: 0;
}
}
/*.order-tab {
color: $black;
background: $bg_f7f9fc;
}
.order-information {
display: flex;
width: 100%;
overflow: hidden;
padding: 29px 15px;
color: $color_555;
background-color: $bg_fff;
position: relative;
}
.order-information::before {
content: '';
left: 0;
right: 0;
bottom: 0;
height: 2px;
position: absolute;
background: -webkit-repeating-linear-gradient(135deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
background: repeating-linear-gradient(-45deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
background-size: 80px;
}
.order-information2 {
height: 80px;
background-color: #FFF;
margin-top: 8px;
position: relative;
.user-icon {
font-size: 28px;
flex-basis: 40px;
}
.order-cell {
height: 50px;
font-size: 13px;
color: $color_333;
line-height: 20px;
flex: 1 1 auto;
.name {
margin-bottom: 10px;
}
}
}
.order-information2::before {
content: '';
left: 0;
right: 0;
bottom: 0;
height: 2px;
position: absolute;
background: -webkit-repeating-linear-gradient(135deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
background: repeating-linear-gradient(-45deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
background-size: 80px;
}
.order-addsize {
font-size: 22px !important;
margin-bottom: 0px;
height: 22px;
color: $active;
line-height: 22px;
}
.order-next {
line-height: 22px;
margin-bottom: 0px;
}
.order-list {
margin-top: 8px;
background-color: #F5F5F5;
.public-content {
padding: 10px 15px;
}
}
.order-infotext {
flex: 1;
height: 22px;
line-height: 22px;
margin-left: 10px;
font-size: $font_14;
color: $color_555;
}
.order-info {
color: $color_666;
font-size: $font_14;
min-width: 160px;
flex: 1 1 auto;
display: flex;
flex-direction: column;
justify-content: space-around;
.order-title {
color: $color_333;
font-size: $font_16;
}
.order-content {
color: $color_666;
font-size: $font_14;
line-height: 18px;
}
.order-newprice {
color: $redprice;
font-size: $font_16;
margin-right: 15px;
}
.order-price {
color: $color_999;
font-size: $font_12;
text-decoration: line-through;
}
}
.order-bar {
width: 100%;
position: fixed;
bottom: 0;
z-index: 2;
height: 50px;
display: flex;
font-size: 14px;
align-items: center;
background-color: $bg_fff;
}
.order-course {
margin-left: 20px;
.order-course-text {
font-size: $font_16;
color: $color_333;
}
}
.order-bar-text {
flex: 1;
text-align: right;
color: #323233;
padding-right: 20px;
.order-amount {
font-size: $font_14;
color: $color_333;
.order-amount-price {
color: $redprice;
}
}
.order-preprice {
font-size: $font_12;
color: $color_555;
}
}
.order-button {
width: 110px;
height: 50px;
display: inline-block;
padding: 0;
background-color: $bg_ff9898;
color: $white;
line-height: 48px;
font-size: 16px;
border-radius: 0px;
text-align: center;
box-sizing: border-box;
-webkit-appearance: none;
-webkit-text-size-adjust: 100%;
border: 1px solid transparent;
}
.has-info {
background-color: #FF3131;
}
.am-list-item .am-list-line .am-list-content {
color: $color_333;
}
.order-list {
.am-list-item {
padding-left: 0 !important;
}
}
*/
}
......@@ -120,6 +120,8 @@ class Order extends Component {
orderList: [],
info: false,
offset: 0,
full_amount: 0, // 满金额
cut_amount: 0, // 减金额
};
}
// 提交订单
......@@ -267,6 +269,12 @@ class Order extends Component {
discount,
});
};
fullRules = (data) => {
this.setState({
full_amount: data.full_amount,
cut_amount: data.cut_amount,
});
};
// 公共方法 本地存储
publicLocalStorage = () => {
if(this.props.history.action === 'PUSH') {
......@@ -300,8 +308,11 @@ class Order extends Component {
// 普通课程立即报名 不带 type = 1
http.get(`${API['base-api']}/m/order/preorder`).then(res => {
if(res.data.errno === 200) {
console.log(res.data.data);
this.publicGetData(res.data.data);
this.publicLocalStorage();
this.fullRules(res.data.data);
}else{
Toast.info(res.data.msg, 2);
}
......@@ -407,7 +418,9 @@ class Order extends Component {
useBalance,
info,
offset,
groupPrice
groupPrice,
full_amount,
cut_amount,
} = this.state;
return (
......@@ -495,6 +508,20 @@ class Order extends Component {
</Item>
</List>
</div>
{
(full_amount > 0 && cut_amount > 0) ? (
<>
<div className="full__rules">
<WingBlank>
<div className="money__off">
<span>{full_amount}{cut_amount}</span>
<span className='money'>{`-¥${cut_amount}`}</span>
</div>
</WingBlank>
</div>
</>
) : (null)
}
<div className="order-bar">
<div className="order-course">
<span className="order-course-text">{`${orderList.length}门课程`}</span>
......@@ -545,4 +572,4 @@ class Order extends Component {
}
export default Order;
\ No newline at end of file
export default Order;
......@@ -265,7 +265,8 @@
.order-balance {
height: 44px;
line-height: 44px;
margin: 8px 0 50px 0;
margin: 8px 0 8px 0;
display: flow-root;
.am-list-item {
padding-left: 0 !important;
......@@ -282,4 +283,23 @@
}
}
}
.full__rules {
width: 100%;
height: 50px;
margin-top: 16px;
background: #FFF;
font-size: 14px;
background: #fff;
color: #999;
.money__off {
height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
}
.money{
color: #FF3131;
}
}
}
\ No newline at end of file
import loadable from '@loadable/component'
import Index from '@/components/Index';
import My from '@/components/my';
import Passport from '@/components/passport';
import Scholarship from '@/components/scholarship';
import Index from '@/components/Index'
import My from '@/components/my'
import Passport from '@/components/passport'
import Scholarship from '@/components/scholarship'
const Coupons = loadable(() => import(/* webpackChunkName: 'coupons'*/ '@/components/coupons'))
const Study = loadable(() => import(/* webpackChunkName: 'study'*/'@/components/study'))
......@@ -31,6 +31,8 @@ const CampTest = loadable(() => import(/* webpackChunkName: 'Classify'*/'@/compo
const CampResolve = loadable(() => import(/* webpackChunkName: 'Classify'*/'@/components/video/camp/campResolve'))
const ShareCourse = loadable(() => import(/* webpackChunkName: 'ShareCourse'*/'@/components/ShareCourse/index'))
const Country = loadable(() => import(/* webpackChunkName: 'Country' */'@/components/country/index'))
const ExpandCallback = loadable(() => import('@/components/expand/callback'))
const ExpandShare = loadable(() => import('@/components/expand/share'))
export default [
{
path: '/',
......@@ -181,4 +183,29 @@ export default [
path: '/prize-winner-list',
component: loadable(() => import(/* webpackChunkName: 'prize-winner-list' */'@/components/activity/prize-winner-list'))
},
//定金订单页面
{
path: '/deposit-order',
component: loadable(() => import(/* webpackChunkName: 'deposit-order' */ '@components/order/deposit/deposit-order'))
},
//定金支付页面
{
path: '/deposit-pay-order',
component: loadable(() => import(/* webpackChunkName: 'deposit-pay-order' */ '@components/order/deposit/deposit-pay-order'))
},
//尾款支付页面
{
path: '/final-deposit-order',
component: loadable(() => import(/* webpackChunkName: 'deposit-pay-order' */ '@components/order/deposit/final-order'))
},
// 定金支付之后
{
path: '/expand/callback',
component: ExpandCallback
},
// 定金-邀请好友助力
{
path: '/expand/index',
component: ExpandShare
},
]
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