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
a8a84d48
Commit
a8a84d48
authored
Oct 10, 2018
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
b19cfc55
e83cda8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
46 deletions
+95
-46
index.js
src/containers/PublicCar/index.js
+42
-17
index.js
src/containers/Repair/index.js
+43
-29
style.css
src/containers/Repair/style.css
+10
-0
No files found.
src/containers/PublicCar/index.js
View file @
a8a84d48
...
@@ -5,7 +5,30 @@ import PublicCarApply from './PublicCarApply';
...
@@ -5,7 +5,30 @@ import PublicCarApply from './PublicCarApply';
import
styles
from
'./style.css'
;
import
styles
from
'./style.css'
;
class
PublicCar
extends
Component
{
class
PublicCar
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
showFooter
:
true
,
};
}
componentDidMount
()
{
let
screenHeight
=
document
.
body
.
offsetHeight
;
window
.
onresize
=
()
=>
{
let
nowHeight
=
document
.
body
.
offsetHeight
;
if
(
nowHeight
<
screenHeight
)
{
this
.
setState
({
showFooter
:
false
,
});
}
else
{
this
.
setState
({
showFooter
:
true
,
});
}
};
}
render
()
{
render
()
{
const
{
showFooter
}
=
this
.
state
;
return
(
return
(
<
div
className
=
"Content-Wrap"
>
<
div
className
=
"Content-Wrap"
>
<
div
className
=
"RepairContent"
>
<
div
className
=
"RepairContent"
>
...
@@ -18,23 +41,25 @@ class PublicCar extends Component {
...
@@ -18,23 +41,25 @@ class PublicCar extends Component {
<
Route
render
=
{()
=>
<
Redirect
to
=
"/publicCar/PublicCarApply"
/>
}
/
>
<
Route
render
=
{()
=>
<
Redirect
to
=
"/publicCar/PublicCarApply"
/>
}
/
>
<
/Switch
>
<
/Switch
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
footer
}
>
{
showFooter
&&
(
<
NavLink
<
div
className
=
{
styles
.
footer
}
>
className
=
{
styles
[
'footer-item'
]}
<
NavLink
to
=
"/publicCar/PublicCarApply"
className
=
{
styles
[
'footer-item'
]}
replace
to
=
"/publicCar/PublicCarApply"
>
replace
约车服务
>
<
/NavLink
>
约车服务
<
span
className
=
{
styles
.
line
}
/
>
<
/NavLink
>
<
NavLink
<
span
className
=
{
styles
.
line
}
/
>
className
=
{
styles
[
'footer-item'
]}
<
NavLink
to
=
"/publicCar/PublicCarList"
className
=
{
styles
[
'footer-item'
]}
replace
to
=
"/publicCar/PublicCarList"
>
replace
约车记录
>
<
/NavLink
>
约车记录
<
/div
>
<
/NavLink
>
<
/div
>
)}
<
/div
>
<
/div
>
);
);
}
}
...
...
src/containers/Repair/index.js
View file @
a8a84d48
...
@@ -4,19 +4,31 @@ import styles from './style.css';
...
@@ -4,19 +4,31 @@ import styles from './style.css';
import
ReprtRepair
from
'./ReprtRepair'
;
import
ReprtRepair
from
'./ReprtRepair'
;
import
RepairList
from
'./RepairList'
;
import
RepairList
from
'./RepairList'
;
class
index
extends
Component
{
class
index
extends
Component
{
state
=
{
constructor
(
props
)
{
tab
:
'ReprtRepair'
,
super
(
props
);
};
this
.
state
=
{
toggleRouteHandle
=
name
=>
{
showFooter
:
true
,
if
(
name
===
this
.
state
.
tab
)
return
;
};
console
.
log
(
name
);
}
const
{
history
}
=
this
.
props
;
this
.
setState
({
componentDidMount
()
{
tab
:
name
,
let
screenHeight
=
document
.
body
.
offsetHeight
;
});
window
.
onresize
=
()
=>
{
history
.
replace
(
'/repair/'
+
name
);
let
nowHeight
=
document
.
body
.
offsetHeight
;
};
if
(
nowHeight
<
screenHeight
)
{
this
.
setState
({
showFooter
:
false
,
});
}
else
{
this
.
setState
({
showFooter
:
true
,
});
}
};
}
render
()
{
render
()
{
const
{
showFooter
}
=
this
.
state
;
return
(
return
(
<
div
className
=
"Content-Wrap"
>
<
div
className
=
"Content-Wrap"
>
<
div
className
=
"RepairContent"
>
<
div
className
=
"RepairContent"
>
...
@@ -26,23 +38,25 @@ class index extends Component {
...
@@ -26,23 +38,25 @@ class index extends Component {
<
Route
render
=
{()
=>
<
Redirect
to
=
"/repair/ReprtRepair"
/>
}
/
>
<
Route
render
=
{()
=>
<
Redirect
to
=
"/repair/ReprtRepair"
/>
}
/
>
<
/Switch
>
<
/Switch
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
footer
}
>
{
showFooter
&&
(
<
NavLink
<
div
className
=
{
styles
.
footer
}
>
className
=
{
styles
[
'footer-item'
]}
<
NavLink
to
=
"/repair/ReprtRepair"
className
=
{
styles
[
'footer-item'
]}
replace
to
=
"/repair/ReprtRepair"
>
replace
报修服务
>
<
/NavLink
>
报修服务
<
span
className
=
{
styles
.
line
}
/
>
<
/NavLink
>
<
NavLink
<
span
className
=
{
styles
.
line
}
/
>
className
=
{
styles
[
'footer-item'
]}
<
NavLink
to
=
"/repair/RepairList"
className
=
{
styles
[
'footer-item'
]}
replace
to
=
"/repair/RepairList"
>
replace
报修记录
>
<
/NavLink
>
报修记录
<
/div
>
<
/NavLink
>
<
/div
>
)}
<
/div
>
<
/div
>
);
);
}
}
...
...
src/containers/Repair/style.css
View file @
a8a84d48
...
@@ -4,6 +4,14 @@
...
@@ -4,6 +4,14 @@
overflow-y
:
auto
;
overflow-y
:
auto
;
-webkit-overflow-scrolling
:
touch
;
-webkit-overflow-scrolling
:
touch
;
}
}
.footerTopLine
{
position
:
absolute
;
top
:
-5px
;
width
:
100%
;
height
:
6px
;
background
:
linear-gradient
(
0deg
,
#626466
,
transparent
);
opacity
:
0.3
;
}
.footer
{
.footer
{
width
:
100%
;
width
:
100%
;
height
:
80px
;
height
:
80px
;
...
@@ -12,6 +20,7 @@
...
@@ -12,6 +20,7 @@
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
font-size
:
30px
;
font-size
:
30px
;
border-top
:
1px
solid
#dee0de
;
}
}
.line
{
.line
{
width
:
2px
;
width
:
2px
;
...
@@ -22,6 +31,7 @@
...
@@ -22,6 +31,7 @@
flex
:
1
;
flex
:
1
;
color
:
#999
;
color
:
#999
;
text-align
:
center
;
text-align
:
center
;
background-color
:
#fff
;
}
}
:global
(
.active
)
{
:global
(
.active
)
{
background-color
:
#3695c0
;
background-color
:
#3695c0
;
...
...
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