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