1 line
4.8 KiB
JSON
1 line
4.8 KiB
JSON
{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\hz-zhhq-web\\src\\views\\login\\index_test.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\login\\index_test.vue","mtime":1737610069434},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1740463332762},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":1740463332584},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1740463332762},{"path":"E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js","mtime":1740463340941}],"contextDependencies":[],"result":["\"use strict\";\n\nvar _interopRequireDefault = require(\"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nrequire(\"core-js/modules/es6.regexp.replace\");\nrequire(\"core-js/modules/es6.regexp.to-string\");\nvar _getdata = require(\"@/api/getdata\");\nvar _auth = require(\"@/utils/auth\");\nvar _cryptoJs = _interopRequireDefault(require(\"crypto-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\nvar KEY = _cryptoJs.default.enc.Utf8.parse(\"greenh5java12345\");\nvar IV = _cryptoJs.default.enc.Utf8.parse(\"greenh5java12345\");\nvar _default = exports.default = {\n data: function data() {\n return {\n dataForm: {\n userName: '',\n password: '',\n uuid: '',\n captcha: '',\n verCode: \"\",\n codeId: \"\"\n },\n dataRule: {\n userName: [{\n required: true,\n message: '帐号不能为空',\n trigger: 'blur'\n }],\n password: [{\n required: true,\n message: '密码不能为空',\n trigger: 'blur'\n }],\n verCode: [{\n required: true,\n message: '验证码不能为空',\n trigger: 'blur'\n }]\n },\n captchaPath: '',\n loading: false,\n //初始化loading\n loadingMsg: \"\",\n codeImg: \"\",\n codeId: \"\"\n };\n },\n created: function created() {\n this.getVerCode();\n },\n methods: {\n createLoad: function createLoad() {\n this.loading = true;\n this.loadingMsg = \"登录中...\";\n },\n clearLoad: function clearLoad() {\n this.loading = false;\n this.loadingMsg = \"\";\n },\n getVerCode: function getVerCode() {\n var _this = this;\n (0, _getdata.getVerCode)({}).then(function (res) {\n if (res.returnCode == \"1\") {\n _this.clearLoad();\n console.log(res);\n _this.codeImg = \"data:image/jpeg;base64,\" + res.returnData.imgBase64;\n _this.dataForm.codeId = res.returnData.imgUUID;\n } else {\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n });\n },\n // 提交表单\n dataFormSubmit: function dataFormSubmit() {\n var _this2 = this;\n this.$refs['dataForm'].validate(function (valid) {\n if (valid) {\n _this2.createLoad();\n var userPossword = _cryptoJs.default.AES.encrypt(_this2.dataForm.password, KEY, {\n iv: IV,\n mode: _cryptoJs.default.mode.CBC,\n padding: _cryptoJs.default.pad.ZeroPadding\n }).toString();\n var Content = {\n 'loginName': _this2.dataForm.userName,\n 'userPossword': userPossword,\n 'verCode': _this2.dataForm.verCode,\n 'codeId': _this2.dataForm.codeId\n };\n (0, _getdata.userLogin)(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this2.clearLoad();\n (0, _auth.setToken)(res.returnData.token);\n _this2.$router.replace({\n name: 'home'\n });\n } else {\n _this2.getVerCode();\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this2.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this2.clearLoad();\n }, 300);\n });\n }\n });\n }\n }\n};",null]} |