index.wxml 9.9 KB
Newer Older
api工厂's avatar
api工厂 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
<van-sticky>
<view class="search-contianer">
  <view class="search" style="height:{{navHeight}}px;padding-top:{{navTop}}px">
    <view class="search-title" src="../../images/actLogo/ytlogo.png"
      style="height:{{navHeight-navTop-5}}px;line-height:{{navHeight-navTop-5}}px;width:{{132/52*(navHeight-navTop-5)}}px;">
      {{mallName}}
    </view>
    <input placeholder-class="search-placeholder"
      style="width:{{menuButtonObject.left-18-((132/52)*(navHeight-navTop-5))}}px" type="text" placeholder="搜索活动名称" disabled
      value="{{name}}" bindinput="bindinput" bindtap="goSearch"></input>
  </view>
</view>
</van-sticky>
<navigator wx:if="{{shopInfo}}" url="/pages/shop/select">
  <view class="shops-container">
    <view class="l">
      <image src="/images/order-details/icon-address.png"></image>
      <text>{{shopInfo.name}}</text>
    </view>
    <view class="r">
      <text>切换门店</text>
      <image src="/images/icon/next.png"></image>
    </view>
  </view>
</navigator>
<view class="swiper-container">
  <swiper class="swiper1" indicator-dots="true" indicator-active-color="#fff" autoplay circular>
    <swiper-item wx:for="{{banners}}" wx:key="id">
      <image mode="aspectFill" bindtap="tapBanner" data-url="{{item.linkUrl}}" src="{{item.picUrl}}" />
    </swiper-item>
  </swiper>
  <view wx:if="{{goodsDynamic}}" class="goodsDynamic">
    <swiper class="swiper2" autoplay circular vertical>
      <navigator wx:for="{{goodsDynamic}}" wx:key="index" url="/pages/goods-details/index?id={{item.goodsId}}">
        <swiper-item>
          <view class="goodsDynamic-item">
            <image mode="aspectFill" src="{{item.avatarUrl}}"></image>
            <text>{{item.nick}} 购买了 {{item.goodsName}}</text>
          </view>
        </swiper-item>
      </navigator>
    </swiper>
  </view>
</view>
<view class="category-container">
  <view class="category-box">
    <view class="category-list" wx:for="{{categories}}" wx:key="id">
      <view class="category-column {{activeCategoryId == item.id ? 'type-item-on' : ''}}" bindtap="tabClick"
        data-id="{{item.id}}">
        <image mode="aspectFill" class="category-imgbox" src="{{item.icon}}"></image>
        <view class="category-title">{{item.name}}</view>
      </view>
    </view>
  </view>
</view>
<view class="notice-box" wx:if="{{noticeList}}">
  <swiper class="notice_swiper" vertical autoplay circular interval="8000">
    <swiper-item wx:for="{{noticeList.dataList}}" wx:key="id">
      <van-notice-bar wx:if="{{noticeList}}" mode="link" text="{{ item.title }}" background="#FFFFFF"
        data-id="{{ item.id }}" speed="30" bind:click="goNotice">
        <image slot="left-icon" class="notice-icon" src="../../images/home/notice.png"></image>
      </van-notice-bar>
    </swiper-item>
  </swiper>
</view>
<view class="container">
  <block wx:for="{{categories}}" wx:key="id" wx:if="{{item.goods}}">
    <view class="category-goods-title">
      <view class="weui-panel__hd">{{item.name}}</view>
      <view class="more">
        <navigator url="/pages/goods/list?categoryId={{item.id}}">更多 ></navigator>
      </view>
    </view>
    <view class="goods-container">
      <view class="goods-box" wx:for="{{item.goods}}" wx:key="id" bindtap="toDetailsTap" data-id="{{item.id}}">
        <view class="img-box">
          <image src="{{item.pic}}" class="image" mode="aspectFill" lazy-load="true" />
        </view>
        <view class="goods-title">{{item.name}}</view>
        <view style='display:flex;'>
          <view class="goods-price">¥ {{item.minPrice}}</view>
          <view wx:if="{{item.originalPrice && item.originalPrice > 0}}" class="goods-price"
            style='color:#aaa;text-decoration:line-through'>¥ {{item.originalPrice}}</view>
        </view>
      </view>
    </view>
  </block>
  <view class="space"></view>
89
  <image wx:if="{{ adPositionIndexLivePic }}" class="live-banner" src="{{ adPositionIndexLivePic.val }}" mode="widthFix" bindtap="clickAdPositionIndexLive"></image>
