与牧同行-兽医端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

62 lines
2.5 KiB

<view class="container-box">
<!-- 头部:专家信息卡片 -->
<view class="expert-card">
<view class="avatar-wrapper">
<image class="avatar" src="{{expertInfo.avatar}}" mode="aspectFill"></image>
<view class="online-status {{expertInfo.online ? 'online' : 'offline'}}"></view>
</view>
<view class="info">
<view class="name-row">
<text class="name">{{expertInfo.name}}</text>
<text class="online-text">{{expertInfo.online ? '在线' : '离线'}}</text>
</view>
<view class="specialty">{{expertInfo.specialty}}</view>
<view class="experience-tag">
<text class="tag-text">从业 {{expertInfo.experience}} 年</text>
</view>
</view>
</view>
<!-- 聊天申请列表区域 -->
<view class="list-header">
<view class="list-title-wrap">
<text class="list-title">咨询申请</text>
<text class="list-count">{{applyList.length}}</text>
</view>
</view>
<scroll-view scroll-y class="apply-scroll" bindscrolltolower="loadMore" enhanced show-scrollbar="{{false}}">
<view class="apply-list">
<block wx:for="{{applyList}}" wx:key="id">
<view class="apply-item" bindtap="handleApply" data-id="{{item.id}}" data-user="{{item.user}}">
<image class="user-avatar" src="{{item.user.avatar}}" mode="aspectFill"></image>
<view class="apply-content">
<view class="apply-header">
<view class="user-info">
<text class="user-name">{{item.user.name}}</text>
</view>
<text class="apply-time">{{item.applyTime}}</text>
</view>
<view class="message-area">
<text class="message-preview">{{item.lastMessage || '请求咨询...'}}</text>
<view wx:if="{{item.unreadCount > 0}}" class="unread-badge">{{item.unreadCount > 99 ? '99+' : item.unreadCount}}</view>
</view>
</view>
</view>
</block>
<!-- 空状态提示 -->
<view wx:if="{{applyList.length === 0}}" class="empty-state">
<text class="empty-text">暂无新的咨询申请</text>
<text class="empty-subtext">稍后刷新试试</text>
</view>
<!-- 加载更多指示 -->
<view wx:if="{{hasMore && applyList.length > 0}}" class="loading-more">
<view class="loading-spinner"></view>
<text>正在加载更多...</text>
</view>
<view wx:if="{{!hasMore && applyList.length > 0}}" class="no-more">没有更多了</view>
</view>
</scroll-view>
</view>