You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
homestay/minsu/admin/node_modules/.cache/vue-loader/64bb9cbe7bdc2b816bfc4f9049b...

1 line
24 KiB

{"remainingRequest":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\src\\views\\login.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\src\\views\\login.vue","mtime":1649818275992},{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1720078528573},{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\babel-loader\\lib\\index.js","mtime":1720078529261},{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1720078528573},{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":1720078529317}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KCmltcG9ydCBtZW51IGZyb20gIkAvdXRpbHMvbWVudSI7CmV4cG9ydCBkZWZhdWx0IHsKICAgIGRhdGEoKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgcnVsZXNGb3JtOiB7CiAgICAgICAgICAgICAgICB1c2VybmFtZTogIiIsCiAgICAgICAgICAgICAgICBwYXNzd29yZDogIiIsCiAgICAgICAgICAgICAgICByb2xlOiAiIiwKICAgICAgICAgICAgICAgIGNvZGU6ICcnLAogICAgICAgICAgICB9LAogICAgICAgICAgICBtZW51czogW10sCiAgICAgICAgICAgIHRhYmxlTmFtZTogIiIsCiAgICAgICAgICAgIGNvZGVzOiBbewogICAgICAgICAgICAgICAgbnVtOiAxLAogICAgICAgICAgICAgICAgY29sb3I6ICcjMDAwJywKICAgICAgICAgICAgICAgIHJvdGF0ZTogJzEwZGVnJywKICAgICAgICAgICAgICAgIHNpemU6ICcxNnB4JwogICAgICAgICAgICB9LHsKICAgICAgICAgICAgICAgIG51bTogMiwKICAgICAgICAgICAgICAgIGNvbG9yOiAnIzAwMCcsCiAgICAgICAgICAgICAgICByb3RhdGU6ICcxMGRlZycsCiAgICAgICAgICAgICAgICBzaXplOiAnMTZweCcKICAgICAgICAgICAgfSx7CiAgICAgICAgICAgICAgICBudW06IDMsCiAgICAgICAgICAgICAgICBjb2xvcjogJyMwMDAnLAogICAgICAgICAgICAgICAgcm90YXRlOiAnMTBkZWcnLAogICAgICAgICAgICAgICAgc2l6ZTogJzE2cHgnCiAgICAgICAgICAgIH0sewogICAgICAgICAgICAgICAgbnVtOiA0LAogICAgICAgICAgICAgICAgY29sb3I6ICcjMDAwJywKICAgICAgICAgICAgICAgIHJvdGF0ZTogJzEwZGVnJywKICAgICAgICAgICAgICAgIHNpemU6ICcxNnB4JwogICAgICAgICAgICB9XSwKICAgICAgICB9OwogICAgfSwKICAgIG1vdW50ZWQoKSB7CiAgICAgICAgbGV0IG1lbnVzID0gbWVudS5saXN0KCk7CiAgICAgICAgdGhpcy5tZW51cyA9IG1lbnVzOwogICAgfSwKICAgIGNyZWF0ZWQoKSB7CiAgICAgICAgdGhpcy5zZXRJbnB1dENvbG9yKCkKICAgICAgICB0aGlzLmdldFJhbmRDb2RlKCkKICAgIH0sCiAgICBtZXRob2RzOiB7CiAgICAgICAgc2V0SW5wdXRDb2xvcigpewogICAgICAgICAgICB0aGlzLiRuZXh0VGljaygoKT0+ewogICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmxvZ2luSW4gLmVsLWlucHV0X19pbm5lcicpLmZvckVhY2goZWw9PnsKICAgICAgICAgICAgICAgIGVsLnN0eWxlLmJhY2tncm91bmRDb2xvciA9ICJyZ2JhKDIwMiwgMjAyLCAyMDIsIDEpIgogICAgICAgICAgICBlbC5zdHlsZS5jb2xvciA9ICJyZ2JhKDEyOSwgMTI5LCAxMjksIDEpIgogICAgICAgICAgICBlbC5zdHlsZS5oZWlnaHQgPSAiNDZweCIKICAgICAgICAgICAgZWwuc3R5bGUubGluZUhlaWdodCA9ICI0NnB4IgogICAgICAgICAgICBlbC5zdHlsZS5ib3JkZXJSYWRpdXMgPSAiMjVweCIKICAgICAgICB9KQogICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcubG9naW5JbiAuc3R5bGUzIC5lbC1mb3JtLWl0ZW1fX2xhYmVsJykuZm9yRWFjaChlbD0+ewogICAgICAgICAgICAgICAgZWwuc3R5bGUuaGVpZ2h0ID0gIjQ2cHgiCiAgICAgICAgICAgIGVsLnN0eWxlLmxpbmVIZWlnaHQgPSAiNDZweCIKICAgICAgICB9KQogICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcubG9naW5JbiAuZWwtZm9ybS1pdGVtX19sYWJlbCcpLmZvckVhY2goZWw9PnsKICAgICAgICAgICAgICAgIGVsLnN0eWxlLmNvbG9yID0gInJnYigwIDAgMCkiCiAgICAgICAgfSkKICAgICAgICAgICAgc2V0VGltZW91dCgoKT0+ewogICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmxvZ2luSW4gLnJvbGUgLmVsLXJhZGlvX19sYWJlbCcpLmZvckVhY2goZWw9PnsKICAgICAgICAgICAgICAgIGVsLnN0eWxlLmNvbG9yID0gInJnYigwIDAgMCkiCiAgICAgICAgfSkKICAgICAgICB9LDM1MCkKICAgICAgICB9KQoKICAgICAgICB9LAogICAgICAgIHJlZ2lzdGVyKHRhYmxlTmFtZSl7CiAgICAgICAgICAgIHRoaXMuJHN0b3JhZ2Uuc2V0KCJsb2dpblRhYmxlIiwgdGFibGVOYW1lKTsKICAgICAgICAgICAgdGhpcy4kcm91dGVyLnB1c2goe3BhdGg6Jy9yZWdpc3Rlcid9KQogICAgICAgIH0sCiAgICAgICAgLy8g55m76ZmGCiAgICAgICAgbG9naW4oKSB7CiAgICAgICAgICAgIGxldCBjb2RlID0gJycKICAgICAgICAgICAgZm9yKGxldCBpIGluIHRoaXMuY29kZXMpIHsKICAgICAgICAgICAgICAgIGNvZGUgKz0gdGhpcy5jb2Rlc1tpXS5udW0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoJzAnID09ICcxJyAmJiAhdGhpcy5ydWxlc0Zvcm0uY29kZSkgewogICAgICAgICAgICAgICAgdGhpcy4kbWVzc2FnZS5lcnJvcigi6K+36L6T5YWl6aqM6K+B56CBIik7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCcwJyA9PSAnMScgJiYgdGhpcy5ydWxlc0Zvcm0uY29kZS50b0xvd2VyQ2FzZSgpICE9IGNvZGUudG9Mb3dlckNhc2UoKSkgewogICAgICAgICAgICAgICAgdGhpcy4kbWVzc2FnZS5lcnJvcigi6aqM6K+B56CB6L6T5YWl5pyJ6K+vIik7CiAgICAgICAgICAgICAgICB0aGlzLmdldFJhbmRDb2RlKCkKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIXRoaXMucnVsZXNGb3JtLnVzZXJuYW1lKSB7CiAgICAgICAgICAgICAgICB0aGlzLiRtZXNzYWdlLmVycm9yKCLor7fovpPlhaXnlKjmiLflkI0iKTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIXRoaXMucnVsZXNGb3JtLnBhc3N3b3JkKSB7CiAgICAgICAgICAgICAgICB0aGlzLiRtZXNzYWdlLmVycm9yKCLor7fovpPlhaXlr4bnoIEiKTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoIXRoaXMucnVsZXNGb3JtLnJvbGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuJG1lc3NhZ2UuZXJyb3IoIuivt+mAieaLqeinkuiJsiIpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBtZW51cyA9IHRoaXMubWVudXM7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbWVudXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGlmIChtZW51c1tpXS5yb2xlTmFtZSA9PSB0aGlzLnJ1bGVzRm9ybS5yb2xlKSB7CiAgICAgICAgICAgICAgICAgICAgdGhpcy50YWJsZU5hbWUgPSBtZW51c1tpXS50YWJsZU5hbWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhpcy4kaHR0cCh7CiAgICAgICAgICAgICAgICB1cmw6IGAke3RoaXMudGFibGVOYW1lfS9sb2dpbj91c2VybmFtZT0ke3RoaXMucnVsZXNGb3JtLnVzZXJuYW1lfSZwYXNzd29yZD0ke3RoaXMucnVsZXNGb3JtLnBhc3N3b3JkfWAsCiAgICAgICAgICAgICAgICBtZXRob2Q6ICJwb3N0IgogICAgICAgICAgICB9KS50aGVuKCh7IGRhdGEgfSkgPT4gewogICAgICAgICAgICAgICAgaWYgKGRhdGEgJiYgZGF0YS5jb2RlID09PSAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLiRzdG9yYWdlLnNldCgiVG9rZW4iLCBkYXRhLnRva2VuKTsKICAgICAgICAgICAgICAgIHRoaXMuJHN0b3JhZ2Uuc2V0KCJ1c2VySWQiLCBkYXRhLnVzZXJJZCk7CiAgICAgICAgICAgICAgICB0aGlzLiRzdG9yYWdlLnNldCgicm9sZSIsIHRoaXMucnVsZXNGb3JtLnJvbGUpOwogICAgICAgICAgICAgICAgdGhpcy4kc3RvcmFnZS5zZXQoInNlc3Npb25UYWJsZSIsIHRoaXMudGFibGVOYW1lKTsKICAgICAgICAgICAgICAgIHRoaXMuJHN0b3JhZ2Uuc2V0KCJhZG1pbk5hbWUiLCB0aGlzLnJ1bGVzRm9ybS51c2VybmFtZSk7CiAgICAgICAgICAgICAgICB0aGlzLiRyb3V0ZXIucmVwbGFjZSh7IHBhdGg6ICIvaW5kZXgvIiB9KTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHRoaXMuJG1lc3NhZ2UuZXJyb3IoZGF0YS5tc2cpOwogICAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgICAgfSwKICAgICAgICBnZXRSYW5kQ29kZShsZW4gPSA0KXsKICAgICAgICAgICAgdGhpcy5yYW5kb21TdHJpbmcobGVuKQogICAgICAgIH0sCiAgICAgICAgcmFuZG9tU3RyaW5nKGxlbiA9IDQpIHsKICAgICAgICAgICAgbGV0IGNoYXJzID0gWwogICAgICAgICAgICAgICAgImEiLCAiYiIsICJjIiwgImQiLCAiZSIsICJmIiwgImciLCAiaCIsICJpIiwgImoiLCAiayIsCiAgICAgICAgICAgICAgICAibCIsICJtIiwgIm4iLCAibyIsICJwIiwgInEiLCAiciIsICJzIiwgInQiLCAidSIsICJ2IiwKICAgICAgICAgICAgICAgICJ3IiwgIngiLCAieSIsICJ6IiwgIkEiLCAiQiIsICJDIiwgIkQiLCAiRSIsICJGIiwgIkciLAogICAgICAgICAgICAgICAgIkgiLCAiSSIsICJKIiwgIksiLCAiTCIsICJNIiwgIk4iLCAiTyIsICJQIiwgIlEiLCAiUiIsCiAgICAgICAgICAgICAgICAiUyIsICJUIiwgIlUiLCAiViIsICJXIiwgIlgiLCAiWSIsICJaIiwgIjAiLCAiMSIsICIyIiwKICAgICAgICAgICAgICAgICIzIiwgIjQiLCAiNSIsICI2IiwgIjciLCAiOCIsICI5IgogICAgICAgICAgICBdCiAgICAgICAgICAgIGxldCBjb2xvcnMgPSBbIjAiLCAiMSIsICIyIiwiMyIsICI0IiwgIjUiLCAiNiIsICI3IiwgIjgiLCAiOSIsICJhIiwgImIiLCAiYyIsICJkIiwgImUiLCAiZiJdCiAgICAgICAgICAgIGxldCBzaXplcyA9IFsnMTQnLCAnMTUnLCAnMTYnLCAnMTcnLCAnMTgnXQoKICAgICAgICAgICAgbGV0IG91dHB1dCA9IFtdOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgICAgICAvLyDpmo/mnLrpqozor4HnoIEKICAgICAgICAgICAgICAgIGxldCBrZXkgPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkqY2hhcnMubGVuZ3RoKQogICAgICAgICAgICAgICAgdGhpcy5jb2Rlc1tpXS5udW0gPSBjaGFyc1trZXldCiAgICAgICAgICAgICAgICAvLyDpmo/mnLrpqozor4HnoIHpopzoibIKICAgICAgICAgICAgICAgIGxldCBjb2RlID0gJyMnCiAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IDY7IGorKykgewogICAgICAgICAgICAgICAgICAgIGxldCBrZXkgPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkqY29sb3JzLmxlbmd0aCkKICAgICAgICAgICAgICAgICAgICBjb2RlICs9IGNvbG9yc1trZXldCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB0aGlzLmNvZGVzW2ldLmNvbG9yID0gY29kZQogICAgICAgICAgICAgICAgLy8g6ZqP5py66aqM6K+B56CB5pa55ZCRCiAgICAgICAgICAgICAgICBsZXQgcm90YXRlID0gTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpKjYwKQogICAgICAgICAgICAgICAgbGV0IHBsdXMgPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkqMikKICAgICAgICAgICAgICAgIGlmKHBsdXMgPT0gMSkgcm90YXRlID0gJy0nK3JvdGF0ZQogICAgICAgICAgICAgICAgdGhpcy5jb2Rlc1tpXS5yb3RhdGUgPSAncm90YXRlKCcrcm90YXRlKydkZWcpJwogICAgICAgICAgICAgICAgLy8g6ZqP5py66aqM6K+B56CB5a2X5L2T5aSn5bCPCiAgICAgICAgICAgICAgICBsZXQgc2l6ZSA9IE1hdGguZmxvb3IoTWF0aC5yYW5kb20oKSpzaXplcy5sZW5ndGgpCiAgICAgICAgICAgICAgICB0aGlzLmNvZGVzW2ldLnNpemUgPSBzaXplc1tzaXplXSsncHgnCiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgfQp9Owo="},{"version":3,"sources":["login.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"login.vue","sourceRoot":"src/views","sourcesContent":["<template>\r\n <div>\r\n <div class=\"container loginIn\" style=\"backgroundImage: url(/minsuguanliw/img/back-img-bg.jpg)\">\r\n\r\n <div :class=\"2 == 1 ? 'left' : 2 == 2 ? 'left center' : 'left right'\" style=\"backgroundColor: rgba(255, 255, 255, 0.15)\">\r\n <el-form class=\"login-form\" label-position=\"left\" :label-width=\"1 == 3 ? '56px' : '0px'\">\r\n <div class=\"title-container\"><h3 class=\"title\" style=\"color: rgba(7, 0, 255, 1)\">民宿管理系统</h3></div>\r\n <el-form-item :label=\"1 == 3 ? '用户名' : ''\" :class=\"'style'+1\">\r\n <span v-if=\"1 != 3\" class=\"svg-container\" style=\"color:rgba(18, 18, 18, 1);line-height:44px\"><svg-icon icon-class=\"user\" /></span>\r\n <el-input placeholder=\"请输入用户名\" name=\"username\" type=\"text\" v-model=\"rulesForm.username\" />\r\n </el-form-item>\r\n <el-form-item :label=\"1 == 3 ? '密码' : ''\" :class=\"'style'+1\">\r\n <span v-if=\"1 != 3\" class=\"svg-container\" style=\"color:rgba(18, 18, 18, 1);line-height:44px\"><svg-icon icon-class=\"password\" /></span>\r\n <el-input placeholder=\"请输入密码\" name=\"password\" type=\"password\" v-model=\"rulesForm.password\" />\r\n </el-form-item>\r\n <el-form-item v-if=\"0 == '1'\" class=\"code\" :label=\"1 == 3 ? '验证码' : ''\" :class=\"'style'+1\">\r\n <span v-if=\"1 != 3\" class=\"svg-container\" style=\"color:rgba(18, 18, 18, 1);line-height:44px\"><svg-icon icon-class=\"code\" /></span>\r\n <el-input placeholder=\"请输入验证码\" name=\"code\" type=\"text\" v-model=\"rulesForm.code\" />\r\n <div class=\"getCodeBt\" @click=\"getRandCode(4)\" style=\"height:44px;line-height:44px\">\r\n <span v-for=\"(item, index) in codes\" :key=\"index\" :style=\"{color:item.color,transform:item.rotate,fontSize:item.size}\">{{ item.num }}</span>\r\n </div>\r\n </el-form-item>\r\n <el-form-item label=\"角色\" prop=\"loginInRole\" class=\"role\">\r\n <el-radio\r\n v-for=\"item in menus\"\r\n v-if=\"item.hasBackLogin=='是'\"\r\n v-bind:key=\"item.roleName\"\r\n v-model=\"rulesForm.role\"\r\n :label=\"item.roleName\"\r\n >{{item.roleName}}</el-radio>\r\n </el-form-item>\r\n <el-button type=\"primary\" @click=\"login()\" class=\"loginInBt\" style=\"padding:0;font-size:16px;border-radius:4px;height:44px;line-height:44px;width:100%;backgroundColor:rgba(117, 113, 249, 1); borderColor:rgba(117, 113, 249, 1); color:rgba(255, 255, 255, 1)\">{{'2' == '1' ? '登录' : 'login'}}</el-button>\r\n <el-form-item class=\"setting\">\r\n <div style=\"color:rgba(0, 150, 136, 1)\" class=\"register\" @click=\"register('yonghu')\">用户注册</div>\r\n </el-form-item>\r\n </el-form>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\n import menu from \"@/utils/menu\";\r\n export default {\r\n data() {\r\n return {\r\n rulesForm: {\r\n username: \"\",\r\n password: \"\",\r\n role: \"\",\r\n code: '',\r\n },\r\n menus: [],\r\n tableName: \"\",\r\n codes: [{\r\n num: 1,\r\n color: '#000',\r\n rotate: '10deg',\r\n size: '16px'\r\n },{\r\n num: 2,\r\n color: '#000',\r\n rotate: '10deg',\r\n size: '16px'\r\n },{\r\n num: 3,\r\n color: '#000',\r\n rotate: '10deg',\r\n size: '16px'\r\n },{\r\n num: 4,\r\n color: '#000',\r\n rotate: '10deg',\r\n size: '16px'\r\n }],\r\n };\r\n },\r\n mounted() {\r\n let menus = menu.list();\r\n this.menus = menus;\r\n },\r\n created() {\r\n this.setInputColor()\r\n this.getRandCode()\r\n },\r\n methods: {\r\n setInputColor(){\r\n this.$nextTick(()=>{\r\n document.querySelectorAll('.loginIn .el-input__inner').forEach(el=>{\r\n el.style.backgroundColor = \"rgba(202, 202, 202, 1)\"\r\n el.style.color = \"rgba(129, 129, 129, 1)\"\r\n el.style.height = \"46px\"\r\n el.style.lineHeight = \"46px\"\r\n el.style.borderRadius = \"25px\"\r\n })\r\n document.querySelectorAll('.loginIn .style3 .el-form-item__label').forEach(el=>{\r\n el.style.height = \"46px\"\r\n el.style.lineHeight = \"46px\"\r\n })\r\n document.querySelectorAll('.loginIn .el-form-item__label').forEach(el=>{\r\n el.style.color = \"rgb(0 0 0)\"\r\n })\r\n setTimeout(()=>{\r\n document.querySelectorAll('.loginIn .role .el-radio__label').forEach(el=>{\r\n el.style.color = \"rgb(0 0 0)\"\r\n })\r\n },350)\r\n })\r\n\r\n },\r\n register(tableName){\r\n this.$storage.set(\"loginTable\", tableName);\r\n this.$router.push({path:'/register'})\r\n },\r\n // 登陆\r\n login() {\r\n let code = ''\r\n for(let i in this.codes) {\r\n code += this.codes[i].num\r\n }\r\n if ('0' == '1' && !this.rulesForm.code) {\r\n this.$message.error(\"请输入验证码\");\r\n return;\r\n }\r\n if ('0' == '1' && this.rulesForm.code.toLowerCase() != code.toLowerCase()) {\r\n this.$message.error(\"验证码输入有误\");\r\n this.getRandCode()\r\n return;\r\n }\r\n if (!this.rulesForm.username) {\r\n this.$message.error(\"请输入用户名\");\r\n return;\r\n }\r\n if (!this.rulesForm.password) {\r\n this.$message.error(\"请输入密码\");\r\n return;\r\n }\r\n if (!this.rulesForm.role) {\r\n this.$message.error(\"请选择角色\");\r\n return;\r\n }\r\n let menus = this.menus;\r\n for (let i = 0; i < menus.length; i++) {\r\n if (menus[i].roleName == this.rulesForm.role) {\r\n this.tableName = menus[i].tableName;\r\n }\r\n }\r\n this.$http({\r\n url: `${this.tableName}/login?username=${this.rulesForm.username}&password=${this.rulesForm.password}`,\r\n method: \"post\"\r\n }).then(({ data }) => {\r\n if (data && data.code === 0) {\r\n this.$storage.set(\"Token\", data.token);\r\n this.$storage.set(\"userId\", data.userId);\r\n this.$storage.set(\"role\", this.rulesForm.role);\r\n this.$storage.set(\"sessionTable\", this.tableName);\r\n this.$storage.set(\"adminName\", this.rulesForm.username);\r\n this.$router.replace({ path: \"/index/\" });\r\n } else {\r\n this.$message.error(data.msg);\r\n }\r\n });\r\n },\r\n getRandCode(len = 4){\r\n this.randomString(len)\r\n },\r\n randomString(len = 4) {\r\n let chars = [\r\n \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\",\r\n \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\",\r\n \"w\", \"x\", \"y\", \"z\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\",\r\n \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\",\r\n \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"0\", \"1\", \"2\",\r\n \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"\r\n ]\r\n let colors = [\"0\", \"1\", \"2\",\"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]\r\n let sizes = ['14', '15', '16', '17', '18']\r\n\r\n let output = [];\r\n for (let i = 0; i < len; i++) {\r\n // 随机验证码\r\n let key = Math.floor(Math.random()*chars.length)\r\n this.codes[i].num = chars[key]\r\n // 随机验证码颜色\r\n let code = '#'\r\n for (let j = 0; j < 6; j++) {\r\n let key = Math.floor(Math.random()*colors.length)\r\n code += colors[key]\r\n }\r\n this.codes[i].color = code\r\n // 随机验证码方向\r\n let rotate = Math.floor(Math.random()*60)\r\n let plus = Math.floor(Math.random()*2)\r\n if(plus == 1) rotate = '-'+rotate\r\n this.codes[i].rotate = 'rotate('+rotate+'deg)'\r\n // 随机验证码字体大小\r\n let size = Math.floor(Math.random()*sizes.length)\r\n this.codes[i].size = sizes[size]+'px'\r\n }\r\n },\r\n }\r\n };\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n .loginIn {\r\n min-height: 100vh;\r\n position: relative;\r\n background-repeat: no-repeat;\r\n background-position: center center;\r\n background-size: cover;\r\n\r\n .left {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n width: 360px;\r\n height: 100%;\r\n\r\n .login-form {\r\n background-color: transparent;\r\n width: 100%;\r\n right: inherit;\r\n padding: 0 12px;\r\n box-sizing: border-box;\r\n display: flex;\r\n justify-content: center;\r\n flex-direction: column;\r\n }\r\n\r\n .title-container {\r\n text-align: center;\r\n font-size: 24px;\r\n\r\n .title {\r\n margin: 20px 0;\r\n }\r\n }\r\n\r\n .el-form-item {\r\n position: relative;\r\n\r\n .svg-container {\r\n padding: 6px 5px 6px 15px;\r\n color: #889aa4;\r\n vertical-align: middle;\r\n display: inline-block;\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n z-index: 1;\r\n padding: 0;\r\n line-height: 40px;\r\n width: 30px;\r\n text-align: center;\r\n }\r\n\r\n .el-input {\r\n display: inline-block;\r\n height: 40px;\r\n width: 100%;\r\n\r\n & /deep/ input {\r\n background: transparent;\r\n border: 0px;\r\n -webkit-appearance: none;\r\n padding: 0 15px 0 30px;\r\n color: #fff;\r\n height: 40px;\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n .center {\r\n position: absolute;\r\n left: 50%;\r\n top: 50%;\r\n width: 360px;\r\n transform: translate3d(-50%,-50%,0);\r\n height: 446px;\r\n border-radius: 8px;\r\n }\r\n\r\n .right {\r\n position: absolute;\r\n left: inherit;\r\n right: 0;\r\n top: 0;\r\n width: 360px;\r\n height: 100%;\r\n }\r\n\r\n .code {\r\n .el-form-item__content {\r\n position: relative;\r\n\r\n .getCodeBt {\r\n position: absolute;\r\n right: 0;\r\n top: 0;\r\n line-height: 40px;\r\n width: 100px;\r\n background-color: rgba(51,51,51,0.4);\r\n color: #fff;\r\n text-align: center;\r\n border-radius: 0 4px 4px 0;\r\n height: 40px;\r\n overflow: hidden;\r\n\r\n span {\r\n padding: 0 5px;\r\n display: inline-block;\r\n font-size: 16px;\r\n font-weight: 600;\r\n }\r\n }\r\n\r\n .el-input {\r\n & /deep/ input {\r\n padding: 0 130px 0 30px;\r\n }\r\n }\r\n }\r\n }\r\n\r\n .setting {\r\n & /deep/ .el-form-item__content {\r\n padding: 0 15px;\r\n box-sizing: border-box;\r\n line-height: 32px;\r\n height: 32px;\r\n font-size: 14px;\r\n color: #999;\r\n margin: 0 !important;\r\n\r\n .register {\r\n float: left;\r\n width: 50%;\r\n }\r\n\r\n .reset {\r\n float: right;\r\n width: 50%;\r\n text-align: right;\r\n }\r\n }\r\n }\r\n\r\n .style2 {\r\n padding-left: 30px;\r\n\r\n .svg-container {\r\n left: -30px !important;\r\n }\r\n\r\n .el-input {\r\n & /deep/ input {\r\n padding: 0 15px !important;\r\n }\r\n }\r\n }\r\n\r\n .code.style2, .code.style3 {\r\n .el-input {\r\n & /deep/ input {\r\n padding: 0 115px 0 15px;\r\n }\r\n }\r\n }\r\n\r\n .style3 {\r\n & /deep/ .el-form-item__label {\r\n padding-right: 6px;\r\n }\r\n\r\n .el-input {\r\n & /deep/ input {\r\n padding: 0 15px !important;\r\n }\r\n }\r\n }\r\n\r\n .role {\r\n & /deep/ .el-form-item__label {\r\n width: 56px !important;\r\n }\r\n\r\n & /deep/ .el-radio {\r\n margin-right: 12px;\r\n }\r\n }\r\n\r\n }\r\n</style>\r\n"]}]}