feat: 完善人生轨迹详情页功能及微信小程序登录优化
This commit is contained in:
@@ -95,6 +95,10 @@ const transformToBackendFormat = (frontendData) => {
|
||||
character,
|
||||
events,
|
||||
plotJson,
|
||||
conversationId,
|
||||
parentScriptId,
|
||||
revisionIndex,
|
||||
revisionOf,
|
||||
useSocialInsights
|
||||
} = frontendData
|
||||
|
||||
@@ -112,7 +116,14 @@ const transformToBackendFormat = (frontendData) => {
|
||||
plotTurning: frontendData.plotTurning || '',
|
||||
plotClimax: frontendData.plotClimax || '',
|
||||
plotEnding: frontendData.plotEnding || '',
|
||||
plotJson: plotJson || (content ? { fullContent: content } : null),
|
||||
plotJson: {
|
||||
...(content ? { fullContent: content } : {}),
|
||||
...(plotJson || {}),
|
||||
...(conversationId ? { conversationId } : {}),
|
||||
...(parentScriptId ? { parentScriptId } : {}),
|
||||
...(revisionIndex ? { revisionIndex } : {}),
|
||||
...(revisionOf ? { revisionOf } : {})
|
||||
},
|
||||
isSelected,
|
||||
characterInfo,
|
||||
lifeEventsSummary,
|
||||
@@ -171,6 +182,10 @@ export const transformToFrontendFormat = (backendData) => {
|
||||
date: createTime ? String(createTime).slice(0, 10) : new Date().toLocaleDateString(),
|
||||
mode: plotJson?.mode || 'custom',
|
||||
prompt: plotJson?.prompt || '',
|
||||
conversationId: plotJson?.conversationId || '',
|
||||
parentScriptId: plotJson?.parentScriptId || '',
|
||||
revisionIndex: plotJson?.currentRevisionIndex || plotJson?.revisionIndex || 0,
|
||||
revisionOf: plotJson?.revisionOf || '',
|
||||
wordCount: content ? content.length : 0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user