<!-- /tabs/index/index.wxml -->
<navigation-bar title="" back="{{false}}" color="black" background="transparent"></navigation-bar>
<scroll-view class="scrollarea {{user.organizeId ? 'active' : 'normal'}}" scroll-y type="list">
  <view class="profile">
    <t-row gutter="12" data-attr="/pages/setting/index" data-redirect="navigateTo" bindtap="pageTo">
      <t-col span="6" t-class="dark">
        <image class="avatar" src="{{user.avatar}}" />
      </t-col>
      <t-col span="18" t-class="light">
        <view class="flex flex-column justify-center" style="height: 100%;">
          <view class="ft-main text-white">{{user.nickName || user.realName || user.name}}</view>
          <view wx:if="{{member.status=='active'}}" class="ft-small text-white-70" style="margin-top:20rpx;font-size:16px">{{member.fullName || ''}}</view>
        </view>
      </t-col>
    </t-row>
    <view class="demo-rate" wx:if="{{member.associationInfo.hasTier}}">
      <view class="demo-rate__title">诚信单位星级:</view>
      <t-rate value="{{member.associationInfo.tier||0}}" />
    </view>
  </view>
  <!-- <t-button class="phoneBtn" theme="primary" size="large" block bind:tap="gotoCreateQr">创建二维码</t-button>
  <t-button class="phoneBtn" theme="primary" size="large" block bind:tap="gotoGetQr">获取二维码</t-button> -->
  <view class="membership" wx:if="{{member.status=='active'}}">
    <image class="membership-img" src="{{OSS_ROOT}}/assets/banner-vip.png" />
    <view class="membership-container flex align-center flex-between">
      <view class="text-title ft-main text-cut title">{{associationInfo.position}}</view>
      <view class="text-title ft-minor" style="padding-right: 10rpx;">有效期至 {{expirationdate}}</view>
    </view>
  </view>
  <view class="container pad flex flex-between align-center">
    <block wx:for="{{navTabs}}" wx:key="icon" wx:for-item="item">
      <view class="pill" data-attr="{{item.path}}" data-redirect="{{item.redirect}}" bindtap="pageTo">
        <image class="pill-img" src="{{item.icon}}" />
        <view class="pill-txt text-center text-title">{{item.title}}</view>
      </view>
    </block>
  </view>

  <view class="container">
    <!-- <t-cell title="我的企业" arrow jump-type="navigateTo" url="/pages/org/index">
      <image class="cell-icon" slot="left-icon" src="{{OSS_ROOT}}/assets/step_upload.png" />
    </t-cell> -->
    <t-cell title="会员证书" arrow bind:tap="toggeCert">
      <image class="cell-icon" slot="left-icon" src="{{OSS_ROOT}}/assets/icon-folder.png" />
    </t-cell>
    <t-cell title="个人信息" arrow jump-type="navigateTo" url="/pages/setting/index">
      <image class="cell-icon" slot="left-icon" src="{{OSS_ROOT}}/assets/btn-profile.png" />
    </t-cell>
    <t-cell title="我的发布" arrow data-redirect="navigateTo" bindtap="pageTo">
      <image class="cell-icon" slot="left-icon" src="{{OSS_ROOT}}/assets/btn-pub.png" />
    </t-cell>
    <t-cell title="退出登录" wx:if="{{user}}" arrow bindtap="logout">
      <image class="cell-icon" slot="left-icon" src="{{OSS_ROOT}}/assets/btn-logout.png" />
    </t-cell>
  </view>
</scroll-view>
<view class="cert-container" wx:if="{{isShowCert}}">
  <view class="cert-img-container">
    <image class="cert-img" mode="aspectFill" src="{{associationInfo.certUrl}}" />
  </view>
  <t-button bind:tap="toggeCert" class="cert-img-close-btn" theme="primary" size="large" block>关闭</t-button>
</view>