Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
national_museum_vod-H5
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fubaole
national_museum_vod-H5
Commits
bd1f729f
Commit
bd1f729f
authored
Apr 13, 2021
by
乐宝呗666
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改视频上传大小限制
parent
71a8cad5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
commitTab.vue
src/views/user/components/commitTab.vue
+10
-10
No files found.
src/views/user/components/commitTab.vue
View file @
bd1f729f
...
...
@@ -97,7 +97,7 @@
<img
src=
"@/assets/images/applets/tip.png"
alt
/>
<span>
最多支持上传
<b>
3
</b>
段视频,每段大小不能超过
<b>
5
MB
</b>
。
<b>
3
</b>
段视频,每段大小不能超过
<b>
10
MB
</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
(
"上传文件大小不能超过
5
MB"
);
this
.
$toast
.
fail
(
"上传文件大小不能超过
10
MB"
);
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment