<!-- head -->
<view class="modular">
  <view class="user-t">
    <view wx:if="{{userInfo}}">
      <view class="account-box">
        <view class='account-head'>
          <image src='{{userInfo.avatar}}' mode="aspectFill" lazy-load="true"></image>
        </view>
        <view class='user-info' style="{{isGrowup == 1 ? 'margin-bototm:20rpx;':''}}">
          <text class='font16'>{{userInfo.nickname}}\n</text>
          <view class="font12" style="margin-top: 8rpx;">{{userInfo.loginName}}</view>
        </view>
        <!-- navigator -->
        <view url='/pages/account/vip/index/index' class="baby-coin" hover-class='none'>
          <text class='icon icon-vip' style="font-size: 44rpx;"></text>
          <text class="coin">{{levelName}}会员</text>
        </view>
      </view>
      <view class="" style="margin: 20rpx 0;overflow: hidden;display: flex;align-items: flex-end;justify-content: space-between;">
        <view class="user-code font12">
          <block bindlongtap='copy' data-code="{{userInfo.code}}" wx:if="{{(userInfo.roleType == 'sharer' && stat.shareStatus!=2) || (userInfo.roleType == 'organ' && stat.organStatus!=2)}}">邀请码：{{userInfo.code}}</block>
        </view>
        <view class="user-coin"><text class='icon icon-coin'></text><text class="fontWei" style="margin: 0 6rpx;">{{stat.sumCoin}}</text></view>
      </view>
    </view>
    <view class="accont-nologin" wx:else>
      <text class='icon icon-info'></text>
      <text class='accont-nologin-text' bindtap="logion">
        <text class="middle">点击登录 / 注册</text><text class='icon icon-arrow'></text>
      </text>
    </view>
  </view>
</view>
<navigator class="growup-card growup-card-radius" hover-class="none" url="/pages/growthCard/index" wx:if="{{isGrowup == 1}}">
  <view class='growup-card-box font14'>
    我的冬夏令营成长卡<text class="arrow"></text>
  </view>
</navigator>
<view class=" septal-top-line" wx:if="{{userInfo.roleType=='normal' && isWallet == 0}}">
  <!-- <navigator class=" ceill-link" url="/pages/public/swiper/web?url=https://mp.weixin.qq.com/s/YI-q7lJYfrYZE4Vb6TI_0w&title=宝贝走天下" style="background: rgba(0,0,0,0);"> -->
    <image src='https://img.bbztx.com/miniProgram/challengeFamily/sharer_center.jpg' mode="widthFix" lazy-load="true" style="width: 100%;"></image>
  <!-- </navigator> -->
</view>
<view class="modular modular-pad" wx:if="{{ userInfo['roleType'] == 'organ'}}">
  <view class="modal-title  title-link" data-url="/pages/sharingHome/index?{{userInfo['roleType'] == 'sharer'?('shareStatus='+stat.shareStatus):('organStatus='+stat.organStatus)}}" bindtap='navigatorURl' wx:if="{{userInfo['roleType'] != 'normal'}}">
    <view class="modal-t">
      {{userInfo['roleType'] == 'sharer' ? '分享家中心' : '机构中心'}}
      <text class="gray share-status" wx:if="{{(userInfo['roleType'] == 'sharer' && stat.shareStatus==2)||(userInfo['roleType'] == 'organ' && stat.organStatus==2)}}">已停用</text>
    </view>
  </view>
  <view class="modal-title title-link" data-url="/pages/account/coin/index" bindtap='navigatorURl' wx:if="{{userInfo['roleType'] == 'normal'&&isWallet == 1}}">
    <view class="modal-t">我的钱包</view>
  </view>
  <view class="modal-label row-flex" wx:if="{{userInfo['roleType'] == 'sharer' || userInfo['roleType'] == 'organ'}}">
    <view class="col-8 link" data-url="/pages/sharingHome/wallet" bindtap='navigatorURl'>
      <view class="font14"><text class="themeColor font20 fontWei">{{stat.coin || 0}}</text>元</view>
      <view class='label '>
        <text>总佣金</text>
      </view>
    </view>
    <view class="col-8 line link" data-url="/pages/sharingHome/inviteUser?type=0&roleType={{userInfo.roleType}}" bindtap='navigatorURl'>
      <view style="flex: 1;">
        <view class="font14"><text class="themeColor font20 fontWei">{{stat.inviterNumber || 0}}</text>个</view>
        <view class='label '>
          <text>邀请用户</text>
        </view>
      </view>
    </view>
    <view class="col-8 link" data-url="/pages/sharingHome/willAccount" bindtap='navigatorURl'>
      <view class="font14"><text class="themeColor font20 fontWei">{{stat.unaccountedAmount || 0}}</text>元</view>
      <view class='label '>
        <text>即将入账</text>
      </view>
    </view>
  </view>
  <view class="modal-label wallet-box" wx:if="{{isWallet == 1 && userInfo['roleType'] == 'normal'}}">
    <view class='label' data-url="/pages/account/coin/index" bindtap='navigatorURl'>
      <view style="flex: 1;align-items: center;">
        <view class="font18 {{stat.refreshCoin == 1 ? 'info':''}}">
          <text class="subtitleColor ">{{userInfo ? userInfo.coin : "0.00"}}</text>
          <text class='font10'>元</text>
        </view>
        <text class='font12'>我的钱包</text>
      </view>
    </view>
    <view class='label' data-url="/pages/account/coin/index?index=1" bindtap='navigatorURl'>
      <view style="flex: 1;align-items: center;">
        <view class="font18 {{stat.refreshPeople == 1 ? 'info':''}}">
          <text class="subtitleColor">{{stat.inviterNumber || 0}}</text>
          <text class='font10'>人</text>
        </view>
        <text class="font12">邀请用户</text>
      </view>
    </view>
  </view>
