【发布时间】:2017-11-01 06:04:19
【问题描述】:
Profile.js
fetch('http://test.wehubs.in/MobileApp/profile.php',{
method: 'POST' ,
headers:{
'Accept': 'application/json'
},
body: JSON.stringify({
uuid: value
})
}).then(response =>response.json())
.then((responseData) =>
{
});
我想通过从 db 中获取内容来显示用户个人资料的详细信息。我还想在卡片中显示这个结果?这怎么可能?
const Profile = (props)=>{
return(
<Card>
<CardImage
source={require('')} style={styles.imagestyle} />
<CardTitle title="Name" />
<CardContent text="Location bloodgroup"/>
<CardButton
onPress={() => {}}
title="Back"
color='red'
/>
</Card>
);
}
上面是我在卡片中显示详细信息的代码。我想从CardTitle的获取响应中显示用户名。请帮助我。不知道该怎么做。
【问题讨论】:
标签: reactjs react-native fetch