{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\pages\\login.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\pages\\login.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.string.iterator\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport Cookies from 'js-cookie';\nimport debounce from 'lodash/debounce';\nimport { messages } from '@/i18n';\nimport { getUUID, clearLoginInfo } from '@/utils';\nimport ajax from '@/utils/login';\nexport default {\n data: function data() {\n return {\n i18nMessages: messages,\n loading: false,\n captchaPath: '',\n dataForm: {\n username: '',\n password: '',\n uuid: '',\n captcha: '',\n grant_type: 'password'\n }\n };\n },\n computed: {\n dataRule: function dataRule() {\n return {\n username: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n password: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n captcha: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }]\n };\n }\n },\n mounted: function mounted() {\n this.getCaptcha();\n },\n methods: {\n // 获取验证码\n getCaptcha: function getCaptcha() {\n this.dataForm.uuid = getUUID();\n this.captchaPath = \"\".concat(window.SITE_CONFIG['apiURL'], \"/auth/captcha?uuid=\").concat(this.dataForm.uuid);\n },\n loginSelf: function loginSelf() {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n _this.$http.post('/auth/oauth/token', _this.dataForm, {\n headers: {\n 'content-type': 'application/x-www-form-urlencoded',\n 'Authorization': 'Basic cmVucmVuaW86cmVucmVuaW8='\n }\n }).then(function (_ref) {\n var res = _ref.data;\n\n if (res.code !== 0) {\n reject(res.msg);\n\n _this.getCaptcha();\n }\n\n resolve('success');\n Cookies.set('access_token', res.access_token);\n }).catch(function (err) {\n reject(err.response.data);\n });\n });\n },\n login3dSystem: function login3dSystem() {\n var _this2 = this;\n\n return new Promise(function (resolve, reject) {\n ajax({\n url: \"/map/account/token\",\n method: \"post\",\n headers: {\n 'Authorization': ''\n },\n data: {\n loginName: _this2.dataForm.username,\n password: _this2.dataForm.password\n }\n }).then(function (_ref2) {\n var res = _ref2.data;\n\n if (res.status != 200) {\n reject(res.result);\n }\n\n resolve('success');\n Cookies.set('token', res.result.token);\n }).catch(function (err) {\n reject(err.data.msg);\n });\n });\n },\n // 表单提交\n dataFormSubmitHandle: function dataFormSubmitHandle() {\n var _this3 = this;\n\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n\n _this3.loading = true; // this.login3dSystem()\n // 两个系统全部登录成功后 进入系统 ,this.login3dSystem()\n\n Promise.all(process.env.NODE_ENV === \"development\" ? [_this3.loginSelf()] : [_this3.loginSelf(), _this3.login3dSystem()]).then(function (result) {\n _this3.$router.replace({\n name: 'home'\n });\n }).catch(function (err) {\n clearLoginInfo();\n console.error(err);\n\n if (err.indexOf(\"Service\") >= 0) {\n _this3.$message.error(\"系统升级中,请耐心等待!\");\n } else {\n _this3.$message.error(err);\n }\n }).finally(function () {\n _this3.loading = false;\n });\n });\n }\n }\n};",{"version":3,"sources":["login.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,OAAA,OAAA,MAAA,WAAA;AACA,OAAA,QAAA,MAAA,iBAAA;AACA,SACA,QADA,QAEA,QAFA;AAGA,SACA,OADA,EAEA,cAFA,QAGA,SAHA;AAIA,OAAA,IAAA,MAAA,eAAA;AACA,eAAA;AACA,EAAA,IADA,kBACA;AACA,WAAA;AACA,MAAA,YAAA,EAAA,QADA;AAEA,MAAA,OAAA,EAAA,KAFA;AAGA,MAAA,WAAA,EAAA,EAHA;AAIA,MAAA,QAAA,EAAA;AACA,QAAA,QAAA,EAAA,EADA;AAEA,QAAA,QAAA,EAAA,EAFA;AAGA,QAAA,IAAA,EAAA,EAHA;AAIA,QAAA,OAAA,EAAA,EAJA;AAKA,QAAA,UAAA,EAAA;AALA;AAJA,KAAA;AAYA,GAdA;AAeA,EAAA,QAAA,EAAA;AACA,IAAA,QADA,sBACA;AACA,aAAA;AACA,QAAA,QAAA,EAAA,CAAA;AACA,UAAA,QAAA,EAAA,IADA;AAEA,UAAA,OAAA,EAAA,KAAA,EAAA,CAAA,mBAAA,CAFA;AAGA,UAAA,OAAA,EAAA;AAHA,SAAA,CADA;AAMA,QAAA,QAAA,EAAA,CAAA;AACA,UAAA,QAAA,EAAA,IADA;AAEA,UAAA,OAAA,EAAA,KAAA,EAAA,CAAA,mBAAA,CAFA;AAGA,UAAA,OA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