WeChatPublic.js
2.32 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
'use strict';
import React from 'react';
import ReactNative from 'react-native';
import Immutable, {Map} from 'immutable';
import {getSlicedUrl} from '../../../classify/utils/Utils';
const {
AppRegistry,
StyleSheet,
Text,
View,
Image,
ListView,
Dimensions,
TouchableOpacity,
} = ReactNative;
export default class WeChatPublic extends React.Component {
constructor(props) {
super(props);
}
render() {
let {resource} = this.props;
return null;
return (
<View style={styles.container}>
<View style={{width: width,height: 15,backgroundColor: '#e5e5e5',}}/>
<View style={styles.subContainer}>
<Image style={styles.icon} source={require('../../image/wechart.png')}/>
<View style={styles.rightView}>
<Text style={styles.rightTitle} numberOfLines={1}>
微信搜索公众号“有货YOHOBUY”
</Text>
<Text style={styles.rightDetail} numberOfLines={1}>
你购物,我买单,关注公众号即可赢免单
</Text>
</View>
</View>
<TouchableOpacity style={styles.button} activeOpacity={0.5} onPress={() => {
this.props.onPressWeixin && this.props.onPressWeixin('有货YOHOBUY');
}}>
<Text style={styles.buttonText} numberOfLines={1}>
复制
</Text>
</TouchableOpacity>
</View>
);
}
};
let {width, height} = Dimensions.get('window');
let backgroundHeight = 90;
let styles = StyleSheet.create({
container: {
width: width,
height: backgroundHeight,
backgroundColor: 'white',
},
subContainer: {
width: width,
height: backgroundHeight - 15,
backgroundColor: 'white',
flexDirection: 'row',
},
icon: {
width: 60,
height: 60,
backgroundColor: 'white',
marginTop: 10,
marginLeft: 10,
},
rightView: {
width: width - 50,
height: backgroundHeight,
backgroundColor: 'white',
marginLeft: 5,
},
rightTitle: {
fontSize: 15,
fontWeight: 'bold',
color: 'black',
backgroundColor: 'white',
marginTop: 17,
},
rightDetail: {
fontSize: 14,
color: 'gray',
backgroundColor: 'white',
marginTop: 10,
},
button: {
position: 'absolute',
right: 20,
top: 32,
width: 40,
height: 18,
backgroundColor: 'black',
justifyContent: 'center',
},
buttonText: {
fontSize: 13,
color: 'white',
textAlign: 'center',
}
});