

diff --git a/package.json b/package.json index 402f5a09e2a539f0a17730db79b2483778ae17a0..49fc32c90f07bd852e65c9c68ad545269e4a8de4 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "ace-builds": "^1.9.6", "axios": "^0.21.1", "clipboard": "^2.0.11", + "crypto-js": "^4.1.1", "echarts": "^5.3.3", "element-plus": "^2.2.9", "html2canvas": "^1.4.1", diff --git a/src/assets/css/index.css b/src/assets/css/index.css index 43df1e4e6cef9e0366cc761979cfe3abe4dad24b..902e8f1ca61d8c19f7bf970dd64b4c98cfef3147 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -1512,3 +1512,19 @@ border-radius:8px; background: transparent; border-radius: 2px; } +.font_bold { + font-size: 18px; + color: #202531; + font-weight: bold; + margin-bottom: 20px; +} +.name_btn { + color: #3759be; + cursor: pointer; +} +.fr { + float: right; +} +.pl-1 { + padding-left: 1rem; +} diff --git a/src/main.js b/src/main.js index aeaa43333367a3e39a9108bcccc0b485b3a17652..ea61b70cebc6ca2fff8871f5c07bb97b8cf500b6 100644 --- a/src/main.js +++ b/src/main.js @@ -40,7 +40,7 @@ import menu from './router/function.js' //获取用户信息 function getUser() { - return axios.get(`/apaas/system/getUserInfo`) + return axios.get(`/apaas/system/v5/user/getUserInfo`) } //处理菜单成为对象 diff --git a/src/page/login/index.vue b/src/page/login/index.vue index a12a68d4964f7698bbdf301ef25945f6cea6759f..db0c09b1d4a84ca99242b2a3278f0d9123d97801 100644 --- a/src/page/login/index.vue +++ b/src/page/login/index.vue @@ -17,12 +17,12 @@ > --> - +
@@ -37,6 +37,8 @@ import menu from '../../router/function' import {generateRoutes} from '../../router/index' import inputTable from '../../components/input-table.vue'; import inputObjectTable from '../../components/input-object-table.vue'; +import CryptoJS from "crypto-js"; + export default { props: {}, components: { @@ -57,7 +59,7 @@ export default { computed: {}, created() { console.log(111); - // this.getImg(); + this.getImg(); }, mounted() {}, methods: { @@ -71,7 +73,7 @@ export default { }); }, getUser() { - this.$axios.get(`/apaas/system/getUserInfo`).then((res) => { + this.$axios.get(`/apaas/system/v5/user/getUserInfo`).then((res) => { if (res.data.code == 200) { this.$store.commit("setUserInfo", res.data.data); if (res.data.data.userType == 1) { @@ -93,34 +95,34 @@ export default { }); }, login_remember_info() { - // if (!this.form.userid) { - // return this.$message.error("请输入账号"); - // } - // if (!this.form.password) { - // return this.$message.error("请输入密码"); - // } - // if (!this.form.yzm) { - // return this.$message.error("请输入验证码"); - // } - // this.$axios - // .get(`/apaas/system/checkCaptcha/${this.imgId}/${this.form.yzm}`) - // .then((res) => { - // if (res.data.code == 200) { - // this.login(); - // } else { - // this.$message.error(res.data.desc); - // } - // }); - this.login(); + if (!this.form.userid) { + return this.$message.error("请输入账号"); + } + if (!this.form.password) { + return this.$message.error("请输入密码"); + } + if (!this.form.yzm) { + return this.$message.error("请输入验证码"); + } + this.$axios + .get(`/apaas/system/v5/user/verifyCaptcha?id=${this.imgId}&value=${this.form.yzm}`) + .then((res) => { + if (res.data.code == 200) { + this.login(); + } else { + this.$message.error(res.data.data); + } + }); }, login() { + this.$axios - .post(`/apaas/system/login`, { - userId: this.form.userid, - userPassword: this.form.password, + .post(`/apaas/system/v5/user/login`, { + system_account: this.form.userid, + password: CryptoJS.AES.encrypt(this.form.password,"swuE9cmCZQwrkYRV").toString(), }) .then((res) => { - if (res.data.code == "200") { + if (res.data.code == 200) { let data = res.data.data; console.log(data); setCookie("bgToken", data.name); @@ -132,10 +134,10 @@ export default { }); }, getImg() { - this.$axios.get(`/apaas/system/getCaptcha`).then((res) => { + this.$axios.get(`/apaas/system/v5/user/getCaptcha??width=240&height=32`).then((res) => { if (res.data.code == 200) { - this.imgId = res.data.data.key; - this.imgSrc = res.data.data.image; + this.imgId = res.data.data.id; + this.imgSrc = res.data.data.captcha; } }); }, @@ -174,7 +176,12 @@ export default { width: 240px; } .yzm_img { - vertical-align: middle; + vertical-align: middle; + width: 150px; + height: 32px; + margin-left: 10px; + display: inline-block; + } .btn_sub { width: 400px; diff --git a/src/page/main/develop/account/add/index.vue b/src/page/main/develop/account/add/index.vue index 5bcae62dd06d25b9e023707d3e426db32187ca7a..7f7450b406c97481f2f4382206a0b06ea36d3df8 100644 --- a/src/page/main/develop/account/add/index.vue +++ b/src/page/main/develop/account/add/index.vue @@ -44,11 +44,12 @@