提交 da748565 编写于 作者: lilouv's avatar lilouv

改bug

上级 1e4fa9ef
......@@ -2,7 +2,6 @@ import React, {Component} from 'react';
import {View, Text, StatusBar, StyleSheet} from 'react-native';
import MyHeader from '../../component/Header';
import Navigation from '../../component/Navigation';
import {getTest} from '../../api/test';
class Home extends Component {
constructor(props) {
super(props);
......@@ -11,17 +10,7 @@ class Home extends Component {
}
//测试一下请求能否正常使用,后期删除就行
componentDidMount() {
getTest().then(
res => {
console.log('get response:', res);
alert(JSON.stringify(res));
},
error => {
console.log('get response failed!');
},
);
}
componentDidMount() {}
changeName(name) {
this.setState({
......@@ -33,7 +22,10 @@ class Home extends Component {
return (
<View style={styles.container}>
<MyHeader title={this.state.name} />
<Navigation changeName={this.changeName} />
<Navigation
navigation={this.props.navigation}
changeName={this.changeName}
/>
</View>
);
}
......@@ -41,7 +33,7 @@ class Home extends Component {
const styles = StyleSheet.create({
container: {
backgroundColor: '#F2E2CE',
opacity: 0.5,
// opacity: 0.5,
flex: 1,
},
text: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册