index.wxml
3.3 KB
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
<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>