banner-list.wxml
1.9 KB
<!--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"></image>
<text>{{item.userName}} {{item.address}}</text>
</view>
</view>
</view>
</view>