fix:更新已知bug,优化代码
This commit is contained in:
@@ -13,6 +13,11 @@ declare(strict_types=1);
|
||||
namespace app;
|
||||
|
||||
use app\common\library\Auth;
|
||||
use Psr\SimpleCache\InvalidArgumentException;
|
||||
use support\Response;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
|
||||
/**
|
||||
* 前台全局控制器基类
|
||||
@@ -26,73 +31,73 @@ class HomeController extends BaseController
|
||||
* 数据库实例
|
||||
* @var object
|
||||
*/
|
||||
public $model = null;
|
||||
public object $model;
|
||||
|
||||
/**
|
||||
* 是否验证
|
||||
* @var bool
|
||||
*/
|
||||
public $isValidate = true;
|
||||
public bool $isValidate = true;
|
||||
|
||||
/**
|
||||
* 验证场景
|
||||
* @var string
|
||||
*/
|
||||
public $scene = '';
|
||||
public string $scene = '';
|
||||
|
||||
/**
|
||||
* 控制器/类名
|
||||
* @var string
|
||||
*/
|
||||
public $controller = null;
|
||||
public string $controller;
|
||||
|
||||
/**
|
||||
* 控制器方法
|
||||
* @var string
|
||||
*/
|
||||
public $action = null;
|
||||
public string $action;
|
||||
|
||||
/**
|
||||
* 操作状态
|
||||
* @var int
|
||||
* @var mixed
|
||||
*/
|
||||
public $status = false;
|
||||
public mixed $status;
|
||||
|
||||
/**
|
||||
* 错误消息
|
||||
* @var string
|
||||
*/
|
||||
public $error = null;
|
||||
public string $errorText = '';
|
||||
|
||||
/**
|
||||
* 接口权限
|
||||
* @var object
|
||||
*/
|
||||
public $auth = null;
|
||||
public object $auth;
|
||||
|
||||
/**
|
||||
* 控制器登录鉴权
|
||||
* @var bool
|
||||
*/
|
||||
public $needLogin = false;
|
||||
public bool $needLogin = false;
|
||||
|
||||
/**
|
||||
* 禁止登录重复
|
||||
* @var array
|
||||
*/
|
||||
public $repeatLogin = ['login', 'register'];
|
||||
public array $repeatLogin = ['login', 'register'];
|
||||
|
||||
/**
|
||||
* 非鉴权方法
|
||||
* @var array
|
||||
*/
|
||||
public $noNeedAuth = [];
|
||||
public array $noNeedAuth = [];
|
||||
|
||||
/**
|
||||
* 跳转URL地址
|
||||
* @var string
|
||||
*/
|
||||
public $JumpUrl = '/user/index';
|
||||
public string $JumpUrl = '/user/index';
|
||||
/**
|
||||
* 初始化函数
|
||||
*/
|
||||
@@ -107,9 +112,12 @@ class HomeController extends BaseController
|
||||
* 视图过滤
|
||||
* @param string $template
|
||||
* @param array $argc
|
||||
* @param string|null $app
|
||||
* @return \support\Response
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
* @param string $app
|
||||
* @return Response
|
||||
* @throws InvalidArgumentException
|
||||
* @throws DataNotFoundException
|
||||
* @throws DbException
|
||||
* @throws ModelNotFoundException
|
||||
*/
|
||||
protected function view(string $template = '', array $argc = [], string $app = 'index'): \support\Response
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user