feat: nas下载页
This commit is contained in:
@@ -178,11 +178,54 @@ class TopicNas extends Common
|
||||
return View::fetch('help');
|
||||
}
|
||||
|
||||
/**
|
||||
* 专题-Nas帮助中心详情
|
||||
*/
|
||||
public function helpDetail()
|
||||
{
|
||||
|
||||
return View::fetch('help_detail');
|
||||
}
|
||||
|
||||
/**
|
||||
* 专题-Nas软件下载页
|
||||
*/
|
||||
public function download()
|
||||
{
|
||||
$data = [];
|
||||
// 获取banner数据
|
||||
$banners = SysBannerModel::with(['items' => function($query) {
|
||||
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at']);
|
||||
}])
|
||||
->uniqueLabel([
|
||||
'BANNER_6810798e6e828',
|
||||
'BANNER_68107a0a63910',
|
||||
'BANNER_681079cfa83c9',
|
||||
'BANNER_68107a1584238'
|
||||
])
|
||||
->language($this->lang_id)
|
||||
->enabled(true)
|
||||
->order(['sort' => 'asc', 'id' => 'desc'])
|
||||
->select();
|
||||
if (!$banners->isEmpty()) {
|
||||
$banners_map = [];
|
||||
foreach ($banners as $banner) {
|
||||
$banners_map[$banner->unique_label] = $banner;
|
||||
}
|
||||
$cyber_image = data_get($banners_map, 'BANNER_6810798e6e828')?->items->first()?->toArray();
|
||||
if (!empty($cyber_image)) $data['cyber']['focus_image'] = $cyber_image;
|
||||
|
||||
$weline_image = data_get($banners_map, 'BANNER_68107a0a63910')?->items->first()?->toArray();
|
||||
if (!empty($weline_image)) $data['weline']['focus_image'] = $weline_image;
|
||||
|
||||
$cyber_down_items = data_get($banners_map, 'BANNER_681079cfa83c9')?->items->toArray();
|
||||
if (!empty($cyber_down_items)) $data['cyber']['down_items'] = $cyber_down_items;
|
||||
|
||||
$weline_down_items = data_get($banners_map, 'BANNER_68107a1584238')?->items->toArray();
|
||||
if (!empty($weline_down_items)) $data['weline']['down_items'] = $weline_down_items;
|
||||
}
|
||||
View::assign('data', $data);
|
||||
|
||||
return View::fetch('download');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,5 +206,9 @@ return [
|
||||
'topic_nas_cooperation' => [
|
||||
'advantages_section_title' => 'Cooperation advantages',
|
||||
'contacts_section_title' => 'Looking forward to working with you'
|
||||
],
|
||||
'topic_nas_download' => [
|
||||
'cyber_tab_title' => 'CyberData',
|
||||
'weline_tab_title' => 'Weline'
|
||||
]
|
||||
];
|
||||
@@ -206,5 +206,9 @@ return [
|
||||
'topic_nas_cooperation' => [
|
||||
'advantages_section_title' => '合作优势',
|
||||
'contacts_section_title' => '期待与您的合作'
|
||||
],
|
||||
'topic_nas_download' => [
|
||||
'cyber_tab_title' => 'CyberData赛博云空间',
|
||||
'weline_tab_title' => 'Weline微链接'
|
||||
]
|
||||
];
|
||||
84
app/index/view/topic_nas/download.html
Normal file
84
app/index/view/topic_nas/download.html
Normal file
@@ -0,0 +1,84 @@
|
||||
{extend name="public/nas_base" /}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" href="__CSS__/topic_nas_download.css" />
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<div class="orico_Page_index">
|
||||
<!-- 下载中心 -->
|
||||
<div class="narsDowloadPc">
|
||||
<!-- 顶部导航 -->
|
||||
<div class="narsDtabs">
|
||||
{egt name=":count($data)" value="2"}
|
||||
{notempty name="data.cyber"}
|
||||
<div class="narsDtabIt narsDtabIt_active">{:lang('topic_nas_download.cyber_tab_title')}</div>
|
||||
{/notempty}
|
||||
{notempty name="data.weline"}
|
||||
<div class="narsDtabIt">{:lang('topic_nas_download.weline_tab_title')}</div>
|
||||
{/notempty}
|
||||
{/egt}
|
||||
</div>
|
||||
<!-- 赛博云 -->
|
||||
{notempty name="data.cyber"}
|
||||
<div class="nDtopCtMian narssbshow">
|
||||
{notempty name="data.cyber.focus_image"}
|
||||
<div class="nDtopIt">
|
||||
<img src="{$data.cyber.focus_image.image}" class="tpimg" />
|
||||
</div>
|
||||
{/notempty}
|
||||
{notempty name="data.cyber.down_items"}
|
||||
<div class="nDtopIt2">
|
||||
{volist name="data.cyber.down_items" id="it"}
|
||||
<a {notempty name="it.link"}href="{$it.link}"{/notempty}>
|
||||
<div class="nDitImg">
|
||||
<img src="{$it.image}" />
|
||||
{eq name=":cookie('think_lang')" value="en-us"}
|
||||
<div {:style(['color'=>$it.title_txt_color])}>{$it.title}</div>
|
||||
<div>Download</div>
|
||||
{/eq}
|
||||
</div>
|
||||
</a>
|
||||
{/volist}
|
||||
</div>
|
||||
{/notempty}
|
||||
</div>
|
||||
{/notempty}
|
||||
<!-- 微链接 -->
|
||||
{notempty name="data.weline"}
|
||||
<div class="nDtopCtMian narswljshow">
|
||||
{notempty name="data.weline.focus_image"}
|
||||
<div class="nDtopIt">
|
||||
<img src="{$data.weline.focus_image.image}" class="tpimg" />
|
||||
</div>
|
||||
{/notempty}
|
||||
{notempty name="data.weline.down_items"}
|
||||
<div class="nDtopIt2">
|
||||
{volist name="data.weline.down_items" id="it"}
|
||||
<a {notempty name="it.link"}href="{$it.link}"{/notempty}>
|
||||
<div class="nDitImg"><img src="{$it.image}" /></div>
|
||||
</a>
|
||||
{/volist}
|
||||
</div>
|
||||
{/notempty}
|
||||
</div>
|
||||
{/notempty}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
//点击切换
|
||||
$('.narsDtabIt').click(function () {
|
||||
$('.narsDtabIt').removeClass('narsDtabIt_active');
|
||||
$(this).addClass('narsDtabIt_active');
|
||||
if ($(this).index() === 0) {
|
||||
$('.narssbshow').show();
|
||||
$('.narswljshow').hide();
|
||||
} else {
|
||||
$('.narssbshow').hide();
|
||||
$('.narswljshow').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
99
public/static/index/css/topic_nas_download.css
Executable file
99
public/static/index/css/topic_nas_download.css
Executable file
@@ -0,0 +1,99 @@
|
||||
.narsDowloadPc {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background: #F5F5F5;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.narsDowloadPc .narsDtabs {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
margin-top: 70px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.narsDowloadPc .narsDtabs .narsDtabIt {
|
||||
color: #001717;
|
||||
font-size: 24px;
|
||||
height: 52px;
|
||||
line-height: 52px;
|
||||
width: 300px;
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
border-radius: 28px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.narsDowloadPc .narsDtabs .narsDtabIt:first-child {
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
.narsDowloadPc .narsDtabs .narsDtabIt_active {
|
||||
color: #fff;
|
||||
background: #004CFA;
|
||||
}
|
||||
|
||||
.narsDowloadPc .narsDmainConten {
|
||||
width: 1200px;
|
||||
height: 409px;
|
||||
background: #fff;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.narsDowloadPc .nDtopCtMian {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.narsDowloadPc .nDtopCtMian .nDtopIt {
|
||||
width: 1200px;
|
||||
height: 409px;
|
||||
background: #fff;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.narsDowloadPc .nDtopCtMian .nDtopIt .tpimg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.narsDowloadPc .nDtopCtMian .nDtopIt .tpimg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.narsDowloadPc .nDtopCtMian .nDtopIt2 {
|
||||
width: 1200px;
|
||||
height: 205px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.narsDowloadPc .nDtopCtMian .nDtopIt2 .nDitImg {
|
||||
width: 231px;
|
||||
height: 205px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.narsDowloadPc .nDtopCtMian .nDtopIt2 .nDitImg img {
|
||||
width: 126px;
|
||||
height: 126px;
|
||||
}
|
||||
|
||||
.narswljshow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.narswljshow .nDtopIt2 .nDitImg {
|
||||
width: 291px !important;
|
||||
}
|
||||
Reference in New Issue
Block a user