Authored by shangjf

优化频道切换 review by 陈林

... ... @@ -462,7 +462,6 @@ export default class Home extends Component {
_backTop() {
// this.setState({showBackTop: false});
console.log(this.state.showBackTop);
InteractionManager.runAfterInteractions(() =>{
this.listView && this.listView.scrollTo({x: 0, y: 0, animated: true});
});
... ...
... ... @@ -281,14 +281,16 @@ class HomeContainer extends Component {
this.props.actions.fetchFloor();
}
onPressChangeChannel() {
let {app} = this.props;
if (app.channel == 1) {
console.log(1111111);
ReactNative.NativeModules.YH_CommonHelper.switchChannelByTheme(0);
}else if (app.channel == 2) {
console.log(2222222);
ReactNative.NativeModules.YH_CommonHelper.switchChannelByTheme(1);
onPressChangeChannel(url) {
if (Platform.OS === 'ios') {
let {app} = this.props;
if (app.channel == 1) {
ReactNative.NativeModules.YH_CommonHelper.switchChannelByTheme(0);
}else if (app.channel == 2) {
ReactNative.NativeModules.YH_CommonHelper.switchChannelByTheme(1);
}
}else {
this.jumpWithUrl(url);
}
}
... ...