Browse Source

帖子编辑附件带上id

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

5
src/pages/wallForm/index.ts

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

Loading…
Cancel
Save