<!-- 打手信息修改页面 -->
<view class="container">
  <!-- 头像区域 -->
  <view class="avatar-section">
    <view class="avatar-wrapper">
      <image 
        src="{{ touxiangUrl }}" 
        mode="aspectFill" 
        class="avatar"
        bindtap="onAvatarTap"
      ></image>
      <view class="avatar-halo"></view>
      <text class="avatar-hint">点击更换头像</text>
    </view>
  </view>

  <!-- 信息展示与修改区域 -->
  <view class="info-section">
    <!-- UID（不可修改） -->
    <view class="info-item">
      <text class="info-label">服务者UID</text>
      <text class="info-value info-value-disabled">{{ dashouUid }}</text>
    </view>

    <!-- 昵称 -->
    <view class="info-item">
      <text class="info-label">服务昵称</text>
      <input 
        value="{{ dashouNicheng }}"
        placeholder="请输入昵称"
        maxlength="20"
        bindinput="onNichengInput"
        class="info-input"
      />
      <text class="char-count">{{ dashouNicheng.length || 0 }}/20</text>
    </view>

    <!-- 电话 -->
    <view class="info-item">
      <text class="info-label">联系电话</text>
      <input 
        value="{{ dashouDianhua }}"
        placeholder="请输入手机号"
        type="number"
        maxlength="11"
        bindinput="onDianhuaInput"
        class="info-input"
      />
    </view>

    <!-- 微信 -->
    <view class="info-item">
      <text class="info-label">微信号</text>
      <input 
        value="{{ dashouWeixin }}"
        placeholder="请输入微信号"
        maxlength="30"
        bindinput="onWeixinInput"
        class="info-input"
      />
      <text class="char-count">{{ dashouWeixin.length || 0 }}/30</text>
    </view>

    <!-- 个人介绍 -->
    <view class="info-item info-item-textarea">
      <text class="info-label">个人介绍</text>
      <textarea 
        value="{{ dashouJieshao }}"
        placeholder="请简单介绍一下自己..."
        maxlength="200"
        bindinput="onJieshaoInput"
        class="info-textarea"
      ></textarea>
      <text class="char-count">{{ dashouJieshao.length || 0 }}/200</text>
    </view>
  </view>

  <!-- 状态提示 -->
  <view class="status-section" wx:if="{{ isDataFromApi }}">
    <text class="status-text">提示：已从服务器加载最新信息</text>
  </view>

  <!-- 提交按钮 -->
  <view class="button-section">
    <button 
      class="submit-btn"
      bindtap="onSubmit"
      disabled="{{ isSubmitting }}"
      loading="{{ isSubmitting }}"
    >
      {{ isSubmitting ? '提交中...' : '立即修改' }}
    </button>
  </view>

  <!-- 加载中提示 -->
  <view class="loading-wrapper" wx:if="{{ isLoading }}">
    <view class="loading-content">
      <image src="/images/loading.gif" class="loading-icon"></image>
      <text class="loading-text">加载中...</text>
    </view>
  </view>
</view>
<global-notification id="global-notification" />
