<view class="bxcontainer">
  <!-- 返回按钮 -->
  <view class="custom-nav">
    <view bindtap="goBack">
      <image src="/static_file/backcion.png" mode="aspectFit" class="back-icon"></image>
    </view>
    <view class="nav-title">我的报修</view>
  </view>

  <scroll-view scroll-y="true" class="notice-list">
    <block wx:for="{{noticeList}}" wx:key="id">
      <view class="notice-item" bindtap="goToDetail" data-id="{{item.id}}">
        <view class="notice-content">
          <view class="notice-title">{{item.faultdescription}}</view>
          <view class="notice-address">{{item.address}}</view>
          <view class="notice-info">
            <text>{{item.contact}}/{{item.contactnumber}}</text>
            <text>{{item.createdate}}</text>
          </view>
        </view>
        <!-- 预览图按钮，仅当有附件时显示 -->
        <view class="preview" wx:if="{{item.hasAttachment}}" catchtap="previewImage" data-id="{{item.id}}">
          <image class="preview-icon" src="/static_file/yl.png"></image>
          <text class="preview-text">预览图</text>
        </view>
        <!-- 已回复标识 -->
        <image wx:if="{{item.isReplied}}" class="replied-stamp" src="/static_file/chuli.png"></image>
      </view>
    </block>
  </scroll-view>

  <!-- 添加按钮 -->
  <view class="add-button" bindtap="goToForm">
    <image src="/static_file/add.png" mode="aspectFit"></image>
  </view>

  <!-- 图片列表 -->
  <view class="image-container">
    <block wx:for="{{imageList}}" wx:key="index">
      <image 
        src="{{item}}" 
        mode="aspectFill" 
        bindtap="previewImage" 
        data-index="{{index}}"
        class="preview-image"
      ></image>
    </block>
  </view>
</view>