BaseService.php 762 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. *
  4. * @file:BaseService.php
  5. * @Date: 2023/6/7
  6. * @Time: 14:28
  7. */
  8. namespace Modules\Common\Services;
  9. use Catch\Exceptions\FailedException;
  10. class BaseService
  11. {
  12. public static function getMiniProgramType()
  13. {
  14. return [
  15. ['value' => 1, 'name' => "微信小程序"],
  16. ['value' => 2, 'name' => "抖音小程序"],
  17. ];
  18. }
  19. public static function getNavPagesType()
  20. {
  21. return [
  22. ['value' => 1, 'name' => "排行榜"],
  23. ['value' => 2, 'name' => "最新"],
  24. ];
  25. }
  26. protected static function throwErrMsg($msg, $code = "")
  27. {
  28. if ($code) {
  29. throw new FailedException($msg, $code);
  30. }
  31. throw new FailedException($msg);
  32. }
  33. }