<view class="index">
  <!-- 开锁失败弹框 -->
  <view class="open-err" a:if="{{scanCodeErr==true}}">
    <view class="err-content">
      
      <image src="../../img/fail.png" class="err-image"></image>
      <view class="err-text">无效码，请核对车码</view>
      <view class="err-button">
        <view class="err-left" onTap="goInputCode">去输码</view>
        <view class="err-right" onTap="saoMa">继续扫码</view>
      </view>
    </view>
    <view class="err-cha" onTap="cancelErrFrame">
      <text class="iconfont icon-cha"></text></view>
  </view>
  <!-- 屏幕中间广告弹框 -->
  <view class="ad-frame" a:if="{{adFrame==true}}">
    <view class="ad-frame-content">
      <swiper autoplay='true' vertical='true' class="frame-middle">
        <swiper-item a:for="{{mid}}" a:key='index' class="frame-middle">
          <image a:if="{{item.type!=='wxTencentAdvertisement'}}" src="{{item.surface}}" mode="aspectFit" onTap="swiper" data-index="{{index}}" data-type="{{item.type}}" 
            data-name="{{item.name}}" data-detail="{{item.detail}}" data-id="{{item.id}}"></image>
        </swiper-item>
      </swiper>
    </view>
    <view class="ad-frame-close" onTap="closeAdframe">
      <text class="iconfont icon-cha"></text></view>
  </view>

  <!-- 有未支付订单，进行中的订单 违章记录 -->
  <view class="no-pay-order" a:if="{{is_pay_order!==false}}" onTap="go_pay">
    <text class="iconfont icon-wenhao"></text>
    <text>您有未支付订单</text>
    <text class="iconfont icon-iconfontjiantou2"></text>
  </view>
  <view class="no-pay-order" a:if="{{is_ride_order!==false}}" style="background-color:var(--globleColor)" onTap="goUseBike">
    <text class="iconfont icon-wenhao"></text>
    <text>您有一个正在骑行的订单</text>
    <text class="iconfont icon-iconfontjiantou2"></text>
  </view>
  <view class="no-pay-order" a:if="{{is_punishment!==false}}" style="background-color:#f56464" onTap="havePunishment">
    <text class="iconfont icon-wenhao"></text>
    <text>您有一条违章记录</text>
    <text class="iconfont icon-iconfontjiantou2"></text>
  </view>
  <!-- 未开启位置 -->
  <view class="pay-frame" a:if="{{background==true}}">
    <view class="topay" a:if="{{location}}">
      <view class="text1">请确认是否已开启</view>
      <view class="text2" style="margin-bottom:44rpx;">位置权限</view>
      <view class="view">
        
        <view class="view1" style="border-right:1rpx solid #f4f4f4;color:#999999; " onTap="open">
          <view>已开启</view>
        </view>
        <view class="view1" style="color:#18D4B8;" onTap="go_setting">
          <view>去设置</view>
        </view>
      </view>
    </view>
  </view>
  
  <!-- 轮播图 -->
  <view class="ad-swiper" a:if="{{ads!=[]}}">
    <swiper class="ad-swiper-list" indicator-dots='true' indicator-color='var(--globleColor)' autoplay='true' interval="5000" 
      current="{{currentSwiper}}" onTap="swiperChange">
      <swiper-item a:for="{{ads}}" a:key="key" class="ad-swiper-item">
        <image mode="widthFix" src="{{item.surface}}" style="width:100%;height:100%;" onTap="swiper" data-index="{{index}}" 
          data-type="{{item.type}}" data-name="{{item.name}}" data-detail="{{item.detail}}" data-id="{{item.id}}" a:if="{{item.type!=='wxTencentAdvertisement'}}"></image>
      </swiper-item>
    </swiper>
  </view>
  <!-- 通知公告 -->
  <!-- a:if="{{notice.id}}"  -->
  <view class="inform" style="top:{{ads.length>0? '250rpx' : '30rpx'}}" onTap="tap_notice" a:if="{{notice.id}}" data-id="{{notice.id}}">
    <view class="inform-img">
      <image src="../../img/notice.png" class="inform-image" style="width:48rpx;height:48rpx;padding-left:20rpx;">
      </image>
    </view>
    <view class='marquee' style='width:{{marqueeWidth}}rpx;'>
      <view class='marqueeTitle' style="width:{{length}}rpx;transform:translateX( {{marqueeDistance}}rpx);font-size: {{size}}rpx;">
        {{notice.description}}
      </view>
    </view>
    <image src="../../img/more.png" style="width:48rpx;height:48rpx;"></image>
  </view>
  <!-- 地图 -->
  <!-- <map name="map" id="map" show-location="true" longitude='{{longitude}}' latitude='{{latitude}}' scale='{{zoom}}' markers="{{markers}}" 
    data-markers="{{markers}}" controls="{{controls}}" polygon="{{polygons}}">
  </map> -->
   <!-- 地图显示停车区域-->
   <map name="map" id="map" show-location="true" longitude='{{centerLon}}' latitude='{{centerLat}}' scale='{{zoom}}' enable-zoom='true' 
   markers="{{markers}}" data-markers="{{markers}}" controls="{{controls}}" polygon="{{polygons}}" onRegionChange="regionchange">
  
 </map>
 <cover-image a:if="{{localSearchStop}}" src="../../img/local_posi.png" class="center-posi"></cover-image>
  <view class="map-icon">
    <view class="kefu" onTap="findPark">
      <image src="../../img/park.png"></image>
    </view>
    <!--<view class="kefu" onTap="kefu"><image src="../../img/kefu.png"></image></view> -->
    <view class="kefu" onTap="posi">
      <image src="../../img/position.png"></image>
    </view>
  </view>
  <!-- 底部按钮 -->
  <view class="bottom-bt" catchtouchmove='ture'>
    <view class="tab">
      <view class="tab-item" onTap="kefu">
        <text class="iconfont icon-kefu"></text>
        <view>在线客服</view>
      </view>
      <view class="tab-item" a:for="{{cardBottom}}" a:key='key' onTap="skipPage" data-id="{{item}}">
        <text class="iconfont {{item.icon}}"></text>
        <view>{{item.name}}</view>
      </view>
    </view>
    <view class="scan" onTap="sweepCode">
      <text class="iconfont scanicon icon-17-saoma"></text>
      <text>扫码用车</text>
    </view>
  </view>
</view>