From b7ef5011660a8d1d13a97bbdb6b9f2c078ef67e3 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Mon, 13 Mar 2023 16:29:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=87=BA=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/ruoyi.scss | 4 ++ src/store/modules/user.js | 15 ++++-- src/views/myLogin.vue | 7 +-- .../purchase/purDelivery/purDelivery.vue | 4 -- .../purDelivery/purDeliveryEditDialog.vue | 46 +++++++++++++++---- 5 files changed, 56 insertions(+), 20 deletions(-) diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index 81df53b..6a6c03a 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 97d886b..9fdc643 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -71,11 +71,16 @@ 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 15563c7..064ab00 100644 --- a/src/views/myLogin.vue +++ b/src/views/myLogin.vue @@ -206,11 +206,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(); } diff --git a/src/views/purchase/purDelivery/purDelivery.vue b/src/views/purchase/purDelivery/purDelivery.vue index 9929021..1a8b850 100644 --- a/src/views/purchase/purDelivery/purDelivery.vue +++ b/src/views/purchase/purDelivery/purDelivery.vue @@ -26,7 +26,6 @@ -
显示/隐藏搜索栏 @@ -58,8 +57,6 @@ - -