<!--pages/therapeuticRegimen/index.wxml-->
<scroll-view class="therapeuticRegimen">
  <!-- <view class="therapeuticRegimen-item">
    <view class="time">
      2024.10.01 至 2024.10.31
    </view>
    <text class="tab-text primary">进行中</text>
    <view class="item-box">
      <view class="image-box"></view>
      <view class="details">
        <view class="name">优思弗</view>
        <view class="text">每日2次，饭后服用</view>
      </view>
      <view class="yw-jl">500mg</view>

    </view>
    
  </view> -->
  <view class="therapeuticRegimen-item" wx:for="{{list}}" wx:key="index" data-index="{{index}}" bind:tap="toPathDetails">
    <view class="time">
      {{item.start_date}} 至 {{item.end_date}}
      
    </view>
    <text class="tab-text {{item.status == '进行中' ? 'primary' : 'default'}}">{{item.status}}</text>
    <view class="item-box" wx:for="{{item.detail}}" wx:for-item="detail" wx:key="index">

      <view class="image-box"></view>
      <view class="details">
        <view class="name">{{detail.name}}</view>
        <view class="text">每日{{detail.frequency}}次，{{detail.time}}</view>
      </view>
      <view class="yw-jl">{{detail.dose}}</view>

     
    </view>

  </view>
  <view class="btn-box">
    <t-button block theme="primary" bindtap="toPath">新增用药方案</t-button>
  </view>
</scroll-view>