75 lines
3.4 KiB
Plaintext
75 lines
3.4 KiB
Plaintext
<!--pages/demand/list/index.wxml-->
|
|
<!-- <t-divider /> -->
|
|
<view class="home-page-container">
|
|
<view class="search-bar">
|
|
<t-search
|
|
t-class="search-bar__search"
|
|
t-class-input-container="search-bar__box"
|
|
t-class-input="search-bar__input"
|
|
t-class-left="search-bar__left"
|
|
shape="round"
|
|
placeholder="搜索需求关键词"
|
|
value="{{keywords}}"
|
|
left-icon="{{null}}"
|
|
bind:change="onChangeInput"
|
|
bind:blur="onChangeInput"
|
|
bind:submit="onChangeSearch"
|
|
>
|
|
<t-icon slot="left-icon" prefix="" name="search" size="36rpx" color="#b9bcc4" />
|
|
</t-search>
|
|
<view class="refresh-btn {{refreshing ? 'refresh-btn--loading' : ''}}" hover-class="refresh-btn--hover" bind:tap="onRefreshTap">
|
|
<t-icon prefix="" name="refresh" size="38rpx" color="#787878" />
|
|
</view>
|
|
</view>
|
|
<!-- <t-divider /> -->
|
|
<view class="home-page-tabs">
|
|
<t-tabs t-class="t-tabs" t-class-active="tabs-external__active" t-class-item="tabs-external__item" defaultValue="{{-1}}" space-evenly="{{false}}" bind:change="tabChangeHandle">
|
|
<t-tab-panel wx:for="{{tabList}}" wx:if="{{item.key < ((opType == 'my' || opType == 'all') ? 15 : 5)}}" wx:for-index="index" wx:key="index" label="{{item.text}}" value="{{item.key}}" />
|
|
</t-tabs>
|
|
</view>
|
|
<view class='list-wrapper' wx:for="{{demandList}}" wx:for-item="item" wx:for-index="index" wx:key="id">
|
|
<t-row>
|
|
<t-col span="2" t-class="dark">
|
|
<t-avatar class="user-avatar" size="50rpx" shape="round" image="{{item.user.avatar}}" />
|
|
</t-col>
|
|
<t-col span="22" t-class="light">
|
|
<view class="user-name">
|
|
{{item.user.nickname}}
|
|
</view>
|
|
<view class="content-wrapper">
|
|
<view class="content" id="desc-{{index}}" style="max-height: {{item.expanded ? 'none' : '120rpx'}}; overflow: hidden;">
|
|
<text>{{item.desc}}</text>
|
|
</view>
|
|
<view wx:if="{{item.showToggle}}" class="toggle-btn" bindtap="toggleDesc" data-index="{{index}}">
|
|
{{item.expanded ? '收起' : '查看全文'}}
|
|
</view>
|
|
<view class="content-img-list">
|
|
<image wx:for="{{item.images}}" wx:for-item="img" wx:for-index="imgIndex" wx:key="index" class="content-img" mode="aspectFill" data-index="imgIndex" data-images="{{item.images}}" src="{{img}}" bind:tap="onImageView"></image>
|
|
</view>
|
|
</view>
|
|
<view class="bottom-row">
|
|
<text class="add-time">{{item.createtime_ago}}</text>
|
|
</view>
|
|
<view class="horizontal-distribute">
|
|
<view class="action-item">
|
|
<t-icon name="browse" size="40rpx" />
|
|
<text class="action-text">浏览<text style="padding: 0 5rpx;">{{item.views}}</text></text>
|
|
</view>
|
|
<view class="action-item">
|
|
<t-icon name="user-1" size="40rpx" />
|
|
<text class="action-text">已投标<text style="padding: 0 5rpx;">{{item.demand_biddings_count}}</text>人</text>
|
|
</view>
|
|
<view class="action-btn">
|
|
<t-button theme="{{item.button.theme}}" size="extra-small" data-index="{{index}}" bind:tap="demandListClickHandle">
|
|
{{item.button.name}}
|
|
</t-button>
|
|
</view>
|
|
</view>
|
|
</t-col>
|
|
</t-row>
|
|
</view>
|
|
<view class="empty-container" wx:if="{{isEmpty}}">
|
|
<t-empty icon="info-circle-filled" description="暂无数据" />
|
|
</view>
|
|
<view wx:if="{{!hasMore && !isEmpty}}" class="no-more">没有更多了</view>
|
|
</view> |