(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{

/***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Login.vue?vue&type=script&lang=js&":
/*!*********************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Login.vue?vue&type=script&lang=js& ***!
  \*********************************************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vee-validate */ \"./node_modules/vee-validate/dist/vee-validate.esm.js\");\n/* harmony import */ var _plugins_vee_validate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/plugins/vee-validate */ \"./src/plugins/vee-validate.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"Login\",\n  data: function data() {\n    return {\n      username: '',\n      password: '',\n      isLoading: true,\n      message: \"\",\n      notificationShow: false\n    };\n  },\n  components: {\n    ValidationObserver: vee_validate__WEBPACK_IMPORTED_MODULE_0__[\"ValidationObserver\"],\n    ValidationProvider: vee_validate__WEBPACK_IMPORTED_MODULE_0__[\"ValidationProvider\"]\n  },\n  mounted: function mounted() {\n    var _this = this;\n\n    this.$api.info.guideCheck().then(function (res) {\n      if (res.data.success == 200 && res.data.data.need_init_user) {\n        _this.$router.push(\"/welcome\");\n      } else {\n        _this.isLoading = false;\n\n        _this.$api.user.getUserInfo().then(function (user) {\n          _this.username = user.data.data.user_name;\n        });\n      }\n    });\n  },\n  methods: {\n    login: function login() {\n      var _this2 = this;\n\n      this.$api.user.login({\n        username: this.username,\n        pwd: this.password\n      }).then(function (res) {\n        if (res.data.success == 200) {\n          localStorage.setItem(\"user_token\", res.data.data.token);\n          localStorage.setItem(\"version\", res.data.data.version);\n\n          _this2.$store.commit('setToken', res.data.data.token);\n\n          _this2.$api.user.getUserInfo().then(function (res) {\n            if (res.data.success == 200) {\n              _this2.$store.commit('changeUserInfo', res.data.data);\n\n              _this2.$router.push('/');\n            }\n          });\n        } else {\n          _this2.notificationShow = true;\n          _this2.message = \"Username or Password error!\";\n        }\n      });\n    }\n  }\n});\n\n//# sourceURL=webpack:///./src/views/Login.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"5b843394-vue-loader-template\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Login.vue?vue&type=template&id=26084dc2&":
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5b843394-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Login.vue?vue&type=template&id=26084dc2& ***!
  \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\n    \"div\",\n    {\n      staticClass: \"is-flex is-justify-content-center is-align-items-center \",\n      attrs: { id: \"login-page\" }\n    },\n    [\n      !_vm.isLoading\n        ? _c(\n            \"div\",\n            { staticClass: \"login-panel step4 is-shadow\" },\n            [\n              _c(\"div\", { staticClass: \"is-flex is-justify-content-center \" }, [\n                _c(\n                  \"div\",\n                  { staticClass: \"has-text-centered\" },\n                  [\n                    _c(\"b-image\", {\n                      staticClass: \"is-128x128\",\n                      attrs: {\n                        src: __webpack_require__(/*! @/assets/img/Account.png */ \"./src/assets/img/Account.png\"),\n                        rounded: \"\"\n                      }\n                    }),\n                    _c(\n                      \"p\",\n                      { staticClass: \"is-size-5 has-text-weight-bold mt-3\" },\n                      [_vm._v(_vm._s(_vm.username))]\n                    )\n                  ],\n                  1\n                )\n              ]),\n              _c(\n                \"b-notification\",\n                {\n                  attrs: {\n                    \"auto-close\": \"\",\n                    type: \"is-danger\",\n                    \"aria-close-label\": \"Close notification\",\n                    role: \"alert\"\n                  },\n                  model: {\n                    value: _vm.notificationShow,\n                    callback: function($$v) {\n                      _vm.notificationShow = $$v\n                    },\n                    expression: \"notificationShow\"\n                  }\n                },\n                [_vm._v(\" \" + _vm._s(_vm.message) + \" \")]\n              ),\n              _c(\"ValidationObserver\", {\n                ref: \"observer\",\n                scopedSlots: _vm._u(\n                  [\n                    {\n                      key: \"default\",\n                      fn: function(ref) {\n                        var handleSubmit = ref.handleSubmit\n                        return [\n                          _c(\"ValidationProvider\", {\n                            attrs: {\n                              rules: \"required|min:5\",\n                              vid: \"password\",\n                              name: \"Password\"\n                            },\n                            scopedSlots: _vm._u(\n                              [\n                                {\n                                  key: \"default\",\n                                  fn: function(ref) {\n                                    var errors = ref.errors\n                                    var valid = ref.valid\n                                    return [\n                                      _c(\n                                        \"b-field\",\n                                        {\n                                          staticClass: \"mt-5 has-text-light\",\n                                          attrs: {\n                                            label: \"Password\",\n                                            type: {\n                                              \"is-danger\": errors[0],\n                                              \"is-success\": valid\n                                            },\n                                            message: errors\n                                          }\n                                        },\n                                        [\n                                          _c(\"b-input\", {\n                                            attrs: {\n                                              type: \"password\",\n                                              \"password-reveal\": \"\"\n                                            },\n                                            nativeOn: {\n                                              keyup: function($event) {\n                                                if (\n                                                  !$event.type.indexOf(\"key\") &&\n                                                  _vm._k(\n                                                    $event.keyCode,\n                                                    \"enter\",\n                                                    13,\n                                                    $event.key,\n                                                    \"Enter\"\n                                                  )\n                                                ) {\n                                                  return null\n                                                }\n                                                return handleSubmit(_vm.login)\n                                              }\n                                            },\n                                            model: {\n                                              value: _vm.password,\n                                              callback: function($$v) {\n                                                _vm.password = $$v\n                                              },\n                                              expression: \"password\"\n                                            }\n                                          })\n                                        ],\n                                        1\n                                      )\n                                    ]\n                                  }\n                                }\n                              ],\n                              null,\n                              true\n                            )\n                          }),\n                          _c(\n                            \"b-button\",\n                            {\n                              staticClass: \"mt-5\",\n                              attrs: {\n                                type: \"is-primary\",\n                                rounded: \"\",\n                                expanded: \"\"\n                              },\n                              on: {\n                                click: function($event) {\n                                  return handleSubmit(_vm.login)\n                                }\n                              }\n                            },\n                            [_vm._v(\"Login\")]\n                          )\n                        ]\n                      }\n                    }\n                  ],\n                  null,\n                  false,\n                  2828891333\n                )\n              })\n            ],\n            1\n          )\n        : _vm._e()\n    ]\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/views/Login.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%225b843394-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./src/views/Login.vue":
/*!*****************************!*\
  !*** ./src/views/Login.vue ***!
  \*****************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Login_vue_vue_type_template_id_26084dc2___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Login.vue?vue&type=template&id=26084dc2& */ \"./src/views/Login.vue?vue&type=template&id=26084dc2&\");\n/* harmony import */ var _Login_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Login.vue?vue&type=script&lang=js& */ \"./src/views/Login.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n  _Login_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _Login_vue_vue_type_template_id_26084dc2___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _Login_vue_vue_type_template_id_26084dc2___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/views/Login.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/views/Login.vue?");

/***/ }),

/***/ "./src/views/Login.vue?vue&type=script&lang=js&":
/*!******************************************************!*\
  !*** ./src/views/Login.vue?vue&type=script&lang=js& ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Login_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/babel-loader/lib!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib??vue-loader-options!./Login.vue?vue&type=script&lang=js& */ \"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Login.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Login_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/views/Login.vue?");

/***/ }),

/***/ "./src/views/Login.vue?vue&type=template&id=26084dc2&":
/*!************************************************************!*\
  !*** ./src/views/Login.vue?vue&type=template&id=26084dc2& ***!
  \************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_5b843394_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Login_vue_vue_type_template_id_26084dc2___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"5b843394-vue-loader-template\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib??vue-loader-options!./Login.vue?vue&type=template&id=26084dc2& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"5b843394-vue-loader-template\\\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Login.vue?vue&type=template&id=26084dc2&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_5b843394_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Login_vue_vue_type_template_id_26084dc2___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_5b843394_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Login_vue_vue_type_template_id_26084dc2___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/views/Login.vue?");

/***/ })

}]);