提交 ec01706d 编写于 作者: dmx_mac's avatar dmx_mac

fix:音频bug修改

上级 98954c62
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
}, },
watch: { watch: {
musicList(newv) { musicList(newv) {
console.log(newv);
this.musicArr = newv || []; this.musicArr = newv || [];
}, },
}, },
...@@ -87,10 +88,11 @@ ...@@ -87,10 +88,11 @@
}, },
methods: { methods: {
musicUrl(item) { musicUrl(item) {
console.log(item);
if (item.url) { if (item.url) {
return item.url; return item.url;
} }
return item.response.data.domainPath + item.response.data.path; return item.data.domainPath + item.data.path;
}, },
beforeRemove() { beforeRemove() {
this.loading = true; this.loading = true;
...@@ -104,7 +106,8 @@ ...@@ -104,7 +106,8 @@
}, 1000); }, 1000);
}, },
sucess(fileList) { sucess(fileList) {
this.musicArr = fileList; console.log(fileList);
this.musicArr.push(fileList);
this.loading = false; this.loading = false;
}, },
errfn() { errfn() {
...@@ -116,10 +119,8 @@ ...@@ -116,10 +119,8 @@
const newArr = []; const newArr = [];
if (this.musicArr && this.musicArr.length) { if (this.musicArr && this.musicArr.length) {
this.musicArr.forEach((item) => { this.musicArr.forEach((item) => {
if (item.response) { if (item.data) {
newArr.push( newArr.push(item.data.domainPath + item.data.path);
item.response.data.domainPath + item.response.data.path
);
} else if (item.url && item.from) { } else if (item.url && item.from) {
newArr.push(item.url); newArr.push(item.url);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册