Authored by yoho-js001

修复验收问题。reviewed by 凯总

@@ -27,7 +27,7 @@ export default class CategoryList extends Component { @@ -27,7 +27,7 @@ export default class CategoryList extends Component {
27 this.dataSource = new ListView.DataSource({rowHasChanged: (r1, r2) => !immutable.is(r1, r2)}); 27 this.dataSource = new ListView.DataSource({rowHasChanged: (r1, r2) => !immutable.is(r1, r2)});
28 this.subRenderRow = this.subRenderRow.bind(this); 28 this.subRenderRow = this.subRenderRow.bind(this);
29 this.state = { 29 this.state = {
30 - offsetx: 0, 30 + offsetx: -width/2,
31 }; 31 };
32 this.cacheChannel=''; 32 this.cacheChannel='';
33 } 33 }
@@ -38,7 +38,7 @@ export default class CategoryList extends Component { @@ -38,7 +38,7 @@ export default class CategoryList extends Component {
38 38
39 componentWillUpdate(nextProps,nextState){ 39 componentWillUpdate(nextProps,nextState){
40 if(this.cacheChannel!=nextProps.currentChannelId){ 40 if(this.cacheChannel!=nextProps.currentChannelId){
41 - this.setState({offsetx:0}); 41 + this.setState({offsetx:-width/2});
42 this.refs.categoryList && this.refs.categoryList.scrollTo({x: 0, y: 0, animated: false}); 42 this.refs.categoryList && this.refs.categoryList.scrollTo({x: 0, y: 0, animated: false});
43 this.cacheChannel=nextProps.currentChannelId; 43 this.cacheChannel=nextProps.currentChannelId;
44 } 44 }
@@ -53,7 +53,7 @@ export default class CategoryList extends Component { @@ -53,7 +53,7 @@ export default class CategoryList extends Component {
53 if(rowID==this.props.currentCateId){ 53 if(rowID==this.props.currentCateId){
54 LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut); 54 LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
55 if(this.state.offsetx<0){ 55 if(this.state.offsetx<0){
56 - this.setState({offsetx:0}); 56 + this.setState({offsetx:-width/2});
57 }else{ 57 }else{
58 this.setState({offsetx: -width/2}); 58 this.setState({offsetx: -width/2});
59 } 59 }
@@ -157,19 +157,19 @@ let styles = StyleSheet.create({ @@ -157,19 +157,19 @@ let styles = StyleSheet.create({
157 flex: 1, 157 flex: 1,
158 flexDirection: 'row', 158 flexDirection: 'row',
159 width: width, 159 width: width,
160 - height: height - 156, 160 + height: height - 106,
161 backgroundColor: 'white', 161 backgroundColor: 'white',
162 }, 162 },
163 contentContainer: { 163 contentContainer: {
164 backgroundColor: 'white', 164 backgroundColor: 'white',
165 width: width, 165 width: width,
166 - height: height - 156, 166 + height: height - 106,
167 }, 167 },
168 subContentContainer: { 168 subContentContainer: {
169 // position: 'absolute', 169 // position: 'absolute',
170 backgroundColor: '#f4f4f4', 170 backgroundColor: '#f4f4f4',
171 width: width/2, 171 width: width/2,
172 - height: height - 156, 172 + height: height - 106,
173 173
174 }, 174 },
175 row: { 175 row: {