罗广聪

AI

... ... @@ -15,7 +15,20 @@ import { StackNavigator, TabNavigator } from "react-navigation";
export default class Home extends Component {
constructor(props) {
super(props);
this.state = {};
this.state = {
QuesList: [
{
title: "1.我该称呼您先生还是女士呢?",
answers: ["先生","女士"],
},{
title: "2.请问您是否有家庭负债?",
answers: ["有贷款","无贷款"],
},{
title: "3.您要为哪些家人投保呢?",
answers: ["先生","配偶","儿子","女儿","母亲","父亲"]
}
]
};
}
componentWillMount() {}
... ... @@ -49,6 +62,13 @@ export default class Home extends Component {
});
}
_renderQuestion() {
const { QuesList } = this.state;
return (
<Text>列表</Text>
)
}
render() {
// console.log("首页的this.props", this);
// console.log("render首页文章列表", this.state.ListData);
... ... @@ -56,9 +76,11 @@ export default class Home extends Component {
return (
<View style={styles.container}>
<Text>智能问题</Text>
{this._renderQuestion()}
</View>
);
}
}
const styles = StyleSheet.create({
... ... @@ -66,6 +88,6 @@ const styles = StyleSheet.create({
flex: 1,
justifyContent: "flex-start",
alignItems: "stretch",
backgroundColor: "#EFEFEF"
backgroundColor: "#F0F0F0"
},
});
... ...
... ... @@ -166,7 +166,7 @@ export default class Home extends Component {
navigate("AIBegin");
}}
>
<Image style={styles.AHIcon} />
<Image style={styles.AHIcon} source={require("../../assets/home/ic_intellect.png")} />
<Text style={styles.AHText}>智能方案</Text>
</TouchableOpacity>
<TouchableOpacity
... ... @@ -175,7 +175,7 @@ export default class Home extends Component {
navigate("HealthBegin");
}}
>
<Image style={styles.AHIcon} />
<Image style={styles.AHIcon} source={require("../../assets/home/ic_questionnaire.png")}/>
<Text style={styles.AHText}>健康问卷</Text>
</TouchableOpacity>
</View>
... ... @@ -265,9 +265,21 @@ const styles = StyleSheet.create({
paddingTop: 10,
paddingBottom: 10,
},
AHContainer: {},
AHIcon: {},
AHText: {},
AHContainer: {
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
},
AHIcon: {
width: 40,
height: 40,
},
AHText: {
fontSize: 16,
color: "#242424",
marginLeft: 13,
},
textContainer: {
backgroundColor: "#fff",
marginTop: 10,
... ...