diff --git a/site/docs/controller.md b/site/docs/controller.md index c6199077eec..40d5d2ed69f 100644 --- a/site/docs/controller.md +++ b/site/docs/controller.md @@ -259,7 +259,7 @@ export class UserController { } ``` -::caution +:::caution **注意** EggJS 和其他框架不同,在 当 Query String 中的 key 重复时,`ctx.query` 只取 key 第一次出现时的值,后面再出现的都会被忽略。 比如 `GET /user?uid=1&uid=2` 通过 `ctx.query` 拿到的值是 `{ uid: '1' }`。 diff --git a/site/i18n/en/docusaurus-plugin-content-docs/current/controller.md b/site/i18n/en/docusaurus-plugin-content-docs/current/controller.md index 05e7b3361ef..955d0a18d74 100644 --- a/site/i18n/en/docusaurus-plugin-content-docs/current/controller.md +++ b/site/i18n/en/docusaurus-plugin-content-docs/current/controller.md @@ -263,7 +263,7 @@ export class UserController { } ``` -::caution +:::caution **Note** EggJS is different from other frameworks. When the key in the Query String is repeated, `ctx.query` only takes the value of the first occurrence of the key, and subsequent occurrences will be ignored. For example, the value obtained by `GET /user?uid=1&uid=2` through `ctx.query` is `{ uid: '1' }`.