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

124 lines
4.4 KiB

<view class="container">
<!-- 头部区域 -->
<view class="header">
<view class="title-section">
<text class="page-title">农牧业政策解读</text>
<text class="page-subtitle">为您解读最新政策,助力农牧业发展</text>
</view>
<view class="date-info">数据更新至: {{currentDate}}</view>
</view>
<!-- 搜索和筛选区域 -->
<view class="search-section">
<view class="search-box">
<image class="search-icon" src="/pagesA/images/ss.png"></image>
<input
class="search-input"
placeholder="搜索政策关键词"
placeholder-class="placeholder-style"
bindinput="onSearchInput"
value="{{searchKeyword}}"
bindconfirm="onSearch"
/>
<view wx:if="{{searchKeyword}}" class="clear-btn" bindtap="onClearSearch">×</view>
</view>
<view class="filter-section">
<scroll-view class="filter-scroll" scroll-x="true">
<view
class="filter-tag {{activeFilter === '全部' ? 'active' : ''}}"
data-filter="全部"
data-value=""
bindtap="onFilterTap"
>全部</view>
<view
class="filter-tag {{ item.dictLabel === activeFilter ? 'active' : ''}}"
data-filter="{{item.dictLabel}}"
data-value="{{item.dictValue}}"
bindtap="onFilterTap"
wx:for="{{dictType}}"
>{{item.dictLabel}}</view>
</scroll-view>
</view>
</view>
<!-- 政策列表区域 -->
<scroll-view
class="policy-list"
scroll-y="true"
bindscrolltolower="onReachBottom"
style="height: {{scrollHeight}}px;"
>
<view wx:if="{{filteredPolicies.length === 0 && !isLoading}}" class="empty-state">
<text class="empty-text">暂无相关政策</text>
<text class="empty-tip">请尝试其他筛选条件</text>
</view>
<block wx:for="{{filteredPolicies}}" wx:key="id">
<view class="policy-card" data-id="{{item.id}}" bindtap="onPolicyTap">
<view class="policy-header">
<view class="policy-tag {{item.type}}">{{item.policyCategory}}</view>
<view class="policy-date">{{item.releaseDate}}</view>
</view>
<view class="policy-title">{{item.title}}</view>
<view class="policy-footer">
<view class="policy-source">{{item.issuingAgency}}</view>
<image class="policy-arrow" src="/pagesB/images/you.png" mode=""/>
</view>
</view>
</block>
<!-- 加载更多提示 -->
<view wx:if="{{isLoadingMore}}" class="loading-more">
<text class="loading-text">正在加载更多...</text>
</view>
<view wx:if="{{!hasMore && filteredPolicies.length > 0}}" class="no-more">
<text class="no-more-text">已经到底了</text>
</view>
</scroll-view>
<!-- 政策详情弹窗 -->
<view class="modal {{showPolicyDetail ? 'show' : ''}}" catchtap="hidePolicyDetail">
<view class="modal-content" catchtap="stopPropagation">
<view class="modal-header">
<view class="modal-title">{{currentPolicy.title}}</view>
<view class="modal-close" bindtap="hidePolicyDetail">×</view>
</view>
<scroll-view class="modal-body" scroll-y="true">
<view class="policy-info-row">
<view class="info-item">
<text class="info-label">政策类型:</text>
<text class="info-value">{{currentPolicy.policyCategory}}</text>
</view>
<view class="info-item">
<text class="info-label">发布日期:</text>
<text class="info-value">{{currentPolicy.releaseDate}}</text>
</view>
<view class="info-item">
<text class="info-label">发布单位:</text>
<text class="info-value">{{currentPolicy.issuingAgency}}</text>
</view>
</view>
<view class="section">
<view class="section-title">详细解读</view>
<view class="section-content">
<rich-text class="interpretation-text" space="emsp" nodes="{{currentPolicy.content}}"></rich-text>
</view>
</view>
</scroll-view>
<view class="modal-footer">
<button class="btn btn-secondary" bindtap="hidePolicyDetail">关闭</button>
</view>
</view>
</view>
<!-- 底部导航提示 -->
<view class="bottom-tip">
<text class="tip-text">已加载 {{filteredPolicies.length}} 条政策解读</text>
</view>
</view>