<!--pages/mine/mine.wxml-->
<view class="mine-container">
  <t-navbar title="我的" t-class-title="nav-title" />
  <scroll-view class="page-scroll__container mine-box" type="list" scroll-y style="height: calc(100vh - 180rpx); padding-bottom: calc(100rpx + env(safe-area-inset-bottom));">
    <view class="head-container">
      <view class="head-box" catch:tap="onHeadTap">
        <t-avatar class="avatar-example" size="64px">W</t-avatar>
        <view class="name-box">
          <view class="name" wx:if="{{loaded}}">{{patient ? patient.name : '未登录'}}</view>
          <view class="phone" wx:if="{{loaded && phone}}">{{phone}}</view>
        </view>
      </view>

      <view wx:if="{{i18n.home.__showRecord__}}" class="image-box" catch:tap="toHealthPage">
        <image src="../../assets/bg/health-file.bg.png" class="health-img" />
      </view>
    </view>

    <view class="order-container">
      <view class="title">{{i18n.orderText.mineOrder}}</view>
      <view class="content-container">
        <view class="content-box" catch:tap="toOrderListPage" wx:for="{{mineOrderList}}" wx:key="{{item.type}}" data-tab="{{item.tab}}">
          <t-badge :count="{{item.count}}" offset="{{ [2, -2] }}">
            <image src="{{item.url}}" class="status-img" />
          </t-badge>
          <view class="content-title">{{i18n.orderText.payStatusList[index]}}</view>
        </view>
      </view>
    </view>

    <view class="knowledge-box" style="margin-top:12px">
      <view class="title">{{i18n.healthTeach.title}}</view>
      <view class="content-container">
        <view class="content-box" catch:tap="toHealthEducationPage">
          <view>
            <image src="../../assets/icon/icon_announce@3x.png" class="icon-img" />
          </view>
          <view class="content-title">宣教通知</view>
        </view>
        <view class="content-box" catch:tap="toFootPrintPage">
          <view>
            <image src="../../assets/icon/icon_footprint@3x.png" class="icon-img" />
          </view>
          <view class="content-title">我的足迹</view>
        </view>
      </view>
    </view>

    <view class="knowledge-box" style="margin-top:12px">
      <view class="title">知识查询</view>
      <view class="content-container">
        <view class="content-box" catch:tap="toDietTeaPage">
          <view>
            <image src="../../assets/bg/icon_tea@3x.png" class="icon-img" />
          </view>
          <view class="content-title">{{i18n.home.tea}}</view>
        </view>

        <view class="content-box" catch:tap="toDietTonicPage">
          <view>
            <image src="../../assets/bg/icon_diet@3x.png" class="icon-img" />
          </view>
          <view class="content-title">{{i18n.home.tonic}}</view>
        </view>
      </view>
    </view>

    <view class="container">
      <view class="item" catch:tap="onAddressTap">
        <view class="item-box">
          <t-icon name="location" />
          <text style="margin-left:10px">收货地址</text>
        </view>
        <t-icon name="chevron-right" color="#CCCCCC" size="40rpx" />
      </view>
      <view class="item" catch:tap="onConsultationTap">
        <view class="item-box">
          <t-icon name="earphone" />
          <text style="margin-left:10px">{{i18n.consultChat.title}}</text>
        </view>
        <t-icon name="chevron-right" color="#CCCCCC" size="40rpx" />
      </view>
      <view class="item" catch:tap="onTreatmentTap" style="border-bottom:none">
        <view class="item-box">
          <t-icon name="hospital-1" />
          <text style="margin-left:10px">{{i18n.offlineTreatment.title}}</text>
        </view>
        <t-icon name="chevron-right" color="#CCCCCC" size="40rpx" />
      </view>
    </view>


  </scroll-view>

  <view class="tabbar-container">
    <tabbar tabbarValue="{{tabbarValue}}" patientId="{{patient.patientId || ''}}"></tabbar>
  </view>
</view>