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:
@@ -77,6 +77,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'system/common/footer.html' %}
|
||||
<script>
|
||||
layui.use(['form', 'layer', 'laydate'], function(){
|
||||
var form = layui.form;
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'system/common/footer.html' %}
|
||||
<script>
|
||||
layui.use(['form', 'layer', 'laydate'], function(){
|
||||
var form = layui.form;
|
||||
|
||||
Reference in New Issue
Block a user