列表搜索页面

This commit is contained in:
juguohong
2025-09-01 00:03:43 +08:00
parent 7d4eb3d031
commit fdd6b8f7cb
18 changed files with 315 additions and 83 deletions

View File

@@ -1,4 +1,3 @@
export default definePageConfig({
navigationBarTitleText: '',
navigationStyle: 'custom',
navigationBarTitleText: ''
})

View File

@@ -1,4 +1,3 @@
import InputCustomerBar from "@/container/inputCustomerNavbar";
import CustomerNavbarBack from "@/components/CustomerNavbarBack";
import { View, Image, Text } from "@tarojs/components";
import { Input } from "@nutui/nutui-react-taro";
@@ -18,7 +17,6 @@ const ListSearch = () => {
searchSuggestion,
suggestionList,
isShowSuggestion,
isShowInputCustomerNavBar,
} = useListState() || {};
const ref = useRef<any>(null);
@@ -45,6 +43,10 @@ const ListSearch = () => {
updateState({ searchValue: value });
if (value) {
searchSuggestion(value);
} else {
updateState({
isShowSuggestion: false,
});
}
};
@@ -85,11 +87,11 @@ const ListSearch = () => {
/**
* @description 点击搜索
*/
const handleSearch = () => {
const handleSearch = () => {
Taro.navigateTo({
url: `/pages/searchResult/index`,
});
}
};
// 是否显示清空图标
const isShowClearIcon = searchValue && searchValue?.length > 0;
@@ -100,11 +102,6 @@ const ListSearch = () => {
return (
<>
{!isShowInputCustomerNavBar ? (
<CustomerNavbarBack />
) : (
<InputCustomerBar icon={img.ICON_LIST_INPUT_LOGO} />
)}
<View className="listSearchContainer">
{/* 搜索 */}
<View className="topSearch">
@@ -128,7 +125,9 @@ const ListSearch = () => {
/>
)}
<View className="searchLine" />
<Text className="searchText" onClick={handleSearch}></Text>
<Text className="searchText" onClick={handleSearch}>
</Text>
</View>
</View>
{/* 联想词 */}