import React from 'react';
// Taro mini-program component

/**
 * E3. 登录/注册页
 *
 * 微信小程序：一键微信登录
 * H5：手机号+验证码
 */

const LoginPage: React.FC = () => {
  return (
    <view className="login-page">
      {/* Logo */}
      <view className="logo-section">
        <view className="logo-box">
          <text className="logo-text">G</text>
        </view>
        <text className="app-name">Genex</text>
        <text className="app-slogan">发现优质好券</text>
      </view>

      {/* WeChat Login (小程序) */}
      <view className="login-actions">
        <view className="wechat-btn">
          <text className="wechat-icon">💬</text>
          <text className="wechat-text">微信一键登录</text>
        </view>

        <view className="divider">
          <view className="divider-line" />
          <text className="divider-text">或</text>
          <view className="divider-line" />
        </view>

        {/* Phone Login (H5) */}
        <view className="phone-section">
          <view className="input-wrap">
            <text className="input-icon">📱</text>
            <input className="input-field" placeholder="手机号" type="number" />
          </view>
          <view className="input-wrap code-wrap">
            <view className="code-input">
              <text className="input-icon">🔒</text>
              <input className="input-field" placeholder="验证码" type="number" />
            </view>
            <view className="code-btn">
              <text className="code-btn-text">获取验证码</text>
            </view>
          </view>
          <view className="login-btn">
            <text className="login-btn-text">登录</text>
          </view>
        </view>

        {/* Terms */}
        <view className="terms">
          <text className="terms-text">登录即表示同意</text>
          <text className="terms-link">《用户协议》</text>
          <text className="terms-text">和</text>
          <text className="terms-link">《隐私政策》</text>
        </view>
      </view>
    </view>
  );
};

export default LoginPage;

/*
CSS:

.login-page {
  min-height: 100vh; background: white;
  display: flex; flex-direction: column;
  padding: 0 64rpx;
}

.logo-section {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 160rpx; padding-bottom: 80rpx;
}
.logo-box {
  width: 120rpx; height: 120rpx;
  background: linear-gradient(135deg, #6C5CE7, #9B8FFF);
  border-radius: 28rpx;
  display: flex; align-items: center; justify-content: center;
}
.logo-text { color: white; font-size: 48rpx; font-weight: 700; }
.app-name { font-size: 40rpx; font-weight: 700; color: #141723; margin-top: 24rpx; }
.app-slogan { font-size: 26rpx; color: #A0A8BE; margin-top: 8rpx; }

.login-actions { flex: 1; }

.wechat-btn {
  display: flex; align-items: center; justify-content: center;
  height: 96rpx; background: #07C160; border-radius: 999rpx;
}
.wechat-icon { font-size: 36rpx; margin-right: 12rpx; }
.wechat-text { color: white; font-size: 30rpx; font-weight: 600; }

.divider {
  display: flex; align-items: center; margin: 48rpx 0;
}
.divider-line { flex: 1; height: 1rpx; background: #E4E7F0; }
.divider-text { margin: 0 24rpx; font-size: 24rpx; color: #A0A8BE; }

.input-wrap {
  display: flex; align-items: center;
  height: 96rpx; background: #F8F9FC;
  border-radius: 16rpx; padding: 0 24rpx;
  margin-bottom: 20rpx; border: 1rpx solid #E4E7F0;
}
.input-icon { font-size: 32rpx; margin-right: 16rpx; }
.input-field { flex: 1; font-size: 28rpx; background: transparent; }

.code-wrap { padding: 0; }
.code-input {
  flex: 1; display: flex; align-items: center;
  padding: 0 24rpx;
}
.code-btn {
  padding: 0 28rpx; height: 96rpx;
  display: flex; align-items: center;
  border-left: 1rpx solid #E4E7F0;
}
.code-btn-text { font-size: 24rpx; color: #6C5CE7; font-weight: 500; }

.login-btn {
  height: 96rpx; background: #6C5CE7; border-radius: 999rpx;
  display: flex; align-items: center; justify-content: center;
  margin-top: 16rpx;
}
.login-btn-text { color: white; font-size: 30rpx; font-weight: 600; }

.terms {
  display: flex; justify-content: center; align-items: center;
  padding: 48rpx 0; flex-wrap: wrap;
}
.terms-text { font-size: 22rpx; color: #A0A8BE; }
.terms-link { font-size: 22rpx; color: #6C5CE7; }
*/
