diff --git a/src/app/()/page.tsx b/src/app/()/page.tsx index ac4bb3d..9f25910 100644 --- a/src/app/()/page.tsx +++ b/src/app/()/page.tsx @@ -1,5 +1,5 @@ import Link from "next/link"; -import { ArrowRight, CheckCircle2 } from "lucide-react"; +import { ArrowRight, CheckCircle2, Code2, Lock, Users } from "lucide-react"; import { Button } from "@/components/ui/button"; import { @@ -25,20 +25,29 @@ export default function HomePage() {
-
+ {/* Hero Section */} +
+
+
+
-
- - Q58 Connect - - - 使用 Q58 论坛账号,一键登录您的应用 - +
+
+

+ Q58 Connect +

+
+

+ 基于 OAuth 2.0 协议,为您的应用快速接入 Q58 + 论坛统一身份认证,实现一键登录 +

+
+
-
@@ -46,18 +55,20 @@ export default function HomePage() {
-
+ {/* Features Section */} +
- + - 简单集成 - + + 简单集成 + 只需几行代码,即可为您的应用添加 Q58 论坛账号登录功能 -
    +
    • 标准 OAuth 2.0 协议 @@ -74,15 +85,16 @@ export default function HomePage() { - + - 安全可靠 - + + 安全可靠 + 采用业界最佳实践,确保您的应用和用户数据安全 -
        +
        • HTTPS 加密传输 @@ -99,15 +111,16 @@ export default function HomePage() { - + - 功能丰富 - + + 功能丰富 + 提供完整的用户信息和权限管理功能 -
            +
            • 用户基本信息 @@ -127,34 +140,36 @@ export default function HomePage() {
-
+ {/* Documentation Section */} +
- - - 快速开始 - - 按照以下步骤,快速接入 Q58 Connect - - - - - - 发起授权 - 处理回调 - 获取用户 - - - - - 1. 发起授权请求 - - 将用户重定向到授权页面 - - - -
-                          
-                            {`const authUrl = 'https://connect.q58.club/oauth/authorize?' + 
+            
+ + + 快速开始 + + 按照以下步骤,快速接入 Q58 Connect + + + + + + 发起授权 + 处理回调 + 获取用户 + + + + + 1. 发起授权请求 + + 将用户重定向到授权页面 + + + +
+                            
+                              {`const authUrl = 'https://connect.q58.club/oauth/authorize?' + 
   new URLSearchParams({
     response_type: 'code',        // 必填,固定值
     client_id: 'your_client_id',  // 必填,您的应用ID
@@ -164,23 +179,23 @@ export default function HomePage() {
   });
 
 window.location.href = authUrl;`}
-                          
-                        
-
-
-
- - - - 2. 处理授权回调 - - 在回调地址处理授权结果 - - - -
-                          
-                            {`// 获取访问令牌
+                            
+                          
+
+
+
+ + + + 2. 处理授权回调 + + 在回调地址处理授权结果 + + + +
+                            
+                              {`// 获取访问令牌
 const response = await fetch('https://connect.q58.club/api/oauth/access_token', {
   method: 'POST',
   headers: {
@@ -193,23 +208,23 @@ const response = await fetch('https://connect.q58.club/api/oauth/access_token',
 });
 
 const { access_token, expires_in } = await response.json();`}
-                          
-                        
-
-
-
- - - - 3. 获取用户信息 - - 使用访问令牌获取用户数据 - - - -
-                          
-                            {`const userInfo = await fetch('https://connect.q58.club/api/oauth/user', {
+                            
+                          
+
+
+
+ + + + 3. 获取用户信息 + + 使用访问令牌获取用户数据 + + + +
+                            
+                              {`const userInfo = await fetch('https://connect.q58.club/api/oauth/user', {
   headers: {
     'Authorization': \`Bearer \${access_token}\`
   }
@@ -224,27 +239,31 @@ const { access_token, expires_in } = await response.json();`}
   "avatar_url": "https://...",
   "groups": ["group1", "group2"]
 }`}
-                          
-                        
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+ {/* CTA Section */} +
- 准备好了吗? - +

准备好了吗?

+

创建一个应用,开始使用 Q58 Connect - -

+

+
- +
@@ -252,9 +271,9 @@ const { access_token, expires_in } = await response.json();`}
-