千目品牌领券机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

57 lines
2.5 KiB

<view class="malls" bindtap="hideMallExpand">
<view class="input-wrapper">
<input value="{{q}}" class="input" placeholder="输入城市进行搜索" placeholder-class="placeholder" bindinput="onInput"
bindfocus="doShowList" bindblur="onBlur"></input>
</view>
<image class="search-icon" src="./search.png"></image>
<image wx:if="{{q}}" class="close" src="./close_white.png" bindtap="clearQ" />
<view class="list" wx:if="{{showList}}">
<view wx:for="{{filteredCities}}" id="{{item.name}}" class="item" wx:key="name">
{{item.name}}
</view>
</view>
<view class="main" wx:else>
<view class="r1">
<view class="left">
<image class="pos" src="./pos.png"></image>
<text>{{currentCity === null ? "" : currentCity.name}}</text>
<text>{{currentMall === null ? "" : currentMall.name}}</text>
<image class="up" src="./up.png"></image>
</view>
<text class="right">当前定位城市</text>
</view>
<view class="r2">切换商场</view>
<view class="malls-wrapper" bindtap="hideMallExpand">
<view class="malls1{{isMallExpand ? ' expand' : '' }}" catchtap>
<view wx:for="{{currentMalls}}" wx:key="id" id="{{item.name}}" class="tag" bindtap="setMall">
{{item.name}}
</view>
<image wx:if="{{isMallExpand}}" class="fold" src="./up.png" catchtap="hideMallExpand"></image>
<view wx:else class="more" catchtap="expandMall">
更多
</view>
</view>
</view>
<scroll-view class="list-container" enable-back-to-top="{{true}}" scroll-into-view="{{scrollIntoView}}"
scroll-y="{{true}}">
<view class="meta">切换城市</view>
<view class="city-buttons">
<view wx:for="{{cities}}" wx:key="name" id="{{item.name}}" class="city-button" bindtap="setMallByCity">
{{item.name}}
</view>
</view>
<view wx:for="{{cities}}" wx:key="name" id="{{item.index}}" class="city-indexed">
<view class="index {{index===0?' first':''}}" wx:if="{{index===0||cities[index-1].index !== item.index}}">
{{item.index}}</view>
<view class="name" id="{{item.name}}" bindtap="setMallByCity"> {{item.name}}</view>
</view>
</scroll-view>
<view class="indexes">
<view class="li"></view>
<view wx:for="{{cities}}" wx:key="name" id="{{item.index}}"
wx:if="{{index===0||item.index!==cities[index-1].index }}" class="li" bindtap="scrollIntoView">
{{item.index}}
</view>
</view>
</view>
</view>