8.49dc81ad.chunk.js 15 KB

12
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[8],{107:function(e,t,n){"use strict";t.a={Reg_Require:/\S+/,Reg_Int:/[1-9]\d*/,Reg_Phone:/^1(3|4|5|7|8)\d{9}$/,Reg_Email:/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/,Reg_Code:/^\d{6}$/,Reg_Identity:/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/}},117:function(e,t,n){"use strict";t.a={name:"\u59d3\u540d",department:"\u5e94\u8058\u5c97\u4f4d",sallary:"\u671f\u671b\u85aa\u8d44",sex:"\u6027\u522b",nation:"\u6c11\u65cf",height:"\u8eab\u9ad8",nativePlace:"\u7c4d\u8d2f",identity:"\u8eab\u4efd\u8bc1\u53f7",belief:"\u5b97\u6559\u4fe1\u4ef0",dateOfBirth:"\u51fa\u751f\u65e5\u671f",politics:"\u653f\u6cbb\u9762\u8c8c",healthy:"\u5065\u5eb7\u72b6\u51b5",diseases:"\u91cd\u5927\u75be\u75c5\u53f2",marriage:"\u5a5a\u59fb\u72b6\u51b5",registration:"\u6237\u53e3\u6240\u5728\u5730",accountCharacter:"\u6237\u53e3\u6027\u8d28",address:"\u5bb6\u5ead\u8be6\u7ec6\u4f4f\u5740",email:"\u4e2a\u4eba\u90ae\u7bb1",phone:"\u624b\u673a\u53f7\u7801",urgentPhone:"\u7d27\u6025\u8054\u7cfb\u4eba",foreign:"\u5916\u8bed\u53ca\u7a0b\u5ea6",skillCertificate:"\u6280\u80fd\u8bc1\u4e66",skillType:"\u804c\u79f0\u53ca\u7c7b\u522b",fristWork:"\u9996\u6b21\u53c2\u52a0\u5de5\u4f5c\u65f6\u95f4",plan:"\u4e09\u5e74\u5185\u804c\u4e1a\u89c4\u5212",curStatus:"\u662f\u5426\u4e0e\u5176\u4ed6\u5355\u4f4d\u5b58\u5728\u52b3\u52a8\u5173\u7cfb",eduExperience:"\u6559\u80b2\u7ecf\u5386",workExperience:"\u5de5\u4f5c\u7ecf\u5386",description:"\u81ea\u6211\u8bc4\u4ef7",startDate:"\u5f00\u59cb\u65f6\u95f4",endDate:"\u7ed3\u675f\u65f6\u95f4",school:"\u6bd5\u4e1a\u5b66\u6821",education:"\u5b66\u5386",major:"\u4e13\u4e1a\u540d\u79f0",educationBg:"\u6bd5\u4e1a\u65f6\u95f4/\u5b66\u5236",idPhoto:"\u8bc1\u4ef6\u7167",lifePhoto:"\u751f\u6d3b\u7167"}},139:function(e,t,n){"use strict";var r=n(5),o=n(6),a=n(107),i=n(73),s=n(117),c=function(){function e(t){Object(r.a)(this,e),this.params=t,this.error=""}return Object(o.a)(e,[{key:"checkParams",value:function(){var e=this.params;for(var t in e)if(!this._validate(t,e[t]))return!1;return!0}},{key:"_validate",value:function(e,t){for(var n=1;n<t.length;n++)if(!this._validateType(e,t[0],t[n]))return!1;return!0}},{key:"_validateType",value:function(e,t,n){return"require"===n?this._execRequire(e,t):Object(i.e)(n)?n(t):Object(i.f)(n)?this._execReg(e,t,n):this._execLength(e,t,n)}},{key:"_execRequire",value:function(e,t){var n=a.a.Reg_Require.test(t);return n||(this.error="".concat(s.a[e]||e,"\u4e0d\u80fd\u4e3a\u7a7a")),n}},{key:"_execReg",value:function(e,t,n){var r=n.test(t);return r||(this.error="".concat(s.a[e]||e,"\u683c\u5f0f\u4e0d\u5bf9")),r}},{key:"_execLength",value:function(e,t,n){var r=n.replace("length_","").split("-");return t.length>=r[0]&&t.length<=r[1]||(this.error="".concat(s.a[e]||e,"\u957f\u5ea6\u5728").concat(r[0],"-").concat(r[1],"\u4e4b\u95f4"),!1)}}]),e}();t.a=c},185:function(e,t,n){},188:function(e,t,n){},311:function(e,t,n){"use strict";n.r(t);n(146);var r=n(171),o=(n(74),n(185),n(0)),a=n.n(o),i=n(7),s=n(108),c=n(75),u=n(66),l=n.n(u),p=n(70),d=n(170);function h(e){return(h="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(){}var k=function(e){function t(){var e,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,r=v(t).apply(this,arguments),(e=!r||"object"!==h(r)&&"function"!==typeof r?b(n):r).state={closing:!0,closed:!1},e.handleClose=function(t){t.preventDefault();var n=i.findDOMNode(b(e));n.style.height="".concat(n.offsetHeight,"px"),n.style.height="".concat(n.offsetHeight,"px"),e.setState({closing:!1}),(e.props.onClose||w)(t)},e.animationEnd=function(){e.setState({closed:!0,closing:!0}),(e.props.afterClose||w)()},e.renderAlert=function(t){var n,r,a=t.getPrefixCls,i=e.props,u=i.description,p=i.prefixCls,h=i.message,g=i.closeText,v=i.banner,b=i.className,y=void 0===b?"":b,w=i.style,k=i.icon,j=e.props,C=j.closable,E=j.type,O=j.showIcon,x=j.iconType,P=a("alert",p);O=!(!v||void 0!==O)||O,E=v&&void 0===E?"warning":E||"info";var S="filled";if(!x){switch(E){case"success":x="check-circle";break;case"info":x="info-circle";break;case"error":x="close-circle";break;case"warning":x="exclamation-circle";break;default:x="default"}u&&(S="outlined")}g&&(C=!0);var R=l()(P,"".concat(P,"-").concat(E),(m(n={},"".concat(P,"-close"),!e.state.closing),m(n,"".concat(P,"-with-description"),!!u),m(n,"".concat(P,"-no-icon"),!O),m(n,"".concat(P,"-banner"),!!v),m(n,"".concat(P,"-closable"),C),n),y),_=C?o.createElement("a",{onClick:e.handleClose,className:"".concat(P,"-close-icon")},g||o.createElement(c.a,{type:"close"})):null,I=Object(d.a)(e.props),T=k&&(o.isValidElement(k)?o.cloneElement(k,{className:l()((r={},m(r,k.props.className,k.props.className),m(r,"".concat(P,"-icon"),!0),r))}):o.createElement("span",{className:"".concat(P,"-icon")},k))||o.createElement(c.a,{className:"".concat(P,"-icon"),type:x,theme:S});return e.state.closed?null:o.createElement(s.a,{component:"",showProp:"data-show",transitionName:"".concat(P,"-slide-up"),onEnd:e.animationEnd},o.createElement("div",f({"data-show":e.state.closing,className:R,style:w},I),O?T:null,o.createElement("span",{className:"".concat(P,"-message")},h),o.createElement("span",{className:"".concat(P,"-description")},u),_))},e}var n,r,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(t,o["Component"]),n=t,(r=[{key:"render",value:function(){return o.createElement(p.a,null,this.renderAlert)}}])&&g(n.prototype,r),a&&g(n,a),t}(),j=(n(109),n(120)),C=(n(84),n(95)),E=n(19),O=n.n(E),x=n(25),P=n(5),S=n(6),R=n(10),_=n(9),I=n(11),T=(n(188),n(96)),N=n(139),L=n(107),M=n(18),q=n(73);n.d(t,"default",function(){return A});var A=function(e){function t(e){var n;return Object(P.a)(this,t),(n=Object(R.a)(this,Object(_.a)(t).call(this,e))).state={phone:n.getLoginPhone(),code:null,buttonText:"\u9a8c\u8bc1\u7801",countTimes:-1,errorVisible:!1,errorMsg:null,loading:!1},n.timer=null,n}return Object(I.a)(t,e),Object(S.a)(t,[{key:"componentDidMount",value:function(){M.a.userId&&M.a.token&&this.props.history.push("/user/information")}},{key:"componentWillUnmount",value:function(){clearInterval(this.timer)}},{key:"getLoginPhone",value:function(){return localStorage.getItem("loginPhone")}},{key:"setLoginPhone",value:function(e){localStorage.setItem("loginPhone",e)}},{key:"updatePhoneInput",value:function(e){this.setState({phone:e.target.value})}},{key:"updateCodeInput",value:function(e){this.setState({code:e.target.value})}},{key:"onGetCode",value:function(){var e=Object(x.a)(O.a.mark(function e(){var t,n;return O.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((t=new N.a({phone:[this.state.phone,"require",L.a.Reg_Phone]})).checkParams()){e.next=6;break}return this.setState({errorVisible:!0,errorMsg:t.error}),e.abrupt("return",!1);case 6:this.state.countTimes<0&&this.setState({errorVisible:!1,errorMsg:null});case 7:return e.prev=7,e.next=10,T.a.login.getCode({phone:this.state.phone});case 10:0===(n=e.sent).code?this.startCountdown():this.setState({errorVisible:!0,errorMsg:n.msg}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),Object(q.i)(e.t0);case 17:case"end":return e.stop()}},e,this,[[7,14]])}));return function(){return e.apply(this,arguments)}}()},{key:"startCountdown",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60;this.setState({countTimes:t}),this.timer=setInterval(function(){if(e.state.countTimes<=0)return clearInterval(e.timer),void e.setState({countTimes:-1,buttonText:"\u9a8c\u8bc1\u7801"});e.setState({countTimes:e.state.countTimes-1,buttonText:"\u9a8c\u8bc1\u7801\uff08".concat(e.state.countTimes-1,"s\uff09")})},1e3)}},{key:"onSubmit",value:function(){var e=Object(x.a)(O.a.mark(function e(){var t,n,r,o,a;return O.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.state.loading){e.next=2;break}return e.abrupt("return");case 2:if(t=this.state,n=t.phone,r=t.code,(o=new N.a({phone:[n,"require",L.a.Reg_Phone],code:[r,"require",L.a.Reg_Code]})).checkParams()){e.next=7;break}return this.setState({errorVisible:!0,errorMsg:o.error}),e.abrupt("return",!1);case 7:return this.setState({errorVisible:!1}),this.setState({loading:!0}),e.prev=9,e.next=12,T.a.login.checkCode({phone:n,code:r});case 12:a=e.sent,M.a.login(n,a.data.token),this.setLoginPhone(n),this.setState({loading:!1}),this.props.history.push("/user/information"),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(9),this.setState({loading:!1,errorVisible:!0,errorMsg:e.t0.message});case 22:case"end":return e.stop()}},e,this,[[9,19]])}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this;return a.a.createElement("div",{className:"mod-login"},a.a.createElement("div",{className:"mod-row"},a.a.createElement("label",{htmlFor:"phoneInput"},"\u624b\u673a\u53f7\uff1a"),a.a.createElement(C.a,{placeholder:"\u8bf7\u586b\u5199\u624b\u673a\u53f7",defaultValue:this.state.phone,id:"phoneInput",onBlur:this.updatePhoneInput.bind(this)}),a.a.createElement(j.a,{className:"btn-code ".concat(this.state.countTimes>=0&&"countdown"),type:"primary",onClick:this.onGetCode.bind(this)},this.state.buttonText)),a.a.createElement("div",{className:"mod-row"},a.a.createElement("label",{htmlFor:"codeInput"},"\u9a8c\u8bc1\u7801\uff1a"),a.a.createElement(C.a,{placeholder:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801",id:"codeInput",onBlur:this.updateCodeInput.bind(this),onPressEnter:function(t){e.updateCodeInput(t),setTimeout(e.onSubmit.bind(e),0)}})),a.a.createElement(k,{className:this.state.errorVisible&&"visible",message:this.state.errorMsg,type:"error"}),a.a.createElement(j.a,{className:"btn-login",type:"primary",size:"large",onClick:this.onSubmit.bind(this)},"\u767b\u5f55",this.state.loading&&a.a.createElement(r.a,null)))}}]),t}(a.a.Component)},73:function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"g",function(){return a}),n.d(t,"h",function(){return i}),n.d(t,"i",function(){return s}),n.d(t,"e",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"c",function(){return l}),n.d(t,"a",function(){return p}),n.d(t,"d",function(){return d});n(85);var r=n(91);function o(e,t,n){return t&&t.props?t.key:t||(n?"checkbox"===e.target.type?e.target.checked:e.target.value:e)}function a(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n,r){var a=o(n,r,t);this.props&&this.props.transferMsg&&this.props.transferMsg(e,a)}}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r,a){var i=o(r,a,n),s=this.props.info[e];s[t]=i,this.props&&this.props.transferMsg&&this.props.transferMsg(e,s)}}function s(e){r.a.error(e)}function c(e){return"[object Function]"===Object.prototype.toString.call(e)}function u(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function l(e,t){var n=new FileReader;n.addEventListener("load",function(){return t(n.result)}),n.readAsDataURL(e)}function p(e){var t;t=e.split(",")[0].indexOf("base64")>=0?atob(e.split(",")[1]):unescape(e.split(",")[1]);for(var n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return new Blob([r],{type:n})}function d(e){var t,n=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(t=document.cookie.match(n))?unescape(t[2]):null}},96:function(e,t,n){"use strict";var r=n(76),o=n.n(r),a=n(122),i=n.n(a),s=n(18),c=n(73),u="";u="3000"===window.location.port?"//localhost:1024/":window.location.host.match("test")?"//test-api-hr.duowan.com":"//api-hr.duowan.com";var l=o.a.create({baseURL:u,headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(e,t){return e=i.a.stringify(e)}],transformResponse:[],withCredentials:!0});l.host=u,l.interceptors.request.use(function(e){var t="post"===e.method?e.data:e.params;if(t&&t.needAuth){if(!s.a.userId||!s.a.token)return Object(c.i)("\u767b\u5f55\u6001\u5931\u6548\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55"),s.a.logout(),Promise.reject("\u8bf7\u5148\u767b\u5f55");s.a.userId&&(t.userId=s.a.userId),t.token=s.a.token,delete t.needAuth}return e},function(e){return Promise.reject(e)}),l.interceptors.response.use(function(e){return 0===e.data.code?Promise.resolve(e.data):-5!==e.data.code?Promise.reject(new Error(e.data.msg)):(Object(c.i)(e.data.msg),void s.a.logout())},function(e){return Promise.reject(e)});var p=l,d={getDepartmentList:function(e){return p.get("/department/list",{params:e})}},h={getCode:function(e){var t=e.phone;return p.get("/login/getCode",{params:{phone:t}})},checkCode:function(e){var t=e.phone,n=e.code;return p.get("/login/checkCode",{params:{phone:t,code:n}})},checkAdmin:function(e){var t=e.nodeId,n=e.userId;return o.a.post("//test.admin.duowan.com/open/checkRight2",{params:{nodeId:t,userId:n}})}},f={find:function(e){return Object.assign(e,{needAuth:!0}),p.get("/user/find",{params:e})},preview:function(e){return p.get("/user/preview",{params:e})},create:function(e){return Object.assign(e,{needAuth:!0}),p.post("/user/create",e)}},m="";m="3000"===window.location.port?"//localhost:1024/":window.location.host.match("test")?"//test-api-hr.duowan.com":"//api-hr.duowan.com";var g=o.a.create({baseURL:m,headers:{"Content-Type":"multipart/form-data"},transformRequest:[],transformResponse:[],withCredentials:!0});g.host=m,g.interceptors.request.use(),g.interceptors.response.use(function(e){return Promise.resolve(e.data)},function(e){return Promise.reject(e)});var v=g,b={upLoadImg:function(e){return o.a.post("//video.duowan.com/jsapi/imgUpload",e,{headers:{"Content-Type":"multipart/form-data"}})},upLoadFile:function(e){return console.log("params",e),o.a.post("https://ad.duowan.com/?r=test/otherUpload&hehe=1",e,{headers:{"Content-Type":"multipart/form-data"}})},upLoadResume:function(e){return v.post("/upload/resume",e)}};t.a={base:d,login:h,user:f,upload:b}}}]);
  2. //# sourceMappingURL=8.49dc81ad.chunk.js.map