<!--pages/gasup/index.wxml-->
<view>
  <view class="van-hairline--bottom">
    <van-search value="{{ value }}" placeholder="请输入油站名称" />
  </view>
  <van-card desc="{{ item.stationAddress }}" title="{{ item.stationName }}" thumb="{{ item.stationPic }}" centered
    wx:for="{{ list }}" wx:key="stationId">
    <view slot="footer">
      <van-row>
        <van-col span="9" offset="1">
          <van-button plain round block size="small" type="primary" bindtap="goMap"
            data-latitude="{{item.stationLatitude}}" data-longitude="{{item.stationLongitude}}"
            data-stationname="{{item.stationName}}">到这里</van-button>
        </van-col>
        <van-col span="9" offset="4">
          <van-button data-pic="{{item.stationPic}}" data-sid="{{item.stationId}}" data-sname="{{item.stationName}}"
            data-mno="{{item.mno}}" round block size="small" type="primary" bindtap="toAddOil">去买单</van-button>
        </van-col>
      </van-row>
    </view>
  </van-card>
</view>

<!--授权登录获取用户信息弹窗-->
<view class="modal-mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
<view class="modal-dialog" wx:if="{{showModal}}">
  <view class="modal-content">
    <view>
      <icon class="icon-box-img" type="info" size="80"></icon>
    </view>
    <view>请先登录</view>
    <view>请先登录后再进行此操作</view>
    <van-button type="primary" open-type="getUserInfo" bindgetuserinfo="getUserInfo">授权微信登录</van-button>
  </view>
</view>
<!--授权获取地理位置信息弹窗-->
<view wx:if='{{isShowLocationLayer}}'>
  <view class='mask_layer' />
  <view class='modal_box'>
    <view class="title">"智慧油驿站"需要获取你的地理位置</view>
    <view class='content'>
      <text class='modalMsg'>您的位置信息将用于小程序位置接口的效果展示</text>
    </view>
    <view class='btn1'>
      <view bindtap='bindCancelLocation' class='cancel'>取消</view>
      <view bindtap='bindConfirmLocation' class='Sure'>确定</view>
    </view>
  </view>
</view>

<!--授权获取微信绑定手机号弹窗-->
<view class="modal-mask" catchtouchmove="preventTouchMove" wx:if="{{showModalPhone}}"></view>
<view class="modal-dialog" wx:if="{{showModalPhone}}">
  <view class="modal-content">
    <view>
      <icon class="icon-box-img" type="info" size="80"></icon>
    </view>
    <view>绑定手机号</view>
    <view>请先绑定手机号进行登录后，再进行此操作</view>
    <button open-type='getPhoneNumber' bindgetphonenumber="getPhoneNumber">
      手机号绑定登录
    </button>
  </view>
</view>
<!--授权获取用户信息弹窗-->
<view wx:if='{{isShowUserInfoLayer}}'>
  <view class='mask_layer' />
  <view class='modal_box'>
    <view class="title">请授权获取您的用户信息</view>
    <view class='content'>
      <text class='modalMsg'>"智慧油驿站"需要获取你的用户昵称等信息</text>
    </view>
    <view class='btn1'>
      <view bindtap='bindCancelUserInfo' class='cancel'>取消</view>
      <view bindtap='bindConfirmUserInfo' class='Sure'>确定</view>
    </view>
  </view>
</view>