修改完成

This commit is contained in:
2026-09-13 19:41:13 +08:00
parent 15b301b358
commit d040507cb8
27 changed files with 2238 additions and 551 deletions
+13 -1
View File
@@ -302,7 +302,7 @@
if (trimOrUndefined(source.sortOrder) !== undefined && sortOrder === undefined) {
throw new Error('排序值必须是非负整数');
}
if (mediaOssIds !== undefined) body.mediaOssIds = mediaOssIds;
if (source.mediaOssIds !== undefined) body.mediaOssIds = mediaOssIds || '';
if (status !== undefined) body.status = status;
if (sortOrder !== undefined) body.sortOrder = sortOrder;
return body;
@@ -618,11 +618,22 @@
function fillFeedForm(data) {
var feed = normalizeFeed(data);
var contentField;
var contentEditor;
if (!feed) throw new Error('动态响应缺少 feedId 或 feedContent,请联系后端补充 DTO。');
queryAll('[data-feed-form] [name]').forEach(function (field) {
if (feed[field.name] !== undefined && feed[field.name] !== null) field.value = feed[field.name];
});
contentField = query('[data-feed-form] [name="feedContent"]');
if (contentField && root.AppRichEditor && root.AppRichEditor.init) {
contentEditor = root.AppRichEditor.init(contentField);
if (contentEditor && contentEditor.editor && contentEditor.editor.setHtml) {
contentEditor.editor.setHtml(feed.feedContent);
contentEditor.sync();
}
}
root.AttachmentEditor.setFiles('#feedMedia', data.mediaFiles || []);
}
function canEditFeeds(genealogy) {
@@ -788,6 +799,7 @@
setFeedFormStatus('');
} catch (error) {
if (redirectUnauthorized(api, error)) return;
setFeedFormEnabled(false);
setFeedFormStatus(
getApiStateType(error) === 'forbidden' ? '当前账号无权维护该家谱的动态。' : (error.message || '动态详情加载失败'),
getApiStateType(error)