type-detail.wxml 6.2 KB
<!--pages/index/type-detail/type-detail.wxml-->
<view class="fix-box">
    <view class="head">
        <view class="position">
            <!--<picker class="picker" bindchange="cityPickerChange" value="{{current_city}}" range="{{city_picker_list}}" class="picker">-->
                <!--<view class="left">-->
                    <!--<view class="iconfont icon-location"></view>-->
                    <!--<text>{{city_picker_list[current_city] || city}}</text>-->
                    <!--<view class="iconfont icon-arrow-down"></view>-->
                <!--</view>-->
            <!--</picker>-->
            <view class="picker" bindtap="chooseCity"
                  class="picker">
                <view class="left">
                    <view class="iconfont icon-location"></view>
                    <text>{{addr}}</text>
                    <view class="iconfont icon-arrow-down"></view>
                </view>
            </view>
            <view class="right" bindtap="search">
                <view class="input"></view>
                <image src="../../../images/search@2x.png"></image>
                <!--<view class="iconfont icon-arrow-down"></view>-->
            </view>
        </view>
    </view>

    <view class="sort-select-box">
        <!--智能排序按钮-->
        <view class="sort-box" bindtap='clickSort'>
            <view class='' class="sort-btn">智能排序</view>
            <view class="iconfont icon-arrow-down"></view>
        </view>
        <!--筛选按钮-->
        <view class="select-box" bindtap='clickSelect'>
            <view class='' class="select-btn">筛选</view>
            <view class="iconfont icon-arrow-down"></view>
        </view>
    </view>
    <!--智能排序列表-->
    <view class='rent_mask' wx:if='{{is_showSort}}' bindtap="closeMask">
        <view class='rent_popup'>
            <view class="rent_item {{currentSort===index?'active':''}}" wx:for="{{sort}}" wx:key="index"
                  catchtap='chooseSort' data-index="{{index}}">{{item.name}}
            </view>
        </view>
    </view>
    <!--筛选列表-->
    <view class='rent_mask' wx:if='{{is_showSelect}}' bindtap="closeMask">
        <view class='rent_popup time-box' catchtap="openMask">
            <text class="title">时间:</text>
            <view class="picker-box">
                <picker bindchange="changeStartTime" value="{{start_time_date}}" mode="date">
                    <view class="time-select-box">
                        <view class="select-picker">
                            <view class="picker">
                                {{start_time_date}}
                            </view>
                        </view>
                        <view class="iconfont icon-arrow-down arrow"></view>
                    </view>
                </picker>
                <text>-</text>
                <picker bindchange="changeEndTime" value="{{end_time_date}}" mode="date">
                    <view class="time-select-box">
                        <view class="select-picker">
                            <view class="picker">
                                {{end_time_date}}
                            </view>
                        </view>
                        <view class="iconfont icon-arrow-down arrow"></view>
                    </view>
                </picker>
            </view>
            <text class="title">类别:</text>
            <view class="type">
                <text catchtap="chooseAll" class="{{is_all?'change-color':''}}">全部</text>
                <text class="{{current_type === index?'change-color':''}}"
                      wx:for="{{cate}}" wx:key="index" catchtap="chooseType"
                      data-index="{{index}}" data-id="{{item.id}}">{{item.name}}
                </text>
            </view>
            <!--<view class="rent_item {{currentSelect===index?'active':''}}" wx:for="{{select}}" wx:key="index"-->
            <!--catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>-->
        </view>
    </view>
</view>
<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>
            <!--<text class="num">还差{{item.people}}人</text>-->
            <!--type=1是拼活动,2是拼餐-->
            <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}}</text>
        </view>
    </view>
</view>