<view class="page-root">
  <view class="bg-layer"></view>

  <scroll-view class="main-scroll" scroll-y="true" enhanced show-scrollbar="{{false}}">
    <view class="main-content">
      <!-- 头部 -->
      <view class="hero">
        <view class="settings-icon" bindtap="goToSetting">
          <image src="{{settingIcon}}" mode="aspectFit" class="icon-dark" />
        </view>
        <view class="user-block">
          <view class="avatar-outside">
            <image class="avatar" src="{{avatarUrl}}" mode="aspectFill" />
          </view>
          <view class="user-text">
            <text class="nickname">{{userNicheng || '点击登录'}}</text>
            <text class="uid">UID: {{userUid || '••••••'}}</text>
          </view>
        </view>
        <button wx:if="{{showLoginBtn}}" class="login-btn" bindtap="handleWechatLogin">一键登录</button>
      </view>

      <!-- 我的订单 -->
      <view class="section">
        <view class="title-line gradient-bg">
          <text class="title-text">我的订单</text>
        </view>
        <view class="frosted-box">
          <view class="order-row">
            <view class="order-unit" bindtap="goToOrder" data-type="daifuwu">
              <view class="icon-bg"><image src="{{daifuwuIcon}}" mode="aspectFit" class="icon-dark icon-size" /></view>
              <text class="order-name">待服务</text>
              <view class="badge" wx:if="{{orderCounts.daifuwu > 0}}">{{orderCounts.daifuwu}}</view>
            </view>
            <view class="order-unit" bindtap="goToOrder" data-type="fuwuzhong">
              <view class="icon-bg"><image src="{{fuwuzhongIcon}}" mode="aspectFit" class="icon-dark icon-size" /></view>
              <text class="order-name">服务中</text>
              <view class="badge" wx:if="{{orderCounts.fuwuzhong > 0}}">{{orderCounts.fuwuzhong}}</view>
            </view>
            <view class="order-unit" bindtap="goToOrder" data-type="yiwancheng">
              <view class="icon-bg"><image src="{{yiwanchengIcon}}" mode="aspectFit" class="icon-dark icon-size" /></view>
              <text class="order-name">已完成</text>
              <view class="badge" wx:if="{{orderCounts.yiwancheng > 0}}">{{orderCounts.yiwancheng}}</view>
            </view>
            <view class="order-unit" bindtap="goToOrder" data-type="yituikuan">
              <view class="icon-bg"><image src="{{yituikuanIcon}}" mode="aspectFit" class="icon-dark icon-size" /></view>
              <text class="order-name">已退款</text>
              <view class="badge" wx:if="{{orderCounts.yituikuan > 0}}">{{orderCounts.yituikuan}}</view>
            </view>
          </view>
        </view>
      </view>

      <!-- 更多服务 -->
      <view class="section">
        <view class="title-line gradient-bg">
          <text class="title-text">更多服务</text>
        </view>
        <view class="service-row">
          <view class="service-unit" bindtap="goToKefu">
            <view class="icon-bg"><image src="{{kefuIcon}}" mode="aspectFit" class="icon-color icon-size" /></view>
            <text class="service-name">在线客服</text>
          </view>
          <view class="service-unit" bindtap="goToGuanzhuA">
            <view class="icon-bg"><image src="{{guanzhualongIcon}}" mode="aspectFit" class="icon-color icon-size" /></view>
            <text class="service-name">关注阿龙</text>
          </view>
        </view>
      </view>

      <!-- 身份认证 -->
      <view class="section">
        <view class="title-line gradient-bg">
          <text class="title-text">身份认证</text>
        </view>
        <view class="auth-row">
          <view class="auth-unit" bindtap="goToAuth" data-type="dashou">
            <view class="icon-bg"><image src="{{dashouIcon}}" mode="aspectFit" class="icon-dark icon-size" /></view>
            <text class="auth-name">接单员认证</text>
          </view>
          <view class="auth-unit" bindtap="goToAuth" data-type="shangjia">
            <view class="icon-bg"><image src="{{shangjiaIcon}}" mode="aspectFit" class="icon-dark icon-size" /></view>
            <text class="auth-name">商家认证</text>
          </view>
          <view class="auth-unit" bindtap="goToAuth" data-type="zuzhang">
            <view class="icon-bg"><image src="{{zuzhangIcon}}" mode="aspectFit" class="icon-dark icon-size" /></view>
            <text class="auth-name">组长认证</text>
          </view>
          <view class="auth-unit" bindtap="goToAuth" data-type="guanshi">
            <view class="icon-bg"><image src="{{guanshiIcon}}" mode="aspectFit" class="icon-dark icon-size" /></view>
            <text class="auth-name">管事认证</text>
          </view>
          <view class="auth-unit" bindtap="goToAuth" data-type="kaoheguan">
        <view class="icon-bg"><image src="{{kaoheguanIcon}}" mode="aspectFit" class="icon-dark icon-size" /></view>
        <text class="auth-name">考核官认证</text>
        </view>
        </view>
      </view>

      <!-- 系统功能 -->
      <view class="section section-close">
        <view class="title-line gradient-bg">
          <text class="title-text">系统功能</text>
        </view>
        <view class="clear-row" bindtap="clearCache">
          <view class="icon-bg"><image src="{{qingchuIcon}}" mode="aspectFit" class="icon-dark icon-size" /></view>
          <text class="clear-word">清除缓存</text>
          <image src="{{arrowRightIcon}}" mode="aspectFit" class="arrow-right" />
        </view>
      </view>

      <!-- 底部 -->
      <view class="footer">
        <text class="copyright">© 2026 星阙网络技术</text>
        <text class="divider">|</text>
        <text class="coop" bindtap="goToCustomService">我要做同款</text>
      </view>
    </view>
  </scroll-view>
</view>

<custom-tab-bar />
<global-notification id="global-notification" />