guochunzhong 8 years ago
parent b628f5ad9d
commit 2295d762cb
  1. 10
      pages/index/index.wxml

@ -1,6 +1,6 @@
<scroll-view scroll-y="true" height="100%">
<swiper style="height:470rpx;" indicator-dots="true" autoplay="true" interval="5000" duration="1000">
<block wx:for="{{slides}}" wx:for-item="slide">
<block wx:for="{{slides}}" wx:for-item="slide" wx:key="id">
<swiper-item>
<navigator url="{{slide.url}}">
<image class="slide-img" src="{{slide.img}}" mode="aspectFill"/>
@ -10,7 +10,7 @@
</swiper>
<view class="navs">
<block wx:for-items="{{navs}}">
<block wx:for-items="{{navs}}" wx:key="name">
<view class="nav-item" catchtap="catchTapCategory" data-type="{{item.name}}">
<image src="{{item.icon}}" class="nav-image"/>
<text>{{item.name}}</text>
@ -25,7 +25,7 @@
<view class="icon"><image src="../../images/volume_small.png"></image></view>
<view><text class="name">最热</text></view>
</view>
<block wx:for="{{popularity_products}}" wx:for-item="item">
<block wx:for="{{popularity_products}}" wx:for-item="item" wx:key="id">
<view class="item" bindtap="bindShowProduct" data-id="{{item.id}}">
<image class="head-img" src="{{item['image-url']}}" mode="aspectFill"></image>
</view>
@ -38,7 +38,7 @@
<view class="icon"><image src="../../images/new_small.png"></image></view>
<view><text class="name">新品</text></view>
</view>
<block wx:for="{{new_products}}" wx:for-item="item">
<block wx:for="{{new_products}}" wx:for-item="item" wx:key="id">
<view class="item" bindtap="bindShowProduct" data-id="{{item.id}}">
<image class="head-img" src="{{item['image-url']}}" mode="aspectFill"></image>
</view>
@ -51,7 +51,7 @@
<view class="icon"><image src="../../images/hot_small.png"></image></view>
<view><text class="name">火爆</text></view>
</view>
<block wx:for="{{hot_products}}" wx:for-item="item">
<block wx:for="{{hot_products}}" wx:for-item="item" wx:key="id">
<view class="item" bindtap="bindShowProduct" data-id="{{item.id}}">
<image class="head-img" src="{{item['image-url']}}" mode="aspectFill"></image>
</view>

Loading…
Cancel
Save