ActivityCatalog.php 1.2 KB

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