"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunkkd_login"] = self["webpackChunkkd_login"] || []).push([[560],{

/***/ "./src/page/mobile/MsgLogin.less":
/*!***************************************!*\
  !*** ./src/page/mobile/MsgLogin.less ***!
  \***************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"title\":\"MsgLogin_title_Mspn\",\"verifyCodeWrapper\":\"MsgLogin_verifyCodeWrapper_1VUB\",\"graphicCode\":\"MsgLogin_graphicCode_12TL\",\"phoneCodeWrapper\":\"MsgLogin_phoneCodeWrapper_2Hyb\",\"phoneCode\":\"MsgLogin_phoneCode_2M38\",\"phoneCodeBtn\":\"MsgLogin_phoneCodeBtn_2YpN\",\"disable\":\"MsgLogin_disable_2TwW\",\"nextStep\":\"MsgLogin_nextStep_1S5z\",\"verifyCodeItem\":\"MsgLogin_verifyCodeItem_3Uez\",\"loginType\":\"MsgLogin_loginType_DZzs\",\"phoneLogin\":\"MsgLogin_phoneLogin_11CT\",\"msgLogin\":\"MsgLogin_msgLogin_22Uv\",\"line\":\"MsgLogin_line_1GkT\"});\n\n//# sourceURL=webpack://kd-login/./src/page/mobile/MsgLogin.less?");

/***/ }),

/***/ "./src/page/mobile/MsgLogin.jsx":
/*!**************************************!*\
  !*** ./src/page/mobile/MsgLogin.jsx ***!
  \**************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": function() { return /* binding */ MsgLogin; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ \"../../node_modules/core-js/modules/es.symbol.js\");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"../../node_modules/core-js/modules/es.symbol.description.js\");\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"../../node_modules/core-js/modules/es.symbol.iterator.js\");\n/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_symbol_to_primitive_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"../../node_modules/core-js/modules/es.symbol.to-primitive.js\");\n/* harmony import */ var core_js_modules_es_symbol_to_primitive_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_to_primitive_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ \"../../node_modules/core-js/modules/es.array.from.js\");\n/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"../../node_modules/core-js/modules/es.array.is-array.js\");\n/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"../../node_modules/core-js/modules/es.array.iterator.js\");\n/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ \"../../node_modules/core-js/modules/es.array.slice.js\");\n/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var core_js_modules_es_date_to_primitive_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"../../node_modules/core-js/modules/es.date.to-primitive.js\");\n/* harmony import */ var core_js_modules_es_date_to_primitive_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_primitive_js__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"../../node_modules/core-js/modules/es.date.to-string.js\");\n/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ \"../../node_modules/core-js/modules/es.function.name.js\");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"../../node_modules/core-js/modules/es.number.constructor.js\");\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"../../node_modules/core-js/modules/es.object.define-property.js\");\n/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"../../node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"../../node_modules/core-js/modules/es.regexp.exec.js\");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"../../node_modules/core-js/modules/es.regexp.to-string.js\");\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"../../node_modules/core-js/modules/es.string.iterator.js\");\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"../../node_modules/core-js/modules/web.dom-collections.iterator.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var core_js_modules_web_timers_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/web.timers.js */ \"../../node_modules/core-js/modules/web.timers.js\");\n/* harmony import */ var core_js_modules_web_timers_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers_js__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./MsgLogin.less */ \"./src/page/mobile/MsgLogin.less\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./base */ \"./src/page/mobile/base/index.js\");\n/* harmony import */ var _api_service__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @/api/service */ \"./src/api/service.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @/store */ \"./src/store.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../util */ \"./src/util/index.js\");\n/* harmony import */ var _util_toolUtils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @/util/toolUtils.js */ \"./src/util/toolUtils.js\");\n/* harmony import */ var _LoginWrapper__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./LoginWrapper */ \"./src/page/mobile/LoginWrapper.jsx\");\n/* harmony import */ var _i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @/i18n/intlApi */ \"./src/i18n/intlApi.js\");\n/* harmony import */ var _img_loading_gif__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../img/loading.gif */ \"./src/img/loading.gif\");\n/* harmony import */ var _img_loading_gif__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_img_loading_gif__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var _const__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../const */ \"./src/const.js\");\n/* harmony import */ var _base_Telephone__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./base/Telephone */ \"./src/page/mobile/base/Telephone/index.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\n\n\n// import eventBus from '@/eventBus'\n\n\n\n\n\n\n\n\nfunction MsgLogin(props) {\n  var vCodeTimer = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)();\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(0),\n    _useState2 = _slicedToArray(_useState, 2),\n    vCodeTime = _useState2[0],\n    setVCodeTime = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(false),\n    _useState4 = _slicedToArray(_useState3, 2),\n    logining = _useState4[0],\n    setLoginStatus = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(_store__WEBPACK_IMPORTED_MODULE_23__.mStore.account),\n    _useState6 = _slicedToArray(_useState5, 2),\n    Account = _useState6[0],\n    setAccount = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(),\n    _useState8 = _slicedToArray(_useState7, 2),\n    PhoneCode = _useState8[0],\n    setPhoneCode = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(),\n    _useState10 = _slicedToArray(_useState9, 2),\n    verifyCode = _useState10[0],\n    setVerifyCode = _useState10[1];\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(),\n    _useState12 = _slicedToArray(_useState11, 2),\n    verifyCodeToken = _useState12[0],\n    setVerifyCodeToken = _useState12[1];\n  var dataCenter = props.dataCenter,\n    currentAccountId = props.currentAccountId,\n    handleChangeDataCenter = props.handleChangeDataCenter;\n  var inputStyle = {\n    flexGrow: 1,\n    width: 180,\n    border: 'none'\n  };\n  var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)((_img_loading_gif__WEBPACK_IMPORTED_MODULE_29___default())),\n    _useState14 = _slicedToArray(_useState13, 2),\n    verifyCodeImg = _useState14[0],\n    setVerifyCodeImg = _useState14[1];\n  var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(true),\n    _useState16 = _slicedToArray(_useState15, 2),\n    isPhoneLogin = _useState16[0],\n    setPhoneLogin = _useState16[1];\n  var oldAccount = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)();\n  var sendMessage = function sendMessage() {\n    if (vCodeTime !== 0) return false;\n    if (!checkSendMessageFormData({\n      dataPipeModel: props.dataPipeModel\n    })) return false;\n    _api_service__WEBPACK_IMPORTED_MODULE_22__.sendMessage({\n      useraccount: _store__WEBPACK_IMPORTED_MODULE_23__.mStore.account,\n      accountId: _store__WEBPACK_IMPORTED_MODULE_23__.mStore.accountId,\n      language: _store__WEBPACK_IMPORTED_MODULE_23__.mStore.lang,\n      loginid: verifyCodeToken,\n      verifycode: verifyCode\n    }).then(function (data) {\n      if (!data.success) {\n        //  eventBus.pub_ShowErrorMessage(error)\n        props.dataPipeModel && props.dataPipeModel.sendData({\n          type: 'ShowErrorMessage',\n          message: data.msg || data.description\n        });\n        getVerifyCode();\n      } else {\n        var _vCodeTime = data.timeout || 60;\n        setVCodeTime(_vCodeTime);\n        vCodeTimer.current = setInterval(function () {\n          if (_vCodeTime <= 0) {\n            clearInterval(vCodeTimer.current);\n          } else {\n            setVCodeTime(--_vCodeTime);\n          }\n        }, 1000);\n      }\n    });\n  };\n  function login(props) {\n    if (logining) return false;\n    if (!Account || !PhoneCode || !verifyCode) return false;\n    setLoginStatus(true);\n    var account = _store__WEBPACK_IMPORTED_MODULE_23__.mStore.account,\n      accountId = _store__WEBPACK_IMPORTED_MODULE_23__.mStore.accountId,\n      phoneCode = _store__WEBPACK_IMPORTED_MODULE_23__.mStore.phoneCode;\n    var redirect = (0,_util_toolUtils__WEBPACK_IMPORTED_MODULE_26__.getRedirect)();\n    if (redirect) {\n      redirect = decodeURIComponent(redirect);\n    }\n    _api_service__WEBPACK_IMPORTED_MODULE_22__.smsLogin({\n      useraccount: account,\n      accountId: accountId,\n      smsCode: phoneCode,\n      redirect: redirect || 'mobile.html',\n      needActive: false,\n      language: _store__WEBPACK_IMPORTED_MODULE_23__.mStore.lang,\n      loginid: verifyCodeToken,\n      verifycode: _store__WEBPACK_IMPORTED_MODULE_23__.mStore.verifyCode\n    }).then(function (data) {\n      var errorcode = data.errorcode,\n        needChangePwd = data.needChangePwd,\n        needChangeInitialPwd = data.needChangeInitialPwd,\n        message = data.message,\n        needActive = data.needActive,\n        msg = data.msg;\n      setLoginStatus(false);\n      if (needActive) {\n        window.location.hash = '#activeUser';\n        return false;\n      }\n      if (needChangePwd === 1 || needChangeInitialPwd === 1) {\n        window.location.hash = '#findPassword';\n        // eventBus.pub_ShowErrorMessage({ message: message })\n        props.dataPipeModel && props.dataPipeModel.sendData({\n          type: 'ShowErrorMessage',\n          message: message\n        });\n        return false;\n      }\n      if (errorcode !== 0) {\n        // eventBus.pub_ShowErrorMessage({ message: msg })\n        props.dataPipeModel && props.dataPipeModel.sendData({\n          type: 'ShowErrorMessage',\n          message: msg\n        });\n        return false;\n      } else {\n        var hashString = window.location.hash !== '#msgLogin' ? window.location.hash : '';\n        (0,_util_toolUtils__WEBPACK_IMPORTED_MODULE_26__.redirectByUrl)(data.RedirectURL, hashString, _store__WEBPACK_IMPORTED_MODULE_23__.mStore.dataCenter, accountId);\n      }\n    })[\"catch\"](function (e) {\n      setLoginStatus(false);\n    });\n  }\n  var handleChange = function handleChange(name, value) {\n    name === 'account' && setAccount(value);\n    name === 'phoneCode' && setPhoneCode(value);\n    name === 'verifyCode' && setVerifyCode(value);\n  };\n  var btnStyle = !Account || !PhoneCode ? {\n    background: '#85B8FF'\n  } : {};\n  var phoneCodeBtnClass = classnames__WEBPACK_IMPORTED_MODULE_24___default()(_defineProperty(_defineProperty({}, _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].phoneCodeBtn, true), _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].disable, vCodeTime !== 0));\n  var loginBtnText = logining ? (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('login.key186') : (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('login.key187');\n  var btnText = vCodeTime === 0 ? (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('login.key188') : (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)({\n    key: 'login.key189',\n    variables: {\n      vCodeTime: vCodeTime\n    }\n  });\n  var getVerifyCode = function getVerifyCode() {\n    setVerifyCodeImg((_img_loading_gif__WEBPACK_IMPORTED_MODULE_29___default()));\n    _api_service__WEBPACK_IMPORTED_MODULE_22__.getVerifyCode({\n      phone: _store__WEBPACK_IMPORTED_MODULE_23__.mStore.account,\n      v: (0,_util__WEBPACK_IMPORTED_MODULE_25__.getUid)(false, 8),\n      language: _store__WEBPACK_IMPORTED_MODULE_23__.mStore.lang\n    }).then(function (data) {\n      var message = data.description_cn || data.description;\n      if (message) {\n        props.dataPipeModel && props.dataPipeModel.sendData({\n          type: 'ShowErrorMessage',\n          message: message\n        });\n        return false;\n      }\n      setVerifyCodeImg(data.content || (_img_loading_gif__WEBPACK_IMPORTED_MODULE_29___default()));\n      setVerifyCodeToken(data.loginId);\n    });\n  };\n  var renderVerityCodeItem = function renderVerityCodeItem() {\n    var inputStyle = {\n      flexGrow: 1,\n      width: 180,\n      border: 'none'\n    };\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"div\", {\n      className: _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].verifyCodeItem\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(_base__WEBPACK_IMPORTED_MODULE_21__.Input, {\n      dataPipeModel: props.dataPipeModel,\n      onChange: handleChange,\n      name: \"verifyCode\",\n      placeholder: (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('login.key180'),\n      style: inputStyle\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"div\", {\n      className: _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].graphicCode,\n      onClick: getVerifyCode\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"img\", {\n      src: verifyCodeImg\n    })));\n  };\n  var handleAccountInputBlur = function handleAccountInputBlur() {\n    if (Account !== oldAccount.current) {\n      oldAccount.current = Account;\n      getVerifyCode();\n    }\n  };\n  var handleLoginTypeClick = function handleLoginTypeClick(isPhoneLogin) {\n    _util_toolUtils__WEBPACK_IMPORTED_MODULE_26__.myLocalStorage.setItem((0,_util_toolUtils__WEBPACK_IMPORTED_MODULE_26__.getNameWithCurrentEnvrionment)(_const__WEBPACK_IMPORTED_MODULE_30__.LOGIN_TYPE), isPhoneLogin ? _const__WEBPACK_IMPORTED_MODULE_30__.TEL : _const__WEBPACK_IMPORTED_MODULE_30__.ACT);\n    window.location.href = '#kingdeeCloud';\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    getVerifyCode();\n  }, []);\n  return (\n    /*#__PURE__*/\n    // <div className={style.main}>\n    //   <div className={style.panel}>\n    react__WEBPACK_IMPORTED_MODULE_19__.createElement(_LoginWrapper__WEBPACK_IMPORTED_MODULE_27__[\"default\"], props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"div\", {\n      className: _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].title\n    }, (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('login.key212')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(_base__WEBPACK_IMPORTED_MODULE_21__.DropdownList, {\n      name: \"accountId\",\n      list: dataCenter,\n      selectItem: currentAccountId,\n      onItemClick: handleChangeDataCenter,\n      dataPipeModel: props.dataPipeModel\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(_base_Telephone__WEBPACK_IMPORTED_MODULE_31__[\"default\"], {\n      telViaList: props.countryAreaCodes,\n      onBlur: handleAccountInputBlur,\n      dataPipeModel: props.dataPipeModel,\n      defaultValue: _store__WEBPACK_IMPORTED_MODULE_23__.mStore.account,\n      onChange: handleChange,\n      name: \"account\",\n      placeholder: (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('login.key191'),\n      inputType: \"phoneNumber\"\n    }), renderVerityCodeItem(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"div\", {\n      className: _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].phoneCodeWrapper\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(_base__WEBPACK_IMPORTED_MODULE_21__.Input, {\n      dataPipeModel: props.dataPipeModel,\n      onChange: handleChange,\n      name: \"phoneCode\",\n      placeholder: (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('login.key192'),\n      style: inputStyle\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"div\", {\n      className: _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].phoneCode\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"div\", {\n      className: phoneCodeBtnClass,\n      onClick: sendMessage\n    }, btnText))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(_base__WEBPACK_IMPORTED_MODULE_21__.Button, {\n      dataPipeModel: props.dataPipeModel,\n      style: btnStyle,\n      text: loginBtnText,\n      onClick: function onClick() {\n        login({\n          dataPipeModel: props.dataPipeModel\n        });\n      }\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"div\", {\n      className: _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].loginType\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"div\", {\n      className: _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].phoneLogin,\n      onClick: function onClick() {\n        handleLoginTypeClick(false);\n      }\n    }, \" \", (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('login.key213')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"div\", {\n      className: _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].line\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19__.createElement(\"div\", {\n      className: _MsgLogin_less__WEBPACK_IMPORTED_MODULE_20__[\"default\"].phoneLogin,\n      onClick: function onClick() {\n        handleLoginTypeClick(true);\n      }\n    }, \" \", (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('login.key214'))))\n  );\n}\nfunction checkSendMessageFormData(props) {\n  if (_util__WEBPACK_IMPORTED_MODULE_25__.validate.isEmpty(_store__WEBPACK_IMPORTED_MODULE_23__.mStore.account)) {\n    props.dataPipeModel && props.dataPipeModel.sendData({\n      type: 'ShowErrorMessage',\n      message: (0,_i18n_intlApi__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('login.key193')\n    });\n    return false;\n  }\n  // eventBus.pub_hideNotification()\n  props.dataPipeModel && props.dataPipeModel.sendData({\n    type: 'HideNotification'\n  });\n  return true;\n}\n\n//# sourceURL=webpack://kd-login/./src/page/mobile/MsgLogin.jsx?");

/***/ })

}]);