提交 8aa630e1 authored 作者: zhouhuan's avatar zhouhuan
...@@ -8,4 +8,4 @@ ...@@ -8,4 +8,4 @@
# For customization when using a Version Control System, please read the # For customization when using a Version Control System, please read the
# header note. # header note.
#Fri Oct 27 18:29:04 CST 2017 #Fri Oct 27 18:29:04 CST 2017
sdk.dir=D\:\\AppData\\Local\\Android\\sdk1 sdk.dir=D\:\\Android\\sdk
...@@ -13,7 +13,6 @@ class HouseList extends Component { ...@@ -13,7 +13,6 @@ class HouseList extends Component {
}; };
action = () => { action = () => {
console.log('I am clicked!');
this.props.dispatch(NavigationActions.navigate({ this.props.dispatch(NavigationActions.navigate({
routeName: 'ERJi', routeName: 'ERJi',
})); }));
...@@ -36,7 +35,6 @@ class HouseList extends Component { ...@@ -36,7 +35,6 @@ class HouseList extends Component {
}); });
}} }}
/> />
<Button onClick={this.action}>Click me!</Button>
<ListHouContent navigation={this.props.navigation} /> <ListHouContent navigation={this.props.navigation} />
</View> </View>
); );
......
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { TouchableOpacity, Text, View, StyleSheet, Dimensions, Image } from 'react-native'; import { TouchableOpacity, Text, View, StyleSheet, Dimensions, Image } from 'react-native';
import { Card, WingBlank, WhiteSpace } from 'antd-mobile';
const totalWidth = Dimensions.get('window').width; const totalWidth = Dimensions.get('window').width;
class FlatListItem extends PureComponent { class FlatListItem extends PureComponent {
...@@ -11,28 +12,29 @@ class FlatListItem extends PureComponent { ...@@ -11,28 +12,29 @@ class FlatListItem extends PureComponent {
return ( return (
<TouchableOpacity <TouchableOpacity
{...this.props} {...this.props}
style={{ height: 60 }} style={{ height: 120 }}
onPress={this.onPress} onPress={this.onPress}
> >
<View style={styles.item}> <WingBlank size="lg">
<View style={styles.width50}> <WhiteSpace size="lg" />
<Text style={{ color: '#1BB7FF', fontSize: 16 }}>{this.props.item.fangWuZuoLuo}</Text> <Card>
</View> <Card.Header
<View style={styles.nameView}> title={this.props.item.fangWuZuoLuo}
<Text style={styles.nm}>发布时间:2017/10/27</Text> extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
<Text style={styles.nm1}>点击量:5</Text> />
</View> <Card.Body>
</View> <Text style={Styles.cardBodyText}>编号:<Text style={Styles.cardBodyText2}>{this.props.item.fwBianMa}</Text></Text>
<View style={{ marginBottom: 10 }}> <Text style={Styles.cardBodyText}>面积:<Text style={Styles.cardBodyText2}>350502199210236034</Text></Text>
<Text style={styles.rightIcon}>dddd</Text> <Text style={Styles.cardBodyText}>产权人:<Text style={Styles.cardBodyText2}>户主</Text></Text>
<Image style={styles.rightIcon} source={{ uri: 'right_07' }} /> </Card.Body>
</View> </Card>
<WhiteSpace size="lg" />
</WingBlank>
</TouchableOpacity> </TouchableOpacity>
); );
} }
} }
const styles = StyleSheet.create({ const Styles = StyleSheet.create({
row: { row: {
height: 60, height: 60,
borderBottomWidth: 1, borderBottomWidth: 1,
...@@ -103,6 +105,14 @@ const styles = StyleSheet.create({ ...@@ -103,6 +105,14 @@ const styles = StyleSheet.create({
height: 15, height: 15,
width: 15, width: 15,
}, },
cardText: {
color: '#2196F3',
textAlign: 'right',
},
cardBodyText: {
marginBottom: 10,
marginLeft: 13,
},
}); });
export default FlatListItem; export default FlatListItem;
import React, { Component } from 'react'; import React, { Component } from 'react';
import { View, FlatList, Text } from 'react-native'; import { View, FlatList, Text } from 'react-native';
import { Card, WingBlank, WhiteSpace } from 'antd-mobile';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { createAction } from '../../../utils'; import { createAction } from '../../../utils';
import FlatListItem from './FlatListItem'; import FlatListItem from './FlatListItem';
...@@ -22,7 +23,7 @@ class ListHouContent extends Component { ...@@ -22,7 +23,7 @@ class ListHouContent extends Component {
this.props.navigation.navigate('HouseDetail', { id }); this.props.navigation.navigate('HouseDetail', { id });
}; };
getItemLayout = (data, index) => ( getItemLayout = (data, index) => (
{ length: 60, offset: (60 + 1) * index, index } { length: 120, offset: (120 + 1) * index, index }
); );
/** /**
* 此函数用于为给定的item生成一个不重复的Key。 * 此函数用于为给定的item生成一个不重复的Key。
...@@ -43,11 +44,27 @@ class ListHouContent extends Component { ...@@ -43,11 +44,27 @@ class ListHouContent extends Component {
); );
// Footer布局 // Footer布局
renderFooter = () => ( renderFooter = () => (
<View><Text>Footer</Text></View> <WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Body>
<Text>到底了!!!</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
); );
// 空布局 // 空布局
renderEmptyView = () => ( renderEmptyView = () => (
<View><Text>EmptyView</Text></View> <WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Body>
<Text>当前无内容</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
); );
// 下拉刷新 // 下拉刷新
renderRefresh = () => { renderRefresh = () => {
...@@ -84,7 +101,6 @@ class ListHouContent extends Component { ...@@ -84,7 +101,6 @@ class ListHouContent extends Component {
onEndReached={this.onEndReached} onEndReached={this.onEndReached}
ListHeaderComponent={this.renderHeader} ListHeaderComponent={this.renderHeader}
ListFooterComponent={this.renderFooter} ListFooterComponent={this.renderFooter}
ItemSeparatorComponent={this.renderItemSeparatorComponent}
ListEmptyComponent={this.renderEmptyView} ListEmptyComponent={this.renderEmptyView}
refreshing={this.props.loading} refreshing={this.props.loading}
onRefresh={this.renderRefresh} onRefresh={this.renderRefresh}
......
...@@ -4,6 +4,7 @@ import { TabNavigator } from 'react-navigation'; ...@@ -4,6 +4,7 @@ import { TabNavigator } from 'react-navigation';
import userInfoPageScreen from './userinfopage'; import userInfoPageScreen from './userinfopage';
import fwInfo from './fwInfo'; import fwInfo from './fwInfo';
import chatsIcon from '../../../image/chats-icon.png'; import chatsIcon from '../../../image/chats-icon.png';
import Empty from '../empty';
const Content = TabNavigator({ const Content = TabNavigator({
FWInfo: { FWInfo: {
...@@ -20,6 +21,34 @@ const Content = TabNavigator({ ...@@ -20,6 +21,34 @@ const Content = TabNavigator({
), ),
}, },
}, },
DSRInfo: {
screen: Empty('权利人信息的新增,修改,还可以添加人口信息', 'DSRInfoScreen'),
navigationOptions: {
lazy: true,
tabBarLabel: '权利人信息',
// Note: By default the icon is only shown on iOS. Search the showIcon option below.
tabBarIcon: () => (
<Image
source={chatsIcon}
style={[styles.icon]}
/>
),
},
},
QSInfo: {
screen: Empty('权属信息的新增,修改,还可以勾选房子', 'DSRInfoScreen'),
navigationOptions: {
lazy: true,
tabBarLabel: '权属信息',
// Note: By default the icon is only shown on iOS. Search the showIcon option below.
tabBarIcon: () => (
<Image
source={chatsIcon}
style={[styles.icon]}
/>
),
},
},
UserInfoPageScreen: { UserInfoPageScreen: {
screen: userInfoPageScreen, screen: userInfoPageScreen,
navigationOptions: { navigationOptions: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论