Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
YH_RNComponent
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
于良
8 years ago
Commit
9a33907c6224e0d48ad6b7647352ec026ac1fee2
2 parents
453efa29
1067178a
Merge branch '5.4.1' of
http://git.yoho.cn/mobile/YH_RNComponent
into 5.4.1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
js/blk/components/category/CategoryList.js
js/mine/components/mine/MineListHeader.js
js/outlet/reducers/outlet/outletActions.js
js/blk/components/category/CategoryList.js
View file @
9a33907
...
...
@@ -27,7 +27,7 @@ export default class CategoryList extends Component {
this
.
dataSource
=
new
ListView
.
DataSource
({
rowHasChanged
:
(
r1
,
r2
)
=>
!
immutable
.
is
(
r1
,
r2
)});
this
.
subRenderRow
=
this
.
subRenderRow
.
bind
(
this
);
this
.
state
=
{
offsetx
:
0
,
offsetx
:
-
width
/
2
,
};
this
.
cacheChannel
=
''
;
}
...
...
@@ -38,7 +38,7 @@ export default class CategoryList extends Component {
componentWillUpdate
(
nextProps
,
nextState
){
if
(
this
.
cacheChannel
!=
nextProps
.
currentChannelId
){
this
.
setState
({
offsetx
:
0
});
this
.
setState
({
offsetx
:
-
width
/
2
});
this
.
refs
.
categoryList
&&
this
.
refs
.
categoryList
.
scrollTo
({
x
:
0
,
y
:
0
,
animated
:
false
});
this
.
cacheChannel
=
nextProps
.
currentChannelId
;
}
...
...
@@ -53,7 +53,7 @@ export default class CategoryList extends Component {
if
(
rowID
==
this
.
props
.
currentCateId
){
LayoutAnimation
.
configureNext
(
LayoutAnimation
.
Presets
.
easeInEaseOut
);
if
(
this
.
state
.
offsetx
<
0
){
this
.
setState
({
offsetx
:
0
});
this
.
setState
({
offsetx
:
-
width
/
2
});
}
else
{
this
.
setState
({
offsetx
:
-
width
/
2
});
}
...
...
@@ -157,19 +157,19 @@ let styles = StyleSheet.create({
flex
:
1
,
flexDirection
:
'row'
,
width
:
width
,
height
:
height
-
1
5
6
,
height
:
height
-
1
0
6
,
backgroundColor
:
'white'
,
},
contentContainer
:
{
backgroundColor
:
'white'
,
width
:
width
,
height
:
height
-
1
5
6
,
height
:
height
-
1
0
6
,
},
subContentContainer
:
{
// position: 'absolute',
backgroundColor
:
'#f4f4f4'
,
width
:
width
/
2
,
height
:
height
-
1
5
6
,
height
:
height
-
1
0
6
,
},
row
:
{
...
...
js/mine/components/mine/MineListHeader.js
View file @
9a33907
...
...
@@ -9,6 +9,7 @@ import ReactNative, {
PixelRatio
,
TouchableOpacity
,
Platform
,
DeviceInfo
,
}
from
'react-native'
;
import
Immutable
,
{
Map
}
from
'immutable'
;
...
...
js/outlet/reducers/outlet/outletActions.js
View file @
9a33907
...
...
@@ -69,7 +69,7 @@ export function getCategory() {
return
(
dispatch
,
getState
)
=>
{
let
{
app
,
outlet
}
=
getState
();
let
parent_id
=
app
.
categoryId
;
let
channel
=
outlet
.
channel
;
let
channel
=
app
.
channel
;
dispatch
(
getCategoryRequest
());
return
new
OutletService
(
app
.
serviceHost
).
getCategory
(
parent_id
)
.
then
(
json
=>
{
...
...
Please
register
or
login
to post a comment