classify.wxml 4.6 KB
<!--pages/classify/classify.wxml-->
<!-- 搜索框 -->
<view class="searchMain">
  <view class="location">
    <image src="/images/location.png"></image>
    <text>{{location}}</text>

  </view>
  <view class="searchBox">
    <view class="search_center" catchtap="goSearch">
      <view class="real_search_center">
        <input class="weui-input" auto-focus="{{false}}" placeholder="请输入商品名称" bindinput="getKeyWord"
          placeholder-class="placeholder" />
        <view class="search_right" catchtap="search">
          <image src="/images/01-02/sousuo.png"></image>
        </view>
      </view>

    </view>
  </view>
</view>
<!-- 侧边导航 -->
<view class="navSide">
  <van-sidebar active-key="{{ activeKey }}" style="background:rgb(247,248,250)">
    <view wx:for="{{lableArray}}" data-id="{{item.categoryId}}" bindtap="onChange">
      <van-sidebar-item title="{{item.categoryName}}" />
    </view>
  </van-sidebar>
  <!-- 导航content -->
  <view class="navContent">
    <scroll-view scroll-with-animation scroll-y class="scroll-view">
      <view class="navItem" wx:for="{{list}}" data-id="{{item.goodsId}}" data-index="{{index}}" bindtap="goGoodsDetail">
        <view class="productLeft">
          <image src="{{item.goodsImg}}"></image>
        </view>
        <view class="productRight">
          <view class="name">{{item.goodsName}}</view>
          <view class="detail">{{item.goodsAttributes}}</view>
          <view class="num">
            <view class="jNum" wx:if="{{item.type==1}}">积分:{{item.goodsPrice}}</view>
            <view class="jNum" wx:if="{{item.type==2}}">
              <text class="priceIcon">¥</text>
              {{item.goodsPrice}}</view>
            <view class="addIcon" catchtap="addCart" data-id="{{item.goodsId}}" data-index="{{index}}"
              wx:if="{{item.type==2}}">
              <image src="/images/03-02/tianjia.png"></image>
            </view>
            <view class="exchange" wx:if="{{item.type==1}}" catchtap="exchange" data-integral="{{item.goodsPrice}}"
              data-defaultSku="{{item.defaultSku}}">
              <image src="/images/03-02/duihuan.png"></image>
            </view>
          </view>
        </view>
      </view>
    </scroll-view>
    <view class="bottomHint" wx:if="{{bottomHint}}">
      我是有底线的~
    </view>
  </view>
</view>
<!-- 加入购物车弹框 -->
<view class="mask" catchtap="closeMask" wx:if='{{showMask}}'>
  <view class="diceng" catchtap="openMask">
    <view class="info">
      <image src="{{goodsData.goodsBanners[0]}}"></image>
      <view class="info_right">
        <view class="info_price">¥{{goodsData.list[idx].goodsPrice}}</view>
        <view class="info_stock">库存:{{goodsData.list[idx].goodsStock}}件</view>
        <view class="info_stock" wx:if='{{info.detai.spec_type=="20"}}'>请选择规格</view>
      </view>
    </view>
    <view class="attr" wx:if='{{info.detail.spec_type=="20"}}' wx:for='{{info.specData.spec_attr}}' wx:key='index'>
      <view>{{item.group_name}}</view>
      <view class="attr_main">
        <view class="attr_item {{cell.flag?'activity':''}}" wx:for='{{item.spec_items}}' wx:for-item='cell'
          wx:for-index='cellindex' wx:key='{{cellindex}}' data-index='{{index}}' data-cellindex='{{cellindex}}'
          catchtap="changeAttrNum">{{cell.spec_value}}</view>
      </view>
    </view>
    <view class="spec">
      <view class="{{idx==index?'specItem1':'specItem'}}" wx:for="{{goodsData.list}}" bindtap="check"
        data-index="{{index}}" data-id="{{item.goodsSkuId}}">{{item.goodsSkuName}}</view>
    </view>
    <view class="pay_count">
      <view>购买数量</view>
      <view class="count_box">
        <view class="count_jian" catchtap="decNum">-</view>
        <view class="real_count">{{count}}</view>
        <view class="count_jian" catchtap="addNum">+</view>
      </view>
    </view>
    <view class="confrimBtn" catchtap="confrimCart">确定</view>
  </view>
</view>
<!-- tabbar -->
<view class="tabbarBox">
  <ul>
    <li>
      <view class="tabbarPic" bindtap="toHome">
        <image src="/images/tab/home.png"></image>
      </view>
      <text bindtap="toHome">首页</text>
    </li>
    <li>
      <view class="tabbarPic">
        <image src="/images/tab/classify.png"></image>
      </view>
      <text class="check">分类</text>
    </li>
    <li>
      <view class="tabbarPic" bindtap="toShopCart">
        <image src="/images/tab/cart (2).png"></image>
      </view>
      <text bindtap="toShopCart">购物车</text>
    </li>
    <li>
      <view class="tabbarPic" bindtap="toUser">
        <image src="/images/tab/user.png"></image>
      </view>
      <text bindtap="toUser">我的</text>
    </li>
  </ul>
</view>