aboutUs.js
4.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/**
* Created by tdzl2003 on 12/18/16.
*/
import React, {Component, PropTypes} from "react";
import {
Dimensions,
Image,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
Platform,
FlatList,
BackHandler,
ActivityIndicator,
StatusBar,
NativeModules
} from "react-native";
import Toast from 'react-native-root-toast';
import {zoomW,zoomH} from '../../utils/getSize';
const noResult = require('../../img/noResult.png');
const logo = require('../../img/iTunesArtwork.png');
import AppService from '../../service/AppService';
export default class aboutUs extends Component {
static navigationOptions = ({navigation}) => ({
headerTitle:'关于我们',
headerLeft:(
<TouchableOpacity style={styles.backWrap} onPress={() => navigation.goBack()}>
<Image source={require('../../img/back_gray.png')} resizeMode="contain" />
</TouchableOpacity>
),
headerRight:(
<View></View>
)
});
constructor(){
super()
this.state = {
loading:false,
verson:''
};
}
componentDidMount(){
NativeModules.BlueToolManage.getAppVersion().then((data)=>{
this.setState({
verson:data,
});
})
}
render(){
return(
<View style={styles.bg}>
<StatusBar barStyle={'default'}/>
{!this.state.loading && <View>
<View style={{flexDirection:'row',height:160/zoomH,alignItems:'center',justifyContent:'center',paddingLeft:16/zoomW,paddingRight:16/zoomW}}></View>
<View style={{flexDirection:'row',height:80/zoomH,alignItems:'center',justifyContent:'center',paddingLeft:16/zoomW,paddingRight:16/zoomW}}>
<View style={{flex:1,height:1/zoomH}}></View>
<Image source={logo} resizeMode="contain" style={styles.logo} />
<View style={{flex:1,height:1/zoomH}}></View>
</View>
<View style={{height:40/zoomH,alignItems:'center',justifyContent:'center',marginTop:20}}>
{/*<View style={{flex:1,height:1/zoomH}}></View>*/}
<Text style={styles.title} >平安地铁</Text>
{/*<View style={{flex:1,height:1/zoomH}}></View>*/}
</View>
<View style={{height:40/zoomH,alignItems:'center',justifyContent:'center',marginTop:20}}>
{/*<View style={{flex:1,height:1/zoomH,}}></View>*/}
<Text style={styles.text}>上海申通地铁集团有限公司</Text>
{/*<View style={{flex:1,height:1/zoomH}}></View>*/}
</View>
</View>}
<View style={{flexDirection:'row',height:180/zoomH,alignItems:'center',justifyContent:'center',paddingLeft:16/zoomW,paddingRight:16/zoomW}}></View>
<View style={{flexDirection:'row',height:40/zoomH,alignItems:'center',justifyContent:'center',paddingLeft:16/zoomW,paddingRight:16/zoomW}}>
<View style={{flex:1,height:1/zoomH,}}></View>
<Text style={styles.text}>版本号{this.state.verson}</Text>
<View style={{flex:1,height:1/zoomH}}></View>
</View>
{this.state.loading && <View style={styles.loadingBg}>
<ActivityIndicator size="large" />
</View>}
</View>
)
}
}
const styles = StyleSheet.create({
backWrap: {
justifyContent: 'center',
paddingLeft: 18.5/zoomW,
paddingRight: 18.5/zoomW,
height: 44/zoomH,
},
back: {
width: 8.5/zoomW,
height: 15/zoomH,
},
bg:{
flex:1,
backgroundColor:'#f6f6f6',
},
row:{
height:118/zoomH,
flexDirection:'column',
paddingHorizontal:15/zoomW,
// alignItems:'center',
borderBottomColor:'#dddddd',
backgroundColor:'white',
justifyContent: 'center',
},
title:{
fontSize:16,
color:'#4b4b4b',
flex:1,
justifyContent:'center',
alignItems:'center',
textAlign:'center'
},
text:{
color:'#A9A9A9',
fontSize:14,
// marginLeft:15/zoomW,
justifyContent:'center',
alignItems:'center',
textAlign:'center'
},
img:{
width:31/zoomW,
height:31/zoomW,
},
tableLine:{
marginTop: (5 / zoomH),
flexDirection:'row',
alignItems:'center',
},
logo:{
width: (70 / zoomW),
height: (70 / zoomH),
justifyContent:'center',
alignItems:'center',
borderRadius:8
},
loadingBg:{
width:'100%',
height:'100%',
position:'absolute',
display:'flex',
alignItems:'center',
justifyContent:'center'
},
});