management/front/dkha-web-sz-main/node_modules/.cache/vue-loader/69d8731bde579689e76a9bfa540...

1 line
16 KiB
JSON
Raw Normal View History

2023-12-18 13:12:25 +08:00
{"remainingRequest":"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":["//\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 {\n\tmessages\n} from '@/i18n'\nimport {\n\tgetUUID,\n\tclearLoginInfo\n} from '@/utils'\nimport ajax from '@/utils/login'\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ti18nMessages: messages,\n\t\t\tloading: false,\n\t\t\tcaptchaPath: '',\n\t\t\tdataForm: {\n\t\t\t\tusername: '',\n\t\t\t\tpassword: '',\n\t\t\t\tuuid: '',\n\t\t\t\tcaptcha: '',\n\t\t\t\tgrant_type: 'password'\n\t\t\t}\n\t\t}\n\t},\n\tcomputed: {\n\t\tdataRule() {\n\t\t\treturn {\n\t\t\t\tusername: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: this.$t('validate.required'),\n\t\t\t\t\ttrigger: 'blur'\n\t\t\t\t}],\n\t\t\t\tpassword: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: this.$t('validate.required'),\n\t\t\t\t\ttrigger: 'blur'\n\t\t\t\t}],\n\t\t\t\tcaptcha: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: this.$t('validate.required'),\n\t\t\t\t\ttrigger: 'blur'\n\t\t\t\t}]\n\t\t\t}\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.getCaptcha()\n\t},\n\tmethods: {\n\t\t// 获取验证码\n\t\tgetCaptcha() {\n\t\t\tthis.dataForm.uuid = getUUID()\n\t\t\tthis.captchaPath = `${window.SITE_CONFIG['apiURL']}/auth/captcha?uuid=${this.dataForm.uuid}`\n\t\t},\n\t\tloginSelf() {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tthis.$http.post('/auth/oauth/token', this.dataForm, {\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'content-type': 'application/x-www-form-urlencoded',\n\t\t\t\t\t\t'Authorization': 'Basic cmVucmVuaW86cmVucmVuaW8='\n\t\t\t\t\t}\n\t\t\t\t}).then(({\n\t\t\t\t\tdata: res\n\t\t\t\t}) => {\n\t\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\t\treject(res.msg)\n\t\t\t\t\t\tthis.getCaptcha()\n\t\t\t\t\t}\n\t\t\t\t\tresolve('success')\n\t\t\t\t\tCookies.set('access_token', res.access_token)\n\t\t\t\t}).catch(err => {\n\t\t\t\t\treject(err.response.data)\n\t\t\t\t})\n\t\t\t})\n\t\t},\n\t\tlogin3dSystem() {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tajax({\n\t\t\t\t\turl: \"/map/account/token\",\n\t\t\t\t\tmethod: \"post\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Authorization': ''\n\t\t\t\t\t},\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tloginName: this.dataForm.username,\n\t\t\t\t\t\tpassword: this.dataForm.password\n\t\t\t\t\t}\n\t\t\t\t}).then(({\n\t\t\t\t\tdata: res\n\t\t\t\t}) => {\n\t\t\t\t\tif (res.status != 200) {\n\t\t\t\t\t\treject(res.result)\n\t\t\t\t\t}\n\t\t\t\t\tresolve('success')\n\t\t\t\t\tCookies.set('token', res.result.token)\n\t\t\t\t}).catch(err => {\n\t\t\t\t\treject(err.data.msg)\n\t\t\t\t})\n\t\t\t})\n\t\t},\n\t\t// 表单提交\n\t\tdataFormSubmitHandle() {\n\t\t\tthis.$refs['dataForm'].validate((valid) => {\n\t\t\t\tif (!valid) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tthis.loading = true;\n\t\t\t\t// this.login3dSystem()\n\t\t\t\t// 两个系统全部登录成功后 进入系统 ,this.login3dSystem()\n\t\t\t\tPromise.all(process.env.NODE_ENV === \"development\" ? [this.loginSel