diff --git a/src/components/sp-page/header.js b/src/components/sp-page/header.js index ce06aa40a..a4caa0f19 100644 --- a/src/components/sp-page/header.js +++ b/src/components/sp-page/header.js @@ -41,7 +41,7 @@ const CustomNavigationHeader = memo((props) => { backgroundPosition: 'center', paddingTop: `${gStatusBarHeight}px` } - if (value?.navigateBackgroundColorr) { + if (value?.navigateBackgroundColor) { style.backgroundColor = value?.navigateBackgroundColor } if (value?.navigateBackgroundImage) { @@ -139,7 +139,7 @@ const CustomNavigationHeader = memo((props) => { const renderNearby = useCallback(() => { return ( - + {VERSION_STANDARD ? shopInfo?.name || '总店' : nearbyText || '选择地区'} @@ -149,19 +149,15 @@ const CustomNavigationHeader = memo((props) => { }, [handleNearbyClick, nearbyText]) const renderSearch = useCallback(() => { - if (titleStyle !== '3' || !value?.showSearchButton) return null return ( - + Taro.navigateTo({ url: '/subpages/item/list' })}> - onSearchConfirm && onSearchConfirm(e.detail?.value)} - /> - - 搜索 - + {value?.showSearchButton && ( + + 搜索 + + )} ) diff --git a/src/components/sp-page/index.scss b/src/components/sp-page/index.scss index efe576354..55754a052 100644 --- a/src/components/sp-page/index.scss +++ b/src/components/sp-page/index.scss @@ -146,7 +146,6 @@ .nearby-function-text { font-size: 28px; - color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -155,7 +154,6 @@ .nearby-function-icon { font-size: 28px; - color: #333; } } @@ -203,17 +201,9 @@ border-radius: 8px; overflow: hidden; position: relative; - - .search-input { - flex: 1; - height: 64px; - padding: 0 24px 0 40px; - border: 1px solid #e0e0e0; - border-right: none; - border-radius: 8px 0 0 8px; - background-color: #fff; - font-size: 28px; - } + border: 1PX solid #e0e0e0; + background-color: #fff; + height: 64px; .search-icon { position: absolute; @@ -237,6 +227,8 @@ justify-content: center; white-space: nowrap; flex-shrink: 0; + position: absolute; + right: 0; } } } diff --git a/src/pages/category/index.js b/src/pages/category/index.js index c84b33883..86676031a 100644 --- a/src/pages/category/index.js +++ b/src/pages/category/index.js @@ -59,7 +59,10 @@ function StoreItemList(props) { return ( } + pageConfig={{ + titleStyle:'3', + navigateBackgroundColor:'#fff' + }} ref={pageRef} showLive renderFooter={} diff --git a/src/pages/custom/custom-page.js b/src/pages/custom/custom-page.js index 2b427f6a4..45e08461a 100644 --- a/src/pages/custom/custom-page.js +++ b/src/pages/custom/custom-page.js @@ -36,9 +36,6 @@ const initialState = { function CustomPage(props) { const $instance = getCurrentInstance() const [state, setState] = useImmer(initialState) - const { setNavigationBarTitle } = useNavigation() - const { address, location } = useSelector((s) => s.user) - const nearbyText = address?.city || location?.city || '' const { wgts, loading, shareInfo, skuPanelOpen, selectType, info, isShowTabBar } = state const MSpSkuSelect = React.memo(SpSkuSelect) const pageRef = useRef() @@ -137,11 +134,8 @@ function CustomPage(props) { return ( } title='会员中心' > diff --git a/src/subpages/store/list.js b/src/subpages/store/list.js index ffd11a50f..5422b31b0 100644 --- a/src/subpages/store/list.js +++ b/src/subpages/store/list.js @@ -131,12 +131,12 @@ function NearlyShop(props) { // 构建位置相关参数 if (filterType == 1) { - const [chooseProvince, chooseCity, chooseDistrict] = chooseValue + // const [chooseProvince, chooseCity, chooseDistrict] = chooseValue params = { ...params, - province: chooseProvince, - city: chooseCity, - area: chooseDistrict + // province: chooseProvince, + // city: chooseCity, + // area: chooseDistrict } if (keyword) { params = { @@ -280,7 +280,7 @@ function NearlyShop(props) { - + {/* { @@ -291,9 +291,8 @@ function NearlyShop(props) { > {chooseValue.join('') || '选择地区'} - {/* */} - + */} diff --git a/src/subpages/store/list.scss b/src/subpages/store/list.scss index ed9f7f5f7..52cccb5bf 100644 --- a/src/subpages/store/list.scss +++ b/src/subpages/store/list.scss @@ -11,7 +11,7 @@ border-radius: 40px; display: flex; align-items: center; - padding: 6px 6px 6px 20px; + padding: 6px 6px 6px 6px; } .region-picker { display: flex;