Showing
10 changed files
with
231 additions
and
103 deletions
| @@ -12,20 +12,52 @@ export default class ProtectGod extends Component { | @@ -12,20 +12,52 @@ export default class ProtectGod extends Component { | ||
| 12 | constructor(props) { | 12 | constructor(props) { |
| 13 | super(props); | 13 | super(props); |
| 14 | this.state = { | 14 | this.state = { |
| 15 | - isLogin: true, | 15 | + isLoading: false, |
| 16 | - selectedItem: "home" | 16 | + isLogin: true |
| 17 | }; | 17 | }; |
| 18 | } | 18 | } |
| 19 | + componentWillMount() { | ||
| 20 | + // console.log("componentWillMount生命周期"); | ||
| 21 | + // var that = this; | ||
| 22 | + // return fetch(`https://devpay.brae.co/test/insurance/login`,{ | ||
| 23 | + // method: "POST", | ||
| 24 | + // headers: { | ||
| 25 | + // 'Accept': 'application/json', | ||
| 26 | + // 'Content-Type': 'application/json', | ||
| 27 | + // }, | ||
| 28 | + // }) | ||
| 29 | + // .then((resp) => { | ||
| 30 | + // console.log("测试接口",resp); | ||
| 31 | + // // return false; | ||
| 32 | + // if (resp.status === 200) { | ||
| 33 | + // return resp.json(); | ||
| 34 | + // } else { | ||
| 35 | + // console.error("something went wrong!"); | ||
| 36 | + // } | ||
| 37 | + // }) | ||
| 38 | + // .then((respJson) => { | ||
| 39 | + // if (respJson.enmsg != 'ok') { | ||
| 40 | + // console.error(err); | ||
| 41 | + // alert(respJson.cnmsg); | ||
| 42 | + // } else { | ||
| 43 | + // that.setState({ | ||
| 44 | + // testData: respJson.data | ||
| 45 | + // }); | ||
| 46 | + // console.log('state.testData',that.state.testData); | ||
| 47 | + // } | ||
| 48 | + // }) | ||
| 49 | + // .catch((err) => console.error(err)) | ||
| 50 | + } | ||
| 51 | + | ||
| 19 | render() { | 52 | render() { |
| 20 | console.log("看看这个登录state", this.state.isLogin); | 53 | console.log("看看这个登录state", this.state.isLogin); |
| 21 | - return ( | 54 | + return this.state.isLoading ? null : ( |
| 22 | <Main | 55 | <Main |
| 23 | loginSuccess={this.state.isLogin} | 56 | loginSuccess={this.state.isLogin} |
| 24 | selectedItem={this.state.selectedItem} | 57 | selectedItem={this.state.selectedItem} |
| 25 | onLogin={isLogin => { | 58 | onLogin={isLogin => { |
| 26 | this.setState({ | 59 | this.setState({ |
| 27 | - isLogin: isLogin, | 60 | + isLogin: isLogin |
| 28 | - selectedItem: "home" | ||
| 29 | }); | 61 | }); |
| 30 | }} | 62 | }} |
| 31 | /> | 63 | /> |
| @@ -8,7 +8,8 @@ | @@ -8,7 +8,8 @@ | ||
| 8 | }, | 8 | }, |
| 9 | "dependencies": { | 9 | "dependencies": { |
| 10 | "react": "16.0.0-alpha.12", | 10 | "react": "16.0.0-alpha.12", |
| 11 | - "react-native": "0.48.1" | 11 | + "react-native": "0.48.1", |
| 12 | + "react-native-swiper": "^1.5.11" | ||
| 12 | }, | 13 | }, |
| 13 | "devDependencies": { | 14 | "devDependencies": { |
| 14 | "babel-jest": "20.0.3", | 15 | "babel-jest": "20.0.3", |
| @@ -8,6 +8,7 @@ import { | @@ -8,6 +8,7 @@ import { | ||
| 8 | TouchableOpacity, | 8 | TouchableOpacity, |
| 9 | ScrollView | 9 | ScrollView |
| 10 | } from "react-native"; | 10 | } from "react-native"; |
| 11 | +import Swiper from "react-native-swiper"; | ||
| 11 | import Carousel from "../../Components/Carousel"; | 12 | import Carousel from "../../Components/Carousel"; |
| 12 | import AllProduct from "./allProduct"; | 13 | import AllProduct from "./allProduct"; |
| 13 | import CommonWebView from "../../Components/CommonWebView"; | 14 | import CommonWebView from "../../Components/CommonWebView"; |
| @@ -16,24 +17,28 @@ export default class Home extends Component { | @@ -16,24 +17,28 @@ export default class Home extends Component { | ||
| 16 | constructor(props) { | 17 | constructor(props) { |
| 17 | super(props); | 18 | super(props); |
| 18 | this._renderMap = this._renderMap.bind(this); | 19 | this._renderMap = this._renderMap.bind(this); |
| 20 | + this._swiper = this._swiper.bind(this); | ||
| 19 | this.state = { | 21 | this.state = { |
| 20 | ListData: [ | 22 | ListData: [ |
| 21 | { | 23 | { |
| 22 | title: "平安保险第一个", | 24 | title: "平安保险第一个", |
| 23 | context: "600万医疗报废,自费药,进口药,器材费", | 25 | context: "600万医疗报废,自费药,进口药,器材费", |
| 24 | - url: "http://m.people.cn/n4/2017/0907/c190-9825877.html?admincptm=1504789835057", | 26 | + url: |
| 27 | + "http://m.people.cn/n4/2017/0907/c190-9825877.html?admincptm=1504789835057", | ||
| 25 | imgurl: require("../../assets/circle/newspic.png") | 28 | imgurl: require("../../assets/circle/newspic.png") |
| 26 | }, | 29 | }, |
| 27 | { | 30 | { |
| 28 | title: "平安保险第二个", | 31 | title: "平安保险第二个", |
| 29 | context: "600万医疗报废,自费药,进口药,器材费", | 32 | context: "600万医疗报废,自费药,进口药,器材费", |
| 30 | - url: "https://mmbiz.qpic.cn/mmbiz_jpg/cdwcq52BJlibS0nnF7IFq72VPba2ZEEOPVbMX370LHt8gW5nEicvQ4zpyX626y4hYPdk7CUUrHwCOVc2nMicY0xcw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1", | 33 | + url: |
| 34 | + "https://mmbiz.qpic.cn/mmbiz_jpg/cdwcq52BJlibS0nnF7IFq72VPba2ZEEOPVbMX370LHt8gW5nEicvQ4zpyX626y4hYPdk7CUUrHwCOVc2nMicY0xcw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1", | ||
| 31 | imgurl: require("../../assets/circle/newspic.png") | 35 | imgurl: require("../../assets/circle/newspic.png") |
| 32 | }, | 36 | }, |
| 33 | { | 37 | { |
| 34 | title: "平安保险第三个", | 38 | title: "平安保险第三个", |
| 35 | context: "600万医疗报废,自费药,进口药,器材费", | 39 | context: "600万医疗报废,自费药,进口药,器材费", |
| 36 | - url: "http://m.people.cn/n4/2017/0907/c190-9825877.html?admincptm=1504789835057", | 40 | + url: |
| 41 | + "http://m.people.cn/n4/2017/0907/c190-9825877.html?admincptm=1504789835057", | ||
| 37 | imgurl: require("../../assets/circle/newspic.png") | 42 | imgurl: require("../../assets/circle/newspic.png") |
| 38 | }, | 43 | }, |
| 39 | { | 44 | { |
| @@ -42,6 +47,28 @@ export default class Home extends Component { | @@ -42,6 +47,28 @@ export default class Home extends Component { | ||
| 42 | url: "https://www.baidu.com", | 47 | url: "https://www.baidu.com", |
| 43 | imgurl: require("../../assets/circle/newspic.png") | 48 | imgurl: require("../../assets/circle/newspic.png") |
| 44 | } | 49 | } |
| 50 | + ], | ||
| 51 | + swiperImgList: [ | ||
| 52 | + { | ||
| 53 | + img: require("../../assets/WechatIMG10.png"), | ||
| 54 | + url: "https://www.baidu.com/" | ||
| 55 | + }, | ||
| 56 | + { | ||
| 57 | + img: require("../../assets/WechatIMG10.png"), | ||
| 58 | + url: "https://www.baidu.com/" | ||
| 59 | + }, | ||
| 60 | + { | ||
| 61 | + img: require("../../assets/WechatIMG10.png"), | ||
| 62 | + url: "https://www.baidu.com/" | ||
| 63 | + }, | ||
| 64 | + { | ||
| 65 | + img: require("../../assets/WechatIMG10.png"), | ||
| 66 | + url: "https://www.baidu.com/" | ||
| 67 | + }, | ||
| 68 | + { | ||
| 69 | + img: require("../../assets/WechatIMG10.png"), | ||
| 70 | + url: "https://www.baidu.com/" | ||
| 71 | + } | ||
| 45 | ] | 72 | ] |
| 46 | }; | 73 | }; |
| 47 | } | 74 | } |
| @@ -68,6 +95,7 @@ export default class Home extends Component { | @@ -68,6 +95,7 @@ export default class Home extends Component { | ||
| 68 | }); | 95 | }); |
| 69 | } | 96 | } |
| 70 | _jumpToWebView(item) { | 97 | _jumpToWebView(item) { |
| 98 | + // console.log("跳转到webview的item",item); | ||
| 71 | this.props.navigator.push({ | 99 | this.props.navigator.push({ |
| 72 | component: CommonWebView, | 100 | component: CommonWebView, |
| 73 | passProps: { | 101 | passProps: { |
| @@ -81,10 +109,52 @@ export default class Home extends Component { | @@ -81,10 +109,52 @@ export default class Home extends Component { | ||
| 81 | title: "全部产品" | 109 | title: "全部产品" |
| 82 | }); | 110 | }); |
| 83 | } | 111 | } |
| 112 | + _swiper() { | ||
| 113 | + return ( | ||
| 114 | + <View style={{ height: 120 }}> | ||
| 115 | + <Swiper | ||
| 116 | + style={styles.swiperWrapper} | ||
| 117 | + autoplay={true} | ||
| 118 | + autoplayTimeout={6} | ||
| 119 | + height={120} | ||
| 120 | + dotStyle={{ | ||
| 121 | + width: 6, | ||
| 122 | + height: 6, | ||
| 123 | + }} | ||
| 124 | + activeDotStyle={{ | ||
| 125 | + width: 6, | ||
| 126 | + height: 6 | ||
| 127 | + }} | ||
| 128 | + > | ||
| 129 | + {this.state.swiperImgList.map((item, index) => { | ||
| 130 | + {/* console.log("图片item",item); */} | ||
| 131 | + return ( | ||
| 132 | + <TouchableOpacity | ||
| 133 | + style={styles.slide} | ||
| 134 | + key={index} | ||
| 135 | + onPress={() => { | ||
| 136 | + console.log("我是轮播图") | ||
| 137 | + this._jumpToWebView(item); | ||
| 138 | + }} | ||
| 139 | + > | ||
| 140 | + <Image | ||
| 141 | + style={styles.slideImg} | ||
| 142 | + source={item.img} | ||
| 143 | + resizeMode="contain" | ||
| 144 | + /> | ||
| 145 | + </TouchableOpacity> | ||
| 146 | + ); | ||
| 147 | + })} | ||
| 148 | + </Swiper> | ||
| 149 | + </View> | ||
| 150 | + ); | ||
| 151 | + } | ||
| 152 | + | ||
| 84 | render() { | 153 | render() { |
| 85 | return ( | 154 | return ( |
| 86 | <View style={styles.container}> | 155 | <View style={styles.container}> |
| 87 | - <Carousel /> | 156 | + {/* <Carousel /> */} |
| 157 | + {this._swiper()} | ||
| 88 | <TouchableOpacity | 158 | <TouchableOpacity |
| 89 | style={styles.midContainer} | 159 | style={styles.midContainer} |
| 90 | onPress={() => { | 160 | onPress={() => { |
| @@ -96,7 +166,10 @@ export default class Home extends Component { | @@ -96,7 +166,10 @@ export default class Home extends Component { | ||
| 96 | style={{ width: 72, height: 18 }} | 166 | style={{ width: 72, height: 18 }} |
| 97 | /> | 167 | /> |
| 98 | <Text style={styles.midText}>平安保险2017版</Text> | 168 | <Text style={styles.midText}>平安保险2017版</Text> |
| 99 | - <Image source={require("../../assets/Mine/rightArrow_gray.png")} style={styles.midArrow}/> | 169 | + <Image |
| 170 | + source={require("../../assets/Mine/rightArrow_gray.png")} | ||
| 171 | + style={styles.midArrow} | ||
| 172 | + /> | ||
| 100 | </TouchableOpacity> | 173 | </TouchableOpacity> |
| 101 | <View style={styles.textContainer}> | 174 | <View style={styles.textContainer}> |
| 102 | <Text style={styles.minText}>保险头条</Text> | 175 | <Text style={styles.minText}>保险头条</Text> |
| @@ -121,10 +194,19 @@ const styles = StyleSheet.create({ | @@ -121,10 +194,19 @@ const styles = StyleSheet.create({ | ||
| 121 | alignItems: "stretch", | 194 | alignItems: "stretch", |
| 122 | backgroundColor: "#EFEFEF" | 195 | backgroundColor: "#EFEFEF" |
| 123 | }, | 196 | }, |
| 197 | + swiperWrapper: {}, | ||
| 198 | + slide: { | ||
| 199 | + height: 120, | ||
| 200 | + justifyContent: "center", | ||
| 201 | + alignItems: "center", | ||
| 202 | + backgroundColor: "#92BBD9" | ||
| 203 | + }, | ||
| 204 | + slideImg: { | ||
| 205 | + flex: 1, | ||
| 206 | + height: 120 | ||
| 207 | + }, | ||
| 124 | midContainer: { | 208 | midContainer: { |
| 125 | height: 45, | 209 | height: 45, |
| 126 | - // width: 200, | ||
| 127 | - // alignSelf: 'center', | ||
| 128 | backgroundColor: "#fff", | 210 | backgroundColor: "#fff", |
| 129 | alignItems: "center", | 211 | alignItems: "center", |
| 130 | flexDirection: "row", | 212 | flexDirection: "row", |
| @@ -140,7 +222,7 @@ const styles = StyleSheet.create({ | @@ -140,7 +222,7 @@ const styles = StyleSheet.create({ | ||
| 140 | width: 14, | 222 | width: 14, |
| 141 | height: 14, | 223 | height: 14, |
| 142 | position: "absolute", | 224 | position: "absolute", |
| 143 | - right: 15, | 225 | + right: 15 |
| 144 | }, | 226 | }, |
| 145 | textContainer: { | 227 | textContainer: { |
| 146 | backgroundColor: "#fff", | 228 | backgroundColor: "#fff", |
| @@ -155,7 +237,7 @@ const styles = StyleSheet.create({ | @@ -155,7 +237,7 @@ const styles = StyleSheet.create({ | ||
| 155 | // height: 150 | 237 | // height: 150 |
| 156 | flex: 1, | 238 | flex: 1, |
| 157 | // paddingBottom: 64, | 239 | // paddingBottom: 64, |
| 158 | - marginBottom: 49, | 240 | + marginBottom: 49 |
| 159 | }, | 241 | }, |
| 160 | itemContainer: { | 242 | itemContainer: { |
| 161 | height: 90, | 243 | height: 90, |
| @@ -195,5 +277,5 @@ const styles = StyleSheet.create({ | @@ -195,5 +277,5 @@ const styles = StyleSheet.create({ | ||
| 195 | marginTop: 10, | 277 | marginTop: 10, |
| 196 | textAlign: "center", | 278 | textAlign: "center", |
| 197 | marginBottom: 10 | 279 | marginBottom: 10 |
| 198 | - }, | 280 | + } |
| 199 | }); | 281 | }); |
| @@ -10,6 +10,7 @@ import { | @@ -10,6 +10,7 @@ import { | ||
| 10 | TextInput, | 10 | TextInput, |
| 11 | KeyboardAvoidingView | 11 | KeyboardAvoidingView |
| 12 | } from "react-native"; | 12 | } from "react-native"; |
| 13 | +import WebView from "../../Components/CommonWebView"; | ||
| 13 | 14 | ||
| 14 | export default class Details extends Component { | 15 | export default class Details extends Component { |
| 15 | constructor(props) { | 16 | constructor(props) { |
| @@ -106,6 +107,18 @@ export default class Details extends Component { | @@ -106,6 +107,18 @@ export default class Details extends Component { | ||
| 106 | <Text style={styles.sendButton}>发送</Text> | 107 | <Text style={styles.sendButton}>发送</Text> |
| 107 | </TouchableOpacity> | 108 | </TouchableOpacity> |
| 108 | </View> | 109 | </View> |
| 110 | + {/* <TouchableOpacity | ||
| 111 | + ononPress={() => { | ||
| 112 | + this.props.navigator.push({ | ||
| 113 | + component: WebView, | ||
| 114 | + passProps: { | ||
| 115 | + url: "https://www.baidu.com" | ||
| 116 | + } | ||
| 117 | + }); | ||
| 118 | + }} | ||
| 119 | + > | ||
| 120 | + <Text>跳转试试看</Text> | ||
| 121 | + </TouchableOpacity> */} | ||
| 109 | </KeyboardAvoidingView> | 122 | </KeyboardAvoidingView> |
| 110 | </View> | 123 | </View> |
| 111 | ); | 124 | ); |
| @@ -17,6 +17,7 @@ export default class Login extends Component { | @@ -17,6 +17,7 @@ export default class Login extends Component { | ||
| 17 | this.state = { | 17 | this.state = { |
| 18 | phone: "", | 18 | phone: "", |
| 19 | password: "", | 19 | password: "", |
| 20 | + // 处于登录还是注册页面 | ||
| 20 | isRegister: false | 21 | isRegister: false |
| 21 | }; | 22 | }; |
| 22 | } | 23 | } |
| @@ -64,10 +65,6 @@ export default class Login extends Component { | @@ -64,10 +65,6 @@ export default class Login extends Component { | ||
| 64 | keyboardType="default" | 65 | keyboardType="default" |
| 65 | /> | 66 | /> |
| 66 | </View> | 67 | </View> |
| 67 | - {/* <TouchableOpacity style={styles.helpContaier}> | ||
| 68 | - <Text style={styles.forgetPassword}>忘记密码?</Text> | ||
| 69 | - </TouchableOpacity> */} | ||
| 70 | - | ||
| 71 | {/* 登录/注册 按钮 */} | 68 | {/* 登录/注册 按钮 */} |
| 72 | {!this.state.isRegister ? ( | 69 | {!this.state.isRegister ? ( |
| 73 | <TouchableOpacity | 70 | <TouchableOpacity |
| @@ -89,7 +86,7 @@ export default class Login extends Component { | @@ -89,7 +86,7 @@ export default class Login extends Component { | ||
| 89 | </TouchableOpacity> | 86 | </TouchableOpacity> |
| 90 | )} | 87 | )} |
| 91 | 88 | ||
| 92 | - {/* 点击进行注册 */} | 89 | + {/* 点击切换 不用管这里 */} |
| 93 | {!this.state.isRegister ? ( | 90 | {!this.state.isRegister ? ( |
| 94 | <TouchableOpacity | 91 | <TouchableOpacity |
| 95 | style={styles.registerContaier} | 92 | style={styles.registerContaier} |
| @@ -118,11 +115,6 @@ export default class Login extends Component { | @@ -118,11 +115,6 @@ export default class Login extends Component { | ||
| 118 | alert("请正确输入手机号码"); | 115 | alert("请正确输入手机号码"); |
| 119 | return; | 116 | return; |
| 120 | } | 117 | } |
| 121 | - // } else if (phone != 13000000000 && phone != 18888888888) { | ||
| 122 | - // console.log("手机号和密码",phone,password) | ||
| 123 | - // alert("登录账号错误"); | ||
| 124 | - // return; | ||
| 125 | - // } | ||
| 126 | if (password === "") { | 118 | if (password === "") { |
| 127 | alert("请输入密码"); | 119 | alert("请输入密码"); |
| 128 | return; | 120 | return; |
| @@ -8,9 +8,6 @@ import { | @@ -8,9 +8,6 @@ import { | ||
| 8 | Image, | 8 | Image, |
| 9 | AlertIOS | 9 | AlertIOS |
| 10 | } from "react-native"; | 10 | } from "react-native"; |
| 11 | -import myQuestion from "./myQuestion"; | ||
| 12 | -import MsgNotification from "./MsgNotification"; | ||
| 13 | -import PersonalInfo from "./PersonalInfo"; | ||
| 14 | 11 | ||
| 15 | export default class Mine extends Component { | 12 | export default class Mine extends Component { |
| 16 | constructor(props) { | 13 | constructor(props) { |
| @@ -28,18 +25,19 @@ export default class Mine extends Component { | @@ -28,18 +25,19 @@ export default class Mine extends Component { | ||
| 28 | saveResponse2(d) { | 25 | saveResponse2(d) { |
| 29 | this.setState({ identity: d }); | 26 | this.setState({ identity: d }); |
| 30 | } | 27 | } |
| 28 | + loginOut() { | ||
| 29 | + console.log("看看this是什么", this); | ||
| 30 | + this.props.onLogin(false); | ||
| 31 | + } | ||
| 31 | render() { | 32 | render() { |
| 32 | return ( | 33 | return ( |
| 33 | <View style={styles.container}> | 34 | <View style={styles.container}> |
| 34 | - <TouchableOpacity style={styles.header}> | 35 | + <View style={styles.header}> |
| 35 | - <View style={styles.headerLeft}> | ||
| 36 | <Image | 36 | <Image |
| 37 | source={require("../../assets/Mine/iconpic1.png")} | 37 | source={require("../../assets/Mine/iconpic1.png")} |
| 38 | style={styles.mineIcon} | 38 | style={styles.mineIcon} |
| 39 | /> | 39 | /> |
| 40 | - <Text style={styles.mineName}>{this.state.name}</Text> | ||
| 41 | </View> | 40 | </View> |
| 42 | - </TouchableOpacity> | ||
| 43 | <View style={styles.midContainer}> | 41 | <View style={styles.midContainer}> |
| 44 | <TouchableOpacity | 42 | <TouchableOpacity |
| 45 | style={styles.itemContainer} | 43 | style={styles.itemContainer} |
| @@ -98,57 +96,6 @@ export default class Mine extends Component { | @@ -98,57 +96,6 @@ export default class Mine extends Component { | ||
| 98 | </View> | 96 | </View> |
| 99 | ); | 97 | ); |
| 100 | } | 98 | } |
| 101 | - | ||
| 102 | - loginOut() { | ||
| 103 | - console.log("看看this是什么", this); | ||
| 104 | - this.props.onLogin(false); | ||
| 105 | - } | ||
| 106 | - changeInfo(type, text) { | ||
| 107 | - if (type == "name") { | ||
| 108 | - this.setState({ | ||
| 109 | - name: text | ||
| 110 | - }); | ||
| 111 | - } else { | ||
| 112 | - this.setState({ | ||
| 113 | - identity: text | ||
| 114 | - }); | ||
| 115 | - } | ||
| 116 | - } | ||
| 117 | -} | ||
| 118 | - | ||
| 119 | -class BarList extends Component { | ||
| 120 | - render() { | ||
| 121 | - return ( | ||
| 122 | - <View> | ||
| 123 | - <ListItem title={"消息通知"} num={"11"} /> | ||
| 124 | - <ListItem title={"我的提问"} /> | ||
| 125 | - </View> | ||
| 126 | - ); | ||
| 127 | - } | ||
| 128 | -} | ||
| 129 | - | ||
| 130 | -class ListItem extends Component { | ||
| 131 | - render() { | ||
| 132 | - return ( | ||
| 133 | - <TouchableOpacity style={styles.itemContainer}> | ||
| 134 | - <View style={styles.itemLeft}> | ||
| 135 | - <Image | ||
| 136 | - style={styles.leftIcon} | ||
| 137 | - source={require("../../assets/tabbar/ic_circle_s.png")} | ||
| 138 | - /> | ||
| 139 | - {/* <Image style={styles.leftIcon} source={require("../../assets/Mine/iconpic1.png")} /> */} | ||
| 140 | - <Text style={styles.leftTitle}>{this.props.title}</Text> | ||
| 141 | - {this.props.num ? ( | ||
| 142 | - <Text style={styles.leftNum}> ({this.props.num})</Text> | ||
| 143 | - ) : null} | ||
| 144 | - </View> | ||
| 145 | - <Image | ||
| 146 | - style={styles.itemRight} | ||
| 147 | - source={require("../../assets/Mine/rightArrow_gray.png")} | ||
| 148 | - /> | ||
| 149 | - </TouchableOpacity> | ||
| 150 | - ); | ||
| 151 | - } | ||
| 152 | } | 99 | } |
| 153 | 100 | ||
| 154 | const styles = StyleSheet.create({ | 101 | const styles = StyleSheet.create({ |
| @@ -161,23 +108,15 @@ const styles = StyleSheet.create({ | @@ -161,23 +108,15 @@ const styles = StyleSheet.create({ | ||
| 161 | }, | 108 | }, |
| 162 | header: { | 109 | header: { |
| 163 | backgroundColor: "#1B9341", | 110 | backgroundColor: "#1B9341", |
| 164 | - height: 78, | 111 | + height: 154, |
| 165 | flexDirection: "row", | 112 | flexDirection: "row", |
| 166 | - justifyContent: "space-between", | 113 | + justifyContent: "center", |
| 167 | - paddingLeft: 13, | ||
| 168 | - paddingRight: 13, | ||
| 169 | alignItems: "center", | 114 | alignItems: "center", |
| 170 | marginBottom: 10 | 115 | marginBottom: 10 |
| 171 | }, | 116 | }, |
| 172 | - headerLeft: { | ||
| 173 | - flexDirection: "row", | ||
| 174 | - justifyContent: "flex-start", | ||
| 175 | - alignItems: "center" | ||
| 176 | - }, | ||
| 177 | mineIcon: { | 117 | mineIcon: { |
| 178 | - width: 46, | 118 | + width: 86, |
| 179 | - height: 46, | 119 | + height: 86, |
| 180 | - marginRight: 14 | ||
| 181 | }, | 120 | }, |
| 182 | mineName: { | 121 | mineName: { |
| 183 | fontSize: 16, | 122 | fontSize: 16, |
| @@ -188,11 +127,7 @@ const styles = StyleSheet.create({ | @@ -188,11 +127,7 @@ const styles = StyleSheet.create({ | ||
| 188 | width: 14, | 127 | width: 14, |
| 189 | height: 14 | 128 | height: 14 |
| 190 | }, | 129 | }, |
| 191 | - midContainer: { | 130 | + midContainer: {}, |
| 192 | - // marginTop: 10, | ||
| 193 | - // marginBottom: 10, | ||
| 194 | - // height: 92, | ||
| 195 | - }, | ||
| 196 | itemContainer: { | 131 | itemContainer: { |
| 197 | height: 46, | 132 | height: 46, |
| 198 | paddingLeft: 16, | 133 | paddingLeft: 16, |
| @@ -210,7 +145,6 @@ const styles = StyleSheet.create({ | @@ -210,7 +145,6 @@ const styles = StyleSheet.create({ | ||
| 210 | justifyContent: "flex-start", | 145 | justifyContent: "flex-start", |
| 211 | alignItems: "center" | 146 | alignItems: "center" |
| 212 | }, | 147 | }, |
| 213 | - | ||
| 214 | leftIcon: { | 148 | leftIcon: { |
| 215 | marginRight: 11, | 149 | marginRight: 11, |
| 216 | width: 16, | 150 | width: 16, |
| @@ -3147,7 +3147,7 @@ promise@^7.1.1: | @@ -3147,7 +3147,7 @@ promise@^7.1.1: | ||
| 3147 | dependencies: | 3147 | dependencies: |
| 3148 | asap "~2.0.3" | 3148 | asap "~2.0.3" |
| 3149 | 3149 | ||
| 3150 | -prop-types@^15.5.6, prop-types@^15.5.8: | 3150 | +prop-types@^15.5.10, prop-types@^15.5.6, prop-types@^15.5.8: |
| 3151 | version "15.5.10" | 3151 | version "15.5.10" |
| 3152 | resolved "http://registry.npm.taobao.org/prop-types/download/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" | 3152 | resolved "http://registry.npm.taobao.org/prop-types/download/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" |
| 3153 | dependencies: | 3153 | dependencies: |
| @@ -3221,6 +3221,12 @@ react-devtools-core@^2.5.0: | @@ -3221,6 +3221,12 @@ react-devtools-core@^2.5.0: | ||
| 3221 | shell-quote "^1.6.1" | 3221 | shell-quote "^1.6.1" |
| 3222 | ws "^2.0.3" | 3222 | ws "^2.0.3" |
| 3223 | 3223 | ||
| 3224 | +react-native-swiper@^1.5.11: | ||
| 3225 | + version "1.5.11" | ||
| 3226 | + resolved "http://registry.npm.taobao.org/react-native-swiper/download/react-native-swiper-1.5.11.tgz#2d46ded43f383dbde4540d513cb4eaaa60eaed61" | ||
| 3227 | + dependencies: | ||
| 3228 | + prop-types "^15.5.10" | ||
| 3229 | + | ||
| 3224 | react-native@0.48.1: | 3230 | react-native@0.48.1: |
| 3225 | version "0.48.1" | 3231 | version "0.48.1" |
| 3226 | resolved "http://registry.npm.taobao.org/react-native/download/react-native-0.48.1.tgz#052ba5a86d3bdb748c288124248727d02b1c0939" | 3232 | resolved "http://registry.npm.taobao.org/react-native/download/react-native-0.48.1.tgz#052ba5a86d3bdb748c288124248727d02b1c0939" |
接口.txt
0 → 100644
| 1 | +POST https://devpay.brae.co | ||
| 2 | +注册 /test/insurance/register | ||
| 3 | +传入值 | ||
| 4 | +{ | ||
| 5 | + "phone":13131313131, | ||
| 6 | + "password":"12313123", | ||
| 7 | + "nickname":"hhee" | ||
| 8 | +} | ||
| 9 | +返回值 | ||
| 10 | +{ | ||
| 11 | + "id": 3, | ||
| 12 | + "nickname": "hhee" | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | + | ||
| 16 | + | ||
| 17 | +登录 /test/insurance/login | ||
| 18 | +传入值 | ||
| 19 | +{ | ||
| 20 | + "phone":13131313131, | ||
| 21 | + "password":"12313123" | ||
| 22 | +} | ||
| 23 | +返回值 | ||
| 24 | +{ | ||
| 25 | + "id": 3, | ||
| 26 | + "nickname": "hhee" | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +获取文章 /test/insurance/article | ||
| 30 | +返回值 | ||
| 31 | +{ | ||
| 32 | + "0": { | ||
| 33 | + "title": "家庭经济越差越应该买保险,因为你病不起,输不起,也折腾不起…", | ||
| 34 | + "content": "现实生活就是如此矛盾现实生活,就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实矛是如此此…", | ||
| 35 | + "name": "jack", | ||
| 36 | + "identify": "保险代理人", | ||
| 37 | + "num": "30", | ||
| 38 | + "id": "1" | ||
| 39 | + }, | ||
| 40 | + "1": { | ||
| 41 | + "title": "因为你病不起,输不起,也折腾不起…", | ||
| 42 | + "content": "现实生活就是如此矛盾现实生活,就是如此矛盾现实生活就是如此矛盾现实生活,就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实矛是如此此…现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实生活就是如此矛盾现实矛是如此此…", | ||
| 43 | + "name": "luosf", | ||
| 44 | + "identify": "保险代理人", | ||
| 45 | + "num": "10", | ||
| 46 | + "id": "2" | ||
| 47 | + } | ||
| 48 | +} | ||
| 49 | + | ||
| 50 | + | ||
| 51 | +评论文章 /test/insurance/comment/add | ||
| 52 | +传入值 | ||
| 53 | +{ | ||
| 54 | + "user":2, | ||
| 55 | + "article":1, | ||
| 56 | + "content":"哈哈哈哈哈哈哈哈" | ||
| 57 | +} | ||
| 58 | + | ||
| 59 | + | ||
| 60 | +获取评论 /test/insurance/comment/get | ||
| 61 | +返回值 | ||
| 62 | +{ | ||
| 63 | + "0": { | ||
| 64 | + "time": "2017-09-08 16:35:28", | ||
| 65 | + "user": "yyy", | ||
| 66 | + "content": "哈哈~" | ||
| 67 | + } | ||
| 68 | +} |
-
Please register or login to post a comment