Commit fd8a57e5 by xuzhenghua

返场

parents bc983c3e 3f3f77ab
.python-container{padding:13.333333vw 2.133333vw 7.733333vw;background-image:url(https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/python-bg.png);background-size:cover}.python-header{position:relative;height:26.666667vw;padding-top:9.066667vw;box-sizing:border-box}.python-header .iconfont{position:absolute;top:-1.6vw;right:10.666667vw;font-size:10.133333vw;color:#fff}.python-wechat__title{margin:0;font-size:4.533333vw;color:#fcff1d;text-align:center;line-height:1}.python-content{padding-bottom:9.866667vw;background-image:url(https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/python-content-bg.png);background-size:cover}.python-user{position:relative;margin:0 1.333333vw;padding-top:12vw;border-bottom:1px dashed #000}.python-user__portrait{position:absolute;top:-8vw;left:0;right:0;width:16vw;height:16vw;margin:auto;padding:1.333333vw;border-radius:50%;box-sizing:border-box;background-color:#fff}.python-user__portrait img{display:block;width:100%}.python-user__id{margin:0;font-size:4vw;font-weight:500;color:#111;text-align:center;line-height:1}.python-user__desc{height:12.8vw;margin:1.066667vw 0;font-size:4.266667vw;color:#333;text-align:center}.python-user__desc span{color:#2d57f0}.python-code__title{position:relative;margin:8.533333vw 4.266667vw 5.6vw;padding-left:4.266667vw;font-size:4.533333vw;font-weight:600;color:#2d56f0;line-height:1}.python-code__title:after{content:"";position:absolute;top:0;left:0;bottom:0;width:1.066667vw;height:3.2vw;margin:auto 0;background-color:#2d56f0}.python-code__content{position:relative;height:45.6vw;margin:0 4.266667vw;padding:0 2.666667vw;border-radius:1.333333vw;border:1px solid #67e4ff;box-sizing:border-box;font-size:3.733333vw;color:#fff;background-color:#272822}.python-button{padding:0;border-style:none;cursor:pointer;outline:none}.python-button__study{display:block;width:62.133333vw;height:11.733333vw;margin:9.333333vw auto 0;border-radius:5.866667vw;font-size:4.266667vw;color:#2d56f0;background-color:#fff95b;box-shadow:0 1.333333vw 0 #ffd200}.python-button__study,.python-button__tip{font-weight:500;line-height:11.733333vw;text-align:center}.python-button__tip{margin:9.333333vw 0 0;font-size:4vw;color:#fff}.python-button__execute{position:absolute;top:0;left:0;bottom:0;right:0;width:29.333333vw;height:8.533333vw;margin:auto;border-radius:4.266667vw;font-size:4vw;color:#fff;line-height:8.533333vw;background-color:#09f}.python-popup{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.3);z-index:99}.ace_mobile-menu{display:none}
/*# sourceMappingURL=51.1146f09d.chunk.css.map */
\ No newline at end of file
{"version":3,"sources":["/Users/xzh/dnmp/www/mr-julyedu/src/components/pythonShare/index.scss"],"names":[],"mappings":"AAmGA,kBACE,yCAAA,CACA,mGAAA,CACA,qBAAsB,CAOxB,eACE,iBAAA,CACA,kBAAA,CACA,sBAAA,CACA,qBAAsB,CAJxB,yBAOI,iBAAA,CACA,UAAA,CACA,iBAAA,CACA,qBAAA,CACA,UAAW,CAIf,sBACE,QAAA,CACA,oBAAA,CACA,aAAA,CACA,iBAAA,CACA,aAAc,CAGhB,gBACE,yBAAA,CACA,2GAAA,CACA,qBAAsB,CAGxB,aACE,iBAAA,CACA,mBAAA,CACA,gBAAA,CACA,6BAA8B,CAGhC,uBACE,iBAAA,CACA,QAAA,CACA,MAAA,CACA,OAAA,CACA,UAAA,CACA,WAAA,CACA,WAAA,CACA,kBAAA,CACA,iBAAA,CACA,qBAAA,CACA,qBAAsB,CAXxB,2BAcI,aAAA,CACA,UAAW,CAIf,iBACE,QAAA,CACA,aAAA,CACA,eAAA,CACA,UAAA,CACA,iBAAA,CACA,aAAc,CAGhB,mBACE,aAAA,CACA,mBAAA,CACA,oBAAA,CACA,UAAA,CACA,iBAAkB,CALpB,wBAQI,aAAc,CAIlB,oBACE,iBAAA,CACA,kCAAA,CACA,uBAAA,CACA,oBAAA,CACA,eAAA,CACA,aAAA,CACA,aAAc,CAPhB,0BAUI,UAAA,CACA,iBAAA,CACA,KAAA,CACA,MAAA,CACA,QAAA,CACA,gBAAA,CACA,YAAA,CACA,aAAA,CACA,wBAAyB,CAI7B,sBACE,iBAAA,CACA,aAAA,CACA,mBAAA,CACA,oBAAA,CACA,wBAAA,CACA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,UAAA,CACA,wBAAyB,CAG3B,eACE,SAAA,CACA,iBAAA,CACA,cAAA,CACA,YAAa,CAEf,sBACE,aAAA,CACA,iBAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,oBAAA,CAEA,aAAA,CAGA,wBAAA,CACA,iCAAyC,CAG3C,0CARE,eAAA,CAEA,uBAAA,CACA,iBAWkB,CANpB,oBACE,qBAAA,CACA,aAAA,CAEA,UAEkB,CAGpB,wBACE,iBAAA,CACA,KAAA,CACA,MAAA,CACA,QAAA,CACA,OAAA,CACA,iBAAA,CACA,iBAAA,CACA,WAAA,CACA,wBAAA,CACA,aAAA,CACA,UAAA,CACA,sBAAA,CACA,qBAAyB,CAG3B,cACE,cAAA,CACA,KAAA,CACA,MAAA,CACA,UAAA,CACA,WAAA,CACA,+BAAA,CACA,UAAW,CAGb,iBACE,YAAa","file":"51.1146f09d.chunk.css","sourcesContent":["@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.python-container {\n padding: 50px 8px 29px;\n background-image: url(\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/python-bg.png\");\n background-size: cover; }\n\n.python-header {\n position: relative;\n height: 100px;\n padding-top: 34px;\n box-sizing: border-box; }\n .python-header .iconfont {\n position: absolute;\n top: -6px;\n right: 40px;\n font-size: 38px;\n color: #fff; }\n\n.python-wechat__title {\n margin: 0;\n font-size: 17px;\n color: #FCFF1D;\n text-align: center;\n line-height: 1; }\n\n.python-content {\n padding-bottom: 37px;\n background-image: url(\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/python-content-bg.png\");\n background-size: cover; }\n\n.python-user {\n position: relative;\n margin: 0 5px;\n padding-top: 45px;\n border-bottom: 1px dashed #000; }\n\n.python-user__portrait {\n position: absolute;\n top: -30px;\n left: 0;\n right: 0;\n width: 60px;\n height: 60px;\n margin: auto;\n padding: 5px;\n border-radius: 50%;\n box-sizing: border-box;\n background-color: #fff; }\n .python-user__portrait img {\n display: block;\n width: 100%; }\n\n.python-user__id {\n margin: 0;\n font-size: 15px;\n font-weight: 500;\n color: #111;\n text-align: center;\n line-height: 1; }\n\n.python-user__desc {\n height: 48px;\n margin: 4px 0;\n font-size: 16px;\n color: #333;\n text-align: center; }\n .python-user__desc span {\n color: #2D57F0; }\n\n.python-code__title {\n position: relative;\n margin: 32px 16px 21px;\n padding-left: 16px;\n font-size: 17px;\n font-weight: 600;\n color: #2D56F0;\n line-height: 1; }\n .python-code__title:after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 4px;\n height: 12px;\n margin: auto 0;\n background-color: #2D56F0; }\n\n.python-code__content {\n position: relative;\n height: 171px;\n margin: 0 16px;\n padding: 0 10px;\n border-radius: 5px;\n border: 1px solid #67E4FF;\n box-sizing: border-box;\n font-size: 14px;\n color: #fff;\n background-color: #272822; }\n\n.python-button {\n padding: 0;\n border-style: none;\n cursor: pointer;\n outline: none; }\n\n.python-button__study {\n display: block;\n width: 233px;\n height: 44px;\n margin: 35px auto 0;\n border-radius: 22px;\n font-size: 16px;\n font-weight: 500;\n color: #2D56F0;\n line-height: 44px;\n text-align: center;\n background-color: #FFF95B;\n box-shadow: 0px 5px 0px #ffd200; }\n\n.python-button__tip {\n margin: 35px 0 0;\n font-size: 15px;\n font-weight: 500;\n color: #fff;\n line-height: 44px;\n text-align: center; }\n\n.python-button__execute {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n width: 110px;\n height: 32px;\n margin: auto;\n border-radius: 16px;\n font-size: 15px;\n color: #fff;\n line-height: 32px;\n background-color: #0099FF; }\n\n.python-popup {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.3);\n z-index: 99; }\n\n.ace_mobile-menu {\n display: none; }\n"]}
\ No newline at end of file
.python-container{padding:13.333333vw 2.133333vw 7.733333vw;background-image:url(https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/python-bg.png);background-size:cover}.python-header{position:relative;height:26.666667vw;padding-top:9.066667vw;box-sizing:border-box}.python-header .iconfont{position:absolute;top:-1.6vw;right:10.666667vw;font-size:10.133333vw;color:#fff}.python-wechat__title{margin:0;font-size:4.533333vw;color:#fcff1d;text-align:center;line-height:1}.python-content{padding-bottom:9.866667vw;background-image:url(https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/python-content-bg.png);background-size:cover}.python-user{position:relative;margin:0 1.333333vw;padding-top:12vw;border-bottom:1px dashed #000}.python-user__portrait{position:absolute;top:-8vw;left:0;right:0;width:16vw;height:16vw;margin:auto;padding:1.333333vw;border-radius:50%;box-sizing:border-box;background-color:#fff;background-size:cover}.python-user__portrait img{display:block;width:100%}.python-user__id{margin:0;font-size:4vw;font-weight:500;color:#111;text-align:center;line-height:1}.python-user__desc{height:12.8vw;margin:1.066667vw 0;font-size:4.266667vw;color:#333;text-align:center}.python-user__desc span{color:#2d57f0}.python-code__title{position:relative;margin:8.533333vw 4.266667vw 5.6vw;padding-left:4.266667vw;font-size:4.533333vw;font-weight:600;color:#2d56f0;line-height:1}.python-code__title:after{content:"";position:absolute;top:0;left:0;bottom:0;width:1.066667vw;height:3.2vw;margin:auto 0;background-color:#2d56f0}.python-code__content{position:relative;height:45.6vw;margin:0 4.266667vw;padding:0 2.666667vw;border-radius:1.333333vw;border:1px solid #67e4ff;box-sizing:border-box;font-size:3.733333vw;color:#fff;background-color:#272822}.python-button{padding:0;border-style:none;cursor:pointer;outline:none}.python-button__study{display:block;width:62.133333vw;height:11.733333vw;margin:9.333333vw auto 0;border-radius:5.866667vw;font-size:4.266667vw;color:#2d56f0;background-color:#fff95b;box-shadow:0 1.333333vw 0 #ffd200}.python-button__study,.python-button__tip{font-weight:500;line-height:11.733333vw;text-align:center}.python-button__tip{margin:9.333333vw 0 0;font-size:4vw;color:#fff}.python-button__execute{position:absolute;top:0;left:0;bottom:0;right:0;width:29.333333vw;height:8.533333vw;margin:auto;border-radius:4.266667vw;font-size:4vw;color:#fff;line-height:8.533333vw;background-color:#09f}.python-popup{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.3);z-index:99}.ace_mobile-menu{display:none}
/*# sourceMappingURL=51.3e6c1334.chunk.css.map */
\ No newline at end of file
{"version":3,"sources":["/Users/xzh/dnmp/www/mr-julyedu/src/components/pythonShare/index.scss"],"names":[],"mappings":"AAmGA,kBACE,yCAAA,CACA,mGAAA,CACA,qBAAsB,CAOxB,eACE,iBAAA,CACA,kBAAA,CACA,sBAAA,CACA,qBAAsB,CAJxB,yBAOI,iBAAA,CACA,UAAA,CACA,iBAAA,CACA,qBAAA,CACA,UAAW,CAIf,sBACE,QAAA,CACA,oBAAA,CACA,aAAA,CACA,iBAAA,CACA,aAAc,CAGhB,gBACE,yBAAA,CACA,2GAAA,CACA,qBAAsB,CAGxB,aACE,iBAAA,CACA,mBAAA,CACA,gBAAA,CACA,6BAA8B,CAGhC,uBACE,iBAAA,CACA,QAAA,CACA,MAAA,CACA,OAAA,CACA,UAAA,CACA,WAAA,CACA,WAAA,CACA,kBAAA,CACA,iBAAA,CACA,qBAAA,CACA,qBAAA,CACA,qBAAsB,CAZxB,2BAeI,aAAA,CACA,UAAW,CAIf,iBACE,QAAA,CACA,aAAA,CACA,eAAA,CACA,UAAA,CACA,iBAAA,CACA,aAAc,CAGhB,mBACE,aAAA,CACA,mBAAA,CACA,oBAAA,CACA,UAAA,CACA,iBAAkB,CALpB,wBAQI,aAAc,CAIlB,oBACE,iBAAA,CACA,kCAAA,CACA,uBAAA,CACA,oBAAA,CACA,eAAA,CACA,aAAA,CACA,aAAc,CAPhB,0BAUI,UAAA,CACA,iBAAA,CACA,KAAA,CACA,MAAA,CACA,QAAA,CACA,gBAAA,CACA,YAAA,CACA,aAAA,CACA,wBAAyB,CAI7B,sBACE,iBAAA,CACA,aAAA,CACA,mBAAA,CACA,oBAAA,CACA,wBAAA,CACA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,UAAA,CACA,wBAAyB,CAG3B,eACE,SAAA,CACA,iBAAA,CACA,cAAA,CACA,YAAa,CAEf,sBACE,aAAA,CACA,iBAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,oBAAA,CAEA,aAAA,CAGA,wBAAA,CACA,iCAAyC,CAG3C,0CARE,eAAA,CAEA,uBAAA,CACA,iBAWkB,CANpB,oBACE,qBAAA,CACA,aAAA,CAEA,UAEkB,CAGpB,wBACE,iBAAA,CACA,KAAA,CACA,MAAA,CACA,QAAA,CACA,OAAA,CACA,iBAAA,CACA,iBAAA,CACA,WAAA,CACA,wBAAA,CACA,aAAA,CACA,UAAA,CACA,sBAAA,CACA,qBAAyB,CAG3B,cACE,cAAA,CACA,KAAA,CACA,MAAA,CACA,UAAA,CACA,WAAA,CACA,+BAAA,CACA,UAAW,CAGb,iBACE,YAAa","file":"51.3e6c1334.chunk.css","sourcesContent":["@charset \"UTF-8\";\n/*\n * @ 文字颜色\n */\n/*\n * @ 文字大小\n */\n/*\n * @ 背景颜色\n */\n/*\n * @ 分割线颜色\n */\n/*\n * @ 边框颜色\n */\n/*\n * @ 标签颜色\n */\n.python-container {\n padding: 50px 8px 29px;\n background-image: url(\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/python-bg.png\");\n background-size: cover; }\n\n.python-header {\n position: relative;\n height: 100px;\n padding-top: 34px;\n box-sizing: border-box; }\n .python-header .iconfont {\n position: absolute;\n top: -6px;\n right: 40px;\n font-size: 38px;\n color: #fff; }\n\n.python-wechat__title {\n margin: 0;\n font-size: 17px;\n color: #FCFF1D;\n text-align: center;\n line-height: 1; }\n\n.python-content {\n padding-bottom: 37px;\n background-image: url(\"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/python-content-bg.png\");\n background-size: cover; }\n\n.python-user {\n position: relative;\n margin: 0 5px;\n padding-top: 45px;\n border-bottom: 1px dashed #000; }\n\n.python-user__portrait {\n position: absolute;\n top: -30px;\n left: 0;\n right: 0;\n width: 60px;\n height: 60px;\n margin: auto;\n padding: 5px;\n border-radius: 50%;\n box-sizing: border-box;\n background-color: #fff;\n background-size: cover; }\n .python-user__portrait img {\n display: block;\n width: 100%; }\n\n.python-user__id {\n margin: 0;\n font-size: 15px;\n font-weight: 500;\n color: #111;\n text-align: center;\n line-height: 1; }\n\n.python-user__desc {\n height: 48px;\n margin: 4px 0;\n font-size: 16px;\n color: #333;\n text-align: center; }\n .python-user__desc span {\n color: #2D57F0; }\n\n.python-code__title {\n position: relative;\n margin: 32px 16px 21px;\n padding-left: 16px;\n font-size: 17px;\n font-weight: 600;\n color: #2D56F0;\n line-height: 1; }\n .python-code__title:after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 4px;\n height: 12px;\n margin: auto 0;\n background-color: #2D56F0; }\n\n.python-code__content {\n position: relative;\n height: 171px;\n margin: 0 16px;\n padding: 0 10px;\n border-radius: 5px;\n border: 1px solid #67E4FF;\n box-sizing: border-box;\n font-size: 14px;\n color: #fff;\n background-color: #272822; }\n\n.python-button {\n padding: 0;\n border-style: none;\n cursor: pointer;\n outline: none; }\n\n.python-button__study {\n display: block;\n width: 233px;\n height: 44px;\n margin: 35px auto 0;\n border-radius: 22px;\n font-size: 16px;\n font-weight: 500;\n color: #2D56F0;\n line-height: 44px;\n text-align: center;\n background-color: #FFF95B;\n box-shadow: 0px 5px 0px #ffd200; }\n\n.python-button__tip {\n margin: 35px 0 0;\n font-size: 15px;\n font-weight: 500;\n color: #fff;\n line-height: 44px;\n text-align: center; }\n\n.python-button__execute {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n width: 110px;\n height: 32px;\n margin: auto;\n border-radius: 16px;\n font-size: 15px;\n color: #fff;\n line-height: 32px;\n background-color: #0099FF; }\n\n.python-popup {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.3);\n z-index: 99; }\n\n.ace_mobile-menu {\n display: none; }\n"]}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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([[51],{1228:function(e,t,a){},1285:function(e,t,a){"use strict";a.r(t);a(41);var n=a(12),c=a.n(n),o=a(5),s=a(7),i=a(6),l=a(8),r=a(9),d=a(0),m=a.n(d),h=a(16),u=a(722),p=a(1222),y=a.n(p),E=a(28),b=a(3),_=(a(1228),a(1229),a(1230),function(e){function t(e){var a;return Object(o.a)(this,t),(a=Object(i.a)(this,Object(l.a)(t).call(this,e))).initCommand=function(){a.setState({command:"".concat(API.m,"/pythonShare?id=").concat(Object(b.c)("id"),"&type=").concat(Object(b.c)("type"),"&ques=").concat(Object(b.c)("ques"),"&from=python")})},a.initPageStatus=function(){"barcode"===Object(b.c)("from")&&a.setState({entryMode:0}),"python"===Object(b.c)("from")&&a.setState({entryMode:2}),"1"===Object(b.c)("type")&&a.setState({isShare:!0}),"2"===Object(b.c)("type")&&a.setState({isShare:!1}),a.setState({type:Object(b.c)("ques")||"1"})},a.handleFetchInfo=function(){var e=Object(b.c)("id")||10;b.d.get("".concat(API.home,"/m/it/share/show"),{params:{id:e}}).then(function(e){var t=e.data,n=t.code,c=t.data;200===n&&a.setState({data:c})})},a.handleToSend=function(){var e=a.props.history;b.b.isWeixin&&(a.setState({entryMode:1}),e.push("/pythonShare?id=".concat(Object(b.c)("id"),"&type=").concat(Object(b.c)("type"),"&ques=").concat(Object(b.c)("ques"),"&from=python")))},a.copyToSuccess=function(){c.a.info("\u5df2\u590d\u5236\u94fe\u63a5\uff0c\u5feb\u53bb\u7c98\u8d34\u53d1\u7ed9\u597d\u53cb\u5427\uff5e"),a.setState({isCopy:!0})},a.handleToExecute=function(){a.setState({isExecute:!0})},a.handleToHide=function(){a.setState({entryMode:2})},a.state={isWechat:b.b.isWeixin,isShare:!0,type:"1",entryMode:0,isExecute:!1,isCopy:!1,command:"",data:{}},a}return Object(r.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.handleFetchInfo(),this.initPageStatus(),this.initCommand()}},{key:"render",value:function(){var e=this.state,t=e.isWechat,a=e.isShare,n=e.isExecute,c=e.type,o=e.entryMode,s=e.command,i=e.isCopy,l=e.data;return m.a.createElement(m.a.Fragment,null,m.a.createElement(E.e,{title:"Python\u57fa\u7840\u8bed\u6cd5",arrow:!0,home:!0}),m.a.createElement(f,{isWechat:t,isShare:a,type:c,isExecute:n,entryMode:o,isCopy:i,command:s,data:l,handleToExecute:this.handleToExecute,handleToSend:this.handleToSend,copyToSuccess:this.copyToSuccess,handleToHide:this.handleToHide}))}}]),t}(d.Component));function S(e){return m.a.createElement(y.a,{mode:"python",theme:"dracula",readOnly:!0,showPrintMargin:!1,value:e.code,style:{width:"100%",height:"100%"}})}function f(e){var t=e.isWechat,a=e.isShare,n=e.isExecute,c=e.type,o=e.entryMode,s=e.isCopy,i=e.command,l=e.data,r=l.head_img,d=l.nickname,p=l.code_lines,y=l.code,E=l.result,b=l.ques_name,_=l.course_name,f=l.course_id,N=l.video_name,v=e.handleToSend,O=e.copyToSuccess,T=e.handleToExecute,j=e.handleToHide,C="";return"1"===c&&(C="\u7ec3\u4e60-".concat(b)),"2"===c&&(C="\u8bfe\u5802-".concat(N)),m.a.createElement("div",{className:"python-container"},1===o&&t&&m.a.createElement("div",{className:"python-popup",onClick:j},m.a.createElement("div",{className:"python-header"},m.a.createElement("p",{className:"python-wechat__title"},"\u8bf7\u70b9\u51fb\u53f3\u4e0a\u89d2\u5206\u4eab"),m.a.createElement("i",{className:"iconfont iconyindao"}))),m.a.createElement("div",{className:"python-content"},m.a.createElement("div",{className:"python-user"},m.a.createElement("div",{className:"python-user__portrait"},m.a.createElement("img",{src:r,alt:""})),m.a.createElement("h2",{className:"python-user__id"},d),0===o&&a&&m.a.createElement("p",{className:"python-user__desc"},"\u5b8c\u6210\u4e86",m.a.createElement("span",null,"\u3010",C,"\u3011")),0!==o&&a&&m.a.createElement("p",{className:"python-user__desc"},"\u5728",m.a.createElement("span",null,"\u3010",_,"\u3011"),"\u5b8c\u6210\u4e86",m.a.createElement("br",null),C),0===o&&!a&&m.a.createElement("p",{className:"python-user__desc"},"\u5728",m.a.createElement("span",null,"\u3010",C,"\u3011"),"\u9047\u5230\u4e86\u56f0\u96be"),0!==o&&!a&&m.a.createElement("p",{className:"python-user__desc"},"\u5728",m.a.createElement("span",null,"\u3010",_,"\u3011"),"\u7684",m.a.createElement("br",null),m.a.createElement("span",null,C),"\u9047\u5230\u4e86\u56f0\u96be")),m.a.createElement("h4",{className:"python-code__title"},0!==o&&a&&!t?"\u8fd9\u662fTa\u7684\u7b2c".concat(p,"\u884c\u4ee3\u7801"):"\u8fd0\u884c\u7ed3\u679c"),m.a.createElement("div",{className:"python-code__content"},m.a.createElement(S,{code:0!==o&&a&&!t?y:E})),m.a.createElement("h4",{className:"python-code__title"},0!==o&&a&&!t?"\u8fd0\u884c\u7ed3\u679c":"\u4ee3\u7801"),m.a.createElement("div",{className:"python-code__content"},0!==o&&a&&!t?m.a.createElement(S,{code:n?E:""}):m.a.createElement(S,{code:y}),0!==o&&a&&!t&&!n&&m.a.createElement("button",{className:"python-button python-button__execute",onClick:T},"\u8fd0\u884c\u770b\u770b"))),0===o&&t&&m.a.createElement("button",{className:"python-button python-button__study",onClick:v},a?"\u5206\u4eab\u7ed9\u597d\u53cb":"\u53d1\u7ed9\u597d\u53cb\u6c42\u52a9"),0===o&&!t&&!s&&m.a.createElement(u.CopyToClipboard,{text:i,onCopy:O},m.a.createElement("button",{className:"python-button python-button__study"},a?"\u5206\u4eab\u7ed9\u597d\u53cb":"\u53d1\u7ed9\u597d\u53cb\u6c42\u52a9")),0===o&&!t&&s&&m.a.createElement("p",{className:"python-button__tip"},"\u5df2\u590d\u5236\u94fe\u63a5\uff0c\u5feb\u53bb\u7c98\u8d34\u53d1\u7ed9\u597d\u53cb\u5427\uff5e"),0!==o&&m.a.createElement(h.b,{className:"python-button python-button__study",to:"/python?id=".concat(f)},"\u6211\u4e5f\u8981\u5b66Python"))}t.default=_}}]);
//# sourceMappingURL=51.92ccce8c.chunk.js.map
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{1228:function(e,t,a){},1285:function(e,t,a){"use strict";a.r(t);a(41);var n=a(12),c=a.n(n),o=a(5),s=a(7),i=a(6),l=a(8),r=a(9),d=a(0),u=a.n(d),m=a(16),h=a(722),p=a(1222),y=a.n(p),E=a(28),b=a(3),_=(a(1228),a(1229),a(1230),function(e){function t(e){var a;return Object(o.a)(this,t),(a=Object(i.a)(this,Object(l.a)(t).call(this,e))).initCommand=function(){a.setState({command:"".concat(API.m,"/pythonShare?id=").concat(Object(b.c)("id"),"&type=").concat(Object(b.c)("type"),"&ques=").concat(Object(b.c)("ques"),"&origin=python")})},a.initPageStatus=function(){"barcode"===Object(b.c)("origin")&&a.setState({entryMode:0}),"python"===Object(b.c)("origin")&&a.setState({entryMode:1}),"1"===Object(b.c)("type")&&a.setState({isShare:!0}),"2"===Object(b.c)("type")&&a.setState({isShare:!1}),a.setState({type:Object(b.c)("ques")||"1"})},a.handleFetchInfo=function(){var e=Object(b.c)("id")||10;b.d.get("".concat(API.home,"/m/it/share/show"),{params:{id:e}}).then(function(e){var t=e.data,n=t.code,c=t.data;200===n&&a.setState({data:c})})},a.handleToSend=function(e){var t=a.props.history,n=a.state,c=n.isShare,o=n.entryMode;if(b.b.isWeixin){t.push("/pythonShare?id=".concat(Object(b.c)("id"),"&type=").concat(Object(b.c)("type"),"&ques=").concat(Object(b.c)("ques"),"&origin=python")),a.setState({isGuide:!0});var s="",i=a.formatTitle(e);0===o||c||(s="\u6211\u5728".concat(e.course_name,"\u7684").concat(i,"\u9047\u5230\u4e86\u56f0\u96be")),0!==o&&c&&(s="\u6211\u5df2\u5728\u3010".concat(e.course_name,"\u3011\u4e0a\u8fd0\u884c\u4e86\u884c\u4ee3\u7801\u4e86").concat(e.code_lines)),Object(b.i)({title:s,desc:i,link:encodeURI(location.href),imgUrl:e.course_img})}},a.formatTitle=function(e){var t=a.state.type;return"1"===t?"\u7ec3\u4e60-".concat(e.ques_name):"2"===t?"\u8bfe\u5802-".concat(e.video_name):void 0},a.copyToSuccess=function(){c.a.info("\u5df2\u590d\u5236\u94fe\u63a5\uff0c\u5feb\u53bb\u7c98\u8d34\u53d1\u7ed9\u597d\u53cb\u5427\uff5e"),a.setState({isCopy:!0})},a.handleToExecute=function(){a.setState({isExecute:!0})},a.handleToHide=function(){a.setState({isGuide:!1})},a.state={isWechat:b.b.isWeixin,isShare:!0,type:"1",entryMode:0,isGuide:!1,isExecute:!1,isCopy:!1,command:"",data:{}},a}return Object(r.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.handleFetchInfo(),this.initPageStatus(),this.initCommand()}},{key:"render",value:function(){var e=this.state,t=e.isWechat,a=e.isShare,n=e.isExecute,c=e.entryMode,o=e.command,s=e.isCopy,i=e.isGuide,l=e.data;return u.a.createElement(u.a.Fragment,null,u.a.createElement(E.e,{title:"Python\u57fa\u7840\u8bed\u6cd5",arrow:!0,home:!0}),u.a.createElement(f,{isWechat:t,isShare:a,isExecute:n,entryMode:c,isGuide:i,isCopy:s,command:o,data:l,labelName:this.formatTitle(l),handleToExecute:this.handleToExecute,handleToSend:this.handleToSend,copyToSuccess:this.copyToSuccess,handleToHide:this.handleToHide}))}}]),t}(d.Component));function S(e){return u.a.createElement(y.a,{mode:"python",theme:"dracula",readOnly:!0,showPrintMargin:!1,value:e.code,style:{width:"100%",height:"100%"}})}function f(e){var t=e.isWechat,a=e.isShare,n=e.isExecute,c=e.entryMode,o=e.isCopy,s=e.command,i=e.labelName,l=e.isGuide,r=e.data,d=r.head_img,p=r.nickname,y=r.code_lines,E=r.code,b=r.result,_=r.course_name,f=r.course_id,N=e.handleToSend,v=e.copyToSuccess,T=e.handleToExecute,O=e.handleToHide;return u.a.createElement("div",{className:"python-container"},l&&u.a.createElement("div",{className:"python-popup",onClick:O},u.a.createElement("div",{className:"python-header"},u.a.createElement("p",{className:"python-wechat__title"},"\u8bf7\u70b9\u51fb\u53f3\u4e0a\u89d2\u5206\u4eab"),u.a.createElement("i",{className:"iconfont iconyindao"}))),u.a.createElement("div",{className:"python-content"},u.a.createElement("div",{className:"python-user"},u.a.createElement("i",{className:"python-user__portrait",style:{backgroundImage:"url(".concat(d,")")}}),u.a.createElement("h2",{className:"python-user__id"},p),0===c&&a&&u.a.createElement("p",{className:"python-user__desc"},"\u5b8c\u6210\u4e86",u.a.createElement("span",null,"\u3010",i,"\u3011")),1===c&&a&&u.a.createElement("p",{className:"python-user__desc"},"\u5728",u.a.createElement("span",null,"\u3010",_,"\u3011"),"\u5b8c\u6210\u4e86",u.a.createElement("br",null),i),0===c&&!a&&u.a.createElement("p",{className:"python-user__desc"},"\u5728",u.a.createElement("span",null,"\u3010",i,"\u3011"),"\u9047\u5230\u4e86\u56f0\u96be"),1===c&&!a&&u.a.createElement("p",{className:"python-user__desc"},"\u5728",u.a.createElement("span",null,"\u3010",_,"\u3011"),"\u7684",u.a.createElement("br",null),u.a.createElement("span",null,i),"\u9047\u5230\u4e86\u56f0\u96be")),u.a.createElement("h4",{className:"python-code__title"},1===c&&a?"\u8fd9\u662fTa\u7684\u7b2c".concat(y,"\u884c\u4ee3\u7801"):"\u8fd0\u884c\u7ed3\u679c"),u.a.createElement("div",{className:"python-code__content"},u.a.createElement(S,{code:1===c&&a?E:b})),u.a.createElement("h4",{className:"python-code__title"},1===c&&a?"\u8fd0\u884c\u7ed3\u679c":"\u4ee3\u7801"),u.a.createElement("div",{className:"python-code__content"},1===c&&a?u.a.createElement(S,{code:n?b:""}):u.a.createElement(S,{code:E}),1===c&&a&&!n&&u.a.createElement("button",{className:"python-button python-button__execute",onClick:T},"\u8fd0\u884c\u770b\u770b"))),0===c&&t&&u.a.createElement("button",{className:"python-button python-button__study",onClick:N},a?"\u5206\u4eab\u7ed9\u597d\u53cb":"\u53d1\u7ed9\u597d\u53cb\u6c42\u52a9"),0===c&&!t&&!o&&u.a.createElement(h.CopyToClipboard,{text:s,onCopy:v},u.a.createElement("button",{className:"python-button python-button__study"},a?"\u5206\u4eab\u7ed9\u597d\u53cb":"\u53d1\u7ed9\u597d\u53cb\u6c42\u52a9")),0===c&&!t&&o&&u.a.createElement("p",{className:"python-button__tip"},"\u5df2\u590d\u5236\u94fe\u63a5\uff0c\u5feb\u53bb\u7c98\u8d34\u53d1\u7ed9\u597d\u53cb\u5427\uff5e"),1===c&&u.a.createElement(m.b,{className:"python-button python-button__study",to:"/python?id=".concat(f)},"\u6211\u4e5f\u8981\u5b66Python"))}t.default=_}}]);
//# sourceMappingURL=51.fb82c6ca.chunk.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){function r(r){for(var n,a,f=r[0],i=r[1],d=r[2],s=0,l=[];s<f.length;s++)a=f[s],c[a]&&l.push(c[a][0]),c[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(u&&u(r);l.length;)l.shift()();return o.push.apply(o,d||[]),t()}function t(){for(var e,r=0;r<o.length;r++){for(var t=o[r],n=!0,a=1;a<t.length;a++){var i=t[a];0!==c[i]&&(n=!1)}n&&(o.splice(r--,1),e=f(f.s=t[0]))}return e}var n={},a={35:0},c={35:0},o=[];function f(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,f),t.l=!0,t.exports}f.e=function(e){var r=[];a[e]?r.push(a[e]):0!==a[e]&&{1:1,2:1,3:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,13:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,29:1,30:1,31:1,32:1,33:1,34:1,36:1,37:1,38:1,39:1,40:1,41:1,44:1,45:1,47:1,48:1,49:1,50:1,51:1}[e]&&r.push(a[e]=new Promise(function(r,t){for(var n="mrstatic/css/"+({4:"Activity",5:"BargainMiddlePage",6:"Classify",7:"Country",8:"CourseList",9:"DrawDocument",10:"Examination",11:"Invite",12:"MyEdit",13:"Order",14:"Orderinfo",15:"PayOrder",16:"Preferential",17:"SearchResult",18:"ShareCourse",19:"ShopCart",20:"aist-share",21:"blessing-getPrize",22:"blessing-preheat",23:"blessing-rank",24:"coupons",25:"deposit-order",26:"deposit-pay-order",27:"detail",29:"myorders",30:"newyear-2019-landing",31:"newyear-yearIndex",32:"prize-winner-list",33:"purchased",34:"python-class",36:"search",37:"shareposter",38:"study",39:"system-notices",40:"togroup",41:"video"}[e]||e)+"."+{0:"31d6cfe0",1:"c420ace8",2:"bf839917",3:"b22f3911",4:"6260646a",5:"eb686c74",6:"fb4bedde",7:"2d34330b",8:"afc8902e",9:"aeb3f822",10:"7bb0622b",11:"6260646a",12:"31d6cfe0",13:"8c058a7a",14:"31d6cfe0",15:"7eb7d317",16:"12a8297c",17:"cdf852c1",18:"8046fb41",19:"92ab48a3",20:"40873df0",21:"5a935f68",22:"07827c59",23:"91e559d5",24:"466858c7",25:"5ea077aa",26:"09ce6fd5",27:"57479076",29:"179a42fc",30:"17f4732b",31:"747e9e80",32:"3eee90af",33:"bb758677",34:"49baf51f",36:"5716d9b3",37:"76774ba4",38:"bf6b9b43",39:"fd23e5fc",40:"f08bc5f3",41:"1c1131c9",43:"31d6cfe0",44:"a156a0a0",45:"bff100af",46:"31d6cfe0",47:"820320a6",48:"35e22f8c",49:"befec011",50:"b02d1de6",51:"1146f09d"}[e]+".chunk.css",c=f.p+n,o=document.getElementsByTagName("link"),i=0;i<o.length;i++){var d=(u=o[i]).getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(d===n||d===c))return r()}var s=document.getElementsByTagName("style");for(i=0;i<s.length;i++){var u;if((d=(u=s[i]).getAttribute("data-href"))===n||d===c)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||c,o=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");o.request=n,delete a[e],l.parentNode.removeChild(l),t(o)},l.href=c,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){a[e]=0}));var t=c[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(function(r,n){t=c[e]=[r,n]});r.push(t[2]=n);var o,i=document.createElement("script");i.charset="utf-8",i.timeout=120,f.nc&&i.setAttribute("nonce",f.nc),i.src=function(e){return f.p+"mrstatic/js/"+({4:"Activity",5:"BargainMiddlePage",6:"Classify",7:"Country",8:"CourseList",9:"DrawDocument",10:"Examination",11:"Invite",12:"MyEdit",13:"Order",14:"Orderinfo",15:"PayOrder",16:"Preferential",17:"SearchResult",18:"ShareCourse",19:"ShopCart",20:"aist-share",21:"blessing-getPrize",22:"blessing-preheat",23:"blessing-rank",24:"coupons",25:"deposit-order",26:"deposit-pay-order",27:"detail",29:"myorders",30:"newyear-2019-landing",31:"newyear-yearIndex",32:"prize-winner-list",33:"purchased",34:"python-class",36:"search",37:"shareposter",38:"study",39:"system-notices",40:"togroup",41:"video"}[e]||e)+"."+{0:"a1f55c4b",1:"5c68fcc9",2:"0fac390d",3:"b64cad72",4:"a1371f95",5:"10317b8f",6:"220ffc3f",7:"e734fea9",8:"41f8955c",9:"7fe205fc",10:"cbe58c71",11:"aa2ed8cf",12:"83cc02c9",13:"947ec0ec",14:"3e43068a",15:"a8ffa082",16:"a4609efc",17:"59f563fd",18:"ee4ad052",19:"91e77bdc",20:"8cedd3e9",21:"63eb92b8",22:"6189dd97",23:"fa7bfe60",24:"0ea6a92f",25:"75b0b99b",26:"3dd6feb4",27:"cef2f183",29:"04486386",30:"268cd39d",31:"1ea3b486",32:"485c99ce",33:"bc9fe8f0",34:"286eff61",36:"d4fcc9d9",37:"721d3316",38:"993f16bd",39:"60a559ae",40:"4781b58a",41:"fcd95c48",43:"f063ef63",44:"77346626",45:"83264ccd",46:"e2b5c822",47:"39c28519",48:"eb589f62",49:"e76712e7",50:"cf6263c6",51:"92ccce8c"}[e]+".chunk.js"}(e),o=function(r){i.onerror=i.onload=null,clearTimeout(d);var t=c[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src,o=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");o.type=n,o.request=a,t[1](o)}c[e]=void 0}};var d=setTimeout(function(){o({type:"timeout",target:i})},12e4);i.onerror=i.onload=o,document.head.appendChild(i)}return Promise.all(r)},f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/",f.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],d=i.push.bind(i);i.push=r,i=i.slice();for(var s=0;s<i.length;s++)r(i[s]);var u=d;t()}([]);
//# sourceMappingURL=runtime~main.a12e5bc9.js.map
\ No newline at end of file
!function(e){function r(r){for(var a,n,f=r[0],i=r[1],s=r[2],d=0,l=[];d<f.length;d++)n=f[d],o[n]&&l.push(o[n][0]),o[n]=0;for(a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a]);for(u&&u(r);l.length;)l.shift()();return c.push.apply(c,s||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],a=!0,n=1;n<t.length;n++){var i=t[n];0!==o[i]&&(a=!1)}a&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var a={},n={35:0},o={35:0},c=[];function f(r){if(a[r])return a[r].exports;var t=a[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,f),t.l=!0,t.exports}f.e=function(e){var r=[];n[e]?r.push(n[e]):0!==n[e]&&{1:1,2:1,3:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,13:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,29:1,30:1,31:1,32:1,33:1,34:1,36:1,37:1,38:1,39:1,40:1,41:1,44:1,45:1,47:1,48:1,49:1,50:1,51:1}[e]&&r.push(n[e]=new Promise(function(r,t){for(var a="mrstatic/css/"+({4:"Activity",5:"BargainMiddlePage",6:"Classify",7:"Country",8:"CourseList",9:"DrawDocument",10:"Examination",11:"Invite",12:"MyEdit",13:"Order",14:"Orderinfo",15:"PayOrder",16:"Preferential",17:"SearchResult",18:"ShareCourse",19:"ShopCart",20:"aist-share",21:"blessing-getPrize",22:"blessing-preheat",23:"blessing-rank",24:"coupons",25:"deposit-order",26:"deposit-pay-order",27:"detail",29:"myorders",30:"newyear-2019-landing",31:"newyear-yearIndex",32:"prize-winner-list",33:"purchased",34:"python-class",36:"search",37:"shareposter",38:"study",39:"system-notices",40:"togroup",41:"video"}[e]||e)+"."+{0:"31d6cfe0",1:"c420ace8",2:"bf839917",3:"b22f3911",4:"6260646a",5:"eb686c74",6:"fb4bedde",7:"2d34330b",8:"afc8902e",9:"aeb3f822",10:"7bb0622b",11:"6260646a",12:"31d6cfe0",13:"8c058a7a",14:"31d6cfe0",15:"7eb7d317",16:"12a8297c",17:"cdf852c1",18:"8046fb41",19:"92ab48a3",20:"40873df0",21:"5a935f68",22:"07827c59",23:"91e559d5",24:"466858c7",25:"5ea077aa",26:"09ce6fd5",27:"57479076",29:"179a42fc",30:"6ea5fa63",31:"2c89a30a",32:"3eee90af",33:"bb758677",34:"49baf51f",36:"5716d9b3",37:"76774ba4",38:"bf6b9b43",39:"fd23e5fc",40:"f08bc5f3",41:"1c1131c9",43:"31d6cfe0",44:"a156a0a0",45:"bff100af",46:"31d6cfe0",47:"820320a6",48:"35e22f8c",49:"befec011",50:"b02d1de6",51:"3e6c1334"}[e]+".chunk.css",o=f.p+a,c=document.getElementsByTagName("link"),i=0;i<c.length;i++){var s=(u=c[i]).getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(s===a||s===o))return r()}var d=document.getElementsByTagName("style");for(i=0;i<d.length;i++){var u;if((s=(u=d[i]).getAttribute("data-href"))===a||s===o)return r()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=r,l.onerror=function(r){var a=r&&r.target&&r.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");c.request=a,delete n[e],l.parentNode.removeChild(l),t(c)},l.href=o,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){n[e]=0}));var t=o[e];if(0!==t)if(t)r.push(t[2]);else{var a=new Promise(function(r,a){t=o[e]=[r,a]});r.push(t[2]=a);var c,i=document.createElement("script");i.charset="utf-8",i.timeout=120,f.nc&&i.setAttribute("nonce",f.nc),i.src=function(e){return f.p+"mrstatic/js/"+({4:"Activity",5:"BargainMiddlePage",6:"Classify",7:"Country",8:"CourseList",9:"DrawDocument",10:"Examination",11:"Invite",12:"MyEdit",13:"Order",14:"Orderinfo",15:"PayOrder",16:"Preferential",17:"SearchResult",18:"ShareCourse",19:"ShopCart",20:"aist-share",21:"blessing-getPrize",22:"blessing-preheat",23:"blessing-rank",24:"coupons",25:"deposit-order",26:"deposit-pay-order",27:"detail",29:"myorders",30:"newyear-2019-landing",31:"newyear-yearIndex",32:"prize-winner-list",33:"purchased",34:"python-class",36:"search",37:"shareposter",38:"study",39:"system-notices",40:"togroup",41:"video"}[e]||e)+"."+{0:"a1f55c4b",1:"e3e5ce88",2:"0fac390d",3:"b64cad72",4:"a1371f95",5:"10317b8f",6:"220ffc3f",7:"e734fea9",8:"41f8955c",9:"7fe205fc",10:"cbe58c71",11:"aa2ed8cf",12:"83cc02c9",13:"947ec0ec",14:"3e43068a",15:"a8ffa082",16:"a4609efc",17:"59f563fd",18:"ee4ad052",19:"91e77bdc",20:"8cedd3e9",21:"63eb92b8",22:"6189dd97",23:"fa7bfe60",24:"0ea6a92f",25:"75b0b99b",26:"fde342b8",27:"cef2f183",29:"04486386",30:"63910182",31:"cf69701a",32:"485c99ce",33:"bc9fe8f0",34:"286eff61",36:"9e769f2e",37:"721d3316",38:"5fa2fc55",39:"60a559ae",40:"4781b58a",41:"57331e8b",43:"f063ef63",44:"77346626",45:"83264ccd",46:"e2b5c822",47:"39c28519",48:"eb589f62",49:"e76712e7",50:"cf6263c6",51:"fb82c6ca"}[e]+".chunk.js"}(e),c=function(r){i.onerror=i.onload=null,clearTimeout(s);var t=o[e];if(0!==t){if(t){var a=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src,c=new Error("Loading chunk "+e+" failed.\n("+a+": "+n+")");c.type=a,c.request=n,t[1](c)}o[e]=void 0}};var s=setTimeout(function(){c({type:"timeout",target:i})},12e4);i.onerror=i.onload=c,document.head.appendChild(i)}return Promise.all(r)},f.m=e,f.c=a,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)f.d(t,a,function(r){return e[r]}.bind(null,a));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/",f.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],s=i.push.bind(i);i.push=r,i=i.slice();for(var d=0;d<i.length;d++)r(i[d]);var u=s;t()}([]);
//# sourceMappingURL=runtime~main.cc69ce4d.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.
......@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts(
"/precache-manifest.731286b89f3341429e322e379cab4d51.js"
"/precache-manifest.21e168a8995f532bb120f5eefc46fcd1.js"
);
workbox.clientsClaim();
......
......@@ -3,6 +3,7 @@ import Routes from './router'
import cookie from 'js-cookie'
import { connect } from "react-redux"
import { setCurrentUser, startFetchUser } from "@/store/userAction"
import {initialState} from "@/store/userReducer"
import { withRouter, Link } from 'react-router-dom'
import { compose } from 'redux'
import { getParam, http, browser } from "@/utils"
......@@ -153,13 +154,10 @@ class App extends Component {
getUser = () => {
//获取用户信息
this.props.startFetchUser()
http.get(`${API.home}/m/user_info`).then(res => {
this.props.setCurrentUser(this.transformUser(res))
})
//微信
let code = getParam('code')
let oid = getParam('oid')
if (code && !oid) {
//针对2019双旦活动特殊处理,活动结束后删掉
......@@ -168,7 +166,7 @@ class App extends Component {
return
}
http.get(`${API['home']}/m/wx_loginInfo/code/${code}?redirect=${encodeURIComponent(window.location.href)}`)
http.get(`${API["passport-api"]}/m/wx_loginInfo/code/${code}?redirect=${encodeURIComponent(window.location.href)}`)
.then(res => {
let data = res.data
if (data.errno == 200) {
......@@ -185,11 +183,17 @@ class App extends Component {
}
} else {
Toast.info(data.msg)
this.props.setCurrentUser(initialState)
}
})
} else {
http.get(`${API.home}/m/user_info`).then(res => {
this.props.setCurrentUser(this.transformUser(res))
})
}
}
componentDidUpdate() {
......
......@@ -9,6 +9,7 @@ import './landing.scss'
import { browser, getParam, http, wxShare, SendMessageToApp } from "@/utils"
import QRCode from "qrcode"
import YearCourse from '../preheat/YearCourse'
import { FadeLoader } from "react-spinners"
class Landing extends Component {
......@@ -32,7 +33,8 @@ class Landing extends Component {
activityEnd: false,
notices: [],
rule: '',
isCaptain: getParam('origin') == 1
isCaptain: getParam('origin') == 1,
isLoading: this.props.user.isFetching
}
componentDidMount() {
......@@ -41,7 +43,7 @@ class Landing extends Component {
document.title = '七月在线年终大回馈,幸运宝箱随你开,100%有奖!'
const landing = document.querySelector('#landing')
const boxContainer = document.querySelector('.box-container')
if(boxContainer.offsetHeight < window.innerHeight){
if (boxContainer.offsetHeight < window.innerHeight) {
landing.style.minHeight = `${window.innerHeight}px`
boxContainer.style.minHeight = `${window.innerHeight}px`
}
......@@ -52,6 +54,11 @@ class Landing extends Component {
if (prevProps.user.hasError !== this.props.user.hasError && !this.props.user.hasError) {
this.fetchPageData()
}
if(prevProps.user.isFetching !== this.props.user.isFetching && !this.props.user.isFetching){
this.setState({
isLoading: this.props.user.isFetching
})
}
}
createMeta = () => {
......@@ -78,6 +85,25 @@ class Landing extends Component {
this.shareTipPopup && this.shareTipPopup.remove()
}
createMeta = (title, dec, imgname) => {
let meta = document.createElement('meta')
meta.setAttribute('name', 'description')
meta.setAttribute('itemprop', 'description')
meta.setAttribute('content', dec)
let meta2 = document.createElement('meta')
meta2.setAttribute('itemprop', 'name')
meta2.setAttribute('content', title)
let meta3 = document.createElement('meta')
meta3.setAttribute('itemprop', 'image')
meta3.setAttribute('content', imgname)
let head = document.getElementsByTagName('head')[0]
head.appendChild(meta)
head.appendChild(meta2)
head.appendChild(meta3)
}
fetchPageData = ({origin = this.state.origin, treasure_code = this.state.treasure_code} = {}) => {
const {location} = this.props
......@@ -105,6 +131,8 @@ class Landing extends Component {
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
// history.replace(`${match.url}?treasure_code=${getParam('treasure_code')}&origin=2`)
} else {
this.createMeta(this.shareTitle, this.shareDesc, 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png')
}
let searchParams = new URLSearchParams(window.location.search)
......@@ -413,7 +441,6 @@ class Landing extends Component {
}
}
render() {
const {
teamData: {
......@@ -427,7 +454,8 @@ class Landing extends Component {
standby_plan
},
activityEnd,
isCaptain
isCaptain,
isLoading
} = this.state
/*
* status
......@@ -565,7 +593,8 @@ class Landing extends Component {
</>
}
{
!(standby_plan && browser.isWeixin) && status === 2 && !activityEnd && < button type='button' className={'invite-btn'} onClick={this.joinTeam}>
!(standby_plan && browser.isWeixin) && status === 2 && !activityEnd &&
< button type='button' className={'invite-btn'} onClick={this.joinTeam}>
同意加入队伍
</button>
}
......@@ -593,6 +622,14 @@ class Landing extends Component {
}}/>
</>
}
{
isLoading && <div className="loading" style={{width: window.innerWidth + 'px', height: window.innerHeight + 'px'}}>
<FadeLoader
color={'#fff'}
loading={isLoading}
/>
</div>
}
</div>
)
}
......
......@@ -233,6 +233,20 @@
.am-whitespace.am-whitespace-xl {
height: 35px;
}
.loading{
transform: scale(1);
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,.8);
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
}
}
.popup-container {
......
......@@ -51,6 +51,8 @@ class MyTreasure extends Component {
const {userInfo} = nextProp
if (!userInfo.uid) {
history.push('/passport')
}else {
this.fetchMyTreasure();
}
}
......
......@@ -605,27 +605,47 @@ class YearCourse extends Component {
removable,
sum,
} = this.state
const { stage } = this.props
const { stage,treasureStage } = this.props
return (
<div className={'year-index-course'}>
{/*浮框*/}
<div className='nav-right'>
<span onClick={this.toBoxList} className='nav-right__link'>
{
Number(treasureStage) === 1 &&
<div className='nav-right'>
<span onClick={this.toBoxList} className='nav-right__link'>
未开宝箱
{
removable > 0 &&
<i className="nav-right__number">{removable}</i>
}
</span>
<a onClick={() => this.toYearWish()} className='nav-right__link'>
心愿单
{
sum > 0 &&
<i className="nav-right__number">{sum}</i>
}
</a>
</div>
{
removable > 0 &&
<i className="nav-right__number">{removable}</i>
}
</span>
<a onClick={() => this.toYearWish()} className='nav-right__link'>
心愿单
{
sum > 0 &&
<i className="nav-right__number">{sum}</i>
}
</a>
</div>
}
{
Number(treasureStage) === 0 &&
<div className='nav-right-wish nav-right'>
<a onClick={() => this.toYearWish()} className='nav-right__link'>
心愿单
{
sum > 0 &&
<i className="nav-right__number">{sum}</i>
}
</a>
</div>
}
{/* 重磅好课 */}
<CommonContainer title='重磅好课' id='year-course'>
......@@ -673,57 +693,60 @@ class YearCourse extends Component {
</CommonContainer>
{/* 人气好课免费学 */}
<CommonContainer title='人气好课免费学' id='year-free'>
<a className='boss__add' href="/active/givecourse?activename=shuangdan">更有42本技术书籍免费送</a>
{
(freecourse.course && freecourse.course.length > 0) &&
<>
<div className='freecourse course-box'>
{
Number(stage) !== 3 &&
<CommonContainer title='人气好课免费学' id='year-free'>
<a className='boss__add' href="/active/givecourse?activename=shuangdan">更有42本技术书籍免费送</a>
{
(freecourse.course && freecourse.course.length > 0) &&
<>
<div className='freecourse course-box'>
{
freecourse.course.map(item => (
<CourseItem
image={item.image_name}
key={item.course_id}
id={item.course_id}
toCourse={this.toCourse}
>
<div className="coupon-course__footer">
{
item.is_buy == 1 &&
<a
onClick={() => this.toCourse(item.course_id)}
className="btn to-study"
>开始学习</a>
}
{
item.is_buy == 0 &&
<a
onClick={() => this.freeStudy()}
className="btn free-study"
>点击免费学</a>
}
<p className="free-course-num">
已送出<span>{item.act_num}</span>个课
</p>
</div>
</CourseItem>
))
}
</div>
{
freecourse.course.map(item => (
<CourseItem
image={item.image_name}
key={item.course_id}
id={item.course_id}
toCourse={this.toCourse}
>
<div className="coupon-course__footer">
{
item.is_buy == 1 &&
<a
onClick={() => this.toCourse(item.course_id)}
className="btn to-study"
>开始学习</a>
}
{
item.is_buy == 0 &&
<a
onClick={() => this.freeStudy()}
className="btn free-study"
>点击免费学</a>
}
<p className="free-course-num">
已送出<span>{item.act_num}</span>个课
</p>
</div>
</CourseItem>
))
(freecourse.courseList && freecourse.courseList.length > 4) &&
<button
className="more-button"
onClick={() => this.handleToMore('freecourse')}
>{freecourse.isMore ? '查看更多' : '收起'}</button>
}
</div>
{
(freecourse.courseList && freecourse.courseList.length > 4) &&
<button
className="more-button"
onClick={() => this.handleToMore('freecourse')}
>{freecourse.isMore ? '查看更多' : '收起'}</button>
}
</>
}
</CommonContainer>
</>
}
</CommonContainer>
}
{/* stage,活动阶段 0-不在活动时间 1-预热 2-正式 3-返场 */}
{
Number(stage) === 2 &&
Number(stage) !== 1 &&
<>
{/* 精品好课1分开抢 */}
<CommonContainer title='精品好课1分开抢' id='year-group'>
......@@ -998,7 +1021,7 @@ class YearCourse extends Component {
</>
}
{
Number(stage) !== 2 &&
Number(stage) === 1 &&
<>
{/* 精品好课1分开抢 */}
<CommonContainer title='精品好课1分开抢' id='year-group'>
......
......@@ -296,7 +296,7 @@
.groupcourse[data-stage="2"] .course-container {
height: 215px;
}
.progree-and-sale {
display: flex;
......@@ -416,5 +416,8 @@
line-height: 14px;
}
}
.nav-right-wish {
}
}
\ No newline at end of file
......@@ -144,8 +144,8 @@ export default class index extends Component {
render() {
const {
banner,
activity_stage,
banner,
activity_stage,
treasure_stage,
} = this.state
return (
......@@ -154,7 +154,7 @@ export default class index extends Component {
<div id="banner" className="banner-treasure__header"
style={{backgroundImage: `url(${banner})`}}></div>
<div className="banner-treasure__nav">
<TreasureNav id="banner" treasure_stage={treasure_stage}/>
<TreasureNav id="banner" treasure_stage={treasure_stage} activeStage={activity_stage}/>
</div>
<div className="banner-treasure__decorate"></div>
</div>
......@@ -163,12 +163,12 @@ export default class index extends Component {
{/* 组队开宝箱 */}
{
treasure_stage === 1 &&
treasure_stage === 1 &&
<TreasureBox isAppUpdate={this.state.isAppUpdate} getRemovable={this.getRemovable}/>
}
{/* 课程 */}
<YearCourse stage={activity_stage} isAppUpdate={this.state.isAppUpdate} />
<YearCourse stage={activity_stage} treasureStage={treasure_stage} isAppUpdate={this.state.isAppUpdate} />
{/*好友加入队伍提醒;获得宝箱提醒;开售提醒弹窗,需要自取,注意修改文案*/}
{
......@@ -201,6 +201,9 @@ export default class index extends Component {
</div>
</CommonPopup>
}
<div className={'btm-rule'}>* 本活动解释权归北京七月在线科技有限公司所有 *</div>
</div>
)
}
......
......@@ -59,6 +59,12 @@
}
}
.btm-rule {
color: #fff;
font-size: 12px;
width: 100%;
text-align: center;
}
}
.year-index + .year19-index {
......
......@@ -48,21 +48,22 @@ class TreasureNav extends Component {
}
componentWillReceiveProps(nextProps) {
this.initNav(nextProps.treasure_stage);
this.initNav(nextProps.treasure_stage,nextProps.activeStage);
}
initNav = (treasure_stage) => {
initNav = (treasure_stage,activeStage) => {
let {navs} = this.state;
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
let data = this.state.navs
if(treasure_stage === 0) {
this.setState({
formatNavs: navs.filter(item => item.id !== 'year-treasure')
});
}else {
this.setState({
formatNavs: navs
})
data = navs.filter(item => item.id !== 'year-treasure')
}
if(activeStage === 3) {
data = data.filter(item => item.id !== 'year-free')
}
this.setState({
formatNavs: data
})
}
calcNavActive = () => {
......
......@@ -115,6 +115,7 @@ class TeamInfo extends Component {
if (code === 200) {
const { treasure_code } = data;
if (!getParam('version')) {
// this.props.history.push('/activity/newyear-2019/landing?origin=1&treasure_code=' + treasure_code);
window.location.assign('https://h5.julyedu.com/activity/newyear-2019/landing?origin=1&treasure_code=' + treasure_code);
} else {
window.location.assign('https://h5.julyedu.com/activity/newyear-2019/landing?origin=1&treasure_code=' + treasure_code + '&version='+ getParam('version'));
......
......@@ -149,25 +149,25 @@ class YarnWish extends Component {
list.length > 0
? <>
{
activityStage === 2 &&
activityStage !== 1 &&
<>
<CommonContainer>
<div className='groupcourse course-box'>
{
list.map(item => (
<CourseItem
image={item.image_name}
key={item.course_id}
<CourseItem
image={item.image_name}
key={item.course_id}
id={item.course_id}
time={item.type === 2 || item.type === 7? item.end_time : ''}
toCourse={this.toCourse}
>
{/*
{/*
* 拼团,正常:未开团1 已开2;一分:未开团5 已开7
* type 1 立即参团 2 已参团 3 我要砍价 4 已参加砍价 可以继续砍价 5 马上抢 6 开始学习 7 已参加一分钱拼团 8 砍价待支付
*/}
<div className="coupon-course__footer">
{
......@@ -306,7 +306,7 @@ class YarnWish extends Component {
}
{
item.type === 6 &&
<a
<a
onClick={() => this.toCourse(item.course_id)}
className="btn to-group"
data-status="study"
......@@ -322,15 +322,15 @@ class YarnWish extends Component {
</>
}
{
activityStage !== 2 &&
activityStage === 1 &&
<>
<CommonContainer>
<div className='groupcourse course-box'>
{
list.map(item => (
<CourseItem
image={item.image_name}
key={item.course_id}
<CourseItem
image={item.image_name}
key={item.course_id}
id={item.course_id}
toCourse={this.toCourse}
>
......@@ -343,7 +343,7 @@ class YarnWish extends Component {
item.is_buy == 1 &&
<>
<p className={'course-title text-overflow-1'}>{item.course_title}</p>
<a
<a
onClick={() => this.toCourse(item.course_id)}
className="btn to-study"
>开始学习</a>
......@@ -382,7 +382,7 @@ class YarnWish extends Component {
<span className="old-price">{item.type == 2 ? '' : '现价:'}<s>¥{item.price1}</s></span>
</div>
<div className="status">
<a
<a
onClick={() => this.toCourse(item.course_id)}
className="status-btn to-buy"
>直接购买</a>
......@@ -425,7 +425,7 @@ class YarnWish extends Component {
<div className="notData">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/icon-empty.png" alt=""/>
{
activityStage == 1
activityStage == 1
? <p>你的心愿单目前空空如也,<br/>快去挑选更多优惠课程吧~</p>
: <p>你的心愿单没有课程哦,<br/>感兴趣的课程可在双旦主会场直接购买!</p>
}
......
......@@ -3,7 +3,7 @@ import { merge } from 'lodash'
const notLoggedIn = 4030
const initialState = {
export const initialState = {
hasError: true,
code: notLoggedIn,
msg: '',
......@@ -30,4 +30,4 @@ export default function (state = initialState, action) {
default:
return state
}
}
\ 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