Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
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
wangxuelai
biz.qingxiao.com
Commits
968c1773
Commit
968c1773
authored
Feb 14, 2020
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
闯关视频上传大小优化
parent
a6321435
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
createtheme.js
src/models/createtheme.js
+2
-2
ThemeEditor.js
src/pages/newtheme/ThemeEditor.js
+1
-1
ThemeEditor.js
src/pages/newtheme/customsclock/components/ThemeEditor.js
+1
-1
No files found.
src/models/createtheme.js
View file @
968c1773
...
...
@@ -1076,8 +1076,8 @@ export default {
progressCallBack
,
}
=
payload
;
const
file
=
files
.
files
?
files
.
files
[
0
]
:
null
;
if
(
file
&&
file
.
size
>
1
000
*
1024
*
1024
)
{
message
.
error
(
'视频的大小不能超过
1
GB,请重新上传'
,
1
);
if
(
file
&&
file
.
size
>
2
000
*
1024
*
1024
)
{
message
.
error
(
'视频的大小不能超过
2
GB,请重新上传'
,
1
);
return
;
}
const
REGEXP_VIDEO
=
/^video
\/\w
+/
;
...
...
src/pages/newtheme/ThemeEditor.js
View file @
968c1773
...
...
@@ -131,7 +131,7 @@ class ThemeEditor extends React.Component {
<
div
className
=
{
pageStyle
.
uploadimg
}
><
input
type
=
"file"
id
=
"uploadVoice"
className
=
{
pageStyle
.
fileuploadinput
}
onChange
=
{
editorUploadVoice
}
accept
=
"audio/mp3"
/><
Icon
style
=
{{
marginRight
:
10
}}
type
=
"audio"
/>
添加录音
<
/div
>
<
div
className
=
{
pageStyle
.
uploadimg
}
><
input
type
=
"file"
id
=
"uploadVideo"
className
=
{
pageStyle
.
fileuploadinput
}
onChange
=
{
editorUploadAudio
}
accept
=
"video/mp4,video/*"
/><
Icon
style
=
{{
marginRight
:
10
}}
type
=
"video-camera"
/>
添加视频
<
/div
>
<
/div
>
<
p
className
=
{
pageStyle
.
tip
}
>
请上传视频小于
1
G
,支持
MP4
格式
<
/p
>
<
p
className
=
{
pageStyle
.
tip
}
>
请上传视频小于
2
G
,支持
MP4
格式
<
/p
>
<
Modal
visible
=
{
previewVisible
}
footer
=
{
null
}
onCancel
=
{
this
.
handleCancel
}
>
<
img
alt
=
"图片"
style
=
{{
width
:
'100%'
}}
src
=
{
imagify
(
previewImage
)}
/
>
<
/Modal
>
...
...
src/pages/newtheme/customsclock/components/ThemeEditor.js
View file @
968c1773
...
...
@@ -140,7 +140,7 @@ class ThemeEditor extends React.Component {
<
div
className
=
{
pageStyle
.
uploadimg
}
><
input
type
=
"file"
id
=
"uploadVoice"
className
=
{
pageStyle
.
fileuploadinput
}
onChange
=
{
e
=>
editorUploadVoice
(
e
,
sort
)}
accept
=
"audio/mp3"
/><
Icon
style
=
{{
marginRight
:
10
}}
type
=
"audio"
/>
添加录音
<
/div
>
<
div
className
=
{
pageStyle
.
uploadimg
}
><
input
type
=
"file"
id
=
"uploadVideo"
className
=
{
pageStyle
.
fileuploadinput
}
onChange
=
{
e
=>
editorUploadAudio
(
e
,
sort
)}
accept
=
"video/mp4,video/*"
/><
Icon
style
=
{{
marginRight
:
10
}}
type
=
"video-camera"
/>
添加视频
<
/div
>
<
/div
>
<
p
>
请上传视频小于
1
G
,支持
MP4
格式
<
/p
>
<
p
>
请上传视频小于
2
G
,支持
MP4
格式
<
/p
>
<
/div
>
);
})
...
...
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