17 lines
1006 B
Markdown
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.
|