build/static/js/6.0f55b345.chunk.js

1 line
35 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(this.webpackJsonp=this.webpackJsonp||[]).push([[6],{"5A3O":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=h(o("W9HT")),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();t.TPMIndexHOC=function(e,t){return function(o){function h(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,e));return t.keyupListener=function(e){"Escape"===e.key&&t.setState({globalLoading:!1})},t.gettablogourlnull=function(){t.setState({mygetHelmetapi:void 0}),document.title="Forge";var e=document.createElement("link"),o=document.getElementById("dynamic-favicon");e.id="dynamic-favicon",e.rel="shortcut icon",e.href="/react/build/./favicon.ico",o&&document.head.removeChild(o),document.head.appendChild(e)},t.gettablogourldata=function(e){document.title=e.data.setting.name;var t=document.createElement("link"),o=document.getElementById("dynamic-favicon");t.id="dynamic-favicon",t.rel="shortcut icon",t.href="/"+e.data.setting.tab_logo_url,o&&document.head.removeChild(o),document.head.appendChild(t)},t.getAppdata=function(){try{var e=JSON.parse(localStorage.getItem("chromesetting")),o=JSON.parse(localStorage.getItem("chromesettingresponse"));t.setState({mygetHelmetapi:e}),e.tab_logo_url?t.gettablogourldata(o):t.gettablogourlnull()}catch(e){console.log("hoc获取游览器配置失败 重新请求开始读取配置"),t.getAppdatausr()}},t.getAppdatausr=function(){u.default.get("/setting.json").then((function(e){if(e)if(e.data){t.setState({mygetHelmetapi:e.data.setting}),localStorage.setItem("chromesetting",JSON.stringify(e.data.setting)),localStorage.setItem("chromesettingresponse",JSON.stringify(e));try{e.data.setting.tab_logo_url?t.gettablogourldata(e):t.gettablogourlnull()}catch(e){t.gettablogourlnull()}}else t.gettablogourlnull();else t.gettablogourlnull()})).catch((function(e){t.gettablogourlnull()}))},t.fetchUsers=function(){u.default.get("/users/get_user_info.json").then((function(e){e&&e.data&&(t.initCommonState(e.data),t.setState({tpmLoading:!1}))})).catch((function(e){console.log(e)}))},t.foo=function(e){var t,o={},n=/[\?\&](\w+)(=?)(\w*)/g;do{if(t=n.exec(e)){var a=t[1],i=t[3];t[2]||(i=void 0),o[a]=i}}while(t);return o},t.hideLoginDialog=function(){t.setState({isRender:!1,isloginCancel:void 0})},t.showLoginDialog=function(){t.setState({isRender:!0,isloginCancel:"iscancel"})},t.checkIfLogin=function(){return t.state.current_user&&""!=t.state.current_user.login},t.hideAccountProfile=function(){t.setState({AccountProfiletype:!1})},t.showProfileCompleteDialog=function(){t.dialogObj={},t.setState({AccountProfiletype:!0})},t.showhideAccountPhoneemailDialog=function(){t.dialogObj={},t.setState({AccountPhoneemailtype:!0})},t.hideAccountPhoneemailtype=function(){t.setState({AccountPhoneemailtype:!1})},t.checkIfProfileCompleted=function(){return t.state.current_user&&t.state.current_user.profile_completed},t.showaccountprofileDialog=function(){t.dialogObj={content:"您需要去完成您的个人资料,才能使用此功能",okText:"立即完成",okHref:"/account/profile"},t.setState({AccountProfiletype:!0})},t.showProfessionalCertificationDialog=function(){t.dialogObj={content:"您需要去完成您的职业认证,才能使用此功能",okText:"立即完成",okHref:"/account/certification"},t.setState({AccountProfiletype:!0})},t.checkIfProfessionalCertification=function(){return t.state.current_user&&t.state.current_user.professional_certification},t.ShowOnlinePdf=function(e){return(0,u.default)({method:"get",url:e,responseType:"arraybuffer"}).then((function(e){var o=[];o.push(e.data),t.url=window.URL.createObjectURL(new Blob(o,{type:"application/pdf"})),window.open(t.url)}))},t.DownloadFileA=function(e,t){var o=document.createElement("a");document.body.appendChild(o),o.href=t,o.download=e;var n=document.createEvent("MouseEvents");n.initEvent("click",!1,!1),o.dispatchEvent(n),document.body.removeChild(o)},t.DownloadOpenPdf=function(e,t){!0===e?window.open(t):window.location.href=t},t.slowDownload=function(e,o){t._gLoadingTip=o||"正在生成文件,请稍后...",t.setState({globalLoading:!0});var n=e;(0,c.downloadFile)({url:n,successCallback:function(e){t.setState({globalLoading:!1}),console.log("successCallback")},failCallback:function(e,o){t.setState({globalLoading:!1}),console.log("failCallback")}})},t.yslslowCheckresults=function(e){t._gLoadingTip=e||"成绩计算中,请稍候...",t.setState({globalLoading:!0})},t.yslslowCheckresultsNo=function(){t.setState({globalLoading:!1})},t.showGlobalLoading=function(e){t._gLoadingTip=e||"加载中,请稍后...",t.setState({globalLoading:!0})},t.hideGlobalLoading=function(){t.setState({globalLoading:!1})},t.MdifHasAnchorJustScorll=function(){var e=decodeURI(t.props.location.hash).replace("#","");if(e){var o=document.getElementsByName(e);o&&o.length>0&&o[o.length-1].scrollIntoView()}},t.scrollToAnchor=function(e){if(e){var t=document.getElementById(e);t&&t.scrollIntoView()}},window.$("#root").css("position","relative"),t.state={tpmLoading:!0,resLoading:!0,Headertop:void 0,Footerdown:void 0,isRender:!1,AccountProfiletype:!1,AccountPhoneemailtype:!1,globalLoading:!1,dataquerys:{},isloginCancel:void 0,mygetHelmetapi:null},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(h,o),i(h,[{key:"initCommonState",value:function(e){var t=Object.assign({},a({},e),{image_url:""+e.image_url});this.setState({user:t,current_user:t})}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keyup",this.keyupListener)}},{key:"componentWillMount",value:function(){this.fetchUsers()}},{key:"componentDidMount",value:function(){window.addEventListener("keyup",this.keyupListener),"/"===this.props.match.path||("/403"===this.props.match.path?document.title="你没有权限访问":"/nopage"===this.props.match.path?document.title="没有找到该页面":"/shixuns"===this.props.match.path?document.title="实训项目":"/paths"===this.props.match.path?document.title="实践课程":"/classrooms"===this.props.match.path&&(document.title="教学课堂")),this.getAppdata()}},{key:"render",value:function(){var o=this,i=this.state,c=i.Footerdown,u=i.isRender,h=i.AccountProfiletype,m=i.AccountPhoneemailtype,g=i.current_user,y={showLoginDialog:this.showLoginDialog,checkIfLogin:this.checkIfLogin,showProfileCompleteDialog:this.showProfileCompleteDialog,showhideAccountPhoneemailDialog:this.showhideAccountPhoneemailDialog,checkIfProfileCompleted:this.checkIfProfileCompleted,showaccountprofileDialog:this.showaccountprofileDialog,checkIfProfessionalCertification:this.checkIfProfessionalCertification,showProfessionalCertificationDialog:this.showProfessionalCertificationDialog,ShowOnlinePdf:function(e){return o.ShowOnlinePdf(e)},DownloadFileA:function(e,t){return o.DownloadFileA(e,t)},DownloadOpenPdf:function(e,t){return o.DownloadOpenPdf(e,t)},slowDownload:this.slowDownload,showGlobalLoading:this.showGlobalLoading,hideGlobalLoading:this.hideGlobalLoading,yslslowCheckresults:this.yslslowCheckresults,yslslowCheckresultsNo:this.yslslowCheckresultsNo,MdifHasAnchorJustScorll:this.MdifHasAnchorJustScorll,scrollToAnchor:this.scrollToAnchor};return r.default.createElement("div",{className:"indexHOC"},!0===u?r.default.createElement(d.default,a({Modifyloginvalue:function(){return o.hideLoginDialog()}},this.props,this.state)):"",!0===h?r.default.createElement(f.default,a({hideAccountProfile:function(){return o.hideAccountProfile()}},this.props,this.state,this.dialogObj)):"",!0===m?r.default.createElement(p.default,a({hideAccountProfile:function(){return o.hideAccountPhoneemailtype()}},this.props,this.state,this.dialogObj)):"",r.default.createElement(l.default,a({},this.state,this.props)),r.default.createElement(n.default,{spinning:this.state.globalLoading,delay:0,className:"globalSpin",size:"large",tip:this._gLoadingTip||"加载中..."},r.default.createElement("div",{className:"newContainer newContainers"},g&&r.default.createElement(e,a({initCommonState:function(e){return o.initCommonState(e)}},this.props,this.state,y)))),t&&t.noFooter?"":r.default.createElement(s.default,a({},this.state,this.props,{Footerdown:c})))}}]),h}(r.default.Component)},o("04bd");var r=h(o("q1tI")),l=h(o("RwS+")),s=h(o("mf6Z")),c=o("sYIF"),u=h(o("vDqi"));o("7aN/");var d=h(o("CWZq")),f=h(o("GNFk")),p=h(o("Aj5U"));function h(e){return e&&e.__esModule?e:{default:e}}},"6Rz1":function(e,t,o){},"7aN/":function(e,t,o){},Aj5U:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(o("kLXV")),a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();o("k3Gp");var i=o("q1tI"),r=s(i),l=(o("sYIF"),s(o("vDqi")));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.gotoback=function(){null!=o.props.AccountPhoneemailtype?(o.setState({AccountPhoneemailtype:!1}),o.props.hideAccountProfile()):(window.location.href="/",o.setState({AccountPhoneemailtype:!1}))},o.state={AccountPhoneemailtype:!1},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this;null!=this.props.AccountPhoneemailtype&&this.setState({AccountPhoneemailtype:this.props.AccountPhoneemailtype}),l.default.interceptors.response.use((function(t){return null!=t&&t&&402===t.data.status&&e.setState({AccountPhoneemailtype:!0}),t}),(function(e){}))}},{key:"render",value:function(){var e=this,t=this.props;t.content,t.okText,t.okHref;return r.default.createElement(n.default,{keyboard:!1,title:"提示",visible:this.state.AccountPhoneemailtype,closable:!1,footer:null,destroyOnClose:!0,centered:!0,width:"530px"},r.default.createElement("div",{className:"task-popup-content"},r.default.createElement("p",{className:"task-popup-text-center font-16"}," 您需要完成手机号码或者邮箱的绑定,才能使用此功能"),r.default.createElement("div",{className:"clearfix mt30 edu-txt-center"},r.default.createElement("a",{className:"task-btn mr30",onClick:function(){return e.gotoback()}},"稍后绑定"),r.default.createElement("a",{className:"task-btn task-btn-orange",href:"/account/secure"}," ","立即绑定"))))}}]),t}(i.Component);t.default=c},B6BU:function(e,t,o){},CjtM:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(o("kLXV")),a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();o("k3Gp");var i=o("q1tI"),r=s(i),l=o("sYIF");function s(e){return e&&e.__esModule?e:{default:e}}o("B6BU"),o("TnMl");var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.modalCancel=function(){try{o.props.setgoshowqqgtounp(!1)}catch(e){}},o.setDownload=function(){try{o.props.setgoshowqqgtounp(!1)}catch(e){}},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"render",value:function(){var e=this;return r.default.createElement(n.default,{keyboard:!1,closable:!1,footer:null,destroyOnClose:!0,title:"提示",centered:!0,visible:void 0!==this.props.goshowqqgtounp&&this.props.goshowqqgtounp,width:"530px"},r.default.createElement("div",{className:"educouddiv intermediatecenter verticallayout"},r.default.createElement("div",{className:"tabeltext-alignleft mt10"},r.default.createElement("p",null,"您可以在QQ服务群向管理员申请获得继续操作的权限")),r.default.createElement("img",{width:"200px",className:"mt10",src:(0,l.getImageUrl)("images/educoder/qqqun20191230.png")}),r.default.createElement("div",{className:"tabeltext-alignleft mt10"},r.default.createElement("p",null,"群号612934990")),r.default.createElement("div",{className:"clearfix mt30 edu-txt-center"},r.default.createElement("a",{className:"task-btn mr30",onClick:function(){return e.modalCancel()}},"取消"),r.default.createElement("a",{className:"task-btn task-btn-orange",target:"_blank",href:"//shang.qq.com/wpa/qunwpa?idkey=2f2043d88c1bd61d182b98bf1e061c6185e23055bec832c07d8148fe11c5a6cd"},"立即联系"))))}}]),t}(i.Component);t.default=c},GNFk:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(o("kLXV")),a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();o("k3Gp");var i=o("q1tI"),r=s(i),l=(o("sYIF"),s(o("vDqi")));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.gotoback=function(e){!0===e?window.location.href="/":null!=o.props.AccountProfiletype?(o.setState({AccountProfiletype:!1}),o.props.hideAccountProfile()):(window.location.href="/",o.setState({AccountProfiletype:!1}))},o.state={AccountProfiletype:!1},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this;null!=this.props.AccountProfiletype&&this.setState({AccountProfiletype:this.props.AccountProfiletype}),l.default.interceptors.response.use((function(t){return null!=t&&t&&402===t.data.status&&(document.title="提示",e.setState({AccountProfiletype:!0})),t}),(function(e){}))}},{key:"render",value:function(){var e=this,t=this.props,o=t.content,a=t.okText,i=t.okHref,l=t.cannelText,s=t.Accounturltype;return r.default.createElement(n.default,{keyboard:!1,title:"提示",visible:this.state.AccountProfiletype,closable:!1,footer:null,destroyOnClose:!0,centered:!0,width:"530px"},r.default.createElement("div",{className:"task-popup-content"},r.default.createElement("p",{className:"task-popup-text-center font-16"}," ",o||"您需要去完善您的个人资料,才能使用此功能"),r.default.createElement("div",{className:"clearfix mt30 edu-txt-center"},r.default.createElement("a",{className:"task-btn mr30",onClick:function(){return e.gotoback(s)}},l||"稍后完善"),r.default.createElement("a",{className:"task-btn task-btn-orange",href:i||"/account/profile/edit"}," ",a||"立即完善"))))}}]),t}(i.Component);t.default=c},"RwS+":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=v(o("2/Rp")),a=v(o("kLXV")),i=v(o("tsqr")),r=v(o("TeRw")),l=v(o("5rEg")),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();o("L/Qf"),o("k3Gp"),o("8/o9"),o("O+I2"),o("1vPl");var u=o("q1tI"),d=v(u),f=o("eO8H"),p=v(o("GNFk")),h=o("sYIF"),m=v(o("vDqi")),g=v(o("CWZq")),y=v(o("CjtM"));o("F2v3"),o("ci3M"),o("zpD0"),o("KCAv"),o("7aN/"),o("6Rz1");var b=v(o("VDfm"));function v(e){return e&&e.__esModule?e:{default:e}}var w=window.$;l.default.Search;window._header_componentHandler=null;var _=["www.trustie.net","forgeplus.trustie.net","forum.trustie.net","testforgeplus.trustie.net"],k=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.openNotification=function(e){r.default.open({message:"提示",description:e})},o.getCookie=function(e){var t=RegExp("(^| )"+e+"=([^;]+)(;|$)");return void 0===document.cookie.match(t)?decodeURIComponent((void 0)[2]):null},o.delCookie=function(e){var t=new Date;t.setTime(t.getTime()-1);var n=o.getCookie(e);null!=n&&(document.cookie=e+"="+n+";expires="+t.toGMTString())},o.onLogout=function(){o.delCookie("autologin_trustie"),m.default.get("/accounts/logout.json",{}).then((function(e){1===e.data.status&&(o.setState({user:void 0}),window.location.href="/login",i.default.success("退出成功"))}))},o.tojoinclass=function(){var e=o.state.user;void 0!==e?e&&""===e.login?o.setState({isRender:!0}):e&&!1===e.profile_completed?o.setState({AccountProfiletype:!0}):o.setState({Addcoursestypes:!0}):o.setState({isRender:!0})},o.tojoinitem=function(){if(o.props.user&&void 0===o.props.user.email||o.props.user&&null===o.props.user.email||o.props.user&&""===o.props.user.email)o.openNotification("请先绑定邮箱,谢谢");else{var e=o.state.user;void 0!==e?e&&""===e.login?o.setState({isRender:!0}):e&&!1===e.profile_completed?o.setState({AccountProfiletype:!0}):o.setState({tojoinitemtype:!0}):o.setState({isRender:!0})}},o.submitstatevalue=function(e,t,n){o.setState({Addcoursestypes:!1,tojoinitemtype:!1,tojoinclasstitle:void 0,rolearr:["",""],Checkboxteacherchecked:!1,Checkboxstudentchecked:!1,Checkboxteachingchecked:!1,Checkboxteachertype:!1,Checkboxteachingtype:!1,code_notice:!1,checked_notice:!1,submitapplicationssum:e,submitapplications:!0,submitapplicationsvalue:t,submitapplicationsvaluedata:n,RadioGroupvalue:void 0})},o.onChangeRadioGroup=function(e){o.setState({RadioGroupvalue:e.target.value})},o.submitsubmitapplications=function(){var e=o.state,t=e.submitapplicationssum,n=e.submitapplicationsvaluedata;o.setState({submitapplications:!1,RadioGroupvalue:void 0}),0===t?void 0!==n&&(window.location.href="/courses/"+n):1===t&&void 0!==n&&(window.location.href="/projects/"+n)},o.hidesubmitapplications=function(){o.setState({Addcoursestypes:!1,tojoinitemtype:!1,tojoinclasstitle:void 0,rolearr:["",""],Checkboxteacherchecked:!1,Checkboxstudentchecked:!1,Checkboxteachingchecked:!1,Checkboxteachertype:!1,Checkboxteachingtype:!1,code_notice:!1,checked_notice:!1,submitapplications:!1,RadioGroupvalue:void 0})},o.educoderlogin=function(){o.setState({isRender:!0})},o.educoderloginysl=function(){m.default.get("/accounts/logout.json").then((function(e){void 0!==e&&(window.location.href="/")})).catch((function(e){console.log(e)}))},o.hideAddcoursestypes=function(){o.setState({Addcoursestypes:!1})},o.HideAddcoursestypess=function(e){o.setState({Addcoursestypes:!1,mydisplay:!0,occupation:e})},o.ModalCancelsy=function(){o.setState({mydisplay:!1})},o.hidetojoinclass=function(){o.setState({tojoinclasstype:!1,tojoinitemtype:!1,tojoinclasstitle:void 0,rolearr:["",""],Checkboxteacherchecked:!1,Checkboxstudentchecked:!1,Checkboxteachingchecked:!1,Checkboxteachertype:!1,Checkboxteachingtype:!1,code_notice:!1,checked_notice:!1,RadioGroupvalue:void 0})},o.submittojoinclass=function(e){var t=o.state,n=t.tojoinclasstitle,a=t.rolearr,i=t.RadioGroupvalue;if(void 0!==n){var r=a;if(n.length<6)o.setState({code_notice:!0});else if(""!==n&&void 0!==n){o.setState({code_notice:!1});for(var l=[],s=0,c=0;c<r.length;c++)""!==r[c]?l.push(r[c]):s+=1;if(2!==s||0!==e)if(1!==e||void 0!==i){if(1===e){m.default.post("/project_applies.json",{code:n,role:i}).then((function(e){1===e.data.status?o.submitstatevalue(1,"您输入的邀请码错误"):2===e.data.status?o.submitstatevalue(1,"您已经是该项目成员",e.data.project):3===e.data.status?o.submitstatevalue(1,"请选择一个角色"):4===e.data.status?o.submitstatevalue(1,"您的申请已提交,请等待项目管理员审批"):5===e.data.status?o.submitstatevalue(1,"您已经申请加入该项目了,请耐心等待"):6===e.data.status?o.submitstatevalue(1,"您已成功加入项目",e.data.project):0===e.data.status&&("reporter"===i?(o.openNotification("您加入项目成功!"),window.location.href="/projects/"+e.data.project_id):o.openNotification("您的申请已提交,请等待项目管理员审批!"))}))}o.hidetojoinclass()}else o.setState({checked_notice:!0});else o.setState({checked_notice:!0})}else o.setState({code_notice:!0})}else o.setState({code_notice:!0})},o.cancelModulationModels=function(){o.setState({isRenders:!1})},o.inputjoinclassvalue=function(e){e.target.value.length>=7?o.openNotification("请输入6位项目邀请码!"):o.setState({tojoinclasstitle:e.target.value})},o.showSearchOpen=function(e){o.setState({showSearchOpentype:!0})},o.hideshowSearchOpen=function(e){!0===o.state.setevaluatinghides&&o.setState({showSearchOpentype:!1,setevaluatinghides:!1})},o.onKeywordSearchKeyDown=function(e){var t="/search?value="+e;o.props.history.push(t)},o.onKeywordSearchKeyDowns=function(){o.setState({setevaluatinghides:!1})},o.setevaluatinghides=function(){o.setState({setevaluatinghides:!0})},o.getUser=function(e,t){if("projects"===t&&(o.props.user&&void 0===o.props.user.email||o.props.user&&null===o.props.user.email||o.props.user&&""===o.props.user.email))o.openNotification("请先绑定邮箱,谢谢");else{var n=o.state.user;void 0!==n?n&&""===n.login?o.setState({isRender:!0}):n&&!1===n.profile_completed?o.setState({AccountProfiletype:!0}):"newshixuns"===t&&o.props&&o.props.current_user&&!1===o.props.current_user.is_shixun_marker?o.setgoshowqqgtounp(!0):void 0===e&&""===e||(window.location.href=e):o.setState({isRender:!0})}},o.Modifyloginvalue=function(){o.setState({isRender:!1})},o.hideAccountProfile=function(){o.setState({AccountProfiletype:!1})},o.headtypesonClick=function(e,t){o.setState({headtypess:e,headtypesonClickbool:t})},o.gettablogourlnull=function(){var e=document.createElement("link"),t=document.getElementById("dynamic-favicon");e.id="dynamic-favicon",e.rel="shortcut icon",e.href="/react/build/./favicon.ico",t&&document.head.removeChild(t),document.head.appendChild(e)},o.gettablogourldata=function(e){document.title=e.data.setting.name;var t=document.createElement("link"),o=document.getElementById("dynamic-favicon");t.id="dynamic-favicon",t.rel="shortcut icon",t.href="/"+e.data.setting.tab_logo_url,o&&document.head.removeChild(o),console.log("ac12111:",e.data.setting.tab_logo_url),document.head.appendChild(t)},o.handleVisibleChanges=function(e){o.setState({visiblemyss:e})},o.getAppdata=function(){try{var e=JSON.parse(localStorage.getItem("chromesetting")),t=JSON.parse(localStorage.getItem("chromesettingresponse"));o.setState({mygetHelmetapi2:e}),e.tab_logo_url?o.gettablogourldata(t):o.gettablogourlnull()}catch(e){o.geturlsdata()}},o.geturlsdata=function(){m.default.get("/setting.json").then((function(e){if(e&&e.data){o.setState({mygetHelmetapi2:e.data.setting});try{e.data.setting.tab_logo_url?o.gettablogourldata(e):o.gettablogourlnull()}catch(e){o.gettablogourlnull()}}else o.gettablogourlnull()})).catch((function(e){o.gettablogourlnull()}))},o.matchpaths=function(e){var t=o.props.match;if(e)return e.indexOf("forums")>-1&&t.path.indexOf("forums")>-1||(e.indexOf("projects")>-1&&t.path.indexOf("projects")>-1||(e.indexOf(".com/notice")>-1&&t.path.indexOf("/notice")>-1||(e.indexOf("/task")>-1&&t.path.indexOf("/task")>-1||(e.indexOf("users")>-1&&t.path.indexOf("users")>-1||!(!["http://117.50.100.12:8080","https://osredm.com"].includes(e)||"/"!==t.path)))))},o.setgoshowqqgtounp=function(e){o.setState({goshowqqgtounp:e})},o.state={Addcoursestypes:!1,tojoinitemtype:!1,tojoinclasstitle:void 0,rolearr:["",""],Checkboxteacherchecked:!1,Checkboxstudentchecked:!1,Checkboxteachingchecked:!1,Checkboxteachertype:!1,Checkboxteachingtype:!1,code_notice:!1,checked_notice:!1,RadioGroupvalue:void 0,submitapplications:!1,isRender:!1,showSearchOpentype:!1,showTrial:!1,setevaluatinghides:!1,occupation:0,mydisplay:!1,headtypesonClickbool:!1,headtypess:"/",mygetHelmetapi2:null,goshowqqgtounp:!1,visiblemyss:!1},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),c(t,[{key:"componentDidMount",value:function(){var e,t;this.geturlsdata(),window._header_componentHandler=this,w(".edu-menu-panel").hover((function(){e&&(t&&t!==this&&w(t).find(".edu-menu-list").hide(),clearTimeout(e),e=null),t=this,w(this).find(".edu-menu-list").show()}),(function(){var t=this;e=setTimeout((function(){w(t).find(".edu-menu-list").hide()}),800)}));try{window.sessionStorage.setItem("yslgeturls",JSON.stringify(window.location.href))}catch(e){}}},{key:"componentWillReceiveProps",value:function(e,t){this.setState({user:e.user}),void 0!==e.Headertop&&e.Headertop.old_url}},{key:"render",value:function(){var e=this,t=this.props.match,o=this.state,i=(o.Addcoursestypes,o.tojoinitemtype,o.tojoinclasstitle,o.code_notice,o.checked_notice,o.AccountProfiletype),r=o.submitapplications,l=o.submitapplicationsvalue,c=o.user,u=o.isRender,m=(o.showSearchOpentype,o.headtypesonClickbool,o.headtypess,o.mygetHelmetapi2),v=o.goshowqqgtounp,w="/"===t.path||"",k=!1;if(this.props&&null!=this.props.mygetHelmetapi){this.props.mygetHelmetapi.navbar.map((function(e,t){var o=RegExp(e.link);"/courses".match(o)&&!0===e.hidden&&(k=!0)}))}return d.default.createElement("div",{className:"newHeaders "+(w&&"homePage"),id:"nHeader"},d.default.createElement("div",{className:"headerContent"},!0===u?d.default.createElement(g.default,s({},this.props,this.state,{Modifyloginvalue:function(){return e.Modifyloginvalue()}})):"",!0===i?d.default.createElement(p.default,s({hideAccountProfile:function(){return e.hideAccountProfile()}},this.props,this.state)):"",!0===v?d.default.createElement(y.default,s({},this.state,this.props,{setgoshowqqgtounp:function(t){return e.setgoshowqqgtounp(t)}})):"",d.default.createElement("a",{href:m&&m.new_course.default_url,className:"fl mr30",style:{minWidth:"45px"}},m&&m.nav_logo_url?d.default.createElement("img",{alt:"红山开源社区",className:"logoimg",style:{heigth:"40px"},src:w?b.default:(0,h.getLogoImageUrl)(m.nav_logo_url)}):""),d.default.createElement("div",{className:"head-nav pr",id:"head-navpre1"},m&&m.navbar&&m.navbar.length>0?d.default.createElement("ul",{id:"header-nav"},m.navbar&&m.navbar.map((function(t,o){var n=t.link,a=e.props.user&&e.props.user.login,i=t.hidden;n&&(n.indexOf("courses")>-1||n.indexOf("contests")>-1)&&(a?n.indexOf("courses")>-1?n=n.replace(/courses/g,"users/"+a+"/courses"):n.indexOf("contests")>-1&&(n=n.replace(/contests/g,"users/"+a+"/contests")):i=!0),a&&n&&n.indexOf("homes")>-1&&(n=n.replace(/homes/g,"users/"+a+"/user_activities"));var r=n&&_.filter((function(e){return n.indexOf(e)>-1})),l=r&&r.length>0;return d.default.createElement("li",{key:o,onClick:function(){return e.headtypesonClick(t.link,!0)},className:!0===e.matchpaths(t.link)?"pr active":"pr",style:i?{display:"none"}:{display:"flex"}},d.default.createElement("a",{href:n,target:l?"_self":"_blank"},t.name))}))):""),d.default.createElement("div",{className:"head-right"},this.props.user&&this.props.user.login&&d.default.createElement("div",{className:"edu-menu-panel"},d.default.createElement("i",{className:"iconfont icon-tianjiafangda "+(w?"color-home":"color-grey-6")+" "}),d.default.createElement("div",{className:"edu-menu-list",style:{top:"48px"}},d.default.createElement("div",{className:"overPart"}),!0===k&&this.props.user&&!1===this.props.user.main_site?"":d.default.createElement("ul",{className:"edu-txt-center"},d.default.createElement("li",null,d.default.createElement(f.Link,{to:"/projects/mirror/new"},"新建镜像项目")),d.default.createElement("li",null,d.default.createElement(f.Link,{to:"/projects/deposit/new"},"新建托管项目")),d.default.createElement("li",null,d.default.createElement(f.Link,{to:"/organize/new"},"新建组织"))))),this.props.user&&this.props.user.login&&d.default.createElement("div",{className:"ml30 edu-menu-panel"},c&&c.login&&d.default.createElement("a",{href:""+(m&&m.new_course&&m.new_course.tiding_url),style:{position:"relative"},target:"_blank"},d.default.createElement("i",{className:"iconfont icon-xiaoxilingdang "+(w?"color-home":"color-grey-6")}),d.default.createElement("span",{className:"newslight",style:{display:void 0===this.props.Headertop?"none":!0===this.props.Headertop.new_message?"block":"none"}}))),d.default.createElement(a.default,{keyboard:!1,title:"提示",visible:r,closable:!1,footer:null},d.default.createElement("div",{className:"task_popup_con ml30"},d.default.createElement("div",{className:"mr15"},d.default.createElement("ul",null,d.default.createElement("div",{className:"task-popup-content"},d.default.createElement("p",{className:"task-popup-text-center font-16"},l)),d.default.createElement("li",{className:"clearfix mt10 edu-txt-center"},d.default.createElement("a",{className:"task-btn mr10",onClick:this.hidesubmitapplications},"取消"),d.default.createElement("a",{className:"task-btn task-btn-orange ml20",onClick:this.submitsubmitapplications},"确定"))))))),void 0===c||""===c.login?d.default.createElement("span",{className:"login-box"},d.default.createElement("a",{onClick:function(){return e.educoderlogin()},className:"mr5 "+(w?"color-home":"color-grey-6")},"登录"),m&&m.new_course&&m.new_course.register_url&&(w?d.default.createElement(n.default,{className:"register-button",type:"primary",size:"large"},d.default.createElement("a",{href:""+m.new_course.register_url},"免费注册")):d.default.createElement("span",null,d.default.createElement("em",{className:"vertical-line"}),d.default.createElement("a",{className:"ml5 "+(w?"color-home":"color-grey-6"),href:""+m.new_course.register_url,target:"_blank"},"注册")))):d.default.createElement("div",{className:"ml30 edu-menu-panel",style:{height:"70px",lineHeight:"70px"}},d.default.createElement("a",{href:"/users/"+(void 0===this.props.current_user?"":this.props.current_user.login)+"/courses"},d.default.createElement("img",{alt:"头像",className:"radius",height:"34",id:"nh_user_logo",name:"avatar_image",src:(0,h.getImageUrl)("images/"+c.image_url),width:"34"})),d.default.createElement("ul",{className:"edu-menu-list",style:{top:"60px",textAlign:"center"}},d.default.createElement("li",{className:"bor-bottom-greyE",style:{cursor:"default",background:"#fff"}},this.props.current_user.username),d.default.createElement("li",null,d.default.createElement(f.Link,{to:"/users/"+this.props.current_user.login},"个人中心")),d.default.createElement("li",null,d.default.createElement(f.Link,{to:"/task/myTask"},"创客管理")),m&&m.new_course&&m.new_course.my_courses&&d.default.createElement("li",null,d.default.createElement("a",{href:""+m.new_course.my_courses,target:"_blank"},"我的课程")),m&&m.new_course&&m.new_course.my_organ&&d.default.createElement("li",null,d.default.createElement("a",{href:"/users/"+this.props.current_user.login+"/organizes",target:"_blank"},"我的组织")),d.default.createElement("li",{className:"bor-top-greyE"},d.default.createElement("a",{onClick:function(){return e.educoderloginysl()}},"退出"))))))}}]),t}(u.Component);t.default=k},TnMl:function(e,t,o){},VDfm:function(e,t,o){"use strict";o.r(t),t.default=o.p+"static/media/hskylogo.ad9befe7.png"},mf6Z:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),a=o("q1tI"),i=r(a);r(o("wd/R")),o("eO8H");function r(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.showhtml=function(e){var t={__html:e};return i.default.createElement("div",{dangerouslySetInnerHTML:t})},o.state={forge_footer:void 0},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"componentDidMount",value:function(){try{var e=JSON.parse(localStorage.getItem("chromesetting"));this.setState({forge_footer:e.footer})}catch(e){}}},{key:"render",value:function(){var e=this.state.forge_footer;return i.default.createElement("div",{className:"newFooter edu-txt-center "},i.default.createElement("style",null,"\n\t\t\t\t\t\t.newFooter {\n\t\t\t\t\t\t\t\tmax-height: 140px !important;\n\t\t\t\t\t\t\t\tpadding-bottom: 20px !important;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tp {\n\t\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t\t\tmargin-bottom:0px !important;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t"),e&&this.showhtml(e))}}]),t}(a.Component);t.default=l}}]);