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.
1 line
7.9 KiB
1 line
7.9 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[132],{"5Lld":function(e,a,t){e.exports={flex_box_center:"flex_box_center___3QNoF",flex_space_between:"flex_space_between___1V2h0",flex_box_vertical_center:"flex_box_vertical_center___2NIZD",flex_box_center_end:"flex_box_center_end___1daQk",flex_box_column:"flex_box_column___1OYLh",banner:"banner___2ShvM",wrap:"wrap___2LlrN",contentWrap:"contentWrap___aj24j",avatarWrap:"avatarWrap___1e9Ap",avatar:"avatar___3S91M",leftWrap:"leftWrap___9S3me",username:"username___2n4Ae",colorB8:"colorB8___iT6bs",color98EBFF:"color98EBFF___L0xDV",rightWrap:"rightWrap___3cIAT",countWrap:"countWrap___18atC",count:"count___1n5NP",grade:"grade___2Ucym",signed:"signed___1JBiI",bcFF8E02:"bcFF8E02___2seA2",bcCC:"bcCC___2Spe7",nav:"nav___2Z4mt",active:"active___1tNUz"}},"bp/9":function(e,a,t){"use strict";t.r(a);var n,c=t("PpiC"),o=t("q1tI"),l=t.n(o),i=t("9kvl"),s=(t("5Dmo"),t("3S7+")),r=t("WmNS"),d=t.n(r),u=t("9og8"),m=t("tJVT"),_=t("WHYC"),v=t("uYtH"),p=t("m3rI"),g=t("5Lld"),E=t.n(g);(function(e){e["Classrooms"]="classrooms",e["Shixuns"]="shixuns",e["Paths"]="paths",e["Projects"]="projects",e["Videos"]="videos",e["Topics"]="topics"})(n||(n={}));var h=e=>{var a,t,i,r,g,h,f,b,I,N,x,w,S,k,j,C,F,R,W,O,D,V,L,P,y=e.userDetail,A=e.user,B=e.globalSetting,T=(e.loading,e.dispatch),z=(Object(c["a"])(e,["userDetail","user","globalSetting","loading","dispatch"]),Object(_["l"])()),G=Object(o["useRef"])(),M=Object(o["useState"])(),H=Object(m["a"])(M,2),J=H[0],U=H[1];Object(o["useEffect"])(()=>{var e,a;G.current=null===(e=z.pathname.split("/"))||void 0===e?void 0:e[2];var t=null===(a=z.pathname.split("/"))||void 0===a?void 0:a[3];U(t||n.Classrooms)},[z.pathname]);var Y=function(){var e=Object(u["a"])(d.a.mark((function e(){var a;return d.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,T({type:"userDetail/signed"});case 2:a=e.sent,a&&T({type:"userDetail/getHomepageInfo",payload:{username:G.current}});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Q=(null===(a=A.userInfo)||void 0===a?void 0:a.login)===G.current;return l.a.createElement("section",null,l.a.createElement("aside",{className:E.a.banner},l.a.createElement("aside",{className:E.a.wrap},l.a.createElement("div",{className:E.a.contentWrap},l.a.createElement("div",{className:E.a.leftWrap},l.a.createElement("p",{className:E.a.avatarWrap},l.a.createElement("img",{className:E.a.avatar,alt:"\u5934\u50cf",src:"".concat(p["a"].IMG_SERVER,"images/").concat(null===(t=y.homepageInfo)||void 0===t?void 0:t.avatar_url)})),l.a.createElement("div",null,l.a.createElement("p",{className:"mb0 mt20"},l.a.createElement("span",{className:E.a.username},null===(i=y.homepageInfo)||void 0===i?void 0:i.name)),l.a.createElement("p",{className:"mb0 mt15"},l.a.createElement(s["a"],{placement:"bottom",title:(null===(r=y.homepageInfo)||void 0===r?void 0:r.professional_certification)?"\u5df2\u804c\u4e1a\u8ba4\u8bc1":"\u672a\u804c\u4e1a\u8ba4\u8bc1"},l.a.createElement("i",{className:(null===(g=y.homepageInfo)||void 0===g?void 0:g.professional_certification)?"iconfont icon-shenfenzhenghaomaguizheng font18 mr20 ml2 ".concat(E.a.color98EBFF):"iconfont icon-shenfenzhenghaomaguizheng font18 mr20 ml2 ".concat(E.a.colorB8)})),l.a.createElement(s["a"],{placement:"bottom",title:(null===(h=y.homepageInfo)||void 0===h?void 0:h.authentication)?"\u5df2\u5b9e\u540d\u8ba4\u8bc1":"\u672a\u5b9e\u540d\u8ba4\u8bc1"},l.a.createElement("i",{className:(null===(f=y.homepageInfo)||void 0===f?void 0:f.authentication)?"iconfont icon-renzhengshangjia font18 ".concat(E.a.color98EBFF):"iconfont icon-renzhengshangjia font18 ".concat(E.a.colorB8)}))))),l.a.createElement("div",{className:E.a.rightWrap},l.a.createElement("div",{className:"mt20 ".concat(E.a.countWrap)},l.a.createElement("div",{className:E.a.count},l.a.createElement("span",null,Q?"\u6211":"TA","\u7684\u7ecf\u9a8c\u503c"),l.a.createElement("a",null,null===(b=y.homepageInfo)||void 0===b?void 0:b.experience)),l.a.createElement("div",{className:"".concat(E.a.count," ").concat(E.a.grade)},l.a.createElement("span",null,Q?"\u6211":"TA","\u7684\u91d1\u5e01"),l.a.createElement("a",null,null===(I=y.homepageInfo)||void 0===I?void 0:I.grade))),l.a.createElement("span",{className:"mt35 ml60"},Q?l.a.createElement(l.a.Fragment,null,(null===(N=y.homepageInfo)||void 0===N?void 0:N.attendance_signed)?l.a.createElement("span",{className:"".concat(E.a.bcCC," ").concat(E.a.signed)},"\u5df2\u7b7e\u5230"):l.a.createElement("a",{className:"".concat(E.a.bcFF8E02," ").concat(E.a.signed),onClick:Y},"\u7b7e\u5230")):l.a.createElement(v["Link"],{className:"".concat(E.a.bcFF8E02," ").concat(E.a.signed),to:"/messages/".concat(null===(x=A.userInfo)||void 0===x?void 0:x.login,"/message_detail?target_ids=").concat(null===(w=y.homepageInfo)||void 0===w?void 0:w.id)},"\u79c1\u4fe1")))),l.a.createElement("div",{className:E.a.nav},!(null===(S=((null===(k=B.setting)||void 0===k?void 0:k.navbar)||[]).find(e=>e.link==="/".concat(n.Classrooms)))||void 0===S?void 0:S.hidden)&&l.a.createElement("li",{className:"".concat(J===n.Classrooms?E.a.active:"")},l.a.createElement(v["Link"],{to:"/users/".concat(G.current,"/classrooms"),onClick:()=>U(n.Classrooms)},"\u6559\u5b66\u8bfe\u5802")),!(null===(j=((null===(C=B.setting)||void 0===C?void 0:C.navbar)||[]).find(e=>e.link==="/".concat(n.Shixuns)))||void 0===j?void 0:j.hidden)&&l.a.createElement("li",{className:"".concat(J===n.Shixuns?E.a.active:"")},l.a.createElement(v["Link"],{to:"/users/".concat(G.current,"/shixuns"),onClick:()=>U(n.Shixuns)},"\u5b9e\u8bad\u9879\u76ee")),!(null===(F=((null===(R=B.setting)||void 0===R?void 0:R.navbar)||[]).find(e=>e.link==="/".concat(n.Paths)))||void 0===F?void 0:F.hidden)&&l.a.createElement("li",{className:"".concat(J===n.Paths?E.a.active:"")},l.a.createElement(v["Link"],{to:"/users/".concat(G.current,"/paths"),onClick:()=>U(n.Paths)},"\u5b9e\u8df5\u8bfe\u7a0b")),(null===(W=A.userInfo)||void 0===W?void 0:W.main_site)&&l.a.createElement("li",{className:"".concat(J===n.Projects?E.a.active:"")},l.a.createElement(v["Link"],{to:"/users/".concat(G.current,"/projects"),onClick:()=>U(n.Projects)},"\u5f00\u53d1\u9879\u76ee")),(null===(O=A.userInfo)||void 0===O?void 0:O.main_site)&&(Q&&(null===(D=A.userInfo)||void 0===D?void 0:D.is_teacher)||(null===(V=A.userInfo)||void 0===V?void 0:V.admin))&&l.a.createElement("li",{className:"".concat(J===n.Videos?E.a.active:"")},l.a.createElement(v["Link"],{to:"/users/".concat(G.current,"/videos"),onClick:()=>U(n.Videos)},"\u89c6\u9891")),(null===(L=A.userInfo)||void 0===L?void 0:L.main_site)&&Q&&(null===(P=A.userInfo)||void 0===P?void 0:P.is_teacher)&&l.a.createElement("li",{className:"".concat(J===n.Topics?E.a.active:"")},l.a.createElement(v["Link"],{to:"/users/".concat(G.current,"/topics/personal"),onClick:()=>U(n.Topics)},"\u9898\u5e93"))))))},f=Object(i["a"])(e=>{var a=e.user,t=e.userDetail,n=e.loading,c=e.globalSetting;return{user:a,userDetail:t,globalSetting:c,loading:n.models.index}})(h),b=e=>{e.userDetail,e.globalSetting,e.loading;var a=e.dispatch,t=Object(c["a"])(e,["userDetail","globalSetting","loading","dispatch"]),n=Object(o["useRef"])();return Object(o["useEffect"])(()=>{n.current=t.match.params.username,a({type:"userDetail/getSystemUpdate"}),a({type:"userDetail/getHomepageInfo",payload:{username:n.current}})},[]),l.a.createElement("section",null,l.a.createElement(f,null),t.children)};a["default"]=Object(i["a"])(e=>{var a=e.userDetail,t=e.loading,n=e.globalSetting;return{userDetail:a,globalSetting:n,loading:t.models.index}})(b)},m3rI:function(e,a,t){"use strict";var n={dev:{API_SERVER:"https://test-newweb.educoder.net",IMG_SERVER:"https://testali-cdn.educoder.net/",FORGE:"https://test-oldweb.educoder.net/"},test:{API_SERVER:"https://test-newbuild.educoder.net",IMG_SERVER:"https://test-newbuild.educoder.net/",FORGE:"https://test-oldweb.educoder.net/"},build:{API_SERVER:"https://www.educoder.net",IMG_SERVER:"https://www.educoder.net/",FORGE:"https://forge.educoder.net/"}};a["a"]=n[window.ENV]}}]); |