每本书有唯一的 ISBN(资源标识)
-{{ currentTool.description }}
-核心特性
-文档示例(OpenAPI 3.0)
-{{ currentTool.example }}
- diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs
index 848c678..d92d8eb 100644
--- a/docs/.vitepress/config.mjs
+++ b/docs/.vitepress/config.mjs
@@ -629,8 +629,8 @@ export default defineConfig({
{ text: 'HTTP 协议', link: '/zh-cn/appendix/4-server-and-backend/http-protocol' },
{ text: '一个请求的完整旅程', link: '/zh-cn/appendix/4-server-and-backend/request-journey' },
{ text: 'Web 框架的本质', link: '/zh-cn/appendix/4-server-and-backend/web-frameworks' },
- { text: 'API 设计哲学(REST / GraphQL / gRPC)', link: '/zh-cn/appendix/4-server-and-backend/api-design' },
{ text: 'API 入门', link: '/zh-cn/appendix/4-server-and-backend/api-intro' },
+ { text: 'API 设计哲学(REST / GraphQL / gRPC)', link: '/zh-cn/appendix/4-server-and-backend/api-design' },
{ text: '序列化与数据格式', link: '/zh-cn/appendix/4-server-and-backend/serialization' },
{ text: '认证与授权体系', link: '/zh-cn/appendix/4-server-and-backend/auth-authorization' },
{ text: '并发、异步与多线程', link: '/zh-cn/appendix/4-server-and-backend/concurrency-async' },
diff --git a/docs/.vitepress/theme/components/appendix/ai-history/AIErasComparisonDemo.vue b/docs/.vitepress/theme/components/appendix/ai-history/AIErasComparisonDemo.vue
new file mode 100644
index 0000000..cc903c5
--- /dev/null
+++ b/docs/.vitepress/theme/components/appendix/ai-history/AIErasComparisonDemo.vue
@@ -0,0 +1,107 @@
+
+
{{ requestData.body }}
+ HTTP Request
+ →
+ HTTP Response
+ ←
+ {{ responseData.body }}
+ GET /v1/users
+ 返回 name, email
+ POST /v1/orders
+ 接收 items 数组
+ GET /v2/users
+ 返回 name, email, avatar, phone
+ POST /v2/orders
+ 接收 items + coupons
+ POST /v2/orders/batch
+ 🆕 批量下单
+ {{ currentTool.description }}
-{{ currentTool.example }}
- {
- "error": "出错了"
-}
- {{ JSON.stringify(goodResponse, null, 2) }}
- {{ responseData }}
+ {{ JSON.stringify(example.body, null, 2) }}
- - 详解 HTTP 请求的组成部分 -
-GET /api/users/123 HTTP/1.1
- Host: api.example.comContent-Type: application/jsonAuthorization: Bearer token123{
- "name": "张三",
- "email": "zhangsan@example.com"
-}
- - 通过生活中的类比理解 RESTful 资源概念 -
-每本书有唯一的 ISBN(资源标识)
-/library/books/123 表示第 123 号书
-GET(查看)、POST(借书)、PUT(修改)、DELETE(还书)
-{{ JSON.stringify(currentResponse.body, null, 2) }}
- {{ field.name }}
- {{ field.type }}
- {{ activePrinciple.explanation }}
-{{ activePrinciple.badExample }}
- {{ activePrinciple.goodExample }}
- {{ item.url }}
+ {{ item.reason }}
+ {{ item.url }}
+ {{ item.reason }}
+ {{ code.description }}
-{{ code.example.path }}
- {{ JSON.stringify(code.example.response, null, 2) }}
- {{ currentStrategy.codeExample.request }}
- {{ currentStrategy.codeExample.response }}
- - 为啥要看这些?CPU 只会处理 0 和 1,所以加法要「一位一位」算;每一列(第 0 位、第 1 位…)都需要一个小电路来算「这一位写几、要不要往左进位」。 -
-- 这些词是啥? - 半加器:只算这一位的 A+B(最右边没有进位进来)。 - 全加器:算 A+B+上一位的进位。 - S:这一位写下的数字(0 或 1)。 - Cout:要不要往左边一位进 1(进就是 1,不进就是 0)。 -
-最右边一位用,因为没有进位进来
+输入:A、B → 输出:和(S)、进位(C)
+其他位用,因为要加上一位的进位
+输入:A、B、Cin → 输出:和(S)、进位(Cout)
+