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:
@@ -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 当前登录用户
|
||||
|
||||
Reference in New Issue
Block a user