first commit

This commit is contained in:
675061370@qq.com
2024-04-04 21:28:09 +08:00
commit fe9661855e
4192 changed files with 618218 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace app\qfadmin\controller;
use app\qfadmin\QfShop;
use think\facade\View;
class Error extends QfShop
{
/**
* 监听所有请求 渲染对应控制器下方法的页面
*/
public function __call($method, $args)
{
// 判断是否是登录/注册/找回密码
// 否则进行accesss授权验证 如错误 直接返回
if (!(strtolower($this->controller) == "admin" && in_array(strtolower($this->action), ['login', 'resetpassword', 'reg']))) {
$error = $this->access();
if ($error) {
return $error;
}
}else{
cookie('access_token', null);
}
if (key_exists('callback', $args)) {
View::assign('callback', $args['callback']);
} else {
View::assign('callback', '/qfadmin');
}
View::assign('datas', $args);
return View::fetch();
}
}