mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-04 00:24:29 +08:00
增加访问记录列表
This commit is contained in:
@@ -5,6 +5,7 @@ namespace app\index\controller;
|
||||
use app\BaseController as AppBaseController;
|
||||
use app\common\Bootstrap;
|
||||
use think\exception\HttpResponseException;
|
||||
use think\facade\Env;
|
||||
use think\facade\Request;
|
||||
use think\Paginator;
|
||||
|
||||
@@ -18,21 +19,25 @@ class BaseController extends AppBaseController
|
||||
return new Bootstrap($items, $listRows, $currentPage, $total, $simple, $options);
|
||||
});
|
||||
|
||||
$main_domain = get_system_config('main_domain');
|
||||
$url = Request::url();
|
||||
$debug = Env::get('app_debug');
|
||||
|
||||
if (!empty($main_domain)) {
|
||||
if (Request::host() != $main_domain) {
|
||||
if (!$debug) {
|
||||
// 调试模式不要跳转域名和协议
|
||||
$main_domain = get_system_config('main_domain');
|
||||
$url = Request::url();
|
||||
|
||||
throw new HttpResponseException(redirect(Request::scheme() . '://' . $main_domain . '' . $url));
|
||||
if (!empty($main_domain)) {
|
||||
if (Request::host() != $main_domain) {
|
||||
throw new HttpResponseException(redirect(Request::scheme() . '://' . $main_domain . '' . $url));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$is_jump_https = get_system_config('is_jump_https', 0);
|
||||
$is_jump_https = get_system_config('is_jump_https', 0);
|
||||
|
||||
if ($is_jump_https == 1) {
|
||||
if (Request::scheme() != 'https') {
|
||||
throw new HttpResponseException(redirect('https://' . Request::host() . '' . $url));
|
||||
if ($is_jump_https == 1) {
|
||||
if (Request::scheme() != 'https') {
|
||||
throw new HttpResponseException(redirect('https://' . Request::host() . '' . $url));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user