Commit 0f92790c by zhanghaozhe

Merge branch '00' of gitlab.julyedu.com:baiguangyao/mr-julyedu into 00

parents 84a48652 c768c3b5
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([[41],{1251:function(e,t,n){"use strict";n.r(t);var i=n(5),s=n(7),a=n(6),o=n(8),r=n(89),c=n(9),l=n(0),u=n.n(l),p=n(162),d=(n(258),n(1252),function(e){function t(){var e,n;Object(i.a)(this,t);for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return(n=Object(a.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(c)))).count=0,n.state={showNotices:!0},n.initializeSwiper=function(){var e=Object(r.a)(n);n.swiper=new p.a(".sys-bullet-screen-swiper-container",{allowTouchMove:!1,direction:"vertical",loop:!0,on:{init:function(){Array.from(this.slides).forEach(function(t){t.querySelector("span").addEventListener("transitionend",e.transitionEnd)})},slideChangeTransitionEnd:function(){e.slideHorizontal(this)},transitionEnd:function(){var e=this.slides[this.previousIndex].querySelector("span");e.style.transition="unset",e.style.transform="translate3d(0,0,0)"}}})},n.slideHorizontal=function(e){var t=e.slides[e.activeIndex],n=t.querySelector("span"),i=n.offsetWidth,s=t.clientWidth;i>s?(n.style.transition="transform ".concat(i/131.25,"s linear"),setTimeout(function(){n.style.transform="translate3d(".concat(-(i-s)-10,"px,0,0)")},1e3)):setTimeout(function(){e.slideNext()},3e3)},n.transitionEnd=function(){var e=n.props.bullets,t=3*(void 0===e?[]:e).length;++n.count===t?setTimeout(function(){n.sysNotice.style.height="0px"},2e3):setTimeout(function(){n.swiper&&n.swiper.slideNext()},1e3)},n.removeSystemNotices=function(e){e.persist(),e.target===n.sysNotice&&n.setState({showNotices:!1})},n}return Object(c.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.initializeSwiper()}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.destroy(!0,!0)}},{key:"render",value:function(){var e=this,t=this.props.bullets,n=void 0===t?["\u7b2c\u4e00\u6761\u6d88\u606f\uff0c\u7b2c\u4e00\u6761\u6d88\u606f\uff0c\u7b2c\u4e00\u6761\u6d88\u606f\uff0c\u7b2c\u4e00\u6761\u6d88\u606f\uff0c\u7b2c\u4e00\u6761\u6d88\u606f\uff0c\u7b2c\u4e00\u6761\u6d88\u606f\uff0c","\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c","\u7b2c\u4e09\u6761\u6d88\u606f\uff0c\u7b2c\u4e09\u6761\u6d88\u606f\uff0c\u7b2c\u4e09\u6761\u6d88\u606f\uff0c\u7b2c\u4e09\u6761\u6d88\u606f\uff0c\u7b2c\u4e09\u6761\u6d88\u606f\uff0c\u7b2c\u4e09\u6761\u6d88\u606f\uff0c"]:t;return this.state.showNotices&&u.a.createElement("div",{id:"system-bullet-screen",onTransitionEnd:this.removeSystemNotices,ref:function(t){return e.sysNotice=t}},u.a.createElement("img",{className:"avatar",src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-avatar.png",alt:""}),u.a.createElement("div",{className:"sys-bullet-screen-swiper-container"},u.a.createElement("ul",{className:"swiper-wrapper"},n&&n.length&&n.map(function(e,t){return u.a.createElement("li",{className:"swiper-slide",key:t},u.a.createElement("span",null,e))}))))}}]),t}(l.Component));t.default=d},1252:function(e,t,n){}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[41],{1251:function(e,t,n){"use strict";n.r(t);var i=n(5),s=n(7),a=n(6),o=n(8),r=n(89),c=n(9),l=n(0),u=n.n(l),p=n(162),d=(n(258),n(1252),function(e){function t(){var e,n;Object(i.a)(this,t);for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return(n=Object(a.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(c)))).count=0,n.state={showNotices:!0},n.initializeSwiper=function(){var e=Object(r.a)(n);n.swiper=new p.a(".sys-bullet-screen-swiper-container",{allowTouchMove:!1,direction:"vertical",loop:!0,on:{init:function(){Array.from(this.slides).forEach(function(t){t.querySelector("span").addEventListener("transitionend",e.transitionEnd)})},slideChangeTransitionEnd:function(){e.slideHorizontal(this)},transitionEnd:function(){var e=this.slides[this.previousIndex].querySelector("span");e.style.transition="unset",e.style.transform="translate3d(0,0,0)"}}})},n.slideHorizontal=function(e){var t=e.slides[e.activeIndex],n=t.querySelector("span"),i=n.offsetWidth,s=t.clientWidth;i>s?(n.style.transition="transform ".concat(i/131.25,"s linear"),setTimeout(function(){n.style.transform="translate3d(".concat(-(i-s)-10,"px,0,0)")},1e3)):setTimeout(function(){e.slideNext()},3e3)},n.transitionEnd=function(){var e=n.props.bullets,t=3*(void 0===e?[]:e).length;++n.count===t?setTimeout(function(){n.sysNotice.style.height="0px"},2e3):setTimeout(function(){n.swiper&&n.swiper.slideNext()},1e3)},n.removeSystemNotices=function(e){e.persist(),e.target===n.sysNotice&&n.setState({showNotices:!1})},n}return Object(c.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.initializeSwiper()}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.destroy()}},{key:"render",value:function(){var e=this,t=this.props.bullets,n=void 0===t?["\u7b2c\u4e00\u6761\u6d88\u606f\uff0c\u7b2c\u4e00\u6761\u6d88\u606f\uff0c\u7b2c\u4e00\u6761\u6d88\u606f\uff0c\u7b2c\u4e00\u6761\u6d88\u606f\uff0c\u7b2c\u4e00\u6761\u6d88\u606f\uff0c\u7b2c\u4e00\u6761\u6d88\u606f\uff0c","\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c\u7b2c\u4e8c\u6761\u6d88\u606f\uff0c","\u7b2c\u4e09\u6761\u6d88\u606f\uff0c\u7b2c\u4e09\u6761\u6d88\u606f\uff0c\u7b2c\u4e09\u6761\u6d88\u606f\uff0c\u7b2c\u4e09\u6761\u6d88\u606f\uff0c\u7b2c\u4e09\u6761\u6d88\u606f\uff0c\u7b2c\u4e09\u6761\u6d88\u606f\uff0c"]:t;return this.state.showNotices&&u.a.createElement("div",{id:"system-bullet-screen",onTransitionEnd:this.removeSystemNotices,ref:function(t){return e.sysNotice=t}},u.a.createElement("img",{className:"avatar",src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-avatar.png",alt:""}),u.a.createElement("div",{className:"sys-bullet-screen-swiper-container"},u.a.createElement("ul",{className:"swiper-wrapper"},n&&n.length&&n.map(function(e,t){return u.a.createElement("li",{className:"swiper-slide",key:t},u.a.createElement("span",null,e))}))))}}]),t}(l.Component));t.default=d},1252:function(e,t,n){}}]);
//# sourceMappingURL=system-notices.f14e0139.chunk.js.map //# sourceMappingURL=system-notices.e7cbffb7.chunk.js.map
\ No newline at end of file \ No newline at end of file
{"version":3,"sources":["components/activity/newyear-2019/common/system-bullet-screen/index.js"],"names":["SystemBulletScreen","count","state","showNotices","initializeSwiper","_this","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__","_this2","swiper","Swiper","allowTouchMove","direction","loop","on","init","Array","from","this","slides","forEach","item","querySelector","addEventListener","transitionEnd","slideChangeTransitionEnd","slideHorizontal","el","previousIndex","style","transition","transform","activeIndex","content","contentWidth","offsetWidth","wrapperWidth","clientWidth","concat","setTimeout","slideNext","_this2$props$bullets","props","bullets","len","length","sysNotice","height","removeSystemNotices","e","persist","target","setState","destroy","_this3","_this$props$bullets","react__WEBPACK_IMPORTED_MODULE_6___default","a","createElement","id","onTransitionEnd","ref","className","src","alt","map","index","key","Component"],"mappings":"2KAMMA,6NAGJC,MAAQ,IAGRC,MAAQ,CACNC,aAAa,KAYfC,iBAAmB,WACjB,IAAMC,EAAKC,OAAAC,EAAA,EAAAD,CAAAE,GACXA,EAAKC,OAAS,IAAIC,IAAO,sCAAuC,CAC9DC,gBAAgB,EAChBC,UAAW,WACXC,MAAM,EACNC,GAAI,CACFC,KADE,WAEAC,MAAMC,KAAKC,KAAKC,QAAQC,QAAQ,SAAAC,GAC9BA,EAAKC,cAAc,QAAQC,iBAAiB,gBAAiBlB,EAAMmB,kBAGvEC,yBANE,WAOApB,EAAMqB,gBAAgBR,OAExBM,cATE,WAUA,IAAMG,EAAKT,KAAKC,OAAOD,KAAKU,eAAeN,cAAc,QACzDK,EAAGE,MAAMC,WAAa,QACtBH,EAAGE,MAAME,UAAY,4BAM7BL,gBAAkB,SAACjB,GACjB,IAAIkB,EAAKlB,EAAOU,OAAOV,EAAOuB,aAC5BC,EAAUN,EAAGL,cAAc,QAC3BY,EAAeD,EAAQE,YACvBC,EAAeT,EAAGU,YAIhBH,EAAeE,GACjBH,EAAQJ,MAAMC,WAAd,aAAAQ,OAAwCJ,EAH/B,OAGT,YACAK,WAAW,WACTN,EAAQJ,MAAME,UAAd,eAAAO,SAA2CJ,EAAeE,GAAgB,GAA1E,YACC,MAEHG,WAAW,WACT9B,EAAO+B,aACN,QAIPhB,cAAgB,WAAM,IAAAiB,EAGhBjC,EAAKkC,MADPC,QAGIC,EAAuB,QALT,IAAAH,EAER,GAFQA,GAKAI,SAEdrC,EAAKP,QAAU2C,EACnBL,WAAW,WACT/B,EAAKsC,UAAUjB,MAAMkB,OAArB,OACC,KAEHR,WAAW,WACT/B,EAAKC,QAAUD,EAAKC,OAAO+B,aAC1B,QAIPQ,oBAAsB,SAAAC,GACpBA,EAAEC,UACCD,EAAEE,SAAW3C,EAAKsC,WACnBtC,EAAK4C,SAAS,CACZjD,aAAa,wFA1EjBe,KAAKd,kEAILc,KAAKT,QAAUS,KAAKT,OAAO4C,2CA2EpB,IAAAC,EAAApC,KAAAqC,EAOHrC,KAAKwB,MALPC,eAFK,IAAAY,EAEK,CACR,2NACA,2NACA,4NALGA,EAQP,OACErC,KAAKhB,MAAMC,aACXqD,EAAAC,EAAAC,cAAA,OAAKC,GAAG,uBAAuBC,gBAAiB1C,KAAK8B,oBAAqBa,IAAK,SAAAlC,GAAE,OAAI2B,EAAKR,UAAYnB,IACpG6B,EAAAC,EAAAC,cAAA,OAAKI,UAAU,SACVC,IAAI,8EAA8EC,IAAI,KAC3FR,EAAAC,EAAAC,cAAA,OAAKI,UAAU,sCACbN,EAAAC,EAAAC,cAAA,MAAII,UAAU,kBAEVnB,GAAWA,EAAQE,QAAUF,EAAQsB,IAAI,SAAC5C,EAAM6C,GAC9C,OACEV,EAAAC,EAAAC,cAAA,MAAII,UAAU,eAAeK,IAAKD,GAChCV,EAAAC,EAAAC,cAAA,YAAOrC,gBA7GM+C,cA0HlBpE","file":"mrstatic/js/system-notices.e7cbffb7.chunk.js","sourcesContent":["import React, { Component } from 'react'\nimport Swiper from 'swiper'\nimport 'swiper/dist/css/swiper.min.css'\nimport './system-bullet-screen.scss'\n\n\nclass SystemBulletScreen extends Component {\n\n swiper\n count = 0\n sysNotice\n\n state = {\n showNotices: true\n }\n\n componentDidMount() {\n this.initializeSwiper()\n }\n\n componentWillUnmount() {\n this.swiper && this.swiper.destroy()\n }\n\n\n initializeSwiper = () => {\n const _this = this\n this.swiper = new Swiper('.sys-bullet-screen-swiper-container', {\n allowTouchMove: false,\n direction: 'vertical',\n loop: true,\n on: {\n init() {\n Array.from(this.slides).forEach(item => {\n item.querySelector('span').addEventListener('transitionend', _this.transitionEnd)\n })\n },\n slideChangeTransitionEnd() {\n _this.slideHorizontal(this)\n },\n transitionEnd() {\n const el = this.slides[this.previousIndex].querySelector('span')\n el.style.transition = 'unset'\n el.style.transform = 'translate3d(0,0,0)'\n }\n }\n })\n }\n\n slideHorizontal = (swiper) => {\n let el = swiper.slides[swiper.activeIndex],\n content = el.querySelector('span'),\n contentWidth = content.offsetWidth,\n wrapperWidth = el.clientWidth\n\n const co = 131.25\n\n if (contentWidth > wrapperWidth) {\n content.style.transition = `transform ${contentWidth / co}s linear`\n setTimeout(() => {\n content.style.transform = `translate3d(${-(contentWidth - wrapperWidth) - 10}px,0,0)`\n }, 1000)\n } else {\n setTimeout(() => {\n swiper.slideNext()\n }, 3000)\n }\n }\n\n transitionEnd = () => {\n const {\n bullets = []\n } = this.props\n\n const len = bullets.length * 3\n\n if (++this.count === len) {\n setTimeout(() => {\n this.sysNotice.style.height = `0px`\n }, 2000)\n } else {\n setTimeout(() => {\n this.swiper && this.swiper.slideNext()\n }, 1000)\n }\n }\n\n removeSystemNotices = e => {\n e.persist()\n if(e.target === this.sysNotice){\n this.setState({\n showNotices: false\n })\n }\n }\n\n render() {\n const {\n bullets = [\n '第一条消息,第一条消息,第一条消息,第一条消息,第一条消息,第一条消息,',\n '第二条消息,第二条消息,第二条消息,第二条消息,第二条消息,第二条消息,',\n '第三条消息,第三条消息,第三条消息,第三条消息,第三条消息,第三条消息,',\n ]\n } = this.props\n return (\n this.state.showNotices &&\n <div id=\"system-bullet-screen\" onTransitionEnd={this.removeSystemNotices} ref={el => this.sysNotice = el}>\n <img className='avatar'\n src='https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-avatar.png' alt=\"\"/>\n <div className='sys-bullet-screen-swiper-container'>\n <ul className=\"swiper-wrapper\">\n {\n bullets && bullets.length && bullets.map((item, index) => {\n return (\n <li className=\"swiper-slide\" key={index}>\n <span>{item}</span>\n </li>\n )\n })\n }\n </ul>\n </div>\n </div>\n\n )\n }\n}\n\nexport default SystemBulletScreen\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/activity/newyear-2019/common/system-bullet-screen/index.js"],"names":["SystemBulletScreen","count","state","showNotices","initializeSwiper","_this","Object","_Users_fe_frontCode_mr_julyedu_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__","_this2","swiper","Swiper","allowTouchMove","direction","loop","on","init","Array","from","this","slides","forEach","item","querySelector","addEventListener","transitionEnd","slideChangeTransitionEnd","slideHorizontal","el","previousIndex","style","transition","transform","activeIndex","content","contentWidth","offsetWidth","wrapperWidth","clientWidth","concat","setTimeout","slideNext","_this2$props$bullets","props","bullets","len","length","sysNotice","height","removeSystemNotices","e","persist","target","setState","destroy","_this3","_this$props$bullets","react__WEBPACK_IMPORTED_MODULE_6___default","a","createElement","id","onTransitionEnd","ref","className","src","alt","map","index","key","Component"],"mappings":"2KAMMA,6NAGJC,MAAQ,IAGRC,MAAQ,CACNC,aAAa,KAYfC,iBAAmB,WACjB,IAAMC,EAAKC,OAAAC,EAAA,EAAAD,CAAAE,GACXA,EAAKC,OAAS,IAAIC,IAAO,sCAAuC,CAC9DC,gBAAgB,EAChBC,UAAW,WACXC,MAAM,EACNC,GAAI,CACFC,KADE,WAEAC,MAAMC,KAAKC,KAAKC,QAAQC,QAAQ,SAAAC,GAC9BA,EAAKC,cAAc,QAAQC,iBAAiB,gBAAiBlB,EAAMmB,kBAGvEC,yBANE,WAOApB,EAAMqB,gBAAgBR,OAExBM,cATE,WAUA,IAAMG,EAAKT,KAAKC,OAAOD,KAAKU,eAAeN,cAAc,QACzDK,EAAGE,MAAMC,WAAa,QACtBH,EAAGE,MAAME,UAAY,4BAM7BL,gBAAkB,SAACjB,GACjB,IAAIkB,EAAKlB,EAAOU,OAAOV,EAAOuB,aAC5BC,EAAUN,EAAGL,cAAc,QAC3BY,EAAeD,EAAQE,YACvBC,EAAeT,EAAGU,YAIhBH,EAAeE,GACjBH,EAAQJ,MAAMC,WAAd,aAAAQ,OAAwCJ,EAH/B,OAGT,YACAK,WAAW,WACTN,EAAQJ,MAAME,UAAd,eAAAO,SAA2CJ,EAAeE,GAAgB,GAA1E,YACC,MAEHG,WAAW,WACT9B,EAAO+B,aACN,QAIPhB,cAAgB,WAAM,IAAAiB,EAGhBjC,EAAKkC,MADPC,QAGIC,EAAuB,QALT,IAAAH,EAER,GAFQA,GAKAI,SAEdrC,EAAKP,QAAU2C,EACnBL,WAAW,WACT/B,EAAKsC,UAAUjB,MAAMkB,OAArB,OACC,KAEHR,WAAW,WACT/B,EAAKC,QAAUD,EAAKC,OAAO+B,aAC1B,QAIPQ,oBAAsB,SAAAC,GACpBA,EAAEC,UACCD,EAAEE,SAAW3C,EAAKsC,WACnBtC,EAAK4C,SAAS,CACZjD,aAAa,wFA1EjBe,KAAKd,kEAILc,KAAKT,QAAUS,KAAKT,OAAO4C,SAAQ,GAAM,oCA2ElC,IAAAC,EAAApC,KAAAqC,EAOHrC,KAAKwB,MALPC,eAFK,IAAAY,EAEK,CACR,2NACA,2NACA,4NALGA,EAQP,OACErC,KAAKhB,MAAMC,aACXqD,EAAAC,EAAAC,cAAA,OAAKC,GAAG,uBAAuBC,gBAAiB1C,KAAK8B,oBAAqBa,IAAK,SAAAlC,GAAE,OAAI2B,EAAKR,UAAYnB,IACpG6B,EAAAC,EAAAC,cAAA,OAAKI,UAAU,SACVC,IAAI,8EAA8EC,IAAI,KAC3FR,EAAAC,EAAAC,cAAA,OAAKI,UAAU,sCACbN,EAAAC,EAAAC,cAAA,MAAII,UAAU,kBAEVnB,GAAWA,EAAQE,QAAUF,EAAQsB,IAAI,SAAC5C,EAAM6C,GAC9C,OACEV,EAAAC,EAAAC,cAAA,MAAII,UAAU,eAAeK,IAAKD,GAChCV,EAAAC,EAAAC,cAAA,YAAOrC,gBA7GM+C,cA0HlBpE","file":"mrstatic/js/system-notices.f14e0139.chunk.js","sourcesContent":["import React, { Component } from 'react'\nimport Swiper from 'swiper'\nimport 'swiper/dist/css/swiper.min.css'\nimport './system-bullet-screen.scss'\n\n\nclass SystemBulletScreen extends Component {\n\n swiper\n count = 0\n sysNotice\n\n state = {\n showNotices: true\n }\n\n componentDidMount() {\n this.initializeSwiper()\n }\n\n componentWillUnmount() {\n this.swiper && this.swiper.destroy(true, true)\n }\n\n\n initializeSwiper = () => {\n const _this = this\n this.swiper = new Swiper('.sys-bullet-screen-swiper-container', {\n allowTouchMove: false,\n direction: 'vertical',\n loop: true,\n on: {\n init() {\n Array.from(this.slides).forEach(item => {\n item.querySelector('span').addEventListener('transitionend', _this.transitionEnd)\n })\n },\n slideChangeTransitionEnd() {\n _this.slideHorizontal(this)\n },\n transitionEnd() {\n const el = this.slides[this.previousIndex].querySelector('span')\n el.style.transition = 'unset'\n el.style.transform = 'translate3d(0,0,0)'\n }\n }\n })\n }\n\n slideHorizontal = (swiper) => {\n let el = swiper.slides[swiper.activeIndex],\n content = el.querySelector('span'),\n contentWidth = content.offsetWidth,\n wrapperWidth = el.clientWidth\n\n const co = 131.25\n\n if (contentWidth > wrapperWidth) {\n content.style.transition = `transform ${contentWidth / co}s linear`\n setTimeout(() => {\n content.style.transform = `translate3d(${-(contentWidth - wrapperWidth) - 10}px,0,0)`\n }, 1000)\n } else {\n setTimeout(() => {\n swiper.slideNext()\n }, 3000)\n }\n }\n\n transitionEnd = () => {\n const {\n bullets = []\n } = this.props\n\n const len = bullets.length * 3\n\n if (++this.count === len) {\n setTimeout(() => {\n this.sysNotice.style.height = `0px`\n }, 2000)\n } else {\n setTimeout(() => {\n this.swiper && this.swiper.slideNext()\n }, 1000)\n }\n }\n\n removeSystemNotices = e => {\n e.persist()\n if(e.target === this.sysNotice){\n this.setState({\n showNotices: false\n })\n }\n }\n\n render() {\n const {\n bullets = [\n '第一条消息,第一条消息,第一条消息,第一条消息,第一条消息,第一条消息,',\n '第二条消息,第二条消息,第二条消息,第二条消息,第二条消息,第二条消息,',\n '第三条消息,第三条消息,第三条消息,第三条消息,第三条消息,第三条消息,',\n ]\n } = this.props\n return (\n this.state.showNotices &&\n <div id=\"system-bullet-screen\" onTransitionEnd={this.removeSystemNotices} ref={el => this.sysNotice = el}>\n <img className='avatar'\n src='https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-avatar.png' alt=\"\"/>\n <div className='sys-bullet-screen-swiper-container'>\n <ul className=\"swiper-wrapper\">\n {\n bullets && bullets.length && bullets.map((item, index) => {\n return (\n <li className=\"swiper-slide\" key={index}>\n <span>{item}</span>\n </li>\n )\n })\n }\n </ul>\n </div>\n </div>\n\n )\n }\n}\n\nexport default SystemBulletScreen\n"],"sourceRoot":""}
\ No newline at end of file
...@@ -86,7 +86,8 @@ export default (props) => { ...@@ -86,7 +86,8 @@ export default (props) => {
{/* 第三:奖品,任意线上课程兑换券 */} {/* 第三:奖品,任意线上课程兑换券 */}
{ {
(!bind_phone && !bind_address && prize_type === 5) && (!bind_phone && !bind_address && prize_type === 5) &&
<a className="team-result">文案待定</a> <a className="team-result">关注服务号“七月在线实验室” 回复“领课”
</a>
} }
</> </>
) )
......
...@@ -21,18 +21,20 @@ class TreasureRank extends Component { ...@@ -21,18 +21,20 @@ class TreasureRank extends Component {
http.get(`${API.home}/sys/treasure/ranking`).then(res => { http.get(`${API.home}/sys/treasure/ranking`).then(res => {
const { code, data } = res.data; const { code, data } = res.data;
if(code === 200) { if(code === 200) {
if(data.length > 5) { if(JSON.stringify(data) !== '{}') {
this.setState({ if(data.length > 5) {
rank: data.filter((item, index) => index < 5), this.setState({
rankList: data, rank: data.filter((item, index) => index < 5),
isMore: true, rankList: data,
}); isMore: true,
}else { });
this.setState({ }else if() {
rank: data, this.setState({
rankList: data, rank: data,
isMore: false, rankList: data,
}); isMore: false,
});
}
} }
} }
}); });
...@@ -56,52 +58,57 @@ class TreasureRank extends Component { ...@@ -56,52 +58,57 @@ class TreasureRank extends Component {
render() { render() {
const { rank, isMore } = this.state; const { rank, isMore } = this.state;
return ( return (
<div data-skip="rank"> <>
<div className="rank-title"> {
<i className="rank-title__decorate"></i> rank.length !== 0 &&
<h2 className="rank-title__txt">宝箱达人榜</h2> <div data-skip="rank">
<i className="rank-title__decorate"></i> <div className="rank-title">
</div> <i className="rank-title__decorate"></i>
<p className="rank-desc">宝箱数量前50名可额外获得一份奖品,数量相同的用时短者排名在前</p> <h2 className="rank-title__txt">宝箱达人榜</h2>
<dl className="rank-header"> <i className="rank-title__decorate"></i>
<dd className="rank-column">排名</dd> </div>
<dd className="rank-column">用户</dd> <p className="rank-desc">宝箱数量前50名可额外获得一份奖品,数量相同的用时短者排名在前</p>
<dd className="rank-column">宝箱数量</dd> <dl className="rank-header">
<dd className="rank-column">奖品</dd> <dd className="rank-column">排名</dd>
</dl> <dd className="rank-column">用户</dd>
<div className="rank-body"> <dd className="rank-column">宝箱数量</dd>
{ <dd className="rank-column">奖品</dd>
rank.map((item, index) => ( </dl>
<dl className="rank-item" key={index}> <div className="rank-body">
<dd className="rank-column"> {
{ rank.map((item, index) => (
index <= 2 <dl className="rank-item" key={index}>
? <span className="rank-column__number" data-num={index}></span> <dd className="rank-column">
: <span>{index+1}</span> {
} index <= 2
</dd> ? <span className="rank-column__number" data-num={index}></span>
<dd className="rank-column"> : <span>{index+1}</span>
<span className="rank-column__name">{item.user_name}</span> }
</dd> </dd>
<dd className="rank-column"> <dd className="rank-column">
<span>{item.num}</span> <span className="rank-column__name">{item.user_name}</span>
</dd> </dd>
<dd className="rank-column"> <dd className="rank-column">
{ <span>{item.num}</span>
item.url </dd>
? <a className="rank-column__txt" href={item.url}>{item.prize_name}</a> <dd className="rank-column">
: <span className="rank-column__txt">{item.prize_name}</span> {
} item.url
</dd> ? <a className="rank-column__txt" href={item.url}>{item.prize_name}</a>
</dl> : <span className="rank-column__txt">{item.prize_name}</span>
)) }
} </dd>
<div className="rank-more" onClick={this.switchMoreRank}> </dl>
<span className="rank-more__txt">{isMore? '展开' : '收起'}</span> ))
<i className="rank-more__icon" data-more={isMore}></i> }
<div className="rank-more" onClick={this.switchMoreRank}>
<span className="rank-more__txt">{isMore? '展开' : '收起'}</span>
<i className="rank-more__icon" data-more={isMore}></i>
</div>
</div>
</div> </div>
</div> }
</div> </>
) )
} }
} }
......
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