前端应用文章模块并显示
@ -13,31 +13,21 @@ class Article extends Base
|
||||
// 文章列表
|
||||
public function articlelist()
|
||||
{
|
||||
if (Request::isPost()) {
|
||||
$lists = Db::table('yz_article')
|
||||
->where('delete_time', null)
|
||||
->where('status', '<>', 3)
|
||||
->order('id DESC')
|
||||
->select()
|
||||
->each(function ($item) {
|
||||
$item['create_time'] = date('Y-m-d H:i:s', strtotime($item['create_time']));
|
||||
$item['publishdate'] = $item['publishdate'] ? date('Y-m-d H:i:s', strtotime($item['publishdate'])) : '';
|
||||
return $item;
|
||||
});
|
||||
return json(['code' => 0, 'msg' => '获取成功', 'data' => $lists]);
|
||||
} else {
|
||||
$lists = Db::table('yz_article')
|
||||
->where('delete_time', null)
|
||||
->where('status', '<>', 3)
|
||||
->order('id DESC')
|
||||
->select()
|
||||
->each(function ($item) {
|
||||
$item['create_time'] = date('Y-m-d H:i:s', strtotime($item['create_time']));
|
||||
return $item;
|
||||
});
|
||||
View::assign(['lists' => $lists]);
|
||||
return View::fetch();
|
||||
}
|
||||
$lists = Db::table('yz_article')
|
||||
->where('delete_time', null)
|
||||
->where('status', '<>', 3)
|
||||
->order('id DESC')
|
||||
->select()
|
||||
->each(function ($item) {
|
||||
$item['cate'] = Db::table('yz_article_category')->where('id', $item['cate'])->value('name');
|
||||
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
|
||||
$item['publishdate'] = $item['publishdate'] ? date('Y-m-d H:i:s', $item['publishdate']) : '';
|
||||
return $item;
|
||||
});
|
||||
View::assign([
|
||||
'lists' => $lists
|
||||
]);
|
||||
return View::fetch();
|
||||
}
|
||||
|
||||
// 添加文章
|
||||
@ -52,8 +42,8 @@ class Article extends Base
|
||||
'author' => input('post.author'),
|
||||
'desc' => input('post.desc'),
|
||||
'status' => input('post.status', 2),
|
||||
'publishdate' => date('Y-m-d H:i:s', time()),
|
||||
'create_time' => date('Y-m-d H:i:s', time())
|
||||
'publishdate' => time(),
|
||||
'create_time' => time()
|
||||
];
|
||||
|
||||
$insert = Db::table('yz_article')->insert($data);
|
||||
@ -66,7 +56,7 @@ class Article extends Base
|
||||
->order('id DESC')
|
||||
->select()
|
||||
->each(function ($item, $key) {
|
||||
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
|
||||
$item['create_time'] = time();
|
||||
return $item;
|
||||
});
|
||||
View::assign([
|
||||
@ -80,28 +70,46 @@ class Article extends Base
|
||||
public function edit()
|
||||
{
|
||||
if (Request::isPost()) {
|
||||
$article_id = input('post.article_id');
|
||||
$id = input('get.id');
|
||||
$data = [
|
||||
'title' => input('post.title'),
|
||||
'cate' => input('post.cate'),
|
||||
'image' => input('post.image'),
|
||||
'content' => input('post.content'),
|
||||
'author' => input('post.author'),
|
||||
'status' => input('post.status', 1),
|
||||
'desc' => input('post.desc'),
|
||||
'status' => input('post.status', 2),
|
||||
'update_time' => time()
|
||||
];
|
||||
|
||||
$update = Db::table('yz_article')
|
||||
->where('article_id', $article_id)
|
||||
->update($data);
|
||||
|
||||
if ($update === false) {
|
||||
return json(['code' => 1, 'msg' => '更新失败', 'data' => []]);
|
||||
}
|
||||
return json(['code' => 0, 'msg' => '更新成功', 'data' => []]);
|
||||
$update = Db::table('yz_article')->where('id', $id)->update($data);
|
||||
return json(['code' => $update === false ? 1 : 0, 'msg' => $update === false ? '更新失败' : '更新成功', 'data' => []]);
|
||||
} else {
|
||||
$article_id = input('get.article_id');
|
||||
$info = Db::table('yz_article')->where('article_id', $article_id)->find();
|
||||
$id = input('get.id');
|
||||
$info = Db::table('yz_article')->where('id', $id)->find();
|
||||
if ($info === null) {
|
||||
return json(['code' => 1, 'msg' => '文章不存在', 'data' => []]);
|
||||
}
|
||||
|
||||
$cates = Db::table('yz_article_category')
|
||||
->where('delete_time', null)
|
||||
->where('status', 1)
|
||||
->order('sort asc, id asc')
|
||||
->select()
|
||||
->toArray();
|
||||
|
||||
$info['content'] = !empty($info['content']) ? htmlspecialchars_decode(str_replace(["\r\n", "\r", "\n"], '', addslashes($info['content']))) : '';
|
||||
|
||||
$currentCate = Db::table('yz_article_category')
|
||||
->where('id', $info['cate'])
|
||||
->where('delete_time', null)
|
||||
->where('status', 1)
|
||||
->find();
|
||||
$info['cate_name'] = $currentCate ? $currentCate['name'] : '';
|
||||
|
||||
View::assign([
|
||||
'info' => $info
|
||||
'info' => $info,
|
||||
'cates' => $cates
|
||||
]);
|
||||
return View::fetch();
|
||||
}
|
||||
@ -112,7 +120,7 @@ class Article extends Base
|
||||
{
|
||||
$id = input('post.id');
|
||||
$data = [
|
||||
'delete_time' => date('Y-m-d H:i:s', time()),
|
||||
'delete_time' => time(),
|
||||
];
|
||||
$delete = Db::table('yz_article')->where('id', $id)->update($data);
|
||||
if ($delete === false) {
|
||||
@ -136,7 +144,11 @@ class Article extends Base
|
||||
->where('status', 1)
|
||||
->order('id asc')
|
||||
->page($page, $limit)
|
||||
->select();
|
||||
->select()
|
||||
->each(function ($item) {
|
||||
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
|
||||
return $item;
|
||||
});
|
||||
return json(['code' => 0, 'msg' => '获取成功', 'data' => $lists]);
|
||||
} else {
|
||||
// 获取分类列表
|
||||
@ -144,7 +156,11 @@ class Article extends Base
|
||||
->where('delete_time', null)
|
||||
->where('status', 1)
|
||||
->order('id asc')
|
||||
->select();
|
||||
->select()
|
||||
->each(function ($item) {
|
||||
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
|
||||
return $item;
|
||||
});
|
||||
|
||||
View::assign([
|
||||
'lists' => $lists
|
||||
@ -192,7 +208,7 @@ class Article extends Base
|
||||
{
|
||||
if (Request::isPost()) {
|
||||
// 将时间戳转换为 'Y-m-d H:i:s' 格式
|
||||
$currentDateTime = date('Y-m-d H:i:s');
|
||||
$currentDateTime = time();
|
||||
$data = [
|
||||
'name' => input('post.name'),
|
||||
'cid' => input('post.cid'),
|
||||
@ -211,7 +227,7 @@ class Article extends Base
|
||||
->order('id DESC')
|
||||
->select()
|
||||
->each(function ($item, $key) {
|
||||
$item['create_time'] = date('Y-m-d H:i:s', strtotime($item['create_time']));
|
||||
$item['create_time'] = time();
|
||||
return $item;
|
||||
});
|
||||
View::assign([
|
||||
@ -231,7 +247,7 @@ class Article extends Base
|
||||
'cid' => input('post.cid'),
|
||||
'sort' => input('post.sort', 0),
|
||||
'status' => input('post.status', 1),
|
||||
'update_time' => date('Y-m-d H:i:s')
|
||||
'update_time' => time()
|
||||
];
|
||||
|
||||
$update = Db::table('yz_article_category')
|
||||
@ -269,7 +285,7 @@ class Article extends Base
|
||||
|
||||
$delete = Db::table('yz_article_category')
|
||||
->where('id', $id)
|
||||
->update(['delete_time' => date('Y-m-d H:i:s')]);
|
||||
->update(['delete_time' => time()]);
|
||||
|
||||
if ($delete === false) {
|
||||
return json(['code' => 1, 'msg' => '删除失败', 'data' => []]);
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
<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: 500px;"><!-- 编辑器 --></div>
|
||||
<div id="editor-container" style="height: 800px;"><!-- 编辑器 --></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -174,9 +174,7 @@
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
parent.location.reload();
|
||||
window.location.href = '{:url("article/articlelist")}';
|
||||
}, 1000);
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
@ -185,12 +183,6 @@
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
// 返回上一页
|
||||
function goBack() {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -200,14 +192,63 @@
|
||||
const { createEditor, createToolbar } = window.wangEditor
|
||||
|
||||
const editorConfig = {
|
||||
MENU_CONF: {},
|
||||
placeholder: '请输入内容...',
|
||||
onChange(editor) {
|
||||
const html = editor.getHtml()
|
||||
// console.log('editor content', html)
|
||||
// 也可以同步到 <textarea>
|
||||
},
|
||||
}
|
||||
|
||||
// 配置图片上传
|
||||
editorConfig.MENU_CONF['uploadImage'] = {
|
||||
server: '{:url("index/upload_imgs")}',
|
||||
fieldName: 'file',
|
||||
maxFileSize: 10 * 1024 * 1024, // 10M
|
||||
maxNumberOfFiles: 10,
|
||||
allowedFileTypes: ['image/*'],
|
||||
meta: {
|
||||
token: 'xxx'
|
||||
},
|
||||
metaWithUrl: true,
|
||||
headers: {
|
||||
Accept: 'text/x-json'
|
||||
},
|
||||
timeout: 5 * 1000, // 5s
|
||||
|
||||
onBeforeUpload(file) {
|
||||
console.log('准备上传图片', file)
|
||||
return file
|
||||
},
|
||||
onProgress(progress) {
|
||||
console.log('上传进度', progress)
|
||||
},
|
||||
onSuccess(file, res) {
|
||||
console.log('上传成功', file, res)
|
||||
},
|
||||
onFailed(file, res) {
|
||||
layer.msg('上传失败:' + res.msg, { icon: 2 })
|
||||
console.log('上传失败', file, res)
|
||||
},
|
||||
onError(file, err, res) {
|
||||
layer.msg('上传出错:' + err.message, { icon: 2 })
|
||||
console.error('上传出错', file, err, res)
|
||||
},
|
||||
customInsert(res, insertFn) {
|
||||
// res 即服务端的返回结果
|
||||
if (res.code === 0 && res.data) {
|
||||
// 从res.data中获取src字段
|
||||
const url = String(res.data.src || '');
|
||||
if (url) {
|
||||
insertFn(url);
|
||||
} else {
|
||||
layer.msg('图片地址无效', { icon: 2 });
|
||||
}
|
||||
} else {
|
||||
layer.msg('图片上传失败', { icon: 2 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const editor = createEditor({
|
||||
selector: '#editor-container',
|
||||
html: '<p><br></p>',
|
||||
@ -223,4 +264,11 @@
|
||||
config: toolbarConfig,
|
||||
mode: 'default', // or 'simple'
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
//返回文章列表
|
||||
function goBack() {
|
||||
window.location.href = '{:url("article/articlelist")}';
|
||||
}
|
||||
</script>
|
||||
@ -73,14 +73,7 @@
|
||||
}
|
||||
|
||||
function edit(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑文章',
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['800px', '600px'],
|
||||
content: '{:url("article/edit")}?id=' + id
|
||||
});
|
||||
window.location.href = '{:url("article/edit")}?id=' + id;
|
||||
}
|
||||
|
||||
function del(id) {
|
||||
|
||||
285
app/admin/view/article/edit.php
Normal file
@ -0,0 +1,285 @@
|
||||
{include file="public/header" /}
|
||||
<div class="config-container">
|
||||
<div class="config-header" style="display:flex;justify-content: space-between;">
|
||||
<div>
|
||||
<span>编辑文章</span>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="goBack()">
|
||||
<i class="layui-icon layui-icon-return"></i>返回
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<form class="layui-form" action="" method="post">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="title" required lay-verify="required" placeholder="请输入文章标题" autocomplete="off"
|
||||
class="layui-input" value="{$info.title}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="cate" lay-verify="required">
|
||||
<option value="">请选择分类</option>
|
||||
{foreach $cates as $item}
|
||||
<option value="{$item.id}" {if $info.cate==$item.id}selected{/if}>{$item.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</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">{$info.desc}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">作者</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="author" required lay-verify="required" placeholder="请输入作者" autocomplete="off"
|
||||
class="layui-input" value="{$info.author}">
|
||||
</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;" src="{$info.image}">
|
||||
<div id="upload-text"></div>
|
||||
</div>
|
||||
<div class="layui-progress layui-progress-big" lay-showPercent="yes" lay-filter="filter-demo">
|
||||
<div class="layui-progress-bar" lay-percent=""></div>
|
||||
</div>
|
||||
<input type="hidden" name="image" id="image" value="{$info.image}">
|
||||
</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 class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
|
||||
<button class="layui-btn layui-btn-primary" lay-submit lay-filter="formDraft">存草稿</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/wangeditor.js"></script>
|
||||
<script>
|
||||
layui.use(['form', 'layer'], function () {
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $ = layui.jquery;
|
||||
var upload = layui.upload;
|
||||
var element = layui.element;
|
||||
|
||||
// 图片上传
|
||||
var uploadInst = upload.render({
|
||||
elem: '#upload-btn',
|
||||
url: '{:url("index/upload_img")}', // 上传图片接口
|
||||
before: function (obj) {
|
||||
// 预读本地文件示例,不支持ie8
|
||||
obj.preview(function (index, file, result) {
|
||||
$('#upload-img').attr('src', result); // 图片链接(base64)
|
||||
});
|
||||
element.progress('filter-demo', '0%'); // 进度条复位
|
||||
layer.msg('上传中', { icon: 16, time: 0 });
|
||||
},
|
||||
done: function (res) {
|
||||
// 若上传失败
|
||||
if (res.code > 0) {
|
||||
return layer.msg('上传失败');
|
||||
}
|
||||
// 上传成功
|
||||
$('#image').val(res.data); // 设置图片路径到隐藏输入框
|
||||
$('#upload-text').html(''); // 置空上传失败的状态
|
||||
layer.msg('上传成功', { icon: 1 });
|
||||
},
|
||||
uploadError: function () { // 这里改为 uploadError
|
||||
// 演示失败状态,并实现重传
|
||||
var demoText = $('#upload-text');
|
||||
demoText.html('<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('filter-demo', n + '%'); // 可配合 layui 进度条元素使用
|
||||
if (n == 100) {
|
||||
layer.msg('上传完毕', { icon: 1 });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 获取分类列表
|
||||
$.get('{:url("article/getcate")}', function (res) {
|
||||
if (res.code == 0) {
|
||||
var html = '<option value="">请选择分类</option>';
|
||||
res.data.forEach(function (item) {
|
||||
// 如果cid为0,则设置为禁用
|
||||
var disabled = item.cid == 0 ? 'disabled' : '';
|
||||
var selected = item.id == '{$info.cate}' ? 'selected' : '';
|
||||
html += '<option value="' + item.id + '" ' + disabled + ' ' + selected + '>' + item.name + '</option>';
|
||||
// 如果有子分类,添加子分类选项
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach(function (child) {
|
||||
var childSelected = child.id == '{$info.cate}' ? 'selected' : '';
|
||||
html += '<option value="' + child.id + '" ' + childSelected + '>├─ ' + child.name + '</option>';
|
||||
});
|
||||
}
|
||||
});
|
||||
$('select[name="cate"]').html(html);
|
||||
form.render('select');
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
});
|
||||
|
||||
// 表单提交
|
||||
form.on('submit(formSubmit)', function (data) {
|
||||
// 获取编辑器内容
|
||||
var content = editor.getHtml();
|
||||
if (!content || content === '<p><br></p>') {
|
||||
layer.msg('请输入文章内容', { icon: 2 });
|
||||
return false;
|
||||
}
|
||||
|
||||
var loadIndex = layer.load(2);
|
||||
data.field.content = content;
|
||||
|
||||
$.ajax({
|
||||
url: '{:url("article/edit")}?id={$info.id}',
|
||||
type: 'POST',
|
||||
data: data.field,
|
||||
success: function (res) {
|
||||
layer.close(loadIndex);
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () {
|
||||
window.location.href = '{:url("article/articlelist")}';
|
||||
}, 1000);
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
// 返回上一页
|
||||
function goBack() {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- wangeditor编辑器脚本 -->
|
||||
<script>
|
||||
const { createEditor, createToolbar } = window.wangEditor
|
||||
|
||||
const editorConfig = {
|
||||
MENU_CONF: {},
|
||||
placeholder: '请输入内容...',
|
||||
onChange(editor) {
|
||||
const html = editor.getHtml()
|
||||
},
|
||||
}
|
||||
|
||||
// 配置图片上传
|
||||
editorConfig.MENU_CONF['uploadImage'] = {
|
||||
server: '{:url("index/upload_imgs")}',
|
||||
fieldName: 'file',
|
||||
maxFileSize: 10 * 1024 * 1024, // 10M
|
||||
maxNumberOfFiles: 10,
|
||||
allowedFileTypes: ['image/*'],
|
||||
meta: {
|
||||
token: 'xxx'
|
||||
},
|
||||
metaWithUrl: true,
|
||||
headers: {
|
||||
Accept: 'text/x-json'
|
||||
},
|
||||
timeout: 5 * 1000, // 5s
|
||||
|
||||
onBeforeUpload(file) {
|
||||
console.log('准备上传图片', file)
|
||||
return file
|
||||
},
|
||||
onProgress(progress) {
|
||||
console.log('上传进度', progress)
|
||||
},
|
||||
onSuccess(file, res) {
|
||||
console.log('上传成功', file, res)
|
||||
},
|
||||
onFailed(file, res) {
|
||||
layer.msg('上传失败:' + res.msg, { icon: 2 })
|
||||
console.log('上传失败', file, res)
|
||||
},
|
||||
onError(file, err, res) {
|
||||
layer.msg('上传出错:' + err.message, { icon: 2 })
|
||||
console.error('上传出错', file, err, res)
|
||||
},
|
||||
customInsert(res, insertFn) {
|
||||
// res 即服务端的返回结果
|
||||
if (res.code === 0 && res.data) {
|
||||
// 从res.data中获取src字段
|
||||
const url = String(res.data.src || '');
|
||||
if (url) {
|
||||
insertFn(url);
|
||||
} else {
|
||||
layer.msg('图片地址无效', { icon: 2 });
|
||||
}
|
||||
} else {
|
||||
layer.msg('图片上传失败', { icon: 2 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const editor = createEditor({
|
||||
selector: '#editor-container',
|
||||
html: `{$info.content|raw|default=''}`,
|
||||
config: editorConfig,
|
||||
mode: 'default', // or 'simple'
|
||||
})
|
||||
|
||||
const toolbarConfig = {}
|
||||
|
||||
const toolbar = createToolbar({
|
||||
editor,
|
||||
selector: '#toolbar-container',
|
||||
config: toolbarConfig,
|
||||
mode: 'default', // or 'simple'
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
//返回文章列表
|
||||
function goBack() {
|
||||
window.location.href = '{:url("article/articlelist")}';
|
||||
}
|
||||
</script>
|
||||
@ -11,8 +11,66 @@ use think\facade\Config;
|
||||
|
||||
class Index extends Base
|
||||
{
|
||||
// 首页
|
||||
public function index()
|
||||
{
|
||||
// 获取文章列表
|
||||
$articles = Db::table('yz_article')
|
||||
->where('delete_time', null)
|
||||
->where('status', '<>', 3)
|
||||
->order('id DESC')
|
||||
->select()
|
||||
->toArray();
|
||||
|
||||
$articleList = [];
|
||||
foreach ($articles as $article) {
|
||||
$cate = $article['cate'];
|
||||
$cateName = Db::table('yz_article_category')
|
||||
->where('id', $cate)
|
||||
->where('delete_time', null)
|
||||
->where('status', 1)
|
||||
->value('name');
|
||||
|
||||
if ($cateName) { // 只添加有效的分类
|
||||
if (!isset($articleList[$cateName])) {
|
||||
$articleList[$cateName] = [];
|
||||
}
|
||||
$articleList[$cateName][] = $article;
|
||||
}
|
||||
}
|
||||
|
||||
// 调试信息
|
||||
trace('Articles: ' . json_encode($articles, JSON_UNESCAPED_UNICODE));
|
||||
trace('ArticleList: ' . json_encode($articleList, JSON_UNESCAPED_UNICODE));
|
||||
|
||||
// 将变量传递给视图
|
||||
View::assign([
|
||||
'articleList' => $articleList,
|
||||
]);
|
||||
return view('index');
|
||||
}
|
||||
|
||||
// 文章列表
|
||||
public function articlelist()
|
||||
{
|
||||
$articles = Db::table('yz_article')
|
||||
->where('delete_time', null)
|
||||
->where('status', 1)
|
||||
->order('id DESC')
|
||||
->select()
|
||||
->toArray();
|
||||
|
||||
$articleList = [];
|
||||
foreach ($articles as $article) {
|
||||
$cate = $article['cate'];
|
||||
$cateName = Db::table('yz_article_category')->where('id', $cate)->value('name');
|
||||
if (!isset($articleList[$cateName])) {
|
||||
$articleList[$cateName] = [];
|
||||
}
|
||||
$articleList[$cateName][] = $article;
|
||||
}
|
||||
|
||||
View::assign('articleList', $articleList);
|
||||
return View::fetch();
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,13 +73,13 @@
|
||||
<div class="module-header">
|
||||
<div>
|
||||
<div class="ModuleTitle_titleWrapper">
|
||||
<h3 class="ModuleTitle_title">公开课</h3>
|
||||
<h3 class="ModuleTitle_title">技术文章</h3>
|
||||
<div class="tab-container">
|
||||
<div class="tab-header">
|
||||
<div class="tab-item active" data-tab="all">全部</div>
|
||||
<div class="tab-item" data-tab="frontend">前端</div>
|
||||
<div class="tab-item" data-tab="backend">后端</div>
|
||||
<div class="tab-item" data-tab="mobile">移动端</div>
|
||||
{foreach $articleList as $cateName => $articles}
|
||||
<div class="tab-item" data-tab="{$cateName}">{$cateName}</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -87,68 +87,45 @@
|
||||
<div class="more-btn">更多</div>
|
||||
</div>
|
||||
<div class="product-list">
|
||||
<!-- 全部课程 -->
|
||||
<!-- 全部文章 -->
|
||||
<div class="tab-content active" data-tab="all">
|
||||
<!-- 原有的课程列表内容 -->
|
||||
<div class="opencourse product-item">
|
||||
<!-- ... 原有内容 ... -->
|
||||
</div>
|
||||
<!-- ... 其他课程项 ... -->
|
||||
{foreach $articleList as $cateName => $articles}
|
||||
{foreach $articles as $article}
|
||||
<div class="opencourse product-item">
|
||||
<div class="video">
|
||||
<img src="{$article.image}" alt="" class="cover">
|
||||
</div>
|
||||
<div class="introduction">
|
||||
<div class="title">{$article.title}</div>
|
||||
<div class="subtitle">{$article.author}</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="desc">{$article.desc}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<!-- 前端课程 -->
|
||||
<div class="tab-content" data-tab="frontend">
|
||||
<!-- 分类文章 -->
|
||||
{foreach $articleList as $cateName => $articles}
|
||||
<div class="tab-content" data-tab="{$cateName}">
|
||||
{foreach $articles as $article}
|
||||
<div class="opencourse product-item">
|
||||
<div class="video">
|
||||
<img src="https://static001.geekbang.org/resource/image/ff/b8/ff18d73bec1040abf3d7bc7bffb532b8.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
|
||||
alt="" class="cover">
|
||||
<img src="{$article.image}" alt="" class="cover">
|
||||
</div>
|
||||
<div class="introduction">
|
||||
<div class="title">Vue.js 实战教程</div>
|
||||
<div class="subtitle">张老师 | 资深前端工程师</div>
|
||||
<div class="title">{$article.title}</div>
|
||||
<div class="subtitle">{$article.author}</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="desc">2.5w人学过</div>
|
||||
<div class="desc">{$article.desc}</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 可以添加更多前端课程 -->
|
||||
</div>
|
||||
|
||||
<!-- 后端课程 -->
|
||||
<div class="tab-content" data-tab="backend">
|
||||
<div class="opencourse product-item">
|
||||
<div class="video">
|
||||
<img src="https://static001.geekbang.org/resource/image/76/cd/762ee7f34a76fbff61d20aae313833cd.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
|
||||
alt="" class="cover">
|
||||
</div>
|
||||
<div class="introduction">
|
||||
<div class="title">PHP高级开发实战</div>
|
||||
<div class="subtitle">李老师 | 资深后端工程师</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="desc">1.8w人学过</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 可以添加更多后端课程 -->
|
||||
</div>
|
||||
|
||||
<!-- 移动端课程 -->
|
||||
<div class="tab-content" data-tab="mobile">
|
||||
<div class="opencourse product-item">
|
||||
<div class="video">
|
||||
<img src="https://static001.geekbang.org/resource/image/0f/69/0f95b62cf7yy6d6yy674f090d063b669.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
|
||||
alt="" class="cover">
|
||||
</div>
|
||||
<div class="introduction">
|
||||
<div class="title">Flutter跨平台开发</div>
|
||||
<div class="subtitle">王老师 | 移动端架构师</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="desc">1.2w人学过</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 可以添加更多移动端课程 -->
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -187,4 +164,5 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@ -1,8 +1,8 @@
|
||||
location ~* (runtime|application)/{
|
||||
return 403;
|
||||
return 403;
|
||||
}
|
||||
location / {
|
||||
if (!-e $request_filename){
|
||||
rewrite ^(.*)$ /index.php?s=$1 last; break;
|
||||
}
|
||||
if (!-e $request_filename){
|
||||
rewrite ^(.*)$ /index.php?s=$1 last; break;
|
||||
}
|
||||
}
|
||||
@ -266,6 +266,7 @@ body {
|
||||
|
||||
/* 轮播动画 */
|
||||
@keyframes slide {
|
||||
|
||||
0%,
|
||||
33% {
|
||||
transform: translateX(0);
|
||||
@ -348,7 +349,7 @@ body {
|
||||
.tab-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.tab-header .active {
|
||||
@ -362,9 +363,13 @@ body {
|
||||
}
|
||||
|
||||
.tab-content.active {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
cursor: pointer;
|
||||
}
|
||||
@ -484,4 +489,4 @@ body {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 522 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 32 KiB |
130
runtime/admin/temp/02890b205219b043551566c44acd91e7.php
Normal file
@ -0,0 +1,130 @@
|
||||
<?php /*a:1:{s:49:"E:\Demo\PHP\yunzer\app\admin\view\login\index.php";i:1745855804;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<title>后台管理系统</title>
|
||||
<meta name="renderer" content="yz">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/login.css">
|
||||
<script type="text/javascript" src="/static/layui/layui.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">
|
||||
<div class="layadmin-user-login-main">
|
||||
<div class="layadmin-user-login-box layadmin-user-login-header">
|
||||
<img src="/static/images/logo.png" />
|
||||
<h2>后台管理系统</h2>
|
||||
</div>
|
||||
<div class="layadmin-user-login-box layadmin-user-login-body layui-form">
|
||||
<form class="layui-form login-form">
|
||||
<div class="layui-form-item">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-username" for="account"></label>
|
||||
<input type="text" id="account" name="account" placeholder="邮箱" class="layui-input"
|
||||
value="357099073@qq.com">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-password" for="password"></label>
|
||||
<input type="password" name="password" class="layui-input" placeholder="密码" class="layui-input"
|
||||
value="">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs7">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-vercode"
|
||||
for="code"></label>
|
||||
<input type="text" name="code" placeholder="图形验证码" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-col-xs5">
|
||||
<div style="margin-left:10px;">
|
||||
<img src="<?php echo captcha_src(); ?>" class="layadmin-user-login-codeimg" id="img"
|
||||
onclick="reloadImg()">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-bottom: 20px;">
|
||||
<input type="checkbox" name="remember" lay-skin="primary" title="记住密码">
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn layui-btn-fluid" onclick="login()">登 陆</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer', 'form'], function () {
|
||||
var form = layui.form;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
// 用户名控件获取焦点
|
||||
$('#account').focus();
|
||||
// 回车登录
|
||||
$('input').keydown(function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
login();
|
||||
}
|
||||
});
|
||||
});
|
||||
// 重新生成验证码
|
||||
function reloadImg() {
|
||||
$('#img').attr('src', '<?php echo captcha_src(); ?>?rand=' + Math.random());
|
||||
}
|
||||
|
||||
// 登录处理函数
|
||||
function login() {
|
||||
var account = $('input[name="account"]').val();
|
||||
var password = $('input[name="password"]').val();
|
||||
var code = $('input[name="code"]').val();
|
||||
var remember = $('input[name="remember"]:checked').val();
|
||||
|
||||
if (!account) {
|
||||
layer.msg('邮箱不能为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!password) {
|
||||
layer.msg('密码不能为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!code) {
|
||||
layer.msg('验证码不能为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?php echo url("login"); ?>',
|
||||
data: {
|
||||
account: account,
|
||||
password: password,
|
||||
code: code,
|
||||
remember: remember
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function(res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, {icon: 1, time: 1000}, function() {
|
||||
window.location.href = '<?php echo url("Index/index"); ?>';
|
||||
});
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2});
|
||||
reloadImg();
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
layer.msg('网络错误,请重试', {icon: 2});
|
||||
reloadImg();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
379
runtime/admin/temp/33fe660e71fd18dda768b12bc1ec5aac.php
Normal file
@ -0,0 +1,379 @@
|
||||
<?php /*a:2:{s:50:"E:\Demo\PHP\yunzer\app\admin\view\article\edit.php";i:1746803972;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1746796639;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/wangeditor.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div class="config-container">
|
||||
<div class="config-header" style="display:flex;justify-content: space-between;">
|
||||
<div>
|
||||
<span>编辑文章</span>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="goBack()">
|
||||
<i class="layui-icon layui-icon-return"></i>返回
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<form class="layui-form" action="" method="post">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="title" required lay-verify="required" placeholder="请输入文章标题" autocomplete="off"
|
||||
class="layui-input" value="<?php echo htmlentities((string) $info['title']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="cate" lay-verify="required">
|
||||
<option value="">请选择分类</option>
|
||||
<?php foreach($cates as $item): ?>
|
||||
<option value="<?php echo htmlentities((string) $item['id']); ?>" <?php if($info['cate']==$item['id']): ?>selected<?php endif; ?>><?php echo htmlentities((string) $item['name']); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</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"><?php echo htmlentities((string) $info['desc']); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">作者</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="author" required lay-verify="required" placeholder="请输入作者" autocomplete="off"
|
||||
class="layui-input" value="<?php echo htmlentities((string) $info['author']); ?>">
|
||||
</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;" src="<?php echo htmlentities((string) $info['image']); ?>">
|
||||
<div id="upload-text"></div>
|
||||
</div>
|
||||
<div class="layui-progress layui-progress-big" lay-showPercent="yes" lay-filter="filter-demo">
|
||||
<div class="layui-progress-bar" lay-percent=""></div>
|
||||
</div>
|
||||
<input type="hidden" name="image" id="image" value="<?php echo htmlentities((string) $info['image']); ?>">
|
||||
</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 class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
|
||||
<button class="layui-btn layui-btn-primary" lay-submit lay-filter="formDraft">存草稿</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/wangeditor.js"></script>
|
||||
<script>
|
||||
layui.use(['form', 'layer'], function () {
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $ = layui.jquery;
|
||||
var upload = layui.upload;
|
||||
var element = layui.element;
|
||||
|
||||
// 图片上传
|
||||
var uploadInst = upload.render({
|
||||
elem: '#upload-btn',
|
||||
url: '<?php echo url("index/upload_img"); ?>', // 上传图片接口
|
||||
before: function (obj) {
|
||||
// 预读本地文件示例,不支持ie8
|
||||
obj.preview(function (index, file, result) {
|
||||
$('#upload-img').attr('src', result); // 图片链接(base64)
|
||||
});
|
||||
element.progress('filter-demo', '0%'); // 进度条复位
|
||||
layer.msg('上传中', { icon: 16, time: 0 });
|
||||
},
|
||||
done: function (res) {
|
||||
// 若上传失败
|
||||
if (res.code > 0) {
|
||||
return layer.msg('上传失败');
|
||||
}
|
||||
// 上传成功
|
||||
$('#image').val(res.data); // 设置图片路径到隐藏输入框
|
||||
$('#upload-text').html(''); // 置空上传失败的状态
|
||||
layer.msg('上传成功', { icon: 1 });
|
||||
},
|
||||
uploadError: function () { // 这里改为 uploadError
|
||||
// 演示失败状态,并实现重传
|
||||
var demoText = $('#upload-text');
|
||||
demoText.html('<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('filter-demo', n + '%'); // 可配合 layui 进度条元素使用
|
||||
if (n == 100) {
|
||||
layer.msg('上传完毕', { icon: 1 });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 获取分类列表
|
||||
$.get('<?php echo url("article/getcate"); ?>', function (res) {
|
||||
if (res.code == 0) {
|
||||
var html = '<option value="">请选择分类</option>';
|
||||
res.data.forEach(function (item) {
|
||||
// 如果cid为0,则设置为禁用
|
||||
var disabled = item.cid == 0 ? 'disabled' : '';
|
||||
var selected = item.id == '<?php echo htmlentities((string) $info['cate']); ?>' ? 'selected' : '';
|
||||
html += '<option value="' + item.id + '" ' + disabled + ' ' + selected + '>' + item.name + '</option>';
|
||||
// 如果有子分类,添加子分类选项
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach(function (child) {
|
||||
var childSelected = child.id == '<?php echo htmlentities((string) $info['cate']); ?>' ? 'selected' : '';
|
||||
html += '<option value="' + child.id + '" ' + childSelected + '>├─ ' + child.name + '</option>';
|
||||
});
|
||||
}
|
||||
});
|
||||
$('select[name="cate"]').html(html);
|
||||
form.render('select');
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
});
|
||||
|
||||
// 表单提交
|
||||
form.on('submit(formSubmit)', function (data) {
|
||||
// 获取编辑器内容
|
||||
var content = editor.getHtml();
|
||||
if (!content || content === '<p><br></p>') {
|
||||
layer.msg('请输入文章内容', { icon: 2 });
|
||||
return false;
|
||||
}
|
||||
|
||||
var loadIndex = layer.load(2);
|
||||
data.field.content = content;
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo url("article/edit"); ?>?id=<?php echo htmlentities((string) $info['id']); ?>',
|
||||
type: 'POST',
|
||||
data: data.field,
|
||||
success: function (res) {
|
||||
layer.close(loadIndex);
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () {
|
||||
window.location.href = '<?php echo url("article/articlelist"); ?>';
|
||||
}, 1000);
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
// 返回上一页
|
||||
function goBack() {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- wangeditor编辑器脚本 -->
|
||||
<script>
|
||||
const { createEditor, createToolbar } = window.wangEditor
|
||||
|
||||
const editorConfig = {
|
||||
MENU_CONF: {},
|
||||
placeholder: '请输入内容...',
|
||||
onChange(editor) {
|
||||
const html = editor.getHtml()
|
||||
},
|
||||
}
|
||||
|
||||
// 配置图片上传
|
||||
editorConfig.MENU_CONF['uploadImage'] = {
|
||||
server: '<?php echo url("index/upload_imgs"); ?>',
|
||||
fieldName: 'file',
|
||||
maxFileSize: 10 * 1024 * 1024, // 10M
|
||||
maxNumberOfFiles: 10,
|
||||
allowedFileTypes: ['image/*'],
|
||||
meta: {
|
||||
token: 'xxx'
|
||||
},
|
||||
metaWithUrl: true,
|
||||
headers: {
|
||||
Accept: 'text/x-json'
|
||||
},
|
||||
timeout: 5 * 1000, // 5s
|
||||
|
||||
onBeforeUpload(file) {
|
||||
console.log('准备上传图片', file)
|
||||
return file
|
||||
},
|
||||
onProgress(progress) {
|
||||
console.log('上传进度', progress)
|
||||
},
|
||||
onSuccess(file, res) {
|
||||
console.log('上传成功', file, res)
|
||||
},
|
||||
onFailed(file, res) {
|
||||
layer.msg('上传失败:' + res.msg, { icon: 2 })
|
||||
console.log('上传失败', file, res)
|
||||
},
|
||||
onError(file, err, res) {
|
||||
layer.msg('上传出错:' + err.message, { icon: 2 })
|
||||
console.error('上传出错', file, err, res)
|
||||
},
|
||||
customInsert(res, insertFn) {
|
||||
// res 即服务端的返回结果
|
||||
if (res.code === 0 && res.data) {
|
||||
// 从res.data中获取src字段
|
||||
const url = String(res.data.src || '');
|
||||
if (url) {
|
||||
insertFn(url);
|
||||
} else {
|
||||
layer.msg('图片地址无效', { icon: 2 });
|
||||
}
|
||||
} else {
|
||||
layer.msg('图片上传失败', { icon: 2 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const editor = createEditor({
|
||||
selector: '#editor-container',
|
||||
html: `<?php echo (isset($info['content']) && ($info['content'] !== '')?$info['content']:''); ?>`,
|
||||
config: editorConfig,
|
||||
mode: 'default', // or 'simple'
|
||||
})
|
||||
|
||||
const toolbarConfig = {}
|
||||
|
||||
const toolbar = createToolbar({
|
||||
editor,
|
||||
selector: '#toolbar-container',
|
||||
config: toolbarConfig,
|
||||
mode: 'default', // or 'simple'
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
//返回文章列表
|
||||
function goBack() {
|
||||
window.location.href = '<?php echo url("article/articlelist"); ?>';
|
||||
}
|
||||
</script>
|
||||
171
runtime/admin/temp/533c54f343e8a61c5a95c12da17f30ac.php
Normal file
@ -0,0 +1,171 @@
|
||||
<?php /*a:2:{s:53:"E:\Demo\PHP\yunzer\app\admin\view\article\cateadd.php";i:1746796639;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1746796639;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/wangeditor.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div style="padding: 50px;padding-bottom: 0px;">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="name" name="name" required lay-verify="required" placeholder="请输入分类名称"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">父级分类</label>
|
||||
<div class="layui-input-block">
|
||||
<select id="cid" name="cid" lay-verify="required">
|
||||
<option value="0">顶级分类</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" id="sort" name="sort" value="0" placeholder="请输入排序值" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="formSubmit">添加分类</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
layui.use(['form', 'layer'], function () {
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $ = layui.jquery;
|
||||
|
||||
// 获取URL中的cid参数
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
var cid = urlParams.get('cid');
|
||||
|
||||
// 获取分类列表
|
||||
$.get('<?php echo url("article/getcate"); ?>', function (res) {
|
||||
if (res.code == 0) {
|
||||
var html = '<option value="0">顶级分类</option>';
|
||||
res.data.forEach(function (item) {
|
||||
html += '<option value="' + item.id + '"' + (cid == item.id ? ' selected' : '') + '>' + item.name + '</option>';
|
||||
});
|
||||
$('#cid').html(html);
|
||||
form.render('select');
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
});
|
||||
|
||||
// 表单提交
|
||||
form.on('submit(formSubmit)', function (data) {
|
||||
$.post('<?php echo url("article/cateadd"); ?>', data.field, function (res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
parent.location.reload();
|
||||
}, 1000);
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
189
runtime/admin/temp/705995d2a8e3fb66a54834e54543f090.php
Normal file
@ -0,0 +1,189 @@
|
||||
<?php /*a:2:{s:57:"E:\Demo\PHP\yunzer\app\admin\view\article\articlelist.php";i:1746800071;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1746796639;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/wangeditor.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div class="config-container">
|
||||
<div class="config-header" style="display:flex;justify-content: space-between;">
|
||||
<div>
|
||||
<span>文章列表</span>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="add()">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" onclick="refresh()">
|
||||
<i class="layui-icon layui-icon-refresh"></i>刷新
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20">ID</th>
|
||||
<th>标题</th>
|
||||
<th>分类</th>
|
||||
<th>封面</th>
|
||||
<th>作者</th>
|
||||
<th>状态</th>
|
||||
<th>发布时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(is_array($lists) || $lists instanceof \think\Collection || $lists instanceof \think\Paginator): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities((string) $vo['id']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['title']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['cate']); ?></td>
|
||||
<td>
|
||||
<?php if($vo['image']): ?>
|
||||
<img src="<?php echo htmlentities((string) $vo['image']); ?>" style="max-width: 50px; max-height: 50px;">
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo htmlentities((string) $vo['author']); ?></td>
|
||||
<td>
|
||||
<?php switch($vo['status']): case "0": ?><span style="color:red;">草稿</span><?php break; case "1": ?><span style="color:orange;">待审核</span><?php break; case "2": ?><span style="color:green;">已发布</span><?php break; case "3": ?><span style="color:gray;">隐藏</span><?php break; ?>
|
||||
<?php endswitch; ?>
|
||||
</td>
|
||||
<td><?php echo htmlentities((string) $vo['publishdate']); ?></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="edit(<?php echo htmlentities((string) $vo['id']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i>编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="del(<?php echo htmlentities((string) $vo['id']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer'], function () {
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
|
||||
function add() {
|
||||
window.location.href = '<?php echo url("article/add"); ?>';
|
||||
}
|
||||
|
||||
function edit(id) {
|
||||
window.location.href = '<?php echo url("article/edit"); ?>?id=' + id;
|
||||
}
|
||||
|
||||
function del(id) {
|
||||
layer.confirm('确定要删除该文章吗?', {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.post('<?php echo url("article/delete"); ?>', { id: id }, function (res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () {
|
||||
window.location.reload();
|
||||
}, 1000);
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
window.location.reload();
|
||||
}
|
||||
</script>
|
||||
184
runtime/admin/temp/766d6e3eeeea6e24fe0ab12371e8dfbf.php
Normal file
@ -0,0 +1,184 @@
|
||||
<?php /*a:2:{s:54:"E:\Demo\PHP\yunzer\app\admin\view\article\cateedit.php";i:1746796639;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1746796639;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/wangeditor.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div style="padding: 50px;padding-bottom: 0px;">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<input type="hidden" name="id" value="<?php echo htmlentities((string) $info['id']); ?>">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="name" name="name" required lay-verify="required" placeholder="请输入分类名称"
|
||||
value="<?php echo htmlentities((string) $info['name']); ?>" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">父级分类</label>
|
||||
<div class="layui-input-block">
|
||||
<select id="cid" name="cid" lay-verify="required">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<select id="status" name="status" lay-verify="required">
|
||||
<option value="1">启用</option>
|
||||
<option value="0">关闭</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" id="sort" name="sort" value="<?php echo htmlentities((string) $info['sort']); ?>" placeholder="请输入排序值" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="formSubmit">保存修改</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
layui.use(['form', 'layer'], function () {
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $ = layui.jquery;
|
||||
|
||||
// 获取URL中的id参数
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
var id = urlParams.get('id');
|
||||
|
||||
// 获取分类列表
|
||||
$.get('<?php echo url("article/getcate"); ?>', function (res) {
|
||||
if (res.code == 0) {
|
||||
var html = '<option value="0">顶级分类</option>';
|
||||
res.data.forEach(function (item) {
|
||||
// 排除自己及其子分类作为父级选项
|
||||
if(item.id != id) {
|
||||
html += '<option value="' + item.id + '"' + (item.id == <?php echo htmlentities((string) $info['cid']); ?> ? ' selected' : '') + '>' + item.name + '</option>';
|
||||
}
|
||||
});
|
||||
$('#cid').html(html);
|
||||
form.render('select');
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
});
|
||||
|
||||
// 表单提交
|
||||
form.on('submit(formSubmit)', function (data) {
|
||||
$.post('<?php echo url("article/cateedit"); ?>', data.field, function (res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
parent.location.reload();
|
||||
}, 1000);
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
272
runtime/admin/temp/792969fb591a0f355761a1b3bf3d1226.php
Normal file
@ -0,0 +1,272 @@
|
||||
<?php /*a:3:{s:51:"E:\Demo\PHP\yunzer\app\admin\view\index\welcome.php";i:1745855804;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1746796639;s:49:"E:\Demo\PHP\yunzer\app\admin\view\public\tail.php";i:1745855804;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/wangeditor.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<style>
|
||||
.dashboard-container {
|
||||
padding: 20px;
|
||||
font-family: 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
.welcome-header {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.welcome-header h1 {
|
||||
color: #3881fd;
|
||||
font-weight: 300;
|
||||
font-size: 28px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.stats-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
justify-content: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.stat-card {
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
padding: 20px;
|
||||
min-width: 200px;
|
||||
flex: 1;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.stat-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.stat-card .stat-value {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #3881fd;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.stat-card .stat-title {
|
||||
color: #7f8c8d;
|
||||
font-size: 14px;
|
||||
}
|
||||
.quick-actions {
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.quick-actions h2 {
|
||||
color: #2c3e50;
|
||||
font-size: 18px;
|
||||
margin-bottom: 15px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
.action-button {
|
||||
background-color: #f8f9fa;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
padding: 10px 15px;
|
||||
color: #3881fd;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
.action-button:hover {
|
||||
background-color: #e9ecef;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="dashboard-container">
|
||||
<div class="welcome-header">
|
||||
<h1>欢迎使用<?php echo htmlentities((string) $config['admin_name']); ?></h1>
|
||||
<p>今天是 <span id="current-time"></span>,祝您工作愉快</p>
|
||||
</div>
|
||||
|
||||
<div class="stats-container">
|
||||
<div class="stat-card">
|
||||
<div class="stat-title">用户总数</div>
|
||||
<div class="stat-value">1,234</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-title">今日访问</div>
|
||||
<div class="stat-value">256</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-title">数据总量</div>
|
||||
<div class="stat-value">8,642</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-title">系统消息</div>
|
||||
<div class="stat-value">12</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="quick-actions">
|
||||
<h2>快捷操作</h2>
|
||||
<div class="action-buttons">
|
||||
<button class="action-button">用户管理</button>
|
||||
<button class="action-button">内容发布</button>
|
||||
<button class="action-button">数据统计</button>
|
||||
<button class="action-button">系统设置</button>
|
||||
<button class="action-button">清除缓存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function updateTime() {
|
||||
var now = new Date();
|
||||
var year = now.getFullYear();
|
||||
var month = now.getMonth() + 1;
|
||||
var date = now.getDate();
|
||||
var hours = now.getHours();
|
||||
var minutes = now.getMinutes();
|
||||
var seconds = now.getSeconds();
|
||||
|
||||
// 补零函数
|
||||
var padZero = function(num) {
|
||||
return num < 10 ? '0' + num : num;
|
||||
};
|
||||
|
||||
// 格式化时间
|
||||
var timeString = year + '年' +
|
||||
padZero(month) + '月' +
|
||||
padZero(date) + '日 ' +
|
||||
padZero(hours) + ':' +
|
||||
padZero(minutes) + ':' +
|
||||
padZero(seconds);
|
||||
|
||||
document.getElementById('current-time').innerHTML = timeString;
|
||||
}
|
||||
|
||||
// 页面加载完立即执行一次
|
||||
updateTime();
|
||||
|
||||
// 每秒更新一次时间
|
||||
setInterval(updateTime, 1000);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
// 显示图片
|
||||
function show_img(obj){
|
||||
var imgurl = $(obj).attr('src');
|
||||
var res = getMousePos();
|
||||
var html = '<div style="background:#fff;position:absolute;width:200px;border:solid 1px #cdcdcd;border-radius:6px;padding:2px;left:'+res.x+'px;top:'+res.y+'px;z-index:1000" id="preview">\
|
||||
<img style="width:100%;border-radius:6px;" src="'+imgurl+'">\
|
||||
</div>';
|
||||
$('body').append(html);
|
||||
}
|
||||
// 隐藏图片
|
||||
function hide_img(){
|
||||
$('#preview').remove();
|
||||
}
|
||||
// 图片位置计算
|
||||
function getMousePos(event) {
|
||||
var e = event || window.event;
|
||||
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
||||
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
var x = e.pageX || e.clientX + scrollX;
|
||||
var y = e.pageY || e.clientY + scrollY;
|
||||
return { 'x': x, 'y': y };
|
||||
}
|
||||
// 删除图片
|
||||
function deleteImage(path,obj){
|
||||
$(obj).closest('.upload_pic_li').remove();
|
||||
}
|
||||
</script>
|
||||
229
runtime/admin/temp/a7bfd508279dfa35c2e6ff0e3f27da40.php
Normal file
@ -0,0 +1,229 @@
|
||||
<?php /*a:2:{s:57:"E:\Demo\PHP\yunzer\app\admin\view\article\articlecate.php";i:1746796639;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1746796639;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/wangeditor.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div class="config-container">
|
||||
<div class="config-header" style="display:flex;justify-content: space-between;">
|
||||
<div>
|
||||
<span>文章分类列表</span>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="add()">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" onclick="refresh()">
|
||||
<i class="layui-icon layui-icon-refresh"></i>刷新
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20">ID</th>
|
||||
<th width="120">分类名称</th>
|
||||
<th>描述</th>
|
||||
<th width="80">排序</th>
|
||||
<th width="80">状态</th>
|
||||
<th width="180">创建时间</th>
|
||||
<th width="240">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(is_array($lists) || $lists instanceof \think\Collection || $lists instanceof \think\Paginator): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if($vo['cid'] == 0): ?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities((string) $vo['id']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['name']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['desc']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['sort']); ?></td>
|
||||
<td><?php echo $vo['status']==1 ? '开启' : '<span style="color:red;">禁用</span>'; ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['create_time']); ?></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs"
|
||||
onclick="addchanel(<?php echo htmlentities((string) $vo['id']); ?>)">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加子栏目
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="edit(<?php echo htmlentities((string) $vo['id']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i>编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="del(<?php echo htmlentities((string) $vo['id']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(is_array($lists) || $lists instanceof \think\Collection || $lists instanceof \think\Paginator): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$sub): $mod = ($i % 2 );++$i;if($sub['cid'] == $vo['id']): ?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities((string) $sub['id']); ?></td>
|
||||
<td style="padding-left: 30px;">├─ <?php echo htmlentities((string) $sub['name']); ?></td>
|
||||
<td><?php echo htmlentities((string) $sub['desc']); ?></td>
|
||||
<td><?php echo htmlentities((string) $sub['sort']); ?></td>
|
||||
<td><?php echo $sub['status']==1 ? '开启' : '<span style="color:red;">禁用</span>'; ?></td>
|
||||
<td><?php echo htmlentities((string) $sub['create_time']); ?></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="edit(<?php echo htmlentities((string) $sub['id']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i>编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="del(<?php echo htmlentities((string) $sub['id']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer'], function () {
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加分类',
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['800px', '600px'],
|
||||
content: '<?php echo url("article/cateadd"); ?>'
|
||||
});
|
||||
}
|
||||
|
||||
function edit(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑分类',
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['500px', '400px'],
|
||||
content: '<?php echo url("article/cateedit"); ?>?id=' + id
|
||||
});
|
||||
}
|
||||
|
||||
function del(id) {
|
||||
layer.confirm('确定要删除该分类吗?', {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.post('<?php echo url("article/catedel"); ?>', { id: id }, function (res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () {
|
||||
window.location.reload();
|
||||
}, 1000);
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function addchanel(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加子栏目',
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['800px', '600px'],
|
||||
content: '<?php echo url("article/cateadd"); ?>?cid=' + id
|
||||
});
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
window.location.reload();
|
||||
}
|
||||
</script>
|
||||
184
runtime/admin/temp/c5f36a7772c20379b8b97ddafceff134.php
Normal file
@ -0,0 +1,184 @@
|
||||
<?php /*a:1:{s:49:"E:\Demo\PHP\yunzer\app\admin\view\index\index.php";i:1746796639;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/index.css" media="all">
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/static/js/admin.js"></script>
|
||||
<style>
|
||||
.layadmin-side-shrink .layui-layout-admin .layui-logo {
|
||||
width: 60px;
|
||||
background-image: url("/static/images/logob32.jpg");
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body layadmin-themealias="default" class="layui-layout-body">
|
||||
<div id="LAY_app" class="layadmin-tabspage-none">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<div class="layui-header">
|
||||
<!-- 头部区域 -->
|
||||
<div style="display: flex;align-items: center;height:70px;">
|
||||
<ul class="layui-nav layui-layout-left">
|
||||
<li class="layui-nav-item layadmin-flexible" lay-unselect onclick="shrink()">
|
||||
<a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
|
||||
<i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
|
||||
<li class="layui-nav-item layui-hide-xs" lay-unselect title="前端站点" onclick="gotoFront()">
|
||||
<a href="javascript:;" layadmin-event="gotoFront">
|
||||
<i class="layui-icon layui-icon-website"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-nav-item layui-hide-xs" lay-unselect title="全屏" onclick="fullScreen()">
|
||||
<a href="javascript:;" layadmin-event="fullscreen">
|
||||
<i class="layui-icon layui-icon-screen-full"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-nav-item" lay-unselect>
|
||||
<a href="javascript:;">
|
||||
<cite><?php echo htmlentities((string) $aUser['name']); ?></cite>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a lay-href="" onclick="menuFire('yunzeradmin/admininfo',1)">个人中心</a></dd>
|
||||
<hr>
|
||||
<dd layadmin-event="logout" style="text-align:center;" onclick="logout()">
|
||||
<a>退出</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 侧边菜单 -->
|
||||
<div class="layui-side layui-side-menu">
|
||||
<div class="layui-side-scroll">
|
||||
<div class="layui-logo" lay-href="" style="display: flex;align-items: center;">
|
||||
<img src="/static/images/logo-l-w.png" alt="<?php echo htmlentities((string) $config['admin_name']); ?>"
|
||||
style="max-width: 100%; max-height: 100%;">
|
||||
</div>
|
||||
<ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu"
|
||||
lay-filter="layadmin-system-side-menu">
|
||||
<?php if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<li data-name="" data-jump="" class="layui-nav-item">
|
||||
<a href="javascript:;" lay-tips="<?php echo htmlentities((string) $vo['label']); ?>" lay-direction="2">
|
||||
<i class="layui-icon layui-icons <?php echo htmlentities((string) $vo['icon_class']); ?>"></i>
|
||||
<cite><?php echo htmlentities((string) $vo['label']); ?></cite>
|
||||
</a>
|
||||
<?php if((isset($vo['children']) && $vo['children'])): ?>
|
||||
<dl class="layui-nav-child">
|
||||
<?php if(is_array($vo['children']) || $vo['children'] instanceof \think\Collection || $vo['children'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['children'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$cvo): $mod = ($i % 2 );++$i;?>
|
||||
<dd data-name="" data-jump="/">
|
||||
<?php if($cvo['type'] == 1): ?>
|
||||
<a href="javascript:;" onclick="menuFire('<?php echo htmlentities((string) $cvo['src']); ?>',1)">
|
||||
<i class="layui-icon layui-icons <?php echo htmlentities((string) $cvo['icon_class']); ?>"></i><?php echo htmlentities((string) $cvo['label']); ?>
|
||||
</a>
|
||||
<?php elseif($cvo['type'] == 2): ?>
|
||||
<a href="<?php echo htmlentities((string) $cvo['src']); ?>" target="_blank">
|
||||
<i class="layui-icon layui-icons <?php echo htmlentities((string) $cvo['icon_class']); ?>"></i><?php echo htmlentities((string) $cvo['label']); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</ul>
|
||||
<div style="position: absolute;bottom:20px;width:200px;display:flex;justify-content: center;">
|
||||
<a style="color:#848484" href="https://www.yunzer.cn/">POWER BY 云泽网</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 主体内容 -->
|
||||
<div class="layui-body" id="LAY_app_body">
|
||||
<div class="layadmin-tabsbody-item layui-show">
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<iframe src="<?php echo htmlentities((string) $config['admin_route']); ?>index/welcome" onload="resetMainHeight(this)"
|
||||
style="width:100%;height:100%;" frameborder="0" scrolling="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 辅助元素,一般用于移动设备下遮罩 -->
|
||||
<div class="layadmin-body-shade" layadmin-event="shade" onclick="shrink()"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 辅助元素,一般用于移动设备下遮罩 -->
|
||||
<div class="layadmin-body-shade" layadmin-event="shade"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['element', 'layer', 'jquery'], function () {
|
||||
var element = layui.element;
|
||||
$ = layui.jquery;
|
||||
layer = layui.layer;
|
||||
setter = layui.setter;
|
||||
$('#clearcache').on('click', function () {
|
||||
$.ajax({
|
||||
url: "<?php echo htmlentities((string) $config['admin_route']); ?>index/clear",
|
||||
success: function (res) {
|
||||
if (res.code > 0) {
|
||||
layer.msg(res.msg, { 'icon': 2 });
|
||||
} else {
|
||||
layer.msg(res.msg, { 'icon': 1 });
|
||||
setTimeout(function () { parent.window.location.reload(); }, 1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
// 重新设置主操作页面高度
|
||||
function resetMainHeight(obj) {
|
||||
// parent 上级
|
||||
// clientHeight 元素的像素高度,包含元素的高度+内边距,不包含水平滚动条,边框和外边距
|
||||
var height = parent.document.documentElement.clientHeight - 80;
|
||||
$(obj).parent('div').height(height);
|
||||
}
|
||||
// 菜单点击
|
||||
function menuFire(obj, num) {
|
||||
if (num == 1) {
|
||||
$('iframe').attr('src', "<?php echo htmlentities((string) $config['admin_route']); ?>" + obj);
|
||||
}
|
||||
var width = screen();
|
||||
if (width < 2) {
|
||||
shrink();
|
||||
}
|
||||
}
|
||||
// 退出
|
||||
function logout() {
|
||||
layer.confirm('确定要退出吗?', {
|
||||
icon: 3,
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.get("<?php echo htmlentities((string) $config['admin_route']); ?>login/logout", function (res) {
|
||||
if (res.code > 0) {
|
||||
layer.msg(res.msg, { 'icon': 2 });
|
||||
} else {
|
||||
layer.msg(res.msg, { 'icon': 1 });
|
||||
setTimeout(function () { window.location.href = "<?php echo htmlentities((string) $config['admin_route']); ?>login/index"; }, 1000);
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
}
|
||||
|
||||
//跳转前端站点
|
||||
function gotoFront(){
|
||||
window.open("//<?php echo htmlentities((string) $config['admin_domain']); ?>", "_blank");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
343
runtime/admin/temp/d80737d8d32a9fbe1181b34e1ecda47e.php
Normal file
@ -0,0 +1,343 @@
|
||||
<?php /*a:2:{s:49:"E:\Demo\PHP\yunzer\app\admin\view\article\add.php";i:1746802033;s:51:"E:\Demo\PHP\yunzer\app\admin\view\public\header.php";i:1746796639;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/wangeditor.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div class="config-container">
|
||||
<div class="config-header" style="display:flex;justify-content: space-between;">
|
||||
<div>
|
||||
<span>添加文章</span>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="goBack()">
|
||||
<i class="layui-icon layui-icon-return"></i>返回
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<form class="layui-form" action="" method="post">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="title" required lay-verify="required" placeholder="请输入文章标题" autocomplete="off"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="cate" lay-verify="required">
|
||||
<option value="">请选择分类</option>
|
||||
</select>
|
||||
</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"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">作者</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="author" required lay-verify="required" placeholder="请输入作者" autocomplete="off"
|
||||
class="layui-input">
|
||||
</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="filter-demo">
|
||||
<div class="layui-progress-bar" lay-percent=""></div>
|
||||
</div>
|
||||
<input type="hidden" name="image" id="image" value="">
|
||||
</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 class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
|
||||
<button class="layui-btn layui-btn-primary" lay-submit lay-filter="formDraft">存草稿</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/wangeditor.js"></script>
|
||||
<script>
|
||||
layui.use(['form', 'layer'], function () {
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $ = layui.jquery;
|
||||
var upload = layui.upload;
|
||||
var element = layui.element;
|
||||
|
||||
// 图片上传
|
||||
var uploadInst = upload.render({
|
||||
elem: '#upload-btn',
|
||||
url: '<?php echo url("index/upload_img"); ?>', // 上传图片接口
|
||||
before: function (obj) {
|
||||
// 预读本地文件示例,不支持ie8
|
||||
obj.preview(function (index, file, result) {
|
||||
$('#upload-img').attr('src', result); // 图片链接(base64)
|
||||
});
|
||||
element.progress('filter-demo', '0%'); // 进度条复位
|
||||
layer.msg('上传中', { icon: 16, time: 0 });
|
||||
},
|
||||
done: function (res) {
|
||||
// 若上传失败
|
||||
if (res.code > 0) {
|
||||
return layer.msg('上传失败');
|
||||
}
|
||||
// 上传成功
|
||||
$('#image').val(res.data); // 设置图片路径到隐藏输入框
|
||||
$('#upload-text').html(''); // 置空上传失败的状态
|
||||
layer.msg('上传成功', { icon: 1 });
|
||||
},
|
||||
uploadError: function () { // 这里改为 uploadError
|
||||
// 演示失败状态,并实现重传
|
||||
var demoText = $('#upload-text');
|
||||
demoText.html('<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('filter-demo', n + '%'); // 可配合 layui 进度条元素使用
|
||||
if (n == 100) {
|
||||
layer.msg('上传完毕', { icon: 1 });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 获取分类列表
|
||||
$.get('<?php echo url("article/getcate"); ?>', function (res) {
|
||||
if (res.code == 0) {
|
||||
var html = '<option value="">请选择分类</option>';
|
||||
res.data.forEach(function (item) {
|
||||
// 如果cid为0,则设置为禁用
|
||||
var disabled = item.cid == 0 ? 'disabled' : '';
|
||||
html += '<option value="' + item.id + '" ' + disabled + '>' + item.name + '</option>';
|
||||
// 如果有子分类,添加子分类选项
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach(function (child) {
|
||||
html += '<option value="' + child.id + '">├─ ' + child.name + '</option>';
|
||||
});
|
||||
}
|
||||
});
|
||||
$('select[name="cate"]').html(html);
|
||||
form.render('select');
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
});
|
||||
|
||||
// 表单提交
|
||||
form.on('submit(formSubmit)', function (data) {
|
||||
// 获取编辑器内容
|
||||
var content = editor.getHtml();
|
||||
if (!content || content === '<p><br></p>') {
|
||||
layer.msg('请输入文章内容', { icon: 2 });
|
||||
return false;
|
||||
}
|
||||
|
||||
var loadIndex = layer.load(2);
|
||||
data.field.content = content;
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo url("article/add"); ?>',
|
||||
type: 'POST',
|
||||
data: data.field,
|
||||
success: function (res) {
|
||||
layer.close(loadIndex);
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () {
|
||||
window.location.href = '<?php echo url("article/articlelist"); ?>';
|
||||
}, 1000);
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- wangeditor编辑器脚本 -->
|
||||
<script>
|
||||
const { createEditor, createToolbar } = window.wangEditor
|
||||
|
||||
const editorConfig = {
|
||||
placeholder: '请输入内容...',
|
||||
onChange(editor) {
|
||||
const html = editor.getHtml()
|
||||
// console.log('editor content', html)
|
||||
// 也可以同步到 <textarea>
|
||||
},
|
||||
menus: [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文本颜色
|
||||
'backColor', // 背景颜色
|
||||
'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
'video', // 插入视频
|
||||
'audio', // 插入音频
|
||||
'table', // 表格
|
||||
'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo', // 重做
|
||||
],
|
||||
uploadImgServer: '/index/upload_imgs', // 图片上传接口
|
||||
}
|
||||
|
||||
const editor = createEditor({
|
||||
selector: '#editor-container',
|
||||
html: '<p><br></p>',
|
||||
config: editorConfig,
|
||||
mode: 'default', // or 'simple'
|
||||
})
|
||||
|
||||
const toolbarConfig = {}
|
||||
|
||||
const toolbar = createToolbar({
|
||||
editor,
|
||||
selector: '#toolbar-container',
|
||||
config: toolbarConfig,
|
||||
mode: 'default', // or 'simple'
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
//返回文章列表
|
||||
function goBack() {
|
||||
window.location.href = '<?php echo url("article/articlelist"); ?>';
|
||||
}
|
||||
</script>
|
||||
397
runtime/index/temp/69170ce622adbb0032543cdbee52d3fd.php
Normal file
@ -0,0 +1,397 @@
|
||||
<?php /*a:4:{s:49:"E:\Demo\PHP\yunzer\app\index\view\index\index.php";i:1746796639;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\header.php";i:1746796639;s:52:"E:\Demo\PHP\yunzer\app\index\view\component\main.php";i:1746805815;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\footer.php";i:1746796639;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<link rel="stylesheet" href="/static/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
|
||||
<script src="/static/layui/layui.js" charset="utf-8"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="display: flex;flex-direction: column;">
|
||||
<div class="topbar-one">
|
||||
<div class="container">
|
||||
<div style="width: 70%;">
|
||||
<ul class="list-unstyled topbar-one__info">
|
||||
<li class="topbar-one__info__item"><span class="topbar-one__info__icon fas fa-phone-alt"></span><a
|
||||
href="tel:629-555-0129">(629) 555-0129</a></li>
|
||||
<li class="topbar-one__info__item"><span class="topbar-one__info__icon fas fa-envelope"></span><a
|
||||
href="mailto:info@example.com">info@example.com</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="topbar-one__social" style="width: 30%;">
|
||||
<a href="https://facebook.com"><i class="fab fa-facebook-f"></i></a>
|
||||
<a href="https://twitter.com"><i class="fab fa-twitter"></i></a>
|
||||
<a href="https://instagram.com"><i class="fab fa-instagram"></i></a>
|
||||
<a href="https://www.youtube.com/"><i class="fab fa-linkedin"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 导航栏 -->
|
||||
<div class="main-menu">
|
||||
<div class="container">
|
||||
<div class="main-menu__logo">
|
||||
<a href="index.html"><img src="/static/images/logo.png" width="186" alt="Logo"></a>
|
||||
</div>
|
||||
<div class="main-menu__nav">
|
||||
<ul class="main-menu__list">
|
||||
<li><a href="index.html">首页</a></li>
|
||||
<li><a href="about.html">关于我们</a></li>
|
||||
<li><a href="products.html">产品服务</a></li>
|
||||
<li><a href="contact.html">联系我们</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="main-menu__right">
|
||||
<a href="#" class="main-menu__search"><i class="layui-icon layui-icon-search"></i></a>
|
||||
<a href="login.html" class="main-menu__login"><i class="layui-icon layui-icon-username"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-header">
|
||||
<!-- Banner轮播 -->
|
||||
<div class="layui-carousel" id="test10" lay-filter="test10">
|
||||
<div carousel-item="">
|
||||
<div>
|
||||
<div class="banner-content">
|
||||
<span class="banner-title">智能科技 引领未来</span>
|
||||
<span class="banner-desc">打造智能化解决方案,助力企业数字化转型,打造智能化解决方案,助力企业数字化转型,打造智能化解决方案,助力企业数字化转型</span>
|
||||
<a href="#" class="btn btn-primary" style="margin-top: 20px;width:150px">了解更多</a>
|
||||
</div>
|
||||
<a href="#" class="banner-slide">
|
||||
<img src="/static/images/banner/banner1.jpg" alt="Banner 1">
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div class="banner-content">
|
||||
<span class="banner-title">创新技术 卓越服务</span>
|
||||
<spanp class="banner-desc">以创新科技为核心,为客户提供优质服务</spanp>
|
||||
</div>
|
||||
<a href="#" class="banner-slide">
|
||||
<img src="/static/images/banner/banner2.jpg" alt="Banner 2">
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div class="banner-content">
|
||||
<span class="banner-title">专业团队 值得信赖</span>
|
||||
<spanp class="banner-desc">资深专家团队,为您提供专业的技术支持</spanp>
|
||||
</div>
|
||||
<a href="#" class="banner-slide">
|
||||
<img src="/static/images/banner/banner3.jpg" alt="Banner 3">
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div class="banner-content">
|
||||
<span class="banner-title">全球视野 本地服务</span>
|
||||
<span class="banner-desc">立足本地,放眼全球,打造国际化服务</span>
|
||||
</div>
|
||||
<a href="#" class="banner-slide">
|
||||
<img src="/static/images/banner/banner4.jpg" alt="Banner 4">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 固定导航 -->
|
||||
<div class="sticky-nav" style="display: none;">
|
||||
<div class="container">
|
||||
<div class="sticky-nav__logo">
|
||||
<a href="index.html"><img src="/static/images/logo.png" width="150" alt="Logo"></a>
|
||||
</div>
|
||||
<div class="sticky-nav__menu">
|
||||
<ul>
|
||||
<li><a href="index.html">首页</a></li>
|
||||
<li><a href="about.html">关于我们</a></li>
|
||||
<li><a href="products.html">产品服务</a></li>
|
||||
<li><a href="contact.html">联系我们</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sticky-nav__right">
|
||||
<a href="#" class="main-menu__search"><i class="layui-icon layui-icon-search"></i></a>
|
||||
<a href="login.html" class="main-menu__login"><i class="layui-icon layui-icon-username"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
layui.use(['carousel', 'form'], function(){
|
||||
var carousel = layui.carousel
|
||||
,form = layui.form;
|
||||
|
||||
//图片轮播
|
||||
carousel.render({
|
||||
elem: '#test10'
|
||||
,width: '100%'
|
||||
,height: '86vh'
|
||||
,interval: 4000
|
||||
});
|
||||
|
||||
var $ = layui.$, active = {
|
||||
set: function(othis){
|
||||
var THIS = 'layui-bg-normal'
|
||||
,key = othis.data('key')
|
||||
,options = {};
|
||||
|
||||
othis.css('background-color', '#5FB878').siblings().removeAttr('style');
|
||||
options[key] = othis.data('value');
|
||||
ins3.reload(options);
|
||||
}
|
||||
};
|
||||
|
||||
//监听开关
|
||||
form.on('switch(autoplay)', function(){
|
||||
ins3.reload({
|
||||
autoplay: this.checked
|
||||
});
|
||||
});
|
||||
|
||||
$('.demoSet').on('keyup', function(){
|
||||
var value = this.value
|
||||
,options = {};
|
||||
if(!/^\d+$/.test(value)) return;
|
||||
|
||||
options[this.name] = value;
|
||||
ins3.reload(options);
|
||||
});
|
||||
|
||||
// 监听滚动事件
|
||||
$(window).scroll(function() {
|
||||
var scrollTop = $(window).scrollTop();
|
||||
if (scrollTop > 150) { // 当滚动超过150px时显示固定导航
|
||||
$('.sticky-nav').fadeIn();
|
||||
} else {
|
||||
$('.sticky-nav').fadeOut();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<main class="main-content">
|
||||
<div class="container">
|
||||
<!-- 文章模块 -->
|
||||
<div class="core-block core-module" id="opencourse" style="order: 3;">
|
||||
<div class="module-header">
|
||||
<div>
|
||||
<div class="ModuleTitle_titleWrapper">
|
||||
<h3 class="ModuleTitle_title">站点新闻</h3>
|
||||
<div class="ModuleTitle_subtitle">新鲜资讯 尽在掌握</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="more-btn">更多</div>
|
||||
</div>
|
||||
<div class="product-list">
|
||||
<div class="opencourse product-item">
|
||||
<div class="video"><img data-v-4477fdbc=""
|
||||
src="https://static001.geekbang.org/resource/image/ff/b8/ff18d73bec1040abf3d7bc7bffb532b8.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
|
||||
alt="" class="cover"><!----></div>
|
||||
<div class="introduction">
|
||||
<div class="title">闪客 · 怎么理解 AI?</div>
|
||||
<div class="subtitle">闪客 | B 站知名科普 UP 主</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="desc">1025人学过</div>
|
||||
<!-- <div class="btn">观看: 123人</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="opencourse product-item">
|
||||
<div class="video"><img data-v-4477fdbc=""
|
||||
src="https://static001.geekbang.org/resource/image/76/cd/762ee7f34a76fbff61d20aae313833cd.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
|
||||
alt="" class="cover">
|
||||
</div>
|
||||
<div class="introduction">
|
||||
<div class="title">多模态对话引擎实战</div>
|
||||
<div class="subtitle">吴桐 | 网易云信音视频技术负责人,流媒体首席架构师</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="desc">380人学过</div>
|
||||
<!-- <div class="btn">观看: 123人</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="opencourse product-item">
|
||||
<div class="video"><img data-v-4477fdbc=""
|
||||
src="https://static001.geekbang.org/resource/image/4y/da/4yyfb232bfbfbdcc6ed827c16b04a9da.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
|
||||
alt="" class="cover"><!----></div>
|
||||
<div class="introduction">
|
||||
<div class="title">极客视点</div>
|
||||
<div class="subtitle">极客时间 | 编辑部</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="desc">12.4w人学过</div>
|
||||
<!-- <div class="btn">观看: 123人</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="opencourse product-item">
|
||||
<div class="video"><img data-v-4477fdbc=""
|
||||
src="https://static001.geekbang.org/resource/image/0f/69/0f95b62cf7yy6d6yy674f090d063b669.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
|
||||
alt="" class="cover"><!----></div>
|
||||
<div class="introduction">
|
||||
<div class="title">周志明的软件架构课</div>
|
||||
<div class="subtitle">周志明 | 博士,远光软件研究院院长,《深入理解Java虚拟机》《凤凰架构》等书作者</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="desc">6.0w人学过</div>
|
||||
<!-- <div class="btn">观看: 123人</div>d -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 文章模块 -->
|
||||
<div class="core-block core-module" id="opencourse" style="order: 3;">
|
||||
<div class="module-header">
|
||||
<div>
|
||||
<div class="ModuleTitle_titleWrapper">
|
||||
<h3 class="ModuleTitle_title">技术文章</h3>
|
||||
<div class="tab-container">
|
||||
<div class="tab-header">
|
||||
<div class="tab-item active" data-tab="all">全部</div>
|
||||
<?php foreach($articleList as $cateName => $articles): ?>
|
||||
<div class="tab-item" data-tab="<?php echo htmlentities((string) $cateName); ?>"><?php echo htmlentities((string) $cateName); ?></div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="more-btn">更多</div>
|
||||
</div>
|
||||
<div class="product-list">
|
||||
<!-- 全部文章 -->
|
||||
<div class="tab-content active" data-tab="all">
|
||||
<?php foreach($articleList as $cateName => $articles): foreach($articles as $article): ?>
|
||||
<div class="opencourse product-item">
|
||||
<div class="video">
|
||||
<img src="<?php echo htmlentities((string) $article['image']); ?>" alt="" class="cover">
|
||||
</div>
|
||||
<div class="introduction">
|
||||
<div class="title"><?php echo htmlentities((string) $article['title']); ?></div>
|
||||
<div class="subtitle"><?php echo htmlentities((string) $article['author']); ?></div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="desc"><?php echo htmlentities((string) $article['desc']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<!-- 分类文章 -->
|
||||
<?php foreach($articleList as $cateName => $articles): ?>
|
||||
<div class="tab-content" data-tab="<?php echo htmlentities((string) $cateName); ?>">
|
||||
<?php foreach($articles as $article): ?>
|
||||
<div class="opencourse product-item">
|
||||
<div class="video">
|
||||
<img src="<?php echo htmlentities((string) $article['image']); ?>" alt="" class="cover">
|
||||
</div>
|
||||
<div class="introduction">
|
||||
<div class="title"><?php echo htmlentities((string) $article['title']); ?></div>
|
||||
<div class="subtitle"><?php echo htmlentities((string) $article['author']); ?></div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="desc"><?php echo htmlentities((string) $article['desc']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// 获取所有tab项和内容
|
||||
const tabItems = document.querySelectorAll('.tab-item');
|
||||
const tabContents = document.querySelectorAll('.tab-content');
|
||||
|
||||
// 为每个tab项添加点击事件
|
||||
tabItems.forEach(tab => {
|
||||
tab.addEventListener('click', function () {
|
||||
// 移除所有active类
|
||||
tabItems.forEach(item => item.classList.remove('active'));
|
||||
tabContents.forEach(content => content.classList.remove('active'));
|
||||
|
||||
// 添加active类到当前点击的tab
|
||||
this.classList.add('active');
|
||||
|
||||
// 显示对应的内容
|
||||
const tabName = this.getAttribute('data-tab');
|
||||
const activeContent = document.querySelector(`.tab-content[data-tab="${tabName}"]`);
|
||||
if (activeContent) {
|
||||
activeContent.classList.add('active');
|
||||
}
|
||||
|
||||
// 添加切换动画效果
|
||||
activeContent.style.opacity = '0';
|
||||
setTimeout(() => {
|
||||
activeContent.style.opacity = '1';
|
||||
}, 50);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
<footer class="footer" style="background-image: url(/static/images/footer-bg-1.png)">
|
||||
<div class="container">
|
||||
<div class="row" style="width: 100%;">
|
||||
<div class="row-main">
|
||||
<div class="mr-20">
|
||||
<img src="/static/images/logo-l-w.png" alt="" height="70">
|
||||
<p class="text-white-50 my-4 f18" style="width: 400px;">美天智能科技,这里是介绍!</p>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between;width: 100%;margin-right: 200px;">
|
||||
<div>
|
||||
<h4 class="text-white f-20 font-weight-normal mb-3">关于我们</h4>
|
||||
<ul class="list-unstyled footer-sub-menu">
|
||||
<li><a href="#" class="footer-link">概况</a></li>
|
||||
<li><a href="#" class="footer-link">资讯</a></li>
|
||||
<li><a href="#" class="footer-link">加入我们</a></li>
|
||||
<li><a href="#" class="footer-link">联系我们</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="text-white f-20 font-weight-normal mb-3">商务合作</h4>
|
||||
<ul class="list-unstyled footer-sub-menu">
|
||||
<li><a href="#" class="footer-link">商务合作</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="text-white f-20 font-weight-normal mb-3">服务支持</h4>
|
||||
<ul class="list-unstyled footer-sub-menu">
|
||||
<li><a href="#" class="footer-link">常见问答</a></li>
|
||||
<li><a href="#" class="footer-link">软件下载</a></li>
|
||||
<li><a href="#" class="footer-link">服务政策</a></li>
|
||||
<li><a href="#" class="footer-link">投诉建议</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="text-center">
|
||||
<img src="/static/images/code.png" alt="微信二维码" class="img-fluid" style="max-width: 150px;">
|
||||
<p class="text-white-50 mt-2">微信公众号</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<section class="copyright text-center">
|
||||
<div class="container wow fadeInUp animated" data-wow-delay="400ms"
|
||||
style="visibility: visible; animation-delay: 400ms; animation-name: fadeInUp;">
|
||||
<p class="copyright__text">Copyright <span class="dynamic-year">2025</span> | All Rights By <a
|
||||
href="http://www.yunzer.cn">Yunzer</a></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||