Setting.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types=1);
  12. namespace app\api\model\h5;
  13. use app\common\model\h5\Setting as SettingModel;
  14. /**
  15. * H5设置模型
  16. * Class Setting
  17. * @package app\api\model\h5
  18. */
  19. class Setting extends SettingModel
  20. {
  21. /**
  22. * 验证当前是否允许访问
  23. * @return bool
  24. * @throws \think\db\exception\DataNotFoundException
  25. * @throws \think\db\exception\DbException
  26. * @throws \think\db\exception\ModelNotFoundException
  27. */
  28. public static function checkStatus(): bool
  29. {
  30. return (bool)static::getItem('basic', static::$storeId)['enabled'];
  31. }
  32. }