From 0665cccd9dc404d2f8863fefe5d25f7d63ad11d6 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 11 Jun 2025 18:09:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20pc=E6=96=87=E7=AB=A0=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=97=B6=E9=97=B4=E4=B8=AD=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/Article.php | 6 + app/index/view/pc/article/detail.html | 290 +++++++++++++------------- 2 files changed, 149 insertions(+), 147 deletions(-) diff --git a/app/index/controller/Article.php b/app/index/controller/Article.php index 46393073..9b1deb44 100644 --- a/app/index/controller/Article.php +++ b/app/index/controller/Article.php @@ -93,6 +93,12 @@ class Article extends Common ]) ->bypk($id) ->find(); + if (!$detail->isEmpty()) { + $detail->release_time = date('Y-m-d H:i:s', strtotime($detail->release_time)); + if (cookie('think_lang') == 'en-us') { + $detail->release_time = 'Posted on ' . date('F j, Y', strtotime($detail->release_time)); + } + } View::assign('detail', $detail); // 获取分享配置相关 diff --git a/app/index/view/pc/article/detail.html b/app/index/view/pc/article/detail.html index 3cc13ac7..007ca723 100644 --- a/app/index/view/pc/article/detail.html +++ b/app/index/view/pc/article/detail.html @@ -3,164 +3,160 @@ {notempty name="detail.seo_title"}
{$detail.release_time}
-{$cm.content}
-{:lang_i18n('你可能还喜欢')}
-![]()
{$vo.title}
- -{$detail.release_time}
+{$cm.content}
+{:lang_i18n('你可能还喜欢')}
+![]()
{$vo.title}
+ +