@@ -100,6 +100,7 @@
return {
accept: '.mp4',
id: '',
+ isLoading: false,
search: {
current: 1,
size: 10,
@@ -188,6 +189,7 @@
let formData = new FormData()
formData.append('file', file.file)
formData.append('bizType', 1)
+ this.isLoading = true
this.instance.post(`/admin/file/addVideo`, formData).then(res => {
if (res && res.data) {
let videoList = res.data[0].split(";")
@@ -201,6 +203,10 @@
url: videoList[0]
}]
}
+
+ this.isLoading = false
+ }).catch(() => {
+ this.isLoading = false
})
} else {
return this.$message.error("视频格式错误")