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
05c741e2
Commit
05c741e2
authored
Sep 29, 2018
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
带出用户数据
parent
e40e259b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
PublicCarApply.js
src/containers/PublicCar/PublicCarApply.js
+8
-3
ReprtRepair.js
src/containers/Repair/ReprtRepair.js
+8
-3
No files found.
src/containers/PublicCar/PublicCarApply.js
View file @
05c741e2
...
@@ -4,6 +4,7 @@ import { applyPublicCar, fetchCarCategory } from '../../api/index';
...
@@ -4,6 +4,7 @@ import { applyPublicCar, fetchCarCategory } from '../../api/index';
import
styles
from
'./style.css'
;
import
styles
from
'./style.css'
;
import
{
formatDate
}
from
'../../utils/index'
;
import
{
formatDate
}
from
'../../utils/index'
;
import
arrIcon
from
'../../components/Input/Select/images/select_icon@2x.png'
;
import
arrIcon
from
'../../components/Input/Select/images/select_icon@2x.png'
;
import
UserInfoContext
from
'../../context/userinfo-context'
const
CustomChildren
=
({
extra
,
onClick
,
children
})
=>
(
const
CustomChildren
=
({
extra
,
onClick
,
children
})
=>
(
<
div
onClick
=
{
onClick
}
className
=
{
styles
.
selectWrap
}
>
<
div
onClick
=
{
onClick
}
className
=
{
styles
.
selectWrap
}
>
...
@@ -17,9 +18,9 @@ class PublicCarApply extends Component {
...
@@ -17,9 +18,9 @@ class PublicCarApply extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
department
:
''
,
department
:
props
.
userinfo
.
department
,
createDate
:
formatDate
(
new
Date
(),
'yyyy-MM-dd'
),
createDate
:
formatDate
(
new
Date
(),
'yyyy-MM-dd'
),
name
:
''
,
name
:
props
.
userinfo
.
name
,
categoryId
:
''
,
categoryId
:
''
,
userCount
:
''
,
userCount
:
''
,
beginDate
:
''
,
beginDate
:
''
,
...
@@ -207,4 +208,8 @@ class PublicCarApply extends Component {
...
@@ -207,4 +208,8 @@ class PublicCarApply extends Component {
}
}
}
}
export
default
PublicCarApply
;
export
default
props
=>
(
<
UserInfoContext
.
Consumer
>
{({
userinfo
})
=>
<
PublicCarApply
userinfo
=
{
userinfo
}
{...
props
}
/>
}
<
/UserInfoContext.Consumer
>
);
src/containers/Repair/ReprtRepair.js
View file @
05c741e2
...
@@ -14,6 +14,7 @@ import { fetchRepairArea, fetchRepairTerm } from '../../api/index';
...
@@ -14,6 +14,7 @@ import { fetchRepairArea, fetchRepairTerm } from '../../api/index';
import
{
reportRepair
}
from
'../../api/repairAdd'
;
import
{
reportRepair
}
from
'../../api/repairAdd'
;
import
Perview
from
'../../components/Perview/Perview'
;
import
Perview
from
'../../components/Perview/Perview'
;
import
store
from
'../../store/index'
;
import
store
from
'../../store/index'
;
import
UserInfoContext
from
'../../context/userinfo-context'
;
class
ReprtRepair
extends
Component
{
class
ReprtRepair
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -22,8 +23,8 @@ class ReprtRepair extends Component {
...
@@ -22,8 +23,8 @@ class ReprtRepair extends Component {
areaList
:
[],
areaList
:
[],
termList
:
[],
termList
:
[],
applyForm
:
{
applyForm
:
{
name
:
''
,
name
:
props
.
userinfo
.
name
,
repairCellphone
:
''
,
repairCellphone
:
props
.
userinfo
.
cellphone
,
applyIdentity
:
'学生'
,
applyIdentity
:
'学生'
,
area
:
''
,
area
:
''
,
areaId
:
''
,
areaId
:
''
,
...
@@ -356,4 +357,8 @@ class ReprtRepair extends Component {
...
@@ -356,4 +357,8 @@ class ReprtRepair extends Component {
}
}
}
}
export
default
ReprtRepair
;
export
default
props
=>
(
<
UserInfoContext
.
Consumer
>
{({
userinfo
})
=>
<
ReprtRepair
userinfo
=
{
userinfo
}
{...
props
}
/>
}
<
/UserInfoContext.Consumer
>
);
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