diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index 81df53bd..6a6c03ad 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -349,5 +349,9 @@ text-align: right; } +.el-table--mini .el-table__cell { + padding:0px!important; +} + diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 97d886be..23332ce8 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -71,11 +71,15 @@ const user = { const uuid = userInfo.uuid return new Promise((resolve, reject) => { login(username, password, code, uuid).then(res => { - setToken(res.data.token) - setAdminId(res.data.id) - commit('SET_TOKEN', res.data.token) - commit('SET_ADMINID', res.data.id) - resolve() + if(res.code == 20000){ + setToken(res.data.token) + setAdminId(res.data.id) + commit('SET_TOKEN', res.data.token) + commit('SET_ADMINID', res.data.id) + resolve() + }else{ + reject(res.message); + } }).catch(error => { reject(error) }) diff --git a/src/views/myLogin.vue b/src/views/myLogin.vue index d84b7bca..0f08614c 100644 --- a/src/views/myLogin.vue +++ b/src/views/myLogin.vue @@ -198,11 +198,12 @@ export default { Cookies.remove("password"); // Cookies.remove('rememberMe'); } - this.$store.dispatch("Login", this.loginForm).then(() => { - this.$router.push({path: this.redirect || "/"}).catch(() => { + this.$store.dispatch("Login", this.loginForm).then((res) => { + this.$router.push({path: this.redirect || "/"}).catch((res) => { }); - }).catch(() => { + }).catch((res) => { this.loading = false; + this.$message.error(res); if (this.captchaEnabled) { this.getCode(); }