Files
soul-yongping/miniprogram/pages/mentors/mentors.wxml

74 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- 选择导师 -->
<view class="page">
<view class="nav-bar" style="padding-top: {{statusBarHeight}}px;">
<view class="nav-back" bindtap="goBack"><text class="back-icon"></text></view>
<text class="nav-title">选择导师</text>
<view class="nav-placeholder-r"></view>
</view>
<view style="height: {{statusBarHeight + 44}}px;"></view>
<view class="search-bar">
<view class="search-input-wrap">
<icon name="search" size="36" color="#8e8e93" customClass="search-icon"></icon>
<input
class="search-input"
placeholder="搜索导师、技能或行业..."
value="{{searchKw}}"
bindinput="onSearchInput"
/>
</view>
</view>
<view class="filter-row">
<view
class="filter-tag {{!filterSkill ? 'filter-active' : ''}}"
data-skill="全部"
bindtap="onFilterTap"
>全部</view>
<view
wx:for="{{skills}}"
wx:key="*this"
wx:if="{{item !== '全部'}}"
class="filter-tag {{filterSkill === item ? 'filter-active' : ''}}"
data-skill="{{item}}"
bindtap="onFilterTap"
>{{item}}</view>
</view>
<view class="section-header">
<text class="section-title">推荐导师</text>
<view class="section-more" bindtap="loadMentors">
<text>查看全部</text>
<icon name="chevron-right" size="28" color="rgba(255,255,255,0.6)" customClass="section-more-icon"></icon>
</view>
</view>
<view class="loading" wx:if="{{loading}}">加载中...</view>
<view class="mentor-list" wx:else>
<view class="mentor-card" wx:for="{{mentors}}" wx:key="id">
<view class="mentor-card-inner">
<view class="mentor-avatar-wrap">
<image wx:if="{{item.avatar}}" class="mentor-avatar" src="{{item.avatar}}" mode="aspectFill"></image>
<view wx:else class="mentor-avatar-placeholder">{{item.name ? item.name[0] : '?'}}</view>
</view>
<view class="mentor-info">
<text class="mentor-name">{{item.name}}</text>
<text class="mentor-intro">{{item.intro || ''}}</text>
<view class="mentor-tags" wx:if="{{item.tagsArr && item.tagsArr.length}}">
<text class="mentor-tag" wx:for="{{item.tagsArr}}" wx:key="*this" wx:for-item="tag">{{tag}}</text>
</view>
<view class="mentor-price-row">
<view class="mentor-price-wrap">
<text class="mentor-price-num">¥{{item.priceSingle || 0}}</text>
<text class="mentor-price-unit">起 / 单次咨询</text>
</view>
<view class="mentor-btn" data-id="{{item.id}}" bindtap="goDetail">预约</view>
</view>
</view>
</view>
</view>
</view>
<view class="empty" wx:if="{{!loading && mentors.length === 0}}">暂无导师</view>
<view class="bottom-space"></view>
</view>