diff --git a/src/pages/uploadPhoto/uploadPhoto.vue b/src/pages/uploadPhoto/uploadPhoto.vue index f63c7f5..b3a0873 100644 --- a/src/pages/uploadPhoto/uploadPhoto.vue +++ b/src/pages/uploadPhoto/uploadPhoto.vue @@ -241,7 +241,7 @@ async function toCloseStyle() { if (res3.code == 200) { // 改变全局的头像 userInfoModulesPinia.myAvatar = JSON.parse(moment.data).data.url; - uni.redirectTo({ + uni.navigateTo({ url: "/pages/uploadPhoto/success", }); } else { diff --git a/src/utils/request.js b/src/utils/request.js index fa159c1..4549b7e 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -18,13 +18,12 @@ const request = (requestObj) => { token: userInfoModulesPinia.token, }, success: (res) => { - - // if (res.data.code == 1052) { - // uni.reLaunch({ - // url: "/pages/login/index?type=tokenFfalse", - // }); - // return - // } + if (res.data.code == 1052) { + uni.reLaunch({ + url: "/pages/login/index?type=tokenFfalse", + }); + return + } if (res.statusCode == 200) { // if (res.data.code == 200) { resolve(res.data)