Files
gt-agent-company/openspec/changes/add-agent-distribution-code/proposal.md
luo 2b4fd6fff8
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 2m22s
feat: 分销码
2026-10-08 11:00:51 +08:00

17 lines
1006 B
Markdown

# Change: Add agent distribution code viewing
## Why
Agent accounts need a quick way to share their shop's distribution code. The authenticated user response already provides `shop_id`, and the shop detail endpoint returns `distribution_code`, but the agent home page does not expose or display it.
## What Changes
- Add a “查看我的分销码” shortcut immediately after “提现管理” on the agent home page, visible only when `user_type` is `3`.
- Add a distribution-code page that uses the current authenticated user's `shop_id` to fetch `/api/admin/shops/{shop_id}` and renders the returned `distribution_code` as a QR code.
- Reuse the existing `src/static/icons/分销码.png` shortcut icon.
## Impact
- Affected specs: `agent-distribution-code` (new capability)
- Affected code: `src/pages/agent-system/home/index.vue`, `src/pages/agent-system/distribution-code/index.vue`, `src/pages.json`, and the shop API module; a Uni-app-compatible local QR renderer may require a dependency.