index.wxml 8.7 KB
<!--index.wxml-->
<!-- bindtap='model' -->
<view wx:if="{{!authorization}}">

  <view style="{{authorization == true?'position:fixed;top:0;width:100%;height:100%':''}}{{screenModel?'position:fixed;top:0;width:100%;height:100%':''}}">

    <view class="sinceLoc">
      <view class="btn">
        <view class="animate" animation="{{animationData}}"></view>
        <view class="left" style="{{!moudelOne?'color:#666666;':''}}" data-type='ziti' bindtap='animations' data-state='{{animation}}'>就近自提</view>
        <view class="right" style="{{moudelOne?'color:#666666;':''}}" data-type='shitang' bindtap='animations' data-state='{{!animation}}'>到店堂食</view>
      </view>
      <view class="location" wx:if="{{!stateShop}}">
        <!-- <text class="icon icon-hdxq_icon"></text> {{moudelOne&&!stateShop?nearest_spot.spot_name:nearest_store.store_name}} -->
        <text class="icon icon-hdxq_icon"></text> {{nearest_spot.spot_name}}
      </view>
      <view class="location" wx:if="{{stateShop}}">
        <text class="icon icon-hdxq_icon"></text> {{nearest_store.store_name}}
      </view>
    </view>

    <view wx:if="{{moudelOne}}">
      <!-- 筛选 -->
      <view class="screenModel" bindtap='model' wx:if="{{screenModel}}">
        <view class="screen" catchtap='cat'>
          <view class="screenTitle">
            <view class="screenLeft">选择自提点</view>
            <view class="screenRight" catchtap='sisi'>没有门口的?点我试试!</view>
          </view>
        </view>
        <view class="screenBj" catchtap='cat'>
          <view class="swiper-tab">
            <view class="swiper-tab-list {{currentTabT==index ? 'on' : ''}}" wx:for="{{sinceList.area}}" data-current="{{index}}" wx:key="" catchtap="swichNavT" data-area_id='{{item.area_id}}'>{{item.area_name}}</view>
          </view>
          <swiper class="swiper-box" duration="300"  bindchange="bindChangeT">
            <swiper-item>
              <view class="List">
                <view class="list" wx:for="{{sinceList.spot}}" catchtap='setLocation' data-spot_id='{{item.spot_id}}' data-spot_name='{{item.spot_name}}' data-distance_text="{{item.distance_text}}" wx:key="">
                  <view class="name">{{item.spot_name}}</view>
                  <view class="distance">
                    <view class="distanceLeft">
                      <text class="icon icon-hdxq_icon"></text>
                      <text style="font-size:26rpx;color:#999999;margin-left:9rpx;">距您{{item.distance_text}}</text>
                    </view>
                    <view class="distanceRight" catchtap='getGoodsDetails' data-spot_id='{{item.spot_id}}'>
                      取货点详情
                    </view>
                  </view>
                </view>
              </view>
            </swiper-item>
          </swiper>
        </view>
      </view>

      <view>
        <scroll-view scroll-x="true" class="tab-h" scroll-left="{{scrollLeft}}" wx:if='{{menu}}'>
          <view class="tab-item new {{currentTab==-1?'active':''}}" data-current="-1" bindtap="swichNav">新品试吃</view>
          <view class="tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="swichNav">全部分类</view>
          <view wx:for="{{allData.type}}" wx:key="" data-t_id='{{item.t_id}}' class="tab-item {{currentTab==index+1?'active':''}}" data-current="{{index+1}}" bindtap="swichNav">{{item.type_name}}</view>
        </scroll-view>
        <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" style="height:348rpx;">
          <block wx:for="{{imgUrls}}" wx:key="" >
            <swiper-item bindtap='detailsGoods' data-id="{{item.bind_goods_id}}">
              <image src="{{item.slide_pic}}" class="slide-image" style="width:100%;height:348rpx;" />
            </swiper-item>
          </block> 
        </swiper>
        <swiper class="tab-content" duration="300" bindchange="switchTab" style="height:{{248*allData.goods_list.length+90}}rpx">
          <swiper-item>
            <scroll-view scroll-x="true" class="scoll-h">
              <block wx:for="{{allData.goods_list}}" wx:key="*this">
                <view style="padding:0 34rpx;" bindtap='detailsGoods' data-id="{{item.goods_id}}">
                  <view class="item-ans">
                    <view class="avatar">
                      <image class="img" src="{{item.thumb}}"></image>
                    </view>
                    <view class="expertInfo">
                      <view class="name">{{item.goods_name}}</view>
                      <view class="tag">{{item.goods_description}}</view>
                      <view class="answerHistory">
                        <text style="color:#C90103;font-size:36rpx;">¥{{item.goods_price}}</text>
                        <text style="color:#999999;font-size:24rpx;margin-left:34rpx;">月销 {{item.month_sales}} 件</text>
                      </view>
                    </view>
                    <view class="askBtn">
                      <image catchtap='openShopCar' data-num='{{item.num}}' data-id="{{item.goods_id}}" data-index='{{index}}' wx:if="{{item.chacke == false}}" src="http://omega.wx.bronet.cn/public/static/images/37@2x.png"></image>
                      <view class="stepper" wx:if="{{item.chacke == true}}">
                        <!-- 减号 -->
                        <text class="{{minusStatus}}" catchtap="minusCount" data-id='{{item.goods_id}}' data-index="{{index}}" data-num='{{item.num}}' data-cart_id="{{item.cart_id}}">-</text>
                        <!-- 数值 -->
                        <text style="background:#fff;color:#333333;font-size:36rpx;border:0;line-height:44rpx;">{{item.num}}</text>
                        <!-- 加号 -->
                        <text class="normal" catchtap="addCount" data-id='{{item.goods_id}}' data-index="{{index}}" data-num='{{item.num}}'>+</text>
                      </view>
                    </view>
                  </view>
                </view>
              </block>
            </scroll-view>
          </swiper-item>
        </swiper>
        <view class='nodata' wx:if="{{allData.goods_list.length == 0}}">暂无相关数据</view>
        
      </view>
    </view>

    <view wx:if="{{moudelOne == false}}" wx:for="{{hallListh}}" wx:key="" style="padding-left: 38rpx;padding-right: 40rpx;">
      <view class="locationList" bindtap='arriveShop' data-data='{{item}}'>
        <view class="left">
          <view class="nameNum">
            <view class="name">{{item.store_name}}</view>
            <view class="num">距您{{item.distance_text}}</view>
          </view>
          <view class='time'>
            <text class="icon icon-hdxq_icon1"></text>
            <view class="times">营业时间:{{item.open_start}}-{{item.open_end}}</view>
          </view>
          <view class="time" style="margin-top:21rpx;">
            <text class="icon icon-hdxq_icon"></text>
            <view class="times">{{item.store_address}}</view>
          </view>
        </view>
        <view class="right" catchtap='shopDetails' data-store_id='{{item.store_id}}' data-store_name='{{item.store_name}}' data-distance_text='{{item.distance_text}}' data-open_start='{{item.open_start}}' data-open_end='{{item.open_end}}' data-store_address='{{item.store_address}}'>
          <text class="icon icon-icon-test3"></text>
        </view>
      </view>
    </view>

    <view class="tabBar">
      <view class="barList" bindtap='tabBar' data-index='{{index}}' wx:for="{{tabBarIndex}}" wx:key="">
        <image wx:if="{{item.state == false}}" src="{{item.img}}"></image>
        <image wx:else src="{{item.selectImg}}"></image>
        <view class="font" style="{{item.state == false?'':'color:#FEAD00'}}">{{item.name}}</view>
        <view class="num" wx:if="{{item.num != null}}">{{item.num}}</view>
      </view> 
    </view>

    <view class="suspend" wx:if="{{diaoyan}}" bindtap='guidance'>
      <image src="https://shipin.wx.broteam.cn/public/images/inquire.png"></image>
    </view>
  </view>



</view>




<view class="page" wx:if="{{authorization}}">
  <view class="userAvatarUrl">
    <open-data type="userAvatarUrl"></open-data>
  </view>
  <view class="userNickName">
    <open-data type="userNickName"></open-data>
  </view>
  <view class="btn">
    <button open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="bindGetUserInfo">授权登录</button>
  </view>
</view>


<!-- 优惠券 -->
 
<view class='card' wx:if="{{card}}">
  <view class='card_box'>
    <view class='card_container'>
      <image src='/img/card_bg.png'></image>   
      <view class='card_info'>{{cardInfo.pledge_name}}X{{cardInfo.num}}</view>   
      <view class='get_btn'  bindtap='getCard'>
        <image src='/img/get_btn.png'></image>
      </view>  
      <view class='close icon icon-close' bindtap='hideCard'></view>
    </view>
  </view>
</view>