feat(member): enhance product info processing and add new utility methods

- Updated `getProductInfo` method to return processed product information using `buildEffectiveProductInfo`.
- Introduced new private methods for building effective product info, resolving software account levels, and checking special TikTok account status.
- Refactored platform string handling with `appendPlatform` method to ensure unique and sorted platform entries.
- Updated platform name mappings in `PlatformService` for consistency with new naming conventions.
This commit is contained in:
nepiedg
2026-04-02 10:43:25 +00:00
parent 044586d60a
commit 5a9d6090f3
5 changed files with 246 additions and 9 deletions
+8 -8
View File
@@ -37,13 +37,13 @@ class PlatformService
* 这里在 API 中直接返回前端所需文案,避免小程序自行猜测。
*/
private const PLATFORM_NAME_MAP = [
0 => '音',
1 => '手',
2 => '家号',
3 => '小红',
4 => '视号',
5 => 'B',
6 => '公号',
0 => 'D音',
1 => 'K手',
2 => 'B家号',
3 => '小红',
4 => '视P号',
5 => 'B哩哔哩',
6 => '公Z号',
10 => 'TikTok',
];
@@ -104,7 +104,7 @@ class PlatformService
* 计算当前用户可见平台。
*
* 该逻辑直接对齐 acgpmw `platform::index()`
* 1. 从套餐 `product_list.platforms` 读取平台权限
* 1. 先使用已按 `MemberController` 规则加工后的套餐平台权限
* 2. 若为 146/147 且不在特殊账号名单中,仅允许抖音平台
*
* @param Member $member 当前登录用户