From 64999c0afdc80d31676d4e444899d176c190bcaa Mon Sep 17 00:00:00 2001 From: liqian <735273025@qq.com> Date: Mon, 14 Apr 2025 15:22:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=8B=B1=E6=96=87=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AFnas=E4=B8=8B=E8=BD=BD=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/us/controller/TopsNas.php | 11 ++++ app/us/view/tops_nas/download.phtml | 65 ++++------------------- app/usmobile/controller/TopsNas.php | 11 ++++ app/usmobile/view/tops_nas/download.phtml | 65 ++++------------------- 4 files changed, 40 insertions(+), 112 deletions(-) diff --git a/app/us/controller/TopsNas.php b/app/us/controller/TopsNas.php index 09e02f2..e3ab4ab 100755 --- a/app/us/controller/TopsNas.php +++ b/app/us/controller/TopsNas.php @@ -262,6 +262,17 @@ class TopsNas extends BaseController // 下载 public function download() { + $focus_image = []; + $downloads = []; + // 获取banner + $banners = $this->getBanners([129, 130]); + if (!empty($banners)) { + $focus_image = $banners['typeid_130']['banners']; + $downloads = $banners['typeid_129']['banners']; + } + $this->assign('focus_image', $focus_image); + $this->assign('downloads', $downloads); + return $this->fetch(); } diff --git a/app/us/view/tops_nas/download.phtml b/app/us/view/tops_nas/download.phtml index d1fdc68..753e354 100755 --- a/app/us/view/tops_nas/download.phtml +++ b/app/us/view/tops_nas/download.phtml @@ -83,7 +83,6 @@ height: 205px; display: flex; flex-direction: row; - justify-content: space-between; } @@ -102,10 +101,6 @@ height: 126px; } - .narswljshow { - display: none; - } - .narswljshow .nDtopIt2 .nDitImg { width: 291px !important; } @@ -117,66 +112,24 @@ {include file='include/top-header-nas'/}
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
+ {if condition="!empty($focus_image)"}
- +
+ {/if} + {if condition="!empty($downloads)"}
- -
-
- -
-
- -
-
- -
+ {volist name="downloads" id="vo"} +
+
+ {/volist}
+ {/if}
{include file='include/bottom2023'/} - \ No newline at end of file diff --git a/app/usmobile/controller/TopsNas.php b/app/usmobile/controller/TopsNas.php index 1f8a78d..a496a6c 100755 --- a/app/usmobile/controller/TopsNas.php +++ b/app/usmobile/controller/TopsNas.php @@ -251,6 +251,17 @@ class TopsNas extends BaseController public function download() { + $focus_image = []; + $downloads = []; + // 获取banner + $banners = $this->getBanners([129, 130]); + if (!empty($banners)) { + $focus_image = $banners['typeid_130']['banners']; + $downloads = $banners['typeid_129']['banners']; + } + $this->assign('focus_image', $focus_image); + $this->assign('downloads', $downloads); + return $this->fetch(); } diff --git a/app/usmobile/view/tops_nas/download.phtml b/app/usmobile/view/tops_nas/download.phtml index 7fa7e38..ae5b8bf 100755 --- a/app/usmobile/view/tops_nas/download.phtml +++ b/app/usmobile/view/tops_nas/download.phtml @@ -111,14 +111,6 @@ padding: 1.25rem; } - .narswljshow { - display: none; - } - - .narswljshow .nDtopIt2 .nDitImg { - /* width: 291px !important; */ - } - .narssbshow .nrowimg { width: 100%; background: #fff; @@ -138,64 +130,25 @@ {include file='include/top_nas'/}
- -
-
- -
- -
-
+ {if condition="!empty($focus_image)"}
- +
+ {/if} + {if condition="!empty($downloads)"} + {/if}
{include file='include/bottom'/}
- \ No newline at end of file