diff --git a/src/app/()/page.tsx b/src/app/()/page.tsx index 8257c2f..cdd060e 100644 --- a/src/app/()/page.tsx +++ b/src/app/()/page.tsx @@ -148,7 +148,7 @@ export default function HomePage() {
- + 接入应用 (授权码模式) @@ -159,7 +159,7 @@ export default function HomePage() { 适用于有后端服务器的应用。 - + @@ -202,7 +202,7 @@ export default function HomePage() { 请求地址 - + GET https://connect.q58.club/oauth/authorize @@ -229,7 +229,7 @@ window.location.href = authUrl;`}

用户授权后,将重定向到您的回调地址:

-
+                                
                                   
                                     https://your-app.com/callback?code=ac_xxxxxx...
                                   
@@ -267,7 +267,7 @@ window.location.href = authUrl;`}
                             
                               
                               请求地址
-                              
+                              
                                 POST
                                 https://connect.q58.club/api/oauth/access_token
                               
@@ -294,7 +294,7 @@ window.location.href = authUrl;`}
                               
                               响应数据
                               
-                                
+                                
                                   
                                     {`{
   "access_token": "at_xxxxxxxx",  // 访问令牌
@@ -328,7 +328,7 @@ window.location.href = authUrl;`}
                             
                               
                               请求地址
-                              
+                              
                                 GET https://connect.q58.club/api/oauth/user
                               
                             
@@ -348,7 +348,7 @@ window.location.href = authUrl;`}
                               
                               响应数据
                               
-                                
+                                
                                   
                                     {`{
   "id": "user_xxx",           // 用户唯一标识
diff --git a/src/components/ui/code-block.tsx b/src/components/ui/code-block.tsx
index e1f7724..a4459f0 100644
--- a/src/components/ui/code-block.tsx
+++ b/src/components/ui/code-block.tsx
@@ -3,6 +3,8 @@
 import { useState } from "react";
 import { Check, Copy } from "lucide-react";
 
+import { cn } from "@/lib/utils";
+
 function CopyButton({ text }: { text: string }) {
   const [copied, setCopied] = useState(false);
 
@@ -26,10 +28,16 @@ function CopyButton({ text }: { text: string }) {
   );
 }
 
-export function CodeBlock({ children }: { children: string }) {
+export function CodeBlock({
+  children,
+  className,
+}: {
+  children: string;
+  className?: string;
+}) {
   return (
-    
-
+    
+
         {children}