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.
|
|
<view class="page-container"> <!-- 搜索栏 --> <view class="search-container"> <view class="search-box"> <image src="/pagesB/images/sou.png" class="search-icon"></image> <input placeholder="搜索经验分享..." placeholder-class="placeholder" bindinput="onSearchInput" bindconfirm="onSearchConfirm" value="{{searchText}}" class="search-input" /> <view wx:if="{{searchText}}" bindtap="clearSearch" class="clear-btn"> <image src="/pagesA/images/ch.png" class="clear-icon"></image> </view> </view> </view>
<!-- 分类标签 --> <scroll-view class="category-container" scroll-x="true"> <view class="category-list"> <view class="category-item {{activeCategory === '' ? 'active' : ''}}" bindtap="onCategoryTap" data-id=""> <text class="category-text">全部</text> </view> <view wx:for="{{categories}}" wx:key="id" class="category-item {{activeCategory === item.label ? 'active' : ''}}" bindtap="onCategoryTap" data-id="{{item.label}}"> <text class="category-text">{{item.label}}</text> </view> </view> </scroll-view>
<!-- 经验分享列表 --> <scroll-view class="experience-scroll" scroll-y="true" bindscrolltolower="onScrollToLower" style="height: 100vh;"> <view class="experience-list"> <view wx:for="{{experienceList}}" wx:key="id" class="experience-item" bindtap="onExperienceTap" data-id="{{item.id}}"> <!-- 分类标签 --> <view class="tag"> <view class="item-category-tag"> <text class="tag-text">{{item.categoryName}}</text> </view> <!-- 发布时间 --> <text class="publish-time">{{item.publishTime}}</text> </view>
<!-- 标题 --> <view class="item-title">{{item.title}}</view>
<!-- 摘要 --> <view class="item-summary">{{item.summary}}</view>
<!-- 底部信息 --> <view class="item-footer"> <!-- 作者信息 --> <view class="author-info"> <image src="{{baseUrl+item.vetAvatar}}" class="author-avatar"></image> <text class="author-name">{{item.vetName}}</text> </view>
<!-- 浏览量 --> <view class="view-info"> <image src="/pagesB/images/lll.png" class="view-icon"></image> <text class="view-count">{{item.viewCount}}</text> </view> </view> </view>
<!-- 加载更多 --> <view wx:if="{{!loading && hasMore}}" class="load-more" bindtap="loadMoreData"> <text class="load-more-text">点击加载更多</text> </view>
<view wx:if="{{loading}}" class="loading"> <text class="loading-text">加载中...</text> </view>
<view wx:if="{{!hasMore && experienceList.length > 0}}" class="no-more"> <text class="no-more-text">没有更多了</text> </view>
<!-- 空状态 --> <view wx:if="{{experienceList.length === 0 && !loading}}" class="empty-state"> <text class="empty-text">暂无相关经验分享</text> <text class="empty-hint">{{searchText || activeCategory ? '换个关键词试试吧' : '快去分享你的经验吧'}}</text> </view> </view> </scroll-view></view>
|