<block wx:if="{{ userInfoStatus == 1 }}">
  <view class="login-box">
    <image class="logo" src="/images/wx.jpg" mode="widthFix"></image>
    <view class="line"></view>
    <view class="title">申请获取以下权限</view>
    <view class="profile">获得你的公开信息(昵称，头像等)</view>
    <view class="btn">
      <van-button type="primary" block round bind:click="updateUserInfo">微信一键登录</van-button>
    </view>
  </view>
</block>
<block wx:if="{{ userInfoStatus == 2 }}">
  <view class="header-box">
    <image class="avatar" src="{{ apiUserInfoMap.base.avatarUrl }}" mode="aspectFill"></image>
    <view class="r">
      <view class="uid">用户ID: {{ apiUserInfoMap.base.id }}</view>
      <view class="nick">{{ apiUserInfoMap.base.nick }}</view>
    </view>
  </view>
  <view class="asset">
    <view class='item' bindtap='goAsset'>
      <view class="amount">{{balance}}</view>
      <view>余额</view>
    </view>
    <view class='item right' bindtap='goAsset'>
      <view class="amount">{{freeze}}</view>
      <view>冻结</view>
    </view>
    <view class='item right' bindtap='goScore'>
      <view class="amount">{{score}}</view>
      <view>积分</view>
    </view>
    <view class='item right' bindtap="gogrowth">
      <view class="amount">{{growth}}</view>
      <view>成长值</view>
    </view>
  </view>
  <view class="space van-hairline--bottom"></view>
  <van-cell-group wx:if="{{ myCards }}" title="我的会员卡">
    <van-cell wx:for="{{ myCards }}" wx:key="id" center title="{{ item.cardInfo.name }}" label="{{ item.dateEnd }} 到期" value-class="v-c" value="剩余: {{ item.amount }}" is-link url="/pages/card/logs?id={{ item.id }}" />
  </van-cell-group>
  <van-cell title="我的订单" value="更多" is-link url="/pages/order-list/index" />
  <van-grid clickable column-num="5">
    <van-grid-item icon="balance-list-o" text="待付款" badge="{{count_id_no_pay}}" bindtap='goOrder' data-type="0" />
    <van-grid-item icon="logistics" text="待发货" badge="{{count_id_no_transfer}}" bindtap='goOrder' data-type="1" />
    <van-grid-item icon="certificate" text="待收货" badge="{{count_id_no_confirm}}" bindtap='goOrder' data-type="2" />
    <van-grid-item icon="flower-o" text="待评价" badge="{{count_id_no_reputation}}" bindtap='goOrder' data-type="3" />
    <van-grid-item icon="after-sale" text="售后" bindtap='goOrder' data-type="99" />
  </van-grid>
  <van-cell wx:if="{{ cps_open == '1' }}" title="CPS订单" value="管理" is-link url="/packageCps/pages/order-list/cps" />
  <van-cell wx:if="{{ recycle_open == '1' }}" title="回收订单" value="管理" is-link url="/pages/recycle/orders" />
  <van-cell title="常用功能" />
  <van-grid clickable>
    <van-grid-item wx:if="{{canHX}}" icon="scan" text="扫码核销" bind:click="scanOrderCode" />
    <van-grid-item icon="paid" text="优惠买单" url="/pages/maidan/index" />
    <van-grid-item icon="balance-list-o" text="资金明细" url="/pages/asset/index" />
    <van-grid-item icon="bill-o" text="申请发票" url="/pages/invoice/apply" />
    <van-grid-item icon="bill-o" text="开票记录" url="/pages/invoice/list" />
    <van-grid-item icon="coupon-o" text="优惠券" url="/pages/coupons/index" link-type="switchTab" />
    <van-grid-item wx:if="{{ show_score_sign == 1 }}" icon="calendar-o" text="签到赚积分" url="/pages/sign/index" />
  </van-grid>
  <!-- 老样式 -->
  <view class="container">
    <block wx:if="{{apiUserInfoMap.peisongMember && apiUserInfoMap.peisongMember.type != 0}}">
      <view class="space"></view>
      <view class="menu-item">
        <view class="l">工作状态 ({{apiUserInfoMap.peisongMember.statusStr}})</view>
        <van-switch checked="{{ memberChecked }}" bind:change="memberCheckedChange" />
      </view>
      <view class="line"></view>
      <navigator url="/pages/peisong/orders">
        <view class="menu-item">
          <view class="l hongdian-box">配送订单<view wx:if="{{peisongOrderNumber}}" class="hongdian">{{peisongOrderNumber}}</view></view>
          <image class="next" src="/images/icon/next.png"></image>
        </view>
      </navigator>
      <block wx:if="{{apiUserInfoMap.peisongMember.type == 2}}">
        <view class="line"></view>
        <navigator url="/pages/peisong/orders?status=1">
          <view class="menu-item">
            <view class="l hongdian-box">待分配订单<view wx:if="{{peisongOrderNumber2}}" class="hongdian">{{peisongOrderNumber2}}</view></view>
            <image class="next" src="/images/icon/next.png"></image>
          </view>
        </navigator>
      </block>
      <block wx:else>
        <view class="line"></view>
        <navigator url="/pages/peisong/orders?status=-1">
          <view class="menu-item">
            <view class="l hongdian-box">待接单订单<view wx:if="{{peisongOrderNumber3}}" class="hongdian">{{peisongOrderNumber3}}</view></view>
            <image class="next" src="/images/icon/next.png"></image>
          </view>
        </navigator>
      </block>
      <view class="space"></view>
    </block>
  </view>

  <van-cell wx:if="{{ fx_type == 'hehuoren' }}" title="分销中心" is-link url="/packageFx/pages/hehuorenfenxiao/index" />
  <van-cell-group wx:if="{{ show_3_seller == 1 }}" title="三级分销">
    <van-cell wx:if="{{!apiUserInfoMap.base.isSeller}}" title="成为分销商" is-link url="/packageFx/pages/apply/index" />
    <van-cell wx:else title="分销中心" is-link url="/packageFx/pages/index/index" />
    <van-cell wx:if="{{apiUserInfoMap.base.isSeller}}" title="我的团队" is-link url="/packageFx/pages/myusers/index" />
    <van-cell wx:if="{{apiUserInfoMap.base.isSeller}}" title="推广订单" is-link url="/packageFx/pages/commisionLog/index" />
  </van-cell-group>
  <van-cell-group title="其他功能">
    <van-cell wx:if="{{ show_quan_exchange_score == 1 }}" title="积分券兑换积分" is-link url="/pages/score-excharge/index" />
    <van-cell wx:if="{{ show_score_exchange_growth == 1 }}" title="积分兑换成长值" is-link url="/pages/score-excharge/growth" />
    <van-cell title="帮助中心" is-link url="/pages/help/index" />
    <van-cell title="个人信息" is-link url="/pages/my/info-menu" />
    <van-cell title="系统设置" is-link url="/pages/my/setting" />
  </van-cell-group>
</block>