From 9406345796b3ecce7f486d46933ddae9069a316c Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Thu, 31 Aug 2023 14:26:26 +0800 Subject: [PATCH] upload --- src/pages/uploadPhoto/uploadPhoto.vue | 2 +- src/utils/request.js | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) 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)