<view class="container">
  <map
    id="mapResult"
    class="map"
    latitude="{{center.latitude}}"
    longitude="{{center.longitude}}"
    scale="{{scale}}"
    markers="{{markers}}"
    bindmarkertap="onMarkerTap"
  >
  </map>

  <!-- 底部推荐列表 -->
  <scroll-view scroll-y class="rec-list">
    <block wx:for="{{recommendations}}" wx:key="id">
        <view class="rec-card {{selectedIndex === index ? 'selected' : ''}}" bindtap="onListTap" data-index="{{index}}">
            <view class="rec-header">
                <view class="rec-rank {{selectedIndex === index ? 'selected' : ''}}">{{index+1}}</view>
                <view class="rec-info-right">
                    <view class="rec-name">{{item.name}}</view>
                    <view class="rec-info">
                        <text class="rating">{{item.rating}}分</text>
                        <text class="divider">|</text>
                        <text class="distance">{{item.distance}}米</text>
                    </view>
                </view>
            </view>
            <view class="rec-address">{{item.address}}</view>
            <view class="rec-tags" wx:if="{{item.tags && item.tags.length}}">
                <text class="tag" wx:for="{{item.tags}}" wx:key="*this" wx:for-item="tag">{{tag}}</text>
            </view>
            <view class="rec-reason" wx:if="{{item.reason}}">{{item.reason}}</view>
        </view>
    </block>
  </scroll-view>
</view>
