You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/layouts__index.e67cec3b.asy...

2 lines
6.6 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{"+ego":function(m,h,e){"use strict";e.r(h);var ee=e("GNNt"),S=e("wEI+"),oe=e("T2oS"),D=e("W9HT"),te=e("2qtc"),M=e("kLXV"),N=e("SIvP"),f=e("q1tI"),t=e.n(f),F=e("+Gva"),O=e("9kvl"),X=e("k16G"),k=e("Y8AM"),B=e("XmPC"),W=e.n(B),q=e("p3IR"),Q=e.n(q),r=e("1vsH"),ne=e("RhLm"),I=e("m3rI"),x=window.location.host,w=I.a.QQLoginCB,z=function(l){var n=l.onWechatLogin;function d(){Object(r.F)()?window.location.href="https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=".concat(w,"%2fotherloginqq&state=null,").concat(x,"&response_type=code"):Object(r.J)("https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=".concat(w,"%2fotherloginqq&state=null,").concat(x,"&response_type=code"))}return t.a.createElement(t.a.Fragment,null,t.a.createElement("p",{className:"driver"}," \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014 ",t.a.createElement("span",{style:{color:"#444444"}},"\u5FEB\u901F\u767B\u5F55")," \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014 "),t.a.createElement("div",{className:"other-login"},t.a.createElement("a",{title:"\u5FAE\u4FE1\u767B\u5F55",onClick:n},t.a.createElement("img",{src:W.a,alt:"\u5FAE\u4FE1",width:46})),t.a.createElement("a",{title:"qq\u767B\u5F55",onClick:d},t.a.createElement("img",{src:Q.a,alt:"QQ",width:46}))))};function G(l){var n=l.onBack;return t.a.createElement(t.a.Fragment,null,t.a.createElement("iframe",{className:"wechat-qrcode",frameBorder:"0",sandbox:"allow-scripts allow-same-origin allow-top-navigation",scrolling:"no",src:"https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=".concat(w,"%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,").concat(x,"#wechat_redirect")}),t.a.createElement("a",{className:"btn-link",onClick:n},"\u8FD4\u56DE\u8D26\u53F7\u767B\u5F55"))}var ae=e("1bfj"),H=function(l){var n=l.is_main_site,d=l.is_local,a=l.style,p=a===void 0?{}:a,o=Object(f.useState)(!1),L=Object(X.a)(o,2),c=L[0],b=L[1];function C(){b(!1)}function U(){b(!0)}return t.a.createElement("div",{className:"login-panel-wrapper",style:p},c?t.a.createElement(G,{onBack:C}):t.a.createElement(t.a.Fragment,null,t.a.createElement(k.a,null),n&&!d&&t.a.createElement(z,{onWechatLogin:U})))},J=e("PNBd"),V=e.n(J),Y=function(n){var d,a,p=n.user,o=n.globalSetting,L=n.loading,c=n.dispatch,b=function(){c({type:"user/showPopLogin",payload:{showPopLogin:!1,showClosable:!1}})},C=(d=o.setting)===null||d===void 0?void 0:d.main_site,U=(a=o.setting)===null||a===void 0?void 0:a.is_local;return t.a.createElement(M.a,{centered:!0,title:"\u767B\u5F55",visible:p.showPopLogin,footer:null,width:420,keyboard:!1,maskClosable:!1,wrapClassName:V.a.popLogin,closable:p.showClosable,onCancel:b},p.showPopLogin&&t.a.createElement(H,{is_main_site:C,is_local:U}))},K=Object(O.a)(function(l){var n=l.user,d=l.loading,a=l.globalSetting;return{user:n,globalSetting:a,loading:d.models.index}})(Y),Z=e("wd/R"),T=e.n(Z),$=function(n){var d=n.loading,a=n.globalSetting,p=n.children,o=n.user,L=n.dispatch,c=n.location,b=Object(N.a)(n,["loading","globalSetting","children","user","dispatch","location"]),C=a.globalLoading;Object(f.useEffect)(function(){if(document.body.scrollIntoView(),L({type:"globalSetting/query",payload:{}}),L({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),console.log(c,":location"),c.pathname==="/admins"||c.pathname==="/sidekiq"){var s=document.domain;if(s.indexOf("educoder.net")>-1)switch(s){case"www.educoder.net":case"educoder.net":window.location.href="https://data.educoder.net".concat(c.pathname);break;default:var i=document.domain.split(".");i[0]=i[0]+"-data",window.location.href="https://".concat(i.join(".")).concat(c.pathname);break}}M.a.destroyAll(),Object(O.e)("zh-CN",!1)},[c.pathname]),Object(f.useEffect)(function(){a.updateData.system_update?localStorage.updateEndTime||new Date().getTime()<new Date(a.updateData.end_time).getTime()&&M.a.info({title:a.updateData.subject,content:a.updateData.system_score,onOk:function(){localStorage.updateEndTime=a.updateData.end_time}}):localStorage.removeItem("updateEndTime")},[a.updateData.system_update]),Object(f.useEffect)(function(){var s;if((s=o.userInfo)===null||s===void 0?void 0:s.login){var i,u;window.gtag("config","UA-198293321-1",{user_id:(i=o.userInfo)===null||i===void 0?void 0:i.login,custom_map:{dimension1:"user_id"}}),window.gtag("set",{user_id:(u=o.userInfo)===null||u===void 0?void 0:u.login})}},[o.userInfo]),Object(f.useEffect)(function(){var s,i;if(((s=o.userInfo)===null||s===void 0?void 0:s.login)&&U(),(i=o.userInfo)===null||i===void 0?void 0:i.user_school){var u,P,E,g;Object(r.S)([(u=o.userInfo)===null||u===void 0?void 0:u.user_school,(P=o.userInfo)===null||P===void 0?void 0:P.login,3]),Object(r.R)(["\u7528\u6237\u8BBF\u95EE\u660E\u7EC6",(E=o.userInfo)===null||E===void 0?void 0:E.login,(g=o.userInfo)===null||g===void 0?void 0:g.user_school])}},[o.userInfo,c.pathname]);var U=function(){var i,u=localStorage.trackUserTime,P=localStorage.trackUser;if(!(u&&T()(u).isSame(T()().startOf("day"),"d")&&P==((i=o.userInfo)===null||i===void 0?void 0:i.login))){var E,g,y,R;localStorage.trackUserTime=new Date,localStorage.trackUser=(E=o.userInfo)===null||E===void 0?void 0:E.login;var v="";switch(o.userInfo.role){case 1:v="\u8D85\u7BA1";break;case 2:v="\u8FD0\u8425";break;case 5:v="\u8BA4\u8BC1\u6559\u5E08";break;case 12:v="\u672A\u8BA4\u8BC1\u6559\u5E08";break;case 15:v="\u5B66\u751F";break}if(((g=o.userInfo)===null||g===void 0?void 0:g.identity)!=="student"&&((y=o.userInfo)===null||y===void 0?void 0:y.identity)!=="teacher"&&(v="\u4E13\u4E1A\u4EBA\u58EB"),(R=o.userInfo)===null||R===void 0?void 0:R.user_school){var j,_,A;Object(r.R)(["\u5B66\u6821\u6D3B\u8DC3\u7528\u6237",(j=o.userInfo)===null||j===void 0?void 0:j.user_school]),Object(r.R)(["\u7528\u6237\u8BBF\u95EE\u660E\u7EC6",(_=o.userInfo)===null||_===void 0?void 0:_.login,(A=o.userInfo)===null||A===void 0?void 0:A.user_school])}Object(r.R)(["\u5E73\u53F0PC\u7AEF","\u603B\u6D3B\u8DC3\u7528\u6237\u6570"]),Object(r.R)(["\u5E73\u53F0PC\u7AEF",v])}};return t.a.createElement(S.a,{locale:F.default},t.a.createElement(K,null),t.a.createElement(D.a,{size:"large",spinning:C.show,tip:C.text,className:"ant-spin-nested-loading-black"},p))},le=h.default=Object(O.a)(function(l){var n=l.loading,d=l.globalSetting,a=l.user;return{loading:n,globalSetting:d,user:a}})($)},PNBd:function(m,h,e){m.exports={popLogin:"popLogin___25af7"}},RhLm:function(m,h,e){},XmPC:function(m,h,e){m.exports=e.p+"static/wechat.a53d22ca.svg"},p3IR:function(m,h,e){m.exports=e.p+"static/qq.ee284be0.svg"}}]);