Commit 2b26e2bf by zhanghaozhe

redux action

parent 2717c336
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{769:function(t,e,a){},770:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAMAAADNlS1EAAAA+VBMVEUAAADeP03XQVEDmP38MjMGl/rSQ1Uhi+QJlfj9MjIsh9sGl/o6gtD/MTEYj+zoOkTxNzw6gtAIlvn8MjNQeL+wUXGAZZgnieCAZJg3g9LJSF0rh9x5aJ6HYpPfPktDfsm8TGhec7ShV3wNk/PxNjxdc7ShV3y7TGdDfskgi+XePkt4Z52GYpM2g9PIR10Ok/PxNjyUXYdrbajoOkQXkOwXkOzoO0M3g9LJR13UQ1TePksXkO0Nk/Qhi+QshtzePkzxNjz5MzbnO0RqbamUXIivUXI2g9NDfslQeL9dc7R4aJ6GYpKiV328TGfJR13UQlPoOkNQeb7pOkQ6pR5tAAAAO3RSTlMABo85Of3w7JGRjO7u7u3t7ZGDg09PMBUV+vrz7+/q397X18/Pv7+1tKSjmZh9fHd2cnFmZTQ0KCgbEL1XwbEAAADqSURBVBjTXZHlssIwFAZpqVDc4bq7+wXa4nUB3v9h+HKAYZL9k52dZJI5yfBk61m2SEapZEi7pqoqq8YYNLbxyjTNN6zVEahu2vcA/EAqE1Ch1tEty3pgJg+BTDFv2/ZRhy6SNU2mi/4OHMd5yfDcu657JrSm5y29phAvfN+/EdrnFLT51j0OguBJ2PgchuFJl2/tGfgQNt5GUXQp8a01By2+SedxHN8Jh1+TJDn8J60VizWSnpam6W4mIM/sEXM67VPULaBDfieLxeoLAsoDUIa8Y/TX2+fkTFCHKPgkhRWqhUKORGlQ27MGJhAis32Nv3oAAAAASUVORK5CYII="},786:function(t,e,a){"use strict";a.r(e);a(43);var s=a(14),c=a.n(s),n=a(7),i=a(8),l=a(10),m=a(9),o=a(11),d=a(0),r=a.n(d),p=a(72),A=(a(769),a(3)),h=a(16),u=a(37),g=a(87),E=function(t){function e(t){var a;return Object(n.a)(this,e),(a=Object(l.a)(this,Object(m.a)(e).call(this,t))).state={camp:[],employment:[],basics:[],advanced:[],special:[],isLoading:!0},a}return Object(o.a)(e,t),Object(i.a)(e,[{key:"componentDidMount",value:function(){var t=this;A.d.get("".concat(A.a.home,"/m/course/classify/").concat(1)).then(function(e){200===e.data.code?(t.setState({isLoading:!1}),e.data.data.common.length>0&&t.setState({basics:e.data.data.common[0],advanced:e.data.data.common[1]}),e.data.data.special.length>0&&t.setState({camp:e.data.data.special[0],employment:e.data.data.special[1],special:e.data.data.special[2]})):c.a.info(e.data.msg,2)})}},{key:"render",value:function(){return r.a.createElement("div",{className:"class-box"},r.a.createElement(u.e,{title:"\u5206\u7c7b",arrow:!1,cart:!1}),r.a.createElement(g.a,{isLoading:this.state.isLoading},r.a.createElement(N,{data:this.state.camp.list,title:this.state.camp.name,type:1}),r.a.createElement(N,{data:this.state.employment.list,title:this.state.employment.name,type:1}),r.a.createElement(N,{data:this.state.basics.list,title:this.state.basics.name,type:2}),r.a.createElement(N,{data:this.state.advanced.list,title:this.state.advanced.name,type:2}),r.a.createElement("div",{className:"vip"},this.state.special.list&&this.state.special.list.length>0&&this.state.special.list.map(function(t,e){return r.a.createElement(h.b,{key:e,to:"/detail?id=".concat(t.course_id)},r.a.createElement("img",{src:t.course_img,alt:""}))}))))}}]),e}(d.Component);function f(t){var e=t.data;return r.a.createElement("div",{className:"items-box"},e&&e.length>0&&e.map(function(t,e){return r.a.createElement(h.b,{to:"/detail?id=".concat(t.course_id),key:e,className:"item-banner"},r.a.createElement("img",{src:t.course_img,alt:""}))}))}function b(t){return r.a.createElement("div",{className:"items-box"},t.data&&t.data.length>0&&t.data.map(function(t,e){return r.a.createElement(h.b,{to:"/courselist?id=".concat(t.c_id,"&name=").concat(t.c_name),key:e,className:"item-label"},t.c_name)}))}function N(t){return r.a.createElement("div",{className:"class-course"},r.a.createElement("p",{className:"course-items-title"},r.a.createElement("img",{src:a(770),alt:""}),t.title),1===t.type&&r.a.createElement(f,{data:t.data}),2===t.type&&r.a.createElement(b,{data:t.data}))}e.default=Object(p.b)(E)}}]);
//# sourceMappingURL=Classify.bf48773a.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/classify/image/tips.png","components/classify/index.js"],"names":["module","exports","Classify","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","state","camp","employment","basics","advanced","special","isLoading","_this2","http","get","concat","api","home","then","res","data","code","setState","common","length","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_12__","title","arrow","cart","_common_Loading__WEBPACK_IMPORTED_MODULE_13__","ClassCourseBox","list","name","type","map","item","index","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","key","to","course_id","src","course_img","alt","Component","ClassCourseA","_ref","ClassCourseB","c_id","c_name","require","WithTab"],"mappings":"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","file":"static/js/Classify.bf48773a.chunk.js","sourcesContent":["module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAMAAADNlS1EAAAA+VBMVEUAAADeP03XQVEDmP38MjMGl/rSQ1Uhi+QJlfj9MjIsh9sGl/o6gtD/MTEYj+zoOkTxNzw6gtAIlvn8MjNQeL+wUXGAZZgnieCAZJg3g9LJSF0rh9x5aJ6HYpPfPktDfsm8TGhec7ShV3wNk/PxNjxdc7ShV3y7TGdDfskgi+XePkt4Z52GYpM2g9PIR10Ok/PxNjyUXYdrbajoOkQXkOwXkOzoO0M3g9LJR13UQ1TePksXkO0Nk/Qhi+QshtzePkzxNjz5MzbnO0RqbamUXIivUXI2g9NDfslQeL9dc7R4aJ6GYpKiV328TGfJR13UQlPoOkNQeb7pOkQ6pR5tAAAAO3RSTlMABo85Of3w7JGRjO7u7u3t7ZGDg09PMBUV+vrz7+/q397X18/Pv7+1tKSjmZh9fHd2cnFmZTQ0KCgbEL1XwbEAAADqSURBVBjTXZHlssIwFAZpqVDc4bq7+wXa4nUB3v9h+HKAYZL9k52dZJI5yfBk61m2SEapZEi7pqoqq8YYNLbxyjTNN6zVEahu2vcA/EAqE1Ch1tEty3pgJg+BTDFv2/ZRhy6SNU2mi/4OHMd5yfDcu657JrSm5y29phAvfN+/EdrnFLT51j0OguBJ2PgchuFJl2/tGfgQNt5GUXQp8a01By2+SedxHN8Jh1+TJDn8J60VizWSnpam6W4mIM/sEXM67VPULaBDfieLxeoLAsoDUIa8Y/TX2+fkTFCHKPgkhRWqhUKORGlQ27MGJhAis32Nv3oAAAAASUVORK5CYII=\"","import React, {Component} from 'react';\nimport {WithTab} from '@/HOCs'\nimport './index.scss';\nimport {http, api} from \"@/utils\";\nimport {Link} from 'react-router-dom'\nimport {Toast} from 'antd-mobile'\nimport {HeaderBar} from \"@/common\"\nimport Loading from '@/common/Loading'\n\n\nclass Classify extends Component {\n constructor(props) {\n super(props)\n this.state = {\n camp: [],\n employment: [],\n basics: [],\n advanced: [],\n special: [],\n isLoading: true\n }\n }\n\n componentDidMount() {\n let data = 1\n http.get(`${api.home}/m/course/classify/${data}`,).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n isLoading: false\n })\n\n if (res.data.data.common.length > 0) {\n this.setState({\n basics: res.data.data.common[0],\n advanced: res.data.data.common[1],\n })\n }\n if (res.data.data.special.length > 0) {\n this.setState({\n camp: res.data.data.special[0],\n employment: res.data.data.special[1],\n special: res.data.data.special[2],\n })\n }\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n\n render() {\n return (\n <div className='class-box'>\n <HeaderBar title='分类' arrow={false} cart={false}></HeaderBar>\n <Loading isLoading={this.state.isLoading}>\n <ClassCourseBox data={this.state.camp.list} title={this.state.camp.name} type={1}/>\n <ClassCourseBox data={this.state.employment.list} title={this.state.employment.name} type={1}/>\n <ClassCourseBox data={this.state.basics.list} title={this.state.basics.name} type={2}/>\n <ClassCourseBox data={this.state.advanced.list} title={this.state.advanced.name} type={2}/>\n <div className=\"vip\">\n {this.state.special.list && this.state.special.list.length > 0 && this.state.special.list.map((item, index) => {\n return (\n <Link key={index} to={`/detail?id=${item.course_id}`}>\n <img src={item.course_img} alt=\"\"/>\n </Link>\n )\n })\n }\n </div>\n </Loading>\n </div>\n )\n }\n}\n\n// 课程图片形式展示 点击图片直接跳转课程详情页面\nfunction ClassCourseA({data}) {\n return (\n <div className='items-box'>\n {\n data && data.length > 0 && data.map((item, index) => {\n return (\n <Link to={`/detail?id=${item.course_id}`} key={index} className='item-banner'><img\n src={item.course_img} alt=\"\"/></Link>\n )\n })\n }\n </div>\n )\n}\n\n// 课程标签的形式展示 点击标签跳转分类详情页面\nfunction ClassCourseB(props) {\n return (\n <div className='items-box'>\n {\n props.data && props.data.length > 0 && props.data.map((item, index) => {\n return (\n <Link to={`/courselist?id=${item.c_id}&name=${item.c_name}`} key={index} className='item-label'>\n {item.c_name}\n </Link>\n )\n })\n }\n </div>\n )\n}\n\nfunction ClassCourseBox(props) {\n return (\n <div className=\"class-course\">\n <p className='course-items-title'>\n <img src={require('./image/tips.png')} alt=\"\"/>\n {props.title}\n </p>\n {props.type === 1 &&\n <ClassCourseA data={props.data}/>\n }\n {props.type === 2 &&\n <ClassCourseB data={props.data}/>\n }\n </div>\n )\n}\n\nexport default WithTab(Classify);\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{715:function(e,a,t){},779:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return b});t(86);var n=t(23),c=t.n(n),l=(t(151),t(33)),s=t.n(l),i=(t(152),t(74)),r=t.n(i),m=t(7),o=t(8),d=t(10),p=t(9),E=t(11),u=t(0),N=t.n(u),v=(t(715),t(96)),b=function(e){function a(e){return Object(m.a)(this,a),Object(d.a)(this,Object(p.a)(a).call(this,e))}return Object(E.a)(a,e),Object(o.a)(a,[{key:"render",value:function(){return N.a.createElement("div",{className:"drawDocument"},N.a.createElement("div",null,N.a.createElement(r.a,{className:"navbar"},N.a.createElement("i",{className:"iconfont iconiconfront-68 back",onClick:this.props.history.goBack}),N.a.createElement("div",{className:"common-ft-15"},"\u89c4\u5219\u8bf4\u660e"))),N.a.createElement("div",{className:"content"},N.a.createElement(r.a,null,N.a.createElement("div",{className:"directions-div"},"\u5206\u9500\u89c4\u5219"),N.a.createElement(s.a,{size:"md"}),N.a.createElement("p",{className:"directions-p"},"\u70b9\u51fb\u300e\u5206\u4eab\u8d5a\u94b1\u300f\u751f\u6210\u60a8\u7684\u4e13\u5c5e\u6d77\u62a5\uff0c\u628a\u4e13\u5c5e\u6d77\u62a5\u5206\u4eab\u5230\u5fae\u4fe1\u3001\u5fae\u535a\u3001QQ\u3001\u77e5\u4e4e\u3001\u8d34\u5427\u7b49\uff0c\u4ed6\u4eba\u901a\u8fc7\u60a8\u7684\u6d77\u62a5\u8d2d\u4e70\u540e\u60a8\u53ef\u83b7\u5f97\u76f8\u5e94\u7684\u4f63\u91d1\u5956\u52b1\u3002"),N.a.createElement(s.a,{size:"lg"}),N.a.createElement(s.a,{size:"lg"}),N.a.createElement("div",{className:"directions-div"},"\u63d0\u73b0\u89c4\u5219"),N.a.createElement(s.a,{size:"md"}),N.a.createElement("p",{className:"directions-p"},"1. \u5df2\u5f00\u59cb\u7684\u76f4\u64ad\u8bfe\u7a0b\uff0c\u7528\u6237\u8d2d\u4e70\u540e\u4f63\u91d1\u4f1a\u5b9e\u65f6\u8f6c\u5165\u60a8\u7684\u8d26\u53f7\u4f59\u989d\uff1b"),N.a.createElement("p",{className:"directions-p"},"2. \u5c1a\u672a\u5f00\u8bfe\u7684\u76f4\u64ad\u8bfe\u7a0b\uff0c\u7528\u6237\u8d2d\u4e70\u540e\u5f52\u5c5e\u60a8\u7684\u4f63\u91d1\u6237\u6682\u65f6\u5b58\u653e\u5728\u300e\u5f85\u786e\u8ba4\u91d1\u989d\u300f\u4e2d\uff0c\u76f4\u5230\u8be5\u8bfe\u7a0b\u6b63\u5f0f\u5f00\u8bfe\u3002\u5982\u679c\u7528\u6237\u6ca1\u6709\u9000\u6b3e\uff0c\u5bf9\u5e94\u7684\u8ba2\u5355\u91d1\u989d\u4f1a\u81ea\u52a8\u8f6c\u5165\u60a8\u7684\u8d26\u53f7\u4f59\u989d\uff0c\u5426\u5219\u8be5\u4f63\u91d1\u4f1a\u81ea\u52a8\u6536\u56de\uff1b"),N.a.createElement("p",{className:"directions-p"},"3. \u4f59\u989d\u4e2d\u7684\u91d1\u989d\u53ef\u968f\u65f6\u63d0\u73b0\u3002"))),N.a.createElement("div",{className:"bottom"},N.a.createElement(r.a,null,N.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},N.a.createElement("p",{className:"tip"},"\u6536\u652f\u660e\u7ec6\u53ca\u5f85\u786e\u8ba4\u91d1\u989d\u8bf7\u524d\u5f80App\u67e5\u770b"),N.a.createElement(v.a,{className:"app",text:"\u5728APP\u6253\u5f00"})))))}}]),a}(u.Component)}}]);
//# sourceMappingURL=DrawDocument.fb2e2e93.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/scholarship/DrawDocument/DrawDocument.js"],"names":["DrawDocument","props","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_6__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_8__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_9__","call","react__WEBPACK_IMPORTED_MODULE_11___default","a","createElement","className","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_5___default","onClick","history","goBack","antd_mobile_lib_white_space__WEBPACK_IMPORTED_MODULE_3___default","size","antd_mobile_lib_flex__WEBPACK_IMPORTED_MODULE_1___default","justify","align","style","height","_common_CallApp__WEBPACK_IMPORTED_MODULE_13__","text","Component"],"mappings":"kTAKqBA,cACjB,SAAAA,EAAYC,GAAQ,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAJ,GAAAE,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAF,GAAAO,KAAAH,KACVH,0EAGN,OACIO,EAAAC,EAAAC,cAAA,OAAKC,UAAW,gBACZH,EAAAC,EAAAC,cAAA,WACIF,EAAAC,EAAAC,cAAAE,EAAAH,EAAA,CAAWE,UAAW,UAClBH,EAAAC,EAAAC,cAAA,KAAGC,UAAW,iCAAkCE,QAAST,KAAKH,MAAMa,QAAQC,SAC5EP,EAAAC,EAAAC,cAAA,OAAKC,UAAW,gBAAhB,8BAIRH,EAAAC,EAAAC,cAAA,OAAKC,UAAW,WACZH,EAAAC,EAAAC,cAAAE,EAAAH,EAAA,KACID,EAAAC,EAAAC,cAAA,OAAKC,UAAW,kBAAhB,4BACAH,EAAAC,EAAAC,cAAAM,EAAAP,EAAA,CAAYQ,KAAK,OACjBT,EAAAC,EAAAC,cAAA,KAAGC,UAAW,gBAAd,0XACAH,EAAAC,EAAAC,cAAAM,EAAAP,EAAA,CAAYQ,KAAK,OACjBT,EAAAC,EAAAC,cAAAM,EAAAP,EAAA,CAAYQ,KAAK,OACjBT,EAAAC,EAAAC,cAAA,OAAKC,UAAW,kBAAhB,4BACAH,EAAAC,EAAAC,cAAAM,EAAAP,EAAA,CAAYQ,KAAK,OACjBT,EAAAC,EAAAC,cAAA,KAAGC,UAAW,gBAAd,+KACAH,EAAAC,EAAAC,cAAA,KAAGC,UAAW,gBAAd,qgBACAH,EAAAC,EAAAC,cAAA,KAAGC,UAAW,gBAAd,iFAIRH,EAAAC,EAAAC,cAAA,OAAKC,UAAW,UACZH,EAAAC,EAAAC,cAAAE,EAAAH,EAAA,KACID,EAAAC,EAAAC,cAAAQ,EAAAT,EAAA,CAAMU,QAAQ,UAAUC,MAAM,SAASC,MAAO,CAACC,OAAQ,SACnDd,EAAAC,EAAAC,cAAA,KAAGC,UAAW,OAAd,iGAEAH,EAAAC,EAAAC,cAACa,EAAA,EAAD,CAASZ,UAAU,MAAMa,KAAK,qCAlChBC","file":"static/js/DrawDocument.fb2e2e93.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, WhiteSpace, WingBlank } from 'antd-mobile';\nimport './DrawDocument.scss';\nimport OpenApp from '@/common/CallApp';\n\nexport default class DrawDocument extends Component {\n constructor(props) {\n super(props);\n }\n render() {\n return (\n <div className={'drawDocument'}>\n <div>\n <WingBlank className={'navbar'}>\n <i className={'iconfont iconiconfront-68 back'} onClick={this.props.history.goBack}></i>\n <div className={\"common-ft-15\"}>规则说明</div>\n </WingBlank>\n </div>\n\n <div className={'content'}>\n <WingBlank>\n <div className={'directions-div'}>分销规则</div>\n <WhiteSpace size='md'></WhiteSpace>\n <p className={'directions-p'}>点击『分享赚钱』生成您的专属海报,把专属海报分享到微信、微博、QQ、知乎、贴吧等,他人通过您的海报购买后您可获得相应的佣金奖励。</p>\n <WhiteSpace size='lg'></WhiteSpace>\n <WhiteSpace size='lg'></WhiteSpace>\n <div className={'directions-div'}>提现规则</div>\n <WhiteSpace size='md'></WhiteSpace>\n <p className={'directions-p'}>1. 已开始的直播课程,用户购买后佣金会实时转入您的账号余额;</p>\n <p className={'directions-p'}>2. 尚未开课的直播课程,用户购买后归属您的佣金户暂时存放在『待确认金额』中,直到该课程正式开课。如果用户没有退款,对应的订单金额会自动转入您的账号余额,否则该佣金会自动收回;</p>\n <p className={'directions-p'}>3. 余额中的金额可随时提现。</p>\n </WingBlank>\n </div>\n\n <div className={'bottom'}>\n <WingBlank>\n <Flex justify='between' align='center' style={{height: '44px'}}>\n <p className={'tip'}>收支明细及待确认金额请前往App查看</p>\n {/* <div className={'app'}>在APP打开</div> */}\n <OpenApp className='app' text='在APP打开'/>\n </Flex>\n </WingBlank>\n </div>\n </div>\n )\n }\n}\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{723:function(e,t,a){},724:function(e,t,a){},793:function(e,t,a){"use strict";a.r(t);var n=a(7),s=a(8),c=a(10),o=a(9),r=a(11),i=a(0),l=a.n(i),m=(a(723),a(15)),u=a.n(m),w=a(37),p=(a(724),function(){return l.a.createElement("div",{className:"open-app"},l.a.createElement("p",{className:"left"},"\u66f4\u591a\u8bd5\u9898\u8bf7\u524d\u5f80App\u67e5\u770b"),l.a.createElement("button",{className:"right"},"\u5728APP\u6253\u5f00"))}),h=a(3);a.d(t,"default",function(){return d});var d=function(e){function t(e){var a;return Object(n.a)(this,t),(a=Object(c.a)(this,Object(o.a)(t).call(this,e))).showAnswer=function(){a.setState({isShowAnswer:!a.state.isShowAnswer})},a.state={isShowAnswer:!1,questionData:{}},a}return Object(r.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this;h.d.get("".concat(h.a.home,"/m/dailyQuestion")).then(function(t){e.setState({questionData:t.data.data})})}},{key:"render",value:function(){var e=this.state,t=e.questionData,a=t.ques,n=t.type_id,s=t.options,c=t.analysis,o=t.category,r=e.isShowAnswer;return l.a.createElement("div",{className:"examination"},l.a.createElement("div",{className:"question-container"},l.a.createElement("div",{className:"topic"},l.a.createElement(w.h,{className:"category-tag"},o),a),1===n&&l.a.createElement(f,{className:"options",options:s,showCorrect:this.state.isShowAnswer}),!r&&l.a.createElement("div",{className:"show-answer",onClick:this.showAnswer},l.a.createElement("span",null,"\u67e5\u770b\u89e3\u6790",l.a.createElement("i",{className:"iconfont iconiconfront-69"})))),r&&l.a.createElement(E,{content:c,isShowAnswer:!0}),l.a.createElement(p,null))}}]),t}(i.PureComponent),f=l.a.memo(function(e){var t=e.options,a=e.showCorrect;return l.a.createElement("ul",{className:"options"},t.map(function(e,t){return l.a.createElement("li",{key:t,className:u()("option",{active:1===e.is_ans&&a})},l.a.createElement("span",{className:"alphabet"},String.fromCharCode(65+t)),e.des)}))}),E=l.a.memo(function(e){var t=e.content,a=e.isShowAnswer;return l.a.createElement("div",{className:u()("answer",{scale:a})},l.a.createElement("p",{className:"legend"},"\u89e3\u6790"),l.a.createElement("p",{className:"content"},t))})}}]);
//# sourceMappingURL=Examination.6359fa0c.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/examination/OpenApp/index.js","components/examination/index.js"],"names":["OpenApp","react_default","a","createElement","className","Examination","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","showAnswer","setState","isShowAnswer","state","questionData","_this2","http","get","concat","api","home","then","res","data","_this$state","_this$state$questionD","ques","type_id","options","analysis","category","common","MultiChoice","showCorrect","onClick","Answer","content","components_examination_OpenApp","PureComponent","React","memo","_ref","map","item","index","key","classnames","active","is_ans","String","fromCharCode","des","_ref2","scale"],"mappings":"wOAYeA,UATC,WACZ,OACIC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,YACXH,EAAAC,EAAAC,cAAA,KAAGC,UAAU,QAAb,6DACAH,EAAAC,EAAAC,cAAA,UAAQC,UAAU,SAAlB,6ECCSC,cAEjB,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAgBVQ,WAAa,WACTP,EAAKQ,SAAS,CAACC,cAAeT,EAAKU,MAAMD,gBAhBzCT,EAAKU,MAAQ,CACTD,cAAc,EACdE,aAAc,IAJHX,mFAQC,IAAAY,EAAAT,KAChBU,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,qBACKC,KAAK,SAAAC,GACFP,EAAKJ,SAAS,CACVG,aAAcQ,EAAIC,KAAKA,0CAS9B,IAAAC,EAMDlB,KAAKO,MANJY,EAAAD,EAEDV,aACIY,EAHHD,EAGGC,KAAMC,EAHTF,EAGSE,QAASC,EAHlBH,EAGkBG,QAASC,EAH3BJ,EAG2BI,SAAUC,EAHrCL,EAGqCK,SAEtClB,EALCY,EAKDZ,aAEJ,OACIf,EAAAC,EAAAC,cAAA,OAAKC,UAAU,eACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,sBACXH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SACXH,EAAAC,EAAAC,cAACgC,EAAA,EAAD,CAAK/B,UAAU,gBAAgB8B,GAC9BJ,GAGW,IAAZC,GAAiB9B,EAAAC,EAAAC,cAACiC,EAAD,CAAahC,UAAU,UAAU4B,QAASA,EAC1BK,YAAa3B,KAAKO,MAAMD,gBAIxDA,GAEGf,EAAAC,EAAAC,cAAA,OAAKC,UAAU,cAAckC,QAAS5B,KAAKI,YACvCb,EAAAC,EAAAC,cAAA,uCAAUF,EAAAC,EAAAC,cAAA,KAAGC,UAAU,iCAMnCY,GAAgBf,EAAAC,EAAAC,cAACoC,EAAD,CAAQC,QAASP,EAAUjB,cAAY,IAE3Df,EAAAC,EAAAC,cAACsC,EAAD,cAtDyBC,iBA4DnCN,EAAcO,IAAMC,KAAK,SAAAC,GAA4B,IAA1Bb,EAA0Ba,EAA1Bb,QAASK,EAAiBQ,EAAjBR,YACtC,OACIpC,EAAAC,EAAAC,cAAA,MAAIC,UAAU,WAEN4B,EAAQc,IAAI,SAACC,EAAMC,GAAP,OACR/C,EAAAC,EAAAC,cAAA,MAAI8C,IAAKD,EAAO5C,UAAW8C,IAAW,SAAU,CAACC,OAA0B,IAAhBJ,EAAKK,QAAgBf,KAC5EpC,EAAAC,EAAAC,cAAA,QAAMC,UAAU,YAAYiD,OAAOC,aAAa,GAAKN,IACpDD,EAAKQ,UAQxBhB,EAASI,IAAMC,KAAK,SAAAY,GAA6B,IAA3BhB,EAA2BgB,EAA3BhB,QAASxB,EAAkBwC,EAAlBxC,aACjC,OACIf,EAAAC,EAAAC,cAAA,OAAKC,UAAW8C,IAAW,SAAU,CAACO,MAAOzC,KACzCf,EAAAC,EAAAC,cAAA,KAAGC,UAAU,UAAb,gBACAH,EAAAC,EAAAC,cAAA,KAAGC,UAAU,WACRoC","file":"static/js/Examination.6359fa0c.chunk.js","sourcesContent":["import React from 'react'\nimport './index.scss'\n\nconst OpenApp = () => {\n return (\n <div className='open-app'>\n <p className='left'>更多试题请前往App查看</p>\n <button className='right'>在APP打开</button>\n </div>\n )\n}\n\nexport default OpenApp","import React, { PureComponent } from 'react'\nimport './examination.scss'\nimport classnames from 'classnames'\n\nimport { Tag } from '../../common'\nimport OpenApp from './OpenApp'\nimport { http,api } from '@/utils'\n\nexport default class Examination extends PureComponent {\n\n constructor(props) {\n super(props)\n this.state = {\n isShowAnswer: false,\n questionData: {}\n }\n }\n\n componentDidMount() {\n http.get(`${api.home}/m/dailyQuestion`)\n .then(res => {\n this.setState({\n questionData: res.data.data\n })\n })\n }\n\n showAnswer = () => {\n this.setState({isShowAnswer: !this.state.isShowAnswer})\n }\n\n render() {\n let {\n questionData: {\n ques, type_id, options, analysis, category\n },\n isShowAnswer\n } = this.state\n return (\n <div className='examination'>\n <div className=\"question-container\">\n <div className=\"topic\">\n <Tag className='category-tag'>{category}</Tag>\n {ques}\n </div>\n {\n type_id === 1 && <MultiChoice className='options' options={options}\n showCorrect={this.state.isShowAnswer}\n />\n }\n {\n !isShowAnswer &&\n (\n <div className=\"show-answer\" onClick={this.showAnswer}>\n <span>查看解析<i className='iconfont iconiconfront-69'></i></span>\n </div>\n )\n }\n </div>\n {\n isShowAnswer && <Answer content={analysis} isShowAnswer/>\n }\n <OpenApp/>\n </div>\n )\n }\n}\n\nconst MultiChoice = React.memo(({options, showCorrect}) => {\n return (\n <ul className='options'>\n {\n options.map((item, index) => (\n <li key={index} className={classnames('option', {'active': item.is_ans === 1 && showCorrect})}>\n <span className=\"alphabet\">{String.fromCharCode(65 + index)}</span>\n {item.des}\n </li>\n ))\n }\n </ul>\n )\n})\n\nconst Answer = React.memo(({content, isShowAnswer}) => {\n return (\n <div className={classnames('answer', {scale: isShowAnswer})}>\n <p className='legend'>解析</p>\n <p className='content'>\n {content}\n </p>\n </div>\n )\n})\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{785:function(e,t,a){"use strict";a.r(t);a(43);var n=a(14),s=a.n(n),i=a(7),c=a(8),l=a(10),o=a(9),r=a(11),u=a(0),m=a.n(u),d=(a(258),a(18)),h=a(3),p=a(37),v=a(34),f=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(o.a)(t).call(this,e))).toEditName=function(){a.setState({isShow:!0,value:""})},a.cancle=function(){a.setState({isShow:!1})},a.handleChange=function(e){a.setState({value:e.target.value})},a.outLogin=function(){a.props.logout(),s.a.info("\u5df2\u9000\u51fa",2),a.props.history.push("/my")},a.submit=function(){if(a.state.value.length>12)s.a.info("\u4e0d\u8d85\u8fc712\u4e2a\u5b57\u7b26",2);else if(0===a.state.value.length)s.a.info("\u8bf7\u8f93\u5165\u6635\u79f0",2);else{var e={user_name:a.state.value};h.d.post("".concat(h.a.home,"/m/user_info/update"),e).then(function(e){200===e.data.code?(a.setState({isShow:!1}),a.props.updateUser({data:{username:a.state.value}}),s.a.info("\u4fee\u6539\u6210\u529f",2)):s.a.info(e.data.msg,2)})}},a.state={isShow:!1,value:""},a}return Object(r.a)(t,e),Object(c.a)(t,[{key:"render",value:function(){var e=this.props.user,t=e&&e.data&&e.data.username,a=e&&e.data&&e.data.avatar;return m.a.createElement("div",{className:"edit-name"},m.a.createElement(p.e,{title:"\u8d26\u53f7",arrow:!0,cart:!1}),m.a.createElement("div",{className:"my-mess"},m.a.createElement("img",{src:a,alt:""}),m.a.createElement("span",{className:"name"},t),m.a.createElement("span",{onClick:this.toEditName,className:"edit"},"\u7f16\u8f91")),m.a.createElement("div",{className:"out-login",onClick:this.outLogin},"\u9000\u51fa\u767b\u5f55"),this.state.isShow&&m.a.createElement("div",{className:"edit-mbc"},m.a.createElement("div",{className:"edit-content"},m.a.createElement("div",{className:"edit-title"},"\u4fee\u6539\u6635\u79f0"),m.a.createElement("input",{type:"text",placeholder:"\u8bf7\u8f93\u5165\u6635\u79f0\uff08\u4e0d\u8d85\u8fc712\u4e2a\u5b57\u7b26\uff09",value:this.state.value,onChange:this.handleChange.bind(this)}),m.a.createElement("div",{className:"edit-btn"},m.a.createElement("button",{className:"cancle",onClick:this.cancle},"\u53d6\u6d88"),m.a.createElement("button",{className:"submit",onClick:this.submit},"\u786e\u8ba4")))))}}]),t}(u.PureComponent);t.default=Object(d.b)(function(e){return{user:e.user}},{logout:v.e,updateUser:v.i})(f)}}]);
//# sourceMappingURL=MyEdit.d50bc106.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/my/edit.js"],"names":["MyEdut","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","toEditName","setState","isShow","value","cancle","handleChange","e","target","outLogin","logout","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","history","push","submit","state","length","data","user_name","http","post","concat","api","home","then","res","code","updateUser","username","msg","user","avatar","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_11__","title","arrow","cart","src","alt","onClick","type","placeholder","onChange","bind","PureComponent","connect"],"mappings":"yNASMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAQVQ,WAAa,WACTP,EAAKQ,SAAS,CACVC,QAAQ,EACRC,MAAO,MAZIV,EAgBnBW,OAAS,WACLX,EAAKQ,SAAS,CACVC,QAAQ,KAlBGT,EAuBnBY,aAAe,SAACC,GACZb,EAAKQ,SAAS,CACVE,MAAOG,EAAEC,OAAOJ,SAzBLV,EA6BnBe,SAAW,WACPf,EAAKD,MAAMiB,SACXC,EAAAC,EAAMC,KAAK,qBAAO,GAClBnB,EAAKD,MAAMqB,QAAQC,KAAK,QAhCTrB,EAoCnBsB,OAAS,WACL,GAAItB,EAAKuB,MAAMb,MAAMc,OAAS,GAC1BP,EAAAC,EAAMC,KAAK,yCAAY,QACpB,GAAgC,IAA5BnB,EAAKuB,MAAMb,MAAMc,OACxBP,EAAAC,EAAMC,KAAK,iCAAS,OACjB,CACH,IAAIM,EAAO,CACPC,UAAW1B,EAAKuB,MAAMb,OAE1BiB,IAAKC,KAAL,GAAAC,OAAaC,IAAIC,KAAjB,uBAA4CN,GAAMO,KAAK,SAACC,GAC9B,MAAlBA,EAAIR,KAAKS,MACTlC,EAAKQ,SAAS,CACVC,QAAQ,IAEZT,EAAKD,MAAMoC,WAAW,CAACV,KAAM,CAACW,SAAUpC,EAAKuB,MAAMb,SACnDO,EAAAC,EAAMC,KAAK,2BAAQ,IAEnBF,EAAAC,EAAMC,KAAKc,EAAIR,KAAKY,IAAK,OAnDrCrC,EAAKuB,MAAQ,CACTd,QAAQ,EACRC,MAAO,IAJIV,wEA4DV,IACEsC,EAAQnC,KAAKJ,MAAbuC,KACDF,EAAWE,GAAQA,EAAKb,MAAQa,EAAKb,KAAKW,SAC1CG,EAASD,GAAQA,EAAKb,MAAQa,EAAKb,KAAKc,OAC9C,OACIC,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,aACXF,EAAAtB,EAAAuB,cAACE,EAAA,EAAD,CAAWC,MAAM,eAAKC,OAAO,EAAMC,MAAM,IAEzCN,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,WACXF,EAAAtB,EAAAuB,cAAA,OAAKM,IAAKR,EAAQS,IAAI,KACtBR,EAAAtB,EAAAuB,cAAA,QAAMC,UAAU,QAAQN,GACxBI,EAAAtB,EAAAuB,cAAA,QAAMQ,QAAS9C,KAAKI,WAAYmC,UAAU,QAA1C,iBAEJF,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,YAAYO,QAAS9C,KAAKY,UAAzC,4BAKIZ,KAAKoB,MAAMd,QACX+B,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,YACXF,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,gBACXF,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,cAAf,4BACAF,EAAAtB,EAAAuB,cAAA,SAAOS,KAAK,OAAOC,YAAY,mFACxBzC,MAAOP,KAAKoB,MAAMb,MAClB0C,SAAUjD,KAAKS,aAAayC,KAAKlD,QAExCqC,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,YACXF,EAAAtB,EAAAuB,cAAA,UAAQC,UAAU,SAASO,QAAS9C,KAAKQ,QAAzC,gBACA6B,EAAAtB,EAAAuB,cAAA,UAAQC,UAAU,SAASO,QAAS9C,KAAKmB,QAAzC,2BAzFXgC,iBAoGNC,sBACX,SAAAhC,GAAK,MAAK,CAACe,KAAMf,EAAMe,OACvB,CAACtB,WAAQmB,gBAFEoB,CAGbzD","file":"static/js/MyEdit.d50bc106.chunk.js","sourcesContent":["import React, {PureComponent} from 'react'\nimport './index.scss'\nimport {connect} from \"react-redux\"\nimport {Toast} from 'antd-mobile'\nimport {api, http} from \"@/utils\"\nimport {HeaderBar} from \"@/common\"\nimport {logout, updateUser} from '@/store/userAction'\n\n\nclass MyEdut extends PureComponent {\n constructor(props) {\n super(props)\n this.state = {\n isShow: false,\n value: ''\n }\n }\n\n // 点击编辑\n toEditName = () => {\n this.setState({\n isShow: true,\n value: ''\n })\n }\n // 取消\n cancle = () => {\n this.setState({\n isShow: false\n })\n }\n\n // 获取input的值\n handleChange = (e) => {\n this.setState({\n value: e.target.value\n })\n }\n // 退出登录\n outLogin = () => {\n this.props.logout()\n Toast.info('已退出', 2)\n this.props.history.push('/my')\n }\n\n // 确定修改\n submit = () => {\n if (this.state.value.length > 12) {\n Toast.info('不超过12个字符', 2)\n } else if (this.state.value.length === 0) {\n Toast.info('请输入昵称', 2)\n } else {\n let data = {\n user_name: this.state.value\n }\n http.post(`${api.home}/m/user_info/update`, data).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n isShow: false\n })\n this.props.updateUser({data: {username: this.state.value}})\n Toast.info('修改成功', 2)\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n }\n\n render() {\n const {user} = this.props\n const username = user && user.data && user.data.username\n const avatar = user && user.data && user.data.avatar\n return (\n <div className=\"edit-name\">\n <HeaderBar title='账号' arrow={true} cart={false}></HeaderBar>\n\n <div className='my-mess'>\n <img src={avatar} alt=\"\"/>\n <span className=\"name\">{username}</span>\n <span onClick={this.toEditName} className=\"edit\">编辑</span>\n </div>\n <div className=\"out-login\" onClick={this.outLogin}>\n 退出登录\n </div>\n\n {\n this.state.isShow &&\n <div className=\"edit-mbc\">\n <div className=\"edit-content\">\n <div className=\"edit-title\">修改昵称</div>\n <input type=\"text\" placeholder='请输入昵称(不超过12个字符)'\n value={this.state.value}\n onChange={this.handleChange.bind(this)}\n />\n <div className=\"edit-btn\">\n <button className='cancle' onClick={this.cancle}>取消</button>\n <button className='submit' onClick={this.submit}>确认</button>\n </div>\n </div>\n </div>\n }\n </div>\n )\n }\n\n}\n\nexport default connect(\n state => ({user: state.user}),\n {logout, updateUser}\n)(MyEdut)\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{767:function(e,t,a){},783:function(e,t,a){"use strict";a.r(t);a(152);var o=a(74),c=a.n(o),n=a(24),r=(a(43),a(14)),s=a.n(r),i=a(7),l=a(8),d=a(10),m=a(9),u=a(11),p=(a(86),a(23)),f=a.n(p),h=(a(113),a(47)),E=a.n(h),b=a(0),g=a.n(b),v=a(37),x=a(16),N=a(3),O=a(36),j=(a(767),E.a.Item);function y(e){var t=e.list;return g.a.createElement("div",null,t.map(function(t,a){console.log(t);var o=t.is_coupon,c=t.course_id,n=t.image_name,r=t.price1,s=t.price0,i=t.simpledescription,l=t.course_title,d=t.coupon_num,m=t.coupon_desc,u=g.a.createElement("div",{className:"order-info"},g.a.createElement(x.b,{to:"/detail?id=".concat(c)},g.a.createElement("p",{className:"order-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},l)),g.a.createElement("p",{className:"order-content",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:"2",wordBreak:"break-all",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box"}},i),g.a.createElement("p",{className:"order-des"},void 0===e.courseId?g.a.createElement("span",{className:"order-newprice"},"\xa5",r):g.a.createElement("span",{className:"order-newprice"},"\xa5",t.pdd_group_info.price),g.a.createElement("span",{className:"order-price"},"\xa5",s)));return g.a.createElement(v.g,Object.assign({},t,{src:n,id:c,key:a,info:u}),1===o?g.a.createElement("div",{className:"order-prefer"},g.a.createElement(E.a,{key:a},g.a.createElement(j,{arrow:"horizontal",onClick:function(){}},g.a.createElement(x.b,{to:{pathname:"/coupons",search:"?id=".concat(c),state:{from:"/order",a:"sldfasldjfsl"}}},g.a.createElement(f.a,{justify:"between"},g.a.createElement("span",{style:{color:"#333",fontSize:"15px"}},"\u4f18\u60e0\u5238"),g.a.createElement("span",{style:{fontSize:"14px",color:"#999999"}},m||(0===d?"\u65e0":"".concat(d,"\u5f20\u53ef\u7528")))))))):null)}))}var w=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(d.a)(this,Object(m.a)(t).call(this,e))).submitOrder=function(){0!==a.state.orderList.lengtjh?(a.state.perfect||s.a.info("\u8bf7\u5b8c\u5584\u62a5\u540d\u4fe1\u606f\uff01"),N.d.post("".concat(N.a.home,"/m/order/submitOrder"),{is_deduction:a.state.useBalance}).then(function(e){200===e.data.code&&(sessionStorage.removeItem("orderUseCacheObj"),a.props.history.replace("/payorder?oid=".concat(e.data.data.order_id)))})):s.a.info("\u6ca1\u6709\u8981\u63d0\u4ea4\u7684\u8ba2\u5355\uff01")},a.useBalance=function(){var e=a.state.useBalance;a.setState({useBalance:!e}),e?sessionStorage.removeItem("orderUseCacheObj"):(a.cacheObj=Object(n.a)({},a.state),sessionStorage.setItem("orderUseCacheObj",JSON.stringify(a.state))),a.computedMoney(e)},a.computedMoney=function(e){var t=parseFloat(a.cacheObj.total),o=parseFloat(a.cacheObj.user_account),c=a.state.discount;e?a.setState({offset:a.cacheObj.offset,total:a.cacheObj.total,discount:a.cacheObj.discount}):t>o?a.setState({offset:o.toFixed(2),total:(t-o).toFixed(2),discount:(o+parseFloat(c)).toFixed(2)}):a.setState({offset:t.toFixed(2),total:0,discount:(t+parseFloat(c)).toFixed(2)})},a.computedMoneyByCache=function(){var e=parseFloat(a.cacheObj.total),t=parseFloat(a.cacheObj.user_account),o=parseFloat(a.cacheObj.discount);e>t?a.setState({offset:t.toFixed(2),total:(e-t).toFixed(2),discount:(o+t).toFixed(2)}):a.setState({offset:e.toFixed(2),total:0,discount:e.toFixed(2)})},a.showInfo=function(){a.setState(function(e){return{info:!e.info}})},a.state={perfect:a.props.location.state,user_account:0,total:0,discount:0,useBalance:!1,orderList:[],info:!1,offset:0},a}return Object(u.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this;void 0!==Object(N.c)("id")?Promise.all([N.d.get("".concat(N.a.home,"/m/del_cart_order/").concat(Object(N.c)("id"))),N.d.get("".concat(N.a.home,"/m/order/preorder")),N.d.get("".concat(N.a.home,"/m/course/detail/").concat(Object(N.c)("id")))]).then(function(a){var o=a[1],c=a[2],n=[];if(console.log(c),200===o.data.code)if(200===c.data.code){var r=o.data.data,i=r.user_info,l=r.user_account,d=r.discount,m=c.data.data.course_info;n.push(m),e.cacheObj={perfect:i,orderList:n,user_account:l,total:m.pdd_group_info.price,discount:d},t.setState({perfect:i,orderList:n,user_account:l,total:m.pdd_group_info.price,discount:d})}else s.a.info(o.data.msg,2);else s.a.info(o.data.msg,2)}):N.d.get("".concat(N.a.home,"/m/order/preorder")).then(function(t){if(200===t.data.code){var a=t.data.data,o=a.course,c=a.total,n=a.user_account,r=a.user_info,s=a.discount;if(e.cacheObj={perfect:r,orderList:o,user_account:n,total:c,discount:s},e.setState({perfect:r,orderList:o,user_account:n,total:c,discount:s}),"PUSH"===e.props.history.action)sessionStorage.removeItem("orderUseCacheObj");else null!==sessionStorage.getItem("orderUseCacheObj")&&(e.setState({useBalance:!0}),e.computedMoneyByCache())}})}},{key:"render",value:function(){var e=this.state,t=e.perfect,a=e.orderList,o=e.user_account,n=e.total,r=e.discount,s=e.useBalance,i=e.info,l=e.offset;return g.a.createElement("div",{className:"order-wrapper"},g.a.createElement(f.a,null,g.a.createElement(f.a.Item,null,g.a.createElement(v.e,{title:"\u8bfe\u7a0b\u62a5\u540d",arrow:!0}),!this.state.perfect&&g.a.createElement(x.b,{to:"/orderinfo",className:"order-information"},g.a.createElement("i",{className:"iconfont iconiconfront-6 order-addsize"}),g.a.createElement("div",{className:"order-infotext"},"\u5b8c\u5584\u62a5\u540d\u4fe1\u606f"),g.a.createElement("i",{className:"iconfont iconiconfront-70 order-next"})),this.state.perfect&&g.a.createElement("div",{className:"order-information2"},g.a.createElement(c.a,null,g.a.createElement(x.b,{to:{pathname:"/orderinfo",state:this.state.perfect}},g.a.createElement(f.a,{align:"center",justify:"between",style:{height:"80px"}},g.a.createElement("i",{className:"iconfont iconiconfront-20 user-icon"}),g.a.createElement(f.a,{direction:"column",justify:"between",align:"start",className:"order-cell"},g.a.createElement("div",{className:"name"},"\u59d3\u540d\uff1a".concat(t.real_name)),g.a.createElement("div",null,"\u7535\u8bdd\uff1a".concat(t.cellphone))),g.a.createElement(f.a,{align:"start",className:"order-cell"},g.a.createElement("div",null,"QQ\uff1a".concat(t.qq))))))),g.a.createElement("div",{className:"order-list"},g.a.createElement(y,{list:a,compute:this.computedMoney,courseId:Object(N.c)("id")})),g.a.createElement("div",{className:"order-balance"},g.a.createElement(E.a,null,g.a.createElement(j,{className:"order-prefer-text"},g.a.createElement(f.a,{justify:"between"},g.a.createElement(f.a,{align:"center"},g.a.createElement("span",null,"\u4f59\u989d\u62b5\u6263"),g.a.createElement("span",{className:"order-balanceprice"}," (\u4f59\u989d: ",g.a.createElement("i",{className:"order-money"},"".concat(o,"\u5143")),")"),g.a.createElement("i",{className:"iconfont iconiconfront-22 question-mark",onClick:this.showInfo})),g.a.createElement(f.a,null,s?g.a.createElement(g.a.Fragment,null,g.a.createElement("span",{style:{color:"#FF2121",fontSize:"15px",marginRight:"6px"}},"-".concat(l)),g.a.createElement("i",{className:"iconfont icondanseshixintubiao-5 balance-used",onClick:Object(O.throttle)(this.useBalance,600)})):g.a.createElement("i",{className:"circle-icon",onClick:Object(O.throttle)(this.useBalance,600)})))))),g.a.createElement("div",{className:"order-bar"},g.a.createElement("div",{className:"order-course"},g.a.createElement("span",{className:"order-course-text"},"".concat(a.length,"\u95e8\u8bfe\u7a0b"))),g.a.createElement("div",{className:"order-bar-text"},g.a.createElement("div",{className:"order-amount"},g.a.createElement("span",{className:"order-amount-title"},"\u5408\u8ba1:"),g.a.createElement("span",{className:"order-amount-price"},"\uffe5".concat(n))),g.a.createElement("div",{className:"order-preprice"},g.a.createElement("span",{className:"order-preprice-title"},"\u5df2\u4f18\u60e0:"),g.a.createElement("span",{className:"order-preprice-price"},"\xa5".concat(r)))),t?g.a.createElement("button",{type:"button",className:"order-button has-info"},g.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355")):g.a.createElement("button",{type:"button",className:"order-button"},g.a.createElement("span",{className:"order-button-text",onClick:this.submitOrder},"\u63d0\u4ea4\u8ba2\u5355"))))),i?g.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",zIndex:"99"}},g.a.createElement("div",{style:{padding:"20px",backgroundColor:"#FFF",width:"300px",height:"170px",margin:"0 auto",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},g.a.createElement(f.a,{direction:"column",justify:"between",align:"center",style:{height:"100%"}},g.a.createElement("p",{style:{fontSize:"16px",color:"#333333"}},"\u4f59\u989d\u62b5\u6263\u8bf4\u660e"),g.a.createElement("p",{style:{lineHeight:"20px",fontSize:"13px",color:"#666666"}},"\u5206\u9500\u8bfe\u7a0b\u6216\u8005\u53c2\u4e0e\u4e03\u6708\u5728\u7ebf\u7684\u76f8\u5173\u6d3b\u52a8\uff0c\u53ef\u83b7\u5f97\u8d44\u91d1\u5956\u52b1\u3002\u8d26\u6237\u8d44\u91d1\u53ef\u76f4\u63a5\u63d0\u73b0\uff0c\u4e5f\u53ef\u62b5\u6263\u8bfe\u7a0b\u8d39\u7528\u3002"),g.a.createElement("div",{onClick:this.showInfo,style:{width:"260px",height:"30px",lineHeight:"30px",textAlign:"center",borderRadius:"3px",border:"1px solid #0099FF",color:"#0099FF",fontSize:"15px"}},"\u77e5\u9053\u4e86")))):null)}}]),t}(b.Component);t.default=w}}]);
//# sourceMappingURL=Order.7e2daa20.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{782:function(e,a,n){"use strict";n.r(a);var t=n(7),o=n(8),r=n(10),l=n(9),i=n(11),c=(n(43),n(14)),s=n.n(c),p=n(24),u=(n(152),n(74)),d=n.n(u),f=(n(753),n(756)),h=n.n(f),m=(n(757),n(760)),v=n.n(m),q=n(0),g=n.n(q),b=n(20),E=n(37),y=n(3),Q=Object(b.d)({mapPropsToValues:function(e){return Object(p.a)({},e.userInfo)},validate:function(e,a){return{}},handleSubmit:function(e,a){var n=e.real_name,t=e.cellphone,o=e.qq;if(n)if(0!=="".concat(n).replace(/\s+/g,"").length)if(t)if(/1\d{10}/g.test("".concat(t).replace(/\s+/g,"")))if(o)if(/\d{5,}/g.test(o)){var r=!1;if(a.props.userInfo){var l=a.props.userInfo;l.real_name===n&&(r=!0),l.cellphone===t&&(r=!0),l.qq===o&&(r=!0)}r?a.props.history.replace({pathname:"/order",state:e}):y.d.post("".concat(y.a.home,"/m/order/saveUserInfo"),{real_name:e.real_name,cellphone:"".concat(e.cellphone).replace(/\s+/g,""),qq:e.qq}).then(function(n){200===n.data.code?(s.a.info("\u4fdd\u5b58\u6210\u529f\uff01",void 0,void 0,!1),a.props.history.replace({pathname:"/order",state:e})):s.a.info(n.data.msg,void 0,void 0,!1)})}else s.a.info("\u8bf7\u8f93\u5165\u6b63\u786eQQ\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165QQ\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u624b\u673a\u53f7\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u59d3\u540d\uff01",void 0,void 0,!1);else s.a.info("\u8bf7\u8f93\u5165\u59d3\u540d\uff01",void 0,void 0,!1)}})(function(e){var a=e.values,n=(e.errors,e.touched,e.setFieldValue),t=(e.handleBlur,e.handleSubmit);e.isSubmitting;return g.a.createElement("form",null,g.a.createElement(v.a,{clear:!0,name:"real_name",onChange:function(e){return n("real_name",e)},placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684\u771f\u5b9e\u59d3\u540d",value:a.real_name},"\u59d3\u540d"),g.a.createElement(v.a,{clear:!0,type:"phone",name:"cellphone",placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684\u624b\u673a\u53f7\u7801",onChange:function(e){return n("cellphone",e)},value:a.cellphone},"\u7535\u8bdd"),g.a.createElement(v.a,{clear:!0,name:"qq",placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684QQ\u53f7\u7801",maxLength:"15",onChange:function(e){return n("qq",e)},value:a.qq},"QQ"),g.a.createElement("div",{style:{marginTop:"21px"}},g.a.createElement(d.a,null,g.a.createElement(h.a,{type:"primary",onClick:t},"\u786e\u8ba4"))))}),j=function(e){function a(e){return Object(t.a)(this,a),Object(r.a)(this,Object(l.a)(a).call(this,e))}return Object(i.a)(a,e),Object(o.a)(a,[{key:"render",value:function(){return g.a.createElement("div",null,g.a.createElement(E.e,{title:"\u62a5\u540d\u4fe1\u606f",arrow:!0}),g.a.createElement(Q,{history:this.props.history,userInfo:this.props.location.state}))}}]),a}(q.Component);a.default=j}}]);
//# sourceMappingURL=Orderinfo.42d2809e.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/order/orderinfo.js"],"names":["MyForm","withFormik","mapPropsToValues","props","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_7__","userInfo","validate","values","handleSubmit","FormBag","real_name","cellphone","qq","concat","replace","length","test","same","history","pathname","state","http","post","api","home","then","res","data","code","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_6___default","a","info","undefined","msg","_ref","setFieldValue","errors","touched","handleBlur","isSubmitting","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","antd_mobile_lib_input_item__WEBPACK_IMPORTED_MODULE_13___default","clear","name","onChange","value","placeholder","type","maxLength","style","marginTop","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_9___default","antd_mobile_lib_button__WEBPACK_IMPORTED_MODULE_11___default","onClick","Orderinfo","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__","call","_common__WEBPACK_IMPORTED_MODULE_16__","title","arrow","location","Component"],"mappings":"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","file":"static/js/Orderinfo.42d2809e.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, NavBar, List, InputItem, Button, WhiteSpace, WingBlank, Toast } from 'antd-mobile';\nimport { Formik, Field, Form, withFormik } from 'formik';\nimport {HeaderBar} from '../../common';\nimport { http, api } from \"@/utils\";\n\nconst InnerForm = ({\n values,\n errors,\n touched,\n setFieldValue,\n handleBlur,\n handleSubmit,\n isSubmitting,\n}) => (\n <form>\n <InputItem\n clear\n name=\"real_name\"\n onChange={(value) => setFieldValue('real_name', value)}\n placeholder=\"请输入您的真实姓名\"\n value={values.real_name}\n >姓名</InputItem>\n <InputItem\n clear\n type='phone'\n name='cellphone'\n placeholder=\"请输入您的手机号码\"\n onChange={(value) => setFieldValue('cellphone', value)}\n value={values.cellphone}\n >电话</InputItem>\n <InputItem\n clear\n name='qq'\n placeholder=\"请输入您的QQ号码\"\n maxLength='15'\n onChange={(value) => setFieldValue('qq', value)}\n value={values.qq}\n >QQ</InputItem>\n\n <div style={{ marginTop: '21px' }}>\n <WingBlank>\n <Button type='primary' onClick={handleSubmit}>确认</Button>\n </WingBlank>\n </div>\n </form>\n );\n\nconst MyForm = withFormik({\n mapPropsToValues: props => ({ ...props.userInfo }),\n validate: (values, props) => {\n const errors = {};\n return errors;\n },\n handleSubmit: (\n values,\n FormBag\n ) => {\n const {real_name, cellphone, qq} = values;\n if (!real_name) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }else if ((`${real_name}`).replace(/\\s+/g, '').length === 0) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }\n if (!cellphone) {\n Toast.info('请输入手机号!', undefined, undefined, false);\n return;\n } else if (!/1\\d{10}/g.test((`${cellphone}`).replace(/\\s+/g, ''))) {\n Toast.info('请输入正确的手机号!', undefined, undefined, false);\n return;\n }\n if (!qq) {\n Toast.info('请输入QQ号!', undefined, undefined, false);\n return;\n } else if (!/\\d{5,}/g.test(qq)) {\n Toast.info('请输入正确QQ号!', undefined, undefined, false);\n return;\n }\n let same = false;\n if(FormBag.props.userInfo) {\n const userInfo = FormBag.props.userInfo;\n if(userInfo.real_name === real_name) {\n same = true;\n }\n if(userInfo.cellphone === cellphone) {\n same = true;\n }\n if(userInfo.qq === qq) {\n same = true;\n }\n }\n if(same) {\n FormBag.props.history.replace({\n pathname: '/order',\n state: values\n });\n return;\n }\n http.post(`${api.home}/m/order/saveUserInfo`, {real_name: values.real_name, cellphone: (`${values.cellphone}`).replace(/\\s+/g, ''), qq: values.qq}).then(res=>{\n if(res.data.code !== 200) {\n Toast.info(res.data.msg, undefined, undefined, false);\n return;\n }\n Toast.info('保存成功!', undefined, undefined, false);\n FormBag.props.history.replace({\n pathname: '/order',\n state: values\n });\n });\n },\n})(InnerForm);\n\nclass Orderinfo extends Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n <div>\n <HeaderBar title='报名信息' arrow={true}></HeaderBar>\n <MyForm history={this.props.history} userInfo={this.props.location.state}/>\n </div>\n )\n }\n\n};\n\nexport default Orderinfo;"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{714:function(e,a,t){},778:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return S});t(152);var n=t(74),i=t.n(n),o=(t(86),t(23)),c=t.n(o),r=(t(151),t(33)),l=t.n(r),s=t(52),d=t(7),p=t(8),u=t(10),m=t(9),y=t(11),g=(t(709),t(712)),h=t.n(g),f=(t(113),t(47)),v=t.n(f),b=t(0),w=t.n(b),E=t(3),x=t(37),k=t(16),N=(t(714),v.a.Item.Brief,h.a.RadioItem),_=[{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconzhifubaox-"},{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}],S=function(e){function a(e){var t;return Object(d.a)(this,a),(t=Object(u.a)(this,Object(m.a)(a).call(this,e))).onChange=function(e){t.setState({payType:e,checkPeriod:!1}),2===e&&t.setState({huabei:!0})},t.checkStaging=function(e){console.log(e),t.setState(Object(s.a)({huabei:!1,checkPeriod:!0,stageNumber:e.value,singleMoney:e.everyTotal,periodNumber:e.stage},"checkPeriod",!0))},t.print=function(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];console.log(a)},t.pay=function(){var e=t.state,a=e.payType,n=e.orderId;0===a?t.alipayPay(n):1===a&&t.weixinPay(n)},t.weixinPay=function(e){Object(E.f)()?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb").toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":E.d.get("".concat(E.a["pay-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(e){console.log(e),0===e.data.errno?window.location.href=e.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1").toLowerCase():Toast.info(e.data.msg,2)})},t.isweixinPay=function(){var e=Object(E.c)("code");if(e){if(void 0===Object(E.c)("oid"))return;E.d.get("".concat(E.a["pay-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(E.c)("oid"),"/code/").concat(e)).then(function(e){if(0===e.data.errno){var a=e.data.data;t.onBridgeReady(a),"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",t.onBridgeReady,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",t.onBridgeReady),document.attachEvent("onWeixinJSBridgeReady",t.onBridgeReady)):t.onBridgeReady()}else Toast.info(e.data.msg,2)})}},t.payCallback=function(){},t.onBridgeReady=function(e){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.appId,timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.paySign},function(e){"get_brand_wcpay_request:ok"==e.err_msg?this.payCallback():alert("\u652f\u4ed8\u5931\u8d25")})},t.alipayPay=function(e){E.d.get("".concat(E.a["pay-api"],"/pay/alipay/wap_charge/oid/").concat(e)).then(function(e){0===e.data.errno?window.location=e.data.data.url:Toast.info(e.data.msg,2)})},t.huabeiPay=function(e){var a=t.state,n=(a.singleMoney,a.periodNumber);console.log("\u82b1\u5457\u5206\u671f\u652f\u4ed8"),E.d.get("/pay/alipay/wap_charge/oid/".concat(e,"/plat/{plat} /hb_num/").concat(n)).then(function(e){console.log(e),0===e.data.errno?window.location=e.data.data.url:Toast.info(e.data.msg,2)})},t.state={pay_amount:0,payType:0,stageNumber:0,checkPeriod:!1,singleMoney:0,periodNumber:0,orderId:Object(E.c)("oid"),huabei:!1,fenqiList:[{value:"zhifubao",qishu:"3",lilv:"2.30%",everyMoney:300,feiyong:2.3},{value:"weixin",qishu:"6",lilv:"4.50%",everyMoney:150,feiyong:4.5},{value:"huabei",qishu:"9",lilv:"7.50%",everyMoney:100,feiyong:7.5}],categoryList:[]},t}return Object(y.a)(a,e),Object(p.a)(a,[{key:"componentDidMount",value:function(){var e=this;E.d.post("".concat(E.a.home,"/m/order/detail"),{order_id:this.state.orderId}).then(function(a){if(console.log(a),200===a.data.code){var t=a.data.data,n=t.course,i=t.pay_amount,o=[];[1,2,3].map(function(e){var a={};a.value=e,1===e?(a.stage=3,a.moneyRate="2.30%",a.rate=.023,a.periodic=(i/3).toFixed(2)):2===e?(a.stage=6,a.moneyRate="4.50%",a.rate=.045,a.periodic=(i/6).toFixed(2)):(a.stage=12,a.moneyRate="7.50%",a.rate=.075,a.periodic=(i/9).toFixed(2)),a.serviceFee=(i*a.rate/a.stage).toFixed(2),a.everyTotal=(parseFloat(a.periodic)+parseFloat(a.serviceFee)).toFixed(2),o.push(a)}),console.log(o),e.setState({pay_amount:i,categoryList:n,fenqiList:o})}}),(1===Object(E.c)("is_class")||Object(E.c)("weixinpay"))&&this.payCallback(),Object(E.f)()&&this.isweixinPay()}},{key:"render",value:function(){var e=this,a=this.state,t=a.orderId,n=a.pay_amount,o=a.payType,r=a.checkPeriod,s=a.singleMoney,d=a.periodNumber,p=a.huabei,u=a.fenqiList,m=a.categoryList,y=a.stageNumber;return w.a.createElement("div",{className:"pay-order"},w.a.createElement(x.e,{title:"\u786e\u8ba4\u652f\u4ed8",arrow:!0}),w.a.createElement(l.a,{size:"sm"}),w.a.createElement("div",{className:"order-number"},w.a.createElement(i.a,null,w.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},w.a.createElement("span",null,"\u8ba2\u5355\u53f7"),w.a.createElement("span",{className:"number"},t)))),w.a.createElement(l.a,{size:"md"}),m.map(function(a,t){var n=w.a.createElement("div",{className:"order-info"},w.a.createElement("p",{className:"order-title text-overflow-one"},w.a.createElement(k.b,{to:"/detail?id=".concat(a.course_id)},a.course_title)),w.a.createElement("p",{className:"order-content text-overflow-2"},a.simpledescription),w.a.createElement("p",{className:"order-des"},w.a.createElement("span",{className:"order-newprice"},"\xa5",a.price1),w.a.createElement("span",{className:"order-price"},"\xa5",a.price0)));return w.a.createElement(x.i,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),w.a.createElement(l.a,{size:"md"}),w.a.createElement("div",{className:"order-number"},w.a.createElement(i.a,null,w.a.createElement(c.a,{justify:"between",align:"center",style:{height:"44px"}},w.a.createElement("span",null,"\u652f\u4ed8\u91d1\u989d"),w.a.createElement("span",{className:"money"},"\uffe5".concat(n))))),w.a.createElement(l.a,{size:"md"}),w.a.createElement(v.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},_.map(function(a){return w.a.createElement(N,{thumb:w.a.createElement("i",{className:"iconfont ".concat(a.icon," ").concat(o===a.value?"checked":"")}),key:a.value,checked:o===a.value,onChange:function(){return e.onChange(a.value)}},2===a.value?w.a.createElement(c.a,{direction:"column",align:"start",style:{width:"100%",marginTop:"6px"}},w.a.createElement(c.a,{direction:"row",justify:"between",style:{width:"100%",paddingRight:"30px"}},w.a.createElement("span",{style:{color:"#555555",fontSize:"14px"}},a.label),r?w.a.createElement("span",{style:{color:"#333333",fontSize:"12px"}},"".concat(s,"\u5143 \xd7 ").concat(d,"\u671f")):null),w.a.createElement(c.a,{justify:"start"},w.a.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\u652f\u4ed8\u4e0a\u9650\u53d7\u9650\u4e8e\u60a8\u7684\u82b1\u5457\u989d\u5ea6"))):a.label)})),w.a.createElement("div",{className:"pay-tip"},"\u8bf7\u572824\u5c0f\u65f6\u5185\u5b8c\u6210\u652f\u4ed8\uff0c\u5426\u5219\u5c4a\u65f6\u7cfb\u7edf\u5c06\u5173\u95ed\u8be5\u8ba2\u5355\u3002"),w.a.createElement("div",{className:"pay-button",onClick:this.pay},"\u786e\u8ba4\u652f\u4ed8"),p?w.a.createElement("div",{className:"check-staging"},w.a.createElement("div",{className:"container"},w.a.createElement("p",{className:"check-title"},"\u8bf7\u9009\u62e9\u5206\u671f"),u.map(function(a){return w.a.createElement(N,{key:a.value,checked:y===a.value,onChange:function(){return e.checkStaging(a)}},"".concat(a.everyTotal,"\u5143 \xd7 ").concat(a.stage,"\u671f"),w.a.createElement(v.a.Item.Brief,null,"\u624b\u7eed\u8d39".concat(a.serviceFee,"\u5143/\u671f\uff0c\u8d39\u7387").concat(a.moneyRate)))}))):null)}}]),a}(b.Component)}}]);
//# sourceMappingURL=PayOrder.c11cca91.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{722:function(e,t,a){},791:function(e,t,a){"use strict";a.r(t);a(616);var c=a(617),n=a.n(c),r=a(24),s=(a(43),a(14)),i=a.n(s),o=a(7),l=a(8),d=a(10),u=a(9),h=a(11),m=(a(253),a(97)),p=a.n(m),f=a(0),v=a.n(f),E=a(18),g=a(37),k=a(87),b=a(16),N=a(154),j=function(e){function t(e){var a;return Object(o.a)(this,t),(a=Object(d.a)(this,Object(u.a)(t).call(this,e))).state={val:e.item.value},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"onChange",value:function(e,t){var a=e.target.checked;this.props.checkChange(t,a)}},{key:"render",value:function(){var e=this,t=this.props.item,a=v.a.createElement("div",{className:"order-info"},v.a.createElement("p",{className:"order-title text-overflow-one"},v.a.createElement(b.b,{to:"/detail?id=".concat(t.course_id)},t.course_title)),v.a.createElement("p",{className:"order-content text-overflow-2"},t.simpledescription),v.a.createElement("p",{className:"order-des"},v.a.createElement("span",{className:"order-newprice"},"\xa5",t.price1),v.a.createElement("span",{className:"order-price"},"\xa5",t.price0)));return v.a.createElement("div",{className:"cart-c-item"},v.a.createElement("div",{className:"cart-c-check"},v.a.createElement(n.a,{checked:t.check,onChange:function(a){e.onChange(a,t.course_id)}})),v.a.createElement("div",{className:"card-wrap"},v.a.createElement(N.a,{info:a,src:t.image_name,id:t.course_id})))}}]),t}(f.Component),y=function(e){function t(){return Object(o.a)(this,t),Object(d.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-main"},v.a.createElement("div",{className:"cart-c-body"},this.props.data.length>0?this.props.data.map(function(t,a){return v.a.createElement(j,{index:a,changeStock:function(t,a){e.props.changeStock(t,a)},checkChange:function(t,a){e.props.checkChange(t,a)},key:a,item:t})}):v.a.createElement("div",{className:"cart-tip"},v.a.createElement("p",{className:"cart-mess"},"\u8fd9\u91cc\u662f\u7a7a\u7684\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),v.a.createElement(b.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(f.Component),O=(a(722),a(15)),C=a.n(O),w=a(3),S=p.a.alert,_=function(e){function t(e){var a;return Object(o.a)(this,t),(a=Object(d.a)(this,Object(u.a)(t).call(this,e))).getList=function(){w.d.get("".concat(w.a.home,"/m/cart/list")).then(function(e){200===e.data.code?a.setState({data:e.data.data.courses,isLoading:!1}):i.a.info(e.data.msg,2)})},a.tobuy=function(){w.d.get("".concat(w.a["pay-api"],"/m/cart/addtopreorder/[").concat(a.state.courseIdarr,"]")).then(function(e){0==e.data.errno?a.props.history.push("/order"):i.a.info(e.data.msg,2)})},a.todelete=function(){a.state.courseIdarr.length>0&&S("","\u786e\u5b9a\u4ece\u8d2d\u7269\u8f66\u4e2d\u5220\u9664\uff1f",[{text:"\u53d6\u6d88",onPress:function(){return console.log("cancel")}},{text:"\u786e\u8ba4",onPress:function(){var e={course_ids:a.state.courseIdarr};w.d.post("".concat(w.a.home,"/m/cart/remove"),e).then(function(e){200===e.data.code?a.getList():i.a.info(e.data.msg,2)})}}])},a.state={data:[],checkedNum:0,allPrice:0,cartNmu:0,courseIdarr:[],isLoading:!0},a}return Object(h.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.getList()}},{key:"allChange",value:function(e){var t=e.target.checked,a=this.state.data.map(function(e,a){return Object(r.a)({},e,{check:t})});if(this.setState({data:a}),this.calc(a),t){var c=[];a.map(function(e,t){c.push(e.course_id)}),this.setState({courseIdarr:c})}else this.setState({courseIdarr:[]})}},{key:"checkChange",value:function(e,t){var a=this,c=this.state.data.map(function(a,c){return a.course_id===e?Object(r.a)({},a,{check:t}):a});this.setState({data:c}),this.calc(c);var n=[];c.forEach(function(e,t){e.check?(n.push(e.course_id),a.setState({courseIdarr:n})):a.setState({courseIdarr:n})})}},{key:"calc",value:function(e){var t=0,a=0,c=0,n=[];e.forEach(function(e,r){e.check&&(n.push(e),c+=1,a=n.length,t+=parseFloat(e.price1))}),this.setState({checkedNum:a,allPrice:t,cartNmu:c})}},{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"cart-page",style:{overflow:"hidden"}},v.a.createElement(g.e,{title:"\u8d2d\u7269\u8f66",arrow:!0,cart:!1,delete:!0,toDelete:this.todelete}),v.a.createElement(k.a,{isLoading:this.state.isLoading},v.a.createElement("div",{className:"cart-body"},v.a.createElement(y,{checkChange:this.checkChange.bind(this),data:this.state.data}),v.a.createElement("div",{className:"cart-footer"},v.a.createElement("div",{className:"cart-label"},v.a.createElement(n.a,{onChange:function(t){e.allChange(t)}}),v.a.createElement("div",null,"\u5168\u9009")),v.a.createElement("div",{className:"all-pirce"},v.a.createElement("p",null,v.a.createElement("span",null,"\u5408\u8ba1\uff1a"),v.a.createElement("span",null,"\uffe5",this.state.allPrice))),v.a.createElement("div",{className:C()({active:this.state.checkedNum>0}),onClick:function(){e.state.checkedNum>0&&e.tobuy()}},"\u7ed3\u7b97",v.a.createElement("span",null," ( ",this.state.checkedNum," ) "))))))}}]),t}(f.Component);t.default=Object(E.b)()(_)}}]);
//# sourceMappingURL=ShopCart.ef7e0bd6.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{619:function(e,t,a){},620:function(e,t,a){},621:function(e,t,a){},622:function(e,t,a){},788:function(e,t,a){"use strict";a.r(t);var n=a(25),o=(a(43),a(14)),c=a.n(o),s=a(114),i=a(7),r=a(8),l=a(10),u=a(9),p=a(11),d=a(0),m=a.n(d),h=(a(619),a(620),a(621),a(15)),f=a.n(h),v=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).clearInput=function(){a.props.onChange("")},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props,t=e.type,a=e.placeholder;return m.a.createElement("div",{className:"custom-input-wrapper"},m.a.createElement("input",{type:t,className:f()("custom-input"),placeholder:a,onChange:this.props.onChange,value:this.props.value}),m.a.createElement("i",{className:f()("iconfont icondanseshixintubiao-3",{hide:0===this.props.value.length}),onClick:this.clearInput}))}}]),t}(d.Component);v.defaultProps={type:"text",placeholder:""};var C=v,g=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).state={},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onChange,a=e.redeemCode,n=e.exchange;return m.a.createElement("div",{className:"exchange-bar"},m.a.createElement(C,{placeholder:"\u8bf7\u8f93\u5165\u4f18\u60e0\u7801",onChange:t,value:a}),m.a.createElement("button",{className:f()({active:a&&a.length>0}),onClick:n},"\u5151\u6362"))}}]),t}(d.Component),b=(a(622),function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).pick=function(){var e=a.props,t=e.useCoupon;!e.invalid&&t&&t(a.props.id)},a.GoToUse=function(){a.props.useCoupon(a.props.id)},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props,t=e.ctype,a=e.amount,n=e.format_expire_time,o=e.limit_course,c=e.invalid,s=e.course_title,i=e.id,r=e.selectedCouponId,l=e.showUseButton;return m.a.createElement("li",{className:"coupon",onClick:this.pick},m.a.createElement("div",{className:f()("coupon-info",c?"invalid":"coupon-type".concat(t))},m.a.createElement("p",{className:"type"},1===t?"\u4ee3\u91d1\u5238":"\u8bfe\u7a0b\u5238"),1===t?m.a.createElement("p",{className:"denomination"},a," ",m.a.createElement("span",null,"\u5143")):m.a.createElement("p",{className:"course-title"},s),m.a.createElement("p",{className:"expire"},"\u6709\u6548\u671f\u81f3\uff1a",n),r===i&&m.a.createElement("i",{className:f()("iconfont icondanseshixintubiao-5",{check:!c})}),m.a.createElement("ul",null,new Array(19).fill("a").map(function(e,t){return m.a.createElement("li",{key:t})}))),m.a.createElement("div",{className:"coupon-des"},m.a.createElement("span",{className:"limit"},0===o?"\u53ef\u7528\u4e8e\u5927\u4e8e\u4ee3\u91d1\u5238\u91d1\u989d\u7684\u8bfe\u7a0b":"\u4ec5\u9002\u7528\u4e8e\u300a".concat(s,"\u300b")),l&&m.a.createElement("button",{className:"use",onClick:this.GoToUse},"\u7acb\u5373\u4f7f\u7528")))}}]),t}(d.PureComponent)),y=a(3),E=a(72),j=a(36),O=a(37),_=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(o)))).state={selectedCouponId:0,redeemCode:"",couponList:[],valid_coupons:[],invalid_coupons:[],courseId:Object(y.c)("id"),showUseButton:!1},a.handleChange=function(e){var t=e?e.target.value:"";a.setState({redeemCode:t})},a.exchange=function(){""!==a.state.redeemCode?y.d.post("".concat(y.a.home,"/m/coupon/exchange"),{code:a.state.redeemCode}).then(function(e){var t=e.data;if(200===t.code){var n=t.data;if(a.state.showUseButton)a.setState({couponList:[].concat(Object(s.a)(state.couponList),[n]),redeemCode:""});else{var o=t.data;2==o.ctype&&o.limit_course!=a.state.courseId?a.setState({invalid_coupons:[].concat(Object(s.a)(a.state.invalid_coupons),[o]),showUseButton:null}):a.setState({valid_coupons:[].concat(Object(s.a)(a.state.valid_coupons),[o]),redeemCode:""})}c.a.info("\u5151\u6362\u6210\u529f")}else c.a.info(t.msg)}):c.a.info("\u8bf7\u8f93\u5165\u5151\u6362\u7801")},a.getMyCoupons=function(){y.d.get("".concat(y.a.home,"/m/coupon/all")).then(function(e){var t=e.data;200===t.code?a.setState({couponList:Object(j.isEmpty)(t.data)?[]:t.data}):c.a.info(t.msg)})},a.getAllCoupons=function(){y.d.post("".concat(y.a.home,"/m/coupon/select"),{course_id:a.state.courseId}).then(function(e){var t=e.data;if(200===t.code){var n=t.data.inuse_coupon;a.setState({valid_coupons:n?[].concat(Object(s.a)(n),Object(s.a)(t.data.valid_coupons)):t.data.valid_coupons,invalid_coupons:t.data.invalid_coupons,selectedCouponId:n.length?n[0].id:0})}else c.a.info(t.msg)})},a.useCoupon=function(e){var t=a.props.history,n=a.state.couponList.find(function(t){return t.id===e});if(e)if(a.state.showUseButton)1===n.ctype?t.push("/classify"):t.push("/detail?id=".concat(n.limit_course));else{var o=a.state,s=o.courseId;o.selectedCouponId===e?y.d.post("".concat(y.a.home,"/m/coupon/cancel"),{course_id:s}).then(function(e){var t=e.data;200===t.code?a.setState({selectedCouponId:0}):c.a.info(t.msg)}):y.d.post("".concat(y.a.home,"/m/coupon/use"),{course_id:a.state.courseId,coupon_id:e}).then(function(t){var n=t&&t.data;200===n.code?(a.setState({selectedCouponId:e}),a.props.history.goBack()):c.a.info(n.msg)})}else c.a.info("\u672a\u77e5\u9519\u8bef"),location.reload()},a}return Object(p.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.history,a=e.location,n=this.props.location.state;n&&n.from&&("/my"===n.from?(this.getMyCoupons(),this.setState({showUseButton:!0})):(this.state.courseId||(a.state&&a.state.from?t.replace(a.state.from):t.goBack()),this.getAllCoupons()))}},{key:"render",value:function(){var e=this.props.location.state,t=this.state,a=t.showUseButton,n=t.selectedCouponId;return m.a.createElement("div",{className:"use-coupon"},m.a.createElement(O.e,{title:"\u4f18\u60e0\u5238",arrow:!0}),m.a.createElement(g,{onChange:this.handleChange,exchange:this.exchange,redeemCode:this.state.redeemCode}),m.a.createElement("div",{className:"coupons-area"},m.a.createElement(w,{coupons:e&&e.from&&"/my"===e.from?this.state.couponList:this.state.valid_coupons,showUseButton:a,selectedCouponId:n,select:this.select,useCoupon:this.useCoupon}),this.state.invalid_coupons.length>0&&m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{className:"invalid-title"},"- \u4e0d\u53ef\u4f7f\u7528\u7684\u4f18\u60e0\u5238 -"),m.a.createElement(w,{coupons:this.state.invalid_coupons,selectedCouponId:n,select:this.select,purpose:"use",invalid:"invalid"}))))}}]),t}(d.PureComponent);function w(e){var t=e.coupons,a=Object(n.a)(e,["coupons"]);return 0===t.length?m.a.createElement("div",{className:"empty"},m.a.createElement("p",null,"\u6682\u65e0\u53ef\u4f7f\u7528\u7684\u4f18\u60e0\u5238")):m.a.createElement("ul",null,t.map(function(e){return m.a.createElement(b,Object.assign({key:e.id},e,{id:e.id},a))}))}t.default=Object(E.a)(_)}}]);
//# sourceMappingURL=coupons.015e3323.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.
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{706:function(e,a,t){},775:function(e,a,t){"use strict";t.r(a);t(43);var n=t(14),c=t.n(n),r=t(7),s=t(8),m=t(10),i=t(9),o=t(11),l=(t(253),t(97)),d=t.n(l),u=t(0),p=t.n(u),E=(t(706),t(37)),f=t(154),N=t(3),b=t(16),g=t(87),v=d.a.alert,h=function(e){function a(e){var t;return Object(r.a)(this,a),(t=Object(m.a)(this,Object(i.a)(a).call(this,e))).getList=function(){N.d.get("".concat(N.a.home,"/m/my/orders/1/1")).then(function(e){200===e.data.code?t.setState({data:e.data.data,isLoading:!1}):c.a.info(e.data.msg,2)})},t.cancel=function(e){v("\u786e\u8ba4\u53d6\u6d88\u8ba2\u5355\uff1f","\u8ba2\u5355\u53d6\u6d88\u540e\uff0c\u4f18\u60e0\u5238\u548c\u62b5\u6263\u7684\u4f59\u989d\u4f1a\u8fd4\u56de\u5230\u60a8\u7684\u8d26\u6237\u3002",[{text:"\u53d6\u6d88",onPress:function(){return console.log("cancel")}},{text:"\u786e\u8ba4",onPress:function(){var a={order_id:e};N.d.post("".concat(N.a.home,"/m/cancel_order"),a).then(function(e){200===e.data.code?t.getList():c.a.info(e.data.msg,2)})}}])},t.state={data:[],isLoading:!0},t}return Object(o.a)(a,e),Object(s.a)(a,[{key:"componentDidMount",value:function(){this.getList()}},{key:"render",value:function(){var e=this;return p.a.createElement("div",{className:"myorders-box"},p.a.createElement(E.e,{title:"\u6211\u7684\u8ba2\u5355",arrow:!0,cart:!1}),p.a.createElement(g.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?this.state.data.map(function(a,t){return p.a.createElement("div",{className:"order-body",key:t},p.a.createElement(_,{item:a}),a.course&&a.course.length>0&&a.course.map(function(e,a){var t=p.a.createElement("div",{className:"order-info"},p.a.createElement("p",{className:"order-title text-overflow-one"},p.a.createElement(b.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),p.a.createElement("p",{className:"order-content text-overflow-2"},e.description),p.a.createElement("p",{className:"order-des"},p.a.createElement("span",{className:"order-newprice"},"\xa5",e.pay_amount),p.a.createElement("span",{className:"order-price"},"\xa5",e.price0)));return p.a.createElement("div",{className:"order-wrap",key:a},p.a.createElement(f.a,{info:t,src:e.image_name,id:e.course_id}))}),p.a.createElement(y,{item:a,cancel:e.cancel}))}):p.a.createElement("div",{className:"cart-tip"},p.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8ba2\u5355\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),p.a.createElement(b.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),a}(u.Component);function _(e){var a;return a="0"===e.item.pay_time&&0===e.item.member_num?p.a.createElement("span",{className:"oid-status"},"\u7b49\u5f85\u652f\u4ed8"):e.item.member_num===e.item.pdd_info.length&&0!==e.item.member_num?p.a.createElement("span",{className:"oid-success"},"\u62fc\u56e2\u6210\u529f"):p.a.createElement("span",{className:"oid-success"},"\u652f\u4ed8\u6210\u529f"),p.a.createElement("div",{className:"order-head"},p.a.createElement("span",{className:"oid-num"},"\u8ba2\u5355\u53f7\uff1a",e.item.oid),a)}function y(e){return p.a.createElement("div",{className:"order-btm"},p.a.createElement("div",{className:"price-info"},p.a.createElement("p",null,p.a.createElement("span",{className:"payable"},"\u5e94\u4ed8\uff1a"),p.a.createElement("span",{className:"price"},"\xa5",e.item.pay_amount)),p.a.createElement("p",null,p.a.createElement("span",{className:"payable"},"\u5df2\u4f18\u60e0\uff1a"),p.a.createElement("span",{className:"price"},"\xa5",e.item.coupon_amount))),"0"===e.item.pay_time&&0===e.item.member_num&&p.a.createElement("div",{className:"btm-right"},p.a.createElement("button",{className:"cancel",onClick:function(a){return e.cancel(e.item.oid)}},"\u53d6\u6d88\u8ba2\u5355"),p.a.createElement(b.b,{to:"/payorder?oid=".concat(e.item.oid)},"\u53bb\u652f\u4ed8")),0!==e.item.member_num&&p.a.createElement("div",{className:"btm-right"},p.a.createElement("div",{className:"group"},e.item.pdd_info&&e.item.pdd_info.length>0&&e.item.pdd_info.map(function(e,a){return p.a.createElement("img",{src:""===e.user_avatar?"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-spreadtrain8/ellipsis.png":e.user_avatar,key:a,alt:""})}))))}a.default=h}}]);
//# sourceMappingURL=myorders.7769019f.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{707:function(e,t,a){},776:function(e,t,a){"use strict";a.r(t);a(43);var n=a(14),s=a.n(n),c=a(7),i=a(8),r=a(10),o=a(9),d=a(11),l=a(0),m=a.n(l),u=(a(707),a(37)),p=a(3),f=a(16),h=a(18),E=a(87),b=function(e){function t(e){var a;return Object(c.a)(this,t),(a=Object(r.a)(this,Object(o.a)(t).call(this,e))).getList=function(){p.d.get("".concat(p.a.home,"/m/my/courses")).then(function(e){200===e.data.code?a.setState({data:e.data.data,isLoading:!1}):s.a.info(e.data.msg,2)})},a.state={data:[],isLoading:!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.props.user,t=e&&e.data&&e.data.uid;return m.a.createElement("div",{className:"purchased-box"},m.a.createElement(u.e,{title:"\u5df2\u8d2d\u8bfe\u7a0b",arrow:!0,cart:!1}),m.a.createElement(E.a,{isLoading:this.state.isLoading},this.state.data&&this.state.data.length>0?m.a.createElement("div",{className:"purchased-body"},m.a.createElement("div",{className:"tip"},"\u52a0\u7fa4\u8bf7\u5907\u6ce8\u60a8\u7684\u5b66\u53f7\uff1a",t),this.state.data.map(function(e,t){var a=m.a.createElement("div",{className:"info"},m.a.createElement("p",{className:"title"},m.a.createElement(f.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),m.a.createElement("p",{className:"contact text-overflow-2"},e.simpledescription),m.a.createElement("div",{className:"des"},"QQ\u7fa4\uff1a",e.course_qq));return m.a.createElement(u.i,{key:t,img:e.image_name,id:e.course_id,info:a})})):m.a.createElement("div",{className:"cart-tip"},m.a.createElement("p",{className:"cart-mess"},"\u60a8\u8fd8\u6ca1\u6709\u8bfe\u7a0b\u54e6\uff0c\u5feb\u53bb\u901b\u901b\u5427~"),m.a.createElement(f.b,{to:"/classify"},"\u53bb\u901b\u901b"))))}}]),t}(l.Component);t.default=Object(h.b)(function(e){return{user:e.user}},null)(b)}}]);
//# sourceMappingURL=purchased.5acc42cc.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/purchased/index.js"],"names":["Purchased","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","getList","http","get","concat","api","home","then","res","data","code","setState","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","state","user","uid","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_9__","title","arrow","cart","_common_Loading__WEBPACK_IMPORTED_MODULE_13__","length","map","item","index","Info","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","course_id","course_title","simpledescription","course_qq","key","img","image_name","id","Component","connect"],"mappings":"wPASMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAYVQ,QAAU,WACNC,IAAKC,IAAL,GAAAC,OAAYC,IAAIC,KAAhB,kBAAsCC,KAAK,SAACC,GAClB,MAAlBA,EAAIC,KAAKC,KACThB,EAAKiB,SAAS,CACVF,KAAMD,EAAIC,KAAKA,KACfG,WAAW,IAGfC,EAAAC,EAAMC,KAAKP,EAAIC,KAAKO,IAAK,MAnBjCtB,EAAKuB,MAAQ,CACTR,KAAM,GACNG,WAAW,GAJAlB,mFASfG,KAAKI,2CAkBA,IACEiB,EAAQrB,KAAKJ,MAAbyB,KACDC,EAAMD,GAAQA,EAAKT,MAAQS,EAAKT,KAAKU,IAC3C,OACIC,EAAAN,EAAAO,cAAA,OAAKC,UAAU,iBACXF,EAAAN,EAAAO,cAACE,EAAA,EAAD,CAAWC,MAAM,2BAAOC,OAAO,EAAMC,MAAM,IAC3CN,EAAAN,EAAAO,cAACM,EAAA,EAAD,CAASf,UAAWf,KAAKoB,MAAML,WAEvBf,KAAKoB,MAAMR,MAAQZ,KAAKoB,MAAMR,KAAKmB,OAAS,EACxCR,EAAAN,EAAAO,cAAA,OAAKC,UAAU,kBACXF,EAAAN,EAAAO,cAAA,OAAKC,UAAU,OAAf,+DAAgCH,GAE5BtB,KAAKoB,MAAMR,KAAKoB,IAAI,SAACC,EAAMC,GACvB,IAAMC,EACFZ,EAAAN,EAAAO,cAAA,OAAKC,UAAU,QACXF,EAAAN,EAAAO,cAAA,KAAGC,UAAU,SACTF,EAAAN,EAAAO,cAACY,EAAA,EAAD,CAAMC,GAAE,cAAA9B,OAAgB0B,EAAKK,YACxBL,EAAKM,eAGdhB,EAAAN,EAAAO,cAAA,KAAGC,UAAU,2BAA2BQ,EAAKO,mBAC7CjB,EAAAN,EAAAO,cAAA,OAAKC,UAAU,OAAf,iBACSQ,EAAKQ,YAItB,OACIlB,EAAAN,EAAAO,cAACE,EAAA,EAAD,CAAOgB,IAAKR,EAAOS,IAAKV,EAAKW,WACtBC,GAAIZ,EAAKK,UACTpB,KAAMiB,OAK3BZ,EAAAN,EAAAO,cAAA,OAAKC,UAAU,YACbF,EAAAN,EAAAO,cAAA,KAAGC,UAAU,aAAb,mFACAF,EAAAN,EAAAO,cAACY,EAAA,EAAD,CAAMC,GAAG,aAAT,gCAhERS,aA0ETC,sBACX,SAAA3B,GAAK,MAAK,CAACC,KAAMD,EAAMC,OACvB,KAFW0B,CAGbpD","file":"static/js/purchased.5acc42cc.chunk.js","sourcesContent":["import React, {Component} from 'react';\nimport './index.scss';\nimport {HeaderBar, VList} from '../../common'\nimport {http, api} from \"@/utils\";\nimport {Link} from 'react-router-dom'\nimport {Toast} from 'antd-mobile'\nimport {connect} from \"react-redux\"\nimport Loading from '@/common/Loading'\n\nclass Purchased extends Component {\n constructor(props) {\n super(props)\n this.state = {\n data: [],\n isLoading: true\n }\n }\n\n componentDidMount() {\n this.getList()\n }\n\n // 获取订单\n getList = () => {\n http.get(`${api.home}/m/my/courses`,).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n data: res.data.data,\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n\n\n render() {\n const {user} = this.props\n const uid = user && user.data && user.data.uid\n return (\n <div className='purchased-box'>\n <HeaderBar title='已购课程' arrow={true} cart={false}></HeaderBar>\n <Loading isLoading={this.state.isLoading}>\n {\n this.state.data && this.state.data.length > 0 ?\n <div className=\"purchased-body\">\n <div className='tip'>加群请备注您的学号:{uid}</div>\n {\n this.state.data.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title'>\n <Link to={`/detail?id=${item.course_id}`}>\n {item.course_title}\n </Link>\n </p>\n <p className='contact text-overflow-2'>{item.simpledescription}</p>\n <div className='des'>\n QQ群:{item.course_qq}\n </div>\n </div>\n )\n return (\n <VList key={index} img={item.image_name}\n id={item.course_id}\n info={Info}></VList>\n )\n })\n }\n </div>\n : <div className=\"cart-tip\">\n <p className='cart-mess'>您还没有课程哦,快去逛逛吧~</p>\n <Link to='/classify'>去逛逛</Link>\n </div>\n }\n </Loading>\n\n </div>\n )\n }\n}\n\nexport default connect(\n state => ({user: state.user}),\n null\n)(Purchased)\n"],"sourceRoot":""}
\ No newline at end of file
!function(e){function r(r){for(var n,a,i=r[0],u=r[1],f=r[2],d=0,l=[];d<i.length;d++)a=i[d],o[a]&&l.push(o[a][0]),o[a]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,f||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,a=1;a<t.length;a++){var u=t[a];0!==o[u]&&(n=!1)}n&&(c.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},a={17:0},o={17:0},c=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[];a[e]?r.push(a[e]):0!==a[e]&&{0:1,1:1,2:1,3:1,4:1,6:1,8:1,9:1,10:1,11:1,12:1,13:1,15:1,16:1,18:1,19:1,20:1,21:1,22:1,24:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="static/css/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"coupons",13:"detail",15:"myorders",16:"purchased",18:"search",19:"shareposter",20:"study",21:"togroup",22:"video"}[e]||e)+"."+{0:"2754569f",1:"de22eb69",2:"8380ee3a",3:"2e7d81ca",4:"1a38e85d",5:"31d6cfe0",6:"6576554c",7:"31d6cfe0",8:"21570c76",9:"9e36ac9a",10:"ff3041a1",11:"a93db4c0",12:"9ece7350",13:"deae77c4",15:"3ab93c8e",16:"72c55bd6",18:"ffcfa6db",19:"82081d02",20:"50a142e7",21:"49988cae",22:"10e4a7e1",24:"1597b3e9",25:"31d6cfe0",26:"31d6cfe0",27:"31d6cfe0",28:"31d6cfe0",29:"31d6cfe0",30:"31d6cfe0"}[e]+".chunk.css",o=i.p+n,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var f=(s=c[u]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(f===n||f===o))return r()}var d=document.getElementsByTagName("style");for(u=0;u<d.length;u++){var s;if((f=(s=d[u]).getAttribute("data-href"))===n||f===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var n=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.request=n,delete a[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){a[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var c,u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(e){return i.p+"static/js/"+({0:"BargainMiddlePage",1:"Classify",2:"CourseList",3:"DrawDocument",4:"Examination",5:"MyEdit",6:"Order",7:"Orderinfo",8:"PayOrder",9:"Preferential",10:"SearchResult",11:"ShopCart",12:"coupons",13:"detail",15:"myorders",16:"purchased",18:"search",19:"shareposter",20:"study",21:"togroup",22:"video"}[e]||e)+"."+{0:"9e93956f",1:"bf48773a",2:"e3c83897",3:"fb2e2e93",4:"6359fa0c",5:"d50bc106",6:"7e2daa20",7:"42d2809e",8:"c11cca91",9:"700806b6",10:"1d05ebf2",11:"ef7e0bd6",12:"015e3323",13:"17bffc34",15:"7769019f",16:"5acc42cc",18:"30733dd6",19:"3ebdba6f",20:"1976e3fa",21:"0a7b9efe",22:"f7e77157",24:"547b470e",25:"e0811e0b",26:"e94827f2",27:"77b41a3d",28:"a7140957",29:"b505e531",30:"71ffdc1e"}[e]+".chunk.js"}(e),c=function(r){u.onerror=u.onload=null,clearTimeout(f);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 f=setTimeout(function(){c({type:"timeout",target:u})},12e4);u.onerror=u.onload=c,document.head.appendChild(u)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var u=window.webpackJsonp=window.webpackJsonp||[],f=u.push.bind(u);u.push=r,u=u.slice();for(var d=0;d<u.length;d++)r(u[d]);var s=f;t()}([]);
//# sourceMappingURL=runtime~main.37b1df2b.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{596:function(e,t,a){"use strict";a(565);var n=a(568),r=a.n(n),c=a(114),s=a(7),o=a(8),i=a(10),l=a(9),h=a(11),u=a(0),d=a.n(u),m=a(54),p=(a(597),function(e){function t(){var e,a;Object(s.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(i.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(r)))).returnPage=function(){a.props.history.go(-1)},a.search=function(){a.storeKeyword(),a.props.handleSearch()},a.storeKeyword=function(){var e=a.props,t=e.searchHistory,n=void 0===t?[]:t,r=e.value;r&&localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(c.a)(n),[r])))},a}return Object(h.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){this.refs.search.focus()}},{key:"render",value:function(){return d.a.createElement("div",{className:"search-head"},d.a.createElement("div",{className:"left",onClick:this.returnPage},d.a.createElement("i",{className:"iconfont iconiconfront-68"})),d.a.createElement("div",{className:"center"},d.a.createElement(r.a,{value:this.props.value,showCancelButton:!0,cancelText:" ",ref:"search",focus:!0,onChange:this.props.handleChange,placeholder:"\u641c\u7d22\u8bfe\u7a0b"})),d.a.createElement("div",{className:"right right-btn",onClick:this.search},d.a.createElement("div",{className:"submit-btn"},"\u641c\u7d22")))}}]),t}(u.PureComponent));t.a=Object(m.g)(p)},597:function(e,t,a){},750:function(e,t,a){},751:function(e,t,a){},794:function(e,t,a){"use strict";a.r(t);var n=a(746),r=a.n(n),c=a(749),s=a(114),o=a(7),i=a(8),l=a(10),h=a(9),u=a(11),d=a(0),m=a.n(d),p=a(596),f=(a(750),function(e){function t(){return Object(o.a)(this,t),Object(l.a)(this,Object(h.a)(t).apply(this,arguments))}return Object(u.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){return m.a.createElement("span",Object.assign({className:"tag"},this.props),this.props.children)}}]),t}(d.PureComponent)),v=a(3),y=(a(751),a(16)),g=a(87),b=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,r=new Array(n),c=0;c<n;c++)r[c]=arguments[c];return(a=Object(l.a)(this,(e=Object(h.a)(t)).call.apply(e,[this].concat(r)))).state={searchHistory:JSON.parse(localStorage.getItem("searchHistory"))||[],hot_words:[],searchList:[],value:"",isLoading:!0},a.clearHistory=function(){localStorage.setItem("searchHistory",null),a.setState({searchHistory:[]})},a.handleChange=function(e){a.setState({value:e})},a.handleSearch=function(){a.state.value&&a.props.history.push("/search-result?word=".concat(encodeURIComponent(a.state.value)))},a.storeHistory=function(e){localStorage.setItem("searchHistory",JSON.stringify([].concat(Object(s.a)(a.state.searchHistory),[e])))},a}return Object(u.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=Object(c.a)(r.a.mark(function e(){var t;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.d.get("".concat(v.a["search-api"],"/search_hot_word"));case 2:0===(t=e.sent).data.errno&&this.setState({hot_words:t.data.data.info.hot_words,isLoading:!1});case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.state.searchHistory;return m.a.createElement("div",{className:"search-page"},m.a.createElement(p.a,{searchHistory:this.state.searchHistory,value:this.state.value,handleChange:this.handleChange,handleSearch:this.handleSearch}),m.a.createElement(g.a,{isLoading:this.state.isLoading},m.a.createElement("div",{className:"search-main"},m.a.createElement("div",{className:"search-land"},m.a.createElement("div",{className:"search-history"},m.a.createElement("span",null,"\u6700\u8fd1\u641c\u7d22"),m.a.createElement("i",{className:"iconfont iconiconfront-56",onClick:this.clearHistory})),m.a.createElement("div",{className:"search-tag"},t.length>0?t.map(function(e,t){return m.a.createElement(y.b,{key:t,to:"/search-result?word=".concat(encodeURIComponent(e))},m.a.createElement(f,null,e))}):m.a.createElement("div",{style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u5386\u53f2"))),m.a.createElement("div",{className:"search-land search-hot"},m.a.createElement("label",null,m.a.createElement("span",null,"\u70ed\u95e8\u641c\u7d22")),m.a.createElement("div",{className:"search-tag"},this.state.hot_words.length>0?this.state.hot_words.map(function(t,a){return m.a.createElement(y.b,{key:a,to:"/search-result?word=".concat(encodeURIComponent(t)),onClick:e.storeHistory.bind(e,t)},m.a.createElement(f,null,t))}):m.a.createElement("div",{style:{textAlign:"center",padding:"20px"}},"\u6682\u65e0\u70ed\u95e8"))))))}}]),t}(d.PureComponent);t.default=b}}]);
//# sourceMappingURL=search.30733dd6.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{684:function(e,t,a){},774:function(e,t,a){"use strict";a.r(t);a(43);var n=a(14),i=a.n(n),s=a(7),r=a(8),c=a(10),o=a(9),l=a(11),d=a(157),m=a(0),g=a.n(m),u=(a(684),a(37)),h=a(3),v=a(685),f=a.n(v),p=function(e){function t(e){var a;return Object(s.a)(this,t),(a=Object(c.a)(this,Object(o.a)(t).call(this,e))).initCanvas=function(e,t){var n=Object(d.a)(Object(d.a)(a)),i=e[t].poster,s=450*e[t].header_position_x,r=800*e[t].header_position_y,c=(e[t].qr_code_x,e[t].qr_code_y,e[t].qr_code_width,e[t].qr_code_height,"/detail/".concat(Object(h.c)("courseId"),"/").concat(Object(h.c)("dist_code")),document.getElementById("canvas")),o=c.getContext("2d");n.getBase64(i).then(function(a){var i=new Image;i.src=a;var c=document.getElementById("qrcode"),l=navigator.userAgent.toLowerCase();l.indexOf("Android")>-1||l.indexOf("Adr"),l.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?c=document.getElementById("qrcode"):/(Android)/i.test(navigator.userAgent)&&(c=document.getElementById("qrcode")),i.setAttribute("crossOrigin","anonymous"),i.onload=function(){o.drawImage(i,0,0,450,800),o.drawImage(c,320,685,100,100),o.fillStyle=e[t].username_color,o.font="16px serif",o.fillText("@"+n.name,s+50+20,r+25),o.font="14px serif",o.fillText("\u6b63\u5728\u5b66\u4e60\u8be5\u8bfe\u7a0b",s+50+20,r+25+20),o.restore()}}).then(function(){n.getBase64(n.state.imgUrl).then(function(e){var t=new Image;t.src=e,t.setAttribute("crossOrigin","anonymous"),t.setAttribute("border-Radius","50%"),t.onload=function(){n.imgPosition(o,t,s,r,24),o.drawImage(t,s,r,48,48),o.restore(),n.setState({billSrc:n.convertCanvasToImage(c)})}})})},a.children=function(e,t){var a=e.childNodes,n=[];if(/MSIE(6|7|8)/.test(navigator.userAgent))for(var i=0;i<a.length;i++){var s=a[i];1===s.nodeType&&(n[n.length]=s)}else n=Array.prototype.slice.call(e.children);if("string"===typeof t)for(var r=0;r<n.length;r++)(e=n[r]).nodeName.toLowerCase()!==t.toLowerCase()&&(n.splice(r,1),r--);return n},a.imgPosition=function(e,t,a,n,i){e.save();var s=a+i,r=n+i;e.beginPath(),e.arc(s,r,i,0,2*Math.PI),e.clip()},a.getBase64Image=function(e){var t=document.createElement("canvas");t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0,e.width,e.height);var a=e.src.substring(e.src.lastIndexOf(".")+1).toLowerCase();return t.toDataURL("image/"+a)},a.convertCanvasToImage=function(e){var t=new Image;return t.src=e.toDataURL("image/png"),t},a.squareClick=function(e){a.setState({smallactive:e}),a.initCanvas(a.state.bgImage,e)},a.state={codeSrc:"",billSrc:"",imgUrl:"",smallListImg:[],smallactive:0,distPrice:"",name:"",bgImage:[]},a}return Object(l.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.getCodeWe(),h.d.get("".concat(h.a.home,"/m/dist/posters/").concat(Object(h.c)("courseId"),"/").concat(Object(h.c)("uid"))).then(function(t){200===t.data.code?(e.setState({imgUrl:t.data.data.avatar,smallListImg:t.data.data.list,distPrice:t.data.data.dist_course,bgImage:t.data.data.list,name:t.data.data.username}),e.initCanvas(e.state.bgImage,0)):i.a.info(t.data.msg,2)})}},{key:"getCodeWe",value:function(){var e=this,t="/detail/".concat(Object(h.c)("courseId"),"/").concat(Object(h.c)("dist_code"));return new Promise(function(a){f.a.toDataURL(t,{},function(t,a){e.setState({codeSrc:a})}),a()})}},{key:"getBase64",value:function(e){var t=this;return new Promise(function(a){var n=null,i=new Image,s=+new Date;i.setAttribute("crossOrigin","anonymous"),i.src=e+"?"+s,i.onload=function(){n=t.getBase64Image(i),a(n)},i.onerror=function(){var a=+new Date;t.getBase64(e+"?"+a)}})}},{key:"render",value:function(){var e=this;return g.a.createElement("div",{className:"share-poster"},g.a.createElement(u.e,{title:"\u751f\u6210\u4e13\u5c5e\u6d77\u62a5",arrow:!0,cart:!1}),g.a.createElement("div",{className:"total-container"},g.a.createElement("div",{className:"placard-img-container",id:"imgWrapper"},g.a.createElement("img",{src:this.state.billSrc.src,alt:""})),g.a.createElement("img",{src:this.state.codeSrc,alt:"",id:"qrcode",className:"placard-code"}),g.a.createElement("canvas",{id:"canvas",width:"450",height:"800",className:""===this.state.billSrc?"":"hide"})),g.a.createElement("div",{className:"placard-desc"},g.a.createElement("span",{className:"placard-sharetxt"},"\u957f\u6309\u4fdd\u5b58\u6d77\u62a5\u5206\u4eab\u7ed9\u597d\u53cb\uff0c\u6bcf\u6709\u4e00\u4eba\u901a\u8fc7\u60a8\u7684\u5206\u4eab\u8d2d\u4e70\u8be5\u8bfe\u7a0b\uff0c\u60a8\u53ef\u4ee5",0===this.state.distPrice.count_type&&g.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97",this.state.distPrice.first_level_tip,"\u5143\u7684\u4f63\u91d1\u5956\u52b1\u3002"),1===this.state.distPrice.count_type&&g.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97\u6210\u4ea4\u91d1\u989d\u7684",this.state.distPrice.first_level_scale,"%\u4f5c\u4e3a\u4f63\u91d1\u5956\u52b1\u3002"))),g.a.createElement("div",{className:"placard-swiper"},g.a.createElement("ul",{className:"placard-list"},this.state.smallListImg&&this.state.smallListImg.length>0&&this.state.smallListImg.map(function(t,a){return g.a.createElement("li",{onClick:e.squareClick.bind(e,a),key:a,className:e.state.smallactive===a?"active":""},g.a.createElement("img",{src:t.square,alt:""}))}))))}}]),t}(m.Component);t.default=p}}]);
//# sourceMappingURL=shareposter.3ebdba6f.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{708:function(e,a,t){},777:function(e,a,t){"use strict";t.r(a);t(152);var n=t(74),c=t.n(n),s=(t(86),t(23)),r=t.n(s),i=(t(151),t(33)),o=t.n(i),l=(t(43),t(14)),m=t.n(l),d=t(24),u=t(7),p=t(8),E=t(10),_=t(9),g=t(11),f=t(0),N=t.n(f),v=(t(708),t(37)),h=t(3),b=(t(18),t(16)),w=function(e){function a(e){var t;return Object(u.a)(this,a),(t=Object(E.a)(this,Object(_.a)(a).call(this,e))).invitedFriends=function(){var e=t.state,a=e.pdd_price,n=e.number,c=e.data;if(h.b.isWeixin){var s=t.state.share;t.setState({share:!s});var r={title:"\u3010\u4ec5\u5269".concat(n,"\u4e2a\u540d\u989d\u3011\u6211").concat(a,"\u5143\u62fc\u4e86\u300a").concat(c.course_title,"\u300b"),desc:c.course_title,link:location.origin+"/detail??id=".concat(c.course_id),imgUrl:c.image_name};h.d.post("".concat(h.a["pay-api"],"/m/sale/signature")).then(function(e){var a=e.data,t=a.nonce_str,n=a.signature,c=a.timestamp;wx.config({debug:!1,appId:"wx23dac6775ac82877",timestamp:c,nonceStr:t,signature:n,jsApiList:["hideMenuItems","showMenuItems","updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareAppMessage"]})}),wx.ready(function(){wx.hideAllNonBaseMenuItem(),wx.showMenuItems({menuList:["menuItem:share:appMessage","menuItem:share:timeline"]}),wx.updateAppMessageShareData(Object(d.a)({},r,{success:function(){}})),wx.updateTimelineShareData(Object(d.a)({},r,{success:function(){}}))})}else m.a.info("\u8bf7\u5728\u5fae\u4fe1\u4e2d\u4f7f\u7528\u5206\u4eab\u529f\u80fd\uff01",2)},t.state={data:{},share:!1,pdd_price:0,groupon_member:[],person_num:0,is_success:!1,userInfo:{},number:0},t}return Object(g.a)(a,e),Object(p.a)(a,[{key:"componentDidMount",value:function(){var e=this;Promise.all([h.d.get("".concat(h.a["pay-api"],"/pdd/goupon_pay_page/").concat(Object(h.c)("id"))),h.d.get("".concat(h.a.home,"/m/user_info"))]).then(function(a){console.log(a);var t=a[0],n=a[1];if(e.setState({data:t.data.data.course_info,pdd_price:t.data.data.pdd_price,groupon_member:t.data.data.groupon_member,is_success:t.data.data.is_success,person_num:t.data.data.person_num,course_list:t.data.data.course_list,userInfo:n,number:t.data.data.number,countdown:""}),0===t.data.data.is_success){var c=1e3*t.data.data.end_time,s=0,r=0,i=0;setInterval(function(){c-=1e3,s="".concat(parseInt(c/36e5)).padStart(2,0),r="".concat(parseInt((c-36e5*s)/6e4)).padStart(2,0),i="".concat(parseInt((c-36e5*s-6e4*r)/1e3)).padStart(2,0),e.setState({countdown:"".concat(s,":").concat(r,":").concat(i)})},1e3)}})}},{key:"render",value:function(){var e=this.state,a=e.data,t=a.course_id,n=a.course_title,c=a.simpledescription,s=a.price0,r=a.price1,i=(e.pdd_price,e.is_success),l=(e.person_num,e.groupon_member,e.course_list),m=N.a.createElement("div",{className:"info"},N.a.createElement("p",{className:"title"},N.a.createElement(b.b,{to:"/detail?id=".concat(t)},n)),N.a.createElement("p",{className:"contact text-overflow-2"},c),N.a.createElement("div",{className:"des"},N.a.createElement("p",{className:"course-price"},N.a.createElement("span",{className:"new"},"\xa5",r),N.a.createElement("span",{className:"old"},"\xa5",s))));return N.a.createElement("div",{className:"to-group-box"},N.a.createElement(v.e,{title:"\u62fc\u56e2",arrow:!0,cart:!1}),!i&&N.a.createElement(v.i,{img:this.state.data.image_name,id:this.state.data.course_id,info:m}),N.a.createElement(y,{data:this.state,invitedFriends:this.invitedFriends}),N.a.createElement(o.a,null),N.a.createElement("div",{className:"group-course"},N.a.createElement("div",{className:"top-title"},N.a.createElement("span",null,"\u672c\u5468\u7279\u60e0"),N.a.createElement(b.b,{to:"/preferential",className:"more"},"\u66f4\u591a",N.a.createElement("i",{className:"iconfont iconiconfront-70"}))),l&&l.length>0&&l[0].course&&l[0].course.length>0&&l[0].course.slice(0,4).map(function(e){var a=N.a.createElement("div",{className:"info"},N.a.createElement("p",{className:"title"},N.a.createElement(b.b,{to:"/detail?id=".concat(e.course_id)},e.course_title)),N.a.createElement("p",{className:"contact text-overflow-2"},e.simpledescription),N.a.createElement("div",{className:"des"},N.a.createElement("p",{className:"course-price"},N.a.createElement("span",{className:"new"},"\xa5",e.price1),N.a.createElement("span",{className:"old"},"\xa5",e.price0))));return N.a.createElement(v.i,{img:e.image_name,key:e.uid,id:e.course_id,info:a})})))}}]),a}(f.Component);function y(e){for(var a,t,n,s,i=e.data,o=i.pdd_price,l=i.data,m=i.groupon_member,d=i.is_success,u=i.person_num,p=i.userInfo,E=i.share,_=i.number,g=i.countdown,f=[],v=_;0!=v;)f.push(v),v--;if(s=N.a.createElement("div",{className:"group-user-list"},N.a.createElement(r.a,{justify:"center",className:"imgList"},m.map(function(e){return N.a.createElement("div",{className:"imgContainer",key:Math.random()},N.a.createElement("img",{className:"imgname",src:e.avatar,alt:""}),1===e.user_type?N.a.createElement("div",{className:"leaderFlag"},N.a.createElement("span",null,"\u56e2\u957f")):null)}),f.map(function(e){return N.a.createElement("div",{className:"imgContainer",key:Math.random()},N.a.createElement("div",{className:"imgname"},N.a.createElement("i",{className:"iconfont iconwode-xianxing no-body"})))}))),m&&m.length>0){var h="";m.map(function(e){1===e.user_type&&(h="".concat(e.uid))}),h===p.data.data.uid?(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(o,"\u5143")),t=N.a.createElement("span",{className:"group-btn",onClick:e.invitedFriends},"\u9080\u8bf7\u597d\u53cb\u53c2\u56e2 ",g," \u540e\u7ed3\u675f"),n=N.a.createElement("p",{className:"dec"},"\u5206\u4eab\u52303\u4e2a\u7fa4\u540e\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")):(a=N.a.createElement("p",{className:"tip"},"\u62fc\u56e2\u7701\uffe5".concat(o,"\u5143")),t=N.a.createElement(b.b,{to:"/order?id=".concat(l.course_id),className:"group-btn"},"\u4e00\u952e\u53c2\u56e2"))}return 1===d&&(a=N.a.createElement("p",{className:"success"},"\u62fc\u56e2\u6210\u529f"),t=N.a.createElement(b.b,{to:"/play",className:"tostudy"},"\u53bb\u5b66\u4e60")),N.a.createElement("div",{className:"gorup-content"},E?N.a.createElement("div",{className:"groupSuccessMbc",onClick:e.invitedFriends},N.a.createElement("div",{className:"tipContent"},"\u8fd8\u5dee".concat(_,"\u4eba\uff0c\u5206\u4eab\u52303\u4e2a\u7fa4\uff0c\u6210\u56e2\u7387\u9ad8\u8fbe98%")),N.a.createElement("div",{className:"tipArrow"},N.a.createElement("i",{className:"iconfont iconyindao"}))):null,a,N.a.createElement(c.a,null,s),N.a.createElement(c.a,null,t),n,!d&&N.a.createElement("div",{className:"group-dec"},N.a.createElement("span",null,N.a.createElement("i",{className:"iconfont iconiconfront-1"}),"\xb7\u597d\u53cb\u53c2\u56e2 \xb7\u4eba\u6ee1\u6210\u4ea4 \xb7\u4eba\u4e0d\u6ee1\u9000\u6b3e"),N.a.createElement("span",{className:"allNum"},"\u7d2f\u8ba1".concat(u,"\u4eba\u6210\u56e2"))))}a.default=w}}]);
//# sourceMappingURL=togroup.0a7b9efe.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{577:function(e,t,a){"use strict";var n=a(0),c=a.n(n);a(578);t.a=function(e){return c.a.createElement("li",{className:"v-list-base-item",onClick:e.handleClick.bind(void 0,e.id)},c.a.createElement("div",{className:"content"},c.a.createElement("div",{className:"cover"},e.status,c.a.createElement("img",{src:e.img,alt:""})),e.info),e.tab)}},578:function(e,t,a){},629:function(e,t,a){},630:function(e,t,a){},631:function(e,t,a){},636:function(e,t,a){},638:function(e,t){},789:function(e,t,a){"use strict";a.r(t);a(43);var n=a(14),c=a.n(n),i=a(7),r=a(8),o=a(10),s=a(9),l=a(11),u=(a(253),a(97)),d=a.n(u),m=a(0),p=a.n(m),v=a(159),h=(a(629),a(16)),f=a(54),y=a(3),E=(a(630),a(577)),g=function(e){var t=e.item;return p.a.createElement("div",{className:"bottom"},p.a.createElement("span",{className:"price"},"\xa5",t.price1),p.a.createElement("span",{className:"stale-price"},"\xa5",t.price0))},b=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(r)))).state={num:10,list:[],courseId:null},a.getRecommendation=function(){y.d.get("".concat(y.a.home,"/m/play/recommend_course/").concat(a.props.vCourseId,"?num=").concat(a.state.num)).then(function(e){var t=e.data;200===t.code?a.setState({list:t.data}):c.a.info(t.msg)})},a.handleClick=function(e){a.props.history.push("/detail?id=".concat(e))},a}return Object(l.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){this.getRecommendation()}},{key:"render",value:function(){var e=this;return p.a.createElement("div",{className:"recommendation"},p.a.createElement("div",{className:"title"},"\u76f8\u5173\u63a8\u8350"),p.a.createElement("ul",null,this.state.list.map(function(t){var a=p.a.createElement("div",{className:"info"},p.a.createElement("p",{className:"title"},t.course_title),p.a.createElement("p",{className:"des"},t.simpledescription),p.a.createElement(g,{item:t}));return p.a.createElement(E.a,{key:t.course_id,img:t.image_name,handleClick:e.handleClick,info:a,id:t.course_id})})))}}]),t}(m.PureComponent),_=(a(631),a(15)),C=a.n(_),N=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,c=new Array(n),r=0;r<n;r++)c[r]=arguments[r];return(a=Object(o.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(c)))).handleClick=function(e){a.props.handleClick(e)},a}return Object(l.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this;return p.a.createElement("div",{className:"video-catalog"},p.a.createElement("ul",null,this.props.videoCatalog.map(function(t,a){return p.a.createElement("li",{key:t.id,className:C()({active:e.props.activeIndex===a}),onClick:e.handleClick.bind(e,a)},p.a.createElement("span",{className:"title"},t.name),p.a.createElement("span",{className:"duration"},t.duration),p.a.createElement("i",{className:C()("iconfont",[0===t.video_auth?"iconiconfront-74":"iconiconfront-35"])}))})))}}]),t}(m.Component),I=(a(632),a(635)),k=a.n(I),O=(a(636),function(e){function t(){return Object(i.a)(this,t),Object(o.a)(this,Object(s.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.props.datum;return p.a.createElement("div",{className:"datum-catalog"},p.a.createElement("p",{className:"prompt"},"\u8bfe\u7a0b\u8d44\u6599\u8bf7\u5230PC\u7aef\u64ad\u653e\u9875\u4e0b\u8f7d"),p.a.createElement(k.a,null,e&&e.length&&e.map(function(e,t){return p.a.createElement(k.a.Panel,{header:e.dir_name,key:t},e.files.map(function(e){return p.a.createElement("div",{key:e.file_id,className:"file-name"},e.file_name)}))})))}}]),t}(m.Component));O.defaultProps={datum:[{dir_name:"",files:[{file_name:"",file_id:0}]}]};var j=O,P=a(772),A=(a(683),a(37)),x=d.a.alert,S=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(a=Object(o.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(r)))).state={title:"",courseId:null,video_catalog:[],datum:[],currentVideoSrc:"",activeIndex:0,isAuth:!0,course:null,salePrice:null,vCourseId:null,isLoading:!0},a.initializePlayer=function(){window.HELP_IMPROVE_VIDEOJS=!1,a.player=Object(P.a)(a.video,{controls:!0,preload:"auto",bigPlayButton:!0,textTrackDisplay:!1,posterImage:!1,errorDisplay:!1}),a.player.enableTouchActivity()},a.handleClick=function(e){a.hasAuth()&&(a.setPlayerSrc(a.state.video_catalog[e].play_url),a.playVideo()),a.setState({activeIndex:e})},a.getVideoCatalog=function(){y.d.get("".concat(y.a.home,"/m/course/play/").concat(a.courseID)).then(function(e){var t=e.data;200===t.code?a.setState(function(e){return{video_catalog:t.data.lessons,currentVideoSrc:t.data.lessons[e.activeIndex].play_url,course:t.data.course,courseId:t.data.course.course_id,vCourseId:t.data.course.v_course_id,title:t.data.course.course_title,isLoading:!1}},function(){a.lessonAvailable()?a.hasAuth(a.state.activeIndex)?Promise.resolve().then(function(){a.initializePlayer(),a.playWithAuth()}):a.getCoursePrice():x("\u6682\u65e0\u89c6\u9891","",[{text:"OK",onPress:function(){a.props.history.push("/")}}])}):c.a.info(t.msg)})},a.setPlayerSrc=function(e){a.player.src({src:e,type:"application/x-mpegURL"})},a.playVideo=function(){a.player.play()},a.lessonAvailable=function(){var e=a.state;return 0!==e.video_catalog[e.activeIndex].video_size},a.getCoursePrice=function(){y.d.get("".concat(y.a.home,"/sys/course/price/").concat(a.state.courseId)).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.video_catalog,n=e.activeIndex;a.hasAuth()&&a.setPlayerSrc(t[n].play_url)},a.hasAuth=function(e){var t=a.state,n=t.course,c=t.video_catalog[t.activeIndex];return c.is_free?(a.setState({isAuth:!0}),!0):n.is_audition?(a.setState({isAuth:!0}),!0):c.video_auth?(a.setState({isAuth:!0}),!0):(a.setState({isAuth:!1}),!1)},a}return Object(l.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){this.courseID=Object(y.c)("id"),this.setState({courseId:this.courseID}),this.getVideoCatalog(),this.getDatumCatalog()}},{key:"componentDidUpdate",value:function(e,t){console.log(this.video)}},{key:"componentWillUnmount",value:function(){this.player&&this.player.dispose()}},{key:"getDatumCatalog",value:function(){var e=this;y.d.get("".concat(y.a.home,"/m/course/data/").concat(this.courseID)).then(function(t){var a=t.data;200===a.code?e.setState({datum:a.data}):c.a.info(a.msg)})}},{key:"render",value:function(){var e=this,t=this.props,a=t.match,n=t.location,c=this.state,i=c.video_catalog,r=c.activeIndex,o=c.isAuth,s=c.salePrice;return p.a.createElement("div",{className:"play"},p.a.createElement(v.a,{title:this.state.title,arrow:!0}),p.a.createElement(A.f,{isLoading:this.state.isLoading},p.a.createElement("div",{className:"video"},p.a.createElement("video",{className:"video-js",ref:function(t){return e.video=t}},p.a.createElement("source",{src:"/",type:"application/x-mpegURL"})),!o&&p.a.createElement("div",{className:"purchase-box"},p.a.createElement("div",{className:"hint"},"\u60a8\u5c1a\u672a\u8d2d\u4e70\u8be5\u8bfe\u65f6\uff0c\u8bf7\u8d2d\u4e70\u540e\u5b66\u4e60\u3002"),p.a.createElement("div",{className:"btns"},p.a.createElement("button",{type:"button",className:"purchase-class"},"\xa5",s," \u8d2d\u4e70\u8bfe\u7a0b"),p.a.createElement("button",{type:"button",className:"purchase-episode"},"\xa5",i.length&&i[r].class_price," \u8d2d\u4e70\u5355\u96c6")))),p.a.createElement("div",{className:"tab"},p.a.createElement("div",null,p.a.createElement(h.c,{to:"".concat(a.url,"/video"),replace:!0,activeClassName:"active"},"\u89c6\u9891")),p.a.createElement("div",null,p.a.createElement(h.c,{to:"".concat(a.url,"/datum"),replace:!0,activeClassName:"active"},"\u8d44\u6599")))),p.a.createElement(f.d,null,p.a.createElement(f.a,{exact:!0,from:"/play",to:{pathname:"/play/video",search:n.search}}),p.a.createElement(f.b,{path:"".concat(a.path,"/video"),render:function(t){return p.a.createElement(N,Object.assign({activeIndex:e.state.activeIndex,handleClick:e.handleClick,videoCatalog:e.state.video_catalog},t))}}),p.a.createElement(f.b,{path:"".concat(a.path,"/datum"),render:function(t){return p.a.createElement(j,Object.assign({},t,{datum:e.state.datum}))}})),p.a.createElement(f.b,{render:function(t){return e.state.vCourseId?p.a.createElement(b,Object.assign({},t,{vCourseId:e.state.vCourseId})):null}}))}}]),t}(m.Component);t.default=S}}]);
//# sourceMappingURL=video.f7e77157.chunk.js.map
\ No newline at end of file
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