// +---------------------------------------------------------------------- declare (strict_types=1); namespace app\api\model\wxofficial; use app\common\model\wxofficial\Setting as SettingModel; /** * 微信小程序设置模型 * Class Setting * @package app\api\model\wxofficial */ class Setting extends SettingModel { /** * 验证当前是否允许访问 * @return bool * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public static function checkStatus(): bool { return (bool)static::getItem('basic', static::$storeId)['enabled']; } }