From fab0652997c4dfaa87aa3b07a6cc67c5b4103440 Mon Sep 17 00:00:00 2001 From: xuan Date: Thu, 23 Mar 2023 16:52:21 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(ID1001592):=20=E3=80=90?= =?UTF-8?q?=E5=86=85=E9=83=A8=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91-=20?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=B8=8D=E5=87=BA=E5=86=85=E5=AE=B9=EF=BC=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E9=87=8D=E6=96=B0=E9=80=80=E5=87=BA=E8=BF=9B?= =?UTF-8?q?=E5=8E=BB=E6=89=8D=E8=83=BD=E6=90=9C=E7=B4=A2=E5=88=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【【内部小程序】- 搜索不出内容,需要重新退出进去才能搜索到。】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001592 --- src/components/search/index.tsx | 2 +- src/pages/searchPage/index.module.scss | 1 - src/pages/searchPage/index.tsx | 20 +++++++++----------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/components/search/index.tsx b/src/components/search/index.tsx index b007322..3e0be65 100644 --- a/src/components/search/index.tsx +++ b/src/components/search/index.tsx @@ -95,7 +95,7 @@ const Search = ( customStyle={{ width: '100%' }} /> - {!!inputCon && clearInput()} styleObj={{ width: '20rpx', height: '20rpx', backgroundColor: '#fff', border: '0' }} />} + {!!inputCon && } {showScan && ( { // 输入了搜索关键字 const getSearchData = useCallback((e) => { - if (e) { - setHasFonts(true) - getProduct(e) - } - else { + if (!e) { setHasFonts(false) setSearchList([]) } + setdefaultvalue(e) }, []) - // 返回 - const back = () => { - Taro.navigateBack({ - delta: 1, - }) + // 搜索 + const onSearch = () => { + if (defaultvalue) { + setHasFonts(true) + getProduct(defaultvalue) + } } // 判断是否整数类型 function isInteger(obj) { @@ -420,7 +418,7 @@ const SearchPage = () => { - back()}>取消 + 搜索