提交 cec51f69 authored 作者: 吴强's avatar 吴强

Merge branch 'master' of git://192.168.1.116/bolan-root/frontend/manager-app-sz into wq

# Conflicts: # src/models/login.js # src/routes/login.js #添加新界面到main ,个人中心和房屋信息
上级 52220da4
......@@ -3,7 +3,7 @@ import { NavigationActions } from 'react-navigation';
export default {
namespace: 'welcome',
state: {},
state: { },
reducers: {},
effects: {
*init(ignored, { put, call }) {
......
import React, { Component } from 'react';
import { Image, StyleSheet, Button } from 'react-native';
import chatsIcon from '../../../image/chats-icon.png';
class fwInfo extends Component {
static navigationOptions = {
......@@ -7,8 +8,8 @@ class fwInfo extends Component {
// Note: By default the icon is only shown on iOS. Search the showIcon option below.
tabBarIcon: ({ tintColor }) => (
<Image
source={require('../../../../image/chats-icon.png')}
style={[styles.icon, { tintColor: { tintColor } }]}
source={chatsIcon}
style={[styles.icon, { tintColor }]}
/>
),
};
......@@ -16,7 +17,7 @@ class fwInfo extends Component {
render() {
return (
<Button
onPress={() => this.props.navigation.navigate('Notifications')}
onPress={() => this.props.navigation.navigate('Welcome')}
title="Go to notifications"
/>
);
......
import React, { Component } from 'react';
import { TabNavigator } from 'react-navigation';
import userInfoPageScreen from './userinfopage';
import fwInfo from './fwInfo';
class HomeScreen extends Component {
render() {
return (
<MainScreenNavigator />
);
}
}
const MainScreenNavigator = TabNavigator({
FWInfo: {
screen: fwInfo,
},
UserInfoPageScreen: {
screen: userInfoPageScreen,
},
}, {
tabBarPosition: 'bottom',
animationEnabled: true,
tabBarOptions: {
activeTintColor: '#e91e63',
},
});
export default HomeScreen;
import { StackNavigator } from 'react-navigation';
import HomeScreen from './home';
import React, { Component } from 'react';
import { View, Text } from 'react-native';
import { TabNavigator } from 'react-navigation';
import userInfoPageScreen from './userinfopage';
import fwInfo from './fwInfo';
export default StackNavigator(
{
HomeNavigator: { screen: HomeScreen },
const Content = TabNavigator({
FWInfo: {
screen: fwInfo,
},
{
headerMode: 'float',
UserInfoPageScreen: {
screen: userInfoPageScreen,
},
);
}, {
tabBarPosition: 'bottom',
animationEnabled: true,
tabBarOptions: {
activeTintColor: '#e91e63',
showIcon: true,
},
});
class MainPage extends Component {
render() {
console.log(this.props.navigation);
return (
<View style={{ flex: 1 }}>
<Text>abc</Text>
<Content navigation={this.props.navigation} />
</View>
);
}
}
MainPage.router = Content.router;
export default MainPage;
import React, { Component } from 'react';
import { Image, StyleSheet, Button } from 'react-native';
import Icon from '../../../image/chats-icon.png';
class userInfoPageScreen extends Component {
static navigationOptions = {
tabBarLabel: '个人中心',
tabBarIcon: () => (
<Image
source={require('../../../../image/chats-icon.png')}
style={styles}
source={Icon}
style={styles.icon}
/>
),
};
......
import React, { Component } from 'react';
import { View, Text } from 'react-native';
import { View, StyleSheet, Text } from 'react-native';
import { connect } from 'react-redux';
import { createAction } from '../utils/index';
......@@ -9,14 +9,30 @@ class WelcomeScreen extends Component {
const { dispatch } = this.props;
dispatch(createAction('welcome/init')());
}
// 待改进,改成启动页,目前因为时间和技术的问题,搁置。wq write
render() {
return (
<View>
<Text>welcome</Text>
<View style={styles.container}>
<Text>wle</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#ffffff',
},
img: {
flex: 1,
width: 400,
height: 200,
resizeMode: 'contain',
},
})
export default WelcomeScreen;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论