<!--pages/profile/profile.wxml-->
<view class="profile-container">
  <!-- 用户信息头部 -->
  <view class="profile-header">
    <view class="user-avatar">
      <image wx:if="{{userInfo.avatar}}" src="{{userInfo.avatar}}" class="avatar-img" mode="aspectFill" />
      <image wx:else src="/images/avatar.png" class="avatar-img" />
    </view>
    <view class="user-info">
      <view class="username">{{userInfo.name || '西藏智慧三牧'}}</view>
      <view class="user-role">{{userInfo.phone || '18003030830'}}</view>
    </view>
    <view class="edit-btn" bindtap="editProfile">
      <text class="edit-icon">✏️</text>
    </view>
  </view>
  
  <!-- 功能菜单 -->
  <view class="menu-section">
    <view class="menu-item" bindtap="onMenuItemTap" data-id="system">
      <view class="menu-icon">⚙️</view>
      <view class="menu-text">系统设置</view>
      <view class="menu-arrow">></view>
    </view>
    
    <view class="menu-item" bindtap="onMenuItemTap" data-id="trade">
      <view class="menu-icon">📋</view>
      <view class="menu-text">生资交易</view>
      <view class="menu-arrow">></view>
    </view>
    
    <view class="menu-item" bindtap="onMenuItemTap" data-id="personnel">
      <view class="menu-icon">👥</view>
      <view class="menu-text">人员管理</view>
      <view class="menu-arrow">></view>
    </view>
    
    <view class="menu-item" bindtap="onMenuItemTap" data-id="password">
      <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="onLogout">
      <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>
