NoNetworkTip.js
2.35 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
'use strict';
import React, {Component} from 'react';
import ReactNative, {
View,
Text,
Image,
StyleSheet,
Dimensions,
TouchableOpacity,
Platform,
} from 'react-native';
export default class NoNetworkTip extends Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={styles.container}>
<Image
style={styles.icon}
source={require('../images/loadingicon.png')}
/>
<Text
style={styles.desc}
>
您手机的网络不太顺畅哦!
</Text>
<TouchableOpacity
activeOpacity={1}
onPress={() =>{
this.props.onPressReload && this.props.onPressReload();
}}
>
<View style={styles.reloadContainer}>
<Image
style={styles.reloadImage}
source={require('../images/btnsemptyp.png')}
/>
<Text
style={styles.reloadText}
>
重新加载
</Text>
</View>
</TouchableOpacity>
</View>
);
}
}
let {width, height} = Dimensions.get('window');
const DEVICE_WIDTH_RATIO = width / 320;
let styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
},
icon: {
width: 85,
height: 85,
},
desc: {
color: '#020202',
fontSize: 13,
marginTop: 23,
backgroundColor: 'transparent',
},
reloadContainer: {
marginTop: 63,
width: 237,
height: 45,
backgroundColor: 'transparent',
justifyContent: 'center',
flexDirection: 'column',
},
reloadImage: {
position: 'absolute',
left: 0,
top: 0,
width: 237,
height: 45,
borderRadius: 5
},
reloadText: {
alignSelf: 'center',
color: 'white',
fontSize: 15,
backgroundColor: 'transparent'
}
});