优化接口
This commit is contained in:
parent
acf9bc0952
commit
3e9a3731e5
4
.env
4
.env
@ -5,11 +5,11 @@ DEFAULT_TIMEZONE = Asia/Shanghai
|
|||||||
|
|
||||||
[DATABASE]
|
[DATABASE]
|
||||||
TYPE = mysql
|
TYPE = mysql
|
||||||
HOSTNAME = 212.64.112.158
|
HOSTNAME = 192.168.31.10
|
||||||
DATABASE = yunzertest
|
DATABASE = yunzertest
|
||||||
USERNAME = yunzertest
|
USERNAME = yunzertest
|
||||||
PASSWORD = zKMDMEs7YP3SLDEF
|
PASSWORD = zKMDMEs7YP3SLDEF
|
||||||
HOSTPORT = 3388
|
HOSTPORT = 3306
|
||||||
CHARSET = utf8
|
CHARSET = utf8
|
||||||
DEBUG = true
|
DEBUG = true
|
||||||
|
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
|||||||
runtime
|
runtime
|
||||||
*.log
|
*.log
|
||||||
config/database.php
|
config/database.php
|
||||||
|
.env
|
||||||
|
|||||||
@ -156,9 +156,6 @@ class ResourcesController extends BaseController
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
return View::fetch();
|
return View::fetch();
|
||||||
} catch (\Exception $e) {
|
|
||||||
Log::record('添加资源页面加载', 0, $e->getMessage(), '资源管理');
|
|
||||||
$this->error('页面加载失败:' . $e->getMessage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -308,6 +308,65 @@ class ArticlesController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取articleDetail详情
|
||||||
|
public function getArticleDetail()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
// 获取前端传递的ID
|
||||||
|
$id = input('id/d', 0);
|
||||||
|
|
||||||
|
// 验证ID
|
||||||
|
if ($id <= 0) {
|
||||||
|
return json([
|
||||||
|
'code' => 1,
|
||||||
|
'msg' => 'ID参数错误'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建查询条件
|
||||||
|
$where = [
|
||||||
|
['r.id', '=', $id],
|
||||||
|
['r.delete_time', '=', null],
|
||||||
|
['r.status', '=', 1], // 已审核的资源
|
||||||
|
['r.push', '=', 1], // 已推送的资源
|
||||||
|
];
|
||||||
|
|
||||||
|
// 查询资源详情,联查分类名称
|
||||||
|
$resource = Resources::where($where)
|
||||||
|
->field('r.id,r.title,r.cate,r.icon,r.price,r.code,r.desc,r.number,r.content,r.views,r.downloads,r.create_time,r.update_time,r.url,r.fileurl,c.name as cate_name')
|
||||||
|
->alias('r')
|
||||||
|
->join('resources_category c', 'r.cate = c.id')
|
||||||
|
->find();
|
||||||
|
|
||||||
|
if (!$resource) {
|
||||||
|
return json([
|
||||||
|
'code' => 1,
|
||||||
|
'msg' => '资源不存在或已删除'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换为数组并处理数据
|
||||||
|
$resource = $resource->toArray();
|
||||||
|
|
||||||
|
// 将cate字段替换为分类名称
|
||||||
|
$resource['cate'] = $resource['cate_name'];
|
||||||
|
unset($resource['cate_name']);
|
||||||
|
|
||||||
|
// 返回数据
|
||||||
|
return json([
|
||||||
|
'code' => 0,
|
||||||
|
'msg' => '获取成功',
|
||||||
|
'data' => $resource
|
||||||
|
]);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return json([
|
||||||
|
'code' => 1,
|
||||||
|
'msg' => '获取失败:' . $e->getMessage()
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//文章中心
|
//文章中心
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -516,65 +516,6 @@ class ProgramController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取downloadPrograms详情
|
|
||||||
public function getDownloadProgramsDetail()
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
// 获取前端传递的ID
|
|
||||||
$id = input('id/d', 0);
|
|
||||||
|
|
||||||
// 验证ID
|
|
||||||
if ($id <= 0) {
|
|
||||||
return json([
|
|
||||||
'code' => 1,
|
|
||||||
'msg' => 'ID参数错误'
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 构建查询条件
|
|
||||||
$where = [
|
|
||||||
['r.id', '=', $id],
|
|
||||||
['r.delete_time', '=', null],
|
|
||||||
['r.status', '=', 1], // 已审核的资源
|
|
||||||
['r.push', '=', 1], // 已推送的资源
|
|
||||||
];
|
|
||||||
|
|
||||||
// 查询资源详情,联查分类名称
|
|
||||||
$resource = Resources::where($where)
|
|
||||||
->field('r.id,r.title,r.cate,r.icon,r.price,r.code,r.desc,r.number,r.content,r.views,r.downloads,r.create_time,r.update_time,r.url,r.fileurl,c.name as cate_name')
|
|
||||||
->alias('r')
|
|
||||||
->join('resources_category c', 'r.cate = c.id')
|
|
||||||
->find();
|
|
||||||
|
|
||||||
if (!$resource) {
|
|
||||||
return json([
|
|
||||||
'code' => 1,
|
|
||||||
'msg' => '资源不存在或已删除'
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 转换为数组并处理数据
|
|
||||||
$resource = $resource->toArray();
|
|
||||||
|
|
||||||
// 将cate字段替换为分类名称
|
|
||||||
$resource['cate'] = $resource['cate_name'];
|
|
||||||
unset($resource['cate_name']);
|
|
||||||
|
|
||||||
// 返回数据
|
|
||||||
return json([
|
|
||||||
'code' => 0,
|
|
||||||
'msg' => '获取成功',
|
|
||||||
'data' => $resource
|
|
||||||
]);
|
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
return json([
|
|
||||||
'code' => 1,
|
|
||||||
'msg' => '获取失败:' . $e->getMessage()
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取downloadGames分类
|
// 获取downloadGames分类
|
||||||
public function getDownloadGamesCategory()
|
public function getDownloadGamesCategory()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,6 +32,66 @@ use app\index\model\Articles\Articles;
|
|||||||
|
|
||||||
class ResourcesController extends BaseController
|
class ResourcesController extends BaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// 获取resourceDetail详情
|
||||||
|
public function getResourceDetail()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
// 获取前端传递的ID
|
||||||
|
$id = input('id/d', 0);
|
||||||
|
|
||||||
|
// 验证ID
|
||||||
|
if ($id <= 0) {
|
||||||
|
return json([
|
||||||
|
'code' => 1,
|
||||||
|
'msg' => 'ID参数错误'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建查询条件
|
||||||
|
$where = [
|
||||||
|
['r.id', '=', $id],
|
||||||
|
['r.delete_time', '=', null],
|
||||||
|
['r.status', '=', 1], // 已审核的资源
|
||||||
|
['r.push', '=', 1], // 已推送的资源
|
||||||
|
];
|
||||||
|
|
||||||
|
// 查询资源详情,联查分类名称
|
||||||
|
$resource = Resources::where($where)
|
||||||
|
->field('r.id,r.title,r.cate,r.icon,r.price,r.code,r.desc,r.number,r.content,r.views,r.downloads,r.create_time,r.update_time,r.url,r.fileurl,c.name as cate_name')
|
||||||
|
->alias('r')
|
||||||
|
->join('resources_category c', 'r.cate = c.id')
|
||||||
|
->find();
|
||||||
|
|
||||||
|
if (!$resource) {
|
||||||
|
return json([
|
||||||
|
'code' => 1,
|
||||||
|
'msg' => '资源不存在或已删除'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换为数组并处理数据
|
||||||
|
$resource = $resource->toArray();
|
||||||
|
|
||||||
|
// 将cate字段替换为分类名称
|
||||||
|
$resource['cate'] = $resource['cate_name'];
|
||||||
|
unset($resource['cate_name']);
|
||||||
|
|
||||||
|
// 返回数据
|
||||||
|
return json([
|
||||||
|
'code' => 0,
|
||||||
|
'msg' => '获取成功',
|
||||||
|
'data' => $resource
|
||||||
|
]);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return json([
|
||||||
|
'code' => 1,
|
||||||
|
'msg' => '获取失败:' . $e->getMessage()
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//资源中心
|
//资源中心
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?php /*a:2:{s:58:"E:\Demo\PHP\yunzer\app\admin\view\articles\articlelist.php";i:1747649468;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1746890051;}*/ ?>
|
<?php /*a:2:{s:58:"E:\Demo\PHP\yunzer\app\admin\view\articles\articlelist.php";i:1766587447;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1766587447;}*/ ?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?php /*a:2:{s:52:"E:\Demo\PHP\yunzer\app\admin\view\resources\edit.php";i:1747755572;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1746890051;}*/ ?>
|
<?php /*a:2:{s:52:"E:\Demo\PHP\yunzer\app\admin\view\resources\edit.php";i:1766587447;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1766587447;}*/ ?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@ -106,138 +106,205 @@
|
|||||||
</div>
|
</div>
|
||||||
<form class="layui-form" action="" method="post">
|
<form class="layui-form" action="" method="post">
|
||||||
<input type="hidden" name="id" value="<?php echo htmlentities((string) (isset($resource['id']) && ($resource['id'] !== '')?$resource['id']:'')); ?>">
|
<input type="hidden" name="id" value="<?php echo htmlentities((string) (isset($resource['id']) && ($resource['id'] !== '')?$resource['id']:'')); ?>">
|
||||||
<div class="layui-form-item">
|
<div class="form-container">
|
||||||
<label class="layui-form-label">资源名称</label>
|
<div class="container-left">
|
||||||
<div class="layui-input-block">
|
<div class="layui-form-item">
|
||||||
<input type="text" name="title" required lay-verify="required" placeholder="请输入资源名称" autocomplete="off"
|
<label class="layui-form-label">资源名称</label>
|
||||||
class="layui-input" value="<?php echo htmlentities((string) (isset($resource['title']) && ($resource['title'] !== '')?$resource['title']:'')); ?>" lay-affix="clear">
|
<div class="layui-input-block">
|
||||||
</div>
|
<input type="text" name="title" required lay-verify="required" placeholder="请输入资源名称"
|
||||||
</div>
|
autocomplete="off" class="layui-input" value="<?php echo htmlentities((string) (isset($resource['title']) && ($resource['title'] !== '')?$resource['title']:'')); ?>"
|
||||||
|
lay-affix="clear">
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label">分类</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<select name="cate" lay-verify="required" lay-filter="cate">
|
|
||||||
<option value="">请选择分类</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label">资源编号</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<input type="text" name="number" required lay-verify="required" placeholder="请输入分类编号" autocomplete="off"
|
|
||||||
class="layui-input" value="<?php echo htmlentities((string) (isset($resource['number']) && ($resource['number'] !== '')?$resource['number']:'')); ?>" lay-affix="clear" disabled>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label">描述</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<textarea name="desc" placeholder="请输入资源描述" class="layui-textarea" lay-affix="clear"><?php echo htmlentities((string) (isset($resource['desc']) && ($resource['desc'] !== '')?$resource['desc']:'')); ?></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label">上传者</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<input type="text" name="uploader" required lay-verify="required" placeholder="请输入上传者"
|
|
||||||
autocomplete="off" class="layui-input" value="<?php echo htmlentities((string) (isset($resource['uploader']) && ($resource['uploader'] !== '')?$resource['uploader']:'')); ?>" lay-affix="clear">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label">资源图标</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<button type="button" class="layui-btn" id="upload-btn">
|
|
||||||
<i class="layui-icon layui-icon-upload"></i> 图标上传
|
|
||||||
</button>
|
|
||||||
<div style="width: 120px;">
|
|
||||||
<div class="layui-upload-list">
|
|
||||||
<img class="layui-upload-img" id="upload-img"
|
|
||||||
style="width: 118px; height: 118px;object-fit: cover;">
|
|
||||||
<div id="upload-text"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-progress layui-progress-big" lay-showPercent="yes" lay-filter="icon-progress">
|
|
||||||
<div class="layui-progress-bar" lay-percent=""></div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="icon" id="icon" value="">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-mid layui-word-aux">建议尺寸:128px * 128px</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">资源文件</label>
|
<label class="layui-form-label">分类</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" name="fileurl" required placeholder="本地资源地址" autocomplete="off"
|
<select name="cate" lay-verify="required" lay-filter="cate">
|
||||||
class="layui-input" value="<?php echo htmlentities((string) (isset($resource['fileurl']) && ($resource['fileurl'] !== '')?$resource['fileurl']:'')); ?>" style="margin-bottom: 10px;" lay-affix="clear">
|
<option value="">请选择分类</option>
|
||||||
<div class="layui-upload-drag" style="display: block;" id="ID-upload-demo-drag">
|
</select>
|
||||||
<i class="layui-icon layui-icon-upload"></i>
|
</div>
|
||||||
<div>点击上传,或将文件拖拽到此处</div>
|
</div>
|
||||||
<div class="layui-hide" id="ID-upload-demo-preview">
|
|
||||||
<hr>
|
<div class="layui-form-item">
|
||||||
<div class="file-info">
|
<label class="layui-form-label">资源编号</label>
|
||||||
<i class="layui-icon layui-icon-file"></i>
|
<div class="layui-input-block">
|
||||||
<span class="file-name"></span>
|
<input type="text" name="number" required lay-verify="required" placeholder="请输入分类编号"
|
||||||
<span class="file-size"></span>
|
autocomplete="off" class="layui-input" value="<?php echo htmlentities((string) (isset($resource['number']) && ($resource['number'] !== '')?$resource['number']:'')); ?>"
|
||||||
|
lay-affix="clear" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">描述</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<textarea name="desc" placeholder="请输入资源描述" class="layui-textarea"
|
||||||
|
lay-affix="clear"><?php echo htmlentities((string) (isset($resource['desc']) && ($resource['desc'] !== '')?$resource['desc']:'')); ?></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">上传者</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" name="uploader" required lay-verify="required" placeholder="请输入上传者"
|
||||||
|
autocomplete="off" class="layui-input" value="<?php echo htmlentities((string) (isset($resource['uploader']) && ($resource['uploader'] !== '')?$resource['uploader']:'')); ?>"
|
||||||
|
lay-affix="clear">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">排序</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="number" name="sort" value="<?php echo htmlentities((string) (isset($resource['sort']) && ($resource['sort'] !== '')?$resource['sort']:'0')); ?>" class="layui-input"
|
||||||
|
placeholder="数字越大越靠前" lay-affix="clear">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">资源图标</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<button type="button" class="layui-btn" id="upload-btn">
|
||||||
|
<i class="layui-icon layui-icon-upload"></i> 图标上传
|
||||||
|
</button>
|
||||||
|
<div style="width: 120px;">
|
||||||
|
<div class="layui-upload-list">
|
||||||
|
<img class="layui-upload-img" id="upload-img"
|
||||||
|
style="width: 118px; height: 118px;object-fit: cover;">
|
||||||
|
<div id="upload-text"></div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-progress layui-progress-big" lay-showPercent="yes"
|
||||||
|
lay-filter="icon-progress">
|
||||||
|
<div class="layui-progress-bar" lay-percent=""></div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="icon" id="icon" value="">
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-mid layui-word-aux">建议尺寸:250px * 140px</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">图片上传</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<div class="image-upload-container">
|
||||||
|
<button type="button" class="btn btn-primary" id="imageUpload">
|
||||||
|
<i class="fas fa-upload"></i> 多图片上传
|
||||||
|
</button>
|
||||||
|
<div class="image-preview-container" id="imagePreview">
|
||||||
|
<?php if(isset($resource['images']) && !empty($resource['images'])): ?>
|
||||||
|
<div class="image-list-table">
|
||||||
|
<table class="layui-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="100" align="center">缩略图</th>
|
||||||
|
<th width="40" align="center">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
// 处理图片字符串,正确拆分逗号分隔的路径
|
||||||
|
$imageArray = [];
|
||||||
|
if (isset($resource['images']) && !empty($resource['images'])) {
|
||||||
|
$imageArray = explode(',', $resource['images']);
|
||||||
|
$imageArray = array_map('trim', $imageArray); // 去除每个路径的前后空格
|
||||||
|
$imageArray = array_filter($imageArray); // 过滤空值
|
||||||
|
}
|
||||||
|
if(is_array($imageArray) || $imageArray instanceof \think\Collection || $imageArray instanceof \think\Paginator): $i = 0; $__LIST__ = $imageArray;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$image): $mod = ($i % 2 );++$i;?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="image-thumbnail" onclick="previewImage('<?php echo (strpos($image, 'http') === 0 ? $image : request()->domain() . $image); ?>')">
|
||||||
|
<img src="<?php echo (strpos($image, 'http') === 0 ? $image : request()->domain() . $image); ?>" alt="缩略图">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<button type="button" class="layui-btn layui-btn-danger layui-btn-xs delete-image" data-src="<?php echo htmlentities((string) $image); ?>">
|
||||||
|
<i class="fas fa-trash"></i> 删除
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="upload-progress" id="imageProgress" style="display: none;">
|
||||||
|
<div class="progress-bar" role="progressbar" style="width: 0%"></div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="images" id="images" value="<?php echo htmlentities((string) (isset($resource['images']) && ($resource['images'] !== '')?$resource['images']:'')); ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-progress layui-progress-big" lay-showPercent="yes" lay-filter="file-progress" style="margin-top: 10px;">
|
|
||||||
<div class="layui-progress-bar" lay-percent=""></div>
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">资源文件</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" name="fileurl" required placeholder="本地资源地址" autocomplete="off"
|
||||||
|
class="layui-input" value="<?php echo htmlentities((string) (isset($resource['fileurl']) && ($resource['fileurl'] !== '')?$resource['fileurl']:'')); ?>" style="margin-bottom: 10px;"
|
||||||
|
lay-affix="clear">
|
||||||
|
<div class="layui-upload-drag" style="display: block;" id="ID-upload-demo-drag">
|
||||||
|
<i class="layui-icon layui-icon-upload"></i>
|
||||||
|
<div>点击上传,或将文件拖拽到此处</div>
|
||||||
|
<div class="layui-hide" id="ID-upload-demo-preview">
|
||||||
|
<hr>
|
||||||
|
<div class="file-info">
|
||||||
|
<i class="layui-icon layui-icon-file"></i>
|
||||||
|
<span class="file-name"></span>
|
||||||
|
<span class="file-size"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-progress layui-progress-big" lay-showPercent="yes" lay-filter="file-progress"
|
||||||
|
style="margin-top: 10px;">
|
||||||
|
<div class="layui-progress-bar" lay-percent=""></div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="file" id="file" value="">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="file" id="file" value="">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">资源链接</label>
|
<label class="layui-form-label">资源链接</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" name="url" required placeholder="百度网盘、115网盘、蓝奏云等" autocomplete="off"
|
<input type="text" name="url" required placeholder="百度网盘、115网盘、蓝奏云等" autocomplete="off"
|
||||||
class="layui-input" value="<?php echo htmlentities((string) (isset($resource['url']) && ($resource['url'] !== '')?$resource['url']:'')); ?>" lay-affix="clear">
|
class="layui-input" value="<?php echo htmlentities((string) (isset($resource['url']) && ($resource['url'] !== '')?$resource['url']:'')); ?>" lay-affix="clear">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">分享码</label>
|
<label class="layui-form-label">分享码</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" name="code" required placeholder="请输入分享码" autocomplete="off"
|
<input type="text" name="code" required placeholder="请输入分享码" autocomplete="off"
|
||||||
class="layui-input" value="<?php echo htmlentities((string) (isset($resource['code']) && ($resource['code'] !== '')?$resource['code']:'')); ?>" lay-affix="clear">
|
class="layui-input" value="<?php echo htmlentities((string) (isset($resource['code']) && ($resource['code'] !== '')?$resource['code']:'')); ?>" lay-affix="clear">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">解压密码</label>
|
<label class="layui-form-label">解压密码</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" name="zipcode" required placeholder="请输入解压密码" autocomplete="off"
|
<input type="text" name="zipcode" required placeholder="请输入解压密码" autocomplete="off"
|
||||||
class="layui-input" value="<?php echo htmlentities((string) (isset($resource['zipcode']) && ($resource['zipcode'] !== '')?$resource['zipcode']:'')); ?>" lay-affix="clear">
|
class="layui-input" value="<?php echo htmlentities((string) (isset($resource['zipcode']) && ($resource['zipcode'] !== '')?$resource['zipcode']:'')); ?>" lay-affix="clear">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="container-right">
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label">内容</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<div id="editor—wrapper" id="content" name="content" style="border: 1px solid #ccc;">
|
||||||
|
<div id="toolbar-container" style="border-bottom: 1px solid #ccc;"><!-- 工具栏 --></div>
|
||||||
|
<div id="editor-container" style="height: 800px;"><!-- 编辑器 --></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item" style="margin-top: 80px;">
|
||||||
<label class="layui-form-label">排序</label>
|
<div class="layui-input-block">
|
||||||
<div class="layui-input-block">
|
<button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
|
||||||
<input type="number" name="sort" value="<?php echo htmlentities((string) (isset($resource['sort']) && ($resource['sort'] !== '')?$resource['sort']:'0')); ?>" class="layui-input" placeholder="数字越大越靠前" lay-affix="clear">
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item layui-form-text">
|
|
||||||
<label class="layui-form-label">内容</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<div id="editor—wrapper" id="content" name="content" style="border: 1px solid #ccc;">
|
|
||||||
<div id="toolbar-container" style="border-bottom: 1px solid #ccc;"><!-- 工具栏 --></div>
|
|
||||||
<div id="editor-container" style="height: 800px;"><!-- 编辑器 --></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
|
|
||||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -253,13 +320,13 @@
|
|||||||
// 获取资源详情
|
// 获取资源详情
|
||||||
var resourceId = $('input[name="id"]').val();
|
var resourceId = $('input[name="id"]').val();
|
||||||
var resourceData = null;
|
var resourceData = null;
|
||||||
|
|
||||||
if (resourceId) {
|
if (resourceId) {
|
||||||
$.get('<?php echo url("resources/get"); ?>', {id: resourceId}, function(res) {
|
$.get('<?php echo url("resources/get"); ?>', { id: resourceId }, function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
resourceData = res.data;
|
resourceData = res.data;
|
||||||
console.log('Resource data:', resourceData); // 调试输出
|
console.log('Resource data:', resourceData); // 调试输出
|
||||||
|
|
||||||
// 设置表单值
|
// 设置表单值
|
||||||
$('input[name="title"]').val(resourceData.title || '');
|
$('input[name="title"]').val(resourceData.title || '');
|
||||||
$('select[name="cate"]').val(resourceData.cate || '');
|
$('select[name="cate"]').val(resourceData.cate || '');
|
||||||
@ -271,12 +338,12 @@
|
|||||||
$('input[name="sort"]').val(resourceData.sort || '0');
|
$('input[name="sort"]').val(resourceData.sort || '0');
|
||||||
$('input[name="icon"]').val(resourceData.icon || '');
|
$('input[name="icon"]').val(resourceData.icon || '');
|
||||||
$('input[name="file"]').val(resourceData.file || '');
|
$('input[name="file"]').val(resourceData.file || '');
|
||||||
|
|
||||||
// 设置图标预览
|
// 设置图标预览
|
||||||
if (resourceData.icon) {
|
if (resourceData.icon) {
|
||||||
$('#upload-img').attr('src', resourceData.icon);
|
$('#upload-img').attr('src', resourceData.icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置文件预览
|
// 设置文件预览
|
||||||
if (resourceData.file) {
|
if (resourceData.file) {
|
||||||
$('#ID-upload-demo-preview').show();
|
$('#ID-upload-demo-preview').show();
|
||||||
@ -305,7 +372,7 @@
|
|||||||
$('#upload-text').html('');
|
$('#upload-text').html('');
|
||||||
layer.msg('图标上传成功', { icon: 1 });
|
layer.msg('图标上传成功', { icon: 1 });
|
||||||
},
|
},
|
||||||
uploadError: function () {
|
error: function () {
|
||||||
var demoText = $('#upload-text');
|
var demoText = $('#upload-text');
|
||||||
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
|
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
|
||||||
demoText.find('.demo-reload').on('click', function () {
|
demoText.find('.demo-reload').on('click', function () {
|
||||||
@ -320,6 +387,58 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 多图片上传
|
||||||
|
var uploadInst = upload.render({
|
||||||
|
elem: '#imageUpload',
|
||||||
|
url: '<?php echo url("index/upload_img"); ?>',
|
||||||
|
multiple: true,
|
||||||
|
accept: 'images',
|
||||||
|
before: function (obj) {
|
||||||
|
obj.preview(function (index, file, result) {
|
||||||
|
$('#imagePreview').append('<div class="layui-upload-img-item" data-src="' + result + '"><img src="' + result + '" alt="' + file.name + '" style="width: 100px; height: 100px; object-fit: cover;"><p>' + file.name + '</p><button type="button" class="layui-btn layui-btn-xs layui-btn-danger delete-image" style="position: absolute; top: 0; right: 0;">删除</button></div>');
|
||||||
|
});
|
||||||
|
element.progress('image-progress', '0%');
|
||||||
|
layer.msg('图片上传中', { icon: 16, time: 0 });
|
||||||
|
},
|
||||||
|
done: function (res) {
|
||||||
|
if (res.code > 0) {
|
||||||
|
return layer.msg('图片上传失败');
|
||||||
|
}
|
||||||
|
var images = $('#images').val().split(',');
|
||||||
|
if (res.data) {
|
||||||
|
images.push(res.data);
|
||||||
|
}
|
||||||
|
$('#images').val(images.filter(Boolean).join(','));
|
||||||
|
layer.msg('图片上传成功', { icon: 1 });
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
var demoText = $('#imagePreview');
|
||||||
|
demoText.append('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
|
||||||
|
demoText.find('.demo-reload').on('click', function () {
|
||||||
|
uploadInst.upload();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
progress: function (n, elem, e) {
|
||||||
|
element.progress('image-progress', n + '%');
|
||||||
|
if (n == 100) {
|
||||||
|
layer.msg('图片上传完毕', { icon: 1 });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 删除图片功能
|
||||||
|
$('#imagePreview').on('click', '.delete-image', function () {
|
||||||
|
var $item = $(this).closest('.layui-upload-img-item');
|
||||||
|
var imageSrc = $item.data('src');
|
||||||
|
var images = $('#images').val().split(',');
|
||||||
|
var index = images.indexOf(imageSrc);
|
||||||
|
if (index > -1) {
|
||||||
|
images.splice(index, 1);
|
||||||
|
}
|
||||||
|
$('#images').val(images.join(','));
|
||||||
|
$item.remove();
|
||||||
|
});
|
||||||
|
|
||||||
// 文件上传
|
// 文件上传
|
||||||
var fileUpload = upload.render({
|
var fileUpload = upload.render({
|
||||||
elem: '#ID-upload-demo-drag',
|
elem: '#ID-upload-demo-drag',
|
||||||
@ -368,7 +487,7 @@
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
// 存储分类数据供后续使用
|
// 存储分类数据供后续使用
|
||||||
window.categoryData = res.data;
|
window.categoryData = res.data;
|
||||||
|
|
||||||
var html = '<option value="">请选择分类</option>';
|
var html = '<option value="">请选择分类</option>';
|
||||||
res.data.forEach(function (item) {
|
res.data.forEach(function (item) {
|
||||||
html += '<option value="' + item.id + '">' + item.name + '</option>';
|
html += '<option value="' + item.id + '">' + item.name + '</option>';
|
||||||
@ -379,11 +498,11 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('select[name="cate"]').html(html);
|
$('select[name="cate"]').html(html);
|
||||||
|
|
||||||
// 如果有资源数据,设置分类值
|
// 如果有资源数据,设置分类值
|
||||||
if (resourceData && resourceData.cate) {
|
if (resourceData && resourceData.cate) {
|
||||||
console.log('Setting cate value:', resourceData.cate); // 调试输出
|
console.log('Setting cate value:', resourceData.cate); // 调试输出
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
$('select[name="cate"]').val(resourceData.cate);
|
$('select[name="cate"]').val(resourceData.cate);
|
||||||
form.render('select');
|
form.render('select');
|
||||||
}, 100);
|
}, 100);
|
||||||
@ -394,7 +513,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 监听分类选择变化
|
// 监听分类选择变化
|
||||||
form.on('select(cate)', function(data) {
|
form.on('select(cate)', function (data) {
|
||||||
var selectedId = data.value;
|
var selectedId = data.value;
|
||||||
if (!selectedId) {
|
if (!selectedId) {
|
||||||
$('input[name="number"]').val('');
|
$('input[name="number"]').val('');
|
||||||
@ -405,9 +524,9 @@
|
|||||||
var parentCategory = null;
|
var parentCategory = null;
|
||||||
var childCategory = null;
|
var childCategory = null;
|
||||||
|
|
||||||
window.categoryData.forEach(function(parent) {
|
window.categoryData.forEach(function (parent) {
|
||||||
if (parent.children) {
|
if (parent.children) {
|
||||||
parent.children.forEach(function(child) {
|
parent.children.forEach(function (child) {
|
||||||
if (child.id == selectedId) {
|
if (child.id == selectedId) {
|
||||||
parentCategory = parent;
|
parentCategory = parent;
|
||||||
childCategory = child;
|
childCategory = child;
|
||||||
@ -424,7 +543,7 @@
|
|||||||
var nextNumber = isInitialCategory ? total : total + 1;
|
var nextNumber = isInitialCategory ? total : total + 1;
|
||||||
var numberStr = nextNumber.toString().padStart(5, '0');
|
var numberStr = nextNumber.toString().padStart(5, '0');
|
||||||
var resourceNumber = parentCategory.number + childCategory.number + numberStr;
|
var resourceNumber = parentCategory.number + childCategory.number + numberStr;
|
||||||
|
|
||||||
// 设置资源编号
|
// 设置资源编号
|
||||||
$('input[name="number"]').val(resourceNumber);
|
$('input[name="number"]').val(resourceNumber);
|
||||||
}
|
}
|
||||||
@ -436,7 +555,7 @@
|
|||||||
var content = editor.getHtml();
|
var content = editor.getHtml();
|
||||||
var loadIndex = layer.load(2);
|
var loadIndex = layer.load(2);
|
||||||
data.field.content = content;
|
data.field.content = content;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo url("resources/edit"); ?>',
|
url: '<?php echo url("resources/edit"); ?>',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@ -457,7 +576,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 重置按钮点击事件
|
// 重置按钮点击事件
|
||||||
$('button[type="reset"]').on('click', function() {
|
$('button[type="reset"]').on('click', function () {
|
||||||
// 重新加载分类列表
|
// 重新加载分类列表
|
||||||
$.get('<?php echo url("resources/getcate"); ?>', function (res) {
|
$.get('<?php echo url("resources/getcate"); ?>', function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@ -471,10 +590,10 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('select[name="cate"]').html(html);
|
$('select[name="cate"]').html(html);
|
||||||
|
|
||||||
// 如果有资源数据,设置分类值
|
// 如果有资源数据,设置分类值
|
||||||
if (resourceData && resourceData.cate) {
|
if (resourceData && resourceData.cate) {
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
$('select[name="cate"]').val(resourceData.cate);
|
$('select[name="cate"]').val(resourceData.cate);
|
||||||
form.render('select');
|
form.render('select');
|
||||||
}, 100);
|
}, 100);
|
||||||
@ -493,7 +612,7 @@
|
|||||||
<script>
|
<script>
|
||||||
const { createEditor, createToolbar } = window.wangEditor
|
const { createEditor, createToolbar } = window.wangEditor
|
||||||
|
|
||||||
const editorConfig = {
|
const editorConfig = {
|
||||||
MENU_CONF: {},
|
MENU_CONF: {},
|
||||||
placeholder: '请输入内容...',
|
placeholder: '请输入内容...',
|
||||||
onChange(editor) {
|
onChange(editor) {
|
||||||
@ -505,7 +624,7 @@
|
|||||||
editorConfig.MENU_CONF['uploadImage'] = {
|
editorConfig.MENU_CONF['uploadImage'] = {
|
||||||
server: '<?php echo url("index/upload_img"); ?>',
|
server: '<?php echo url("index/upload_img"); ?>',
|
||||||
fieldName: 'file',
|
fieldName: 'file',
|
||||||
maxFileSize: 10 * 1024 * 1024, // 10M
|
maxFileSize: 50 * 1024 * 1024, // 50M
|
||||||
maxNumberOfFiles: 10,
|
maxNumberOfFiles: 10,
|
||||||
allowedFileTypes: ['image/*'],
|
allowedFileTypes: ['image/*'],
|
||||||
meta: {
|
meta: {
|
||||||
@ -515,7 +634,7 @@
|
|||||||
headers: {
|
headers: {
|
||||||
Accept: 'text/x-json'
|
Accept: 'text/x-json'
|
||||||
},
|
},
|
||||||
timeout: 5 * 1000, // 5s
|
timeout: 30 * 1000, // 30s
|
||||||
|
|
||||||
onBeforeUpload(file) {
|
onBeforeUpload(file) {
|
||||||
console.log('准备上传图片', file)
|
console.log('准备上传图片', file)
|
||||||
@ -536,17 +655,18 @@
|
|||||||
console.error('上传出错', file, err, res)
|
console.error('上传出错', file, err, res)
|
||||||
},
|
},
|
||||||
customInsert(res, insertFn) {
|
customInsert(res, insertFn) {
|
||||||
// res 即服务端的返回结果
|
// 只使用返回的url字段,并确保使用完整的URL
|
||||||
if (res.code === 0 && res.data) {
|
if (res.code === 0 && res.url) {
|
||||||
// 从res.data中获取src字段
|
// 如果URL不是以http开头,添加https://
|
||||||
const url = String(res.data.src || '');
|
let imageUrl = res.url;
|
||||||
if (url) {
|
if (!imageUrl.startsWith('http')) {
|
||||||
insertFn(url);
|
imageUrl = 'https://' + imageUrl;
|
||||||
} else {
|
|
||||||
layer.msg('图片地址无效', { icon: 2 });
|
|
||||||
}
|
}
|
||||||
|
// 移除可能存在的重复域名和路径
|
||||||
|
imageUrl = imageUrl.replace(/^https?:\/\/[^\/]+\/admin\/resources\//, 'https://www.yunzer.cn/');
|
||||||
|
insertFn(imageUrl);
|
||||||
} else {
|
} else {
|
||||||
layer.msg('图片上传失败', { icon: 2 });
|
layer.msg('图片上传失败:' + (res.msg || '未知错误'), { icon: 2 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -573,4 +693,273 @@
|
|||||||
function goBack() {
|
function goBack() {
|
||||||
window.location.href = '<?php echo url("resources/lists"); ?>';
|
window.location.href = '<?php echo url("resources/lists"); ?>';
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const imageUpload = document.getElementById('imageUpload');
|
||||||
|
const imagePreview = document.getElementById('imagePreview');
|
||||||
|
const imageProgress = document.getElementById('imageProgress');
|
||||||
|
const progressBar = imageProgress.querySelector('.progress-bar');
|
||||||
|
const imagesInput = document.getElementById('images');
|
||||||
|
|
||||||
|
// 处理图片上传
|
||||||
|
imageUpload.addEventListener('click', function () {
|
||||||
|
const input = document.createElement('input');
|
||||||
|
input.type = 'file';
|
||||||
|
input.multiple = true;
|
||||||
|
input.accept = 'image/*';
|
||||||
|
|
||||||
|
input.onchange = function (e) {
|
||||||
|
const files = e.target.files;
|
||||||
|
if (files.length === 0) return;
|
||||||
|
|
||||||
|
imageProgress.style.display = 'block';
|
||||||
|
let uploadedCount = 0;
|
||||||
|
|
||||||
|
Array.from(files).forEach(file => {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
|
||||||
|
fetch('<?php echo url("index/upload_img"); ?>', {
|
||||||
|
method: 'POST',
|
||||||
|
body: formData
|
||||||
|
})
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
addImagePreview(res.data);
|
||||||
|
updateImagesInput();
|
||||||
|
} else {
|
||||||
|
alert('上传失败:' + res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('上传错误:', error);
|
||||||
|
alert('上传出错');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
uploadedCount++;
|
||||||
|
const progress = (uploadedCount / files.length) * 100;
|
||||||
|
progressBar.style.width = progress + '%';
|
||||||
|
|
||||||
|
if (uploadedCount === files.length) {
|
||||||
|
setTimeout(() => {
|
||||||
|
imageProgress.style.display = 'none';
|
||||||
|
progressBar.style.width = '0%';
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
input.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 添加图片预览
|
||||||
|
function addImagePreview(imageUrl) {
|
||||||
|
const div = document.createElement('div');
|
||||||
|
div.className = 'image-preview-item';
|
||||||
|
div.dataset.src = imageUrl;
|
||||||
|
|
||||||
|
div.innerHTML = `
|
||||||
|
<img src="${imageUrl}" alt="已上传图片">
|
||||||
|
<div class="image-preview-overlay">
|
||||||
|
<button type="button" class="btn btn-danger btn-sm delete-image">
|
||||||
|
<i class="fas fa-trash"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<p class="image-filename">${imageUrl.split('/').pop()}</p>
|
||||||
|
`;
|
||||||
|
|
||||||
|
imagePreview.appendChild(div);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新隐藏输入框的值
|
||||||
|
function updateImagesInput() {
|
||||||
|
const images = Array.from(imagePreview.querySelectorAll('.image-preview-item'))
|
||||||
|
.map(item => item.dataset.src);
|
||||||
|
imagesInput.value = images.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除图片
|
||||||
|
imagePreview.addEventListener('click', function (e) {
|
||||||
|
if (e.target.closest('.delete-image')) {
|
||||||
|
const item = e.target.closest('.image-preview-item');
|
||||||
|
item.remove();
|
||||||
|
updateImagesInput();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 图片预览功能
|
||||||
|
window.previewImage = function(imageUrl) {
|
||||||
|
layer.photos({
|
||||||
|
photos: {
|
||||||
|
"data": [{
|
||||||
|
"src": imageUrl,
|
||||||
|
"alt": "图片预览"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
anim: 5
|
||||||
|
});
|
||||||
|
};
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.image-upload-container {
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-preview-container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
||||||
|
gap: 15px;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-preview-item {
|
||||||
|
position: relative;
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-preview-item img {
|
||||||
|
width: 100%;
|
||||||
|
height: 150px;
|
||||||
|
object-fit: cover;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-preview-overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.3s;
|
||||||
|
z-index: 1;
|
||||||
|
/* 添加 z-index */
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-preview-item:hover .image-preview-overlay {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-filename {
|
||||||
|
margin: 5px 0;
|
||||||
|
font-size: 0.9em;
|
||||||
|
text-align: center;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-progress {
|
||||||
|
margin-top: 10px;
|
||||||
|
height: 4px;
|
||||||
|
background: #f0f0f0;
|
||||||
|
border-radius: 2px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
height: 100%;
|
||||||
|
background: #007bff;
|
||||||
|
transition: width 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
padding: 8px 16px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
transition: all 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background: #007bff;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger {
|
||||||
|
background: #dc3545;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger:hover {
|
||||||
|
background: #c82333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-sm {
|
||||||
|
padding: 4px 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-image {
|
||||||
|
/* background: #dc3545; */
|
||||||
|
/* color: white; */
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
z-index: 2;
|
||||||
|
/* 确保按钮在悬停层之上 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-image i {
|
||||||
|
font-size: 40px;
|
||||||
|
margin-right: 4px;
|
||||||
|
/* 添加图标右边距 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-container {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-left {
|
||||||
|
width: 35%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-right {
|
||||||
|
width: 65%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片列表表格样式 */
|
||||||
|
.image-list-table {
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-thumbnail {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: transform 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-thumbnail:hover {
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-thumbnail img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<?php /*a:1:{s:49:"E:\Demo\PHP\yunzer\app\admin\view\index\index.php";i:1747649140;}*/ ?>
|
<?php /*a:1:{s:49:"E:\Demo\PHP\yunzer\app\admin\view\index\index.php";i:1766587447;}*/ ?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?php /*a:2:{s:53:"E:\Demo\PHP\yunzer\app\admin\view\resources\lists.php";i:1747755163;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1746890051;}*/ ?>
|
<?php /*a:2:{s:53:"E:\Demo\PHP\yunzer\app\admin\view\resources\lists.php";i:1766587447;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1766587447;}*/ ?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
<?php /*a:4:{s:49:"E:\Demo\PHP\yunzer\app\index\view\index\index.php";i:1746890051;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\header.php";i:1749125154;s:52:"E:\Demo\PHP\yunzer\app\index\view\component\main.php";i:1748359853;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\footer.php";i:1749138336;}*/ ?>
|
<?php /*a:4:{s:49:"E:\Demo\PHP\yunzer\app\index\view\index\index.php";i:1766587447;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\header.php";i:1766587447;s:52:"E:\Demo\PHP\yunzer\app\index\view\component\main.php";i:1766587447;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\footer.php";i:1766587447;}*/ ?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
@ -10,13 +10,32 @@
|
|||||||
<link rel="stylesheet" href="/static/css/style.css">
|
<link rel="stylesheet" href="/static/css/style.css">
|
||||||
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
|
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="/static/css/fontawesome.css">
|
<link rel="stylesheet" href="/static/css/fontawesome.css">
|
||||||
|
<link rel="stylesheet" href="/static/css/all.min.css">
|
||||||
|
|
||||||
<script src="/static/layui/layui.js" charset="utf-8"></script>
|
<script src="/static/layui/layui.js" charset="utf-8"></script>
|
||||||
<script src="/static/js/bootstrap.bundle.js"></script>
|
<script src="/static/js/bootstrap.bundle.js"></script>
|
||||||
|
<script src="/static/js/all.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* 商业使用授权协议
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 [云泽网]. 保留所有权利.
|
||||||
|
*
|
||||||
|
* 本软件仅供评估使用。任何商业用途必须获得书面授权许可。
|
||||||
|
* 未经授权商业使用本软件属于侵权行为,将承担法律责任。
|
||||||
|
*
|
||||||
|
* 授权购买请联系: 357099073@qq.com
|
||||||
|
* 官方网站: https://www.yunzer.cn
|
||||||
|
*
|
||||||
|
* 评估用户须知:
|
||||||
|
* 1. 禁止移除版权声明
|
||||||
|
* 2. 禁止用于生产环境
|
||||||
|
* 3. 禁止转售或分发
|
||||||
|
*/
|
||||||
|
|
||||||
// 获取当前登录状态
|
// 获取当前登录状态
|
||||||
$isLoggedIn = false;
|
$isLoggedIn = false;
|
||||||
$userInfo = [
|
$userInfo = [
|
||||||
@ -87,6 +106,22 @@ $loginStatus = [
|
|||||||
<li><a href="/index/game/index?cateid=8">游戏下载</a></li>
|
<li><a href="/index/game/index?cateid=8">游戏下载</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="main-menu__search">
|
||||||
|
<i class="layui-icon layui-icon-search search-icon" id="mainSearchIcon"></i>
|
||||||
|
</div>
|
||||||
|
<!-- 搜索蒙版 -->
|
||||||
|
<div class="search-mask" id="searchMask" style="">
|
||||||
|
<div class="search-container">
|
||||||
|
<div class="search-box">
|
||||||
|
<select id="searchType" class="search-type">
|
||||||
|
<option value="articles">文章</option>
|
||||||
|
<option value="resources">资源</option>
|
||||||
|
</select>
|
||||||
|
<input type="text" id="searchInput" placeholder="请输入搜索关键词">
|
||||||
|
<button class="search-btn" id="searchBtn">搜索</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="main-menu__right">
|
<div class="main-menu__right">
|
||||||
<div class="username">
|
<div class="username">
|
||||||
<?php if ($userInfo['is_login']): ?>
|
<?php if ($userInfo['is_login']): ?>
|
||||||
@ -143,14 +178,17 @@ $loginStatus = [
|
|||||||
</div>
|
</div>
|
||||||
<div class="sticky-nav__menu">
|
<div class="sticky-nav__menu">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/">首页</a></li>
|
<li><a href="/">首页</a></li>
|
||||||
<li><a href="/index/articles/index?cateid=1">站点资讯</a></li>
|
<li><a href="/index/articles/index?cateid=1">站点资讯</a></li>
|
||||||
<li><a href="/index/articles/index?cateid=3">技术文章</a></li>
|
<li><a href="/index/articles/index?cateid=3">技术文章</a></li>
|
||||||
<li><a href="/index/program/index?cateid=2">办公资源</a></li>
|
<li><a href="/index/program/index?cateid=2">办公资源</a></li>
|
||||||
<li><a href="/index/program/index?cateid=1">程序下载</a></li>
|
<li><a href="/index/program/index?cateid=1">程序下载</a></li>
|
||||||
<li><a href="/index/game/index?cateid=8">游戏下载</a></li>
|
<li><a href="/index/game/index?cateid=8">游戏下载</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="sticky-nav__search">
|
||||||
|
<i class="layui-icon layui-icon-search search-icon" id="stickySearchIcon"></i>
|
||||||
|
</div>
|
||||||
<div class="sticky-nav__right">
|
<div class="sticky-nav__right">
|
||||||
<div class="main-menu__right">
|
<div class="main-menu__right">
|
||||||
<div class="username">
|
<div class="username">
|
||||||
@ -193,217 +231,6 @@ $loginStatus = [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
|
||||||
/* 用户头像样式 */
|
|
||||||
#userAvatar {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
#userAvatar:hover {
|
|
||||||
transform: scale(1.05);
|
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 下拉菜单容器 */
|
|
||||||
.user-dropdown {
|
|
||||||
position: absolute;
|
|
||||||
top: 50px;
|
|
||||||
right: 0;
|
|
||||||
width: 160px;
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
||||||
opacity: 0;
|
|
||||||
visibility: hidden;
|
|
||||||
transform: translateY(-10px);
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
z-index: 9999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-dropdown.show {
|
|
||||||
opacity: 1;
|
|
||||||
visibility: visible;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 下拉菜单列表 */
|
|
||||||
.user-dropdown ul {
|
|
||||||
margin: 0;
|
|
||||||
padding: 5px 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 下拉菜单项 */
|
|
||||||
.user-dropdown li {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 下拉菜单链接 */
|
|
||||||
.user-dropdown li a {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 10px 15px;
|
|
||||||
color: #333;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 下拉菜单图标 */
|
|
||||||
.user-dropdown li a i {
|
|
||||||
margin-right: 10px;
|
|
||||||
font-size: 16px;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 下拉菜单文字 */
|
|
||||||
.user-dropdown li a span {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 下拉菜单悬停效果 */
|
|
||||||
.user-dropdown li a:hover {
|
|
||||||
background: #f5f5f5;
|
|
||||||
color: #1E9FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-dropdown li a:hover i {
|
|
||||||
color: #1E9FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 分隔线 */
|
|
||||||
.user-dropdown li:not(:last-child) {
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#userDropdownSticky a {
|
|
||||||
color: #0d6efd !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Banner样式 */
|
|
||||||
.banner-content {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-image {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-image img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-text {
|
|
||||||
position: absolute;
|
|
||||||
top: 40%;
|
|
||||||
left: 10%;
|
|
||||||
z-index: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-text a {
|
|
||||||
text-decoration: none;
|
|
||||||
margin-top: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-title {
|
|
||||||
font-size: 4em;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-desc {
|
|
||||||
font-size: 2em;
|
|
||||||
font-weight: 400;
|
|
||||||
max-width: 800px;
|
|
||||||
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-btn {
|
|
||||||
background: #fff;
|
|
||||||
color: #000;
|
|
||||||
padding: 10px 20px;
|
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-btn:hover {
|
|
||||||
background: #000;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-slider {
|
|
||||||
width: 100%;
|
|
||||||
height: 86vh;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-container {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-slide {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-slide img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
/* 关键:等比缩放并铺满 */
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layui-carousel {
|
|
||||||
background: #f8f8f8;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 确保轮播容器和项目的高度正确 */
|
|
||||||
#test10,
|
|
||||||
#test10 [carousel-item],
|
|
||||||
#test10 [carousel-item]>* {
|
|
||||||
height: 86vh !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#test10 [carousel-item]>* {
|
|
||||||
background: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-menu__right {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.username {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 在页面加载时立即执行
|
// 在页面加载时立即执行
|
||||||
(function () {
|
(function () {
|
||||||
@ -435,8 +262,97 @@ $loginStatus = [
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
layui.use(['carousel', 'form', 'layer'], function () {
|
// 搜索功能相关代码
|
||||||
var carousel = layui.carousel, form = layui.form, layer = layui.layer, $ = layui.$;
|
layui.use(['layer'], function () {
|
||||||
|
var layer = layui.layer;
|
||||||
|
var $ = layui.jquery;
|
||||||
|
|
||||||
|
// 执行搜索
|
||||||
|
function executeSearch() {
|
||||||
|
var searchInput = document.getElementById('searchInput');
|
||||||
|
if (!searchInput) {
|
||||||
|
layer.msg('搜索组件初始化失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var keyword = searchInput.value.trim();
|
||||||
|
var type = document.getElementById('searchType').value;
|
||||||
|
|
||||||
|
if (!keyword) {
|
||||||
|
layer.msg('请输入搜索关键词');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转到统一的搜索结果页面
|
||||||
|
window.location.href = '/index/search/index?keyword=' + encodeURIComponent(keyword) + '&type=' + type;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绑定事件
|
||||||
|
$(function() {
|
||||||
|
var searchMask = $('#searchMask');
|
||||||
|
var searchInput = $('#searchInput');
|
||||||
|
var searchBtn = $('#searchBtn');
|
||||||
|
var mainSearchIcon = $('#mainSearchIcon');
|
||||||
|
var stickySearchIcon = $('#stickySearchIcon');
|
||||||
|
|
||||||
|
// 显示搜索框
|
||||||
|
function showSearch() {
|
||||||
|
searchMask.addClass('show');
|
||||||
|
setTimeout(function() {
|
||||||
|
searchInput.focus();
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 隐藏搜索框
|
||||||
|
function hideSearch() {
|
||||||
|
searchMask.removeClass('show');
|
||||||
|
searchInput.val('');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绑定搜索图标点击事件
|
||||||
|
mainSearchIcon.on('click', showSearch);
|
||||||
|
stickySearchIcon.on('click', showSearch);
|
||||||
|
|
||||||
|
// 绑定搜索按钮点击事件
|
||||||
|
searchBtn.on('click', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
executeSearch();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 绑定回车键搜索
|
||||||
|
searchInput.on('keypress', function(e) {
|
||||||
|
if (e.which === 13) {
|
||||||
|
e.preventDefault();
|
||||||
|
executeSearch();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 点击遮罩层关闭搜索框
|
||||||
|
searchMask.on('click', function(e) {
|
||||||
|
if ($(e.target).hasClass('search-mask')) {
|
||||||
|
hideSearch();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 绑定ESC键关闭搜索框
|
||||||
|
$(document).on('keydown', function(e) {
|
||||||
|
if (e.keyCode === 27 && searchMask.hasClass('show')) {
|
||||||
|
hideSearch();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 输入框获得焦点时选中所有文本
|
||||||
|
searchInput.on('focus', function() {
|
||||||
|
this.select();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 其他功能相关代码
|
||||||
|
layui.use(['carousel', 'form'], function () {
|
||||||
|
var carousel = layui.carousel;
|
||||||
|
var form = layui.form;
|
||||||
|
var $ = layui.$;
|
||||||
|
|
||||||
// 检查本地存储并自动登录
|
// 检查本地存储并自动登录
|
||||||
function checkAutoLogin() {
|
function checkAutoLogin() {
|
||||||
@ -690,6 +606,326 @@ $loginStatus = [
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* 用户头像样式 */
|
||||||
|
#userAvatar {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#userAvatar:hover {
|
||||||
|
transform: scale(1.05);
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 下拉菜单容器 */
|
||||||
|
.user-dropdown {
|
||||||
|
position: absolute;
|
||||||
|
top: 50px;
|
||||||
|
right: 0;
|
||||||
|
width: 160px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
transform: translateY(-10px);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-dropdown.show {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 下拉菜单列表 */
|
||||||
|
.user-dropdown ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 5px 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 下拉菜单项 */
|
||||||
|
.user-dropdown li {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 下拉菜单链接 */
|
||||||
|
.user-dropdown li a {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px 15px;
|
||||||
|
color: #333;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 下拉菜单图标 */
|
||||||
|
.user-dropdown li a i {
|
||||||
|
margin-right: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 下拉菜单文字 */
|
||||||
|
.user-dropdown li a span {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 下拉菜单悬停效果 */
|
||||||
|
.user-dropdown li a:hover {
|
||||||
|
background: #f5f5f5;
|
||||||
|
color: #1E9FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-dropdown li a:hover i {
|
||||||
|
color: #1E9FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 分隔线 */
|
||||||
|
.user-dropdown li:not(:last-child) {
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#userDropdownSticky a {
|
||||||
|
color: #0d6efd !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Banner样式 */
|
||||||
|
.banner-content {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-image {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-image img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
object-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-text {
|
||||||
|
position: absolute;
|
||||||
|
top: 40%;
|
||||||
|
left: 10%;
|
||||||
|
z-index: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-text a {
|
||||||
|
text-decoration: none;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-title {
|
||||||
|
font-size: 4em;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-desc {
|
||||||
|
font-size: 2em;
|
||||||
|
font-weight: 400;
|
||||||
|
max-width: 800px;
|
||||||
|
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-btn {
|
||||||
|
background: #fff;
|
||||||
|
color: #000;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-btn:hover {
|
||||||
|
background: #000;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-slider {
|
||||||
|
width: 100%;
|
||||||
|
height: 86vh;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-slide {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-slide img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
/* 关键:等比缩放并铺满 */
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-carousel {
|
||||||
|
background: #f8f8f8;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 确保轮播容器和项目的高度正确 */
|
||||||
|
#test10,
|
||||||
|
#test10 [carousel-item],
|
||||||
|
#test10 [carousel-item]>* {
|
||||||
|
height: 86vh !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#test10 [carousel-item]>* {
|
||||||
|
background: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-menu__right {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.username {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-icon {
|
||||||
|
font-size: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #333;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-icon:hover {
|
||||||
|
color: #1e9fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0.7);
|
||||||
|
z-index: 9999;
|
||||||
|
display: none;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-mask.show {
|
||||||
|
display: flex;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container {
|
||||||
|
position: relative;
|
||||||
|
width: 80%;
|
||||||
|
padding: 20px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
transform: translateY(-20px);
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-mask.show .search-container {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 60px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 30px;
|
||||||
|
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box input {
|
||||||
|
flex: 1;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 20px;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box button {
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 30px;
|
||||||
|
border: none;
|
||||||
|
background: #1E9FFF;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box button:hover {
|
||||||
|
background: #1a8fe6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-type {
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 15px;
|
||||||
|
border: none;
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
background: #f8f8f8;
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
outline: none;
|
||||||
|
appearance: none;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right 10px center;
|
||||||
|
background-size: 12px;
|
||||||
|
padding-right: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-type:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-type:focus {
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<main class="main-content">
|
<main class="main-content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- 站点资讯模块 -->
|
<!-- 站点资讯模块 -->
|
||||||
@ -706,7 +942,7 @@ $loginStatus = [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more-btn" onclick="window.open('/index/articles/index?cateid=1', '_blank')">更多</div>
|
<div class="more-btn" onclick="window.open('/index/articles/index?cateid=3', '_blank')">更多</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product-list" id="webArticlesList">
|
<div class="product-list" id="webArticlesList">
|
||||||
<!-- 文章将通过JavaScript动态加载 -->
|
<!-- 文章将通过JavaScript动态加载 -->
|
||||||
@ -748,7 +984,7 @@ $loginStatus = [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more-btn" onclick="window.open('/index/program/index?cateid=2', '_blank')">更多</div>
|
<div class="more-btn" onclick="window.open('/index/resources/index?cateid=2', '_blank')">更多</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product-list" id="resourcesDownloadList">
|
<div class="product-list" id="resourcesDownloadList">
|
||||||
<!-- 文章将通过JavaScript动态加载 -->
|
<!-- 文章将通过JavaScript动态加载 -->
|
||||||
@ -769,7 +1005,7 @@ $loginStatus = [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more-btn" onclick="window.open('/index/program/index?cateid=1', '_blank')">更多</div>
|
<div class="more-btn" onclick="window.open('/index/resources/index?cateid=1', '_blank')">更多</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product-list" id="programDownloadList">
|
<div class="product-list" id="programDownloadList">
|
||||||
<!-- 程序将通过JavaScript动态加载 -->
|
<!-- 程序将通过JavaScript动态加载 -->
|
||||||
@ -790,7 +1026,7 @@ $loginStatus = [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more-btn" onclick="window.open('/index/game/index?cateid=8', '_blank')">更多</div>
|
<div class="more-btn" onclick="window.open('/index/resources/index?cateid=8', '_blank')">更多</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product-list" id="gameDownloadList">
|
<div class="product-list" id="gameDownloadList">
|
||||||
<!-- 游戏将通过JavaScript动态加载 -->
|
<!-- 游戏将通过JavaScript动态加载 -->
|
||||||
@ -982,17 +1218,17 @@ $loginStatus = [
|
|||||||
function bindTabEvents(moduleId) {
|
function bindTabEvents(moduleId) {
|
||||||
const tabItems = document.querySelectorAll(`#${moduleId} .tab-item`);
|
const tabItems = document.querySelectorAll(`#${moduleId} .tab-item`);
|
||||||
tabItems.forEach(tab => {
|
tabItems.forEach(tab => {
|
||||||
tab.addEventListener('click', function() {
|
tab.addEventListener('click', function () {
|
||||||
// 移除所有active类
|
// 移除所有active类
|
||||||
tabItems.forEach(item => item.classList.remove('active'));
|
tabItems.forEach(item => item.classList.remove('active'));
|
||||||
// 添加active类到当前点击的tab
|
// 添加active类到当前点击的tab
|
||||||
this.classList.add('active');
|
this.classList.add('active');
|
||||||
|
|
||||||
// 获取选中的分类ID
|
// 获取选中的分类ID
|
||||||
const selectedCategoryId = this.getAttribute('data-tab');
|
const selectedCategoryId = this.getAttribute('data-tab');
|
||||||
|
|
||||||
// 根据不同模块加载对应数据
|
// 根据不同模块加载对应数据
|
||||||
switch(moduleId) {
|
switch (moduleId) {
|
||||||
case 'opencourse':
|
case 'opencourse':
|
||||||
loadCategoryArticles(selectedCategoryId, 'webArticlesList');
|
loadCategoryArticles(selectedCategoryId, 'webArticlesList');
|
||||||
break;
|
break;
|
||||||
@ -1079,7 +1315,7 @@ $loginStatus = [
|
|||||||
// 创建文章HTML
|
// 创建文章HTML
|
||||||
function createArticleHtml(article) {
|
function createArticleHtml(article) {
|
||||||
if (!article) return '';
|
if (!article) return '';
|
||||||
|
|
||||||
// 格式化日期
|
// 格式化日期
|
||||||
const publishDate = new Date(article.publishdate * 1000);
|
const publishDate = new Date(article.publishdate * 1000);
|
||||||
const formattedDate = publishDate.toLocaleDateString('zh-CN', {
|
const formattedDate = publishDate.toLocaleDateString('zh-CN', {
|
||||||
@ -1087,7 +1323,7 @@ $loginStatus = [
|
|||||||
month: '2-digit',
|
month: '2-digit',
|
||||||
day: '2-digit'
|
day: '2-digit'
|
||||||
});
|
});
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<div class="opencourse product-item" onclick="window.open('/index/articles/detail?id=${article.id || ''}', '_blank')">
|
<div class="opencourse product-item" onclick="window.open('/index/articles/detail?id=${article.id || ''}', '_blank')">
|
||||||
<div class="video">
|
<div class="video">
|
||||||
@ -1123,7 +1359,7 @@ $loginStatus = [
|
|||||||
// 创建资源HTML
|
// 创建资源HTML
|
||||||
function createResourceHtml(resource) {
|
function createResourceHtml(resource) {
|
||||||
if (!resource) return '';
|
if (!resource) return '';
|
||||||
|
|
||||||
// 格式化日期
|
// 格式化日期
|
||||||
const uploadDate = new Date(resource.uploaddate * 1000);
|
const uploadDate = new Date(resource.uploaddate * 1000);
|
||||||
const formattedDate = uploadDate.toLocaleDateString('zh-CN', {
|
const formattedDate = uploadDate.toLocaleDateString('zh-CN', {
|
||||||
@ -1131,7 +1367,7 @@ $loginStatus = [
|
|||||||
month: '2-digit',
|
month: '2-digit',
|
||||||
day: '2-digit'
|
day: '2-digit'
|
||||||
});
|
});
|
||||||
|
|
||||||
// 格式化文件大小
|
// 格式化文件大小
|
||||||
const formatFileSize = (bytes) => {
|
const formatFileSize = (bytes) => {
|
||||||
if (bytes === 0) return '0 B';
|
if (bytes === 0) return '0 B';
|
||||||
@ -1178,7 +1414,7 @@ $loginStatus = [
|
|||||||
// 创建程序HTML
|
// 创建程序HTML
|
||||||
function createProgramHtml(program) {
|
function createProgramHtml(program) {
|
||||||
if (!program) return '';
|
if (!program) return '';
|
||||||
|
|
||||||
// 格式化日期
|
// 格式化日期
|
||||||
const createDate = new Date(program.create_time * 1000);
|
const createDate = new Date(program.create_time * 1000);
|
||||||
const formattedDate = createDate.toLocaleDateString('zh-CN', {
|
const formattedDate = createDate.toLocaleDateString('zh-CN', {
|
||||||
@ -1186,11 +1422,11 @@ $loginStatus = [
|
|||||||
month: '2-digit',
|
month: '2-digit',
|
||||||
day: '2-digit'
|
day: '2-digit'
|
||||||
});
|
});
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<div class="opencourse product-item" onclick="window.open('/index/program/detail?id=${program.id || ''}', '_blank')">
|
<div class="opencourse product-item" onclick="window.open('/index/resources/detail?id=${program.id || ''}', '_blank')">
|
||||||
<div class="video">
|
<div class="video">
|
||||||
<img src="${program.icon || '/static/images/default-program.png'}" alt="" class="cover">
|
<img src="${program.icon || ''}" alt="" class="cover">
|
||||||
</div>
|
</div>
|
||||||
<div class="introduction">
|
<div class="introduction">
|
||||||
<div class="title">${program.title || '无标题'}</div>
|
<div class="title">${program.title || '无标题'}</div>
|
||||||
@ -1266,9 +1502,9 @@ $loginStatus = [
|
|||||||
// 创建游戏HTML
|
// 创建游戏HTML
|
||||||
function createGameHtml(game) {
|
function createGameHtml(game) {
|
||||||
if (!game) return '';
|
if (!game) return '';
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<div class="opencourse product-item" onclick="window.open('/index/game/detail?id=${game.id || ''}', '_blank')">
|
<div class="opencourse product-item" onclick="window.open('/index/resources/detail?id=${game.id || ''}', '_blank')">
|
||||||
<div class="video">
|
<div class="video">
|
||||||
<img src="${game.icon || '/static/images/default-game.png'}" alt="" class="cover">
|
<img src="${game.icon || '/static/images/default-game.png'}" alt="" class="cover">
|
||||||
</div>
|
</div>
|
||||||
@ -1307,7 +1543,7 @@ $loginStatus = [
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 页面加载完成后执行
|
// 页面加载完成后执行
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
loadWebArticles();
|
loadWebArticles();
|
||||||
loadTechArticles();
|
loadTechArticles();
|
||||||
loadResources();
|
loadResources();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user