feat: 附件(软件/手册下载)
This commit is contained in:
23
app/index/controller/Attachment.php
Normal file
23
app/index/controller/Attachment.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
declare (strict_types = 1);
|
||||||
|
|
||||||
|
namespace app\index\controller;
|
||||||
|
|
||||||
|
use app\index\model\AttachmentCategoryModel;
|
||||||
|
use think\facade\View;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件控制器
|
||||||
|
*/
|
||||||
|
class Attachment extends Common
|
||||||
|
{
|
||||||
|
// 分页列表
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
// 获取分类
|
||||||
|
$category = AttachmentCategoryModel::language($this->lang_id)->select();
|
||||||
|
View::assign('category', $category);
|
||||||
|
|
||||||
|
return View::fetch('index');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,5 +31,11 @@ return [
|
|||||||
'detail_leave_reply_comment' => 'Comment',
|
'detail_leave_reply_comment' => 'Comment',
|
||||||
'detail_leave_reply_submit' => 'POST COMMENT',
|
'detail_leave_reply_submit' => 'POST COMMENT',
|
||||||
'detail_recommend' => 'Recommended for you',
|
'detail_recommend' => 'Recommended for you',
|
||||||
|
],
|
||||||
|
'attachment' => [
|
||||||
|
'software_drives' => 'Software and Drivers',
|
||||||
|
'software_download' => 'Software Drives',
|
||||||
|
'manual_download' => 'Manual',
|
||||||
|
'video' => 'Videos'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
@@ -31,5 +31,11 @@ return [
|
|||||||
'detail_leave_reply_comment' => '留言',
|
'detail_leave_reply_comment' => '留言',
|
||||||
'detail_leave_reply_submit' => '提交留言',
|
'detail_leave_reply_submit' => '提交留言',
|
||||||
'detail_recommend' => '你可能还喜欢',
|
'detail_recommend' => '你可能还喜欢',
|
||||||
|
],
|
||||||
|
'attachment' => [
|
||||||
|
'software_drives' => '软件和驱动程序',
|
||||||
|
'software_download' => '软件下载',
|
||||||
|
'manual_download' => '手册',
|
||||||
|
'video' => '视频'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
25
app/index/model/AttachmentCategoryModel.php
Normal file
25
app/index/model/AttachmentCategoryModel.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
declare (strict_types = 1);
|
||||||
|
|
||||||
|
namespace app\index\model;
|
||||||
|
|
||||||
|
use app\common\model\AttachmentCategoryBaseModel;
|
||||||
|
use think\model\concern\SoftDelete;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件分类模型
|
||||||
|
* @mixin \think\Model
|
||||||
|
*/
|
||||||
|
class AttachmentCategoryModel extends AttachmentCategoryBaseModel
|
||||||
|
{
|
||||||
|
// 启用软删除
|
||||||
|
use SoftDelete;
|
||||||
|
// 软删除时间字段名
|
||||||
|
protected $deleteTime = 'deleted_at';
|
||||||
|
|
||||||
|
// 所属语言范围查询
|
||||||
|
public function scopeLanguage($query, $language)
|
||||||
|
{
|
||||||
|
return $query->where('language_id', '=', $language);
|
||||||
|
}
|
||||||
|
}
|
||||||
19
app/index/model/AttachmentModel.php
Normal file
19
app/index/model/AttachmentModel.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
declare (strict_types = 1);
|
||||||
|
|
||||||
|
namespace app\index\model;
|
||||||
|
|
||||||
|
use app\common\model\AttachmentBaseModel;
|
||||||
|
use think\model\concern\SoftDelete;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件模型
|
||||||
|
* @mixin \think\Model
|
||||||
|
*/
|
||||||
|
class AttachmentModel extends AttachmentBaseModel
|
||||||
|
{
|
||||||
|
// 启用软删除
|
||||||
|
use SoftDelete;
|
||||||
|
// 软删除时间字段名
|
||||||
|
protected $deleteTime = 'deleted_at';
|
||||||
|
}
|
||||||
@@ -34,6 +34,11 @@ Route::group('article', function() {
|
|||||||
Route::post('comment', 'Article/comment');
|
Route::post('comment', 'Article/comment');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 附件下载
|
||||||
|
Route::group('attachment', function() {
|
||||||
|
Route::get('index', 'Attachment/index');
|
||||||
|
});
|
||||||
|
|
||||||
// 问答中心
|
// 问答中心
|
||||||
Route::group('faq', function() {
|
Route::group('faq', function() {
|
||||||
// 问答列表页
|
// 问答列表页
|
||||||
|
|||||||
166
app/index/view/attachment/index.html
Normal file
166
app/index/view/attachment/index.html
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
{extend name="public/base" /}
|
||||||
|
{block name="style"}
|
||||||
|
<link rel="stylesheet" href="__CSS__/download.css" />
|
||||||
|
{/block}
|
||||||
|
{block name="main"}
|
||||||
|
<div class="orico_Page_download">
|
||||||
|
<!-- 内容 -->
|
||||||
|
<div class="downloadMain">
|
||||||
|
<div class="topimg">
|
||||||
|
<img src="__IMAGES__/banner_01.png" />
|
||||||
|
<div class="banner_title">{:lang('attachment.software_drives')}</div>
|
||||||
|
</div>
|
||||||
|
<div class="contact_c">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<div class="search_all">
|
||||||
|
<input type="text" name="textfield" placeholder="Search model" id="search_software">
|
||||||
|
<div class="searchbtn" id="search-btn">
|
||||||
|
<img src="downloadImg/search.png" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- tab切换 -->
|
||||||
|
<div class="tab">
|
||||||
|
<div class="tabit on">{:lang('attachment.software_download')}</div>
|
||||||
|
<div class="tabit">{:lang('attachment.manual_download')}</div>
|
||||||
|
<div class="tabit">{:lang('attachment.video')}</div>
|
||||||
|
</div>
|
||||||
|
<!-- 切换的内容 -->
|
||||||
|
<div class="softlist">
|
||||||
|
<div class="softit">
|
||||||
|
<div class="left_img"><img src="downloadImg/10G.jpg" alt=""></div>
|
||||||
|
<div>
|
||||||
|
<p class="title">Driver for USB-C 10Gb Ethernet Adapter</p>
|
||||||
|
<p class="sub_title">Supported Models: </p>
|
||||||
|
<p class="des">ORICO-REA-10</p>
|
||||||
|
<p class="sub_title">Supported Systems: </p>
|
||||||
|
<p class="des">Windows 10-11, Linux</p>
|
||||||
|
<p>
|
||||||
|
<a href="/uploads/download/2024/Linux-Driver.zip" data-cod="dl" data-id="332"
|
||||||
|
target="_blank"><span class="l_button">Linux</span></a>
|
||||||
|
<a href="/uploads/download/2024/Windows 10-11.zip" data-cod="dl" data-id="332"
|
||||||
|
target="_blank"><span class="l_button">Windows 10-11</span></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="softit">
|
||||||
|
<div class="left_img"><img src="downloadImg/10G.jpg" alt=""></div>
|
||||||
|
<div>
|
||||||
|
<p class="title">Driver for USB-C 10Gb Ethernet Adapter</p>
|
||||||
|
<p class="sub_title">Supported Models: </p>
|
||||||
|
<p class="des">ORICO-REA-10</p>
|
||||||
|
<p class="sub_title">Supported Systems: </p>
|
||||||
|
<p class="des">Windows 10-11, Linux</p>
|
||||||
|
<p>
|
||||||
|
<a href="/uploads/download/2024/Linux-Driver.zip" data-cod="dl" data-id="332"
|
||||||
|
target="_blank"><span class="l_button">Linux</span></a>
|
||||||
|
<a href="/uploads/download/2024/Windows 10-11.zip" data-cod="dl" data-id="332"
|
||||||
|
target="_blank"><span class="l_button">Windows 10-11</span></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="softit">
|
||||||
|
<div class="left_img"><img src="downloadImg/10G.jpg" alt=""></div>
|
||||||
|
<div>
|
||||||
|
<p class="title">Driver for USB-C 10Gb Ethernet Adapter</p>
|
||||||
|
<p class="sub_title">Supported Models: </p>
|
||||||
|
<p class="des">ORICO-REA-10</p>
|
||||||
|
<p class="sub_title">Supported Systems: </p>
|
||||||
|
<p class="des">Windows 10-11, Linux</p>
|
||||||
|
<p>
|
||||||
|
<a href="/uploads/download/2024/Linux-Driver.zip" data-cod="dl" data-id="332"
|
||||||
|
target="_blank"><span class="l_button">Linux</span></a>
|
||||||
|
<a href="/uploads/download/2024/Windows 10-11.zip" data-cod="dl" data-id="332"
|
||||||
|
target="_blank"><span class="l_button">Windows 10-11</span></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="Page">
|
||||||
|
<span class="p_page">
|
||||||
|
<a class="a_prev"></a>
|
||||||
|
<em class="num">
|
||||||
|
<a class="a_cur">1</a>
|
||||||
|
<a>2</a>
|
||||||
|
<a>3</a>
|
||||||
|
<a>4</a>
|
||||||
|
</em>
|
||||||
|
<a class="a_next"></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- VIDEO 切换 -->
|
||||||
|
<div class="vidotabs" style="display: none;">
|
||||||
|
<div class="hd">
|
||||||
|
<ul>
|
||||||
|
<li class="vli von">Data Storage</li>
|
||||||
|
<li class="vli">Power Transmission</li>
|
||||||
|
<li class="vli">Smart Life</li>
|
||||||
|
<li class="vli">Accessories</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- 视频内容 -->
|
||||||
|
<div class="bdconten">
|
||||||
|
<ul >
|
||||||
|
<dl class="video_hotul">
|
||||||
|
<dd>
|
||||||
|
<div class="hot1">
|
||||||
|
<video preload="none" controls="controls">
|
||||||
|
<source src="/uploads/uk/video/entertainment/RP1 .mp4" type="video/mp4">
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
<div class="htit">
|
||||||
|
<div class="htit1">ORICO RP1 Headphones</div>
|
||||||
|
<div class="htit2"> ORICO RP1 in-ear music headphones, skin-friendly and
|
||||||
|
comfortable for long time wearing; black, white, red and blue, four
|
||||||
|
colors for you to choose. ORICO 2169U3 full mesh 2.5 inch hard drive
|
||||||
|
enclosure, all-round heat-dissipation; compatible with SATA HDD below
|
||||||
|
9.5mm. </div>
|
||||||
|
</div>
|
||||||
|
</dd>
|
||||||
|
<dd>
|
||||||
|
<div class="hot1">
|
||||||
|
<video preload="none" controls="controls">
|
||||||
|
<source src="/uploads/uk/video/entertainment/BS16.mp4" type="video/mp4">
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
<div class="htit">
|
||||||
|
<div class="htit1">ORICO BS16 Bluetooth Speaker</div>
|
||||||
|
<div class="htit2"> ORICO BS16 unique and delicate pocket Bluetooth speaker,
|
||||||
|
bring you beautiful music; smaller size, unprecedented endurance. ORICO
|
||||||
|
2169U3 full mesh 2.5 inch hard drive enclosure, all-round
|
||||||
|
heat-dissipation; compatible with SATA HDD below 9.5mm. </div>
|
||||||
|
</div>
|
||||||
|
</dd>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</dl>
|
||||||
|
<div id="page39">
|
||||||
|
<!-- 分页 s -->
|
||||||
|
<!-- 分页 e -->
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 如果切换的是 Videos-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/block}
|
||||||
|
{block name="script"}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
// 为所有具有 tabitme 类的元素添加点击事件
|
||||||
|
$('.tabit').click(function() {
|
||||||
|
// 移除所有 tabitme 元素的 on 类
|
||||||
|
$('.tabit').removeClass('on');
|
||||||
|
// 为当前点击的元素添加 on 类
|
||||||
|
$(this).addClass('on');
|
||||||
|
});
|
||||||
|
// 为所有具有 tabitme 类的元素添加点击事件
|
||||||
|
$('.vli').click(function() {
|
||||||
|
// 移除所有 tabitme 元素的 on 类
|
||||||
|
$('.vli').removeClass('von');
|
||||||
|
// 为当前点击的元素添加 on 类
|
||||||
|
$(this).addClass('von');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
.orico_Page_download {
|
.orico_Page_download {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100vh;
|
height: auto;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
|
|||||||
Reference in New Issue
Block a user