<!--登录页面-->
<view class="login-page">
  <!-- 背景装饰 -->
  <view class="bg-decoration"></view>
  
  <!-- 导航栏 -->
  <view class="nav-bar" style="margin-top: {{statusBarHeight}}px;">
    <view class="back-btn" bindtap="goBack">
      <image src="/images/icon-back-arrow.png" class="back-icon" mode="aspectFit"></image>
    </view>
  </view>
  
  <!-- 主内容区 -->
  <view class="content">
    <!-- Logo区域 -->
    <view class="logo-section">
      <view class="logo-wrapper">
        <view class="logo-circle">
          <image src="/images/logo.jpg" class="logo-icon" mode="aspectFit"></image>
        </view>
      </view>
      <text class="app-name">心伴</text>
      <text class="app-slogan">欢迎您加入心伴俱乐部</text>
    </view>
    
    <!-- 登录按钮区域 -->
    <view class="login-section">
      <!-- 协议勾选 -->
      <view class="agreement-section">
        <view class="checkbox-wrap" bindtap="toggleAgreement">
          <view class="checkbox {{agreementChecked ? 'checked' : ''}}">
            <image wx:if="{{agreementChecked}}" src="/images/icon-check.png" class="check-icon" mode="aspectFit"></image>
          </view>
        </view>
        <view class="agreement-text">
          <text class="agreement-label">我已阅读并同意</text>
          <text class="agreement-link" bindtap="showUserAgreement">《用户服务协议》</text>
          <text class="agreement-label">和</text>
          <text class="agreement-link" bindtap="showPrivacyPolicy">《隐私协议》</text>
        </view>
      </view>
      
      <!-- 登录按钮 -->
      <button 
        class="login-btn {{loginLoading ? 'loading' : ''}} {{!agreementChecked ? 'disabled' : ''}}"
        open-type="{{agreementChecked ? 'getPhoneNumber' : ''}}"
        bindgetphonenumber="onGetPhoneNumber"
        bindtap="{{agreementChecked ? '' : 'onLoginBtnTap'}}"
        disabled="{{loginLoading}}"
      >
        <image src="/images/icon-phone-white.png" class="btn-icon" mode="aspectFit" wx:if="{{!loginLoading}}"></image>
        <text class="btn-text">{{loginLoading ? '登录中...' : '手机号快捷登录'}}</text>
      </button>
    </view>
  </view>
</view>
