index.wxml 4.17 KB
<wxs module="filter" src="../../utils/utilswxs.wxs"></wxs>
<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="scan">
        <image bindtap="onScanHandler" mode="widthFix" class="scan-icon" src="../../image/index/icon-scan.png" />
        <view class="icon-t1">点击扫码</view>
      </view>
      <view class="data">
        <view class="data-item">
          <view class="data-item-t1">
            {{userInfo&&userInfo.memberPoints ? filter.Fen2Yuan(userInfo.memberPoints) + '元' : '-' }}
          </view>
          <view class="data-item-t2">我的奖金</view>
        </view>
        <view class="data-item">
          <view class="data-item-t1">{{userInfo ?  userInfo.promotionNum + '人' : '-' }}</view>
          <view class="data-item-t2">推广人数</view>
        </view>
      </view>
      <view class="search">
        <view bindtap="onSearchHandler" class="search-scan">
          <image class="icon icon-search" mode="aspectFit" src="../../image/icon/icon-search.png" />
        </view>
        <view class="search-ipt-wrap">
          <input value="{{code}}" bindinput="bindCodeInput" class="ipt" placeholder="请输入串码" />
        </view>
      </view>
    </view>
    <view class="top-space"></view>
    <view class="content">
      <view class="nav">
        <view bindtap="onMyQrcodeHandler" class="nav-item">
          <image class="icon" mode="widthFix" src="../../image/index/icon-qrcode.png" />
          <view class="t1">二维码</view>
        </view>
        <view bindtap="toVipLoginHandler" class="nav-item">
          <image class="icon" mode="widthFix" src="../../image/index/icon-verify.png" />
          <view class="t1">去认证</view>
        </view>
        <view bindtap="onRankHandler" class="nav-item">
          <image class="icon" mode="widthFix" src="../../image/index/icon-rank.png" />
          <view class="t1">排行榜</view>
        </view>
        <view bindtap="onAuctionHandler" class="nav-item">
          <image class="icon" mode="widthFix" src="../../image/index/icon-seckill.png" />
          <view class="t1">秒杀</view>
        </view>
        <!-- <view bindtap="onAuctionHandler" class="nav-item">
          <image class="icon" mode="widthFix" src="../../image/index/icon-auction.png" />
          <view class="t1">竞价</view>
        </view> -->
        <!-- <view bindtap="onDistributorHandler" class="nav-item">
          <image class="icon" mode="widthFix" src="../../image/index/icon-distributor.png" />
          <view class="t1">分销商</view>
        </view> -->
      </view>
      <!-- 轮播 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="blue-block"></view>
        <view bindtap="toVipLoginHandler" wx:if="{{false}}" class="verify-btn">去认证</view>
        <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>