|
|
'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',
|
|
|
}
|
|
|
}); |
...
|
...
|
|