From fa9feea260ffa784ff5776b546cfffe2ffccbcfc Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Fri, 9 Aug 2024 14:26:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=97=A0=E6=95=88=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/App.jsx | 1 - src/views/products/Detail/PriceCompactInput.jsx | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/views/App.jsx b/src/views/App.jsx index fa8a61f..34b288f 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -40,7 +40,6 @@ function App() { const href = useHref() const navigate = useNavigate() - // 除了路由 /p...以外都需要登陆系统 const needToLogin = href !== '/login' && isEmpty(loginToken) useEffect(() => { diff --git a/src/views/products/Detail/PriceCompactInput.jsx b/src/views/products/Detail/PriceCompactInput.jsx index 2485b52..320d6fa 100644 --- a/src/views/products/Detail/PriceCompactInput.jsx +++ b/src/views/products/Detail/PriceCompactInput.jsx @@ -19,7 +19,7 @@ const PriceCompactInput = (props) => { } const onNumberStartChange = (e) => { const newNumber = parseInt(e.target.value || '0', 10) - if (Number.isNaN(numberStart)) { + if (Number.isNaN(newNumber)) { return } if (!('numberStart' in value)) { @@ -31,7 +31,7 @@ const PriceCompactInput = (props) => { } const onNumberEndChange = (e) => { const newNumber = parseInt(e.target.value || '0', 10) - if (Number.isNaN(numberEnd)) { + if (Number.isNaN(newNumber)) { return } if (!('numberEnd' in value)) { @@ -43,7 +43,7 @@ const PriceCompactInput = (props) => { } const onAudultPriceChange = (e) => { const newNumber = parseInt(e.target.value || '0', 10) - if (Number.isNaN(audultPrice)) { + if (Number.isNaN(newNumber)) { return } if (!('audultPrice' in value)) { @@ -55,7 +55,7 @@ const PriceCompactInput = (props) => { } const onChildrenPriceChange = (e) => { const newNumber = parseInt(e.target.value || '0', 10) - if (Number.isNaN(childrenPrice)) { + if (Number.isNaN(newNumber)) { return } if (!('childrenPrice' in value)) { @@ -106,8 +106,4 @@ const PriceCompactInput = (props) => { ) } -<<<<<<< HEAD export default PriceCompactInput -======= -export default PriceCompactInput ->>>>>>> acaf5a3de7b7197af62517e06d7fdbb7a4a48ace