Files
affiliate_dash/frontend
yml2213 663d7e1e9f fix(admin): 商户筛选下拉改用不分页的精简接口
自查新做的下游订单页时发现的问题:商户筛选下拉调用
/api/platform/merchants?size=200,而分页查询会把 >100 的 size 静默降级为 20
(service.normalizePage),因此商户超过 20 家时下拉里会少一批商户,界面不报任何错。

- 新增 service.ListMerchantOptions:不分页返回全部启用商户的精简信息
  (id/code/name),独立于分页的 ListMerchants
- 新增 GET /api/platform/merchant-options
- 前端改用该接口;types 增加 MerchantOption,api 增加 merchantOptions()

测试:
- TestListMerchantOptionsReturnsAllActiveMerchants:造 25 家启用 + 1 家禁用,
  断言返回数量与库中启用数一致、必须超过分页上限、且不含已禁用商户
- TestListMerchantsClampsOversizedPageSize:钉住「size=200 实际只返回 20 条,
  而 total 反映真实总数」这一事实,即上面接口存在的理由
2026-10-06 20:44:48 +08:00
..
2026-08-04 15:34:34 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-08-04 15:34:34 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the Oxlint configuration

If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["react", "typescript", "oxc"],
  "options": {
    "typeAware": true
  },
  "rules": {
    "react/rules-of-hooks": "error",
    "react/only-export-components": ["warn", { "allowConstantExport": true }]
  }
}

See the Oxlint rules documentation for the full list of rules and categories.