Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cdsf-wx-app
Project
Overview
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
姜雷
cdsf-wx-app
Commits
84b9343c
Commit
84b9343c
authored
Oct 09, 2018
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加上传文件大小限制
parent
22f6a439
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
ReprtRepair.js
src/containers/Repair/ReprtRepair.js
+13
-2
No files found.
src/containers/Repair/ReprtRepair.js
View file @
84b9343c
...
@@ -137,11 +137,11 @@ class ReprtRepair extends Component {
...
@@ -137,11 +137,11 @@ class ReprtRepair extends Component {
Toast
.
fail
(
'请选择报修人身份!'
);
Toast
.
fail
(
'请选择报修人身份!'
);
return
;
return
;
}
}
if
(
!
applyForm
.
area
Id
)
{
if
(
!
applyForm
.
area
)
{
Toast
.
fail
(
'请选择报修区域!'
);
Toast
.
fail
(
'请选择报修区域!'
);
return
;
return
;
}
}
if
(
!
applyForm
.
term
Id
)
{
if
(
!
applyForm
.
term
)
{
Toast
.
fail
(
'请选择报修项目!'
);
Toast
.
fail
(
'请选择报修项目!'
);
return
;
return
;
}
}
...
@@ -149,6 +149,17 @@ class ReprtRepair extends Component {
...
@@ -149,6 +149,17 @@ class ReprtRepair extends Component {
Toast
.
fail
(
'请输入报修地址!'
);
Toast
.
fail
(
'请输入报修地址!'
);
return
;
return
;
}
}
let
imgList
=
applyForm
.
uploadImg
.
filter
(
i
=>
i
!==
null
);
if
(
imgList
.
length
)
{
let
size
=
imgList
.
reduce
((
totle
,
item
)
=>
{
let
fileSize
=
item
.
filesList
[
0
].
size
;
return
totle
+
fileSize
;
},
0
);
if
(
size
>
10485760
)
{
Toast
.
fail
(
'上传图片过大!'
);
return
;
}
}
return
true
;
return
true
;
};
};
startApply
=
()
=>
{
startApply
=
()
=>
{
...
...
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