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.

1 line
12 KiB

{"remainingRequest":"G:\\bishe\\2024\\springboot\\143_论文\\039_springboot流浪天使乐园管理系统设计与实现\\vue\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!G:\\bishe\\2024\\springboot\\143_论文\\039_springboot流浪天使乐园管理系统设计与实现\\vue\\admin\\src\\views\\login.vue?vue&type=script&lang=js&","dependencies":[{"path":"G:\\bishe\\2024\\springboot\\143_论文\\039_springboot流浪天使乐园管理系统设计与实现\\vue\\admin\\src\\views\\login.vue","mtime":1703907409000},{"path":"G:\\bishe\\2024\\springboot\\143_论文\\039_springboot流浪天使乐园管理系统设计与实现\\vue\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"G:\\bishe\\2024\\springboot\\143_论文\\039_springboot流浪天使乐园管理系统设计与实现\\vue\\admin\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"G:\\bishe\\2024\\springboot\\143_论文\\039_springboot流浪天使乐园管理系统设计与实现\\vue\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"G:\\bishe\\2024\\springboot\\143_论文\\039_springboot流浪天使乐园管理系统设计与实现\\vue\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KDQppbXBvcnQgbWVudSBmcm9tICJAL3V0aWxzL21lbnUiOwpleHBvcnQgZGVmYXVsdCB7DQogIGRhdGEoKSB7DQogICAgcmV0dXJuIHsNCgkJdmVyaWZ5Q2hlY2syOiBmYWxzZSwNCgkJZmxhZzogZmFsc2UsDQogICAgICBiYXNlVXJsOnRoaXMuJGJhc2UudXJsLAogICAgICBsb2dpbl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yb2xlKTsNCgkJCQl0aGlzLiRzdG9yYWdlLnNldCgic2Vzc2lvblRhYmxlIiwgdGhpcy50YWJsZU5hbWUpOw0KCQkJCXRoaXMuJHN0b3JhZ2Uuc2V0KCJhZG1pbk5hbWUiLCB0aGlzLnJ1bGVzRm9ybS51c2VybmFtZSk7DQoJCQkJdGhpcy4kcm91dGVyLnJlcGxhY2UoeyBwYXRoOiAiLyIgfSk7DQoJCQl9IGVsc2Ugew0KCQkJCXRoaXMuJG1lc3NhZ2UuZXJyb3IoZGF0YS5tc2cpOw0KCQkJfQ0KCQl9KTsNCgl9LA0KICB9DQp9DQo="},{"version":3,"sources":["login.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;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;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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","file":"login.vue","sourceRoot":"src/views","sourcesContent":["<template>\r\n <div>\n <div class=\"container\" :style='{\"minHeight\":\"100vh\",\"alignItems\":\"center\",\"background\":\"url(http://codegen.caihongy.cn/20231121/f1acd3cf548c43a1a7d4c22fff76b387.jpg)\",\"display\":\"flex\",\"width\":\"100%\",\"backgroundSize\":\"cover\",\"backgroundPosition\":\" center\",\"backgroundRepeat\":\"no-repeat\",\"justifyContent\":\"center\"}'>\r\n <el-form :style='{\"padding\":\"40px 20px 20px\",\"boxShadow\":\"0 1px 6px rgba(64, 158, 255, .8)\",\"margin\":\"0\",\"borderRadius\":\"10px\",\"background\":\"#fff\",\"width\":\"400px\",\"position\":\"absolute\",\"right\":\"5vw\",\"height\":\"auto\"}'>\r\n <div v-if=\"true\" :style='{\"width\":\"100%\",\"margin\":\"0 0 10px 0\",\"lineHeight\":\"44px\",\"fontSize\":\"20px\",\"color\":\"rgba(44, 55, 66, 0.9)\",\"textAlign\":\"center\"}' class=\"title-container\">流浪天使乐园管理系统设计与实现登录</div>\r\n <div v-if=\"loginType==1\" class=\"list-item\" :style='{\"width\":\"80%\",\"margin\":\"20px auto\",\"alignItems\":\"center\",\"display\":\"flex\"}'>\r\n <div v-if=\"true\" class=\"lable\" :style='{\"width\":\"80px\",\"lineHeight\":\"44px\",\"fontSize\":\"14px\",\"color\":\"rgba(44, 55, 66, 0.9)\"}'>用户名:</div>\r\n <input :style='{\"border\":\"1px solid \",\"width\":\"100%\",\"padding\":\"0 10px\",\"fontSize\":\"14px\",\"color\":\"rgba(44, 55, 66, 0.9)\",\"height\":\"44px\"}' placeholder=\"请输入用户名\" name=\"username\" type=\"text\" v-model=\"rulesForm.username\">\r\n </div>\r\n <div v-if=\"loginType==1\" class=\"list-item\" :style='{\"width\":\"80%\",\"margin\":\"20px auto\",\"alignItems\":\"center\",\"display\":\"flex\"}'>\r\n <div v-if=\"true\" class=\"lable\" :style='{\"width\":\"80px\",\"lineHeight\":\"44px\",\"fontSize\":\"14px\",\"color\":\"rgba(44, 55, 66, 0.9)\"}'>密码:</div>\r\n <input :style='{\"border\":\"1px solid \",\"width\":\"100%\",\"padding\":\"0 10px\",\"fontSize\":\"14px\",\"color\":\"rgba(44, 55, 66, 0.9)\",\"height\":\"44px\"}' placeholder=\"请输入密码\" name=\"password\" type=\"password\" v-model=\"rulesForm.password\">\r\n </div>\r\n\r\n <div :style='{\"width\":\"80%\",\"textAlign\":\"center\",\"margin\":\"20px auto\"}' v-if=\"roles.length>1\" prop=\"loginInRole\" class=\"list-type\">\r\n <el-radio v-for=\"item in roles\" v-bind:key=\"item.roleName\" v-model=\"rulesForm.role\" :label=\"item.roleName\">{{item.roleName}}</el-radio>\r\n </div>\r\n\r\n\t\t\r\n <div :style='{\"row-gap\":\"10px\",\"padding\":\"0 10%\",\"margin\":\"20px auto\",\"alignItems\":\"center\",\"columnGap\":\"10px\",\"flexWrap\":\"wrap\",\"display\":\"flex\",\"width\":\"100%\",\"justifyContent\":\"center\"}'>\r\n <el-button v-if=\"loginType==1\" :style='{\"border\":\"0\",\"cursor\":\"pointer\",\"padding\":\"0 24px\",\"margin\":\"0\",\"outline\":\"none\",\"color\":\"#fff\",\"borderRadius\":\"4px\",\"background\":\"rgba(44, 55, 66, 0.9)\",\"width\":\"100%\",\"fontSize\":\"14px\",\"height\":\"44px\"}' type=\"primary\" @click=\"login()\" class=\"loginInBt\">登录</el-button>\n </div>\r\n </el-form>\r\n\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nimport menu from \"@/utils/menu\";\nexport default {\r\n data() {\r\n return {\r\n\t\tverifyCheck2: false,\r\n\t\tflag: false,\r\n baseUrl:this.$base.url,\n loginType: 1,\n rulesForm: {\r\n username: \"\",\r\n password: \"\",\r\n role: \"\",\r\n },\r\n menus: [],\r\n roles: [],\n tableName: \"\",\r\n };\r\n },\r\n mounted() {\r\n let menus = menu.list();\n this.menus = menus;\n\r\n for (let i = 0; i < this.menus.length; i++) {\n if (this.menus[i].hasBackLogin=='是') {\n this.roles.push(this.menus[i])\n }\n }\n\r\n },\r\n created() {\r\n\r\n },\r\n destroyed() {\r\n\t },\r\n components: {\n },\n methods: {\r\n\n //注册\n register(tableName){\n\t\tthis.$storage.set(\"loginTable\", tableName);\n\t\tthis.$router.push({path:'/register',query:{pageFlag:'register'}})\n },\r\n // 登陆\r\n login() {\r\n\n\t\tif (!this.rulesForm.username) {\r\n\t\t\tthis.$message.error(\"请输入用户名\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!this.rulesForm.password) {\r\n\t\t\tthis.$message.error(\"请输入密码\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(this.roles.length>1) {\n\t\t\tif (!this.rulesForm.role) {\n\t\t\t\tthis.$message.error(\"请选择角色\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet menus = this.menus;\n\t\t\tfor (let i = 0; i < menus.length; i++) {\n\t\t\t\tif (menus[i].roleName == this.rulesForm.role) {\n\t\t\t\t\tthis.tableName = menus[i].tableName;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.tableName = this.roles[0].tableName;\n\t\t\tthis.rulesForm.role = this.roles[0].roleName;\n\t\t}\r\n\t\t\r\n\t\tthis.loginPost()\r\n },\r\n\tloginPost() {\r\n\t\tthis.$http({\r\n\t\t\turl: `${this.tableName}/login?username=${this.rulesForm.username}&password=${this.rulesForm.password}`,\r\n\t\t\tmethod: \"post\"\r\n\t\t}).then(({ data }) => {\r\n\t\t\tif (data && data.code === 0) {\r\n\t\t\t\tthis.$storage.set(\"Token\", data.token);\r\n\t\t\t\tthis.$storage.set(\"role\", this.rulesForm.role);\r\n\t\t\t\tthis.$storage.set(\"sessionTable\", this.tableName);\r\n\t\t\t\tthis.$storage.set(\"adminName\", this.rulesForm.username);\r\n\t\t\t\tthis.$router.replace({ path: \"/\" });\r\n\t\t\t} else {\r\n\t\t\t\tthis.$message.error(data.msg);\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.container {\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 background: url(http://codegen.caihongy.cn/20231121/f1acd3cf548c43a1a7d4c22fff76b387.jpg);\r\n \r\n .list-item /deep/ .el-input .el-input__inner {\r\n\t\tborder: 1px solid ;\r\n\t\tpadding: 0 10px;\r\n\t\tcolor: rgba(44, 55, 66, 0.9);\r\n\t\twidth: 100%;\r\n\t\tfont-size: 14px;\r\n\t\theight: 44px;\r\n\t }\r\n \r\n .list-item.select /deep/ .el-select .el-input__inner {\r\n\t\tborder: 1px solid rgba(64, 158, 255, 1);\r\n\t\tpadding: 0 10px;\r\n\t\tbox-shadow: 0 0 6px rgba(64, 158, 255, .5);\r\n\t\toutline: 1px solid #efefef;\r\n\t\tcolor: rgba(64, 158, 255, 1);\r\n\t\twidth: 288px;\r\n\t\tfont-size: 14px;\r\n\t\toutline-offset: 4px;\r\n\t\theight: 44px;\r\n\t }\r\n \r\n .list-code /deep/ .el-input .el-input__inner {\r\n \t \tborder: 1px solid rgba(44, 55, 66, 0.9);\r\n \t \tpadding: 0 10px;\r\n \t \toutline: none;\r\n \t \tcolor: rgba(44, 55, 66, 0.9);\r\n \t \twidth: calc(100% - 80px);\r\n \t \tfont-size: 14px;\r\n \t \theight: 44px;\r\n \t }\n\n .list-type /deep/ .el-radio__input .el-radio__inner {\n\t\tbackground: rgba(53, 53, 53, 0);\r\n\t\tborder-color: rgba(44, 55, 66, 0.9);\r\n\t }\n .list-type /deep/ .el-radio__input.is-checked .el-radio__inner {\n background: rgba(44, 55, 66, 0.9);\r\n border-color: rgba(44, 55, 66, 0.9);\r\n }\n .list-type /deep/ .el-radio__label {\n\t\tcolor: rgba(44, 55, 66, 0.9);\r\n\t\tfont-size: 14px;\r\n\t }\n .list-type /deep/ .el-radio__input.is-checked+.el-radio__label {\n color: rgba(44, 55, 66, 0.9);\n font-size: 14px;\n }\r\n}\r\n\r\n</style>\n"]}]}