Browse Source

帖子编辑附件带上id

dev
kola-web 10 hours ago
parent
commit
3a3eecdfc5
  1. 5
      src/pages/wallForm/index.ts

5
src/pages/wallForm/index.ts

@ -68,12 +68,14 @@ Page({
const fileList = (res.attachments || []).map((item: any) => { const fileList = (res.attachments || []).map((item: any) => {
if (item.attachmentType == 2) { if (item.attachmentType == 2) {
return { return {
id: item.id,
fileType: 'video', fileType: 'video',
url: item.videoCoverUrl || '', url: item.videoCoverUrl || '',
videoUrl: item.attachmentUrl || '', videoUrl: item.attachmentUrl || '',
} }
} }
return { return {
id: item.id,
fileType: 'image', fileType: 'image',
url: item.attachmentUrl || '', url: item.attachmentUrl || '',
} }
@ -155,6 +157,9 @@ Page({
if (isVideo) { if (isVideo) {
attachment.videoCoverUrl = item.url attachment.videoCoverUrl = item.url
} }
if (item.id) {
attachment.id = item.id
}
return attachment return attachment
}) })
}, },

Loading…
Cancel
Save