Showing
24 changed files
with
274 additions
and
94 deletions
| @@ -136,6 +136,8 @@ dependencies { | @@ -136,6 +136,8 @@ dependencies { | ||
| 136 | compile fileTree(dir: "libs", include: ["*.jar"]) | 136 | compile fileTree(dir: "libs", include: ["*.jar"]) |
| 137 | compile "com.android.support:appcompat-v7:23.0.1" | 137 | compile "com.android.support:appcompat-v7:23.0.1" |
| 138 | compile "com.facebook.react:react-native:+" // From node_modules | 138 | compile "com.facebook.react:react-native:+" // From node_modules |
| 139 | + compile project(':react-native-dialog') | ||
| 140 | + // compile project(':react-native-splash-screen') | ||
| 139 | } | 141 | } |
| 140 | 142 | ||
| 141 | // Run this once to be able to run the application with BUCK | 143 | // Run this once to be able to run the application with BUCK |
| 1 | package com.protectgod; | 1 | package com.protectgod; |
| 2 | 2 | ||
| 3 | +// import android.os.Bundle; | ||
| 3 | import com.facebook.react.ReactActivity; | 4 | import com.facebook.react.ReactActivity; |
| 5 | +// import com.cboy.rn.splashscreen.SplashScreen; | ||
| 4 | 6 | ||
| 5 | public class MainActivity extends ReactActivity { | 7 | public class MainActivity extends ReactActivity { |
| 6 | 8 | ||
| @@ -12,4 +14,9 @@ public class MainActivity extends ReactActivity { | @@ -12,4 +14,9 @@ public class MainActivity extends ReactActivity { | ||
| 12 | protected String getMainComponentName() { | 14 | protected String getMainComponentName() { |
| 13 | return "ProtectGod"; | 15 | return "ProtectGod"; |
| 14 | } | 16 | } |
| 17 | + // @Override | ||
| 18 | + // protected void onCreate(Bundle savedInstanceState) { | ||
| 19 | + // SplashScreen.show(this); | ||
| 20 | + // super.onCreate(savedInstanceState); | ||
| 21 | + // } | ||
| 15 | } | 22 | } |
| @@ -7,6 +7,8 @@ import com.facebook.react.ReactNativeHost; | @@ -7,6 +7,8 @@ import com.facebook.react.ReactNativeHost; | ||
| 7 | import com.facebook.react.ReactPackage; | 7 | import com.facebook.react.ReactPackage; |
| 8 | import com.facebook.react.shell.MainReactPackage; | 8 | import com.facebook.react.shell.MainReactPackage; |
| 9 | import com.facebook.soloader.SoLoader; | 9 | import com.facebook.soloader.SoLoader; |
| 10 | +import com.honaf.dialog.MyDialogPackage; | ||
| 11 | +// import com.cboy.rn.splashscreen.SplashScreenReactPackage; | ||
| 10 | 12 | ||
| 11 | import java.util.Arrays; | 13 | import java.util.Arrays; |
| 12 | import java.util.List; | 14 | import java.util.List; |
| @@ -22,6 +24,8 @@ public class MainApplication extends Application implements ReactApplication { | @@ -22,6 +24,8 @@ public class MainApplication extends Application implements ReactApplication { | ||
| 22 | @Override | 24 | @Override |
| 23 | protected List<ReactPackage> getPackages() { | 25 | protected List<ReactPackage> getPackages() { |
| 24 | return Arrays.<ReactPackage>asList( | 26 | return Arrays.<ReactPackage>asList( |
| 27 | + // new SplashScreenReactPackage(), | ||
| 28 | + new MyDialogPackage(), | ||
| 25 | new MainReactPackage() | 29 | new MainReactPackage() |
| 26 | ); | 30 | ); |
| 27 | } | 31 | } |
| @@ -37,4 +41,5 @@ public class MainApplication extends Application implements ReactApplication { | @@ -37,4 +41,5 @@ public class MainApplication extends Application implements ReactApplication { | ||
| 37 | super.onCreate(); | 41 | super.onCreate(); |
| 38 | SoLoader.init(this, /* native exopackage */ false); | 42 | SoLoader.init(this, /* native exopackage */ false); |
| 39 | } | 43 | } |
| 44 | + | ||
| 40 | } | 45 | } |
492 KB
492 KB
| 1 | rootProject.name = 'ProtectGod' | 1 | rootProject.name = 'ProtectGod' |
| 2 | +// include ':react-native-splash-screen' | ||
| 3 | +// project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android') | ||
| 2 | 4 | ||
| 3 | include ':app' | 5 | include ':app' |
| 6 | + | ||
| 7 | +include ':react-native-dialog' | ||
| 8 | +project(':react-native-dialog').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialog/android') |
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | 6 | ||
| 7 | import React, { Component } from "react"; | 7 | import React, { Component } from "react"; |
| 8 | import { AppRegistry, StyleSheet, Text, View, Image } from "react-native"; | 8 | import { AppRegistry, StyleSheet, Text, View, Image } from "react-native"; |
| 9 | -import { StackNavigator, TabNavigator } from "react-navigation"; | 9 | +import { StackNavigator, TabNavigator, TabBarBottom } from "react-navigation"; |
| 10 | 10 | ||
| 11 | import Home from "./src/pages/Home/index"; | 11 | import Home from "./src/pages/Home/index"; |
| 12 | import InsuranceCircle from "./src/pages/InsuranceCircle/index"; | 12 | import InsuranceCircle from "./src/pages/InsuranceCircle/index"; |
| @@ -16,6 +16,17 @@ import Login from "./src/pages/Login"; | @@ -16,6 +16,17 @@ import Login from "./src/pages/Login"; | ||
| 16 | import AllProduct from "./src/pages/Home/allProduct"; | 16 | import AllProduct from "./src/pages/Home/allProduct"; |
| 17 | import CommonWebView from "./src/Components/CommonWebView"; | 17 | import CommonWebView from "./src/Components/CommonWebView"; |
| 18 | import Details from "./src/pages/InsuranceCircle/details"; | 18 | import Details from "./src/pages/InsuranceCircle/details"; |
| 19 | +import CommonImageView from "./src/Components/CommonImageView"; | ||
| 20 | +// import SplashScreen from 'react-native-splash-screen' | ||
| 21 | + | ||
| 22 | +// export default class ProtectGod extends Component { | ||
| 23 | + | ||
| 24 | +// componentDidMount() { | ||
| 25 | +// // do anything while splash screen keeps, use await to wait for an async task. | ||
| 26 | +// // SplashScreen.hide(); | ||
| 27 | +// } | ||
| 28 | +// } | ||
| 29 | + | ||
| 19 | 30 | ||
| 20 | // 底部导航栏配置,但也只是作为一个页面,加载到StackNavigator成为第一个页面 | 31 | // 底部导航栏配置,但也只是作为一个页面,加载到StackNavigator成为第一个页面 |
| 21 | const MainTabBar = TabNavigator({ | 32 | const MainTabBar = TabNavigator({ |
| @@ -25,9 +36,9 @@ const MainTabBar = TabNavigator({ | @@ -25,9 +36,9 @@ const MainTabBar = TabNavigator({ | ||
| 25 | title: "首页", | 36 | title: "首页", |
| 26 | tabBarIcon: ({ focused }) => | 37 | tabBarIcon: ({ focused }) => |
| 27 | focused ? ( | 38 | focused ? ( |
| 28 | - <Image source={require("./src/assets/tabbar/ic_home_s.png")} /> | 39 | + <Image source={require("./src/assets/tabbar/ic_home_s.png")} style={styles.icon}/> |
| 29 | ) : ( | 40 | ) : ( |
| 30 | - <Image source={require("./src/assets/tabbar/ic_home_n.png")} /> | 41 | + <Image source={require("./src/assets/tabbar/ic_home_n.png")} style={styles.icon}/> |
| 31 | ) | 42 | ) |
| 32 | } | 43 | } |
| 33 | }, | 44 | }, |
| @@ -37,9 +48,9 @@ const MainTabBar = TabNavigator({ | @@ -37,9 +48,9 @@ const MainTabBar = TabNavigator({ | ||
| 37 | title: "保圈", | 48 | title: "保圈", |
| 38 | tabBarIcon: ({ focused }) => | 49 | tabBarIcon: ({ focused }) => |
| 39 | focused ? ( | 50 | focused ? ( |
| 40 | - <Image source={require("./src/assets/tabbar/ic_circle_s.png")} /> | 51 | + <Image source={require("./src/assets/tabbar/ic_circle_s.png")} style={styles.icon}/> |
| 41 | ) : ( | 52 | ) : ( |
| 42 | - <Image source={require("./src/assets/tabbar/ic_circle_n.png")} /> | 53 | + <Image source={require("./src/assets/tabbar/ic_circle_n.png")} style={styles.icon}/> |
| 43 | ) | 54 | ) |
| 44 | } | 55 | } |
| 45 | }, | 56 | }, |
| @@ -49,9 +60,9 @@ const MainTabBar = TabNavigator({ | @@ -49,9 +60,9 @@ const MainTabBar = TabNavigator({ | ||
| 49 | title: "保堂", | 60 | title: "保堂", |
| 50 | tabBarIcon: ({ focused }) => | 61 | tabBarIcon: ({ focused }) => |
| 51 | focused ? ( | 62 | focused ? ( |
| 52 | - <Image source={require("./src/assets/tabbar/ic_umbrella_s.png")} /> | 63 | + <Image source={require("./src/assets/tabbar/ic_umbrella_s.png")} style={styles.icon}/> |
| 53 | ) : ( | 64 | ) : ( |
| 54 | - <Image source={require("./src/assets/tabbar/ic_umbrella_n.png")} /> | 65 | + <Image source={require("./src/assets/tabbar/ic_umbrella_n.png")} style={styles.icon}/> |
| 55 | ) | 66 | ) |
| 56 | } | 67 | } |
| 57 | }, | 68 | }, |
| @@ -61,16 +72,23 @@ const MainTabBar = TabNavigator({ | @@ -61,16 +72,23 @@ const MainTabBar = TabNavigator({ | ||
| 61 | title: "我的", | 72 | title: "我的", |
| 62 | tabBarIcon: ({ focused }) => | 73 | tabBarIcon: ({ focused }) => |
| 63 | focused ? ( | 74 | focused ? ( |
| 64 | - <Image source={require("./src/assets/tabbar/ic_mine_s.png")} /> | 75 | + <Image source={require("./src/assets/tabbar/ic_mine_s.png")} style={styles.icon}/> |
| 65 | ) : ( | 76 | ) : ( |
| 66 | - <Image source={require("./src/assets/tabbar/ic_mine_n.png")} /> | 77 | + <Image source={require("./src/assets/tabbar/ic_mine_n.png")} style={styles.icon}/> |
| 67 | ) | 78 | ) |
| 68 | } | 79 | } |
| 69 | } | 80 | } |
| 70 | },{ | 81 | },{ |
| 82 | + tabBarComponent: TabBarBottom, | ||
| 71 | swipeEnabled: true, | 83 | swipeEnabled: true, |
| 84 | + tabBarPosition: 'bottom', | ||
| 72 | tabBarOptions: { | 85 | tabBarOptions: { |
| 73 | - activeTintColor: "#1B9341" | 86 | + showIcon: true, |
| 87 | + activeTintColor: "#1B9341", | ||
| 88 | + inactiveTintColor:"rgb(113,113,113)", | ||
| 89 | + style: { | ||
| 90 | + backgroundColor: '#fff', | ||
| 91 | + }, | ||
| 74 | } | 92 | } |
| 75 | }); | 93 | }); |
| 76 | 94 | ||
| @@ -87,19 +105,29 @@ const ProtectGod = StackNavigator( | @@ -87,19 +105,29 @@ const ProtectGod = StackNavigator( | ||
| 87 | navigationOptions: { headerTitle: "全部产品" } | 105 | navigationOptions: { headerTitle: "全部产品" } |
| 88 | }, | 106 | }, |
| 89 | CommonWebView: { screen: CommonWebView }, | 107 | CommonWebView: { screen: CommonWebView }, |
| 108 | + CommonImageView:{screen:CommonImageView}, | ||
| 90 | Details: { screen: Details } | 109 | Details: { screen: Details } |
| 91 | },{ | 110 | },{ |
| 92 | navigationOptions: { | 111 | navigationOptions: { |
| 93 | // headerTintColor: "blue", | 112 | // headerTintColor: "blue", |
| 113 | + headBackTitle:"返回", | ||
| 94 | headerStyle: { | 114 | headerStyle: { |
| 95 | - backgroundColor: "white" | 115 | + backgroundColor: "white", |
| 96 | - } | 116 | + }, |
| 117 | + headerTitleStyle:{ | ||
| 118 | + alignSelf:'center' | ||
| 119 | + }, | ||
| 97 | } | 120 | } |
| 98 | } | 121 | } |
| 99 | ); | 122 | ); |
| 100 | 123 | ||
| 101 | -const styles = StyleSheet.create( | 124 | +const styles = StyleSheet.create({ |
| 102 | - | 125 | + icon:{ |
| 126 | + height: 22, | ||
| 127 | + width: 25, | ||
| 128 | + resizeMode: 'contain' | ||
| 129 | + } | ||
| 130 | + } | ||
| 103 | ); | 131 | ); |
| 104 | 132 | ||
| 105 | AppRegistry.registerComponent("ProtectGod", () => ProtectGod); | 133 | AppRegistry.registerComponent("ProtectGod", () => ProtectGod); |
| @@ -5,7 +5,6 @@ | @@ -5,7 +5,6 @@ | ||
| 5 | }; | 5 | }; |
| 6 | objectVersion = 46; | 6 | objectVersion = 46; |
| 7 | objects = { | 7 | objects = { |
| 8 | - | ||
| 9 | /* Begin PBXBuildFile section */ | 8 | /* Begin PBXBuildFile section */ |
| 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; | 9 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; |
| 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; | 10 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; |
| @@ -37,6 +36,7 @@ | @@ -37,6 +36,7 @@ | ||
| 37 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; | 36 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; |
| 38 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; | 37 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; |
| 39 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; | 38 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; |
| 39 | + C91577173D3947ED9D1548F5 /* libSplashScreen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DF994B30760F474FACB8FF75 /* libSplashScreen.a */; }; | ||
| 40 | /* End PBXBuildFile section */ | 40 | /* End PBXBuildFile section */ |
| 41 | 41 | ||
| 42 | /* Begin PBXContainerItemProxy section */ | 42 | /* Begin PBXContainerItemProxy section */ |
| @@ -299,6 +299,8 @@ | @@ -299,6 +299,8 @@ | ||
| 299 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; }; | 299 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; }; |
| 300 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; }; | 300 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; }; |
| 301 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; }; | 301 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; }; |
| 302 | + 80E39CDAE5D6417B95E2E782 /* SplashScreen.xcodeproj */ = {isa = PBXFileReference; name = "SplashScreen.xcodeproj"; path = "../node_modules/react-native-splash-screen/ios/SplashScreen.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; }; | ||
| 303 | + DF994B30760F474FACB8FF75 /* libSplashScreen.a */ = {isa = PBXFileReference; name = "libSplashScreen.a"; path = "libSplashScreen.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; }; | ||
| 302 | /* End PBXFileReference section */ | 304 | /* End PBXFileReference section */ |
| 303 | 305 | ||
| 304 | /* Begin PBXFrameworksBuildPhase section */ | 306 | /* Begin PBXFrameworksBuildPhase section */ |
| @@ -327,6 +329,7 @@ | @@ -327,6 +329,7 @@ | ||
| 327 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, | 329 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, |
| 328 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, | 330 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, |
| 329 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, | 331 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, |
| 332 | + C91577173D3947ED9D1548F5 /* libSplashScreen.a in Frameworks */, | ||
| 330 | ); | 333 | ); |
| 331 | runOnlyForDeploymentPostprocessing = 0; | 334 | runOnlyForDeploymentPostprocessing = 0; |
| 332 | }; | 335 | }; |
| @@ -498,6 +501,7 @@ | @@ -498,6 +501,7 @@ | ||
| 498 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, | 501 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, |
| 499 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, | 502 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, |
| 500 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, | 503 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, |
| 504 | + 80E39CDAE5D6417B95E2E782 /* SplashScreen.xcodeproj */, | ||
| 501 | ); | 505 | ); |
| 502 | name = Libraries; | 506 | name = Libraries; |
| 503 | sourceTree = "<group>"; | 507 | sourceTree = "<group>"; |
| @@ -625,7 +629,7 @@ | @@ -625,7 +629,7 @@ | ||
| 625 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { | 629 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { |
| 626 | isa = PBXProject; | 630 | isa = PBXProject; |
| 627 | attributes = { | 631 | attributes = { |
| 628 | - LastUpgradeCheck = 0610; | 632 | + LastUpgradeCheck = 610; |
| 629 | ORGANIZATIONNAME = Facebook; | 633 | ORGANIZATIONNAME = Facebook; |
| 630 | TargetAttributes = { | 634 | TargetAttributes = { |
| 631 | 00E356ED1AD99517003FC87E = { | 635 | 00E356ED1AD99517003FC87E = { |
| @@ -1085,6 +1089,14 @@ | @@ -1085,6 +1089,14 @@ | ||
| 1085 | ); | 1089 | ); |
| 1086 | PRODUCT_NAME = "$(TARGET_NAME)"; | 1090 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 1087 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProtectGod.app/ProtectGod"; | 1091 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProtectGod.app/ProtectGod"; |
| 1092 | + LIBRARY_SEARCH_PATHS = ( | ||
| 1093 | + "$(inherited)", | ||
| 1094 | + "\"$(SRCROOT)/$(TARGET_NAME)\"", | ||
| 1095 | + ); | ||
| 1096 | + HEADER_SEARCH_PATHS = ( | ||
| 1097 | + "$(inherited)", | ||
| 1098 | + "$(SRCROOT)\..\node_modules\react-native-splash-screen\ios", | ||
| 1099 | + ); | ||
| 1088 | }; | 1100 | }; |
| 1089 | name = Debug; | 1101 | name = Debug; |
| 1090 | }; | 1102 | }; |
| @@ -1103,6 +1115,14 @@ | @@ -1103,6 +1115,14 @@ | ||
| 1103 | ); | 1115 | ); |
| 1104 | PRODUCT_NAME = "$(TARGET_NAME)"; | 1116 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 1105 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProtectGod.app/ProtectGod"; | 1117 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProtectGod.app/ProtectGod"; |
| 1118 | + LIBRARY_SEARCH_PATHS = ( | ||
| 1119 | + "$(inherited)", | ||
| 1120 | + "\"$(SRCROOT)/$(TARGET_NAME)\"", | ||
| 1121 | + ); | ||
| 1122 | + HEADER_SEARCH_PATHS = ( | ||
| 1123 | + "$(inherited)", | ||
| 1124 | + "$(SRCROOT)\..\node_modules\react-native-splash-screen\ios", | ||
| 1125 | + ); | ||
| 1106 | }; | 1126 | }; |
| 1107 | name = Release; | 1127 | name = Release; |
| 1108 | }; | 1128 | }; |
| @@ -1126,6 +1146,10 @@ | @@ -1126,6 +1146,10 @@ | ||
| 1126 | PRODUCT_NAME = ProtectGod; | 1146 | PRODUCT_NAME = ProtectGod; |
| 1127 | PROVISIONING_PROFILE_SPECIFIER = ""; | 1147 | PROVISIONING_PROFILE_SPECIFIER = ""; |
| 1128 | VERSIONING_SYSTEM = "apple-generic"; | 1148 | VERSIONING_SYSTEM = "apple-generic"; |
| 1149 | + HEADER_SEARCH_PATHS = ( | ||
| 1150 | + "$(inherited)", | ||
| 1151 | + "$(SRCROOT)\..\node_modules\react-native-splash-screen\ios", | ||
| 1152 | + ); | ||
| 1129 | }; | 1153 | }; |
| 1130 | name = Debug; | 1154 | name = Debug; |
| 1131 | }; | 1155 | }; |
| @@ -1148,6 +1172,10 @@ | @@ -1148,6 +1172,10 @@ | ||
| 1148 | PRODUCT_NAME = ProtectGod; | 1172 | PRODUCT_NAME = ProtectGod; |
| 1149 | PROVISIONING_PROFILE_SPECIFIER = ""; | 1173 | PROVISIONING_PROFILE_SPECIFIER = ""; |
| 1150 | VERSIONING_SYSTEM = "apple-generic"; | 1174 | VERSIONING_SYSTEM = "apple-generic"; |
| 1175 | + HEADER_SEARCH_PATHS = ( | ||
| 1176 | + "$(inherited)", | ||
| 1177 | + "$(SRCROOT)\..\node_modules\react-native-splash-screen\ios", | ||
| 1178 | + ); | ||
| 1151 | }; | 1179 | }; |
| 1152 | name = Release; | 1180 | name = Release; |
| 1153 | }; | 1181 | }; |
| @@ -1174,6 +1202,14 @@ | @@ -1174,6 +1202,14 @@ | ||
| 1174 | SDKROOT = appletvos; | 1202 | SDKROOT = appletvos; |
| 1175 | TARGETED_DEVICE_FAMILY = 3; | 1203 | TARGETED_DEVICE_FAMILY = 3; |
| 1176 | TVOS_DEPLOYMENT_TARGET = 9.2; | 1204 | TVOS_DEPLOYMENT_TARGET = 9.2; |
| 1205 | + LIBRARY_SEARCH_PATHS = ( | ||
| 1206 | + "$(inherited)", | ||
| 1207 | + "\"$(SRCROOT)/$(TARGET_NAME)\"", | ||
| 1208 | + ); | ||
| 1209 | + HEADER_SEARCH_PATHS = ( | ||
| 1210 | + "$(inherited)", | ||
| 1211 | + "$(SRCROOT)\..\node_modules\react-native-splash-screen\ios", | ||
| 1212 | + ); | ||
| 1177 | }; | 1213 | }; |
| 1178 | name = Debug; | 1214 | name = Debug; |
| 1179 | }; | 1215 | }; |
| @@ -1200,6 +1236,14 @@ | @@ -1200,6 +1236,14 @@ | ||
| 1200 | SDKROOT = appletvos; | 1236 | SDKROOT = appletvos; |
| 1201 | TARGETED_DEVICE_FAMILY = 3; | 1237 | TARGETED_DEVICE_FAMILY = 3; |
| 1202 | TVOS_DEPLOYMENT_TARGET = 9.2; | 1238 | TVOS_DEPLOYMENT_TARGET = 9.2; |
| 1239 | + LIBRARY_SEARCH_PATHS = ( | ||
| 1240 | + "$(inherited)", | ||
| 1241 | + "\"$(SRCROOT)/$(TARGET_NAME)\"", | ||
| 1242 | + ); | ||
| 1243 | + HEADER_SEARCH_PATHS = ( | ||
| 1244 | + "$(inherited)", | ||
| 1245 | + "$(SRCROOT)\..\node_modules\react-native-splash-screen\ios", | ||
| 1246 | + ); | ||
| 1203 | }; | 1247 | }; |
| 1204 | name = Release; | 1248 | name = Release; |
| 1205 | }; | 1249 | }; |
| @@ -1221,6 +1265,10 @@ | @@ -1221,6 +1265,10 @@ | ||
| 1221 | SDKROOT = appletvos; | 1265 | SDKROOT = appletvos; |
| 1222 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProtectGod-tvOS.app/ProtectGod-tvOS"; | 1266 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProtectGod-tvOS.app/ProtectGod-tvOS"; |
| 1223 | TVOS_DEPLOYMENT_TARGET = 10.1; | 1267 | TVOS_DEPLOYMENT_TARGET = 10.1; |
| 1268 | + LIBRARY_SEARCH_PATHS = ( | ||
| 1269 | + "$(inherited)", | ||
| 1270 | + "\"$(SRCROOT)/$(TARGET_NAME)\"", | ||
| 1271 | + ); | ||
| 1224 | }; | 1272 | }; |
| 1225 | name = Debug; | 1273 | name = Debug; |
| 1226 | }; | 1274 | }; |
| @@ -1242,6 +1290,10 @@ | @@ -1242,6 +1290,10 @@ | ||
| 1242 | SDKROOT = appletvos; | 1290 | SDKROOT = appletvos; |
| 1243 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProtectGod-tvOS.app/ProtectGod-tvOS"; | 1291 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProtectGod-tvOS.app/ProtectGod-tvOS"; |
| 1244 | TVOS_DEPLOYMENT_TARGET = 10.1; | 1292 | TVOS_DEPLOYMENT_TARGET = 10.1; |
| 1293 | + LIBRARY_SEARCH_PATHS = ( | ||
| 1294 | + "$(inherited)", | ||
| 1295 | + "\"$(SRCROOT)/$(TARGET_NAME)\"", | ||
| 1296 | + ); | ||
| 1245 | }; | 1297 | }; |
| 1246 | name = Release; | 1298 | name = Release; |
| 1247 | }; | 1299 | }; |
| 1 | { | 1 | { |
| 2 | - "name": "ProtectGod", | 2 | + "name": "ProtectGod", |
| 3 | - "version": "0.0.1", | 3 | + "version": "0.0.1", |
| 4 | - "private": true, | 4 | + "private": true, |
| 5 | - "scripts": { | 5 | + "scripts": { |
| 6 | - "start": "node node_modules/react-native/local-cli/cli.js start", | 6 | + "start": "node node_modules/react-native/local-cli/cli.js start", |
| 7 | - "test": "jest" | 7 | + "test": "jest" |
| 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 | + "react-native-dialog": "^1.0.7", |
| 13 | - "react-navigation": "^1.0.0-beta.11" | 13 | + "react-native-popup-dialog": "^0.9.35", |
| 14 | - }, | 14 | + "react-native-splash-screen": "^3.0.1", |
| 15 | - "devDependencies": { | 15 | + "react-native-swiper": "^1.5.11", |
| 16 | - "babel-jest": "20.0.3", | 16 | + "react-navigation": "^1.0.0-beta.11" |
| 17 | - "babel-preset-react-native": "3.0.2", | 17 | + }, |
| 18 | - "jest": "20.0.4", | 18 | + "devDependencies": { |
| 19 | - "react-test-renderer": "16.0.0-alpha.12" | 19 | + "babel-jest": "20.0.3", |
| 20 | - }, | 20 | + "babel-preset-react-native": "3.0.2", |
| 21 | - "jest": { | 21 | + "jest": "20.0.4", |
| 22 | - "preset": "react-native" | 22 | + "react-test-renderer": "16.0.0-alpha.12" |
| 23 | - } | 23 | + }, |
| 24 | + "jest": { | ||
| 25 | + "preset": "react-native" | ||
| 26 | + } | ||
| 24 | } | 27 | } |
src/Components/CommonImageView.js
0 → 100644
| 1 | +import React, { Component } from "react"; | ||
| 2 | +import { | ||
| 3 | + StyleSheet, | ||
| 4 | + WebView, | ||
| 5 | + View, | ||
| 6 | + Image, | ||
| 7 | + Dimensions, | ||
| 8 | + ScrollView | ||
| 9 | +} from "react-native"; | ||
| 10 | +import { StackNavigator, TabNavigator } from "react-navigation"; | ||
| 11 | + | ||
| 12 | +export default class CommonImageView extends Component { | ||
| 13 | + constructor(props) { | ||
| 14 | + super(props); | ||
| 15 | + } | ||
| 16 | + render() { | ||
| 17 | + console.log("Image index", this.props.navigation.state.params.index); | ||
| 18 | + const index = this.props.navigation.state.params.index; | ||
| 19 | + return ( | ||
| 20 | + <View style={styles.container}> | ||
| 21 | + <ScrollView> | ||
| 22 | + {index == 0 ? ( | ||
| 23 | + <Image | ||
| 24 | + style={styles.imgOne} | ||
| 25 | + resizeMode="contain" | ||
| 26 | + source={require("../assets/home/product_long_1.jpg")} | ||
| 27 | + /> | ||
| 28 | + ) : ( | ||
| 29 | + <Image | ||
| 30 | + style={styles.imgTwo} | ||
| 31 | + resizeMode="contain" | ||
| 32 | + source={require("../assets/home/product_long_2.jpg")} | ||
| 33 | + /> | ||
| 34 | + )} | ||
| 35 | + </ScrollView> | ||
| 36 | + </View> | ||
| 37 | + ); | ||
| 38 | + } | ||
| 39 | +} | ||
| 40 | + | ||
| 41 | +const styles = StyleSheet.create({ | ||
| 42 | + container: { | ||
| 43 | + justifyContent: "flex-start", | ||
| 44 | + backgroundColor: "#EFEFEF", | ||
| 45 | + }, | ||
| 46 | + imgOne: { | ||
| 47 | + width: Dimensions.get("window").width, | ||
| 48 | + height: Dimensions.get("window").width * 3118 / 640, | ||
| 49 | + }, | ||
| 50 | + imgTwo: { | ||
| 51 | + width: Dimensions.get("window").width, | ||
| 52 | + height: Dimensions.get("window").width * 1651 / 690, | ||
| 53 | + } | ||
| 54 | +}); |
src/assets/home/product_long_1.jpg
0 → 100644
147 KB
src/assets/home/product_long_2.jpg
0 → 100644
141 KB
| @@ -10,6 +10,7 @@ import { | @@ -10,6 +10,7 @@ import { | ||
| 10 | } from "react-native"; | 10 | } from "react-native"; |
| 11 | import { StackNavigator, TabNavigator } from 'react-navigation'; | 11 | import { StackNavigator, TabNavigator } from 'react-navigation'; |
| 12 | import CommonWebView from "../../Components/CommonWebView"; | 12 | import CommonWebView from "../../Components/CommonWebView"; |
| 13 | +import CommonImageView from "../../Components/CommonImageView" | ||
| 13 | 14 | ||
| 14 | export default class AllProduct extends Component { | 15 | export default class AllProduct extends Component { |
| 15 | 16 | ||
| @@ -47,7 +48,7 @@ export default class AllProduct extends Component { | @@ -47,7 +48,7 @@ export default class AllProduct extends Component { | ||
| 47 | <TouchableOpacity | 48 | <TouchableOpacity |
| 48 | style={styles.itemContainer} | 49 | style={styles.itemContainer} |
| 49 | key={index} | 50 | key={index} |
| 50 | - onPress={() => navigate("CommonWebView", { item: item })} | 51 | + onPress={() => navigate("CommonImageView", { index: index })} |
| 51 | > | 52 | > |
| 52 | <Image style={styles.itemImgWrapper} source={item.imgurl} /> | 53 | <Image style={styles.itemImgWrapper} source={item.imgurl} /> |
| 53 | <View style={styles.itemRightWrapper}> | 54 | <View style={styles.itemRightWrapper}> |
| @@ -79,11 +79,17 @@ export default class Home extends Component { | @@ -79,11 +79,17 @@ export default class Home extends Component { | ||
| 79 | img: require("../../assets/home/slider_3.jpeg") | 79 | img: require("../../assets/home/slider_3.jpeg") |
| 80 | // url: "https://www.baidu.com/" | 80 | // url: "https://www.baidu.com/" |
| 81 | } | 81 | } |
| 82 | - ] | 82 | + ], |
| 83 | + swiperShow:false, | ||
| 83 | }; | 84 | }; |
| 84 | } | 85 | } |
| 85 | componentDidMount() { | 86 | componentDidMount() { |
| 86 | console.log("thisprops", this.props); | 87 | console.log("thisprops", this.props); |
| 88 | + setTimeout(()=>{ | ||
| 89 | + this.setState({ | ||
| 90 | + swiperShow:true | ||
| 91 | + }); | ||
| 92 | + },0) | ||
| 87 | } | 93 | } |
| 88 | _renderMap() { | 94 | _renderMap() { |
| 89 | const { navigate } = this.props.navigation; | 95 | const { navigate } = this.props.navigation; |
| @@ -113,40 +119,42 @@ export default class Home extends Component { | @@ -113,40 +119,42 @@ export default class Home extends Component { | ||
| 113 | const { navigate } = this.props.navigation; | 119 | const { navigate } = this.props.navigation; |
| 114 | const {height, width} = Dimensions.get('window'); | 120 | const {height, width} = Dimensions.get('window'); |
| 115 | const imgHeight = width * 140 / 375; | 121 | const imgHeight = width * 140 / 375; |
| 116 | - return ( | 122 | + if(this.state.swiperShow){ |
| 117 | - <View style={{ height: imgHeight }}> | 123 | + return ( |
| 118 | - <Swiper | 124 | + <View style={{ height: imgHeight }}> |
| 119 | - style={styles.swiperWrapper} | 125 | + <Swiper |
| 120 | - autoplay={true} | 126 | + style={styles.swiperWrapper} |
| 121 | - autoplayTimeout={6} | 127 | + autoplay={true} |
| 122 | - height={imgHeight} | 128 | + autoplayTimeout={6} |
| 123 | - dotStyle={{ | 129 | + height={imgHeight} |
| 124 | - width: 6, | 130 | + dotStyle={{ |
| 125 | - height: 6, | 131 | + width: 6, |
| 126 | - }} | 132 | + height: 6, |
| 127 | - activeDotStyle={{ | 133 | + }} |
| 128 | - width: 6, | 134 | + activeDotStyle={{ |
| 129 | - height: 6 | 135 | + width: 6, |
| 130 | - }} | 136 | + height: 6 |
| 131 | - > | 137 | + }} |
| 132 | - {this.state.swiperImgList.map((item, index) => { | 138 | + > |
| 133 | - { | 139 | + {this.state.swiperImgList.map((item, index) => { |
| 134 | - /* console.log("图片item",item); */ | 140 | + { |
| 135 | - } | 141 | + /* console.log("图片item",item.img); */ |
| 136 | - return ( | 142 | + } |
| 137 | - <TouchableOpacity style={styles.slide} key={index}> | 143 | + return ( |
| 138 | - <Image | 144 | + <TouchableOpacity style={styles.slide} key={index}> |
| 139 | - style={styles.slideImg} | 145 | + <Image |
| 140 | - source={item.img} | 146 | + style={styles.slideImg} |
| 141 | - width={Dimensions.get('window').width} | 147 | + source={item.img} |
| 142 | - resizeMode="stretch" | 148 | + width={Dimensions.get('window').width} |
| 143 | - /> | 149 | + resizeMode="stretch" |
| 144 | - </TouchableOpacity> | 150 | + /> |
| 145 | - ); | 151 | + </TouchableOpacity> |
| 146 | - })} | 152 | + ); |
| 147 | - </Swiper> | 153 | + })} |
| 148 | - </View> | 154 | + </Swiper> |
| 149 | - ); | 155 | + </View> |
| 156 | + ); | ||
| 157 | + } | ||
| 150 | } | 158 | } |
| 151 | render() { | 159 | render() { |
| 152 | console.log("首页的this.props", this); | 160 | console.log("首页的this.props", this); |
| @@ -114,7 +114,7 @@ export default class Details extends Component { | @@ -114,7 +114,7 @@ export default class Details extends Component { | ||
| 114 | </View> | 114 | </View> |
| 115 | </ScrollView> | 115 | </ScrollView> |
| 116 | <KeyboardAvoidingView | 116 | <KeyboardAvoidingView |
| 117 | - behavior="padding" | 117 | + behavior="height" |
| 118 | keyboardVerticalOffset={60} | 118 | keyboardVerticalOffset={60} |
| 119 | style={styles.KAVContainer} | 119 | style={styles.KAVContainer} |
| 120 | contentContainerStyle={styles.contentContainerStyle} | 120 | contentContainerStyle={styles.contentContainerStyle} |
| @@ -125,6 +125,7 @@ export default class Details extends Component { | @@ -125,6 +125,7 @@ export default class Details extends Component { | ||
| 125 | style={styles.msgInput} | 125 | style={styles.msgInput} |
| 126 | placeholder="留言" | 126 | placeholder="留言" |
| 127 | onChangeText={content => this.setState({ content })} | 127 | onChangeText={content => this.setState({ content })} |
| 128 | + underlineColorAndroid={'transparent'} | ||
| 128 | value={this.state.content} | 129 | value={this.state.content} |
| 129 | autoCapitalize="none" | 130 | autoCapitalize="none" |
| 130 | selectionColor="#1B9341" | 131 | selectionColor="#1B9341" |
| @@ -159,8 +160,8 @@ export default class Details extends Component { | @@ -159,8 +160,8 @@ export default class Details extends Component { | ||
| 159 | return fetch(`https://devpay.brae.co/test/insurance/comment/get`, { | 160 | return fetch(`https://devpay.brae.co/test/insurance/comment/get`, { |
| 160 | method: "POST", | 161 | method: "POST", |
| 161 | headers: { | 162 | headers: { |
| 162 | - Accept: "application/json", | 163 | + // Accept: "application/json", |
| 163 | - "Content-Type": "application/json" | 164 | + // "Content-Type": "application/json" |
| 164 | }, | 165 | }, |
| 165 | body: formData | 166 | body: formData |
| 166 | }) | 167 | }) |
| @@ -195,8 +196,8 @@ export default class Details extends Component { | @@ -195,8 +196,8 @@ export default class Details extends Component { | ||
| 195 | return fetch(`https://devpay.brae.co/test/insurance/comment/add`, { | 196 | return fetch(`https://devpay.brae.co/test/insurance/comment/add`, { |
| 196 | method: "POST", | 197 | method: "POST", |
| 197 | headers: { | 198 | headers: { |
| 198 | - Accept: "application/json", | 199 | + // Accept: "application/json", |
| 199 | - "Content-Type": "application/json" | 200 | + // "Content-Type": "application/json" |
| 200 | }, | 201 | }, |
| 201 | body: formData | 202 | body: formData |
| 202 | }) | 203 | }) |
| @@ -30,8 +30,8 @@ export default class InsuranceCircle extends Component { | @@ -30,8 +30,8 @@ export default class InsuranceCircle extends Component { | ||
| 30 | return fetch(`https://devpay.brae.co/test/insurance/article`, { | 30 | return fetch(`https://devpay.brae.co/test/insurance/article`, { |
| 31 | method: "POST", | 31 | method: "POST", |
| 32 | headers: { | 32 | headers: { |
| 33 | - Accept: "application/json", | 33 | + // Accept: "application/json", |
| 34 | - "Content-Type": "application/json" | 34 | + // "Content-Type": "application/json" |
| 35 | } | 35 | } |
| 36 | }) | 36 | }) |
| 37 | .then(resp => { | 37 | .then(resp => { |
| @@ -209,8 +209,8 @@ export default class Login extends Component { | @@ -209,8 +209,8 @@ export default class Login extends Component { | ||
| 209 | return fetch(`https://devpay.brae.co/test/insurance/login`, { | 209 | return fetch(`https://devpay.brae.co/test/insurance/login`, { |
| 210 | method: "POST", | 210 | method: "POST", |
| 211 | headers: { | 211 | headers: { |
| 212 | - Accept: "application/json", | 212 | + // Accept: "application/json", |
| 213 | - "Content-Type": "application/json" | 213 | + // "Content-Type": "application/json" |
| 214 | }, | 214 | }, |
| 215 | body: formData | 215 | body: formData |
| 216 | }) | 216 | }) |
| @@ -283,8 +283,8 @@ export default class Login extends Component { | @@ -283,8 +283,8 @@ export default class Login extends Component { | ||
| 283 | return fetch(`https://devpay.brae.co/test/insurance/register`, { | 283 | return fetch(`https://devpay.brae.co/test/insurance/register`, { |
| 284 | method: "POST", | 284 | method: "POST", |
| 285 | headers: { | 285 | headers: { |
| 286 | - Accept: "application/json", | 286 | + // Accept: "application/json", |
| 287 | - "Content-Type": "application/json" | 287 | + // "Content-Type": "application/json" |
| 288 | }, | 288 | }, |
| 289 | body: formData | 289 | body: formData |
| 290 | }) | 290 | }) |
| @@ -7,11 +7,11 @@ import { | @@ -7,11 +7,11 @@ import { | ||
| 7 | TouchableOpacity, | 7 | TouchableOpacity, |
| 8 | Image, | 8 | Image, |
| 9 | Alert, | 9 | Alert, |
| 10 | - AlertIOS, | ||
| 11 | AsyncStorage, | 10 | AsyncStorage, |
| 12 | - Button | 11 | + Button, |
| 13 | } from "react-native"; | 12 | } from "react-native"; |
| 14 | import { StackNavigator, TabNavigator } from "react-navigation"; | 13 | import { StackNavigator, TabNavigator } from "react-navigation"; |
| 14 | +import Dialog from "react-native-dialog"; | ||
| 15 | 15 | ||
| 16 | export default class Mine extends Component { | 16 | export default class Mine extends Component { |
| 17 | constructor(props) { | 17 | constructor(props) { |
| @@ -83,8 +83,6 @@ export default class Mine extends Component { | @@ -83,8 +83,6 @@ export default class Mine extends Component { | ||
| 83 | return fetch(`https://devpay.brae.co/test/insurance/change`, { | 83 | return fetch(`https://devpay.brae.co/test/insurance/change`, { |
| 84 | method: "POST", | 84 | method: "POST", |
| 85 | headers: { | 85 | headers: { |
| 86 | - Accept: "application/json", | ||
| 87 | - "Content-Type": "application/json" | ||
| 88 | }, | 86 | }, |
| 89 | body: formData | 87 | body: formData |
| 90 | }) | 88 | }) |
| @@ -120,8 +118,6 @@ export default class Mine extends Component { | @@ -120,8 +118,6 @@ export default class Mine extends Component { | ||
| 120 | return fetch(`https://devpay.brae.co/test/insurance/change`, { | 118 | return fetch(`https://devpay.brae.co/test/insurance/change`, { |
| 121 | method: "POST", | 119 | method: "POST", |
| 122 | headers: { | 120 | headers: { |
| 123 | - Accept: "application/json", | ||
| 124 | - "Content-Type": "application/json" | ||
| 125 | }, | 121 | }, |
| 126 | body: formData | 122 | body: formData |
| 127 | }) | 123 | }) |
| @@ -170,7 +166,13 @@ export default class Mine extends Component { | @@ -170,7 +166,13 @@ export default class Mine extends Component { | ||
| 170 | style={styles.itemContainer} | 166 | style={styles.itemContainer} |
| 171 | onPress={() => { | 167 | onPress={() => { |
| 172 | if (this.state.IS_LOGIN == "yes") { | 168 | if (this.state.IS_LOGIN == "yes") { |
| 173 | - AlertIOS.prompt("更改昵称", null, this.saveResponse1); | 169 | + Dialog.prompt("更改昵称", null, [{ |
| 170 | + text: '确定', | ||
| 171 | + onPress: (value) => { | ||
| 172 | + this.saveResponse1(value) | ||
| 173 | + }, | ||
| 174 | + }], undefined); | ||
| 175 | + // AlertIOS.prompt("更改昵称", null, this.saveResponse1); | ||
| 174 | } else { | 176 | } else { |
| 175 | Alert.alert("请先登录账号") | 177 | Alert.alert("请先登录账号") |
| 176 | } | 178 | } |
| @@ -200,7 +202,13 @@ export default class Mine extends Component { | @@ -200,7 +202,13 @@ export default class Mine extends Component { | ||
| 200 | style={styles.itemContainer} | 202 | style={styles.itemContainer} |
| 201 | onPress={() => { | 203 | onPress={() => { |
| 202 | if (this.state.IS_LOGIN == "yes") { | 204 | if (this.state.IS_LOGIN == "yes") { |
| 203 | - AlertIOS.prompt("更改职业", null, this.saveResponse2); | 205 | + Dialog.prompt("更改职业", null, [{ |
| 206 | + text: '确定', | ||
| 207 | + onPress: (value) => { | ||
| 208 | + this.saveResponse2(value) | ||
| 209 | + }, | ||
| 210 | + }], undefined); | ||
| 211 | + // AlertIOS.prompt("更改职业", null, this.saveResponse2); | ||
| 204 | } else { | 212 | } else { |
| 205 | Alert.alert("请先登录账号") | 213 | Alert.alert("请先登录账号") |
| 206 | } | 214 | } |
-
Please register or login to post a comment