feat: login
This commit is contained in:
@ -53,10 +53,17 @@ export interface SearchCityProps {
|
||||
onSelectCity: (cityCode: string) => void;
|
||||
currentCity?: string;
|
||||
forGroup?: boolean;
|
||||
banner?: string;
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export default function SearchCity({ onSelectCity, currentCity = '', forGroup = false, offset = 0 }: SearchCityProps) {
|
||||
export default function SearchCity({
|
||||
onSelectCity,
|
||||
currentCity = '',
|
||||
banner = '',
|
||||
forGroup = false,
|
||||
offset = 0,
|
||||
}: SearchCityProps) {
|
||||
const [winHeight, indexItemHeight] = useHeight();
|
||||
const [touchAnchor, setTouchAnchor] = useState<string | undefined>();
|
||||
const [touchMoving, setTouchMoving] = useState(false);
|
||||
@ -134,13 +141,13 @@ export default function SearchCity({ onSelectCity, currentCity = '', forGroup =
|
||||
<div className={PREFIX}>
|
||||
<ScrollView scrollY style={{ height: winHeight - offset }} scrollIntoView={touchAnchor}>
|
||||
<div className={`${PREFIX}__search-wrapper ${forGroup ? 'group' : ''}`}>
|
||||
{forGroup && (
|
||||
{forGroup && banner ? (
|
||||
<div className={`${PREFIX}__banner`}>
|
||||
<div className="dash"></div>
|
||||
<div className="text">点击城市名称,进本地通告群,免费招主播</div>
|
||||
<div className="text">{banner}</div>
|
||||
<div className="dash"></div>
|
||||
</div>
|
||||
)}
|
||||
) : null}
|
||||
<Search
|
||||
className={`${PREFIX}__search`}
|
||||
placeholder="输入城市名称"
|
||||
@ -211,7 +218,7 @@ export default function SearchCity({ onSelectCity, currentCity = '', forGroup =
|
||||
onTouchMove={handleTouchMove}
|
||||
onTouchEnd={handleTouchEnd}
|
||||
onTouchCancel={handleTouchEnd}
|
||||
style={{ top: indexItemHeight * OFFSET_INDEX_SIZE + offset }}
|
||||
style={{ top: indexItemHeight * OFFSET_INDEX_SIZE + (forGroup ? 72 : 0) }}
|
||||
>
|
||||
{CITY_LIST.map(item => {
|
||||
return (
|
||||
|
Reference in New Issue
Block a user