与牧同行-兽医端小程序
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.

61 lines
2.5 KiB

  1. <view class="container-box">
  2. <!-- 头部:专家信息卡片 -->
  3. <view class="expert-card">
  4. <view class="avatar-wrapper">
  5. <image class="avatar" src="{{expertInfo.avatar}}" mode="aspectFill"></image>
  6. <view class="online-status {{expertInfo.online ? 'online' : 'offline'}}"></view>
  7. </view>
  8. <view class="info">
  9. <view class="name-row">
  10. <text class="name">{{expertInfo.name}}</text>
  11. <text class="online-text">{{expertInfo.online ? '在线' : '离线'}}</text>
  12. </view>
  13. <view class="specialty">{{expertInfo.specialty}}</view>
  14. <view class="experience-tag">
  15. <text class="tag-text">从业 {{expertInfo.experience}} 年</text>
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 聊天申请列表区域 -->
  20. <view class="list-header">
  21. <view class="list-title-wrap">
  22. <text class="list-title">咨询申请</text>
  23. <text class="list-count">{{applyList.length}}</text>
  24. </view>
  25. </view>
  26. <scroll-view scroll-y class="apply-scroll" bindscrolltolower="loadMore" enhanced show-scrollbar="{{false}}">
  27. <view class="apply-list">
  28. <block wx:for="{{applyList}}" wx:key="id">
  29. <view class="apply-item" bindtap="handleApply" data-id="{{item.id}}" data-user="{{item.user}}">
  30. <image class="user-avatar" src="{{item.user.avatar}}" mode="aspectFill"></image>
  31. <view class="apply-content">
  32. <view class="apply-header">
  33. <view class="user-info">
  34. <text class="user-name">{{item.user.name}}</text>
  35. </view>
  36. <text class="apply-time">{{item.applyTime}}</text>
  37. </view>
  38. <view class="message-area">
  39. <text class="message-preview">{{item.lastMessage || '请求咨询...'}}</text>
  40. <view wx:if="{{item.unreadCount > 0}}" class="unread-badge">{{item.unreadCount > 99 ? '99+' : item.unreadCount}}</view>
  41. </view>
  42. </view>
  43. </view>
  44. </block>
  45. <!-- 空状态提示 -->
  46. <view wx:if="{{applyList.length === 0}}" class="empty-state">
  47. <text class="empty-text">暂无新的咨询申请</text>
  48. <text class="empty-subtext">稍后刷新试试</text>
  49. </view>
  50. <!-- 加载更多指示 -->
  51. <view wx:if="{{hasMore && applyList.length > 0}}" class="loading-more">
  52. <view class="loading-spinner"></view>
  53. <text>正在加载更多...</text>
  54. </view>
  55. <view wx:if="{{!hasMore && applyList.length > 0}}" class="no-more">没有更多了</view>
  56. </view>
  57. </scroll-view>
  58. </view>