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.
1 line
21 KiB
1 line
21 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[25],{"10oi":function(t,e,r){t.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(t,e,r){t.exports={modal:"modal___2DX0z",avatarWrap:"avatarWrap___2lmFf",tip:"tip___220u_",previewWrap:"previewWrap___2BJLo",previewImg:"previewImg___29S6d",uploadButton:"uploadButton___30_6b"}},m3a9:function(t,e,r){"use strict";r.r(e);var n=r("9og8"),a=r("PpiC"),o=r("q1tI"),i=r.n(o),c=r("9kvl"),l=r("tJVT"),u=r("Ty5D"),s=r("m3rI"),f=(r("2qtc"),r("kLXV")),h=(r("T2oS"),r("W9HT")),p=(r("miYZ"),r("tsqr")),v=r("wyMu"),d=r.n(v),m=r("5sM0"),g=r.n(m);r("YQfW");function y(){y=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(I){l=function(t,e,r){return t[e]=r}}function u(t,e,r,a){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),c=new O(a||[]);return n(i,"_invoke",{value:E(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=u;var f={};function h(){}function p(){}function v(){}var d={};l(d,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(j([])));g&&g!==e&&r.call(g,o)&&(d=g);var w=v.prototype=h.prototype=Object.create(d);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function a(n,o,i,c){var l=s(t[n],t,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){a("next",t,i,c)}),(function(t){a("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return a("throw",t,i,c)}))}c(l.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){a(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function E(t,e,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,f;var o=a.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:p,configurable:!0}),p.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new b(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(w),l(w,c,"Generator"),l(w,o,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=j,O.prototype={constructor:O,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(N),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){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,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},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),N(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var w,_=function(t){var e=t.user,r=(t.account,t.globalSetting,t.loading),a=t.dispatch,c=t.visible,u=t.onClose,v=Object(o["useState"])(),m=Object(l["a"])(v,2),w=m[0],_=m[1],b=Object(o["useRef"])();Object(o["useEffect"])((function(){var t;c&&_("".concat(s["a"].IMG_SERVER,"/images/").concat(null===(t=e.userInfo)||void 0===t?void 0:t.image_url))}),[e.userInfo,c]);var E=function(t){var e,r;if(t.dataTransfer?r=t.dataTransfer.files:t.target&&(r=t.target.files),null===(e=r)||void 0===e?void 0:e.length){var n=r[0];if(/^image\/\w+/.test(n.type))if(n.size>2097152)p["b"].info("\u4ec5\u652f\u6301\u6587\u4ef6\u5927\u5c0f\u5c0f\u4e8e2M\u7684\u6587\u4ef6");else{var a=new FileReader;a.onload=function(){_(a.result)},a.readAsDataURL(r[0])}else p["b"].info("\u8bf7\u9009\u62e9\u4e00\u4e2a\u56fe\u7247\u683c\u5f0f\u7684\u6587\u4ef6")}},x=function(){var t=Object(n["a"])(y().mark((function t(){var r,n,o;return y().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=b.current.getCroppedCanvas().toDataURL("image/jpeg"),n||p["b"].info("\u8bf7\u5148\u4e0a\u4f20\u56fe\u7247"),t.next=4,a({type:"account/updateAvatar",payload:{image:n,login:null===(r=e.userInfo)||void 0===r?void 0:r.login}});case 4:o=t.sent,L(),0===o.status&&(p["b"].info("\u4fee\u6539\u5934\u50cf\u6210\u529f"),a({type:"user/getUserInfo"}));case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),L=function(){u()};return i.a.createElement(f["a"],{centered:!0,keyboard:!1,closable:!1,visible:c,title:"\u4e0a\u4f20\u5934\u50cf",width:550,forceRender:!0,confirmLoading:r["account/updateAvatar"],onOk:x,onCancel:L},i.a.createElement(h["a"],{spinning:!!r["account/updateAvatar"]},i.a.createElement("div",{className:g.a.modal},i.a.createElement("div",null,i.a.createElement("div",{className:g.a.avatarWrap},i.a.createElement(d.a,{style:{height:320,width:320},ref:b,src:w,guides:!1,aspectRatio:1,preview:"#updateAvatarImg"})),i.a.createElement("span",{className:g.a.tip},"\u4ec5\u652f\u6301JPG\u3001GIF\u3001PNG\uff0c\u4e14\u6587\u4ef6\u5c0f\u4e8e2M")),i.a.createElement("div",{className:g.a.previewWrap},i.a.createElement("div",null,i.a.createElement("div",{className:g.a.previewImg,id:"updateAvatarImg"}),i.a.createElement("div",{className:"".concat(g.a.tip," tc")},"\u5934\u50cf\u9884\u89c8")),i.a.createElement("label",{className:g.a.uploadButton,id:"uploadBtn",htmlFor:"inputImage"},i.a.createElement("input",{type:"file",className:"sr-only",id:"inputImage",name:"file",accept:"image/*",style:{display:"none"},onChange:E}),"\u70b9\u51fb\u4e0a\u4f20")))))},b=Object(c["a"])((function(t){var e=t.user,r=t.account,n=t.loading,a=t.globalSetting;return{user:e,account:r,globalSetting:a,loading:n.effects}}))(_),E=r("10oi"),x=r.n(E);(function(t){t["Profile"]="profile",t["Certification"]="certification",t["Secure"]="secure",t["Group"]="teach-group",t["Binding"]="binding",t["Results"]="Results"})(w||(w={}));var L=function(t){var e,r,n,f,h,p,v,d,m=t.user,g=t.account,y=t.globalSetting,_=(t.loading,t.dispatch),E=(Object(a["a"])(t,["user","account","globalSetting","loading","dispatch"]),Object(o["useState"])()),L=Object(l["a"])(E,2),N=L[0],O=L[1],j=Object(u["l"])();Object(o["useEffect"])((function(){var t,e=null===(t=j.pathname.split("/"))||void 0===t?void 0:t[2];O(e)}),[j.pathname]);var S="".concat(s["a"].IMG_SERVER,"/images/").concat(null===(e=m.userInfo)||void 0===e?void 0:e.image_url);return i.a.createElement("section",{className:x.a.wrap},i.a.createElement("div",{className:x.a.avatarWrap},i.a.createElement("div",{className:x.a.avatar},i.a.createElement("div",{className:x.a.updateAvatarWrap},i.a.createElement("img",{className:x.a.img,src:S}),i.a.createElement("div",{className:x.a.updateAvatar,onClick:function(){_({type:"account/setActionTabs",payload:{key:"Account-UpdateAvatar"}})}},"\u4fee\u6539\u5934\u50cf"))),i.a.createElement("span",{className:x.a.name},null===(r=m.userInfo)||void 0===r?void 0:r.username),i.a.createElement("span",{className:x.a.role},null===(n=m.userInfo)||void 0===n?void 0:n.user_identity)),i.a.createElement("div",null,i.a.createElement("div",{className:x.a.title},"\u8d26\u53f7\u7ba1\u7406"),i.a.createElement("ul",{className:"pl0"},i.a.createElement("li",{className:"".concat(x.a.item," ").concat(N===w.Profile?x.a.active:""),onClick:function(){return c["c"].push("/account/".concat(w.Profile))}},i.a.createElement("span",null,i.a.createElement("i",{className:"iconfont icon-jibenxinxi font16 mr5 ".concat(x.a.colorGary)}),"\u57fa\u672c\u4fe1\u606f"),i.a.createElement("i",{className:"iconfont font16 mr25 ".concat((null===(f=g.basicInfo)||void 0===f?void 0:f.base_info_completed)?"".concat(x.a.colorGreen," icon-wancheng"):"".concat(x.a.colorRed," icon-tishi"))})),i.a.createElement("li",{className:"".concat(x.a.item," ").concat(N===w.Certification?x.a.active:""),onClick:function(){return c["c"].push("/account/".concat(w.Certification))}},i.a.createElement("span",null,i.a.createElement("i",{className:"iconfont icon-renzhengxinxi font16 mr5 ".concat(x.a.colorGary)}),"\u8ba4\u8bc1\u4fe1\u606f"),i.a.createElement("i",{className:"iconfont font16 mr25 ".concat("certified"===(null===(h=g.basicInfo)||void 0===h?void 0:h.professional_certification)&&"certified"===(null===(p=g.basicInfo)||void 0===p?void 0:p.authentication)?"".concat(x.a.colorGreen," icon-wancheng"):"".concat(x.a.colorRed," icon-tishi"))})),i.a.createElement("li",{className:"".concat(x.a.item," ").concat(N===w.Secure?x.a.active:""),onClick:function(){return c["c"].push("/account/".concat(w.Secure))}},i.a.createElement("span",null,i.a.createElement("i",{className:"iconfont icon-anquanshezhi font16 mr5 ".concat(x.a.colorGary)}),"\u5b89\u5168\u8bbe\u7f6e")),!(null===y||void 0===y||null===(v=y.setting)||void 0===v?void 0:v.is_local)&&i.a.createElement("li",{className:"".concat(x.a.item," ").concat(N===w.Binding?x.a.active:""),onClick:function(){return c["c"].push("/account/".concat(w.Binding))}},i.a.createElement("span",null,i.a.createElement("i",{className:"iconfont icon-lianjie font16 mr5 ".concat(x.a.colorGary)}),"\u7ed1\u5b9a\u767b\u5f55\u8d26\u53f7")))),i.a.createElement(b,{visible:"Account-UpdateAvatar"===(null===(d=g.actionTabs)||void 0===d?void 0:d.key),onClose:function(){_({type:"account/setActionTabs"})}}))},N=Object(c["a"])((function(t){var e=t.user,r=t.account,n=t.loading,a=t.globalSetting;return{user:e,account:r,globalSetting:a,loading:n.models.index}}))(L),O=r("n6JY"),j=r.n(O);function S(){S=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(I){l=function(t,e,r){return t[e]=r}}function u(t,e,r,a){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),c=new N(a||[]);return n(i,"_invoke",{value:b(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=u;var f={};function h(){}function p(){}function v(){}var d={};l(d,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==e&&r.call(g,o)&&(d=g);var y=v.prototype=h.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function a(n,o,i,c){var l=s(t[n],t,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){a("next",t,i,c)}),(function(t){a("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return a("throw",t,i,c)}))}c(l.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){a(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function b(t,e,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,f;var o=a.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=v,n(y,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:p,configurable:!0}),p.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(_.prototype),l(_.prototype,i,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new _(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=O,N.prototype={constructor:N,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(L),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){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,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},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),L(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var I=function(t){var e,r=t.user,l=(t.account,t.globalSetting,t.loading,t.dispatch),u=Object(a["a"])(t,["user","account","globalSetting","loading","dispatch"]);return Object(o["useEffect"])((function(){var t;(null===(t=r.userInfo)||void 0===t?void 0:t.login)&&Object(n["a"])(S().mark((function t(){var e,n;return S().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,l({type:"account/getBasicInfo",payload:{login:null===(e=r.userInfo)||void 0===e?void 0:e.login}});case 2:n=t.sent,(null===n||void 0===n?void 0:n.base_info_completed)||c["c"].push("/account/profile/edit");case 4:case"end":return t.stop()}}),t)})))()}),[null===(e=r.userInfo)||void 0===e?void 0:e.login]),i.a.createElement("section",{className:j.a.bg},i.a.createElement("div",{className:j.a.wrap},i.a.createElement(N,null),u.children))};e["default"]=Object(c["a"])((function(t){var e=t.user,r=t.account,n=t.loading,a=t.globalSetting;return{user:e,account:r,globalSetting:a,loading:n.models.index}}))(I)},n6JY:function(t,e,r){t.exports={bg:"bg___wq3H6",wrap:"wrap___13xuI"}}}]); |