<view class="page">
  <!-- 顶部导航栏 -->
  <view class="unified-header">
    <view class="unified-header-left" bindtap="onBack">
      <image src="/images/icon-back.png" class="unified-back-icon" mode="aspectFit"></image>
      <text class="unified-back-text">返回</text>
    </view>
    <text class="unified-header-title">公告详情</text>
    <view class="unified-header-right"></view>
  </view>

  <scroll-view scroll-y class="content" style="padding-top: 194rpx" enhanced show-scrollbar="{{false}}">
    <!-- 加载中 -->
    <view class="loading-tip" wx:if="{{loading}}">
      <text>加载中...</text>
    </view>

    <!-- 错误提示 -->
    <view class="error-tip" wx:if="{{error}}">
      <text>{{error}}</text>
      <text class="retry-btn" bindtap="onBack">返回</text>
    </view>

    <!-- 公告内容 -->
    <view class="notice-content" wx:if="{{!loading && notice && !error}}">
      <view class="notice-body">
        <rich-text nodes="{{notice.content}}"></rich-text>
      </view>
      <view class="notice-date">{{notice.createdAt}}</view>
    </view>
  </scroll-view>
</view>
