TimeLine.wxml 1.47 KB
<!-- 时间轴组件 -->
<view class="timeline-container">
  <view wx:for="{{nodes}}" wx:key="index" class="timeline-node">
    <!-- 时间轴节点 -->
    <view class="timeline-node__dot-wrapper">
      <!-- 使用预处理的样式类 -->
      <view class="timeline-node__dot timeline-node__dot--{{item.type}}"></view>
    </view>
    <!-- 时间轴连接线 -->
    <view wx:if="{{index !== nodes.length - 1}}" class="timeline-node__line"></view>
    <!-- 时间轴内容 -->
    <view class="timeline-node__content timeline-node__content--{{item.type}} ">
      <view class="timeline-node__header">
        <view wx:if="{{item.statusDesc}}" class="timeline-node__title">{{item.statusDesc}}</view>
        <view wx:if="{{item.operateTime}}" class="timeline-node__time">{{item.operateTime}}</view>
      </view>
      <view class="timeline-node__tip">
        <view class="timeline-node__tip">
        <rich-text nodes="{{item.content}}"></rich-text>
        <!-- 手机号码点击区域 -->
        <view wx:if="{{item.phones && item.phones.length > 0}}" class="phone-numbers">
          <view wx:for="{{item.phones}}" wx:for-item="phone" wx:key="*this" 
                class="phone-number" catchtap="makePhoneCall" data-phone="{{phone}}">
            <!-- <mp-icon icon="cellphone" color="var(--btnColor)" size="{{14}}"></mp-icon> -->
            <text class="phone-call-text">拨打电话: {{phone}}</text>
          </view>
        </view>
      </view>
      </view>
    </view>
  </view>
</view>