From 842270186a981676bdbc842fd554224d33d445b5 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Mon, 28 Jul 2025 16:07:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BC=A0=E5=8F=82=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=AA=8C=E8=AF=81=E7=A0=81=E9=94=99=E8=AF=AF=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/withdraw.js | 6 +++--- src/utils/httpRequest.js | 4 ++-- src/views/common/login.vue | 2 +- src/views/modules/sys/role-add-or-update.vue | 5 ++++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/api/withdraw.js b/src/api/withdraw.js index 2129dd4..92ebe12 100644 --- a/src/api/withdraw.js +++ b/src/api/withdraw.js @@ -46,7 +46,7 @@ export function summary_query(params) { */ export function userInfo_list(params) { return $http({ - url: "/czg/userInfo/list", + url: "/userInfo/list", method: "get", params }); @@ -59,7 +59,7 @@ export function userInfo_list(params) { */ export function userInfo(data) { return $http({ - url: "/czg/userInfo", + url: "/userInfo", method: "put", data }); @@ -71,7 +71,7 @@ export function userInfo(data) { */ export function userInfoDel(data) { return $http({ - url: "/czg/userInfo", + url: "/userInfo", method: "DELETE", data }); diff --git a/src/utils/httpRequest.js b/src/utils/httpRequest.js index 6b49053..86355e1 100644 --- a/src/utils/httpRequest.js +++ b/src/utils/httpRequest.js @@ -47,8 +47,8 @@ http.interceptors.request.use(config => { */ http.interceptors.response.use(response => { if (response.data && response.data.code === 401) { // 401, token失效 - // clearLoginInfo() - // router.push({name: 'login'}) + clearLoginInfo() + router.push({name: 'login'}) } return response }, error => { diff --git a/src/views/common/login.vue b/src/views/common/login.vue index 344e531..7e8bc1f 100644 --- a/src/views/common/login.vue +++ b/src/views/common/login.vue @@ -85,7 +85,7 @@ import { method } from 'lodash' this.$router.replace({ name: 'home' }) } else { this.getCaptcha() - this.$message.error(data.msg) + this.$message.error(data.message) } }) } diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue index 5f94f9c..a9be7b1 100644 --- a/src/views/modules/sys/role-add-or-update.vue +++ b/src/views/modules/sys/role-add-or-update.vue @@ -72,12 +72,15 @@ this.$http({ url: this.$http.adornUrl(`/sys/role/info/${this.dataForm.id}`), method: 'get', - params: this.$http.adornParams() + params: this.$http.adornParams({ + roleId:this.dataForm.id + }) }).then(({data}) => { if (data && data.code === 0) { this.dataForm.roleName = data.role.roleName this.dataForm.remark = data.role.remark var idx = data.role.menuIdList.indexOf(this.tempKey) + console.log(idx); if (idx !== -1) { data.role.menuIdList.splice(idx, data.role.menuIdList.length - idx) }