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.01fc71d7.async.js

2 lines
21 KiB

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