Skip to content

Commit 1516a38

Browse files
author
sherry
committed
update ios theme
1 parent a069068 commit 1516a38

File tree

4 files changed

+41
-13
lines changed

4 files changed

+41
-13
lines changed

example/App.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import {StyleSheet, Text, View, TouchableHighlight} from 'react-native';
2+
import {StyleSheet, Text, View, TouchableHighlight, Platform} from 'react-native';
33
import JVerification from 'jverification-react-native';
44

55

@@ -156,6 +156,22 @@ const codeConfig = {
156156
signID : "1", //在此替换你的signID
157157
templateID : "1" //在此替换你的templateID
158158
};
159+
//安卓授权页弹窗模式
160+
const androidDialogConfig = {
161+
privacyDialogTheme: [300, 700, 0, 0, false], //授权页弹窗模式
162+
}
163+
//ios授权页弹窗模式
164+
const iosDialogConfig = {
165+
showWindow:true, // 是否弹窗,默认no
166+
windowBackgroundImage:"static/bg.jpeg", // 弹框内部背景图片
167+
windowBackgroundAlpha: 0.3, //弹窗外侧 透明度 0~1.0
168+
windowCornerRadius:10, //弹窗圆角数值
169+
windowConstraints:[0,0,300,300], //弹窗布局对象
170+
windowHorizontalConstraints:[],//弹窗横屏布局,横屏下优先级高于windowConstraints
171+
windowCloseBtnImgs:["static/windowClose","static/windowClose"],//弹窗close按钮图片 @[普通状态图片,高亮状态图片]
172+
windowCloseBtnConstraints:[-135,-135,20,20],//弹窗close按钮布局,
173+
windowCloseBtnHorizontalConstraints:[], //弹窗close按钮 横屏布局,横屏下优先级高于windowCloseBtnConstraints
174+
}
159175

160176
export default class App extends React.Component {
161177

@@ -201,6 +217,18 @@ export default class App extends React.Component {
201217
<Button title='addLoginCustomConfig'
202218
onPress={() => JVerification.addLoginCustomConfig(customConfigParams, customViewParams)}/>
203219

220+
<Button title='自定义弹窗授权页'
221+
onPress={() => {
222+
if(Platform.OS == 'android'){
223+
const params = Object.assign({},androidDialogConfig,customConfigParams);
224+
JVerification.addLoginCustomConfig((params, customViewParams))
225+
} else {
226+
const params = Object.assign({},iosDialogConfig,customConfigParams);
227+
JVerification.addLoginCustomConfig((params, customViewParams))
228+
console.log(params,'params>>>>')
229+
}
230+
}}/>
231+
204232
<Button title='login'
205233
onPress={() => JVerification.login(true)}/>
206234

example/ios/example.xcodeproj/project.pbxproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1313
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1414
5C103CA923605A2F000AD3DA /* JVerificationResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 5C103CA823605A2E000AD3DA /* JVerificationResource.bundle */; };
15-
AF5EA86263C1D75E590F4EE1 /* libPods-example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 068ADD851EF9FD0A5CEF6F24 /* libPods-example.a */; };
15+
FB6BE5C47FD70E3DB4520727 /* libPods-example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A62CAF3401E30D0C6DB484E /* libPods-example.a */; };
1616
/* End PBXBuildFile section */
1717

1818
/* Begin PBXContainerItemProxy section */
@@ -36,19 +36,19 @@
3636
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
3737
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3838
00E356F21AD99517003FC87E /* exampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = exampleTests.m; sourceTree = "<group>"; };
39-
068ADD851EF9FD0A5CEF6F24 /* libPods-example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
39+
0A62CAF3401E30D0C6DB484E /* libPods-example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4040
13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
4141
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = "<group>"; };
4242
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = "<group>"; };
4343
13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
4444
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = "<group>"; };
4545
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = "<group>"; };
4646
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = "<group>"; };
47-
258DE48474A326A2A3CC0F97 /* Pods-example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.release.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.release.xcconfig"; sourceTree = "<group>"; };
4847
5C103CA823605A2E000AD3DA /* JVerificationResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = JVerificationResource.bundle; sourceTree = "<group>"; };
4948
5CE4DCC423740560004FE764 /* RCTJCoreModule.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTJCoreModule.xcodeproj; path = "../node_modules/jcore-react-native/ios/RCTJCoreModule.xcodeproj"; sourceTree = "<group>"; };
5049
5CE4DCCA2374057B004FE764 /* RCTJVerificationModule.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTJVerificationModule.xcodeproj; path = "../node_modules/jverification-react-native/ios/RCTJVerificationModule.xcodeproj"; sourceTree = "<group>"; };
51-
71D1EDEF75FE7F014835B87D /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = "<group>"; };
50+
9768BC5F4417E8D4C62F2B69 /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = "<group>"; };
51+
D06E437F0E4459D5EA9B3F10 /* Pods-example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.release.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.release.xcconfig"; sourceTree = "<group>"; };
5252
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
5353
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
5454
/* End PBXFileReference section */
@@ -58,7 +58,7 @@
5858
isa = PBXFrameworksBuildPhase;
5959
buildActionMask = 2147483647;
6060
files = (
61-
AF5EA86263C1D75E590F4EE1 /* libPods-example.a in Frameworks */,
61+
FB6BE5C47FD70E3DB4520727 /* libPods-example.a in Frameworks */,
6262
);
6363
runOnlyForDeploymentPostprocessing = 0;
6464
};
@@ -102,16 +102,16 @@
102102
children = (
103103
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
104104
ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
105-
068ADD851EF9FD0A5CEF6F24 /* libPods-example.a */,
105+
0A62CAF3401E30D0C6DB484E /* libPods-example.a */,
106106
);
107107
name = Frameworks;
108108
sourceTree = "<group>";
109109
};
110110
55DEA14607BD4FAA459AFEAB /* Pods */ = {
111111
isa = PBXGroup;
112112
children = (
113-
71D1EDEF75FE7F014835B87D /* Pods-example.debug.xcconfig */,
114-
258DE48474A326A2A3CC0F97 /* Pods-example.release.xcconfig */,
113+
9768BC5F4417E8D4C62F2B69 /* Pods-example.debug.xcconfig */,
114+
D06E437F0E4459D5EA9B3F10 /* Pods-example.release.xcconfig */,
115115
);
116116
path = Pods;
117117
sourceTree = "<group>";
@@ -171,7 +171,7 @@
171171
isa = PBXNativeTarget;
172172
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */;
173173
buildPhases = (
174-
4BFB507A75D93C8DA85F7202 /* [CP] Check Pods Manifest.lock */,
174+
1F2D21C528F571518C8906CD /* [CP] Check Pods Manifest.lock */,
175175
FD10A7F022414F080027D42C /* Start Packager */,
176176
13B07F871A680F5B00A75B9A /* Sources */,
177177
13B07F8C1A680F5B00A75B9A /* Frameworks */,
@@ -276,7 +276,7 @@
276276
shellPath = /bin/sh;
277277
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
278278
};
279-
4BFB507A75D93C8DA85F7202 /* [CP] Check Pods Manifest.lock */ = {
279+
1F2D21C528F571518C8906CD /* [CP] Check Pods Manifest.lock */ = {
280280
isa = PBXShellScriptBuildPhase;
281281
buildActionMask = 2147483647;
282282
files = (
@@ -346,7 +346,7 @@
346346
/* Begin XCBuildConfiguration section */
347347
13B07F941A680F5B00A75B9A /* Debug */ = {
348348
isa = XCBuildConfiguration;
349-
baseConfigurationReference = 71D1EDEF75FE7F014835B87D /* Pods-example.debug.xcconfig */;
349+
baseConfigurationReference = 9768BC5F4417E8D4C62F2B69 /* Pods-example.debug.xcconfig */;
350350
buildSettings = {
351351
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
352352
CODE_SIGN_IDENTITY = "iPhone Developer: 翰林 刘 (LVKR5M7XFD)";
@@ -370,7 +370,7 @@
370370
};
371371
13B07F951A680F5B00A75B9A /* Release */ = {
372372
isa = XCBuildConfiguration;
373-
baseConfigurationReference = 258DE48474A326A2A3CC0F97 /* Pods-example.release.xcconfig */;
373+
baseConfigurationReference = D06E437F0E4459D5EA9B3F10 /* Pods-example.release.xcconfig */;
374374
buildSettings = {
375375
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
376376
CODE_SIGN_IDENTITY = "iPhone Developer: 翰林 刘 (LVKR5M7XFD)";

example/static/bg.jpeg

34.5 KB
Loading

example/static/windowClose.png

714 Bytes
Loading

0 commit comments

Comments
 (0)