From 251a13c3680fe67f51fcc50777aa181017e3daaa Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 6 May 2026 10:26:53 +0800 Subject: [PATCH 01/10] feat: topic ssd --- app/index/controller/TopicSsd.php | 22 ++++++++++++++++++++++ app/index/route/route.php | 6 ++++++ app/index/view/mobile/topic_ssd/index.html | 0 app/index/view/pc/topic_ssd/index.html | 0 4 files changed, 28 insertions(+) create mode 100644 app/index/controller/TopicSsd.php create mode 100644 app/index/view/mobile/topic_ssd/index.html create mode 100644 app/index/view/pc/topic_ssd/index.html diff --git a/app/index/controller/TopicSsd.php b/app/index/controller/TopicSsd.php new file mode 100644 index 00000000..70351d95 --- /dev/null +++ b/app/index/controller/TopicSsd.php @@ -0,0 +1,22 @@ + Date: Wed, 6 May 2026 10:50:48 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E9=97=AA=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/pc/topic_ssd/index.html | 56 ++++++++++++++++ .../static/index/pc/css/topic_ssd/index.css | 64 +++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 public/static/index/pc/css/topic_ssd/index.css diff --git a/app/index/view/pc/topic_ssd/index.html b/app/index/view/pc/topic_ssd/index.html index e69de29b..3a143134 100644 --- a/app/index/view/pc/topic_ssd/index.html +++ b/app/index/view/pc/topic_ssd/index.html @@ -0,0 +1,56 @@ + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ +
+ diff --git a/public/static/index/pc/css/topic_ssd/index.css b/public/static/index/pc/css/topic_ssd/index.css new file mode 100644 index 00000000..ff4e5b45 --- /dev/null +++ b/public/static/index/pc/css/topic_ssd/index.css @@ -0,0 +1,64 @@ + +html { + width: 100%; +} +body { + /* width: 100vw; + height: 100vh; */ + background: #000; + overflow-x: hidden; + scroll-behavior: smooth !important; + -webkit-overflow-scrolling: touch !important; +} +/* 当视口宽度大于1920px时生效 */ +@media screen and (min-width: 1920px) { + /* 这里写你的样式 */ + body { + max-width:100% !important; + width: 100vw !important; + } + +} +.sc-main { + width: 100%; + height: 100%; + max-width: 2560px; + margin: 0 auto; +} + +a { + text-decoration: none; + display: block; +} + +img { + display: block; +} + +.sc-main-img { + width: 100%; + max-width: 2560px; +} + +.sc-mt20 { + margin-top: 0.2rem; +} + +.sc-main-imgs { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0.2rem; + list-style: none; + /* 去除列表样式(如果有) */ +} + +.sc-main-imgs a { + display: block; +} + +.sc-main-img1 { + width: 100%; + height: auto; + /* 保持比例 */ + display: block; +} \ No newline at end of file From 00e8eed191bf0fb472b6ffe3a0b4cd475f7a6cae Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 6 May 2026 11:34:57 +0800 Subject: [PATCH 03/10] topic ssd data --- app/index/controller/TopicSsd.php | 40 ++++++++++++++++++--- app/index/view/pc/topic_ssd/index.html | 48 ++++++++++---------------- 2 files changed, 53 insertions(+), 35 deletions(-) diff --git a/app/index/controller/TopicSsd.php b/app/index/controller/TopicSsd.php index 70351d95..a4b8483a 100644 --- a/app/index/controller/TopicSsd.php +++ b/app/index/controller/TopicSsd.php @@ -3,19 +3,49 @@ declare (strict_types = 1); namespace app\index\controller; +use app\index\model\SysBannerModel; use think\facade\View; -use think\Request; -class TopicSsd +/** + * 专题 - SSD + */ +class TopicSsd extends Common { /** - * 显示资源列表 - * - * @return \think\Response + * 专题 - SSD首页 */ public function index() { + $banners = SysBannerModel::with([ + 'items' => function ($query) { + $query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at']) + ->order(['sort' => 'asc', 'id' => 'desc']) + ->enabled(true); + } + ]) + ->atPlatform(request()->from) + ->uniqueLabel([ + 'BANNER_69faaf8582967', // 专题 - 闪存(SSD)首页 - 焦点图 + 'BANNER_69fab1bed8f71', // 专题 - 闪存(SSD)首页 - 产品 + ]) + ->language($this->lang_id) + ->enabled(true) + ->order(['sort' => 'asc', 'id' => 'desc']) + ->select(); + $data = []; + if (!$banners->isEmpty()) { + $banners_map = []; + foreach ($banners as $banner) { + $banners_map[$banner->unique_label] = $banner; + } + + // 焦点图轮播图 + $data['top_focus_images'] = data_get($banners_map, 'BANNER_69faaf8582967')?->items->toArray(); + // 产品 + $data['products'] = data_get($banners_map, 'BANNER_69fab1bed8f71')?->items->toArray(); + } + View::assign('data', $data); return View::fetch('index'); } diff --git a/app/index/view/pc/topic_ssd/index.html b/app/index/view/pc/topic_ssd/index.html index 3a143134..fe1cb556 100644 --- a/app/index/view/pc/topic_ssd/index.html +++ b/app/index/view/pc/topic_ssd/index.html @@ -1,4 +1,7 @@ +{extend name="public/base" /} +{block name="style"} + - -
- - +{/block} +{block name="main"} +
+ {volist name="data.top_focus_images" id="item"} + + + + {/volist} +
+ {volist name="data.products" id="item"} + + - - - - - - - - - - - + {/volist}
- +
+{/block} From 5eb49defe12e464fe6116954a3af0775f8813a3d Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 6 May 2026 11:39:11 +0800 Subject: [PATCH 04/10] =?UTF-8?q?admin=20-=20system=20=E5=86=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/v1/System.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/admin/controller/v1/System.php b/app/admin/controller/v1/System.php index fea1f3b7..c5b6e5fc 100644 --- a/app/admin/controller/v1/System.php +++ b/app/admin/controller/v1/System.php @@ -366,6 +366,18 @@ class System 'url' => (string)url('/index/topic/laptop/index') ], ] + ], + [ + 'id' => 9, + 'name' => '闪存(SSD)专题', + 'url' => '', + 'children' => [ + [ + 'id' => 101, + 'name' => '首页', + 'url' => (string)url('/index/topic/ssd/index') + ], + ] ] ]; } @@ -413,7 +425,7 @@ class System break; } if (empty($data)) return []; - + return [ 'id' => $data['id'], 'name' => $data['name'], @@ -438,4 +450,4 @@ class System return []; } -} \ No newline at end of file +} From cfe07c9df59cf66ca8f9eb9feacc9c2b07bc14f2 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 6 May 2026 11:48:51 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E6=8D=A2=E8=83=8C=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/pc/topic_ssd/index.html | 2 +- public/static/index/pc/css/topic_ssd/index.css | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/index/view/pc/topic_ssd/index.html b/app/index/view/pc/topic_ssd/index.html index fe1cb556..62177455 100644 --- a/app/index/view/pc/topic_ssd/index.html +++ b/app/index/view/pc/topic_ssd/index.html @@ -33,7 +33,7 @@ {/volist} -
+
{volist name="data.products" id="item"} diff --git a/public/static/index/pc/css/topic_ssd/index.css b/public/static/index/pc/css/topic_ssd/index.css index ff4e5b45..801370cd 100644 --- a/public/static/index/pc/css/topic_ssd/index.css +++ b/public/static/index/pc/css/topic_ssd/index.css @@ -5,7 +5,7 @@ html { body { /* width: 100vw; height: 100vh; */ - background: #000; + background: #fff; overflow-x: hidden; scroll-behavior: smooth !important; -webkit-overflow-scrolling: touch !important; @@ -43,7 +43,9 @@ img { .sc-mt20 { margin-top: 0.2rem; } - +.sc-mb-78 { + margin-top: 0.78rem; +} .sc-main-imgs { display: grid; grid-template-columns: 1fr 1fr; From d7d8e2aa775d4373fc6f0a34b12ad9e9ac6bcaea Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 6 May 2026 11:50:06 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E5=A4=96=E8=BE=B9=E8=B7=9D=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/index/pc/css/topic_ssd/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/static/index/pc/css/topic_ssd/index.css b/public/static/index/pc/css/topic_ssd/index.css index 801370cd..0adc1a02 100644 --- a/public/static/index/pc/css/topic_ssd/index.css +++ b/public/static/index/pc/css/topic_ssd/index.css @@ -44,7 +44,7 @@ img { margin-top: 0.2rem; } .sc-mb-78 { - margin-top: 0.78rem; + margin-bottom: 0.78rem; } .sc-main-imgs { display: grid; From 9fcdea00612c64d63a307839ee01dd6724e5478f Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 6 May 2026 13:37:29 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E9=97=AA?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/mobile/topic_ssd/index.html | 61 +++++++++++++++++++ app/index/view/pc/topic_ssd/index.html | 2 +- .../index/mobile/css/topic_ssd/index.css | 60 ++++++++++++++++++ .../static/index/pc/css/topic_ssd/index.css | 4 +- 4 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 public/static/index/mobile/css/topic_ssd/index.css diff --git a/app/index/view/mobile/topic_ssd/index.html b/app/index/view/mobile/topic_ssd/index.html index e69de29b..6118e9f9 100644 --- a/app/index/view/mobile/topic_ssd/index.html +++ b/app/index/view/mobile/topic_ssd/index.html @@ -0,0 +1,61 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/index/view/pc/topic_ssd/index.html b/app/index/view/pc/topic_ssd/index.html index 62177455..502ec353 100644 --- a/app/index/view/pc/topic_ssd/index.html +++ b/app/index/view/pc/topic_ssd/index.html @@ -29,7 +29,7 @@ {block name="main"}
{volist name="data.top_focus_images" id="item"} - + {/volist} diff --git a/public/static/index/mobile/css/topic_ssd/index.css b/public/static/index/mobile/css/topic_ssd/index.css new file mode 100644 index 00000000..b40ca5a5 --- /dev/null +++ b/public/static/index/mobile/css/topic_ssd/index.css @@ -0,0 +1,60 @@ +* { + margin: 0; + padding: 0; +} +html { + width: 100% !important; + overflow-x: hidden; + margin: 0 !important; + padding: 0 !important; + max-width: 100vw !important; +} +body { + width: 100%; + background: #fff; + overflow-x: hidden; + margin: 0 !important; + padding: 0 !important; + max-width: 100vw !important; +} +.m-sc-main { + width: 100%; + height: 100%; +} + +a { + text-decoration: none; + display: block; +} + +img { + display: block; +} + +.m-sc-main-img { + width: 100%; + /* max-width: 2560px; */ +} + +.m-sc-mt20 { + margin-top: 0.1rem; +} + +.m-sc-main-imgs { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0.1rem; + list-style: none; + /* 去除列表样式(如果有) */ +} + +.m-sc-main-imgs a { + display: block; +} + +.m-sc-main-img1 { + width: 100%; + height: auto; + /* 保持比例 */ + display: block; +} \ No newline at end of file diff --git a/public/static/index/pc/css/topic_ssd/index.css b/public/static/index/pc/css/topic_ssd/index.css index 0adc1a02..9bf32fa0 100644 --- a/public/static/index/pc/css/topic_ssd/index.css +++ b/public/static/index/pc/css/topic_ssd/index.css @@ -39,7 +39,9 @@ img { width: 100%; max-width: 2560px; } - +.sc-mt20:first-child { + margin-top: 0 !important; +} .sc-mt20 { margin-top: 0.2rem; } From 2f4b0f8b7689dd28e68dab95f5f71d7b720f587d Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 6 May 2026 14:39:04 +0800 Subject: [PATCH 08/10] mobile - topic ssd --- app/index/view/mobile/topic_ssd/index.html | 56 ++++++++-------------- 1 file changed, 19 insertions(+), 37 deletions(-) diff --git a/app/index/view/mobile/topic_ssd/index.html b/app/index/view/mobile/topic_ssd/index.html index 6118e9f9..a43a49fc 100644 --- a/app/index/view/mobile/topic_ssd/index.html +++ b/app/index/view/mobile/topic_ssd/index.html @@ -1,6 +1,8 @@ +{extend name="public/base" /} +{block name="style"} - + - - -
- - +{/block} +{block name="main"} +
+ {volist name="data.top_focus_images" id="item"} + + + + {/volist} +
+ {volist name="data.products" id="item"} + + - - - - - - - - - - - - - - + {/volist}
- - - \ No newline at end of file +
+{/block} From ade2c6bea88a5cc2bb6bf210cff5a3be514174cf Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 6 May 2026 15:37:45 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=87=92=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/mobile/topic_ssd/index.html | 10 +++++----- app/index/view/pc/topic_ssd/index.html | 4 ++-- public/static/index/mobile/css/topic_ssd/index.css | 7 ++++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/index/view/mobile/topic_ssd/index.html b/app/index/view/mobile/topic_ssd/index.html index a43a49fc..ea258dce 100644 --- a/app/index/view/mobile/topic_ssd/index.html +++ b/app/index/view/mobile/topic_ssd/index.html @@ -26,16 +26,16 @@ {/block} {block name="main"} -
+
{volist name="data.top_focus_images" id="item"} - - + + {/volist} -
+
{volist name="data.products" id="item"} - + {/volist}
diff --git a/app/index/view/pc/topic_ssd/index.html b/app/index/view/pc/topic_ssd/index.html index 502ec353..0ec50085 100644 --- a/app/index/view/pc/topic_ssd/index.html +++ b/app/index/view/pc/topic_ssd/index.html @@ -30,13 +30,13 @@
{volist name="data.top_focus_images" id="item"} - + {/volist}
{volist name="data.products" id="item"} - + {/volist}
diff --git a/public/static/index/mobile/css/topic_ssd/index.css b/public/static/index/mobile/css/topic_ssd/index.css index b40ca5a5..55c46750 100644 --- a/public/static/index/mobile/css/topic_ssd/index.css +++ b/public/static/index/mobile/css/topic_ssd/index.css @@ -39,7 +39,12 @@ img { .m-sc-mt20 { margin-top: 0.1rem; } - +.m-sc-mt20:first-child { + margin-top: 0 !important; +} +.m-sc-mb34 { + margin-bottom: 0.34rem; +} .m-sc-main-imgs { display: grid; grid-template-columns: 1fr 1fr; From 3d7ed2c16b5a92430ee9b77348b989e927571f66 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Fri, 8 May 2026 09:30:38 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E8=B7=B3=E8=BD=89=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/mobile/topic_ssd/index.html | 4 ++-- app/index/view/pc/topic_ssd/index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/index/view/mobile/topic_ssd/index.html b/app/index/view/mobile/topic_ssd/index.html index ea258dce..383c3cc7 100644 --- a/app/index/view/mobile/topic_ssd/index.html +++ b/app/index/view/mobile/topic_ssd/index.html @@ -28,13 +28,13 @@ {block name="main"}
{volist name="data.top_focus_images" id="item"} - + {/volist}
{volist name="data.products" id="item"} - + {/volist} diff --git a/app/index/view/pc/topic_ssd/index.html b/app/index/view/pc/topic_ssd/index.html index 0ec50085..d825a518 100644 --- a/app/index/view/pc/topic_ssd/index.html +++ b/app/index/view/pc/topic_ssd/index.html @@ -29,13 +29,13 @@ {block name="main"}
{volist name="data.top_focus_images" id="item"} - + {/volist}
{volist name="data.products" id="item"} - + {/volist}