Files
YwxAppThink/app/frontend/view/common/layout.html
T
yangwx 18101cf11a feat: 上线前安全加固与发布工程化;appmall 由插件迁移为独立应用
安全(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(市场 / 开发者中心 / 审核 / 分润)
2026-10-22 00:53:39 +08:00

134 lines
5.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{$title|default='YwxApp'}</title>
<meta name="keywords" content="{$seo_keywords|default=''}">
<meta name="description" content="{$seo_description|default=''}">
<link rel="stylesheet" href="/assets/layui/css/layui.css">
<link rel="stylesheet" href="/static/frontend/css/responsive.css?v=3.0">
<link rel="stylesheet" href="/static/frontend/css/style.css?v=1.2">
{block name="style"}{/block}
{:hook('frontend.layout.head')}
</head>
<body>
{:hook('frontend.layout.body_start')}
{include file="common/header" /}
<main class="main-wrapper">
{__CONTENT__}
</main>
{include file="common/footer" /}
{:hook('frontend.layout.body_end')}
<!-- 首页底部广告位(全站预埋钩子:仅当挂在首页时由 index 页控制,此处留作通用容器) -->
{notempty name="adSlots.home_bottom"}
<div class="ad-slot ad-slot-home_bottom">
{volist name="adSlots.home_bottom" id="ad"}
<div class="ad-item ad-type-{$ad.type}">
{switch name="ad.type"}
{case value="1"}<a href="{$ad.url}" target="_blank" rel="nofollow"><img src="{$ad.image}" alt="{$ad.title}" title="{$ad.title}"></a>{/case}
{case value="2"}<a href="{$ad.url}" target="_blank" rel="nofollow" class="ad-text-link">{$ad.content}</a>{/case}
{case value="3"}{$ad.content|raw}{/case}
{/switch}
</div>
{/volist}
</div>
{/notempty}
<!-- 全站悬浮角标广告位(固定右下角,无数据时自动隐藏) -->
{notempty name="adSlots.float"}
<div class="ad-float" id="adFloat">
{volist name="adSlots.float" id="ad"}
<div class="ad-float-item ad-type-{$ad.type}">
{switch name="ad.type"}
{case value="1"}<a href="{$ad.url}" target="_blank" rel="nofollow"><img src="{$ad.image}" alt="{$ad.title}" title="{$ad.title}"></a>{/case}
{case value="2"}<a href="{$ad.url}" target="_blank" rel="nofollow" class="ad-text-link">{$ad.content}</a>{/case}
{case value="3"}{$ad.content|raw}{/case}
{/switch}
</div>
{/volist}
<span class="ad-float-close" id="adFloatClose" title="关闭">×</span>
</div>
{/notempty}
<!-- 全站弹窗广告位 -->
{notempty name="adSlots.popup"}
<div class="ad-popup-mask" id="adPopupMask">
<div class="ad-popup-box">
<span class="ad-popup-close" id="adPopupClose" title="关闭">×</span>
{volist name="adSlots.popup" id="ad"}
<div class="ad-popup-item ad-type-{$ad.type}">
{switch name="ad.type"}
{case value="1"}
{if condition="$ad.url"}<a href="{$ad.url}" target="_blank" rel="nofollow">{/if}
<img src="{$ad.image}" alt="{$ad.title}" title="{$ad.title}">
{if condition="$ad.url"}</a>{/if}
{/case}
{case value="2"}
{if condition="$ad.url"}<a href="{$ad.url}" target="_blank" rel="nofollow" class="ad-text-link">{/if}{$ad.content}{if condition="$ad.url"}</a>{/if}
{/case}
{case value="3"}
{$ad.content|raw}
{/case}
{/switch}
</div>
{/volist}
</div>
</div>
{/notempty}
<script src="/assets/layui/layui.js"></script>
<script src="/static/frontend/js/main.js?v=2.1"></script>
{block name="script"}{/block}
<script>
(function () {
var mask = document.getElementById('adPopupMask');
if (!mask) return;
var KEY = 'closed_popup_ads';
try {
if (localStorage.getItem(KEY) === '1') { mask.style.display = 'none'; return; }
} catch (e) {}
mask.style.display = 'flex';
var closeBtn = document.getElementById('adPopupClose');
if (closeBtn) {
closeBtn.addEventListener('click', function () {
mask.style.display = 'none';
try { localStorage.setItem(KEY, '1'); } catch (e) {}
});
mask.addEventListener('click', function (e) {
if (e.target === mask) {
mask.style.display = 'none';
try { localStorage.setItem(KEY, '1'); } catch (e) {}
}
});
}
})();
// 全站悬浮角标广告:关闭按钮
(function () {
var box = document.getElementById('adFloat');
if (!box) return;
var KEY = 'closed_float_ads';
try {
if (localStorage.getItem(KEY) === '1') { box.style.display = 'none'; return; }
} catch (e) {}
var closeBtn = document.getElementById('adFloatClose');
if (closeBtn) {
closeBtn.addEventListener('click', function (e) {
e.stopPropagation();
box.style.display = 'none';
try { localStorage.setItem(KEY, '1'); } catch (e2) {}
});
}
})();
</script>
</body>
</html>