<!--pages/profile/profile.wxml-->
<view class="profile-container">
  <!-- 用户信息头部 -->
  <view class="profile-header">
    <view class="user-avatar">
      <image src="/images/avatar.png" class="avatar-img" />
    </view>
    <view class="user-info">
      <view class="username">{{userInfo.username || userInfo.name || '用户'}}</view>
      <view class="user-role">{{userInfo.role || '管理员'}}</view>
    </view>
    <view class="edit-btn" bindtap="editProfile">
      <text class="edit-icon">✏️</text>
    </view>
  </view>

  <!-- 功能菜单 -->
  <view class="menu-section">
    <view class="menu-item" bindtap="changePassword">
      <view class="menu-icon">🔒</view>
      <view class="menu-text">修改密码</view>
      <view class="menu-arrow">></view>
    </view>
    
    <view class="menu-item" bindtap="hardwareManagement">
      <view class="menu-icon">⚙️</view>
      <view class="menu-text">硬件管理</view>
      <view class="menu-arrow">></view>
    </view>
    
    <view class="menu-item" bindtap="personnelManagement">
      <view class="menu-icon">👥</view>
      <view class="menu-text">人员管理</view>
      <view class="menu-arrow">></view>
    </view>
    
    <view class="menu-item" bindtap="aboutUs">
      <view class="menu-icon">ℹ️</view>
      <view class="menu-text">关于我们</view>
      <view class="menu-arrow">></view>
    </view>
  </view>

  <!-- 退出登录 -->
  <view class="logout-section">
    <button class="logout-btn" bindtap="logout">
      <text class="logout-icon">🚪</text>
      <text class="logout-text">退出登录</text>
    </button>
  </view>

  <!-- 版本信息 -->
  <view class="version-info">
    <text class="version-text">版本 1.0.0</text>
  </view>
</view>

<!-- 加载提示 -->
<view class="loading-overlay" wx:if="{{loading}}">
  <view class="loading-content">
    <text class="loading-text">加载中...</text>
  </view>
</view>