</view>

<!-- 订单 -->
<view class="modular modular-pad">
  <view class="modal-title">我的订单</view>
  <view class="modal-label account-icon account-icon-five">
    <view class='link' data-url="/pages/order/index/order" bindtap='navigatorURl'>
      <image src="https://img.bbztx.com/miniProgram/challengeFamily/orderAll.png" class="imgIcon" mode="widthFix" />
      <view class='label'>
        <text>全部</text>
      </view>
    </view>
    <view class='link' data-url="/pages/order/index/order?otype=1" bindtap='navigatorURl'>
      <view style="position: relative;">
        <image src="https://img.bbztx.com/miniProgram/challengeFamily/orderNoPay.png" class="imgIcon" mode="widthFix">
          <text class="info" wx:if="{{stat.payNumber > 0}}">{{stat.payNumber}}</text>
        </image>
      </view>
      <view class='label'>
        <text>待付款</text>
      </view>
    </view>
    <view class='link' data-url="/pages/order/index/order?otype=2" bindtap='navigatorURl'>
      <view style="position: relative;">
        <image src="https://img.bbztx.com/miniProgram/challengeFamily/orderNoJoin.png" class="imgIcon" mode="widthFix" style="width: 55rpx;">
          <text class="info" wx:if="{{stat.attendNumber > 0}}">{{stat.attendNumber}}</text>
        </image>
      </view>
      <view class='label'>
        <text>待参加</text>
      </view>
    </view>
    <view class='link' data-url="/pages/order/index/order?otype=3" bindtap='navigatorURl'>
      <view style="position: relative;">
        <image src="https://img.bbztx.com/miniProgram/challengeFamily/orderEvaluate.png" class="imgIcon" mode="widthFix">
          <text class="info" wx:if="{{stat.commentNumber > 0}}">{{stat.commentNumber}}</text>
        </image>
      </view>
      <view class='label'>
        <text>待评价</text>
      </view>
    </view>
    <view class='link' data-url="/pages/order/index/order?otype=4" bindtap='navigatorURl'>
      <image src="https://img.bbztx.com/miniProgram/challengeFamily/orderAfterSale.png" class="imgIcon" mode="widthFix" style="width: 65rpx;">
      </image>
      <view class='label'>
        <text>退款售后</text>
      </view>
    </view>
  </view>
</view>
<view class="modular modular-pad">
  <view class="tab">
    <view class="tab-option" data-url="/pages/account/safe/index" bindtap='navigatorURl'>
      <image src="https://img.bbztx.com/miniProgram/challengeFamily/cashCoupon.png" class="imgIcon" mode="widthFix" />
      <text class="middle">现金券</text>
    </view>
    <view class="tab-option" data-url="/pages/account/cards/index" bindtap='navigatorURl'>
      <image src="https://img.bbztx.com/miniProgram/challengeFamily/miniInfo.png" class="imgIcon" mode="widthFix" /> <text class="middle">常用信息</text>
    </view>
    <view class="tab-option" data-url="/pages/public/about/index" bindtap='navigatorURl'>
      <image src="https://img.bbztx.com/miniProgram/challengeFamily/aboutUs.png" class="imgIcon" mode="widthFix" style="width: 50rpx;" /> <text class="middle">关于我们</text>
    </view>
    <view class="tab-option" data-url="/pages/account/setting/index" bindtap='navigatorURl'>
      <image src="https://img.bbztx.com/miniProgram/challengeFamily/setting.png" class="imgIcon" mode="widthFix" style="width: 50rpx;" /> <text class="middle">设置</text>
    </view>
  </view>
</view>
<tabbar tabbar="{{tabbar}}"></tabbar>