From 532dd4b73d582cf2369ced7566a9787e8f9494e0 Mon Sep 17 00:00:00 2001 From: czm <2192718639@qq.com> Date: Sat, 26 Nov 2022 14:22:50 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20perf(=E8=AE=A2=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E6=B2=A1=E6=9C=89=E6=89=BE=E5=88=B0=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=B7=B3=E5=9B=9E=E9=A6=96=E9=A1=B5):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/shopCart/index.tsx | 2 +- src/use/useHttp.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/shopCart/index.tsx b/src/components/shopCart/index.tsx index 5db1201..ca6a9d7 100644 --- a/src/components/shopCart/index.tsx +++ b/src/components/shopCart/index.tsx @@ -250,7 +250,7 @@ export default ({ show = false, onClose, intoStatus = 'shop', default_sale_mode setParam({ ids, sale_mode: selectIndex }) //临时存储 closePopup() if (intoStatus == 'again') { - goLink('/pages/order/comfirm', {}, 'redirectTo') + goLink('/pages/order/comfirm', null, 'redirectTo') } else { goLink('/pages/order/comfirm') } diff --git a/src/use/useHttp.ts b/src/use/useHttp.ts index 89ca698..c78955d 100644 --- a/src/use/useHttp.ts +++ b/src/use/useHttp.ts @@ -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) }