diff --git a/src/pages/my/my.vue b/src/pages/my/my.vue index 1bbcd5d..ae7113f 100644 --- a/src/pages/my/my.vue +++ b/src/pages/my/my.vue @@ -1,7 +1,7 @@ @@ -118,8 +118,10 @@ onLoad(() => { - - + + + + 司机认证 @@ -129,8 +131,10 @@ onLoad(() => { - - + + + + 我的车辆 @@ -139,8 +143,10 @@ onLoad(() => { - - + + + + 我的车队 @@ -149,8 +155,10 @@ onLoad(() => { - - + + + + 我的钱包 diff --git a/src/utils/http.ts b/src/utils/http.ts index 2ce482e..54f5b49 100644 --- a/src/utils/http.ts +++ b/src/utils/http.ts @@ -83,16 +83,18 @@ export const http = (options: UniApp.RequestOptions) => { } if (resList.code === 401) { + console.log(resList, 'resList过期') + // 401错误 -> 清理用户信息,跳转到登录页 uni.showToast({ - title: '请求错误', + title: `${resList.msg}`, icon: 'error', }) - // const memberStore = useMemberStore() - // memberStore.clearProfile() - // setTimeout(() => { - // uni.navigateTo({ url: '/pages/login/OneClickLogin/OneClickLogin' }) - // }, 1000) + const memberStore = useMemberStore() + memberStore.clearProfile() + setTimeout(() => { + uni.navigateTo({ url: '/pages/login/login' }) + }, 1000) reject(resList) } else { console.log('500请求错误', res.data)