fix:更新已知bug,优化代码

This commit is contained in:
Ying
2022-11-28 19:11:12 +08:00
parent f6aee95cfc
commit 9445b206a2
1378 changed files with 53759 additions and 20789 deletions

View File

@@ -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
{