🎈 perf(从小程序卡片进来的没有权限跳回首页):

This commit is contained in:
2022-11-26 14:20:34 +08:00
parent 2babf94747
commit ac260696f8
5 changed files with 27 additions and 15 deletions
+6
View File
@@ -168,10 +168,16 @@ export const useRequest = (
stateRef.current.data = data
stateRef.current.total = data?.list ? data?.total : 0
if (code !== 0) {
if (code === 50332) {
Taro.switchTab({
url: '/pages/index/index',
})
}
options.apiMsgStatus !== false &&
Taro.showToast({
title: `${msg}`,
icon: 'none',
duration: 3000,
})
console.log('错误::', msg)
}