ActivityCatalog.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Support;
  3. use App\Services\Sharing\ShareDefaults;
  4. /** Activity display categories include hot/other and a single F1 lottery category. */
  5. final class ActivityCatalog
  6. {
  7. public const PUBLISH_PLATFORMS = ['PC', 'H5', 'APP'];
  8. public static function activityTypes(): array
  9. {
  10. return [2 => '普通活动', 3 => '即充即送', 4 => '老用户召集令', 5 => 'USDT使用教学', 6 => '余额宝'];
  11. }
  12. public static function gameTypes(): array
  13. {
  14. $categories = ShareDefaults::categories();
  15. unset($categories['third:3']);
  16. return ['hot' => '热门'] + $categories + ['other' => '其他'];
  17. }
  18. public static function options(): array
  19. {
  20. $gameTypes = $activityTypes = [];
  21. foreach (self::gameTypes() as $value => $label) {
  22. $gameTypes[] = ['value' => $value, 'label' => $label];
  23. }
  24. foreach (self::activityTypes() as $value => $label) {
  25. $activityTypes[] = ['value' => $value, 'label' => $label];
  26. }
  27. return ['game_types' => $gameTypes, 'activity_types' => $activityTypes,
  28. 'click_types' => AnnouncementCatalog::options(AnnouncementCatalog::CLICKS),
  29. 'click_positions' => [['value' => 'cover', 'label' => '活动列表封面'], ['value' => 'detail', 'label' => '活动详情按钮']]];
  30. }
  31. }