From eea5f83afc9291b6297500b08efd6a06c2cb2e43 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Fri, 20 Jun 2025 11:29:41 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E5=B1=8F=E5=B9=95=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E7=A1=AE=E5=AE=9Apc/mobile=E6=A8=A1=E6=9D=BF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/config/view.php | 2 +- app/index/view/pc/public/base.html | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/index/config/view.php b/app/index/config/view.php index 78a968a0..0fefd60b 100644 --- a/app/index/config/view.php +++ b/app/index/config/view.php @@ -7,7 +7,7 @@ use Detection\MobileDetect; $detect = new MobileDetect(); $view_device_name = 'pc'; -if ($detect->isMobile() || $detect->isTablet()) { +if ($detect->isMobile() || $detect->isTablet() || request()->get('mtpl') == 1) { $view_device_name = 'mobile'; } diff --git a/app/index/view/pc/public/base.html b/app/index/view/pc/public/base.html index 82fd15d2..b565e8e5 100644 --- a/app/index/view/pc/public/base.html +++ b/app/index/view/pc/public/base.html @@ -18,6 +18,13 @@ + {block name="header"} From 4f3c5fdee232d2340239fc473c69aa16ef51cda3 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Fri, 20 Jun 2025 13:42:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E6=96=87=E7=AB=A0=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E6=8E=A8=E8=8D=90=E6=9C=AA=E5=8C=BA=E5=88=86=E4=B8=AD?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/Article.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/index/controller/Article.php b/app/index/controller/Article.php index 46393073..8a78e6d8 100644 --- a/app/index/controller/Article.php +++ b/app/index/controller/Article.php @@ -122,6 +122,7 @@ class Article extends Common 'image' ]) ->where('id', '<>', $id) + ->language($this->lang_id) ->order(['release_time' => 'desc', 'id' => 'desc']) ->limit(3) ->select(); From e7a232ac9c53664010fb938adedfb323e2745f4b Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Fri, 20 Jun 2025 13:43:20 +0800 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20cookir=E5=BC=80=E5=90=AFhttponl?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/cookie.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cookie.php b/config/cookie.php index d3b3aab9..c19f4fde 100644 --- a/config/cookie.php +++ b/config/cookie.php @@ -12,9 +12,9 @@ return [ // cookie 启用安全传输 'secure' => false, // httponly设置 - 'httponly' => false, + 'httponly' => true, // 是否使用 setcookie 'setcookie' => true, // samesite 设置,支持 'strict' 'lax' - 'samesite' => '', + 'samesite' => 'strict', ];