...
|
...
|
@@ -13,6 +13,7 @@ import { |
|
|
|
|
|
import {Map} from 'immutable';
|
|
|
import YH_Image from '../../common/components/YH_Image';
|
|
|
import DeviceInfo from 'react-native-device-info';
|
|
|
|
|
|
export default class PersonalInfo extends Component {
|
|
|
constructor(props) {
|
...
|
...
|
@@ -46,7 +47,16 @@ export default class PersonalInfo extends Component { |
|
|
} else if (dataSource.get('id') == 'mineQRCode') {
|
|
|
imageUrl = require('../image/mine_qr.png');
|
|
|
}
|
|
|
let url = YH_Image.getSlicedUrl(dataSource.get('url'), 40, 40, 2); // 商品缩略图
|
|
|
let url = YH_Image.getSlicedUrl(dataSource.get('url'), 40, 40, 2);
|
|
|
let fontFamilyStyle = {};
|
|
|
if (Platform.OS === 'ios') {
|
|
|
let systemVersion = DeviceInfo.getSystemVersion();
|
|
|
systemVersion = parseFloat(systemVersion);
|
|
|
if (systemVersion >= 9.0) {
|
|
|
fontFamilyStyle = {fontFamily: 'PingFang SC'};
|
|
|
}
|
|
|
}
|
|
|
// 商品缩略图
|
|
|
return (
|
|
|
<TouchableOpacity activeOpacity={1.0} onPress={() => {
|
|
|
this.props.onPressInfoCell && this.props.onPressInfoCell(dataSource);
|
...
|
...
|
@@ -54,13 +64,13 @@ export default class PersonalInfo extends Component { |
|
|
<View style={[styles.container,{height: cellHeight + (withoutBottomLine?0.0:0.5)}]}>
|
|
|
<View style={[styles.contentContainer,{height: cellHeight}]}>
|
|
|
|
|
|
<Text style={styles.title}>
|
|
|
<Text style={[styles.title, fontFamilyStyle]}>
|
|
|
{dataSource.get('title')}
|
|
|
</Text>
|
|
|
<View style={styles.contentContainer}>
|
|
|
{dataSource.get('id') == 'VIPLevel'?
|
|
|
null
|
|
|
:<Text style={styles.content}>
|
|
|
:<Text style={[styles.content,fontFamilyStyle]}>
|
|
|
{dataSource.get('content')}
|
|
|
</Text>
|
|
|
}
|
...
|
...
|
@@ -87,6 +97,7 @@ export default class PersonalInfo extends Component { |
|
|
}
|
|
|
|
|
|
let {width, height} = Dimensions.get('window');
|
|
|
const DEVICE_WIDTH_RATIO = width / 320;
|
|
|
|
|
|
let styles = StyleSheet.create({
|
|
|
container: {
|
...
|
...
|
@@ -95,6 +106,7 @@ let styles = StyleSheet.create({ |
|
|
},
|
|
|
title: {
|
|
|
marginLeft: 15,
|
|
|
fontSize: 13 * DEVICE_WIDTH_RATIO,
|
|
|
},
|
|
|
userImage: {
|
|
|
width: 40,
|
...
|
...
|
@@ -105,7 +117,7 @@ let styles = StyleSheet.create({ |
|
|
content:{
|
|
|
color: '#b0b0b0',
|
|
|
marginRight: 14,
|
|
|
fontSize: 12,
|
|
|
fontSize: 13 * DEVICE_WIDTH_RATIO,
|
|
|
},
|
|
|
contentContainer: {
|
|
|
flexDirection: 'row',
|
...
|
...
|
|