import React from "react"; import {connect} from 'react-redux' import {Platform,StatusBar,View, Text, Button,TouchableHighlight,StyleSheet} from "react-native"; import {changeBtnText} from "../../actions/bi/index"; import YRHttpRequest from "../../utils/network/fetch" import {API} from "../../utils/network/axios/api.config"; class HomeScreen extends React.Component { static navigationOptions = { title: '主页面', headerStyle: Platform.OS === 'android' ? { paddingTop: StatusBar.currentHeight, height: StatusBar.currentHeight + 56, } : {} } loadData=()=>{ //fetch请求 console.log("loadData():",API.TEST_GET); YRHttpRequest.get(API.TEST_GET).then(res=>{ console.log("res.data=",res); }).catch(err=>{ console.log("res.data=",err); }) //axios请求 // console.log("loadData():",API.TEST_GET); // sendGet({url:API.TEST_GET,params:{ // name:'arison' // }}).then(res=>{ // console.log("res.data=",res); // }).catch(err=>{ // console.log("res.data=",err); // }) } render() { const {navigation} = this.props; return ( Home Screen