From b35499a40db3abce1e698f769dd32302a054574c Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Sat, 12 Apr 2025 17:57:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=97=AE=E7=AD=94=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/Faq.php | 52 +++++++++++++++++++++ app/index/route/route.php | 6 +++ app/index/view/faq/index.html | 34 ++++++++++++++ public/static/index/css/{fq.css => faq.css} | 41 +++------------- 4 files changed, 98 insertions(+), 35 deletions(-) create mode 100644 app/index/controller/Faq.php create mode 100644 app/index/view/faq/index.html rename public/static/index/css/{fq.css => faq.css} (54%) diff --git a/app/index/controller/Faq.php b/app/index/controller/Faq.php new file mode 100644 index 00000000..91d4774a --- /dev/null +++ b/app/index/controller/Faq.php @@ -0,0 +1,52 @@ +param([ + 'page/d' => 1, + 'size/d' => 12 + ]); + + // 获取banner焦点图 + $banner = SysBannerItemModel::hasWhere('banner', [ + 'language_id' => $this->lang_id, + 'unique_label' => 'BANNER_67fa37f30e151' + ]) + ->type('image') + ->visible(['id', 'title', 'image', 'link']) + ->find(); + View::assign('banner', $banner); + + // 获取问答列表 + $faq = FaqModel::field([ + 'id', + 'image', + 'question', + 'answer', + ]) + ->language($this->lang_id) + ->order(['sort' => 'asc', 'id' => 'desc']) + ->paginate([ + 'list_rows' => $param['size'], + 'page' => $param['page'], + ]); + View::assign('faq', $faq); + + return View::fetch('index'); + } +} diff --git a/app/index/route/route.php b/app/index/route/route.php index 9d860a38..953c4436 100644 --- a/app/index/route/route.php +++ b/app/index/route/route.php @@ -34,5 +34,11 @@ Route::group('article', function() { Route::post('comment', 'Article/comment'); }); +// 问答中心 +Route::group('faq', function() { + // 问答列表页 + Route::get('index', 'Faq/index'); +}); + // 数据迁移 Route::get('/data/migration', 'DataMigration/index'); diff --git a/app/index/view/faq/index.html b/app/index/view/faq/index.html new file mode 100644 index 00000000..fc161829 --- /dev/null +++ b/app/index/view/faq/index.html @@ -0,0 +1,34 @@ +{extend name="public/base" /} +{block name="title"} +常见FQ_下载与服务_中文官网帮助信息_ORICO/奥睿科官网 +{/block} +{block name="style"} + +{/block} +{block name="main"} +
+ +
+ +
+
+ {notempty name="faq"} + + +
{$faq|raw}
+ {/notempty} +
+
+{/block} \ No newline at end of file diff --git a/public/static/index/css/fq.css b/public/static/index/css/faq.css similarity index 54% rename from public/static/index/css/fq.css rename to public/static/index/css/faq.css index 2bb5e6b6..6c00fcb1 100755 --- a/public/static/index/css/fq.css +++ b/public/static/index/css/faq.css @@ -1,7 +1,7 @@ .orico_Page_fq { width: 100%; position: relative; - height: 100vh; + height: auto; overflow-y: auto; overflow-x: hidden; background: #f2f2f2; @@ -40,50 +40,21 @@ color: #737373; line-height: 1.875em; } -.orico_Page_fq .fqMain .Page { +.orico_Page_fq .fqMain .pagination { zoom: 1; text-align: center; color: #555; clear: both; padding-bottom: 2rem; } -.orico_Page_fq .fqMain .Page span { - padding: 0px 0px; - display: inline-block; -} -.orico_Page_fq .fqMain .Page .p_page { - display: flex; - align-items: center; - justify-content: center; -} -.orico_Page_fq .fqMain .Page .p_page .a_prev, -.orico_Page_fq .fqMain .Page .p_page .a_next { - display: inline-block; - width: 10px; - height: 21px; -} -.orico_Page_fq .fqMain .Page .p_page .a_prev { - background: url(../fqimg/pfl.png) no-repeat; - margin-right: 10px; - padding: 0 10px; -} -.orico_Page_fq .fqMain .Page .p_page .a_next { - background: url(../fqimg/prh.png) no-repeat; - margin-left: 10px; - padding: 0 10px; -} -.orico_Page_fq .fqMain .Page .p_page .num a { +.orico_Page_fq .fqMain .pagination li { display: inline-block; width: 34px; height: 22px; line-height: 22px; - text-align: center; - vertical-align: middle; font-size: 16px; - color: #444; } -.orico_Page_fq .fqMain .Page .p_page .num a.a_cur, -.orico_Page_fq .fqMain .Page .p_page .num a:hover { - background: #444; - color: #fff; +.orico_Page_fq .fqMain .pagination li.active { + background-color: #444444; + color: #ffffff; }