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
2ab202a4
Commit
2ab202a4
authored
Oct 15, 2018
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
Develop See merge request
!9
parents
4190cadd
d95b03dd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
18 deletions
+35
-18
PublicCarItem.js
src/containers/PublicCar/components/PublicCarItem.js
+6
-0
ReprtRepair.js
src/containers/Repair/ReprtRepair.js
+21
-16
RepairItem.js
src/containers/Repair/components/RepairItem.js
+1
-1
style.css
src/containers/Repair/components/style.css
+1
-1
style.css
src/containers/Repair/style.css
+2
-0
index.js
src/utils/index.js
+4
-0
No files found.
src/containers/PublicCar/components/PublicCarItem.js
View file @
2ab202a4
...
@@ -153,6 +153,12 @@ class PublicCarItem extends Component {
...
@@ -153,6 +153,12 @@ class PublicCarItem extends Component {
{
this
.
getCategoryValue
(
data
.
categoryName
)}
{
this
.
getCategoryValue
(
data
.
categoryName
)}
<
/div
>
<
/div
>
<
/div>
,
<
/div>
,
<
div
key
=
"line"
className
=
{
styles
.
listLine
}
>
<
div
className
=
{
styles
.
listLabel
}
>
用车路线:
<
/div
>
<
div
className
=
{
styles
.
listValue
}
>
{
data
.
lineDescription
}
<
/div
>
<
/div>
,
]}
]}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/containers/Repair/ReprtRepair.js
View file @
2ab202a4
...
@@ -17,6 +17,7 @@ import store from '../../store/index';
...
@@ -17,6 +17,7 @@ import store from '../../store/index';
import
UserInfoContext
from
'../../context/userinfo-context'
;
import
UserInfoContext
from
'../../context/userinfo-context'
;
import
offCheckIcon
from
'../../images/Check/radio_off_btn@2x.png'
;
import
offCheckIcon
from
'../../images/Check/radio_off_btn@2x.png'
;
import
onCheckIcon
from
'../../images/Check/radio_on_btn@2x.png'
;
import
onCheckIcon
from
'../../images/Check/radio_on_btn@2x.png'
;
import
{
emojiFilter
}
from
'../../utils/index'
;
class
ReprtRepair
extends
Component
{
class
ReprtRepair
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -29,9 +30,9 @@ class ReprtRepair extends Component {
...
@@ -29,9 +30,9 @@ class ReprtRepair extends Component {
repairCellphone
:
props
.
userinfo
.
cellphone
,
repairCellphone
:
props
.
userinfo
.
cellphone
,
applyIdentity
:
'学生'
,
applyIdentity
:
'学生'
,
area
:
''
,
area
:
''
,
areaId
:
''
,
areaId
:
[]
,
term
:
''
,
term
:
''
,
termId
:
''
,
termId
:
[]
,
address
:
''
,
address
:
''
,
uploadImg
:
[
null
,
null
,
null
],
uploadImg
:
[
null
,
null
,
null
],
},
},
...
@@ -79,9 +80,9 @@ class ReprtRepair extends Component {
...
@@ -79,9 +80,9 @@ class ReprtRepair extends Component {
repairCellphone
:
userinfo
.
cellphone
,
repairCellphone
:
userinfo
.
cellphone
,
applyIdentity
:
'学生'
,
applyIdentity
:
'学生'
,
area
:
''
,
area
:
''
,
areaId
:
''
,
areaId
:
[]
,
term
:
''
,
term
:
''
,
termId
:
''
,
termId
:
[]
,
address
:
''
,
address
:
''
,
uploadImg
:
[
null
,
null
,
null
],
uploadImg
:
[
null
,
null
,
null
],
},
},
...
@@ -92,7 +93,7 @@ class ReprtRepair extends Component {
...
@@ -92,7 +93,7 @@ class ReprtRepair extends Component {
this
.
setState
(({
applyForm
})
=>
({
this
.
setState
(({
applyForm
})
=>
({
applyForm
:
{
applyForm
:
{
...
applyForm
,
...
applyForm
,
[
name
]:
value
,
[
name
]:
emojiFilter
(
value
)
,
},
},
}));
}));
};
};
...
@@ -141,11 +142,11 @@ class ReprtRepair extends Component {
...
@@ -141,11 +142,11 @@ class ReprtRepair extends Component {
Toast
.
fail
(
'请选择报修人身份!'
);
Toast
.
fail
(
'请选择报修人身份!'
);
return
;
return
;
}
}
if
(
!
applyForm
.
areaId
)
{
if
(
!
applyForm
.
areaId
.
length
)
{
Toast
.
fail
(
'请选择报修区域!'
);
Toast
.
fail
(
'请选择报修区域!'
);
return
;
return
;
}
}
if
(
!
applyForm
.
termId
)
{
if
(
!
applyForm
.
termId
.
length
)
{
Toast
.
fail
(
'请选择报修项目!'
);
Toast
.
fail
(
'请选择报修项目!'
);
return
;
return
;
}
}
...
@@ -200,18 +201,22 @@ class ReprtRepair extends Component {
...
@@ -200,18 +201,22 @@ class ReprtRepair extends Component {
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
const
{
data
}
=
res
;
const
{
data
}
=
res
;
const
{
history
}
=
this
.
props
;
if
(
data
.
code
&&
data
.
code
===
1000
)
{
console
.
log
(
'resetForm'
);
const
{
data
}
=
res
;
this
.
resetApplyForm
();
const
{
history
}
=
this
.
props
;
// Toast.hide();
console
.
log
(
'resetForm'
);
Toast
.
success
(
data
.
msg
);
this
.
resetApplyForm
();
history
.
replace
(
'/repair/RepairList'
);
// Toast.hide();
Toast
.
success
(
data
.
msg
);
history
.
replace
(
'/repair/RepairList'
);
}
else
{
throw
{
msg
:
data
.
msg
};
}
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
const
{
data
}
=
err
;
// Toast.hide();
// Toast.hide();
Toast
.
fail
(
data
.
msg
||
'提交失败!'
);
Toast
.
fail
(
err
.
msg
||
'提交失败!'
);
});
});
};
};
resetDialog
=
()
=>
{
resetDialog
=
()
=>
{
...
@@ -369,7 +374,7 @@ class ReprtRepair extends Component {
...
@@ -369,7 +374,7 @@ class ReprtRepair extends Component {
this
.
setState
(({
applyForm
})
=>
({
this
.
setState
(({
applyForm
})
=>
({
applyForm
:
{
applyForm
:
{
...
applyForm
,
...
applyForm
,
address
:
val
.
replace
(
/
\n
/
,
''
),
address
:
emojiFilter
(
val
.
replace
(
/
\n
/
,
''
)
),
},
},
}))
}))
}
}
...
...
src/containers/Repair/components/RepairItem.js
View file @
2ab202a4
...
@@ -118,7 +118,7 @@ class RepairItem extends Component {
...
@@ -118,7 +118,7 @@ class RepairItem extends Component {
<
/div>
,
<
/div>
,
<
div
key
=
"address"
className
=
{
styles
.
listLineArea
}
>
<
div
key
=
"address"
className
=
{
styles
.
listLineArea
}
>
<
div
className
=
{
styles
.
listLabel
}
>
报修事项:
<
/div
>
<
div
className
=
{
styles
.
listLabel
}
>
报修事项:
<
/div
>
<
div
className
=
{
styles
.
listValue
}
>
{
data
.
a
ddress
}
<
/div
>
<
div
className
=
{
styles
.
listValue
}
>
{
data
.
a
ffair
}
<
/div
>
<
/div>
,
<
/div>
,
]}
]}
<
/div
>
<
/div
>
...
...
src/containers/Repair/components/style.css
View file @
2ab202a4
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
}
}
.listValueMutLine
{
.listValueMutLine
{
white-space
:
pre-
wrap
;
white-space
:
wrap
;
word-break
:
break-all
;
word-break
:
break-all
;
}
}
.listLabel
{
.listLabel
{
...
...
src/containers/Repair/style.css
View file @
2ab202a4
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
flex
:
auto
;
flex
:
auto
;
overflow-y
:
auto
;
overflow-y
:
auto
;
-webkit-overflow-scrolling
:
touch
;
-webkit-overflow-scrolling
:
touch
;
padding-bottom
:
20px
;
}
}
.footerTopLine
{
.footerTopLine
{
position
:
absolute
;
position
:
absolute
;
...
@@ -21,6 +22,7 @@
...
@@ -21,6 +22,7 @@
align-items
:
center
;
align-items
:
center
;
font-size
:
30px
;
font-size
:
30px
;
border-top
:
1px
solid
#dee0de
;
border-top
:
1px
solid
#dee0de
;
overflow
:
hidden
;
}
}
.line
{
.line
{
width
:
2px
;
width
:
2px
;
...
...
src/utils/index.js
View file @
2ab202a4
...
@@ -30,3 +30,7 @@ export function formatDate(date, fmt) {
...
@@ -30,3 +30,7 @@ export function formatDate(date, fmt) {
function
padLeftZero
(
str
)
{
function
padLeftZero
(
str
)
{
return
(
'00'
+
str
).
substr
(
str
.
length
);
return
(
'00'
+
str
).
substr
(
str
.
length
);
}
}
export
const
emojiFilter
=
str
=>
{
return
str
.
replace
(
/
\u
D83C
[\u
DF00-
\u
DFFF
]
|
\u
D83D
[\u
DC00-
\u
DE4F
]
/g
,
''
);
};
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