Commit db4bd19a by zhanghaozhe

statistics

parents c6dee494 87099ecc
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([[32],{1165:function(e,t,a){},1186:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),c=a.n(n),o=a(5),r=a(7),i=a(6),s=a(8),l=a(9),u=a(75),m=a(0),d=a.n(m),p=(a(1165),a(30)),f=a(3),h=function(e){function t(e){var a;return Object(o.a)(this,t),(a=Object(i.a)(this,Object(s.a)(t).call(this,e))).toCourseDetail=function(e){Object(u.a)(Object(u.a)(a)).state.fromApp?Object(f.a)("toCourse",e):a.props.history.push("/detail?id=".concat(e))},a.state={list:[],fromApp:!!Object(f.c)("from")},a}return Object(l.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){var e=this;f.d.get("".concat(API.home,"/sys/red_packet/share_course")).then(function(t){200===t.data.code?e.setState({list:t.data.data}):c.a.info(t.data.msg,2)})}},{key:"render",value:function(){var e=this,t=this.state.list;return d.a.createElement("div",{className:"share-course"},!this.state.fromApp&&d.a.createElement(p.e,{title:"\u5206\u4eab\u9886\u7ea2\u5305",arrow:!0}),t&&t.length>0?d.a.createElement("div",null,t.map(function(t,a){var n=d.a.createElement("div",{className:"info"},d.a.createElement("p",{className:"title text-overflow-1"},t.course_title),d.a.createElement("p",{className:"contact text-overflow-1"},t.simpledescription),d.a.createElement("button",null,"\u5206\u4eab\u9886\u7ea2\u5305"));return d.a.createElement("div",{key:a},d.a.createElement(p.j,{img:t.image_name,info:n,id:t.course_id,toDetail:e.toCourseDetail}))})):d.a.createElement("div",null,d.a.createElement("p",{className:"not-data"},"\u6682\u65f6\u6ca1\u6709\u53ef\u5206\u4eab\u7684\u8bfe\u7a0b\u54e6\u301c")))}}]),t}(m.Component);t.default=h}}]);
//# sourceMappingURL=32.0e3712aa.chunk.js.map
\ No newline at end of file
{"version":3,"sources":["components/ShareCourse/index.js"],"names":["ShareCourse","props","_this2","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","toCourseDetail","id","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__","state","fromApp","SendMessageToApp","history","push","concat","list","getParam","_this3","http","get","API","home","then","res","data","code","setState","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","_this4","react__WEBPACK_IMPORTED_MODULE_8___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_10__","title","arrow","length","map","item","index","Info","course_title","simpledescription","key","img","image_name","course_id","toDetail","Component"],"mappings":"yOAOMA,cAEF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAmBVQ,eAAiB,SAACC,GACHP,OAAAQ,EAAA,EAAAR,QAAAQ,EAAA,EAAAR,CAAAD,IACDU,MAAMC,QACZC,YAAiB,WAAYJ,GAEXR,EAAKD,MAAhBc,QACCC,KAAR,cAAAC,OAA2BP,KAxB/BR,EAAKU,MAAQ,CACTM,KAAM,GACNL,UAAUM,YAAS,SAJRjB,mFAQC,IAAAkB,EAAAf,KAChBgB,IAAKC,IAAL,GAAAL,OAAYM,IAAIC,KAAhB,iCAAoDC,KAAK,SAACC,GAChC,MAAlBA,EAAIC,KAAKC,KACTR,EAAKS,SAAS,CACVX,KAAMQ,EAAIC,KAAKA,OAGnBG,EAAAC,EAAMC,KAAKN,EAAIC,KAAKM,IAAK,sCAe5B,IAAAC,EAAA7B,KACEa,EAAQb,KAAKO,MAAbM,KACP,OACIiB,EAAAJ,EAAAK,cAAA,OAAKC,UAAW,iBAEPhC,KAAKO,MAAMC,SACZsB,EAAAJ,EAAAK,cAACE,EAAA,EAAD,CAAWC,MAAM,iCAAQC,OAAO,IAIhCtB,GAAQA,EAAKuB,OAAS,EAAIN,EAAAJ,EAAAK,cAAA,WAEdlB,EAAKwB,IAAI,SAACC,EAAMC,GACZ,IAAMC,EACFV,EAAAJ,EAAAK,cAAA,OAAKC,UAAU,QACXF,EAAAJ,EAAAK,cAAA,KAAGC,UAAW,yBAA0BM,EAAKG,cAC7CX,EAAAJ,EAAAK,cAAA,KAAGC,UAAW,2BAA4BM,EAAKI,mBAC/CZ,EAAAJ,EAAAK,cAAA,iDAGR,OACID,EAAAJ,EAAAK,cAAA,OAAKY,IAAKJ,GACNT,EAAAJ,EAAAK,cAACE,EAAA,EAAD,CACIW,IAAKN,EAAKO,WACVlB,KAAMa,EACNnC,GAAIiC,EAAKQ,UACTC,SAAUlB,EAAKzB,qBAQvC0B,EAAAJ,EAAAK,cAAA,WACID,EAAAJ,EAAAK,cAAA,KAAGC,UAAU,YAAb,qFAnEFgB,aA4EXrD","file":"mrstatic/js/32.0e3712aa.chunk.js","sourcesContent":["import React, {Component} from 'react';\nimport './index.scss';\nimport {HeaderBar, VList} from '@/common';\nimport {http, getParam, SendMessageToApp} from '@/utils';\nimport {Toast} from 'antd-mobile';\n\n\nclass ShareCourse extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n list: [],\n fromApp: !getParam('from') ? false : true\n };\n }\n\n componentDidMount() {\n http.get(`${API.home}/sys/red_packet/share_course`).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n list: res.data.data\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n })\n }\n\n toCourseDetail = (id) => {\n const _this = this\n if (_this.state.fromApp) {\n SendMessageToApp(\"toCourse\", id)\n } else {\n const {history} = this.props;\n history.push(`/detail?id=${id}`)\n }\n }\n\n render() {\n const {list} = this.state;\n return (\n <div className={'share-course'}>\n {\n !this.state.fromApp &&\n <HeaderBar title='分享领红包' arrow={true}/>\n }\n\n {\n list && list.length > 0 ? <div>\n {\n list.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className={'title text-overflow-1'}>{item.course_title}</p>\n <p className={'contact text-overflow-1'}>{item.simpledescription}</p>\n <button>分享领红包</button>\n </div>\n )\n return (\n <div key={index}>\n <VList\n img={item.image_name}\n info={Info}\n id={item.course_id}\n toDetail={this.toCourseDetail}\n />\n </div>\n\n )\n })\n }\n </div> :\n <div>\n <p className='not-data'>暂时没有可分享的课程哦〜</p>\n </div>\n }\n\n </div>\n )\n }\n}\n\nexport default ShareCourse;\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/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":"4RAKqBA,cACjB,SAAAA,EAAYC,GAAQ,OAAAC,O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ACa,EAAA,EAAD,CAASZ,UAAU,MAAMa,KAAK,qCAlChBC","file":"mrstatic/js/DrawDocument.7730f3de.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
{"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","name","setState","isShow","value","cancle","handleChange","e","target","outLogin","logout","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","history","push","submit","state","length","data","user_name","http","post","concat","API","home","then","res","code","updateUser","username","msg","user","avatar","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_11__","title","arrow","cart","src","alt","onClick","bind","type","placeholder","onChange","PureComponent","compose","connect","WithFullSize"],"mappings":"wOAUMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAQVQ,WAAa,SAACC,GACVR,EAAKS,SAAS,CACVC,QAAQ,EACRC,MAAOH,KAZIR,EAgBnBY,OAAS,WACLZ,EAAKS,SAAS,CACVC,QAAQ,KAlBGV,EAuBnBa,aAAe,SAACC,GACZd,EAAKS,SAAS,CACVE,MAAOG,EAAEC,OAAOJ,SAzBLX,EA6BnBgB,SAAW,WACPhB,EAAKD,MAAMkB,SACXC,EAAAC,EAAMC,KAAK,qBAAO,GAClBpB,EAAKD,MAAMsB,QAAQC,KAAK,QAhCTtB,EAoCnBuB,OAAS,WACL,GAAIvB,EAAKwB,MAAMb,MAAMc,OAAS,GAC1BP,EAAAC,EAAMC,KAAK,yCAAY,QACpB,GAAgC,IAA5BpB,EAAKwB,MAAMb,MAAMc,OACxBP,EAAAC,EAAMC,KAAK,iCAAS,OACjB,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F,EAAAtB,EAAAuB,cAAA,SAAOU,KAAK,OAAOC,YAAY,mFACxB1C,MAAOR,KAAKqB,MAAMb,MAClB2C,SAAUnD,KAAKU,aAAasC,KAAKhD,QAExCsC,EAAAtB,EAAAuB,cAAA,OAAKC,UAAU,YACXF,EAAAtB,EAAAuB,cAAA,UAAQC,UAAU,SAASO,QAAS/C,KAAKS,QAAzC,gBACA6B,EAAAtB,EAAAuB,cAAA,UAAQC,UAAU,SAASO,QAAS/C,KAAKoB,QAAzC,2BA7FXgC,iBAwGNC,sBACXC,YACI,SAAAjC,GAAK,MAAK,CAACe,KAAMf,EAAMe,OACvB,CAACtB,WAAQmB,iBAEbsB,IALWF,CAMb1D","file":"mrstatic/js/MyEdit.30ed911f.chunk.js","sourcesContent":["import React, {PureComponent} from 'react'\nimport './index.scss'\nimport {connect} from \"react-redux\"\nimport {Toast} from 'antd-mobile'\nimport {http} from \"@/utils\"\nimport {HeaderBar} from \"@/common\"\nimport {logout, updateUser} from '@/store/userAction'\nimport {compose} from \"redux\";\nimport {WithFullSize} from '@/HOCs'\n\nclass MyEdut extends PureComponent {\n constructor(props) {\n super(props)\n this.state = {\n isShow: false,\n value: ''\n }\n }\n\n // 点击编辑\n toEditName = (name) => {\n this.setState({\n isShow: true,\n value: name\n })\n }\n // 取消\n cancle = () => {\n this.setState({\n isShow: false\n })\n }\n\n // 获取input的值\n handleChange = (e) => {\n this.setState({\n value: e.target.value\n })\n }\n // 退出登录\n outLogin = () => {\n this.props.logout()\n Toast.info('已退出', 2)\n this.props.history.push('/my')\n }\n\n // 确定修改\n submit = () => {\n if (this.state.value.length > 12) {\n Toast.info('不超过12个字符', 2)\n } else if (this.state.value.length === 0) {\n Toast.info('请输入昵称', 2)\n } else {\n let data = {\n user_name: this.state.value\n }\n http.post(`${API.home}/m/user_info/update`, data).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n isShow: false\n })\n this.props.updateUser({data: {username: this.state.value}})\n Toast.info('修改成功', 2)\n } else if (res.data.code === 4008) {\n this.setState({\n isShow: false\n })\n } else {\n Toast.info(res.data.msg, 2)\n }\n\n })\n }\n }\n\n render() {\n const {user} = this.props\n const username = user && user.data && user.data.username\n const avatar = user && user.data && user.data.avatar\n return (\n <div className=\"edit-name\">\n <HeaderBar title='账号' arrow={true} cart={false}></HeaderBar>\n\n <div className='my-mess'>\n <img src={avatar} alt=\"\"/>\n <span className=\"name\">{username}</span>\n <span onClick={this.toEditName.bind(this, username)} className=\"edit\">编辑</span>\n </div>\n <div className=\"out-login\" onClick={this.outLogin}>\n 退出登录\n </div>\n\n {\n this.state.isShow &&\n <div className=\"edit-mbc\">\n <div className=\"edit-content\">\n <div className=\"edit-title\">修改昵称</div>\n <input type=\"text\" placeholder='请输入昵称(不超过12个字符)'\n value={this.state.value}\n onChange={this.handleChange.bind(this)}\n />\n <div className=\"edit-btn\">\n <button className='cancle' onClick={this.cancle}>取消</button>\n <button className='submit' onClick={this.submit}>确认</button>\n </div>\n </div>\n </div>\n }\n </div>\n )\n }\n\n}\n\nexport default compose(\n connect(\n state => ({user: state.user}),\n {logout, updateUser}\n ),\n WithFullSize\n)(MyEdut)\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/order/orderinfo.js"],"names":["MyForm","withFormik","mapPropsToValues","props","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_7__","userInfo","validate","values","handleSubmit","FormBag","real_name","cellphone","qq","concat","replace","length","test","same","pathName","id","http","post","API","then","res","data","errno","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_6___default","a","info","undefined","history","msg","_ref","setFieldValue","errors","touched","handleBlur","isSubmitting","react__WEBPACK_IMPORTED_MODULE_14___default","createElement","antd_mobile_lib_input_item__WEBPACK_IMPORTED_MODULE_13___default","clear","name","onChange","value","placeholder","type","maxLength","style","marginTop","antd_mobile_lib_wing_blank__WEBPACK_IMPORTED_MODULE_9___default","antd_mobile_lib_button__WEBPACK_IMPORTED_MODULE_11___default","onClick","Orderinfo","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__","call","_common__WEBPACK_IMPORTED_MODULE_16__","title","arrow","location","state","Component"],"mappings":"qSAgDMA,EAASC,YAAW,CACtBC,iBAAkB,SAAAC,GAAK,OAAAC,OAAAC,EAAA,EAAAD,CAAA,GAAUD,EAAMG,WACvCC,SAAU,SAACC,EAAQL,GAEf,MADe,IAGnBM,aAAc,SACVD,EACAE,GACC,IACMC,EAA4BH,EAA5BG,UAAWC,EAAiBJ,EAAjBI,UAAWC,EAAML,EAANK,GAC7B,GAAKF,EAGC,GAAoD,IAAhD,GAAAG,OAAIH,GAAaI,QAAQ,OAAQ,IAAIC,OAI/C,GAAKJ,EAGE,GAAK,WAAWK,KAAK,GAAAH,OAAIF,GAAaG,QAAQ,OAAQ,KAI7D,GAAKF,EAGE,GAAK,UAAUI,KAAKJ,GAApB,CAIP,IAAIK,EAAO,EACX,GAAGR,EAAQP,MAAMG,SAAU,CACvB,IAAMA,EAAWI,EAAQP,MAAMG,SAC5BA,EAASK,YAAcA,IACtBO,GAAQ,GAETZ,EAASM,YAAcA,IACtBM,GAAQ,GAETZ,EAASO,KAAOA,IACfK,GAAQ,GAGhB,IAAIC,EAAW,SACZT,EAAQP,MAAMG,SAASc,KACtBD,EAAWA,EAAW,OAAST,EAAQP,MAAMG,SAASc,IAG9C,IAATF,EASHG,IAAKC,KAAL,GAAAR,OAAaS,IAAI,YAAjB,yBAAqD,CAACZ,UAAWH,EAAOG,UAAWC,UAAW,GAAAE,OAAIN,EAAOI,WAAaG,QAAQ,OA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AK,KACLG,YAAY,+CACZE,UAAU,KACVJ,SAAU,SAACC,GAAD,OAAWX,EAAc,KAAMW,IACzCA,MAAOtC,EAAOK,IANlB,MASA2B,EAAAX,EAAAY,cAAA,OAAKS,MAAO,CAAEC,UAAW,SACrBX,EAAAX,EAAAY,cAAAW,EAAAvB,EAAA,KACIW,EAAAX,EAAAY,cAAAY,EAAAxB,EAAA,CAAQmB,KAAK,UAAUM,QAAS7C,GAAhC,qBAkFd8C,cACF,SAAAA,EAAYpD,GAAQ,OAAAC,OAAAoD,EAAA,EAAApD,CAAAqD,KAAAF,GAAAnD,OAAAsD,EAAA,EAAAtD,CAAAqD,KAAArD,OAAAuD,EAAA,EAAAvD,CAAAmD,GAAAK,KAAAH,KACVtD,0EAIN,OACIqC,EAAAX,EAAAY,cAAA,WACID,EAAAX,EAAAY,cAACoB,EAAA,EAAD,CAAWC,MAAM,2BAAOC,OAAO,IAC/BvB,EAAAX,EAAAY,cAACzC,EAAD,CAAQgC,QAASyB,KAAKtD,MAAM6B,QAAS1B,SAAUmD,KAAKtD,MAAM6D,SAASC,gBAT3DC,aAgBTX","file":"mrstatic/js/Orderinfo.eaea6ad9.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Flex, NavBar, List, InputItem, Button, WhiteSpace, WingBlank, Toast } from 'antd-mobile';\nimport { Formik, Field, Form, withFormik } from 'formik';\nimport {HeaderBar} from '../../common';\nimport { http } from \"@/utils\";\n\nconst InnerForm = ({\n values,\n errors,\n touched,\n setFieldValue,\n handleBlur,\n handleSubmit,\n isSubmitting,\n}) => (\n <form>\n <InputItem\n clear\n name=\"real_name\"\n onChange={(value) => setFieldValue('real_name', value)}\n placeholder=\"请输入您的真实姓名\"\n value={values.real_name}\n >姓名</InputItem>\n <InputItem\n clear\n type='phone'\n name='cellphone'\n placeholder=\"请输入您的手机号码\"\n onChange={(value) => setFieldValue('cellphone', value)}\n value={values.cellphone}\n >电话</InputItem>\n <InputItem\n clear\n name='qq'\n placeholder=\"请输入您的QQ号码\"\n maxLength='15'\n onChange={(value) => setFieldValue('qq', value)}\n value={values.qq}\n >QQ</InputItem>\n\n <div style={{ marginTop: '21px' }}>\n <WingBlank>\n <Button type='primary' onClick={handleSubmit}>确认</Button>\n </WingBlank>\n </div>\n </form>\n );\n\nconst MyForm = withFormik({\n mapPropsToValues: props => ({ ...props.userInfo }),\n validate: (values, props) => {\n const errors = {};\n return errors;\n },\n handleSubmit: (\n values,\n FormBag\n ) => {\n const {real_name, cellphone, qq} = values;\n if (!real_name) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }else if ((`${real_name}`).replace(/\\s+/g, '').length === 0) {\n Toast.info('请输入姓名!', undefined, undefined, false);\n return;\n }\n if (!cellphone) {\n Toast.info('请输入手机号!', undefined, undefined, false);\n return;\n } else if (!/1\\d{10}/g.test((`${cellphone}`).replace(/\\s+/g, ''))) {\n Toast.info('请输入正确的手机号!', undefined, undefined, false);\n return;\n }\n if (!qq) {\n Toast.info('请输入QQ号!', undefined, undefined, false);\n return;\n } else if (!/\\d{5,}/g.test(qq)) {\n Toast.info('请输入正确QQ号!', undefined, undefined, false);\n return;\n }\n let same = 0;\n if(FormBag.props.userInfo) {\n const userInfo = FormBag.props.userInfo;\n if(userInfo.real_name === real_name) {\n same += 1;\n }\n if(userInfo.cellphone === cellphone) {\n same += 1;\n }\n if(userInfo.qq === qq) {\n same += 1;\n }\n }\n let pathName = '/order';\n if(FormBag.props.userInfo.id) {\n pathName = pathName + '?id=' + FormBag.props.userInfo.id;\n }\n // console.log(values);\n if(same === 3) {\n FormBag.props.history.replace(\n pathName,\n {\n ...values,\n }\n );\n return;\n }\n http.post(`${API['base-api']}/m/order/saveUserInfo`, {real_name: values.real_name, cellphone: (`${values.cellphone}`).replace(/\\s+/g, ''), qq: values.qq}).then(res=>{\n // console.log(res);\n if(res.data.errno !== 200) {\n Toast.info(res.data.msg, undefined, undefined, false);\n return;\n }\n Toast.info('保存成功!', undefined, undefined, false);\n FormBag.props.history.replace(\n pathName,\n {\n ...values,\n }\n );\n });\n },\n})(InnerForm);\n\nclass Orderinfo extends Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n <div>\n <HeaderBar title='报名信息' arrow={true}></HeaderBar>\n <MyForm history={this.props.history} userInfo={this.props.location.state}/>\n </div>\n )\n }\n\n};\n\nexport default Orderinfo;"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{1175:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return P});t(155);var n=t(76),i=t.n(n),c=(t(91),t(25)),o=t.n(c),r=(t(154),t(35)),s=t.n(r),l=(t(44),t(14)),d=t.n(l),p=t(5),u=t(7),m=t(6),y=t(8),f=t(9),g=t(75),h=(t(892),t(894)),b=t.n(h),v=(t(118),t(46)),w=t.n(v),E=t(0),S=t.n(E),x=t(3),_=t(30),j=t(17),k=(t(896),w.a.Item.Brief,b.a.RadioItem),I=[];I=x.b.isWeixin?[{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}]:[{value:0,label:"\u652f\u4ed8\u5b9d",icon:"iconalipay"},{value:1,label:"\u5fae\u4fe1\u652f\u4ed8",icon:"iconweixinzhifu"}];var P=function(e){function a(e){var t;return Object(p.a)(this,a),(t=Object(m.a)(this,Object(y.a)(a).call(this,e))).redirectAfterPay=function(){var e=Object(x.c)("status"),a=Object(x.c)("type"),n=Object(x.c)("oid"),i=t.props.history;if(e||a)if(0===parseInt(e,10))if(2===parseInt(a,10))i.push("/togroup?id=".concat(n));else if(4===parseInt(a,10)){c&&window.localStorage.setItem("payCourse",c);var c=window.localStorage.getItem("payCourse");c&&i.push("/detail?id=".concat(c),{oid:n})}else i.push("/purchased");else d.a.info("\u652f\u4ed8\u5f02\u5e38",2)},t.onChange=function(e){t.setState({payType:e,checkPeriod:!1}),2===e&&t.setState({huabei:!0})},t.checkStaging=function(e){t.setState({huabei:!1,stageNumber:e.value,singleMoney:e.everyTotal,periodNumber:e.stage,checkPeriod:!0})},t.print=function(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];console.log(a)},t.pay=function(){var e=t.state,a=e.payType,n=e.orderId;0===a?t.alipayPay(n):1===a&&t.weixinPay(n)},t.weixinPay=function(e){Object(x.f)()?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="+encodeURIComponent(window.location.href+"&aa=bb").toLowerCase()+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":x.d.get("".concat(API["base-api"],"/pay/wxpay/wap_charge/oid/").concat(e)).then(function(e){0===e.data.errno?window.location.href=e.data.data.url+"&redirect_url="+encodeURIComponent(window.location.href+"&weixinpay=1").toLowerCase():d.a.info(e.data.msg,2)})},t.isweixinPay=function(){var e=Object(g.a)(Object(g.a)(t)),a=Object(x.c)("code");if(a){if(void 0===Object(x.c)("oid"))return;x.d.get("".concat(API["base-api"],"/pay/wxpay/pub_charge/oid/").concat(Object(x.c)("oid"),"/code/").concat(a)).then(function(a){if(0===a.data.errno){var t=function(){WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:n.appId,timeStamp:n.timeStamp,nonceStr:n.nonceStr,package:n.package,signType:n.signType,paySign:n.paySign},function(a){"get_brand_wcpay_request:ok"==a.err_msg?(d.a.info("\u652f\u4ed8\u6210\u529f",2),e.intervalPayStatus=setInterval(function(){x.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.d.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.c)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.c)("oid"))):e.props.history.replace("/purchased")}))})},1e3)):alert("\u652f\u4ed8\u5931\u8d25")})},n=a.data.data;"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",t,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",t),document.attachEvent("onWeixinJSBridgeReady",t)):t()}else d.a.info(a.data.msg,2)})}},t.payCallback=function(){var e=Object(g.a)(Object(g.a)(t));e.intervalPayStatus=setInterval(function(){x.d.get("".concat(API["base-api"],"/m/orderState/oid/").concat(Object(x.c)("oid"))).then(function(a){401===a.data.errno&&(clearInterval(e.intervalPayStatus),e.intervalPayStatus=null,x.d.get("".concat(API["base-api"],"/m/app_order/detail/").concat(Object(x.c)("oid"))).then(function(a){2===Number(a.data.data.course_type)?e.props.history.replace("/togroup?id=".concat(Object(x.c)("oid"))):e.props.history.replace("/purchased")}))})},1e3)},t.onBridgeReady1=function(e){var a=Object(g.a)(Object(g.a)(t));e=e||a.BridgeData,WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:"wx23dac6775ac82877",timeStamp:e.timeStamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.paySign},function(e){"get_brand_wcpay_request:ok"==e.err_msg?(d.a.info("\u652f\u4ed8\u6210\u529f",2),a.payCallback()):alert("\u652f\u4ed8\u5931\u8d25")})},t.alipayPay=function(e){x.d.get("".concat(API["base-api"],"/pay/alipay/wap_charge_new/oid/").concat(e)).then(function(e){0===e.data.errno?(t.payCallback(),window.location=e.data.data.url):d.a.info(e.data.msg,2)})},t.huabeiPay=function(e){var a=t.state,n=(a.singleMoney,a.periodNumber);x.d.get("/pay/alipay/wap_charge/oid/".concat(e,"/plat/{plat} /hb_num/").concat(n)).then(function(e){0===e.data.errno?window.location=e.data.data.url:d.a.info(e.data.msg,2)})},t.state={pay_amount:0,payType:0,stageNumber:0,checkPeriod:!1,singleMoney:0,periodNumber:0,orderId:Object(x.c)("oid"),huabei:!1,fenqiList:[{value:"zhifubao",qishu:"3",lilv:"2.30%",everyMoney:300,feiyong:2.3},{value:"weixin",qishu:"6",lilv:"4.50%",everyMoney:150,feiyong:4.5},{value:"huabei",qishu:"9",lilv:"7.50%",everyMoney:100,feiyong:7.5}],categoryList:[]},t}return Object(f.a)(a,e),Object(u.a)(a,[{key:"componentDidMount",value:function(){var e=this;this.redirectAfterPay();var a={};a=this.props.location.state&&this.props.location.state.group?{order_id:this.state.orderId,type:2}:{order_id:this.state.orderId},x.d.post("".concat(API["base-api"],"/m/order/detail"),a).then(function(a){if(200===a.data.errno){var t=a.data.data,n=t.course,i=t.pay_amount,c=[];[1,2,3].map(function(e){var a={};a.value=e,1===e?(a.stage=3,a.moneyRate="2.30%",a.rate=.023,a.periodic=(i/3).toFixed(2)):2===e?(a.stage=6,a.moneyRate="4.50%",a.rate=.045,a.periodic=(i/6).toFixed(2)):(a.stage=12,a.moneyRate="7.50%",a.rate=.075,a.periodic=(i/9).toFixed(2)),a.serviceFee=(i*a.rate/a.stage).toFixed(2),a.everyTotal=(parseFloat(a.periodic)+parseFloat(a.serviceFee)).toFixed(2),c.push(a)}),e.setState({pay_amount:i,categoryList:n,fenqiList:c})}else d.a.info(a.data.msg,2)}),(1===Object(x.c)("is_class")||Object(x.c)("weixinpay"))&&this.payCallback(),Object(x.f)()&&(this.setState({payType:1}),this.isweixinPay())}},{key:"render",value:function(){var e=this,a=this.state,t=a.orderId,n=a.pay_amount,c=a.payType,r=a.checkPeriod,l=a.singleMoney,d=a.periodNumber,p=a.huabei,u=a.fenqiList,m=a.categoryList,y=a.stageNumber;return S.a.createElement("div",{className:"pay-order"},S.a.createElement(_.e,{title:"\u786e\u8ba4\u652f\u4ed8",arrow:!0}),S.a.createElement(s.a,{size:"sm"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(i.a,null,S.a.createElement(o.a,{justify:"between",align:"center",style:{height:"44px"}},S.a.createElement("span",null,"\u8ba2\u5355\u53f7"),S.a.createElement("span",{className:"number"},t)))),S.a.createElement(s.a,{size:"md"}),m.map(function(a,t){var n=S.a.createElement("div",{className:"order-info"},S.a.createElement("p",{className:"order-title text-overflow-one"},S.a.createElement(j.b,{to:"/detail?id=".concat(a.course_id)},a.course_title)),S.a.createElement("p",{className:"order-content text-overflow-2"},a.simpledescription),S.a.createElement("p",{className:"order-des"},S.a.createElement("span",{className:"order-newprice"},"\xa5",a.price1),S.a.createElement("span",{className:"order-price"},"\xa5",a.price0)));return S.a.createElement(_.j,{handleClick:e.print,key:t,img:a.image_name,id:a.course_id,info:n})}),S.a.createElement(s.a,{size:"md"}),S.a.createElement("div",{className:"order-number"},S.a.createElement(i.a,null,S.a.createElement(o.a,{justify:"between",align:"center",style:{height:"44px"}},S.a.createElement("span",null,"\u652f\u4ed8\u91d1\u989d"),S.a.createElement("span",{className:"money"},"\uffe5".concat(n))))),S.a.createElement(s.a,{size:"md"}),S.a.createElement(w.a,{renderHeader:function(){return"\u652f\u4ed8\u65b9\u5f0f"},className:"pay-type-list"},I.map(function(a){return S.a.createElement(k,{thumb:S.a.createElement("i",{className:"iconfont ".concat(a.icon," ").concat(c===a.value?"checked":"")}),key:a.value,checked:c===a.value,onChange:function(){return e.onChange(a.value)}},2===a.value?S.a.createElement(o.a,{direction:"column",align:"start",style:{width:"100%",marginTop:"6px"}},S.a.createElement(o.a,{direction:"row",justify:"between",style:{width:"100%",paddingRight:"30px"}},S.a.createElement("span",{style:{color:"#555555",fontSize:"14px"}},a.label),r?S.a.createElement("span",{style:{color:"#333333",fontSize:"12px"}},"".concat(l,"\u5143 \xd7 ").concat(d,"\u671f")):null),S.a.createElement(o.a,{justify:"start"},S.a.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\u652f\u4ed8\u4e0a\u9650\u53d7\u9650\u4e8e\u60a8\u7684\u82b1\u5457\u989d\u5ea6"))):a.label)})),S.a.createElement("div",{className:"pay-tip"},"\u8bf7\u572815\u5206\u949f\u5185\u5b8c\u6210\u652f\u4ed8\uff0c\u5426\u5219\u5c4a\u65f6\u7cfb\u7edf\u5c06\u5173\u95ed\u8be5\u8ba2\u5355\u3002"),S.a.createElement("div",{className:"pay-button",onClick:this.pay},"\u786e\u8ba4\u652f\u4ed8"),p?S.a.createElement("div",{className:"check-staging"},S.a.createElement("div",{className:"container"},S.a.createElement("p",{className:"check-title"},"\u8bf7\u9009\u62e9\u5206\u671f"),u.map(function(a){return S.a.createElement(k,{key:a.value,checked:y===a.value,onChange:function(){return e.checkStaging(a)}},"".concat(a.everyTotal,"\u5143 \xd7 ").concat(a.stage,"\u671f"),S.a.createElement(w.a.Item.Brief,null,"\u624b\u7eed\u8d39".concat(a.serviceFee,"\u5143/\u671f\uff0c\u8d39\u7387").concat(a.moneyRate)))}))):null)}}]),a}(E.Component)},896:function(e,a,t){}}]);
//# sourceMappingURL=PayOrder.c0854efc.chunk.js.map
\ No newline at end of file
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.
{"version":3,"sources":["components/purchased/index.js"],"names":["Purchased","props","_this","Object","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__","this","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__","_Users_zhanghaozhe_server_mr_julyedu_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__","call","getList","http","get","concat","API","home","then","res","data","code","setState","isLoading","antd_mobile_lib_toast__WEBPACK_IMPORTED_MODULE_1___default","a","info","msg","toCourseDetail","id","_this$props","dispatch","history","push","state","_this2","user","uid","react__WEBPACK_IMPORTED_MODULE_7___default","createElement","className","_common__WEBPACK_IMPORTED_MODULE_9__","arrow","title","cart","toHref","_common_Loading__WEBPACK_IMPORTED_MODULE_14__","length","map","item","index","Info","onClick","course_id","course_title","simpledescription","is_aist","assist_weixin","course_qq","status","key","img","image_name","toDetail","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","Component","connect"],"mappings":"yOAUMA,cACF,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACfE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AGC,UAAU,2BAA2BS,EAAKM,mBAEzCN,EAAKO,QACClB,EAAAb,EAAAc,cAAA,OAAKC,UAAU,OAAf,iCAA2BS,EAAKQ,eAChCnB,EAAAb,EAAAc,cAAA,OAAKC,UAAU,OAAf,iBAA0BS,EAAKS,YAI3CC,EACFV,EAAKO,SAAWlB,EAAAb,EAAAc,cAAA,QAAMC,UAAU,UAAhB,gBAEpB,OACIF,EAAAb,EAAAc,cAACE,EAAA,EAAD,CACImB,IAAKV,EACLW,IAAKZ,EAAKa,WACVjC,GAAIoB,EAAKI,UACT3B,KAAMyB,EACNQ,OAAQA,EACRI,SAAU5B,EAAKP,oBAMjCU,EAAAb,EAAAc,cAAA,OAAKC,UAAU,YACbF,EAAAb,EAAAc,cAAA,KAAGC,UAAU,aAAb,mFACAF,EAAAb,EAAAc,cAACyB,EAAA,EAAD,CAAMC,GAAG,aAAT,gCAjFRC,aA2FTC,sBACX,SAAAjC,GAAK,MAAK,CAACE,KAAMF,EAAME,OACvB,KAFW+B,CAGbhE","file":"mrstatic/js/purchased.44208014.chunk.js","sourcesContent":["import React, {Component} from 'react';\nimport './index.scss';\nimport {HeaderBar, VList} from '../../common'\nimport { http } from \"@/utils\";\nimport {Link} from 'react-router-dom'\nimport {Toast} from 'antd-mobile'\nimport {connect} from \"react-redux\"\nimport {getCourses} from './../detail/actions';\nimport Loading from '@/common/Loading'\n\nclass Purchased extends Component {\n constructor(props) {\n super(props)\n this.state = {\n data: [],\n isLoading: true\n }\n }\n\n componentDidMount() {\n this.getList()\n }\n\n // 获取订单\n getList = () => {\n http.get(`${API.home}/m/my/courses`,).then((res) => {\n if (res.data.code === 200) {\n this.setState({\n data: res.data.data,\n isLoading: false\n })\n } else {\n Toast.info(res.data.msg, 2);\n }\n })\n }\n\n toCourseDetail = (id) => {\n const { dispatch, history } = this.props;\n // dispatch(getCourses(id, () => {\n history.push(`/detail?id=${id}`)\n // }));\n }\n\n\n render() {\n const {user} = this.props\n const uid = user && user.data && user.data.uid\n return (\n <div className='purchased-box'>\n <HeaderBar arrow={true} title='已购课程' cart={false} toHref='/my' />\n <Loading isLoading={this.state.isLoading}>\n {\n this.state.data && this.state.data.length > 0 ?\n <div className=\"purchased-body\">\n <div className='tip'>加群请备注您的学号:{uid}</div>\n {\n this.state.data.map((item, index) => {\n const Info = (\n <div className=\"info\">\n <p className='title' onClick={() => this.toCourseDetail(item.course_id)}>\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\n {item.course_title}\n {/* </Link> */}\n </p>\n <p className='contact text-overflow-2'>{item.simpledescription}</p>\n {\n item.is_aist\n ? <div className='des'>助教微信:{item.assist_weixin}</div>\n : <div className='des'>QQ群:{item.course_qq}</div>\n }\n </div>\n )\n const status = (\n item.is_aist && <span className='status'>返现</span>\n )\n return (\n <VList\n key={index}\n img={item.image_name}\n id={item.course_id}\n info={Info}\n status={status}\n toDetail={this.toCourseDetail}\n />\n )\n })\n }\n </div>\n : <div className=\"cart-tip\">\n <p className='cart-mess'>您还没有课程哦,快去逛逛吧~</p>\n <Link to='/classify'>去逛逛</Link>\n </div>\n }\n </Loading>\n\n </div>\n )\n }\n}\n\nexport default connect(\n state => ({user: state.user}),\n null\n)(Purchased)\n"],"sourceRoot":""}
\ No newline at end of file
!function(e){function r(r){for(var n,a,d=r[0],i=r[1],u=r[2],f=0,l=[];f<d.length;f++)a=d[f],o[a]&&l.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(s&&s(r);l.length;)l.shift()();return c.push.apply(c,u||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,a=1;a<t.length;a++){var i=t[a];0!==o[i]&&(n=!1)}n&&(c.splice(r--,1),e=d(d.s=t[0]))}return e}var n={},a={19:0},o={19:0},c=[];function d(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,d),t.l=!0,t.exports}d.e=function(e){var r=[];a[e]?r.push(a[e]):0!==a[e]&&{1:1,2:1,3:1,4:1,5:1,7:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,17:1,18:1,20:1,21:1,22:1,23:1,24:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="mrstatic/css/"+({1:"BargainMiddlePage",2:"Classify",3:"CourseList",4:"DrawDocument",5:"Examination",6:"MyEdit",7:"Order",8:"Orderinfo",9:"PayOrder",10:"Preferential",11:"SearchResult",12:"ShopCart",13:"aist-share",14:"coupons",15:"detail",17:"myorders",18:"purchased",20:"search",21:"shareposter",22:"study",23:"togroup",24:"video"}[e]||e)+"."+{0:"31d6cfe0",1:"718dff83",2:"f2f19957",3:"c0829f24",4:"2e7d81ca",5:"f2cc3163",6:"31d6cfe0",7:"8bb031ea",8:"31d6cfe0",9:"e5315535",10:"cda7a495",11:"2649d43f",12:"3a4dbb7a",13:"bef8c404",14:"de0ae9dc",15:"4c28ce89",17:"3ae12dec",18:"1daf107b",20:"fab97849",21:"f09a5959",22:"5e9927d1",23:"49988cae",24:"b57a1aec",26:"31d6cfe0",27:"4c706a4e",28:"2471f477",29:"0bb224f2",30:"5ed15c7e",31:"ecbb6f9a",32:"278ad3b1",33:"03fe7b57"}[e]+".chunk.css",o=d.p+n,c=document.getElementsByTagName("link"),i=0;i<c.length;i++){var u=(s=c[i]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(u===n||u===o))return r()}var f=document.getElementsByTagName("style");for(i=0;i<f.length;i++){var s;if((u=(s=f[i]).getAttribute("data-href"))===n||u===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var n=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.request=n,delete a[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){a[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=o[e]=[r,n]});r.push(t[2]=n);var c,i=document.createElement("script");i.charset="utf-8",i.timeout=120,d.nc&&i.setAttribute("nonce",d.nc),i.src=function(e){return d.p+"mrstatic/js/"+({1:"BargainMiddlePage",2:"Classify",3:"CourseList",4:"DrawDocument",5:"Examination",6:"MyEdit",7:"Order",8:"Orderinfo",9:"PayOrder",10:"Preferential",11:"SearchResult",12:"ShopCart",13:"aist-share",14:"coupons",15:"detail",17:"myorders",18:"purchased",20:"search",21:"shareposter",22:"study",23:"togroup",24:"video"}[e]||e)+"."+{0:"aef3cf26",1:"f5bb0d59",2:"914a8251",3:"ab1190ce",4:"7730f3de",5:"df98c5b3",6:"30ed911f",7:"d0b6e74e",8:"eaea6ad9",9:"c0854efc",10:"c92167d3",11:"0c0c9343",12:"4c2987b1",13:"ca8ee328",14:"60649292",15:"709d2280",17:"b388a40d",18:"44208014",20:"e1881957",21:"1e04a897",22:"2c0ce1c1",23:"03b425a3",24:"41f298c2",26:"b2e8d558",27:"4948c8d6",28:"a684e5c7",29:"cddce484",30:"58628dcc",31:"66e2dea5",32:"0e3712aa",33:"9869dd21"}[e]+".chunk.js"}(e),c=function(r){i.onerror=i.onload=null,clearTimeout(u);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");c.type=n,c.request=a,t[1](c)}o[e]=void 0}};var u=setTimeout(function(){c({type:"timeout",target:i})},12e4);i.onerror=i.onload=c,document.head.appendChild(i)}return Promise.all(r)},d.m=e,d.c=n,d.d=function(e,r,t){d.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},d.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.t=function(e,r){if(1&r&&(e=d(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(d.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)d.d(t,n,function(r){return e[r]}.bind(null,n));return t},d.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(r,"a",r),r},d.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},d.p="/",d.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],u=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var s=u;t()}([]);
//# sourceMappingURL=runtime~main.2aa52b5d.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{1171:function(e,t,a){"use strict";a.r(t);a(44);var n=a(14),c=a.n(n),r=a(5),i=a(7),s=a(6),o=a(8),d=a(9),l=a(75),m=a(0),u=a.n(m),g=(a(868),a(30)),v=a(3),h=a(729),f=a.n(h),p=function(e){function t(e){var a;return Object(r.a)(this,t),(a=Object(s.a)(this,Object(o.a)(t).call(this,e))).initCanvas=function(e,t){var n=Object(l.a)(Object(l.a)(a)),c=e[t].poster,r=450*e[t].header_position_x,i=800*e[t].header_position_y,s=(e[t].qr_code_x,e[t].qr_code_y,e[t].qr_code_width,e[t].qr_code_height,"https://m.julyedu.com/detail?id=".concat(Object(v.c)("courseId"),"&dist_code").concat(Object(v.c)("dist_code")),document.getElementById("canvas")),o=s.getContext("2d");n.getBase64(c).then(function(a){var c=new Image;c.src=a;var s=document.getElementById("qrcode"),d=navigator.userAgent.toLowerCase();d.indexOf("Android")>-1||d.indexOf("Adr"),d.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?s=document.getElementById("qrcode"):/(Android)/i.test(navigator.userAgent)&&(s=document.getElementById("qrcode")),c.setAttribute("crossOrigin","anonymous"),c.onload=function(){o.drawImage(c,0,0,450,800),o.drawImage(s,320,685,100,100),o.fillStyle=e[t].username_color,o.font="16px serif",o.fillText("@"+n.state.name,r+50+20,i+25),o.font="14px serif",o.fillText("\u6b63\u5728\u5b66\u4e60\u8be5\u8bfe\u7a0b",r+50+20,i+25+20),o.restore()}}).then(function(){n.getBase64(n.state.imgUrl).then(function(e){var t=new Image;t.src=e,t.setAttribute("crossOrigin","anonymous"),t.setAttribute("border-Radius","50%"),t.onload=function(){n.imgPosition(o,t,r,i,24),o.drawImage(t,r,i,48,48),o.restore(),n.setState({billSrc:n.convertCanvasToImage(s)})}})})},a.children=function(e,t){var a=e.childNodes,n=[];if(/MSIE(6|7|8)/.test(navigator.userAgent))for(var c=0;c<a.length;c++){var r=a[c];1===r.nodeType&&(n[n.length]=r)}else n=Array.prototype.slice.call(e.children);if("string"===typeof t)for(var i=0;i<n.length;i++)(e=n[i]).nodeName.toLowerCase()!==t.toLowerCase()&&(n.splice(i,1),i--);return n},a.imgPosition=function(e,t,a,n,c){e.save();var r=a+c,i=n+c;e.beginPath(),e.arc(r,i,c,0,2*Math.PI),e.clip()},a.getBase64Image=function(e){var t=document.createElement("canvas");t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0,e.width,e.height);var a=e.src.substring(e.src.lastIndexOf(".")+1).toLowerCase();return t.toDataURL("image/"+a)},a.convertCanvasToImage=function(e){var t=new Image;return t.src=e.toDataURL("image/png"),t},a.squareClick=function(e){a.setState({smallactive:e}),a.initCanvas(a.state.bgImage,e)},a.state={codeSrc:"",billSrc:"",imgUrl:"",smallListImg:[],smallactive:0,distPrice:"",name:"",bgImage:[]},a}return Object(d.a)(t,e),Object(i.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.getCodeWe(),v.d.get("".concat(API.home,"/m/dist/posters/").concat(Object(v.c)("courseId"),"/").concat(Object(v.c)("uid"))).then(function(t){200===t.data.code?(e.setState({imgUrl:t.data.data.avatar,smallListImg:t.data.data.list,distPrice:t.data.data.dist_course,bgImage:t.data.data.list,name:t.data.data.username}),e.initCanvas(e.state.bgImage,0)):c.a.info(t.data.msg,2)})}},{key:"getCodeWe",value:function(){var e=this,t="https://m.julyedu.com/detail?id=".concat(Object(v.c)("courseId"),"&dist_code=").concat(Object(v.c)("dist_code"));return new Promise(function(a){f.a.toDataURL(t,{},function(t,a){e.setState({codeSrc:a})}),a()})}},{key:"getBase64",value:function(e){var t=this;return new Promise(function(a){var n=null,c=new Image,r=+new Date;c.setAttribute("crossOrigin","anonymous"),c.src=e+"?"+r,c.onload=function(){n=t.getBase64Image(c),a(n)},c.onerror=function(){var a=+new Date;t.getBase64(e+"?"+a)}})}},{key:"render",value:function(){var e=this,t=this.state,a=t.distPrice,n=void 0===a?{}:a,c=t.smallListImg,r=void 0===c?[]:c,i=t.smallactive;return u.a.createElement("div",{className:"share-poster"},u.a.createElement(g.e,{title:"\u751f\u6210\u4e13\u5c5e\u6d77\u62a5",arrow:!0,cart:!1}),u.a.createElement("div",{className:"total-container"},u.a.createElement("div",{className:"placard-img-container",id:"imgWrapper"},u.a.createElement("img",{src:this.state.billSrc.src,alt:""})),u.a.createElement("img",{src:this.state.codeSrc,alt:"",id:"qrcode",className:"placard-code"}),u.a.createElement("canvas",{id:"canvas",width:"450",height:"800",className:""===this.state.billSrc?"":"hide"})),u.a.createElement("div",{className:"placard-desc"},u.a.createElement("span",{className:"placard-sharetxt"},"\u957f\u6309\u4fdd\u5b58\u6d77\u62a5\u5206\u4eab\u7ed9\u597d\u53cb\uff0c\u6bcf\u6709\u4e00\u4eba\u901a\u8fc7\u60a8\u7684\u5206\u4eab\u8d2d\u4e70\u8be5\u8bfe\u7a0b\uff0c\u60a8\u53ef\u4ee5",0===n.count_type&&u.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97",n.first_level_tip,"\u5143\u7684\u4f63\u91d1\u5956\u52b1\u3002"),1===n.count_type&&u.a.createElement("span",{className:"placard-price"},"\u83b7\u5f97\u6210\u4ea4\u91d1\u989d\u7684",n.first_level_scale,"%\u4f5c\u4e3a\u4f63\u91d1\u5956\u52b1\u3002"))),u.a.createElement("div",{className:"placard-swiper"},u.a.createElement("ul",{className:"placard-list"},r.length>0&&r.map(function(t,a){return u.a.createElement("li",{onClick:e.squareClick.bind(e,a),key:a,className:i===a?"active":""},u.a.createElement("img",{src:t.square,alt:""}))}))))}}]),t}(m.Component);t.default=p},868:function(e,t,a){}}]);
//# sourceMappingURL=shareposter.1e04a897.chunk.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
self.__precacheManifest = [
{
"revision": "77ec57dd9b7b6e20f1f7",
"url": "/mrstatic/js/search.e1881957.chunk.js"
},
{
"revision": "a9ef0fb43dd748967bda",
"url": "/mrstatic/js/0.aef3cf26.chunk.js"
},
{
"revision": "de62aba8eb390a0e879a",
"url": "/mrstatic/js/BargainMiddlePage.f5bb0d59.chunk.js"
},
{
"revision": "8edaf2ff2566ed17e2dd22cf4f8ad7ae",
"url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png"
},
{
"revision": "da4c5b9c52d373ead12b",
"url": "/mrstatic/js/Classify.914a8251.chunk.js"
},
{
"revision": "c79abf5cb7ae8a82009cf68fe44d1078",
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
},
{
"revision": "a999eb7686c310c7ecd7",
"url": "/mrstatic/js/CourseList.ab1190ce.chunk.js"
},
{
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "e82fbe8c3278f95eb101",
"url": "/mrstatic/js/DrawDocument.7730f3de.chunk.js"
},
{
"revision": "79139f6aad350256e151f9f73c226348",
"url": "/mrstatic/media/hb_bj.79139f6a.png"
},
{
"revision": "c909d0b78fa7f27cd2d7",
"url": "/mrstatic/js/Examination.df98c5b3.chunk.js"
},
{
"revision": "2f84d5508b8afa2dac0e",
"url": "/mrstatic/js/MyEdit.30ed911f.chunk.js"
},
{
"revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/mrstatic/media/progress-share-bg.80011994.png"
},
{
"revision": "aaddea0132888822b923",
"url": "/mrstatic/js/Order.d0b6e74e.chunk.js"
},
{
"revision": "8e131e92a3d484c570d2",
"url": "/mrstatic/js/Orderinfo.eaea6ad9.chunk.js"
},
{
"revision": "81a489ac63f2f2df5ab412e0782bd54c",
"url": "/mrstatic/media/kanjia_cg_icon.81a489ac.png"
},
{
"revision": "48bf7a978aee321aaf62",
"url": "/mrstatic/js/PayOrder.c0854efc.chunk.js"
},
{
"revision": "f983caa7c06f105373e7e1aec42da261",
"url": "/mrstatic/media/iconfont.f983caa7.svg"
},
{
"revision": "fd8433a5044a99f024ac",
"url": "/mrstatic/js/Preferential.c92167d3.chunk.js"
},
{
"revision": "cd1c41437a2e35a283e4b16b620a8c9e",
"url": "/mrstatic/media/iconfont.cd1c4143.eot"
},
{
"revision": "7a83eae82a30deb3638a",
"url": "/mrstatic/js/SearchResult.0c0c9343.chunk.js"
},
{
"revision": "145742789ab409c81f28938b15b5dee7",
"url": "/mrstatic/media/iconfont.14574278.ttf"
},
{
"revision": "f0cf90f514d5e6da0030",
"url": "/mrstatic/js/ShopCart.4c2987b1.chunk.js"
},
{
"revision": "7b542c778563daa7cc420d21ed1601b3",
"url": "/mrstatic/media/iconfont.7b542c77.woff"
},
{
"revision": "8d4fa98741a43b92d467",
"url": "/mrstatic/js/aist-share.ca8ee328.chunk.js"
},
{
"revision": "e6795a3dc4e414db9d5f",
"url": "/mrstatic/js/33.9869dd21.chunk.js"
},
{
"revision": "1181d9fd8494a9a38bbe",
"url": "/mrstatic/js/coupons.60649292.chunk.js"
},
{
"revision": "88a034d5fe29124ef41d",
"url": "/mrstatic/js/32.0e3712aa.chunk.js"
},
{
"revision": "09c099c56abc65526ca2",
"url": "/mrstatic/js/detail.709d2280.chunk.js"
},
{
"revision": "deeaf6164c442e8cf2bb",
"url": "/mrstatic/js/31.66e2dea5.chunk.js"
},
{
"revision": "7808047ac7ab62b66b6d",
"url": "/mrstatic/js/main.97edd4b8.chunk.js"
},
{
"revision": "9105b19a74cb68a48004",
"url": "/mrstatic/js/30.58628dcc.chunk.js"
},
{
"revision": "024904e4dd2bcc28b669",
"url": "/mrstatic/js/myorders.b388a40d.chunk.js"
},
{
"revision": "8a11abae4a8306952d79",
"url": "/mrstatic/js/29.cddce484.chunk.js"
},
{
"revision": "2ee6108058fbdc375a84",
"url": "/mrstatic/js/purchased.44208014.chunk.js"
},
{
"revision": "7b0a4d9d9a9b06e8ec97",
"url": "/mrstatic/js/runtime~main.2aa52b5d.js"
},
{
"revision": "6d70c0121fc329e49b58",
"url": "/mrstatic/js/28.a684e5c7.chunk.js"
},
{
"revision": "19f589443d3f9529c604",
"url": "/mrstatic/js/27.4948c8d6.chunk.js"
},
{
"revision": "c0cc6176b0423c03a2e5",
"url": "/mrstatic/js/26.b2e8d558.chunk.js"
},
{
"revision": "b7d57349c471562e76c5",
"url": "/mrstatic/js/shareposter.1e04a897.chunk.js"
},
{
"revision": "df3a85b3caa756a510ec",
"url": "/mrstatic/js/25.bc7deb84.chunk.js"
},
{
"revision": "43a31770b2f88876ce76",
"url": "/mrstatic/js/study.2c0ce1c1.chunk.js"
},
{
"revision": "246a7ded02a0b9156623",
"url": "/mrstatic/js/video.41f298c2.chunk.js"
},
{
"revision": "f5caca41afe2d4a2eb85",
"url": "/mrstatic/js/togroup.03b425a3.chunk.js"
},
{
"revision": "88a034d5fe29124ef41d",
"url": "/mrstatic/css/32.278ad3b1.chunk.css"
},
{
"revision": "246a7ded02a0b9156623",
"url": "/mrstatic/css/video.b57a1aec.chunk.css"
},
{
"revision": "09c099c56abc65526ca2",
"url": "/mrstatic/css/detail.4c28ce89.chunk.css"
},
{
"revision": "df3a85b3caa756a510ec",
"url": "/mrstatic/css/25.aebbab68.chunk.css"
},
{
"revision": "b7d57349c471562e76c5",
"url": "/mrstatic/css/shareposter.f09a5959.chunk.css"
},
{
"revision": "19f589443d3f9529c604",
"url": "/mrstatic/css/27.4c706a4e.chunk.css"
},
{
"revision": "de62aba8eb390a0e879a",
"url": "/mrstatic/css/BargainMiddlePage.718dff83.chunk.css"
},
{
"revision": "6d70c0121fc329e49b58",
"url": "/mrstatic/css/28.2471f477.chunk.css"
},
{
"revision": "77ec57dd9b7b6e20f1f7",
"url": "/mrstatic/css/search.fab97849.chunk.css"
},
{
"revision": "8a11abae4a8306952d79",
"url": "/mrstatic/css/29.0bb224f2.chunk.css"
},
{
"revision": "2ee6108058fbdc375a84",
"url": "/mrstatic/css/purchased.1daf107b.chunk.css"
},
{
"revision": "9105b19a74cb68a48004",
"url": "/mrstatic/css/30.5ed15c7e.chunk.css"
},
{
"revision": "024904e4dd2bcc28b669",
"url": "/mrstatic/css/myorders.3ae12dec.chunk.css"
},
{
"revision": "deeaf6164c442e8cf2bb",
"url": "/mrstatic/css/31.ecbb6f9a.chunk.css"
},
{
"revision": "7808047ac7ab62b66b6d",
"url": "/mrstatic/css/main.d9221c15.chunk.css"
},
{
"revision": "f5caca41afe2d4a2eb85",
"url": "/mrstatic/css/togroup.49988cae.chunk.css"
},
{
"revision": "43a31770b2f88876ce76",
"url": "/mrstatic/css/study.5e9927d1.chunk.css"
},
{
"revision": "e6795a3dc4e414db9d5f",
"url": "/mrstatic/css/33.03fe7b57.chunk.css"
},
{
"revision": "1181d9fd8494a9a38bbe",
"url": "/mrstatic/css/coupons.de0ae9dc.chunk.css"
},
{
"revision": "8d4fa98741a43b92d467",
"url": "/mrstatic/css/aist-share.bef8c404.chunk.css"
},
{
"revision": "f0cf90f514d5e6da0030",
"url": "/mrstatic/css/ShopCart.3a4dbb7a.chunk.css"
},
{
"revision": "7a83eae82a30deb3638a",
"url": "/mrstatic/css/SearchResult.2649d43f.chunk.css"
},
{
"revision": "fd8433a5044a99f024ac",
"url": "/mrstatic/css/Preferential.cda7a495.chunk.css"
},
{
"revision": "48bf7a978aee321aaf62",
"url": "/mrstatic/css/PayOrder.e5315535.chunk.css"
},
{
"revision": "aaddea0132888822b923",
"url": "/mrstatic/css/Order.8bb031ea.chunk.css"
},
{
"revision": "c909d0b78fa7f27cd2d7",
"url": "/mrstatic/css/Examination.f2cc3163.chunk.css"
},
{
"revision": "e82fbe8c3278f95eb101",
"url": "/mrstatic/css/DrawDocument.2e7d81ca.chunk.css"
},
{
"revision": "a999eb7686c310c7ecd7",
"url": "/mrstatic/css/CourseList.c0829f24.chunk.css"
},
{
"revision": "da4c5b9c52d373ead12b",
"url": "/mrstatic/css/Classify.f2f19957.chunk.css"
},
{
"revision": "34cb6b34e00b1faa766a59e8fb8adc5f",
"url": "/index.html"
}
];
\ No newline at end of file
...@@ -164,6 +164,8 @@ class App extends Component { ...@@ -164,6 +164,8 @@ class App extends Component {
transformUser = res => { transformUser = res => {
let payload let payload
if (res.data.code === 200) { if (res.data.code === 200) {
//移除红包统计cookie
cookie.remove('share_code', {path: '/', domain: '.julyedu.com'})
const { const {
msg, data: { msg, data: {
avatar_file: avatar, avatar_file: avatar,
......
...@@ -9,6 +9,7 @@ import { Toast } from 'antd-mobile'; ...@@ -9,6 +9,7 @@ import { Toast } from 'antd-mobile';
import Captcha from '@/common/Captcha'; import Captcha from '@/common/Captcha';
import FollowQRcode from './../followQRcode'; import FollowQRcode from './../followQRcode';
import './index.scss'; import './index.scss';
import cookie from 'js-cookie'
class RedPacket extends PureComponent { class RedPacket extends PureComponent {
...@@ -54,6 +55,8 @@ class RedPacket extends PureComponent { ...@@ -54,6 +55,8 @@ class RedPacket extends PureComponent {
// 分享链接进入 // 分享链接进入
this.judgePopupType(); this.judgePopupType();
window.addEventListener('beforeunload', this.removeStatisticsCookie)
// 微信进入 // 微信进入
const isWechat = getParam('wechat'); const isWechat = getParam('wechat');
const { userInfo } = this.props; const { userInfo } = this.props;
...@@ -95,6 +98,7 @@ class RedPacket extends PureComponent { ...@@ -95,6 +98,7 @@ class RedPacket extends PureComponent {
window.localStorage.removeItem('redpacket-click'); window.localStorage.removeItem('redpacket-click');
} }
}else { }else {
this.setRelativeCookie()
this.setState({ this.setState({
type: 1 type: 1
}); });
...@@ -103,6 +107,16 @@ class RedPacket extends PureComponent { ...@@ -103,6 +107,16 @@ class RedPacket extends PureComponent {
this.fetchShareInfo(); this.fetchShareInfo();
} }
removeStatisticsCookie = () => {
cookie.remove('share_code', {path: '/', domain: '.julyedu.com'})
}
componentWillUnmount() {
window.removeEventListener('beforeunload', this.removeStatisticsCookie)
this.removeStatisticsCookie()
}
// 获取分享信息 // 获取分享信息
fetchShareInfo = () => { fetchShareInfo = () => {
const share_code = getParam('share_code'); const share_code = getParam('share_code');
...@@ -574,6 +588,14 @@ class RedPacket extends PureComponent { ...@@ -574,6 +588,14 @@ class RedPacket extends PureComponent {
}); });
} }
//设置统计信息
setRelativeCookie = () => {
const config = {path: '/', domain: '.julyedu.com'}
const {shareInfo} = this.state
cookie.set('share_code', shareInfo && shareInfo.share_code ? shareInfo.share_code : 'share_code:share_code', config)
}
render() { render() {
// console.log(this.props); // console.log(this.props);
const { history, userInfo } = this.props; const { history, userInfo } = this.props;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment