Commit bd1f729f authored by 乐宝呗666's avatar 乐宝呗666

修改视频上传大小限制

parent 71a8cad5
......@@ -97,7 +97,7 @@
<img src="@/assets/images/applets/tip.png" alt />
<span>
最多支持上传
<b>3</b> 段视频,每段大小不能超过 <b>5MB</b>
<b>3</b> 段视频,每段大小不能超过 <b>10MB</b>
</span>
</div>
</div>
......@@ -202,12 +202,12 @@ export default {
beforeVideo(file) {
let isOver = true
if(Array.isArray(file)){
isOver = file.every(item=>item <= 5*1024*1024)
isOver = file.every(item=>item <= 10*1024*1024)
}else{
isOver = file.size <= 5*1024*1024
isOver = file.size <= 10*1024*1024
}
if(!isOver){
this.$toast.fail("上传文件大小不能超过 5MB");
this.$toast.fail("上传文件大小不能超过 10MB");
return false
}else{
return true
......@@ -307,6 +307,7 @@ export default {
)
.then((res) => {
if(res.data.resultCode==='200'){
this.$toast('上传成功')
res.data.data.fileList.forEach(item=>{
this.form.images.push(item.fileUrl);
this.imageIds.push(item.id);
......@@ -351,12 +352,11 @@ export default {
)
.then((res) => {
if(res.data.resultCode==='200'){
if(!this.timeOutVideo){
res.data.data.fileList.forEach(item=>{
this.form.videos.push(item.fileUrl);
this.videoIds.push(item.id);
})
}
this.$toast('上传成功')
res.data.data.fileList.forEach(item=>{
this.form.videos.push(item.fileUrl);
this.videoIds.push(item.id);
})
}else{
this.$toast(res.data.message)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment