Skip to content

Commit 8843f38

Browse files
committed
login
1 parent f43ee08 commit 8843f38

File tree

12 files changed

+201
-4
lines changed

12 files changed

+201
-4
lines changed

android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ android {
149149
}
150150

151151
dependencies {
152+
compile project(':react-native-syan-image-picker')
152153
compile project(':react-native-splash-screen')
153154
compile project(':react-native-blur')
154155
compile project(':react-native-linear-gradient')

android/app/src/main/java/com/awesomeproject/MainApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.Application;
44

55
import com.facebook.react.ReactApplication;
6+
import com.reactlibrary.RNSyanImagePickerPackage;
67
import org.devio.rn.splashscreen.SplashScreenReactPackage;
78
import com.cmcewen.blurview.BlurViewPackage;
89
import com.BV.LinearGradient.LinearGradientPackage;
@@ -34,6 +35,7 @@ public boolean getUseDeveloperSupport() {
3435
protected List<ReactPackage> getPackages() {
3536
return Arrays.<ReactPackage>asList(
3637
new MainReactPackage(),
38+
new RNSyanImagePickerPackage(),
3739
new SplashScreenReactPackage(),
3840
new BlurViewPackage(),
3941
new LinearGradientPackage(),

android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
rootProject.name = 'AwesomeProject'
2+
include ':react-native-syan-image-picker'
3+
project(':react-native-syan-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-syan-image-picker/android')
24
include ':react-native-splash-screen'
35
project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android')
46
include ':react-native-blur'

ios/AwesomeProject.xcodeproj/project.pbxproj

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2323
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2424
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
25+
75A02463267C4F01A58F07A9 /* libRNSyanImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CEC7DE2E2DE348A1888A445C /* libRNSyanImagePicker.a */; };
2526
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
2627
93BDEE8256F34A1688C90530 /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E4681A9998E74655BB145DBA /* SimpleLineIcons.ttf */; };
2728
9427BD1F746A43A3945E717B /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = CB85E3A3243D4DC5B0D07790 /* MaterialIcons.ttf */; };
@@ -33,6 +34,7 @@
3334
C1595B3620811072000EE772 /* libCodePush.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C184F23920600B5D002C3ED1 /* libCodePush.a */; };
3435
C1595B622081115F000EE772 /* libSplashScreen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C153C8C9208085FD00AE197D /* libSplashScreen.a */; };
3536
C1595B6320811929000EE772 /* libBVLinearGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C107CD232062369C0092BDCC /* libBVLinearGradient.a */; };
37+
C1595C5D20814891000EE772 /* TZImagePickerController.bundle in Resources */ = {isa = PBXBuildFile; fileRef = C1595C5C20814891000EE772 /* TZImagePickerController.bundle */; };
3638
DF73FDB979234C9F8479AB88 /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6EBED712511344E5ADA8565A /* FontAwesome.ttf */; };
3739
EFDCC6BF420E4F7BB42F02AE /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FC133623B92A41C8B4630EF6 /* Ionicons.ttf */; };
3840
FD30C84063F94E01930DABE1 /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A696A4AB6E5349809FFEF8EA /* EvilIcons.ttf */; };
@@ -347,6 +349,13 @@
347349
remoteGlobalIDString = 3D7682761D8E76B80014119E;
348350
remoteInfo = SplashScreen;
349351
};
352+
C1595C5A208147BC000EE772 /* PBXContainerItemProxy */ = {
353+
isa = PBXContainerItemProxy;
354+
containerPortal = 3ADA8582D9E94266A97F59B7 /* RNSyanImagePicker.xcodeproj */;
355+
proxyType = 2;
356+
remoteGlobalIDString = 134814201AA4EA6300B7C361;
357+
remoteInfo = RNSyanImagePicker;
358+
};
350359
C184F23820600B5D002C3ED1 /* PBXContainerItemProxy */ = {
351360
isa = PBXContainerItemProxy;
352361
containerPortal = 4C9BD82EEDE94161A82C4170 /* CodePush.xcodeproj */;
@@ -386,6 +395,7 @@
386395
2CFDFD34F5C54338AFAB909B /* BVLinearGradient.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = BVLinearGradient.xcodeproj; path = "../node_modules/react-native-linear-gradient/BVLinearGradient.xcodeproj"; sourceTree = "<group>"; };
387396
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
388397
39EA14682BA345A0AF2EC429 /* libRNBlur.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNBlur.a; sourceTree = "<group>"; };
398+
3ADA8582D9E94266A97F59B7 /* RNSyanImagePicker.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSyanImagePicker.xcodeproj; path = "../node_modules/react-native-syan-image-picker/ios/RNSyanImagePicker.xcodeproj"; sourceTree = "<group>"; };
389399
4440ABBA1B154A5C95BACE88 /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = "<group>"; };
390400
4C9BD82EEDE94161A82C4170 /* CodePush.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = CodePush.xcodeproj; path = "../node_modules/react-native-code-push/ios/CodePush.xcodeproj"; sourceTree = "<group>"; };
391401
4D153A5389AD44F4B4E37997 /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
@@ -402,7 +412,10 @@
402412
A696A4AB6E5349809FFEF8EA /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = "<group>"; };
403413
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
404414
C107CD0E20615D840092BDCC /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = AwesomeProject/Images.xcassets; sourceTree = "<group>"; };
415+
C1595C5C20814891000EE772 /* TZImagePickerController.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = TZImagePickerController.bundle; path = "../node_modules/react-native-syan-image-picker/ios/TZImagePickerController/TZImagePickerController.bundle"; sourceTree = "<group>"; };
416+
C1595C5E20814AB7000EE772 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
405417
CB85E3A3243D4DC5B0D07790 /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = "<group>"; };
418+
CEC7DE2E2DE348A1888A445C /* libRNSyanImagePicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSyanImagePicker.a; sourceTree = "<group>"; };
406419
D053671C50B94A0C87A949B0 /* libBVLinearGradient.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libBVLinearGradient.a; sourceTree = "<group>"; };
407420
D12DBB27A3FF47B78D64DB96 /* libRNVectorIcons.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNVectorIcons.a; sourceTree = "<group>"; };
408421
D5734C1464604B2D9C904360 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialCommunityIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; };
@@ -441,6 +454,7 @@
441454
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
442455
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
443456
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
457+
75A02463267C4F01A58F07A9 /* libRNSyanImagePicker.a in Frameworks */,
444458
);
445459
runOnlyForDeploymentPostprocessing = 0;
446460
};
@@ -628,6 +642,7 @@
628642
2CFDFD34F5C54338AFAB909B /* BVLinearGradient.xcodeproj */,
629643
63077EF25FC041DDBC7431C2 /* RNBlur.xcodeproj */,
630644
E0439AF26E7F4329BEA01113 /* SplashScreen.xcodeproj */,
645+
3ADA8582D9E94266A97F59B7 /* RNSyanImagePicker.xcodeproj */,
631646
);
632647
name = Libraries;
633648
sourceTree = "<group>";
@@ -644,6 +659,7 @@
644659
83CBB9F61A601CBA00E9B192 = {
645660
isa = PBXGroup;
646661
children = (
662+
C1595C5C20814891000EE772 /* TZImagePickerController.bundle */,
647663
13B07FAE1A68108700A75B9A /* AwesomeProject */,
648664
832341AE1AAA6A7D00B99B32 /* Libraries */,
649665
00E356EF1AD99517003FC87E /* AwesomeProjectTests */,
@@ -701,6 +717,7 @@
701717
D053671C50B94A0C87A949B0 /* libBVLinearGradient.a */,
702718
39EA14682BA345A0AF2EC429 /* libRNBlur.a */,
703719
1EDE998CC5AD441F9FB3C7CE /* libSplashScreen.a */,
720+
CEC7DE2E2DE348A1888A445C /* libRNSyanImagePicker.a */,
704721
);
705722
name = "Recovered References";
706723
sourceTree = "<group>";
@@ -721,6 +738,14 @@
721738
name = Products;
722739
sourceTree = "<group>";
723740
};
741+
C1595C57208147BC000EE772 /* Products */ = {
742+
isa = PBXGroup;
743+
children = (
744+
C1595C5B208147BC000EE772 /* libRNSyanImagePicker.a */,
745+
);
746+
name = Products;
747+
sourceTree = "<group>";
748+
};
724749
C184F23420600B5C002C3ED1 /* Products */ = {
725750
isa = PBXGroup;
726751
children = (
@@ -860,6 +885,10 @@
860885
ProductGroup = C107CD8720623DDC0092BDCC /* Products */;
861886
ProjectRef = 63077EF25FC041DDBC7431C2 /* RNBlur.xcodeproj */;
862887
},
888+
{
889+
ProductGroup = C1595C57208147BC000EE772 /* Products */;
890+
ProjectRef = 3ADA8582D9E94266A97F59B7 /* RNSyanImagePicker.xcodeproj */;
891+
},
863892
{
864893
ProductGroup = C118B48420470A970053A82E /* Products */;
865894
ProjectRef = E5230FD93DD8412D9A082D14 /* RNVectorIcons.xcodeproj */;
@@ -1179,6 +1208,13 @@
11791208
remoteRef = C153C8C8208085FD00AE197D /* PBXContainerItemProxy */;
11801209
sourceTree = BUILT_PRODUCTS_DIR;
11811210
};
1211+
C1595C5B208147BC000EE772 /* libRNSyanImagePicker.a */ = {
1212+
isa = PBXReferenceProxy;
1213+
fileType = archive.ar;
1214+
path = libRNSyanImagePicker.a;
1215+
remoteRef = C1595C5A208147BC000EE772 /* PBXContainerItemProxy */;
1216+
sourceTree = BUILT_PRODUCTS_DIR;
1217+
};
11821218
C184F23920600B5D002C3ED1 /* libCodePush.a */ = {
11831219
isa = PBXReferenceProxy;
11841220
fileType = archive.ar;
@@ -1207,6 +1243,7 @@
12071243
isa = PBXResourcesBuildPhase;
12081244
buildActionMask = 2147483647;
12091245
files = (
1246+
C1595C5D20814891000EE772 /* TZImagePickerController.bundle in Resources */,
12101247
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
12111248
FD30C84063F94E01930DABE1 /* EvilIcons.ttf in Resources */,
12121249
AD07EF16116A42AD832C991F /* Feather.ttf in Resources */,
@@ -1272,6 +1309,7 @@
12721309
isa = PBXVariantGroup;
12731310
children = (
12741311
13B07FB21A68108700A75B9A /* Base */,
1312+
C1595C5E20814AB7000EE772 /* zh-Hans */,
12751313
);
12761314
name = LaunchScreen.xib;
12771315
path = AwesomeProject;
@@ -1296,6 +1334,7 @@
12961334
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
12971335
"$(SRCROOT)/../node_modules/react-native-blur/ios",
12981336
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
1337+
"$(SRCROOT)/../node_modules/react-native-syan-image-picker/ios/**",
12991338
);
13001339
INFOPLIST_FILE = AwesomeProjectTests/Info.plist;
13011340
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@@ -1307,6 +1346,7 @@
13071346
"\"$(SRCROOT)/$(TARGET_NAME)\"",
13081347
"\"$(SRCROOT)/$(TARGET_NAME)\"",
13091348
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1349+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
13101350
);
13111351
OTHER_LDFLAGS = (
13121352
"-ObjC",
@@ -1330,6 +1370,7 @@
13301370
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
13311371
"$(SRCROOT)/../node_modules/react-native-blur/ios",
13321372
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
1373+
"$(SRCROOT)/../node_modules/react-native-syan-image-picker/ios/**",
13331374
);
13341375
INFOPLIST_FILE = AwesomeProjectTests/Info.plist;
13351376
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@@ -1341,6 +1382,7 @@
13411382
"\"$(SRCROOT)/$(TARGET_NAME)\"",
13421383
"\"$(SRCROOT)/$(TARGET_NAME)\"",
13431384
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1385+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
13441386
);
13451387
OTHER_LDFLAGS = (
13461388
"-ObjC",
@@ -1366,6 +1408,7 @@
13661408
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
13671409
"$(SRCROOT)/../node_modules/react-native-blur/ios",
13681410
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
1411+
"$(SRCROOT)/../node_modules/react-native-syan-image-picker/ios/**",
13691412
);
13701413
INFOPLIST_FILE = AwesomeProject/Info.plist;
13711414
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -1394,6 +1437,7 @@
13941437
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
13951438
"$(SRCROOT)/../node_modules/react-native-blur/ios",
13961439
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
1440+
"$(SRCROOT)/../node_modules/react-native-syan-image-picker/ios/**",
13971441
);
13981442
INFOPLIST_FILE = AwesomeProject/Info.plist;
13991443
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -1412,6 +1456,7 @@
14121456
isa = XCBuildConfiguration;
14131457
buildSettings = {
14141458
ALWAYS_SEARCH_USER_PATHS = NO;
1459+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
14151460
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
14161461
CLANG_CXX_LIBRARY = "libc++";
14171462
CLANG_ENABLE_MODULES = YES;
@@ -1454,6 +1499,7 @@
14541499
isa = XCBuildConfiguration;
14551500
buildSettings = {
14561501
ALWAYS_SEARCH_USER_PATHS = NO;
1502+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
14571503
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
14581504
CLANG_CXX_LIBRARY = "libc++";
14591505
CLANG_ENABLE_MODULES = YES;
@@ -1490,6 +1536,7 @@
14901536
isa = XCBuildConfiguration;
14911537
buildSettings = {
14921538
ALWAYS_SEARCH_USER_PATHS = NO;
1539+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
14931540
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
14941541
CLANG_CXX_LIBRARY = "libc++";
14951542
CLANG_ENABLE_MODULES = YES;
@@ -1536,6 +1583,7 @@
15361583
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
15371584
"$(SRCROOT)/../node_modules/react-native-blur/ios",
15381585
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
1586+
"$(SRCROOT)/../node_modules/react-native-syan-image-picker/ios/**",
15391587
);
15401588
INFOPLIST_FILE = AwesomeProject/Info.plist;
15411589
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -1563,6 +1611,7 @@
15631611
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
15641612
"$(SRCROOT)/../node_modules/react-native-blur/ios",
15651613
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
1614+
"$(SRCROOT)/../node_modules/react-native-syan-image-picker/ios/**",
15661615
);
15671616
INFOPLIST_FILE = AwesomeProjectTests/Info.plist;
15681617
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@@ -1574,6 +1623,7 @@
15741623
"\"$(SRCROOT)/$(TARGET_NAME)\"",
15751624
"\"$(SRCROOT)/$(TARGET_NAME)\"",
15761625
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1626+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
15771627
);
15781628
OTHER_LDFLAGS = (
15791629
"-ObjC",

ios/AwesomeProject.xcodeproj/xcshareddata/xcschemes/AwesomeProject.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
</AdditionalOptions>
8181
</TestAction>
8282
<LaunchAction
83-
buildConfiguration = "Release"
83+
buildConfiguration = "Debug"
8484
selectedDebuggerIdentifier = ""
8585
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
8686
launchStyle = "0"

ios/AwesomeProject/Info.plist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
</dict>
4242
</dict>
4343
</dict>
44+
<key>NSCameraUsageDescription</key>
45+
<string>是否允许此App使用你的相机进行拍照?</string>
46+
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
47+
<string>我们需要通过您的地理位置信息获取您周边的相关数据</string>
4448
<key>NSLocationWhenInUseUsageDescription</key>
4549
<string></string>
50+
<key>NSPhotoLibraryAddUsageDescription</key>
51+
<string>请允许访问相册以选取照片</string>
52+
<key>NSPhotoLibraryUsageDescription</key>
53+
<string>请允许访问相册以选取照片</string>
4654
<key>UIAppFonts</key>
4755
<array>
4856
<string>Entypo.ttf</string>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"react-native-popup-dialog": "^0.11.46",
1919
"react-native-snap-carousel": "^3.7.0",
2020
"react-native-splash-screen": "^3.0.6",
21+
"react-native-syan-image-picker": "^0.1.6",
2122
"react-native-vector-icons": "^4.6.0",
2223
"react-navigation": "^1.5.11",
2324
"react-navigation-redux-helpers": "^1.0.5",

src/navigators/AppWithNavigation.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,54 @@ import ImmutableList from "../page/Immutable/List";
1212
import Carousel from '../page/home/containers/Carousel'
1313
import OpenWebView from "../components/WebView";
1414
import ECMAScript2016 from '../page/ECMAScript2016';
15+
// main
16+
import MainScreen from "../page/main";
17+
18+
const TabOptions = (title, navigation) => {
19+
const { state, goBack } = navigation;
20+
const tabBarLabel = title;
21+
// const tabBarIcon = (({ focused }) => (
22+
// focused
23+
// ? <Image source={iconName} resizeMode={'stretch'} style={{ width: WH, height: WH, tintColor: UTIL.THEMEBG }} />
24+
// : <Image source={iconName} resizeMode={'stretch'} style={{ width: WH, height: WH, tintColor: '#B6B9C3' }} />
25+
// ));
26+
27+
return { tabBarLabel, /*tabBarIcon*/ };
28+
};
29+
30+
export const NavigationBar = TabNavigator({
31+
HomeController: { screen: MainScreen, navigationOptions: ({ navigation }) => TabOptions('微门户', navigation) },
32+
},{
33+
tabBarComponent: TabBarBottom,
34+
tabBarPosition: 'bottom',
35+
swipeEnabled: false,
36+
animationEnabled: false,
37+
lazy: true,
38+
backBehavior: 'none',
39+
tabBarOptions: {
40+
activeTintColor: 'red',
41+
inactiveTintColor: '#B6B9C3',
42+
indicatorStyle: { height: 0 },
43+
showIcon: true,
44+
showLabel: true,
45+
upperCaseLabel: false,
46+
scrollEnabled: false,
47+
labelStyle: {
48+
margin: 0,
49+
fontSize: 11,
50+
},
51+
iconStyle: {
52+
margin: 0,
53+
padding: 0
54+
},
55+
style: {
56+
backgroundColor: '#fff',
57+
borderWidth:0,
58+
borderTopWidth:0,
59+
borderTopColor:'#eee',
60+
},
61+
}
62+
});
1563

1664
const MainStack = StackNavigator(
1765
{
@@ -21,6 +69,9 @@ const MainStack = StackNavigator(
2169
HomeScreen: {
2270
screen: HomeScreen,
2371
},
72+
NavigationBar: {
73+
screen: NavigationBar,
74+
},
2475
TodoScreen: {
2576
screen: TodoListScreen,
2677
},

0 commit comments

Comments
 (0)