修改用户详情接口传参,增加userId参数,暂时剔除请求401重新登录
This commit is contained in:
parent
eb2b6c15f2
commit
bf3dc320c0
|
|
@ -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 => {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue