fix(web): 本地优先保存与 design 页体验修复

- 保存先写本地缓存,登录后可选云端同步;退出登录不再因文件操作跳转登录

- 修复 Layui 遮罩残留、design2 保存后线条、toast 被 finally 提前关闭

- 保存过程恢复 loading spinner;成功提示 2.5 秒

- 云端 payload 瘦身与体积超限提示;后端 schema 迁移与 FileService 容错

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
24kycj
2026-06-24 19:24:34 +08:00
parent 4d19d7e814
commit 5fb269cc0a
36 changed files with 894 additions and 358 deletions
@@ -87,19 +87,20 @@
var form = '<div class="soon-admin-form">' +
Form().field('配置键', '<input class="soon-input soon-input--sm" value="' + I().esc(key) + '" disabled>') +
Form().field('配置值', Form().input('settingVal', { value: val, type: 'textarea', rows: 5 })) +
'<button type="button" class="soon-btn soon-btn--sm" id="adminModalSave">保存</button></div>';
Form().actions('保存', 'adminModalSave') + '</div>';
Ui().openFormModal('修改 ' + key, form, function () {
Ui().confirm('确认保存该配置?', function () {
var saveBtn = Ui().el('adminModalSave');
Ui().setBtnLoading(saveBtn, true);
Api().postJson('settings', { key: key, value: Ui().el('settingVal').value }).then(function (r) {
if (r) {
layer.closeAll();
soonLayerDismiss();
soonToast('配置已保存', 'success');
render();
}
}).finally(function () {
Ui().setBtnLoading(saveBtn, false);
if (typeof window.soonCleanupLayerMask === 'function') window.soonCleanupLayerMask();
});
});
});