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