myContribution.js 2.3 KB
/**
 * Created by tdzl2003 on 12/18/16.
 */
import React, {Component, PropTypes} from "react";
import {
    Dimensions,
    Image,
    ScrollView,
    StyleSheet,
    Text,
    TouchableOpacity,
    View,
    Platform,
    FlatList,
    BackHandler,
    ActivityIndicator,
    StatusBar,
    NativeModules
} from "react-native";
import Toast from 'react-native-root-toast';
import {zoomW,zoomH} from '../../utils/getSize';
const noResult = require('../../img/noResult.png');
const logo = require('../../img/logo.png');
import AppService from '../../service/AppService';

export default class myContribution extends Component {
    static navigationOptions = ({navigation}) => ({
        headerTitle:'我的贡献',
        headerLeft:(
            <TouchableOpacity style={styles.backWrap} onPress={() => navigation.goBack()}>
                <Image source={require('../../img/back_gray.png')} resizeMode="contain" />
            </TouchableOpacity>
        ),
    });

    constructor(){
        super()
        this.state = {
            loading:false,
        };
    }

    componentDidMount(){


    }


    render(){
        return(
            <View style={styles.bg}>
                <StatusBar barStyle={'default'}/>
                <View style={{flex:1,backgroundColor:'#f6f6f6',alignItems:'center',justifyContent:'center'}}>
                    <Text >我的护行次数:</Text>
                    <Text style={{fontSize:18,marginTop:20}}>45</Text>
                    <Text style={{marginTop:40}}>我的护行时间:</Text>
                    <Text style={{fontSize:17,marginTop:20}}>08小时4分钟46</Text>
                </View>

                {this.state.loading && <View style={styles.loadingBg}>
                    <ActivityIndicator size="large" />
                </View>}
            </View>
        )
    }
}
const styles = StyleSheet.create({
    backWrap: {
        justifyContent: 'center',
        paddingLeft: 18.5/zoomW,
        paddingRight: 18.5/zoomW,
        height: 44/zoomH,
    },
    back: {
        width: 8.5/zoomW,
        height: 15/zoomH,
    },
    bg:{
        flex:1,
        backgroundColor:'#f6f6f6',
    },

    loadingBg:{
        width:'100%',
        height:'100%',
        position:'absolute',
        display:'flex',
        alignItems:'center',
        justifyContent:'center'
    },
});