index.wxml 3.3 KB
<import src="../template/template.wxml"></import>
<scroll-view scrollY bindscrolltolower="loadMore" style="height:{{scrollHeight}}px;">
    <view bindtap="goSearch" class="input_box  index_box ">
        <icon class="iconfont" size="13" type="search"></icon>
        <text class="place">搜索美食、家居和配饰</text>
    </view>
    <swiper autoplay="true" class="swiper" duration="1000" interval="3000">
        <swiper-item data-id="{{index}}" wx:for="{{banners}}" wx:key="{{index}}">
            <image class="slide-image" mode="scaleToFill" src="{{item.slide_pic}}"></image>
        </swiper-item>
    </swiper>
    <view class="index_title">
        <view class="iconfont icon-jingpin"></view>
        <text>精品推荐</text>
        <view class="iconfont icon-jingpin"></view>
    </view>
    <view class="recommendlist">
        <view class="recommend" wx:for="{{recom}}" wx:key="{{item.id}}">
            <navigator hoverClass="none" url="goodsdetail/goodsdetail?id={{item.id}}">
                <view class="recommend_item">
                    <image mode="widthFix" src="{{item.thumb}}"></image>
                </view>
            </navigator>
            <text>{{item.name}}</text>
        </view>
    </view>
    <view class="goodsList">
        <view class="listitem left">
            <view class="goods_box" data-index="{{index}}" wx:if="{{index%2==0}}" wx:for="{{goods}}" wx:key="{{item.id}}">
                <navigator hoverClass="none" url="goodsdetail/goodsdetail?id={{item.id}}">
                    <image mode="widthFix" src="{{item.thumb}}"></image>
                    <view class="goods_name">{{item.name}} </view>
                    <view class="price_box_month">
                        <view>
                            <text class="price">¥{{item.pprice}}</text>
                            <text class="old_price">¥{{item.oprice}}</text>
                        </view>
                    </view>
                    <text class="sales">月销量:{{item.month_sale?item.month_sale:0}}</text>
                </navigator>
            </view>
        </view>
        <view class="listitem right">
            <view class="goods_box" data-index="{{index}}" wx:if="{{index%2==1}}" wx:for="{{goods}}" wx:key="{{item.id}}">
                <navigator hoverClass="none" url="goodsdetail/goodsdetail?id={{item.id}}">
                    <image mode="widthFix" src="{{item.thumb}}"></image>
                    <view class="goods_name">{{item.name}}</view>
                    <view class="price_box_month">
                        <view>
                            <text class="price">¥{{item.pprice}}</text>
                            <text class="old_price">¥{{item.oprice}}</text>
                        </view>
                    </view>
                    <text class="sales">月销量:{{item.month_sale?item.month_sale:0}}</text>
                </navigator>
            </view>
        </view>
        <view>
            <template is="kefu" data></template>
        </view>
    </view>
    <view class="tips1">
        <view class="loadingbox" wx:if="{{hasMore}}">
            <image src="../imgs/icon-loading.gif"></image>
            <text>加载中...</text>
        </view>
        <view wx:else>
            <text>没有更多内容了</text>
        </view>
    </view>
</scroll-view>