fix(API): 修复文章发布时 publish_time 自动填充逻辑

统一处理 publish_time 参数,空字符串按未传处理。在创建和更新文章时,当文章状态为发布且未提供 publish_time 时,自动填充当前时间。同时修复更新文章时,从草稿首次发布且原 publish_time 为 0 时自动填充时间的逻辑。
This commit is contained in:
augushong
2026-05-01 20:57:20 +08:00
parent a09f7397cd
commit 0e3a442ddd
3 changed files with 32 additions and 5 deletions

View File

@@ -122,6 +122,7 @@
var vditor = new Vditor('editor-text-area', {
height: 'auto',
cache: { enable: false },
cdn: '/static/lib/vditor',
mode: 'wysiwyg',
toolbar: [
'headings', 'bold', 'italic', 'strike', '|',