安全(P0) - 发布包签名:新增 scripts/package_keygen.php、scripts/package_verify.php、 ywxapp\service\PackageVerifier;FrameworkService::apply() 解压前强制验签 (ywxapp.framework_package_verify,默认开启) - JWT 收紧:config/jwt.php 移除公开默认密钥,JwtService::assertStrongSecret() 校验非空 / 长度≥32 / 已知弱值;.env.production.example 键名由 JWT_SECRET_KEY 修正为 JWT_SECRET - /api/v1/Article:免登录白名单收窄为只读接口,写操作字段白名单 + assertOwner() 越权校验 - 开发者令牌:查找接口不再回显明文、统一失败文案 + 限流 - TemplateInstaller:文件名白名单 + realpath 归一化 + 目录内断言,修复 Zip Slip;补 use ZipArchive - 后台登录:接入验证码、失败锁定与登录限流(config/ratelimit.php) - 缓存 / Session 驱动可由 .env 覆盖(CACHE_DRIVER / SESSION_TYPE),集群部署改 redis - paycenter 支付日志开关改为 PAY_LOG,不再跟随 APP_DEBUG 工程化 / 交付 - 新增 CHANGELOG.md 与 .env.production.example;composer.lock 入库锁定依赖版本 - 插件离线安装 CLI 增加 --uid,后台上传安装透传 uid,付费插件授权校验可通过 - 授权拒绝文案区分「未携带 uid」与「未找到有效授权」,便于排障 - .gitignore 放行 .env.production.example / .env.addon.example / .gitattributes / public/.htaccess 结构 - appmall 由 addon/appmall 迁移为独立应用 app/appmall(市场 / 开发者中心 / 审核 / 分润)
90 lines
4.1 KiB
HTML
90 lines
4.1 KiB
HTML
<div class="layui-card">
|
|
<div class="layui-card-header">
|
|
<span>文档项目</span>
|
|
<div class="layui-inline" style="float:right;">
|
|
<a class="layui-btn layui-btn-sm" href="/docs/backend/project/add">新增项目</a>
|
|
<a class="layui-btn layui-btn-sm layui-btn-primary" href="{:docs_base_url()}" target="_blank">查看前台</a>
|
|
</div>
|
|
</div>
|
|
<div class="layui-card-body">
|
|
<form class="layui-form docs-scope-bar" method="get" action="/docs/backend/project">
|
|
<div class="layui-form-item">
|
|
<div class="layui-inline">
|
|
<input type="text" name="keyword" value="{$keyword|default=''}" placeholder="按项目名称或标识搜索" autocomplete="off" class="layui-input">
|
|
</div>
|
|
<div class="layui-inline">
|
|
<button class="layui-btn" type="submit">搜索</button>
|
|
<a class="layui-btn layui-btn-primary" href="/docs/backend/project">重置</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<table class="layui-table">
|
|
<colgroup>
|
|
<col width="70"><col width="150"><col><col width="130"><col width="90"><col width="90"><col width="80"><col width="90"><col width="200">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th><th>标识</th><th>项目名称</th><th>归属插件</th>
|
|
<th>版本数</th><th>文档数</th><th>排序</th><th>状态</th><th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{volist name="list" id="item" empty="<tr><td colspan='9' class='docs-empty'>暂无文档项目,点击右上角新增</td></tr>"}
|
|
<tr>
|
|
<td>{$item.id}</td>
|
|
<td><code>{$item.name}</code></td>
|
|
<td>
|
|
{$item.title}
|
|
{if condition="$item.intro neq ''"}<div class="docs-tip">{$item.intro}</div>{/if}
|
|
</td>
|
|
<td>{if condition="$item.addon neq ''"}{$item.addon}{else/}<span class="docs-tip">框架自身</span>{/if}</td>
|
|
<td>{$item.version_count}</td>
|
|
<td>{$item.doc_count}</td>
|
|
<td>{$item.sort}</td>
|
|
<td>
|
|
{if condition="$item.status eq 1"}
|
|
<span class="layui-badge layui-bg-blue">启用</span>
|
|
{else/}
|
|
<span class="layui-badge layui-bg-gray">禁用</span>
|
|
{/if}
|
|
</td>
|
|
<td>
|
|
<a class="layui-btn layui-btn-xs" href="/docs/backend/project/edit/{$item.id}">编辑</a>
|
|
<a class="layui-btn layui-btn-xs layui-btn-normal" href="/docs/backend/doc?project_id={$item.id}">管理文档</a>
|
|
<a class="layui-btn layui-btn-xs layui-btn-danger docs-del" href="javascript:;" data-id="{$item.id}" data-title="{$item.title}">删除</a>
|
|
</td>
|
|
</tr>
|
|
{/volist}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
layui.use(['layer', 'jquery', 'http', 'ywxapp'], function () {
|
|
var http = layui.http;
|
|
var layer = layui.layer;
|
|
var $ = layui.$;
|
|
|
|
$('.docs-del').on('click', function () {
|
|
var id = $(this).data('id');
|
|
var title = $(this).data('title');
|
|
layer.confirm('删除项目「' + title + '」将同时删除其下所有版本与文档,确定继续?', {
|
|
icon: 3, title: '确认删除'
|
|
}, function (index) {
|
|
layer.close(index);
|
|
http.post('/docs/backend/project/delete/' + id, {}).then(function (res) {
|
|
if (res.code === 0) {
|
|
layer.msg(res.message, { icon: 1 }, function () { location.reload(); });
|
|
} else {
|
|
layer.msg(res.message || '删除失败', { icon: 2 });
|
|
}
|
|
}).fail(function () {
|
|
layer.msg('请求失败,请重试', { icon: 2 });
|
|
});
|
|
});
|
|
});
|
|
});
|
|
</script>
|