1 |
- {"version":3,"sources":["util/rule.js","util/fy.js","util/param.js","../node_modules/_antd@3.19.0@antd/es/alert/index.js","page/Login/index.js","util/index.js","api/http.js","api/modules/base.js","api/modules/login.js","api/modules/user.js","api/httpForm.js","api/modules/upload.js","api/index.js"],"names":["Rule","Reg_Require","Reg_Int","Reg_Phone","Reg_Email","Reg_Code","Reg_Identity","fy","name","department","sallary","sex","nation","height","nativePlace","identity","belief","dateOfBirth","politics","healthy","diseases","marriage","registration","accountCharacter","address","email","phone","urgentPhone","foreign","skillCertificate","skillType","fristWork","plan","curStatus","eduExperience","workExperience","description","startDate","endDate","school","education","major","educationBg","idPhoto","lifePhoto","Param","params","Object","C_code_FED_talent_inventory_system_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__","this","error","i","_validate","key","rules","length","_validateType","type","val","rule","_execRequire","isFunction","isRegExp","_execReg","_execLength","flag","test","concat","fyForm","range","replace","split","_typeof","obj","Symbol","iterator","constructor","prototype","_extends","assign","target","arguments","source","hasOwnProperty","call","apply","_defineProperty","value","defineProperty","enumerable","configurable","writable","_defineProperties","props","descriptor","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","_assertThisInitialized","self","ReferenceError","_setPrototypeOf","p","noop","alert_Alert","_React$Component","Alert","_this","instance","Constructor","TypeError","_classCallCheck","state","closing","closed","handleClose","e","preventDefault","dom","_react_dom_16_8_6_react_dom","style","offsetHeight","setState","onClose","animationEnd","afterClose","renderAlert","_ref","_classNames","_classNames2","getPrefixCls","_this$props","customizePrefixCls","prefixCls","message","closeText","banner","_this$props$className","className","icon","_this$props2","closable","showIcon","iconType","undefined","iconTheme","alertCls","_classnames_2_2_6_classnames_default","closeIcon","_react_16_8_6_react","onClick","es_icon","dataOrAriaProps","getDataOrAriaProps","iconNode","theme","Animate","component","showProp","transitionName","onEnd","data-show","protoProps","staticProps","subClass","superClass","create","_inherits","config_provider","Login","classCallCheck","possibleConstructorReturn","getLoginPhone","code","buttonText","countTimes","errorVisible","errorMsg","loading","timer","store","userId","token","history","push","clearInterval","localStorage","getItem","setItem","event","param","checkParams","API","login","getCode","data","startCountdown","msg","showError","_context","t0","_this2","seconds","setInterval","checkCode","setLoginPhone","_context2","_this3","_react_16_8_6_react_default","a","createElement","htmlFor","input","placeholder","defaultValue","id","onBlur","updatePhoneInput","bind","es_button","onGetCode","updateCodeInput","onPressEnter","setTimeout","onSubmit","size","spin","React","Component","getAntdFormVal","isEvent","checked","onChange","property","transferMsg","onComponentChange","mergeInfo","mInfo","info","text","antd_es_message__WEBPACK_IMPORTED_MODULE_1__","arg","toString","getBase64","file","callback","reader","FileReader","addEventListener","result","readAsDataURL","dataURItoBlob","base64Data","byteString","indexOf","atob","unescape","mimeString","ia","Uint8Array","charCodeAt","Blob","getCookie","arr","reg","RegExp","document","cookie","match","host","window","location","port","ax","axios","baseURL","headers","Content-Type","transformRequest","Qs","stringify","transformResponse","withCredentials","interceptors","request","use","config","method","needAuth","logout","Promise","reject","response","resolve","Error","base","getDepartmentList","get","_ref2","checkAdmin","_ref3","nodeId","post","user","find","preview","upload","upLoadImg","upLoadFile","console","log","upLoadResume","axForm","__webpack_exports__"],"mappings":"0FAWeA,IAVJ,CACTC,YAAa,MACbC,QAAS,WACTC,UAAW,sBACXC,UAAW,8CACXC,SAAU,UAEVC,aAAc,4MCiCDC,IAxCJ,CACTC,KAAM,eACNC,WAAY,2BACZC,QAAS,2BACTC,IAAK,eACLC,OAAQ,eACRC,OAAQ,eACRC,YAAa,eACbC,SAAU,2BACVC,OAAQ,2BACRC,YAAa,2BACbC,SAAU,2BACVC,QAAS,2BACTC,SAAU,iCACVC,SAAU,2BACVC,aAAc,iCACdC,iBAAkB,2BAClBC,QAAS,uCACTC,MAAO,2BACPC,MAAO,2BACPC,YAAa,iCACbC,QAAS,iCACTC,iBAAkB,2BAClBC,UAAW,iCACXC,UAAW,mDACXC,KAAM,6CACNC,UAAW,iFACXC,cAAe,2BACfC,eAAgB,2BAChB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GACP,OAAOqO,EAAGwB,IAAI,gBAAiB,CAC7B7P,YAGJ0H,OAZa,SAYL1H,GAEN,OADAC,OAAOgC,OAAOjC,EAAQ,CAAEoP,UAAU,IAC3Bf,EAAG6B,KAAK,eAAgBlQ,KCd/BiO,EAAO,GAETA,EAD2B,SAAzBC,OAAOC,SAASC,KACX,oBACCF,OAAOC,SAASF,KAAKD,MAAM,QAC5B,2BAEA,sBAGT,IAAIK,EAAKC,IAAM5G,OAAO,CACpB6G,QAASN,EACTO,QAAS,CAAEC,eAAgB,uBAC3BC,iBAAkB,GAClBG,kBAAmB,GACnBC,iBAAiB,IAGnBT,EAAGJ,KAAOA,EAEVI,EAAGU,aAAaC,QAAQC,MAKxBZ,EAAGU,aAAaS,SAASP,IACvB,SAAAO,GACE,OAAOF,QAAQG,QAAQD,EAASjG,OAElC,SAAAnJ,GACE,OAAOkP,QAAQC,OAAOnP,KAIXiO,QChCAiC,EAAA,CAEbC,UAFa,SAEFvQ,GACT,OAAOsO,IAAM4B,KAAK,qCAAsClQ,EAAQ,CAC9DwO,QAAS,CACPC,eAAgB,0BAKtB+B,WAVa,SAUDxQ,GAEV,OADEyQ,QAAQC,IAAI,SAAS1Q,GAChBsO,IAAM4B,KAAK,mDAAoDlQ,EAAQ,CAC5EwO,QAAS,CACPC,eAAgB,0BAKtBkC,aAnBa,SAmBC3Q,GACZ,OAAO4Q,EAAOV,KAAK,iBAAkBlQ,KClB1B6Q,EAAA,GACblB,OACAtG,QACA8G,OACAG","file":"static/js/8.49dc81ad.chunk.js","sourcesContent":["\r\nlet Rule = {\r\n Reg_Require: /\\S+/, // 非空\r\n Reg_Int: /[1-9]\\d*/, // 大于0正整数\r\n Reg_Phone: /^1(3|4|5|7|8)\\d{9}$/, // 手机号码\r\n Reg_Email: /\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*/, // 邮箱地址\r\n Reg_Code: /^\\d{6}$/, // 6位数\r\n // 身份证\r\n 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}$)/\r\n}\r\n\r\nexport default Rule\r\n","// 表单翻译json\r\nconst fy = {\r\n name: '姓名',\r\n department: '应聘岗位',\r\n sallary: '期望薪资',\r\n sex: '性别',\r\n nation: '民族',\r\n height: '身高',\r\n nativePlace: '籍贯',\r\n identity: '身份证号',\r\n belief: '宗教信仰',\r\n dateOfBirth: '出生日期',\r\n politics: '政治面貌',\r\n healthy: '健康状况',\r\n diseases: '重大疾病史',\r\n marriage: '婚姻状况',\r\n registration: '户口所在地',\r\n accountCharacter: '户口性质',\r\n address: '家庭详细住址',\r\n email: '个人邮箱',\r\n phone: '手机号码',\r\n urgentPhone: '紧急联系人',\r\n foreign: '外语及程度',\r\n skillCertificate: '技能证书',\r\n skillType: '职称及类别',\r\n fristWork: '首次参加工作时间',\r\n plan: '三年内职业规划',\r\n curStatus: '是否与其他单位存在劳动关系',\r\n eduExperience: '教育经历',\r\n workExperience: '工作经历',\r\n description: '自我评价',\r\n startDate: '开始时间',\r\n endDate: '结束时间',\r\n school: '毕业学校',\r\n education: '学历',\r\n major: '专业名称',\r\n educationBg: '毕业时间/学制',\r\n idPhoto: '证件照',\r\n lifePhoto: '生活照'\r\n}\r\n\r\nexport default fy\r\n","import Rule from './rule'\r\nimport { isFunction, isRegExp } from './index'\r\nimport fyForm from '@/util/fy'\r\n\r\n/**\r\n * @des 路由参数校验\r\n */\r\nclass Param {\r\n constructor (params) {\r\n this.params = params\r\n this.error = ''\r\n }\r\n\r\n checkParams () {\r\n let params = this.params\r\n\r\n for (let i in params) {\r\n if (!this._validate(i, params[i])) {\r\n return false\r\n }\r\n }\r\n\r\n return true\r\n }\r\n\r\n _validate (key, rules) {\r\n for (var i = 1; i < rules.length; i++) {\r\n if (!this._validateType(key, rules[0], rules[i])) {\r\n return false\r\n }\r\n }\r\n\r\n return true\r\n }\r\n\r\n _validateType (type, val, rule) {\r\n if (rule === 'require') return this._execRequire(type, val)\r\n else if (isFunction(rule)) return rule(val)\r\n else if (isRegExp(rule)) return this._execReg(type, val, rule)\r\n else if(/^length_[0-9]{1,}-[0-9]{1,}$/) return this._execLength(type, val, rule)\r\n else return true\r\n }\r\n /**\r\n * 验证是否为空\r\n * @param {string} type key\r\n * @param {any} val val\r\n */\r\n _execRequire (type, val) {\r\n let flag = Rule.Reg_Require.test(val)\r\n if (!flag) this.error = `${fyForm[type] || type}不能为空`\r\n return flag\r\n }\r\n /**\r\n *\r\n * @param {string} type key\r\n * @param {any} val val\r\n * @param {RegExp} rule 正则表达式\r\n */\r\n _execReg (type, val, rule) {\r\n let flag = rule.test(val)\r\n if (!flag) this.error = `${fyForm[type] || type}格式不对`\r\n return flag\r\n }\r\n\r\n _execLength (type, val, rule) {\r\n let range = (rule.replace('length_','')).split(\"-\")\r\n if(val.length>=range[0] && val.length<=range[1]){\r\n return true\r\n }else{\r\n this.error = `${fyForm[type] || type}长度在${range[0]}-${range[1]}之间`\r\n return false\r\n }\r\n }\r\n}\r\n\r\nexport default Param\r\n","function _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport Animate from 'rc-animate';\nimport Icon from '../icon';\nimport classNames from 'classnames';\nimport { ConfigConsumer } from '../config-provider';\nimport getDataOrAriaProps from '../_util/getDataOrAriaProps';\n\nfunction noop() {}\n\nvar Alert =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(Alert, _React$Component);\n\n function Alert() {\n var _this;\n\n _classCallCheck(this, Alert);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Alert).apply(this, arguments));\n _this.state = {\n closing: true,\n closed: false\n };\n\n _this.handleClose = function (e) {\n e.preventDefault();\n var dom = ReactDOM.findDOMNode(_assertThisInitialized(_this));\n dom.style.height = \"\".concat(dom.offsetHeight, \"px\"); // Magic code\n // 重复一次后才能正确设置 height\n\n dom.style.height = \"\".concat(dom.offsetHeight, \"px\");\n\n _this.setState({\n closing: false\n });\n\n (_this.props.onClose || noop)(e);\n };\n\n _this.animationEnd = function () {\n _this.setState({\n closed: true,\n closing: true\n });\n\n (_this.props.afterClose || noop)();\n };\n\n _this.renderAlert = function (_ref) {\n var _classNames, _classNames2;\n\n var getPrefixCls = _ref.getPrefixCls;\n var _this$props = _this.props,\n description = _this$props.description,\n customizePrefixCls = _this$props.prefixCls,\n message = _this$props.message,\n closeText = _this$props.closeText,\n banner = _this$props.banner,\n _this$props$className = _this$props.className,\n className = _this$props$className === void 0 ? '' : _this$props$className,\n style = _this$props.style,\n icon = _this$props.icon;\n var _this$props2 = _this.props,\n closable = _this$props2.closable,\n type = _this$props2.type,\n showIcon = _this$props2.showIcon,\n iconType = _this$props2.iconType;\n var prefixCls = getPrefixCls('alert', customizePrefixCls); // banner模式默认有 Icon\n\n showIcon = banner && showIcon === undefined ? true : showIcon; // banner模式默认为警告\n\n type = banner && type === undefined ? 'warning' : type || 'info';\n var iconTheme = 'filled'; // should we give a warning?\n // warning(!iconType, `The property 'iconType' is deprecated. Use the property 'icon' instead.`);\n\n if (!iconType) {\n switch (type) {\n case 'success':\n iconType = 'check-circle';\n break;\n\n case 'info':\n iconType = 'info-circle';\n break;\n\n case 'error':\n iconType = 'close-circle';\n break;\n\n case 'warning':\n iconType = 'exclamation-circle';\n break;\n\n default:\n iconType = 'default';\n } // use outline icon in alert with description\n\n\n if (!!description) {\n iconTheme = 'outlined';\n }\n } // closeable when closeText is assigned\n\n\n if (closeText) {\n closable = true;\n }\n\n var alertCls = classNames(prefixCls, \"\".concat(prefixCls, \"-\").concat(type), (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-close\"), !_this.state.closing), _defineProperty(_classNames, \"\".concat(prefixCls, \"-with-description\"), !!description), _defineProperty(_classNames, \"\".concat(prefixCls, \"-no-icon\"), !showIcon), _defineProperty(_classNames, \"\".concat(prefixCls, \"-banner\"), !!banner), _defineProperty(_classNames, \"\".concat(prefixCls, \"-closable\"), closable), _classNames), className);\n var closeIcon = closable ? React.createElement(\"a\", {\n onClick: _this.handleClose,\n className: \"\".concat(prefixCls, \"-close-icon\")\n }, closeText || React.createElement(Icon, {\n type: \"close\"\n })) : null;\n var dataOrAriaProps = getDataOrAriaProps(_this.props);\n var iconNode = icon && (React.isValidElement(icon) ? React.cloneElement(icon, {\n className: classNames((_classNames2 = {}, _defineProperty(_classNames2, icon.props.className, icon.props.className), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-icon\"), true), _classNames2))\n }) : React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-icon\")\n }, icon)) || React.createElement(Icon, {\n className: \"\".concat(prefixCls, \"-icon\"),\n type: iconType,\n theme: iconTheme\n });\n return _this.state.closed ? null : React.createElement(Animate, {\n component: \"\",\n showProp: \"data-show\",\n transitionName: \"\".concat(prefixCls, \"-slide-up\"),\n onEnd: _this.animationEnd\n }, React.createElement(\"div\", _extends({\n \"data-show\": _this.state.closing,\n className: alertCls,\n style: style\n }, dataOrAriaProps), showIcon ? iconNode : null, React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-message\")\n }, message), React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-description\")\n }, description), closeIcon));\n };\n\n return _this;\n }\n\n _createClass(Alert, [{\n key: \"render\",\n value: function render() {\n return React.createElement(ConfigConsumer, null, this.renderAlert);\n }\n }]);\n\n return Alert;\n}(React.Component);\n\nexport { Alert as default };","import React from 'react'\r\nimport './index.scss'\r\nimport { Input, Button, Alert, Spin } from 'antd'\r\nimport API from '@/api'\r\nimport Param from '@/util/param'\r\nimport Rule from '@/util/rule'\r\nimport store from '@/store'\r\nimport { showError } from '@/util'\r\n\r\nexport default class Login extends React.Component {\r\n constructor (props) {\r\n super(props)\r\n this.state = {\r\n phone: this.getLoginPhone(),\r\n code: null,\r\n buttonText: '验证码',\r\n countTimes: -1,\r\n errorVisible: false,\r\n errorMsg: null,\r\n loading: false\r\n }\r\n this.timer = null// 读秒倒计时\r\n }\r\n componentDidMount () {\r\n if (store.userId && store.token) {\r\n this.props.history.push('/user/information')\r\n }\r\n }\r\n componentWillUnmount () {\r\n clearInterval(this.timer)\r\n }\r\n getLoginPhone () {\r\n return localStorage.getItem('loginPhone')\r\n }\r\n setLoginPhone (phone) {\r\n localStorage.setItem('loginPhone', phone)\r\n }\r\n updatePhoneInput (event) {\r\n this.setState({\r\n phone: event.target.value\r\n })\r\n }\r\n updateCodeInput (event) {\r\n this.setState({\r\n code: event.target.value\r\n })\r\n }\r\n async onGetCode () {\r\n let param = new Param({\r\n phone: [this.state.phone, 'require', Rule.Reg_Phone]\r\n })\r\n if (!param.checkParams()) {\r\n this.setState({\r\n errorVisible: true,\r\n errorMsg: param.error\r\n })\r\n return false\r\n } else if (this.state.countTimes < 0) {\r\n this.setState({\r\n errorVisible: false,\r\n errorMsg: null\r\n })\r\n }\r\n\r\n try {\r\n let data = await API.login.getCode({ phone: this.state.phone })\r\n if (data.code === 0) {\r\n this.startCountdown()\r\n } else {\r\n this.setState({\r\n errorVisible: true,\r\n errorMsg: data.msg\r\n })\r\n }\r\n } catch (e) {\r\n showError(e)\r\n }\r\n }\r\n startCountdown (seconds = 60) {\r\n this.setState({\r\n countTimes: seconds\r\n })\r\n this.timer = setInterval(() => {\r\n if (this.state.countTimes <= 0) {\r\n clearInterval(this.timer)\r\n this.setState({\r\n countTimes: -1,\r\n buttonText: `验证码`\r\n })\r\n return\r\n }\r\n\r\n this.setState({\r\n countTimes: this.state.countTimes - 1,\r\n buttonText: `验证码(${this.state.countTimes - 1}s)`\r\n })\r\n }, 1000)\r\n }\r\n async onSubmit () {\r\n if (this.state.loading) return\r\n\r\n let { phone, code } = this.state\r\n\r\n let param = new Param({\r\n phone: [phone, 'require', Rule.Reg_Phone],\r\n code: [code, 'require', Rule.Reg_Code]\r\n })\r\n if (!param.checkParams()) {\r\n this.setState({\r\n errorVisible: true,\r\n errorMsg: param.error\r\n })\r\n return false\r\n }\r\n this.setState({\r\n errorVisible: false\r\n })\r\n\r\n this.setState({ loading: true })\r\n\r\n try {\r\n let data = await API.login.checkCode({ phone, code })\r\n store.login(phone, data.data.token)\r\n this.setLoginPhone(phone)\r\n this.setState({ loading: false })\r\n this.props.history.push('/user/information')\r\n } catch (e) {\r\n this.setState({\r\n loading: false,\r\n errorVisible: true,\r\n errorMsg: e.message\r\n })\r\n }\r\n }\r\n render () {\r\n return (\r\n <div className=\"mod-login\">\r\n <div className=\"mod-row\">\r\n <label htmlFor=\"phoneInput\">手机号:</label>\r\n <Input\r\n placeholder=\"请填写手机号\"\r\n defaultValue={this.state.phone}\r\n id=\"phoneInput\"\r\n onBlur={this.updatePhoneInput.bind(this)}\r\n />\r\n <Button\r\n className={`btn-code ${this.state.countTimes >= 0 &&\r\n 'countdown'}`}\r\n type=\"primary\"\r\n onClick={this.onGetCode.bind(this)}\r\n >\r\n {this.state.buttonText}\r\n </Button>\r\n </div>\r\n\r\n <div className=\"mod-row\">\r\n <label htmlFor=\"codeInput\">验证码:</label>\r\n <Input\r\n placeholder=\"请输入验证码\"\r\n id=\"codeInput\"\r\n onBlur={this.updateCodeInput.bind(this)}\r\n onPressEnter={event => {\r\n this.updateCodeInput(event)\r\n setTimeout(this.onSubmit.bind(this), 0)\r\n }}\r\n />\r\n </div>\r\n\r\n <Alert\r\n className={this.state.errorVisible && 'visible'}\r\n message={this.state.errorMsg}\r\n type=\"error\"\r\n />\r\n\r\n <Button\r\n className=\"btn-login\"\r\n type=\"primary\"\r\n size=\"large\"\r\n onClick={this.onSubmit.bind(this)}\r\n >\r\n 登录\r\n {this.state.loading && <Spin />}\r\n </Button>\r\n </div>\r\n )\r\n }\r\n}\r\n","import { message } from 'antd'\r\n\r\nexport function getAntdFormVal (value, data, isEvent) {\r\n let val\r\n if (data && data.props) val = data.key // 下拉框\r\n else if (data) val = data // 日历插件\r\n else if (isEvent) val = value.target.type === 'checkbox' ? value.target.checked : value.target.value // 多选/普通文本框\r\n else val = value\r\n\r\n return val\r\n}\r\n\r\nexport function onChange (property, isEvent = false) {\r\n return function (value, data) {\r\n let val = getAntdFormVal(value, data, isEvent)\r\n\r\n this.props &&\r\n this.props.transferMsg &&\r\n this.props.transferMsg(property, val)\r\n }\r\n}\r\n\r\nexport function onComponentChange (mergeInfo, property, isEvent = false) {\r\n return function (value, data) {\r\n let val = getAntdFormVal(value, data, isEvent)\r\n\r\n let mInfo = this.props.info[mergeInfo]\r\n mInfo[property] = val\r\n\r\n this.props &&\r\n this.props.transferMsg &&\r\n this.props.transferMsg(mergeInfo, mInfo)\r\n }\r\n}\r\n\r\nexport function showSuccess (text) {\r\n message.success(text)\r\n}\r\n\r\nexport function showError (text) {\r\n message.error(text)\r\n}\r\n\r\nexport function showWarning (text) {\r\n message.warning(text)\r\n}\r\n\r\nexport function isFunction (arg) {\r\n return Object.prototype.toString.call(arg) === '[object Function]'\r\n}\r\n\r\nexport function isRegExp (arg) {\r\n return Object.prototype.toString.call(arg) === '[object RegExp]'\r\n}\r\n\r\nexport function getBase64(file, callback) {\r\n const reader = new FileReader();\r\n reader.addEventListener(\"load\", () => callback(reader.result));\r\n reader.readAsDataURL(file);\r\n}\r\n\r\n//base64转blod\r\nexport function dataURItoBlob (base64Data) {\r\n var byteString\r\n if (base64Data.split(',')[0].indexOf('base64') >= 0) { byteString = atob(base64Data.split(',')[1]) } else byteString = unescape(base64Data.split(',')[1])\r\n var mimeString = base64Data\r\n .split(',')[0]\r\n .split(':')[1]\r\n .split(';')[0]\r\n var ia = new Uint8Array(byteString.length)\r\n for (var i = 0; i < byteString.length; i++) {\r\n ia[i] = byteString.charCodeAt(i)\r\n }\r\n return new Blob([ia], {\r\n type: mimeString\r\n })\r\n}\r\n\r\n/**\r\n * 获取Url上指定参数\r\n * @param {String} name 参数名\r\n */\r\nexport function getUrlParam (name) {\r\n var reg = new RegExp('[?&]' + name + '=([^&#?]*)(&|#|$)')\r\n var r = window.location.href.match(reg)\r\n return r ? r[1] : null\r\n}\r\n\r\nexport function getCookie (name) {\r\n var arr; var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)')\r\n arr = document.cookie.match(reg)\r\n if (arr) { return unescape(arr[2]) } else { return null }\r\n}\r\n","import axios from 'axios'\r\nimport Qs from 'qs'\r\nimport store from '@/store'\r\nimport { showError } from '@/util'\r\n\r\nlet host = ''\r\nif (window.location.port === '3000') {\r\n host = '//localhost:1024/'\r\n}else if (window.location.host.match('test')) {\r\n host = '//test-api-hr.duowan.com'\r\n} else{\r\n host = '//api-hr.duowan.com'\r\n}\r\n\r\nlet ax = axios.create({\r\n baseURL: host,\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\r\n transformRequest: [\r\n function (data, headers) {\r\n data = Qs.stringify(data)\r\n return data\r\n }\r\n ],\r\n transformResponse: [],\r\n withCredentials: true\r\n})\r\n\r\nax.host = host\r\n\r\nax.interceptors.request.use(\r\n config => {\r\n let param = config.method === 'post' ? config.data : config.params\r\n if (param && param.needAuth) {\r\n if (!(store.userId && store.token)) {\r\n showError('登录态失效,请重新登录')\r\n store.logout()\r\n return Promise.reject('请先登录')\r\n } else {\r\n store.userId && (param.userId = store.userId)\r\n param.token = store.token\r\n delete param.needAuth\r\n }\r\n }\r\n // 在发送请求之前做些什么\r\n return config\r\n },\r\n error => {\r\n // 对请求错误做些什么\r\n return Promise.reject(error)\r\n }\r\n)\r\n\r\n// 拦截器处理错误\r\nax.interceptors.response.use(\r\n response => {\r\n if (response.data.code === 0) {\r\n return Promise.resolve(response.data)\r\n } else if (response.data.code === -5) {\r\n showError(response.data.msg)\r\n store.logout()\r\n } else {\r\n return Promise.reject(new Error(response.data.msg))\r\n }\r\n },\r\n error => {\r\n return Promise.reject(error)\r\n }\r\n)\r\n\r\nexport default ax\r\n","import ax from '../http'\r\n\r\nexport default {\r\n getDepartmentList (params) {\r\n return ax.get('/department/list', {\r\n params\r\n })\r\n }\r\n}\r\n","import axios from 'axios'\r\nimport ax from '../http'\r\n\r\nexport default {\r\n getCode ({ phone }) {\r\n return ax.get('/login/getCode', {\r\n params: { phone }\r\n })\r\n },\r\n checkCode ({ phone, code }) {\r\n return ax.get('/login/checkCode', {\r\n params: { phone, code }\r\n })\r\n },\r\n // 管理员权限校验\r\n checkAdmin ({ nodeId, userId }) {\r\n return axios.post('//test.admin.duowan.com/open/checkRight2', {\r\n params: { nodeId, userId }\r\n })\r\n }\r\n}\r\n","import ax from '../http'\r\n\r\nexport default {\r\n find (params) {\r\n Object.assign(params, { needAuth: true })\r\n return ax.get('/user/find', {\r\n params\r\n })\r\n },\r\n preview (params) {\r\n return ax.get('/user/preview', {\r\n params\r\n })\r\n },\r\n create (params) {\r\n Object.assign(params, { needAuth: true })\r\n return ax.post('/user/create', params)\r\n }\r\n}\r\n","import axios from 'axios'\r\n\r\nlet host = ''\r\nif (window.location.port === '3000') {\r\n host = '//localhost:1024/'\r\n}else if (window.location.host.match('test')) {\r\n host = '//test-api-hr.duowan.com'\r\n} else{\r\n host = '//api-hr.duowan.com'\r\n}\r\n\r\nlet ax = axios.create({\r\n baseURL: host,\r\n headers: { 'Content-Type': 'multipart/form-data' },\r\n transformRequest: [],\r\n transformResponse: [],\r\n withCredentials: true\r\n})\r\n\r\nax.host = host\r\n\r\nax.interceptors.request.use(\r\n \r\n)\r\n\r\n// 拦截器处理错误\r\nax.interceptors.response.use(\r\n response => {\r\n return Promise.resolve(response.data)\r\n },\r\n error => {\r\n return Promise.reject(error)\r\n }\r\n)\r\n\r\nexport default ax\r\n","import axios from 'axios'\r\nimport axForm from '../httpForm'\r\n\r\nexport default {\r\n // 上传图片\r\n upLoadImg (params) {\r\n return axios.post('//video.duowan.com/jsapi/imgUpload', params, {\r\n headers: {\r\n 'Content-Type': 'multipart/form-data'\r\n }\r\n })\r\n },\r\n // 上传文件\r\n upLoadFile (params) {\r\n console.log(\"params\",params)\r\n return axios.post('https://ad.duowan.com/?r=test/otherUpload&hehe=1', params, {\r\n headers: {\r\n 'Content-Type': 'multipart/form-data'\r\n }\r\n })\r\n },\r\n // 上传简历-仅作文件解析\r\n upLoadResume (params) {\r\n return axForm.post('/upload/resume', params)\r\n }\r\n}\r\n","import base from './modules/base'\r\nimport login from './modules/login'\r\nimport user from './modules/user'\r\nimport upload from './modules/upload'\r\n\r\nexport default {\r\n base,\r\n login,\r\n user,\r\n upload\r\n}\r\n"],"sourceRoot":""}
|