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.b8758178.async.js

2 lines
22 KiB

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