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 1/2] =?UTF-8?q?=F0=9F=8E=88=20perf(=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E6=B2=A1=E6=9C=89=E6=89=BE=E5=88=B0?= =?UTF-8?q?=E8=AE=A2=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) } From 2d1f695b352ce99371fb0373e2c010280704e770 Mon Sep 17 00:00:00 2001 From: czm <2192718639@qq.com> Date: Sat, 26 Nov 2022 17:55:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8E=88=20perf(=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=A9=BA=E5=B7=AE=E6=98=BE=E7=A4=BA):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/constant.js | 4 ++-- src/pages/details/components/orderCount/index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/constant.js b/src/common/constant.js index 08f3a2c..c2f3a40 100644 --- a/src/common/constant.js +++ b/src/common/constant.js @@ -1,4 +1,4 @@ -export const BASE_URL = CURRENT_BASE_URL +// export const BASE_URL = CURRENT_BASE_URL // export const BASE_URL = `http://192.168.0.75:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:50001/lymarket` // export const BASE_URL = `http://10.0.0.5:50001/lymarket` @@ -12,7 +12,7 @@ export const BASE_URL = CURRENT_BASE_URL // export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境 // export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境 // export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞 -// export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添 +export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添 // export const BASE_URL = `http://192.168.1.22:50002/lymarket` // 婷 // export const BASE_URL = `http://192.168.1.42:50002/lymarket` // 杰 diff --git a/src/pages/details/components/orderCount/index.tsx b/src/pages/details/components/orderCount/index.tsx index 955e8e8..9c826ad 100644 --- a/src/pages/details/components/orderCount/index.tsx +++ b/src/pages/details/components/orderCount/index.tsx @@ -228,7 +228,7 @@ export default memo(({ show = false, onClose, title = '', productId = 0 }: param {formatHashTag(item.code, item.name)} - 空差:{formatWeightDiv(item.weight_error)}kg + {selectIndex == 0 && 空差:{formatWeightDiv(item.weight_error)}kg} {formatPrice(item)}