index.wxml 2.31 KB
<view class="page">
  <view class="app__bgc bgc"></view>
  <view class="app__bg bg"></view>
  <view class="app__content main">
    <!-- Title及搜索框 -->
    <view class="top">
      <image class="top-bg" mode="widthFix" src="../../image/index/index-c1.png" />
      <view class="space1"></view>
      <view class="search">
        <view class="search-ipt-wrap">
          <input value="{{code}}" bindinput="bindCodeInput" class="ipt" placeholder="请输入串码" />
        </view>
        <view bindtap="onSearchHandler" class="search-scan">
          <image class="icon icon-search" mode="aspectFit" src="../../image/icon/icon-search.png" />
        </view>
        <view class="search-line"></view>
        <!-- 隐藏扫描二维码 -->
        <view bindtap="onScanHandler" class="search-scan search-scan2">
          <text class="t1">扫码得积分</text>
          <image class="icon icon2" mode="aspectFit" src="../../image/icon/icon-scan.png" />
        </view>
      </view>
    </view>
    <view class="top-space"></view>
    <view class="content">
      <!-- 轮播 banner -->
      <view class="banner">
        <swiper class="swiper" indicator-color="rgba(0,0,0,.3)" indicator-active-color="rgba(255,255,255,1)" indicator-dots="{{true}}" autoplay="{{true}}" interval="{{5000}}" duration="{{500}}">
          <block wx:for="{{bannerList}}" wx:key="{{index}}">
            <swiper-item>
              <image class="swiper-image" src="{{item}}" mode="aspectFill" />
            </swiper-item>
          </block>
        </swiper>
      </view>
      <view class="product">
        <view class="product-title">产品推荐{{codeStr}}</view>
        <view class="product-list">
          <!-- for循环 -->
          <view bindtap="onProductItemHandler" data-data="{{item}}" wx:for="{{productList}}" wx:key="{{index}}" class="item">
            <image class="image" mode="aspectFill" src="{{item.productImages[0]}}" />
            <view class="desc">{{item.productInfo}}</view>
          </view>
        </view>
      </view>
    </view>
  </view>
</view>
<van-popup show="{{ productDetailVisible }}" position="bottom">
  <product-detail-comp product-info="{{curProductDetail}}" bind:evtcomp="evtcomp"></product-detail-comp>
</van-popup>
<van-popup show="{{ authorizeVisible }}">
  <authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>