feat(期刊修改): 期刊修改支持上传音乐

dev
zhangjiabao 11 months ago
parent bf858f0657
commit a0eb4f0e3a

@ -94,7 +94,7 @@
:before-remove="beforeRemove" :before-remove="beforeRemove"
:on-change="handleUploadSongSuccess" :on-change="handleUploadSongSuccess"
multiple multiple
:limit="1" name="files"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:file-list="songUploadFileList" :file-list="songUploadFileList"
:headers="uploadHeader" :headers="uploadHeader"
@ -530,6 +530,13 @@ export default {
handleUploadSongSuccess(response, file, fileList) { handleUploadSongSuccess(response, file, fileList) {
if (response.status === "success") { if (response.status === "success") {
this.$message.success("上传成功"); this.$message.success("上传成功");
let newSongList = response.response.data;
console.log(newSongList);
for (let songIndex in newSongList) {
newSongList[songIndex]["duration"] = null;
newSongList[songIndex]["size"] = null;
this.data.songs.push(newSongList[songIndex]);
}
} }
}, },
// ************************* ************************* // ************************* *************************

Loading…
Cancel
Save