submitSuccess.js 3.29 KB
/**
 * Created by mingming on 8/3/18.
 */
import React, { Component } from 'react';
import {
    StyleSheet,
    View,
    Text,
    TouchableOpacity,
    Image,
    ScrollView,
    TextInput,
    TouchableHighlight
} from 'react-native';

import {zoomW,zoomH} from '../../utils/getSize';

const back = require('../../img/back_gray.png');
const close = require('../../img/close.png');
const submitSuccess = require('../../img/submitsuccess.png');

export default class SubmitSuccess extends Component {
    static navigationOptions = ({ navigation, screenProps })=>({
        title: '提交成功',
        headerLeft:(<View style={{display:'flex',flexDirection:'row'}}>
            <TouchableOpacity style={styles.leftIcon}>
                <Image source={back} style={styles.backIcon} resizeMode="contain" />
            </TouchableOpacity>
            <TouchableOpacity style={styles.leftIcon}>
                <Image source={close} style={styles.closeIcon} resizeMode="contain" />
            </TouchableOpacity>
        </View>),
        headerRight:(<View ></View>)
    });

    constructor(props) {
        super(props);
        this.state={}
    }

    componentDidMount(){

    };

   //返回首页
    _backHome(){
        this.props.navigation.navigate('Community',{});
    }

    render() {
        return (
            <View style={{display:'flex',flex:1, alignItems: 'center',backgroundColor:'#ffffff'}}>
                <Image style = {{height:92/zoomH,width:92/zoomW,resizeMode:'contain',marginTop:72/zoomH}}
                 source = {submitSuccess}/>
                <Text style = {{marginTop:40/zoomH,fontSize:20,color:'#000000'}}>提交成功</Text>
                <Text style = {{marginTop:10/zoomH,fontSize:14,color:'#888888'}}>等待管理员审批</Text>
                <View style = {{flexDirection: 'row', justifyContent: 'center', alignItems: 'center'}}>
                    <TouchableOpacity style={styles.btn} onPress = {this._backHome.bind(this)}>
                        <Text style={{color:'#000000',fontSize:18}}>返回首页</Text>
                    </TouchableOpacity>
                </View>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    leftIcon:{
        width:(50/zoomW),
        height:'100%',
        display:'flex',
        flexDirection:'row',
        alignItems:'center'
    },
    backIcon:{
        width:(10/zoomW),
        height:(18/zoomH),
        marginLeft:(10/zoomW)
    },
    closeIcon:{
        width:(18/zoomW),
        height:(18/zoomH)
    },
    rightTop:{
        display:'flex',
        flexDirection:'row',
        alignItems:'center',
    },
    rightIcon:{
        height:'100%',
        width:(34/zoomW),
        display:'flex',
        justifyContent:'center',
    },
    moreIcon:{
        width:(20/zoomW),
        height:(20/zoomW)
    },
    center: {
        justifyContent:'center',
        alignItems: 'center',
    },
    btn: {
        width:(335/zoomW),
        margin:(20/zoomW),
        height:(47/zoomH),
        borderRadius:5,
        borderColor: 'rgba(5,5,5,0.10)',
        borderWidth: 1,
        backgroundColor:'#f8f8f8',
        display:'flex',
        justifyContent:'center',
        alignItems:'center',
        shadowColor:'#f8f8f8',
        shadowOffset:{width:0,height:3},
        shadowOpacity:0.9,
        shadowRadius:5
    }

});