index.wxml 9.78 KB
<!--pages/reservr/index.wxml-->
<view class="pages">
    <view class="flex-vc map">
        <map id="map" scale="{{map.scale}}"
             longitude="{{map.longitude}}" latitude="{{map.latitude}}"
             markers="{{markers}}" polygons="{{polygons}}"
             bindmarkertap="markertap"
             bindcallouttap="markertap"
             bindregionchange="regionchange"
             bindupdated="mapUpdated"
             show-location="{{false}}"
             enable-3D="{{false}}"
             enable-zoom
             enable-scroll
             enable-rotate
             subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ"
             layer-style="2"
             style="width: 100%; height: {{map.height}}px;"></map>
    </view>
    <movable-area class="seller-view">
        <movable-view direction="vertical" out-of-bounds
                      bindchange="movableChange"
                      class="movable-view">
            <navigator url="./search"
                       bindtap="elog" data-ename="点击搜索框" hover-class="navigator-hover">
                <view class="flex-ll transverse-view-search">
                    <view class="searchAddr flex-ll">
                        <image class="icon" src="http://nosqn.colorcun.com/custom/lite-online/image/search26.png"></image>
                        <view class="title">{{hasSuggestion?suggestion.title:'搜索餐厅/位置'}}</view>
                        <view class="clean" catchtap="moveToLocation" wx:if="{{hasSuggestion}}"></view>
                    </view>
                    <view class="searchList flex-tb" catchtap="listShow">
                        <image class="icon" src="http://nosqn.colorcun.com/mapmenu/maplist.png"></image>
                        <view class="title">列表模式</view>
                    </view>
                </view>
            </navigator>
            <view class="transverse-search">
                <view
                        bindtap="caixiShow"
                        class="tags {{multiIndex[0]>0?'active':''}}"
                >
                    <view class="picker flex-lr">
                        <view class="input">
                            <block wx:if="{{multiIndex[0]==0}}">菜系</block>
                            <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block>
                        </view>
                        <view class="more"></view>
                    </view>
                </view>
                <block wx:for="{{tags}}" wx:key="tagskey">
                    <view class="tags {{item.active?'active':''}}"
                          bindtap="tagsChange"
                          data-id="{{item.id}}">{{item.name}}</view>
                </block>
                <view
                        bindtap="filterShow"
                        class="tags {{multiIndex[0]>0?'active':''}}"
                >
                    <view class="picker flex-lr">
                        <view class="input">
                            <block wx:if="{{multiIndex[0]==0}}">筛选</block>
                            <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block>
                        </view>
                        <view class="more"></view>
                    </view>
                </view>
                <!--
                <view class="fingSeller flex-ll" bindtap="findSeller">
                    <view class="icon"></view>
                    <view>查找餐厅</view>
                </view>
                -->
            </view>
            <view class="transverse-list" wx:if="{{hasGetSellersEnd}}">
                <swiper wx:if="{{hasSellers || listMoreCount>0}}"
                        indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
                        interval="2000" duration="500"
                        previous-margin="{{15}}px" next-margin="{{15}}px" style="height: 350rpx;"
                        current="{{current}}" bindchange="bindtransition">
                    <block wx:for="{{markers}}" wx:key="markerskey" wx:if="{{item.id!='location' && item.id!='locationMe'}}">
                        <swiper-item bindtap="gotoDetail"
                                     data-sid="{{item.id}}" wx:if="{{item.display!='none'}}">
                            <view class="seller" id="seller-{{item.id}}">
                                <sb-tr seller="{{item.seller}}"
                                       hasInSwiper bindevent="sbtrEvent"
                                       hasActivityTags="{{false}}"
                                       hasActivityShort="{{true}}"
                                       hasBrand="true" hasActivityRed="true"
                                       hasSuggestion="{{hasSuggestion}}" hasShafa
                                       hasSlogan="{{false}}"></sb-tr>
                            </view>
                        </swiper-item>
                    </block>
                    <swiper-item bindtap="gotoDetail2">
                        <view class="seller seller-last" id="seller-last">
                            <view class="empty">
                                <view class="info">
                                    <view class="info-msg Semibold">缩放地图发现更多餐厅</view>
                                    <view class="info-txt">往任意方向拖动地图,可搜索不同范围</view>
                                </view>
                                <view class="icon"></view>
                            </view>
                        </view>
                    </swiper-item>
                </swiper>
                <view class="empty-txt flex-vc" wx:else="">
                    <view class="seller">
                        <view class="empty">
                            <view class="info" wx:if="{{listMoreCount>0}}" bindtap="listShow">
                                <view class="info-msg Semibold" style="margin-top: 58rpx;">已扩大范围为你找到餐厅</view>
                                <view class="info-txt">当前范围没有找到符合条件的餐厅</view>
                                <view class="info-button flex-lr" style="display: flex;margin-top: 50rpx;margin-left: 0;">
                                    <view>去挑选</view>
                                    <view class="info-button-gt"></view>
                                </view>
                            </view>
                            <view class="info" wx:elif="{{hasSearchLimit}}">
                                <view class="info-msg Semibold" style="margin-top: 58rpx;">未找到符合要求的餐厅</view>
                                <view class="info-txt">修改或减少条件,获取更多餐厅</view>
                                <button class="button-none flex-lr info-button"
                                        style="display: flex;margin-top: 50rpx;margin-left: 0;"
                                        open-type="contact">
                                    <view>人工帮订</view>
                                    <view class="info-button-gt"></view>
                                </button>
                            </view>
                            <view class="info" wx:else="" bindtap="setTSLocal">
                                <view class="info-msg Semibold">你可以切换到其他城市看看</view>
                                <view class="info-button full flex-lr">
                                    <view>唐山市</view>
                                    <view class="info-button-gt"></view>
                                </view>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
            <view class="transverse-list" wx:else="">
                <swiper
                        indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
                        interval="2000" duration="500"
                        previous-margin="{{15}}px" next-margin="{{15}}px" style="height: 350rpx;"
                        current="{{current}}" bindchange="bindtransition">
                    <swiper-item bindtap="gotoDetail2" >
                        <view class="seller seller-last" id="seller-last">
                            <view class="empty">
                                <view class="info">
                                    <view class="info-msg Semibold">缩放地图发现更多餐厅</view>
                                    <view class="info-txt">往任意方向拖动地图,可搜索不同范围</view>
                                </view>
                                <view class="icon"></view>
                            </view>
                        </view>
                    </swiper-item>
                </swiper>
            </view>
        </movable-view>
    </movable-area>
</view>
<view bindtap="moveToLocation" class="moveToLocation">
    <image src="http://nosqn.colorcun.com/reserve/images/golocal.png"></image>
</view>
<view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit}}">该地区没有可供预订的餐厅哦!努力开通中</view>
<view class="toast" wx:if="{{hasGetSellersEnd && markers.length<3 && listMoreCount>0}}">移动或缩放地图,获取更多餐厅</view>
<getpos bindpos="onpos" id="getpos"></getpos>
<seller-box id="seller-box" bindevent="sellerBoxEvent"></seller-box>
<cover-view class="tab-patch"></cover-view>
<a2l bindshow="a2lshow" bindhide="a2lshow" key="INDEX"></a2l>
<caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}"
       bindactive="caixiActive" id="caixi"
></caixi>
<activity-enter hasInHome wx:if="{{hasGetPos}}"></activity-enter>
<boost bindevent="boostEvent" wx:if="{{hasBoost}}"></boost>
<activity-tips wx:if="{{hasSetActivity}}" map="{{map}}"></activity-tips>
<as-phone id="as"></as-phone>
<filter id="filter" bindevent="filterEvent"></filter>