banner-list.wxml
2.4 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
<!--pages/index/banner-list/banner-list.wxml-->
<view class="content">
<image src="{{pic}}" class="banner" mode="aspectFill"></image>
<view class='content_box'>
<!-- <view class="no-data" wx:if="{{list.length === 0}}">暂无活动</view> -->
<view class='content_item' wx:for='{{list}}' wx:key="index" wx:if="{{list.length>0}}"
bindtap='goPostDetail' data-id="{{item.id}}" data-type="{{item.type}}">
<!--<image src="http://pk86rwhci.bkt.clouddn.com/activity_img@2x.png"></image>-->
<image src="{{item.pic}}" mode="aspectFill"></image>
<view class="title">
<text class="area">{{item.title}} {{item.time}}</text>
<block wx:if="{{item.type === 1}}">
<!--已加入人数小于最低人数,显示还差多少人-->
<view class="num" wx:if="{{item.join_number<item.min}}">还差{{item.people}}人</view>
<!--最低人数<=已加入人数<最高人数,显示还可加入多少人-->
<view class="num" wx:else>还可加入{{item.max - item.join_number}}人</view>
</block>
<block wx:if="{{item.type === 2}}">
<!--已加入人数小于最低人数,显示还差多少人-->
<view class="num" wx:if="{{item.join_number<item.number}}">还差{{item.people}}人</view>
<!--最低人数<=已加入人数<最高人数,显示还可加入多少人-->
<view class="num" wx:else>还可加入{{item.max_number - item.join_number}}人</view>
</block>
</view>
<view class="user">
<!--<image src="../../../images/avatar@2x.png" class="avatar"></image>-->
<image src="{{item.userPic}}" mode="aspectFill" class="avatar"></image>
<block wx:if="{{item.userType ===1}}"><!--userType 1注册用户,2后台用户(金v)-->
<image src="{{item.sex === 1?'../../../images/man.png':'../../../images/women.png'}}"
class="sex-icon"></image>
</block>
<block wx:if="{{item.userType ===2}}">
<text class="iconfont icon-vip sex-icon"></text>
</block>
<text>{{item.userName}} {{item.address}}</text>
</view>
</view>
</view>
</view>