Interest.js 1.64 KB
'use strict';

import React, {Component} from 'react';
import ReactNative, {
    View,
    Text,
    Image,
    ListView,
    StyleSheet,
    Dimensions,
    TouchableOpacity,
} from 'react-native';


export default class Interest extends Component {

    constructor(props) {
        super(props);

        this._renderRow = this._renderRow.bind(this);

        this.dataSource = new ListView.DataSource({
            rowHasChanged: (r1, r2) => !Immutable.is(r1, r2),
        });
    }

    _renderRow(rowData: object, sectionID: number, rowID: number) {
        
		return null;

    }

    render() {
        return (
            <View style={styles.container}>
                <Text>关注</Text>
            </View>
        );
    }
}

let {width, height} = Dimensions.get('window');
let bannerHeight = Math.ceil((310 / 640) * width);
let couponHeight = Math.ceil((180 / 640) * width);
let rightWidth = Math.ceil((110 / 640) * width);
let rightHeight = Math.ceil((180 / 110) * rightWidth);

let styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: 'white',
    },
    textContainer: {

    },
    text: {
        fontFamily: 'helvetica',
        fontSize: 18,
        lineHeight: 48,
        textAlign: 'center',
        paddingBottom: (48 - 18) / 2,
    },
    couponContainer: {
        width,
        height: couponHeight,
        flexDirection: 'row',
    },
    couponLeft: {
        flex: 0.78,
    },
    couponRight: {
        flex: 0.22,
        // justifyContent: 'center',
        // alignItems: 'center'
    },

    rightImage: {
        width: rightWidth,
        height: rightHeight,
        // backgroundColor: 'red'
    },
});