fix(cookieManager): 修复新增/编辑页面点击保存无响应

原因1:cookie 四个页面(add/edit x user/site)缺少 {% include 'system/common/footer.html' %},
导致 layui.js/pear.js 未加载,layui.use 报错,提交按钮的 submit 事件从未绑定。
原因2:expiry 字段为空字符串时直接写入 DateTime 列,SQLite 抛
TypeError(SQLite DateTime type only accepts Python datetime and date objects)。
新增 _parse_expiry 辅助函数:空值转 None,非空按格式解析为 datetime。
已用 Playwright 真机验证:新增/编辑均返回 200 且数据落库。
This commit is contained in:
bwstudio
2026-09-09 21:54:27 +08:00
parent 2848a9ad0b
commit 63cb897f8c
6 changed files with 36 additions and 4 deletions
@@ -72,6 +72,7 @@
</div>
</div>
{% include 'system/common/footer.html' %}
<script>
layui.use(['form', 'layer', 'laydate'], function(){
var form = layui.form;