Showing
15 changed files
with
44 additions
and
24 deletions
| @@ -88,7 +88,11 @@ const ProtectGod = StackNavigator( | @@ -88,7 +88,11 @@ const ProtectGod = StackNavigator( | ||
| 88 | }, | 88 | }, |
| 89 | CommonWebView: { screen: CommonWebView }, | 89 | CommonWebView: { screen: CommonWebView }, |
| 90 | Details: { screen: Details } | 90 | Details: { screen: Details } |
| 91 | - }, | 91 | + },{ |
| 92 | + navigationOptions: { | ||
| 93 | + headerTintColor: "black" | ||
| 94 | + } | ||
| 95 | + } | ||
| 92 | ); | 96 | ); |
| 93 | 97 | ||
| 94 | const styles = StyleSheet.create( | 98 | const styles = StyleSheet.create( |
src/assets/church/1.png
0 → 100644
29.5 KB
src/assets/church/2.png
0 → 100644
40.3 KB
src/assets/church/3.png
0 → 100644
64.5 KB
src/assets/church/4.png
0 → 100644
34 KB
src/assets/church/5.png
0 → 100644
22.5 KB
src/assets/login/ic_nickname@2x.png
0 → 100644
1.22 KB
src/assets/login/ic_nickname@3x.png
0 → 100644
1.86 KB
src/assets/login/ic_profession@2x.png
0 → 100644
953 Bytes
src/assets/login/ic_profession@3x.png
0 → 100644
1.54 KB
| @@ -71,7 +71,7 @@ export default class Home extends Component { | @@ -71,7 +71,7 @@ export default class Home extends Component { | ||
| 71 | // url: "https://www.baidu.com/" | 71 | // url: "https://www.baidu.com/" |
| 72 | }, | 72 | }, |
| 73 | ] | 73 | ] |
| 74 | - }; | 74 | + } |
| 75 | } | 75 | } |
| 76 | componentDidMount() { | 76 | componentDidMount() { |
| 77 | console.log("thisprops", this.props); | 77 | console.log("thisprops", this.props); |
| @@ -87,8 +87,8 @@ export default class Home extends Component { | @@ -87,8 +87,8 @@ export default class Home extends Component { | ||
| 87 | > | 87 | > |
| 88 | <Image style={styles.itemImgWrapper} source={item.imgurl} /> | 88 | <Image style={styles.itemImgWrapper} source={item.imgurl} /> |
| 89 | <View style={styles.itemRightWrapper}> | 89 | <View style={styles.itemRightWrapper}> |
| 90 | - <Text style={styles.itemTextTop}>{item.title}</Text> | 90 | + <Text style={styles.itemTextTop} numberOfLines={1}>{item.title}</Text> |
| 91 | - <Text style={styles.itemTextBottom}>{item.context}</Text> | 91 | + <Text style={styles.itemTextBottom} numberOfLines={1}>{item.context}</Text> |
| 92 | </View> | 92 | </View> |
| 93 | </TouchableOpacity> | 93 | </TouchableOpacity> |
| 94 | ); | 94 | ); |
| @@ -105,7 +105,7 @@ export default class Home extends Component { | @@ -105,7 +105,7 @@ export default class Home extends Component { | ||
| 105 | height={120} | 105 | height={120} |
| 106 | dotStyle={{ | 106 | dotStyle={{ |
| 107 | width: 6, | 107 | width: 6, |
| 108 | - height: 6 | 108 | + height: 6, |
| 109 | }} | 109 | }} |
| 110 | activeDotStyle={{ | 110 | activeDotStyle={{ |
| 111 | width: 6, | 111 | width: 6, |
| @@ -21,29 +21,35 @@ export default class InsuranceChurch extends Component { | @@ -21,29 +21,35 @@ export default class InsuranceChurch extends Component { | ||
| 21 | this.state = { | 21 | this.state = { |
| 22 | ListData: [ | 22 | ListData: [ |
| 23 | { | 23 | { |
| 24 | - title: "平安保险2017版平安保险平安保险平安保险", | 24 | + title: "凶猛台风来袭!与伤亡相关的保险知识你需要了解!", |
| 25 | time: "刚刚", | 25 | time: "刚刚", |
| 26 | - url: "https://www.baidu.com", | 26 | + url: "http://mp.weixin.qq.com/s/_lGAz9sSxuulbdPGZ020cQ", |
| 27 | - imgurl: require("../../assets/circle/newspic.png") | 27 | + imgurl: require("../../assets/church/1.png") |
| 28 | }, | 28 | }, |
| 29 | { | 29 | { |
| 30 | - title: "平安保险2017版平安保险平安保险平安保险", | 30 | + title: "17世纪伦敦火灾频发,牛掰的保险公司有高招!", |
| 31 | - time: "刚刚", | 31 | + time: "3小时前", |
| 32 | - url: "https://www.google.com", | 32 | + url: "http://mp.weixin.qq.com/s/cJ7oHQ__GBiBxBGZ1SCgDg", |
| 33 | - imgurl: require("../../assets/circle/newspic.png") | 33 | + imgurl: require("../../assets/church/2.png") |
| 34 | }, | 34 | }, |
| 35 | { | 35 | { |
| 36 | - title: "平安保险2017版平安保险平安保险平安保险", | 36 | + title: "这两个国家为何会有这些天气保险呢?原来是这样.....", |
| 37 | - time: "刚刚", | 37 | + time: "昨天", |
| 38 | - url: "https://www.zhihu.com/", | 38 | + url: "http://mp.weixin.qq.com/s/EimQbKC0ziqN0o8_S1ACFQ", |
| 39 | - imgurl: require("../../assets/circle/newspic.png") | 39 | + imgurl: require("../../assets/church/3.png") |
| 40 | }, | 40 | }, |
| 41 | { | 41 | { |
| 42 | - title: "平安保险2017版平安保险平安保险平安保险", | 42 | + title: "车险小白必须知道的不计免赔险", |
| 43 | - time: "刚刚", | 43 | + time: "9月10日", |
| 44 | - url: "https://www.baidu.com", | 44 | + url: "http://mp.weixin.qq.com/s/W9uR5G6ZlTb7HLLX-DZzSQ", |
| 45 | - imgurl: require("../../assets/circle/newspic.png") | 45 | + imgurl: require("../../assets/church/4.png") |
| 46 | - } | 46 | + }, |
| 47 | + { | ||
| 48 | + title: "“五险一金”进了嘻哈歌词,有关社保和商业保险的知识你了解吗?", | ||
| 49 | + time: "9月9日", | ||
| 50 | + url: "http://mp.weixin.qq.com/s/0I7p2vaM23CsDiI41hHNOQ", | ||
| 51 | + imgurl: require("../../assets/church/5.png") | ||
| 52 | + }, | ||
| 47 | ] | 53 | ] |
| 48 | }; | 54 | }; |
| 49 | } | 55 | } |
| @@ -8,6 +8,7 @@ import { | @@ -8,6 +8,7 @@ import { | ||
| 8 | TouchableOpacity, | 8 | TouchableOpacity, |
| 9 | Image, | 9 | Image, |
| 10 | TextInput, | 10 | TextInput, |
| 11 | + Alert, | ||
| 11 | KeyboardAvoidingView, | 12 | KeyboardAvoidingView, |
| 12 | AsyncStorage | 13 | AsyncStorage |
| 13 | } from "react-native"; | 14 | } from "react-native"; |
| @@ -209,7 +210,7 @@ export default class Details extends Component { | @@ -209,7 +210,7 @@ export default class Details extends Component { | ||
| 209 | } | 210 | } |
| 210 | sendMsg() { | 211 | sendMsg() { |
| 211 | if (this.state.IS_LOGIN != "yes") { | 212 | if (this.state.IS_LOGIN != "yes") { |
| 212 | - alert("请先登录账号"); | 213 | + Alert.alert("请先登录账号"); |
| 213 | return false; | 214 | return false; |
| 214 | } else { | 215 | } else { |
| 215 | this.addComment(); | 216 | this.addComment(); |
| @@ -93,7 +93,7 @@ export default class Login extends Component { | @@ -93,7 +93,7 @@ export default class Login extends Component { | ||
| 93 | <View style={styles.inputField}> | 93 | <View style={styles.inputField}> |
| 94 | <Image | 94 | <Image |
| 95 | style={styles.icon} | 95 | style={styles.icon} |
| 96 | - source={require("../assets/login/ic_password2.png")} | 96 | + source={require("../assets/login/ic_nickname.png")} |
| 97 | /> | 97 | /> |
| 98 | <TextInput | 98 | <TextInput |
| 99 | style={styles.textInput} | 99 | style={styles.textInput} |
| @@ -113,7 +113,7 @@ export default class Login extends Component { | @@ -113,7 +113,7 @@ export default class Login extends Component { | ||
| 113 | <View style={styles.inputField}> | 113 | <View style={styles.inputField}> |
| 114 | <Image | 114 | <Image |
| 115 | style={styles.icon} | 115 | style={styles.icon} |
| 116 | - source={require("../assets/login/ic_password2.png")} | 116 | + source={require("../assets/login/ic_profession.png")} |
| 117 | /> | 117 | /> |
| 118 | <TextInput | 118 | <TextInput |
| 119 | style={styles.textInput} | 119 | style={styles.textInput} |
| @@ -6,6 +6,7 @@ import { | @@ -6,6 +6,7 @@ import { | ||
| 6 | View, | 6 | View, |
| 7 | TouchableOpacity, | 7 | TouchableOpacity, |
| 8 | Image, | 8 | Image, |
| 9 | + Alert, | ||
| 9 | AlertIOS, | 10 | AlertIOS, |
| 10 | AsyncStorage, | 11 | AsyncStorage, |
| 11 | Button | 12 | Button |
| @@ -168,7 +169,11 @@ export default class Mine extends Component { | @@ -168,7 +169,11 @@ export default class Mine extends Component { | ||
| 168 | <TouchableOpacity | 169 | <TouchableOpacity |
| 169 | style={styles.itemContainer} | 170 | style={styles.itemContainer} |
| 170 | onPress={() => { | 171 | onPress={() => { |
| 172 | + if (this.state.IS_LOGIN == "yes") { | ||
| 171 | AlertIOS.prompt("更改昵称", null, this.saveResponse1); | 173 | AlertIOS.prompt("更改昵称", null, this.saveResponse1); |
| 174 | + } else { | ||
| 175 | + Alert.alert("请先登录账号") | ||
| 176 | + } | ||
| 172 | }} | 177 | }} |
| 173 | > | 178 | > |
| 174 | <View style={styles.itemLeft}> | 179 | <View style={styles.itemLeft}> |
| @@ -194,7 +199,11 @@ export default class Mine extends Component { | @@ -194,7 +199,11 @@ export default class Mine extends Component { | ||
| 194 | <TouchableOpacity | 199 | <TouchableOpacity |
| 195 | style={styles.itemContainer} | 200 | style={styles.itemContainer} |
| 196 | onPress={() => { | 201 | onPress={() => { |
| 202 | + if (this.state.IS_LOGIN == "yes") { | ||
| 197 | AlertIOS.prompt("更改职业", null, this.saveResponse2); | 203 | AlertIOS.prompt("更改职业", null, this.saveResponse2); |
| 204 | + } else { | ||
| 205 | + Alert.alert("请先登录账号") | ||
| 206 | + } | ||
| 198 | }} | 207 | }} |
| 199 | > | 208 | > |
| 200 | <View style={styles.itemLeft}> | 209 | <View style={styles.itemLeft}> |
-
Please register or login to post a comment