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