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.
2 lines
21 KiB
2 lines
21 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{"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 tt=v("9og8"),et=v("PpiC"),x=v("q1tI"),u=v.n(x),X=v("9kvl"),rt=v("tJVT"),ot=v("Ty5D"),nt=v("m3rI"),_t=v("2qtc"),it=v("kLXV"),Et=v("T2oS"),ct=v("W9HT"),yt=v("miYZ"),H=v("tsqr"),ut=v("wyMu"),st=v.n(ut),lt=v("5sM0"),W=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 c};var c={},d=Object.prototype,f=d.hasOwnProperty,E=typeof Symbol=="function"?Symbol:{},b=E.iterator||"@@iterator",M=E.asyncIterator||"@@asyncIterator",T=E.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 P?t:P,o=Object.create(a.prototype),s=new C(n||[]);return o._invoke=function(_,L,i){var p="suspendedStart";return function(A,Z){if(p==="executing")throw new Error("Generator is already running");if(p==="completed"){if(A==="throw")throw Z;return V()}for(i.method=A,i.arg=Z;;){var K=i.delegate;if(K){var Y=S(K,i);if(Y){if(Y===h)continue;return Y}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(p==="suspendedStart")throw p="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);p="executing";var k=I(_,L,i);if(k.type==="normal"){if(p=i.done?"completed":"suspendedYield",k.arg===h)continue;return{value:k.arg,done:i.done}}k.type==="throw"&&(p="completed",i.method="throw",i.arg=k.arg)}}}(e,r,s),o}function I(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}c.wrap=G;var h={};function P(){}function w(){}function R(){}var O={};l(O,b,function(){return this});var B=Object.getPrototypeOf,j=B&&B(B($([])));j&&j!==d&&f.call(j,b)&&(O=j);var g=R.prototype=P.prototype=Object.create(O);function N(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,_){var L=I(e[a],e,o);if(L.type!=="throw"){var i=L.arg,p=i.value;return p&&typeof p=="object"&&f.call(p,"__await")?t.resolve(p.__await).then(function(A){r("next",A,s,_)},function(A){r("throw",A,s,_)}):t.resolve(p).then(function(A){i.value=A,s(i)},function(A){return r("throw",A,s,_)})}_(L.arg)}var n;this._invoke=function(a,o){function s(){return new t(function(_,L){r(a,o,_,L)})}return n=n?n.then(s,s):s()}}function S(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,S(e,t),t.method==="throw"))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=I(r,e.iterator,t.arg);if(n.type==="throw")return t.method="throw",t.arg=n.arg,t.delegate=null,h;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,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}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 y(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function $(e){if(e){var t=e[b];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(f.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:V}}function V(){return{value:void 0,done:!0}}return w.prototype=R,l(g,"constructor",R),l(R,"constructor",w),w.displayName=l(R,T,"GeneratorFunction"),c.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return!!t&&(t===w||(t.displayName||t.name)==="GeneratorFunction")},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,R):(e.__proto__=R,l(e,T,"GeneratorFunction")),e.prototype=Object.create(g),e},c.awrap=function(e){return{__await:e}},N(U.prototype),l(U.prototype,M,function(){return this}),c.AsyncIterator=U,c.async=function(e,t,r,n,a){a===void 0&&(a=Promise);var o=new U(G(e,t,r,n),a);return c.isGeneratorFunction(t)?o:o.next().then(function(s){return s.done?s.value:o.next()})},N(g),l(g,T,"Generator"),l(g,b,function(){return this}),l(g,"toString",function(){return"[object Generator]"}),c.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}},c.values=$,C.prototype={constructor:C,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(y),!t)for(var r in this)r.charAt(0)==="t"&&f.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,p){return s.type="throw",s.arg=t,r.next=i,p&&(r.method="next",r.arg=void 0),!!p}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 _=f.call(o,"catchLoc"),L=f.call(o,"finallyLoc");if(_&&L){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(_){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&&f.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,h):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),h},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),y(n),h}},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;y(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),h}},c}var dt=function(d){var f=d.user,E=d.account,b=d.globalSetting,M=d.loading,T=d.dispatch,l=d.visible,G=d.onClose,I=Object(x.useState)(),h=Object(rt.a)(I,2),P=h[0],w=h[1],R=Object(x.useRef)();Object(x.useEffect)(function(){if(l){var g;w("".concat(nt.a.IMG_SERVER,"/images/").concat((g=f.userInfo)===null||g===void 0?void 0:g.image_url))}},[f.userInfo,l]);var O=function(N){var U,S;if(N.dataTransfer?S=N.dataTransfer.files:N.target&&(S=N.target.files),!((U=S)===null||U===void 0?void 0:U.length))return;var D=S[0];if(!/^image\/\w+/.test(D.type)){H.b.info("\u8BF7\u9009\u62E9\u4E00\u4E2A\u56FE\u7247\u683C\u5F0F\u7684\u6587\u4EF6");return}if(D.size>2*1024*1024){H.b.info("\u4EC5\u652F\u6301\u6587\u4EF6\u5927\u5C0F\u5C0F\u4E8E2M\u7684\u6587\u4EF6");return}var y=new FileReader;y.onload=function(){w(y.result)},y.readAsDataURL(S[0])},B=function(){var g=Object(tt.a)(Q().mark(function N(){var U,S,D;return Q().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return S=R.current.getCroppedCanvas().toDataURL("image/jpeg"),S||H.b.info("\u8BF7\u5148\u4E0A\u4F20\u56FE\u7247"),C.next=4,T({type:"account/updateAvatar",payload:{image:S,login:(U=f.userInfo)===null||U===void 0?void 0:U.login}});case 4:D=C.sent,j(),D.status===0&&(H.b.info("\u4FEE\u6539\u5934\u50CF\u6210\u529F"),T({type:"user/getUserInfo"}));case 7:case"end":return C.stop()}},N)}));return function(){return g.apply(this,arguments)}}(),j=function(){G()};return u.a.createElement(it.a,{centered:!0,keyboard:!1,closable:!1,visible:l,title:"\u4E0A\u4F20\u5934\u50CF",width:550,forceRender:!0,confirmLoading:M["account/updateAvatar"],onOk:B,onCancel:j},u.a.createElement(ct.a,{spinning:!!M["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(st.a,{style:{height:320,width:320},ref:R,src:P,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:O}),"\u70B9\u51FB\u4E0A\u4F20")))))},ft=Object(X.a)(function(c){var d=c.user,f=c.account,E=c.loading,b=c.globalSetting;return{user:d,account:f,globalSetting:b,loading:E.effects}})(dt),pt=v("10oi"),m=v.n(pt),F;(function(c){c.Profile="profile",c.Certification="certification",c.Secure="secure",c.Group="teach-group",c.Binding="binding",c.Results="Results"})(F||(F={}));var ht=function(d){var f,E,b,M,T,l,G,I,h=d.user,P=d.account,w=d.globalSetting,R=d.loading,O=d.dispatch,B=Object(et.a)(d,["user","account","globalSetting","loading","dispatch"]),j=Object(x.useState)(),g=Object(rt.a)(j,2),N=g[0],U=g[1],S=Object(ot.l)();Object(x.useEffect)(function(){var y,C=(y=S.pathname.split("/"))===null||y===void 0?void 0:y[2];U(C)},[S.pathname]);var D="".concat(nt.a.IMG_SERVER,"/images/").concat((f=h.userInfo)===null||f===void 0?void 0:f.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:D}),u.a.createElement("div",{className:m.a.updateAvatar,onClick:function(){O({type:"account/setActionTabs",payload:{key:"Account-UpdateAvatar"}})}},"\u4FEE\u6539\u5934\u50CF"))),u.a.createElement("span",{className:m.a.name},(E=h.userInfo)===null||E===void 0?void 0:E.username),u.a.createElement("span",{className:m.a.role},(b=h.userInfo)===null||b===void 0?void 0:b.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(N===F.Profile?m.a.active:""),onClick:function(){return X.c.push("/account/".concat(F.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(((M=P.basicInfo)===null||M===void 0?void 0:M.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(N===F.Certification?m.a.active:""),onClick:function(){return X.c.push("/account/".concat(F.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(((T=P.basicInfo)===null||T===void 0?void 0:T.professional_certification)==="certified"&&((l=P.basicInfo)===null||l===void 0?void 0:l.authentication)==="certified"?"".concat(m.a.colorGreen," icon-wancheng"):"".concat(m.a.colorRed," icon-tishi"))})),u.a.createElement("li",{className:"".concat(m.a.item," ").concat(N===F.Secure?m.a.active:""),onClick:function(){return X.c.push("/account/".concat(F.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||((G=w.setting)===null||G===void 0)?void 0:G.is_local)&&u.a.createElement("li",{className:"".concat(m.a.item," ").concat(N===F.Binding?m.a.active:""),onClick:function(){return X.c.push("/account/".concat(F.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(ft,{visible:((I=P.actionTabs)===null||I===void 0?void 0:I.key)==="Account-UpdateAvatar",onClose:function(){O({type:"account/setActionTabs"})}}))},vt=Object(X.a)(function(c){var d=c.user,f=c.account,E=c.loading,b=c.globalSetting;return{user:d,account:f,globalSetting:b,loading:E.models.index}})(ht),mt=v("n6JY"),at=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 c};var c={},d=Object.prototype,f=d.hasOwnProperty,E=typeof Symbol=="function"?Symbol:{},b=E.iterator||"@@iterator",M=E.asyncIterator||"@@asyncIterator",T=E.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 P?t:P,o=Object.create(a.prototype),s=new C(n||[]);return o._invoke=function(_,L,i){var p="suspendedStart";return function(A,Z){if(p==="executing")throw new Error("Generator is already running");if(p==="completed"){if(A==="throw")throw Z;return V()}for(i.method=A,i.arg=Z;;){var K=i.delegate;if(K){var Y=S(K,i);if(Y){if(Y===h)continue;return Y}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(p==="suspendedStart")throw p="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);p="executing";var k=I(_,L,i);if(k.type==="normal"){if(p=i.done?"completed":"suspendedYield",k.arg===h)continue;return{value:k.arg,done:i.done}}k.type==="throw"&&(p="completed",i.method="throw",i.arg=k.arg)}}}(e,r,s),o}function I(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}c.wrap=G;var h={};function P(){}function w(){}function R(){}var O={};l(O,b,function(){return this});var B=Object.getPrototypeOf,j=B&&B(B($([])));j&&j!==d&&f.call(j,b)&&(O=j);var g=R.prototype=P.prototype=Object.create(O);function N(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,_){var L=I(e[a],e,o);if(L.type!=="throw"){var i=L.arg,p=i.value;return p&&typeof p=="object"&&f.call(p,"__await")?t.resolve(p.__await).then(function(A){r("next",A,s,_)},function(A){r("throw",A,s,_)}):t.resolve(p).then(function(A){i.value=A,s(i)},function(A){return r("throw",A,s,_)})}_(L.arg)}var n;this._invoke=function(a,o){function s(){return new t(function(_,L){r(a,o,_,L)})}return n=n?n.then(s,s):s()}}function S(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,S(e,t),t.method==="throw"))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=I(r,e.iterator,t.arg);if(n.type==="throw")return t.method="throw",t.arg=n.arg,t.delegate=null,h;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,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}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 y(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function $(e){if(e){var t=e[b];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(f.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:V}}function V(){return{value:void 0,done:!0}}return w.prototype=R,l(g,"constructor",R),l(R,"constructor",w),w.displayName=l(R,T,"GeneratorFunction"),c.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return!!t&&(t===w||(t.displayName||t.name)==="GeneratorFunction")},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,R):(e.__proto__=R,l(e,T,"GeneratorFunction")),e.prototype=Object.create(g),e},c.awrap=function(e){return{__await:e}},N(U.prototype),l(U.prototype,M,function(){return this}),c.AsyncIterator=U,c.async=function(e,t,r,n,a){a===void 0&&(a=Promise);var o=new U(G(e,t,r,n),a);return c.isGeneratorFunction(t)?o:o.next().then(function(s){return s.done?s.value:o.next()})},N(g),l(g,T,"Generator"),l(g,b,function(){return this}),l(g,"toString",function(){return"[object Generator]"}),c.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}},c.values=$,C.prototype={constructor:C,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(y),!t)for(var r in this)r.charAt(0)==="t"&&f.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,p){return s.type="throw",s.arg=t,r.next=i,p&&(r.method="next",r.arg=void 0),!!p}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 _=f.call(o,"catchLoc"),L=f.call(o,"finallyLoc");if(_&&L){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(_){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&&f.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,h):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),h},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),y(n),h}},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;y(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),h}},c}var gt=function(d){var f,E=d.user,b=d.account,M=d.globalSetting,T=d.loading,l=d.dispatch,G=Object(et.a)(d,["user","account","globalSetting","loading","dispatch"]);return Object(x.useEffect)(function(){var I;if(!((I=E.userInfo)===null||I===void 0?void 0:I.login))return;Object(tt.a)(q().mark(function h(){var P,w;return q().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,l({type:"account/getBasicInfo",payload:{login:(P=E.userInfo)===null||P===void 0?void 0:P.login}});case 2:w=O.sent,(w==null?void 0:w.base_info_completed)||X.c.push("/account/profile/edit");case 4:case"end":return O.stop()}},h)}))()},[(f=E.userInfo)===null||f===void 0?void 0:f.login]),u.a.createElement("section",{className:at.a.bg},u.a.createElement("div",{className:at.a.wrap},u.a.createElement(vt,null),G.children))},wt=z.default=Object(X.a)(function(c){var d=c.user,f=c.account,E=c.loading,b=c.globalSetting;return{user:d,account:f,globalSetting:b,loading:E.models.index}})(gt)},n6JY:function(J,z,v){J.exports={bg:"bg___wq3H6",wrap:"wrap___13xuI"}}}]);
|