You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
3.8 KiB
72 lines
3.8 KiB
6 years ago
|
<!--index.wxml-->
|
||
|
<!--1px = 750/320 = 2.34rpx;-->
|
||
|
<view class="container">
|
||
|
<view class="swiper-container">
|
||
|
<swiper class="swiper_box"
|
||
|
autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperchange">
|
||
|
<block wx:for="{{banners}}" wx:key="id">
|
||
|
<swiper-item>
|
||
|
<image bindtap="tapBanner" data-id="{{item.businessId}}" src="{{item.picUrl}}_m" class="slide-image" width="750rpx" height="562.5rpx"/>
|
||
|
</swiper-item>
|
||
|
</block>
|
||
|
</swiper>
|
||
|
<view class="dots">
|
||
|
<block wx:for="{{banners}}" wx:key="unique">
|
||
|
<view class="dot{{index == swiperCurrent ? ' active' : ''}}"></view>
|
||
|
</block>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class="type-container">
|
||
|
<scroll-view class="type-navbar" scroll-x="true">
|
||
|
<view class="type-box" wx:for-items="{{categories}}" wx:key="id">
|
||
|
<view id="{{item.id}}" class="type-navbar-item {{activeCategoryId == item.id ? 'type-item-on' : ''}}" bindtap="tabClick">
|
||
|
{{item.name}}
|
||
|
</view>
|
||
|
</view>
|
||
|
</scroll-view>
|
||
|
</view>
|
||
|
<view class="search-view" style="background:{{ scrollTop === 0 ?'-webkit-linear-gradient(top, rgba(105,195,170, 1), rgba(105,195,170, 0.3))' :( scrollTop<200 ? 'rgba(105,195,170,'+(scrollTop/400+0.3) +')' : 'rgba(105,195,170,1)') }} ">
|
||
|
<view class="search-content">
|
||
|
<image src="/images/search-pic.png" class="search-icon" />
|
||
|
<input placeholder="请输入搜索内容" class="search-input" maxlength="30" confirm-type="搜索" bindinput='listenerSearchInput' bindconfirm='toSearch'>
|
||
|
</input>
|
||
|
<button class='search-btn' bindtap="toSearch">搜索
|
||
|
</button>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view wx:if="{{noticeList}}" class="notice">
|
||
|
<view class="notice_iteml">公告:</view>
|
||
|
<swiper wx:if="{{noticeList}}" class="notice_swiper" vertical="true" autoplay="true" circular="true" interval="3000">
|
||
|
<navigator wx:for-items="{{noticeList.dataList}}" wx:key="id" url="/pages/notice/show?id={{item.id}}" open-type="navigate">
|
||
|
<swiper-item >
|
||
|
<view class="notice_itemr">{{item.title}}</view>
|
||
|
</swiper-item>
|
||
|
</navigator>
|
||
|
</swiper>
|
||
|
</view>
|
||
|
<view class="coupons" hidden="{{hasNoCoupons}}">
|
||
|
<scroll-view class="coupons-scroll" scroll-x="true">
|
||
|
<view class="coupons-item" wx:for-items="{{coupons}}" wx:for-index="idx" wx:key="id" bindtap="gitCoupon" data-id="{{item.id}}">
|
||
|
<view style="font-size: 35rpx"> ¥ {{item.moneyMax}}元 </view>
|
||
|
<view> {{item.name}} </view>
|
||
|
<view> 满 {{item.moneyHreshold}} 元使用 </view>
|
||
|
<view wx:if="{{item.dateEndType == 0}}"> {{item.dateEnd}} 前有效 </view>
|
||
|
<view wx:if="{{item.dateEndType == 1}}"> 领取 {{item.dateEndDays}} 天内有效 </view>
|
||
|
</view>
|
||
|
</scroll-view>
|
||
|
</view>
|
||
|
<view class="goods-container">
|
||
|
<view class="goods-box" wx:for-items="{{goods}}" wx:key="{{index}}" bindtap="toDetailsTap" data-id="{{item.id}}">
|
||
|
<view class="img-box">
|
||
|
<image src="{{item.pic}}_m" 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 hidden="{{loadingMoreHidden ? true : false}}" class="no-more-goods">没有更多啦</view>
|
||
|
</view>
|