diff --git a/src/utils/httpRequest.js b/src/utils/httpRequest.js index 86355e1..6b49053 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/user/userDetail.vue b/src/views/user/userDetail.vue index c0b48d4..98d7cbd 100644 --- a/src/views/user/userDetail.vue +++ b/src/views/user/userDetail.vue @@ -1380,7 +1380,10 @@ export default { this.$http({ url: this.$http.adornUrl(`user/${userId}`), method: "get", - params: this.$http.adornParams({}), + params: { + ...this.$http.adornParams({}), + userId: userId, + }, }).then(({ data }) => { if (data.code === 0) { console.log("data", data); diff --git a/src/views/user/userDetail1.vue b/src/views/user/userDetail1.vue index a9c5587..77786ab 100644 --- a/src/views/user/userDetail1.vue +++ b/src/views/user/userDetail1.vue @@ -1311,7 +1311,10 @@ this.$http({ url: this.$http.adornUrl(`user/${userId}`), method: 'get', - params: this.$http.adornParams({}) + params: { + ...this.$http.adornParams({}), + userId: userId, + }, }).then(({ data }) => {