AboutUs.js
4.66 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
161
162
163
164
165
166
/**
* Created by jone on 2017/4/10.
*/
import React,
{
Component
} from "react";
import ReactNative from 'react-native';
import {
View,
Text,
TouchableWithoutFeedback,
StyleSheet,
TouchableOpacity,
ScrollView,
Image,
Dimensions,
} from "react-native";
export default class SettingMessage extends Component {
constructor(props) {
super(props);
}
render() {
let {data} = this.props;
let hasNew = data.versionInfo.hasNew;
return (
<View style={styles.container}>
<Image
style={styles.logoViewStyle}
source={require("../images/about_icon_launcher.png")}
/>
<Text style={[styles.textViewStyle,styles.marginStyle]}>版本 {data.versionInfo.version}</Text>
{this._renderUpdate(hasNew)}
<TouchableOpacity
activeOpacity={0.5}
onPress={
() => this.props.pressItem && this.props.pressItem(1)
}
>
<View style={styles.textBorderStyle}>
<Text style={styles.textViewStyle}>关于YOHO!BUY有货</Text>
</View>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={0.5}
onPress={
() => this.props.pressItem && this.props.pressItem(2)
}
>
<View style={styles.textBorderStyle}>
<Text style={styles.textViewStyle}>关于新力传媒</Text>
</View>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={0.5}
onPress={
() => this.props.pressItem && this.props.pressItem(4)
}
>
<View style={styles.textBorderStyle}>
<Text style={styles.textViewStyle}>给我评价</Text>
</View>
</TouchableOpacity>
<View style={styles.bottomViewStyle}>
<TouchableOpacity
activeOpacity={0.5}
onPress={
() => this.props.pressItem && this.props.pressItem(3)
}
>
<View style={styles.privacyViewStyle}>
<Text>隐私条款</Text>
</View>
</TouchableOpacity>
<Image
style={styles.bottomAboutStyle}
source={require("../images/mine_about_company.png")}
/>
</View>
</View>
);
}
_renderUpdate(hasNew){
return (
hasNew?
<TouchableOpacity
activeOpacity={0.5}
onPress={
() => this.props.pressItem && this.props.pressItem(5)
}
>
<View style={styles.updateViewStyle}>
<Text style={styles.textViewStyle}>版本更新</Text>
<Image
style={{margin:4}}
source={ require('../images/mine_setting_app_new.png')}
/>
</View>
</TouchableOpacity>:null
);
}
};
let {width, height} = Dimensions.get('window');
let styles = StyleSheet.create({
container: {
alignItems: 'center',
backgroundColor: '#ffffffff',
flex: 1
},
logoViewStyle: {
width: 80,
height: 80,
marginTop: 50
},
bottomViewStyle: {
alignItems: 'center',
position: 'absolute',
width:width,
bottom: 20,
},
bottomAboutStyle: {
width: 125,
height: 30,
marginTop:10
},
privacyViewStyle:{
borderBottomColor:'black',
borderBottomWidth:1
},
textViewStyle:{
fontSize:14
},
textBorderStyle:{
borderColor:'black',
borderWidth:1,
borderRadius:3,
width:150,
height:45,
alignItems:'center',
justifyContent:'center',
marginTop:15
},
updateViewStyle:{
borderColor:'black',
borderWidth:1,
borderRadius:3,
width:150,
height:45,
alignItems:'center',
justifyContent:'center',
marginTop:15,
flexDirection:'row'
},
marginStyle:{
marginTop:10
}
});