Files
Xinyue-Search/app/index/controller/Error.php
T
2024-04-04 21:28:09 +08:00

33 lines
845 B
PHP

<?php
namespace app\index\controller;
use app\index\QfShop;
use think\facade\View;
class Error extends QfShop
{
public function __call($method, $args)
{
$error = $this->authorize();
if ($error) {
return $error;
}
View::assign('wechat', $this->wechat);
if (file_exists(app_path() . "/view/" . strtolower($this->request->controller()) . "/" . $method . ".html")) {
if (key_exists('callback', $args)) {
View::assign('callback', $args['callback']);
} else {
View::assign('callback', '/admin');
}
return View::fetch();
} else {
return 404;
}
}
public static function show($msg = null)
{
View::assign('msg', $msg);
return View::fetch("/error");
}
}