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/p__Account.d188f232.async.js

2 lines
22 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{"10oi":function(H,Z,v){H.exports={wrap:"wrap___15YxZ",avatarWrap:"avatarWrap___1SK7M",avatar:"avatar___aE2NE",updateAvatarWrap:"updateAvatarWrap___1fuUU",img:"img___1hVau",updateAvatar:"updateAvatar___3eO7J",name:"name___3A4CD",role:"role___2fZYJ",title:"title___BMo5O",colorGary:"colorGary___1xzwA",colorGreen:"colorGreen___1cWMZ",colorRed:"colorRed___3vds7",item:"item___3kvAY",active:"active___2NtTm"}},"5sM0":function(H,Z,v){H.exports={modal:"modal___2DX0z",avatarWrap:"avatarWrap___2lmFf",tip:"tip___220u_",previewWrap:"previewWrap___2BJLo",previewImg:"previewImg___29S6d",uploadButton:"uploadButton___30_6b"}},m3a9:function(H,Z,v){"use strict";v.r(Z);var nt=v("9og8"),rt=v("PpiC"),X=v("q1tI"),u=v.n(X),at=v("Ty5D"),$=v("9kvl"),ot=v("tJVT"),it=v("m3rI"),yt=v("2qtc"),ut=v("kLXV"),bt=v("T2oS"),lt=v("W9HT"),wt=v("miYZ"),q=v("tsqr"),st=v("wyMu"),dt=v.n(st),ft=v("5sM0"),W=v.n(ft),Lt=v("YQfW");function tt(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */tt=function(){return i};var c,i={},y=Object.prototype,d=y.hasOwnProperty,b=Object.defineProperty||function(n,t,e){n[t]=e.value},N=typeof Symbol=="function"?Symbol:{},A=N.iterator||"@@iterator",G=N.asyncIterator||"@@asyncIterator",I=N.toStringTag||"@@toStringTag";function h(n,t,e){return Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),n[t]}try{h({},"")}catch(n){h=function(e,r,o){return e[r]=o}}function P(n,t,e,r){var o=t&&t.prototype instanceof w?t:w,a=Object.create(o.prototype),l=new z(r||[]);return b(a,"_invoke",{value:K(n,e,l)}),a}function j(n,t,e){try{return{type:"normal",arg:n.call(t,e)}}catch(r){return{type:"throw",arg:r}}}i.wrap=P;var O="suspendedStart",C="suspendedYield",D="executing",E="completed",f={};function w(){}function L(){}function m(){}var x={};h(x,A,function(){return this});var F=Object.getPrototypeOf,R=F&&F(F(V([])));R&&R!==y&&d.call(R,A)&&(x=R);var _=m.prototype=w.prototype=Object.create(x);function Y(n){["next","throw","return"].forEach(function(t){h(n,t,function(e){return this._invoke(t,e)})})}function k(n,t){function e(o,a,l,s){var p=j(n[o],n,a);if(p.type!=="throw"){var T=p.arg,U=T.value;return U&&typeof U=="object"&&d.call(U,"__await")?t.resolve(U.__await).then(function(M){e("next",M,l,s)},function(M){e("throw",M,l,s)}):t.resolve(U).then(function(M){T.value=M,l(T)},function(M){return e("throw",M,l,s)})}s(p.arg)}var r;b(this,"_invoke",{value:function(a,l){function s(){return new t(function(p,T){e(a,l,p,T)})}return r=r?r.then(s,s):s()}})}function K(n,t,e){var r=O;return function(o,a){if(r===D)throw new Error("Generator is already running");if(r===E){if(o==="throw")throw a;return{value:c,done:!0}}for(e.method=o,e.arg=a;;){var l=e.delegate;if(l){var s=S(l,e);if(s){if(s===f)continue;return s}}if(e.method==="next")e.sent=e._sent=e.arg;else if(e.method==="throw"){if(r===O)throw r=E,e.arg;e.dispatchException(e.arg)}else e.method==="return"&&e.abrupt("return",e.arg);r=D;var p=j(n,t,e);if(p.type==="normal"){if(r=e.done?E:C,p.arg===f)continue;return{value:p.arg,done:e.done}}p.type==="throw"&&(r=E,e.method="throw",e.arg=p.arg)}}}function S(n,t){var e=t.method,r=n.iterator[e];if(r===c)return t.delegate=null,e==="throw"&&n.iterator.return&&(t.method="return",t.arg=c,S(n,t),t.method==="throw")||e!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+e+"' method")),f;var o=j(r,n.iterator,t.arg);if(o.type==="throw")return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[n.resultName]=a.value,t.next=n.nextLoc,t.method!=="return"&&(t.method="next",t.arg=c),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function Q(n){var t={tryLoc:n[0]};1 in n&&(t.catchLoc=n[1]),2 in n&&(t.finallyLoc=n[2],t.afterLoc=n[3]),this.tryEntries.push(t)}function J(n){var t=n.completion||{};t.type="normal",delete t.arg,n.completion=t}function z(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(Q,this),this.reset(!0)}function V(n){if(n||n===""){var t=n[A];if(t)return t.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var e=-1,r=function o(){for(;++e<n.length;)if(d.call(n,e))return o.value=n[e],o.done=!1,o;return o.value=c,o.done=!0,o};return r.next=r}}throw new TypeError(typeof n+" is not iterable")}return L.prototype=m,b(_,"constructor",{value:m,configurable:!0}),b(m,"constructor",{value:L,configurable:!0}),L.displayName=h(m,I,"GeneratorFunction"),i.isGeneratorFunction=function(n){var t=typeof n=="function"&&n.constructor;return!!t&&(t===L||(t.displayName||t.name)==="GeneratorFunction")},i.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,m):(n.__proto__=m,h(n,I,"GeneratorFunction")),n.prototype=Object.create(_),n},i.awrap=function(n){return{__await:n}},Y(k.prototype),h(k.prototype,G,function(){return this}),i.AsyncIterator=k,i.async=function(n,t,e,r,o){o===void 0&&(o=Promise);var a=new k(P(n,t,e,r),o);return i.isGeneratorFunction(t)?a:a.next().then(function(l){return l.done?l.value:a.next()})},Y(_),h(_,I,"Generator"),h(_,A,function(){return this}),h(_,"toString",function(){return"[object Generator]"}),i.keys=function(n){var t=Object(n),e=[];for(var r in t)e.push(r);return e.reverse(),function o(){for(;e.length;){var a=e.pop();if(a in t)return o.value=a,o.done=!1,o}return o.done=!0,o}},i.values=V,z.prototype={constructor:z,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(J),!t)for(var e in this)e.charAt(0)==="t"&&d.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(T,U){return l.type="throw",l.arg=t,e.next=T,U&&(e.method="next",e.arg=c),!!U}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],l=a.completion;if(a.tryLoc==="root")return r("end");if(a.tryLoc<=this.prev){var s=d.call(a,"catchLoc"),p=d.call(a,"finallyLoc");if(s&&p){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!p)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&d.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(t==="break"||t==="continue")&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(l)},complete:function(t,e){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),J(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if(o.type==="throw"){var a=o.arg;J(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:V(t),resultName:e,nextLoc:r},this.method==="next"&&(this.arg=c),f}},i}var pt=function(i){var y=i.user,d=i.account,b=i.globalSetting,N=i.loading,A=i.dispatch,G=i.visible,I=i.onClose,h=Object(X.useState)(),P=Object(ot.a)(h,2),j=P[0],O=P[1],C=Object(X.useRef)();Object(X.useEffect)(function(){if(G){var w;O("".concat(it.a.IMG_SERVER,"/images/").concat((w=y.userInfo)===null||w===void 0?void 0:w.image_url))}},[y.userInfo,G]);var D=function(L){var m,x;if(L.dataTransfer?x=L.dataTransfer.files:L.target&&(x=L.target.files),!((m=x)===null||m===void 0?void 0:m.length))return;var F=x[0];if(!/^image\/\w+/.test(F.type)){q.b.info("\u8BF7\u9009\u62E9\u4E00\u4E2A\u56FE\u7247\u683C\u5F0F\u7684\u6587\u4EF6");return}if(F.size>2*1024*1024){q.b.info("\u4EC5\u652F\u6301\u6587\u4EF6\u5927\u5C0F\u5C0F\u4E8E2M\u7684\u6587\u4EF6");return}var R=new FileReader;R.onload=function(){O(R.result)},R.readAsDataURL(x[0])},E=function(){var w=Object(nt.a)(tt().mark(function L(){var m,x,F;return tt().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return x=C.current.getCroppedCanvas().toDataURL("image/jpeg"),x||q.b.info("\u8BF7\u5148\u4E0A\u4F20\u56FE\u7247"),_.next=4,A({type:"account/updateAvatar",payload:{image:x,login:(m=y.userInfo)===null||m===void 0?void 0:m.login}});case 4:F=_.sent,f(),F.status===0&&(q.b.info("\u4FEE\u6539\u5934\u50CF\u6210\u529F"),A({type:"user/getUserInfo"}));case 7:case"end":return _.stop()}},L)}));return function(){return w.apply(this,arguments)}}(),f=function(){I()};return u.a.createElement(ut.a,{centered:!0,keyboard:!1,closable:!1,visible:G,title:"\u4E0A\u4F20\u5934\u50CF",width:550,forceRender:!0,confirmLoading:N["account/updateAvatar"],onOk:E,onCancel:f},u.a.createElement(lt.a,{spinning:!!N["account/updateAvatar"]},u.a.createElement("div",{className:W.a.modal},u.a.createElement("div",null,u.a.createElement("div",{className:W.a.avatarWrap},u.a.createElement(dt.a,{style:{height:320,width:320},ref:C,src:j,guides:!1,aspectRatio:1,preview:"#updateAvatarImg"})),u.a.createElement("span",{className:W.a.tip},"\u4EC5\u652F\u6301JPG\u3001GIF\u3001PNG\uFF0C\u4E14\u6587\u4EF6\u5C0F\u4E8E2M")),u.a.createElement("div",{className:W.a.previewWrap},u.a.createElement("div",null,u.a.createElement("div",{className:W.a.previewImg,id:"updateAvatarImg"}),u.a.createElement("div",{className:"".concat(W.a.tip," tc")},"\u5934\u50CF\u9884\u89C8")),u.a.createElement("label",{className:W.a.uploadButton,id:"uploadBtn",htmlFor:"inputImage"},u.a.createElement("input",{type:"file",className:"sr-only",id:"inputImage",name:"file",accept:"image/*",style:{display:"none"},onChange:D}),"\u70B9\u51FB\u4E0A\u4F20")))))},ht=Object($.a)(function(c){var i=c.user,y=c.account,d=c.loading,b=c.globalSetting;return{user:i,account:y,globalSetting:b,loading:d.effects}})(pt),vt=v("10oi"),g=v.n(vt),B=function(c){return c.Profile="profile",c.Certification="certification",c.Secure="secure",c.Group="teach-group",c.Binding="binding",c.Results="Results",c}(B||{}),mt=function(i){var y,d,b,N,A,G,I,h,P,j,O,C,D,E=i.user,f=i.account,w=i.globalSetting,L=i.loading,m=i.dispatch,x=Object(rt.a)(i,["user","account","globalSetting","loading","dispatch"]),F=Object(X.useState)(),R=Object(ot.a)(F,2),_=R[0],Y=R[1],k=Object(at.l)();Object(X.useEffect)(function(){var S,Q=(S=k.pathname.split("/"))===null||S===void 0?void 0:S[2];Y(Q)},[k.pathname]);var K="".concat(it.a.IMG_SERVER,"/images/").concat((y=E.userInfo)===null||y===void 0?void 0:y.image_url);return u.a.createElement("section",{className:g.a.wrap},u.a.createElement("div",{className:g.a.avatarWrap},u.a.createElement("div",{className:g.a.avatar},u.a.createElement("div",{className:g.a.updateAvatarWrap},u.a.createElement("img",{className:g.a.img,src:K}),u.a.createElement("div",{className:g.a.updateAvatar,onClick:function(){m({type:"account/setActionTabs",payload:{key:"Account-UpdateAvatar"}})}},"\u4FEE\u6539\u5934\u50CF"))),u.a.createElement("span",{className:g.a.name,title:(d=E.userInfo)===null||d===void 0?void 0:d.username},((b=E.userInfo)===null||b===void 0||((N=b.username)===null||N===void 0)?void 0:N.length)>6?((A=E.userInfo)===null||A===void 0||((G=A.username)===null||G===void 0)?void 0:G.substr(0,6))+"...":(I=E.userInfo)===null||I===void 0?void 0:I.username),u.a.createElement("span",{className:g.a.role},(h=E.userInfo)===null||h===void 0?void 0:h.user_identity)),u.a.createElement("div",null,u.a.createElement("div",{className:g.a.title},"\u8D26\u53F7\u7BA1\u7406"),u.a.createElement("ul",{className:"pl0"},u.a.createElement("li",{className:"".concat(g.a.item," ").concat(_===B.Profile?g.a.active:""),onClick:function(){return $.c.push("/account/".concat(B.Profile))}},u.a.createElement("span",null,u.a.createElement("i",{className:"iconfont icon-jibenxinxi font16 mr5 ".concat(g.a.colorGary)}),"\u57FA\u672C\u4FE1\u606F"),u.a.createElement("i",{className:"iconfont font16 mr25 ".concat(((P=f.basicInfo)===null||P===void 0?void 0:P.base_info_completed)?"".concat(g.a.colorGreen," icon-wancheng"):"".concat(g.a.colorRed," icon-tishi"))})),u.a.createElement("li",{className:"".concat(g.a.item," ").concat(_===B.Certification?g.a.active:""),onClick:function(){return $.c.push("/account/".concat(B.Certification))}},u.a.createElement("span",null,u.a.createElement("i",{className:"iconfont icon-renzhengxinxi font16 mr5 ".concat(g.a.colorGary)}),"\u8BA4\u8BC1\u4FE1\u606F"),u.a.createElement("i",{className:"iconfont font16 mr25 ".concat(((j=f.basicInfo)===null||j===void 0?void 0:j.professional_certification)==="certified"&&((O=f.basicInfo)===null||O===void 0?void 0:O.authentication)==="certified"?"".concat(g.a.colorGreen," icon-wancheng"):"".concat(g.a.colorRed," icon-tishi"))})),u.a.createElement("li",{className:"".concat(g.a.item," ").concat(_===B.Secure?g.a.active:""),onClick:function(){return $.c.push("/account/".concat(B.Secure))}},u.a.createElement("span",null,u.a.createElement("i",{className:"iconfont icon-anquanshezhi font16 mr5 ".concat(g.a.colorGary)}),"\u5B89\u5168\u8BBE\u7F6E")),!(w==null||((C=w.setting)===null||C===void 0)?void 0:C.is_local)&&u.a.createElement("li",{className:"".concat(g.a.item," ").concat(_===B.Binding?g.a.active:""),onClick:function(){return $.c.push("/account/".concat(B.Binding))}},u.a.createElement("span",null,u.a.createElement("i",{className:"iconfont icon-lianjie font16 mr5 ".concat(g.a.colorGary)}),"\u7ED1\u5B9A\u767B\u5F55\u8D26\u53F7")))),u.a.createElement(ht,{visible:((D=f.actionTabs)===null||D===void 0?void 0:D.key)==="Account-UpdateAvatar",onClose:function(){m({type:"account/setActionTabs"})}}))},gt=Object($.a)(function(c){var i=c.user,y=c.account,d=c.loading,b=c.globalSetting;return{user:i,account:y,globalSetting:b,loading:d.models.index}})(mt),Et=v("n6JY"),ct=v.n(Et);function et(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */et=function(){return i};var c,i={},y=Object.prototype,d=y.hasOwnProperty,b=Object.defineProperty||function(n,t,e){n[t]=e.value},N=typeof Symbol=="function"?Symbol:{},A=N.iterator||"@@iterator",G=N.asyncIterator||"@@asyncIterator",I=N.toStringTag||"@@toStringTag";function h(n,t,e){return Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),n[t]}try{h({},"")}catch(n){h=function(e,r,o){return e[r]=o}}function P(n,t,e,r){var o=t&&t.prototype instanceof w?t:w,a=Object.create(o.prototype),l=new z(r||[]);return b(a,"_invoke",{value:K(n,e,l)}),a}function j(n,t,e){try{return{type:"normal",arg:n.call(t,e)}}catch(r){return{type:"throw",arg:r}}}i.wrap=P;var O="suspendedStart",C="suspendedYield",D="executing",E="completed",f={};function w(){}function L(){}function m(){}var x={};h(x,A,function(){return this});var F=Object.getPrototypeOf,R=F&&F(F(V([])));R&&R!==y&&d.call(R,A)&&(x=R);var _=m.prototype=w.prototype=Object.create(x);function Y(n){["next","throw","return"].forEach(function(t){h(n,t,function(e){return this._invoke(t,e)})})}function k(n,t){function e(o,a,l,s){var p=j(n[o],n,a);if(p.type!=="throw"){var T=p.arg,U=T.value;return U&&typeof U=="object"&&d.call(U,"__await")?t.resolve(U.__await).then(function(M){e("next",M,l,s)},function(M){e("throw",M,l,s)}):t.resolve(U).then(function(M){T.value=M,l(T)},function(M){return e("throw",M,l,s)})}s(p.arg)}var r;b(this,"_invoke",{value:function(a,l){function s(){return new t(function(p,T){e(a,l,p,T)})}return r=r?r.then(s,s):s()}})}function K(n,t,e){var r=O;return function(o,a){if(r===D)throw new Error("Generator is already running");if(r===E){if(o==="throw")throw a;return{value:c,done:!0}}for(e.method=o,e.arg=a;;){var l=e.delegate;if(l){var s=S(l,e);if(s){if(s===f)continue;return s}}if(e.method==="next")e.sent=e._sent=e.arg;else if(e.method==="throw"){if(r===O)throw r=E,e.arg;e.dispatchException(e.arg)}else e.method==="return"&&e.abrupt("return",e.arg);r=D;var p=j(n,t,e);if(p.type==="normal"){if(r=e.done?E:C,p.arg===f)continue;return{value:p.arg,done:e.done}}p.type==="throw"&&(r=E,e.method="throw",e.arg=p.arg)}}}function S(n,t){var e=t.method,r=n.iterator[e];if(r===c)return t.delegate=null,e==="throw"&&n.iterator.return&&(t.method="return",t.arg=c,S(n,t),t.method==="throw")||e!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+e+"' method")),f;var o=j(r,n.iterator,t.arg);if(o.type==="throw")return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[n.resultName]=a.value,t.next=n.nextLoc,t.method!=="return"&&(t.method="next",t.arg=c),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function Q(n){var t={tryLoc:n[0]};1 in n&&(t.catchLoc=n[1]),2 in n&&(t.finallyLoc=n[2],t.afterLoc=n[3]),this.tryEntries.push(t)}function J(n){var t=n.completion||{};t.type="normal",delete t.arg,n.completion=t}function z(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(Q,this),this.reset(!0)}function V(n){if(n||n===""){var t=n[A];if(t)return t.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var e=-1,r=function o(){for(;++e<n.length;)if(d.call(n,e))return o.value=n[e],o.done=!1,o;return o.value=c,o.done=!0,o};return r.next=r}}throw new TypeError(typeof n+" is not iterable")}return L.prototype=m,b(_,"constructor",{value:m,configurable:!0}),b(m,"constructor",{value:L,configurable:!0}),L.displayName=h(m,I,"GeneratorFunction"),i.isGeneratorFunction=function(n){var t=typeof n=="function"&&n.constructor;return!!t&&(t===L||(t.displayName||t.name)==="GeneratorFunction")},i.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,m):(n.__proto__=m,h(n,I,"GeneratorFunction")),n.prototype=Object.create(_),n},i.awrap=function(n){return{__await:n}},Y(k.prototype),h(k.prototype,G,function(){return this}),i.AsyncIterator=k,i.async=function(n,t,e,r,o){o===void 0&&(o=Promise);var a=new k(P(n,t,e,r),o);return i.isGeneratorFunction(t)?a:a.next().then(function(l){return l.done?l.value:a.next()})},Y(_),h(_,I,"Generator"),h(_,A,function(){return this}),h(_,"toString",function(){return"[object Generator]"}),i.keys=function(n){var t=Object(n),e=[];for(var r in t)e.push(r);return e.reverse(),function o(){for(;e.length;){var a=e.pop();if(a in t)return o.value=a,o.done=!1,o}return o.done=!0,o}},i.values=V,z.prototype={constructor:z,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(J),!t)for(var e in this)e.charAt(0)==="t"&&d.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(T,U){return l.type="throw",l.arg=t,e.next=T,U&&(e.method="next",e.arg=c),!!U}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],l=a.completion;if(a.tryLoc==="root")return r("end");if(a.tryLoc<=this.prev){var s=d.call(a,"catchLoc"),p=d.call(a,"finallyLoc");if(s&&p){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!p)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&d.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(t==="break"||t==="continue")&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(l)},complete:function(t,e){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),J(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if(o.type==="throw"){var a=o.arg;J(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:V(t),resultName:e,nextLoc:r},this.method==="next"&&(this.arg=c),f}},i}var _t=function(i){var y,d=i.user,b=i.account,N=i.globalSetting,A=i.loading,G=i.dispatch,I=Object(rt.a)(i,["user","account","globalSetting","loading","dispatch"]),h=Object(at.l)();return Object(X.useEffect)(function(){var P;if(!((P=d.userInfo)===null||P===void 0?void 0:P.login))return;Object(nt.a)(et().mark(function j(){var O,C;return et().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,G({type:"account/getBasicInfo",payload:{login:(O=d.userInfo)===null||O===void 0?void 0:O.login}});case 2:C=E.sent,(C==null?void 0:C.base_info_completed)||(localStorage.getItem("Noviceguide")==="0"||G({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5E95\u90E8\u5F39\u7A97",type:3,text:u.a.createElement("div",null,"\u8BF7\u60A8\u5B8C\u5584\u4E00\u4E0B\u5E73\u53F0\u7684\u57FA\u672C\u4FE1\u606F\uFF0C\u5305\u62EC\uFF1A\u6635\u79F0\u3001\u804C\u4E1A\u3001\u5B66\u6821/\u5355\u4F4D\uFF0C \u70B9\u51FB\u4FDD\u5B58")}}),$.c.push("/account/profile/edit"));case 4:case"end":return E.stop()}},j)}))()},[(y=d.userInfo)===null||y===void 0?void 0:y.login]),u.a.createElement("section",{className:ct.a.bg},u.a.createElement("div",{className:ct.a.wrap},u.a.createElement(gt,null),I.children))},xt=Z.default=Object($.a)(function(c){var i=c.user,y=c.account,d=c.loading,b=c.globalSetting;return{user:i,account:y,globalSetting:b,loading:d.models.index}})(_t)},n6JY:function(H,Z,v){H.exports={bg:"bg___wq3H6",wrap:"wrap___13xuI"}}}]);