api工厂's avatar
api工厂 已提交
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
  <!-- 秒杀开始 -->
  <block wx:if="{{miaoshaGoods && miaoshaGoods.length > 0}}">
    <van-divider custom-class="table-text" contentPosition="center">
      <image class="table-icon-miaosha" src="../../images/home/miaosha.png"></image> 限时秒杀
    </van-divider>
    <view class="miaosha-container">
      <view class="miaosha-goods-list" wx:for="{{miaoshaGoods}}" wx:key="id" bindtap="toDetailsTap"
        data-id="{{item.id}}">
        <image src="{{item.pic}}" class="image" mode="aspectFill" lazy-load="true" />
        <view class="r">
          <view class="goods-title">{{item.name}}</view>
          <view class="count-down">
            <van-count-down wx:if="{{item.dateStartInt > 0}}" time="{{ item.dateStartInt }}"
              format="距离开始: HH 时 mm 分 ss 秒" />
            <van-count-down wx:if="{{item.dateStartInt <= 0 && item.dateEndInt > 0}}" time="{{ item.dateEndInt }}"
              format="剩余: HH 时 mm 分 ss 秒" />
          </view>
          <view class="miaosha-price-btn">
            <view class="price">¥{{item.minPrice}} <text>¥{{item.originalPrice}}</text></view>
            <van-button custom-class="msbtn" wx:if="{{item.dateStartInt > 0}}" type="danger" size="small" round plain
              disabled>未开始</van-button>
            <van-button custom-class="msbtn" wx:if="{{item.dateEndInt <= 0}}" type="danger" size="small" round>已结束
            </van-button>
            <van-button custom-class="msbtn" wx:if="{{item.stores <= 0}}" type="danger" size="small" round>已抢完
            </van-button>
            <van-button custom-class="msbtn"
              wx:if="{{item.dateStartInt <= 0 && item.dateEndInt > 0 && item.stores > 0}}" type="danger" size="small"
              round>立即抢购</van-button>
          </view>
        </view>
      </view>
    </view>
  </block>
  <!-- 秒杀结束 -->

  <view class="space"></view>
  <van-divider custom-class="table-text" wx:if="{{goodsRecommend.length > 0 && activeCategoryId == 0}}"
    contentPosition="center">
    <image class="table-icon-tuijian" src="../../images/home/recommend.png"></image> 爆品推荐
  </van-divider>
  <view class="goods-container" wx:if="{{goodsRecommend.length > 0 && activeCategoryId == 0}}">
    <view class="goods-box" wx:for="{{goodsRecommend}}" wx:key="id" bindtap="toDetailsTap" data-id="{{item.id}}">
      <view class="img-box">
        <image src="{{item.pic}}" class="image" mode="aspectFill" lazy-load="true" />
      </view>
      <view class="goods-title">{{item.name}}</view>
      <view style='display:flex;'>
        <view class="goods-price">¥ {{item.minPrice}}</view>
        <view wx:if="{{item.originalPrice && item.originalPrice > 0}}" class="goods-price"
          style='color:#aaa;text-decoration:line-through'>¥ {{item.originalPrice}}</view>
      </view>
    </view>
  </view>
  <view class="space"></view>
  <view wx-if="{{kanjiaList.length > 0 && activeCategoryId == 0}}"
    class="weui-panel weui-panel_access kanjia-container">
    <van-divider custom-class="table-text" contentPosition="center">
      <image class="table-icon-kanjia" src="../../images/home/kanjia.png"></image> 疯狂砍价
    </van-divider>
    <view class="weui-panel__bd">
      <van-card custom-class="kanjia-vcard" wx:for="{{kanjiaList}}" wx:key="id" price="{{item.kanjiaPrice}}"
        origin-price="{{item.originalPrice}}" desc="{{item.characteristic}}" title="{{item.name}}" thumb="{{item.pic}}">
        <view slot="footer">
          <van-button custom-class="kjbtn" type="danger" size="small" data-id="{{item.id}}" bind:click="toDetailsTap">砍价
          </van-button>
        </view>
        <view slot="price-top">
          <van-progress custom-class="vprogress" percentage="{{item.process}}" color="#FDEDED;" />
        </view>
      </van-card>
    </view>
  </view>
  <block wx:if="{{pingtuanList.length > 0 && activeCategoryId == 0}}">
    <view class='space'></view>
    <van-divider custom-class="table-text" contentPosition="center">
      <image class="table-icon-pingtuan" src="../../images/home/pingtuan.png"></image> 全民拼团
    </van-divider>
    <view class='tuan'>
      <view class='tuan-item' wx:for="{{pingtuanList}}" wx:key="id">
        <view class='tuan-goods-pic'>
          <image src="{{item.pic}}" mode="aspectFill" lazy-load='{{true}}' />
        </view>
        <view class='tuan-title'>{{item.name}}</view>
        <view class='tuan-profile'>{{item.characteristic}}</view>
        <view class="weui-badge" style="margin-left: 20rpx;" wx:if="{{item.tags}}">{{item.tags}}</view>
        <view class='tuan-price'>
          <text class='now'>¥ {{item.pingtuanPrice}}</text>
          <text class='original'>¥ {{item.originalPrice}}</text>
        </view>
        <view class="tuan-btn">
          <button class="ptbtn" type="warn" size="mini" bindtap="toDetailsTap" data-id="{{item.id}}">拼团</button>
        </view>
      </view>
    </view>
  </block>

  <view class='space'></view>
  <van-divider custom-class="table-text" contentPosition="center">
    <image class="table-icon-goodslist" src="../../images/home/goodslist.png"></image> 商品列表
  </van-divider>
  <view class="goods-container">
    <view class="goods-box" wx:for="{{goods}}" wx:key="id" bindtap="toDetailsTap" data-id="{{item.id}}">
      <view class="img-box">
        <image src="{{item.pic}}" class="image" mode="aspectFill" lazy-load="true" />
      </view>
      <view class="goods-title">{{item.name}}</view>
      <view class="goods-price-container">
        <view class="goods-price">¥ {{item.minPrice}}</view>
        <view wx:if="{{item.originalPrice && item.originalPrice > 0}}" class="goods-price2">¥ {{item.originalPrice}}
        </view>
      </view>
    </view>
  </view>
  <view hidden="{{loadingMoreHidden ? true : false}}" class="weui-loadmore weui-loadmore_line"
    style='margin-top:60rpx;margin-bottom:30rpx;'>
    <view class="weui-loadmore__tips weui-loadmore__tips_in-line">没有更多啦</view>
  </view>
</view>
<view class='coupons-float' bindtap="goCoupons">
  <image src="/images/gift.png"></image>
210
</view>