统一pickupFile2Server, pickupFile2Cloud, pickupFile的返回对象为 { _state, ?fileUrl, ...rest }

This commit is contained in:
陆柯 2021-10-15 20:30:15 +08:00
parent c6f4c9ba6e
commit 87c11cacaa

View File

@ -53,18 +53,18 @@ export default {
if (!Array.isArray(this.storyContent)) {
this.storyContent = []
}
let { _state, fileID, requestId } = await this.$T.pickupFile2Cloud({ mediaType: 'image' })
let { _state, fileUrl, ...rest } = await this.$T.pickupFile2Cloud({ mediaType: 'image' })
if (_state === 'SUCCESS') {
this.storyContent.push({ image: fileID })
this.storyContent.push({ image: fileUrl })
}
},
async addVideo() {
if (!Array.isArray(this.storyContent)) {
this.storyContent = []
}
let { _state, fileID, requestId } = await this.$T.pickupFile2Cloud({ mediaType: 'video' })
let { _state, fileUrl, ...rest } = await this.$T.pickupFile2Cloud({ mediaType: 'video' })
if (_state === 'SUCCESS') {
this.storyContent.push({ video: fileID })
this.storyContent.push({ video: fileUrl })
}
},
deleteSection(index) {