Skip to content

Commit 4bb439c

Browse files
committed
demo代码优化
1 parent 5eb117b commit 4bb439c

File tree

6 files changed

+106
-66
lines changed

6 files changed

+106
-66
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# NOTE: This podspec is NOT to be published. It is only used as a local source!
3+
#
4+
5+
Pod::Spec.new do |s|
6+
s.name = 'Flutter'
7+
s.version = '1.0.0'
8+
s.summary = 'High-performance, high-fidelity mobile apps.'
9+
s.description = <<-DESC
10+
Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS.
11+
DESC
12+
s.homepage = 'https://flutter.io'
13+
s.license = { :type => 'MIT' }
14+
s.author = { 'Flutter Dev Team' => '[email protected]' }
15+
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
16+
s.ios.deployment_target = '8.0'
17+
s.vendored_frameworks = 'Flutter.framework'
18+
end
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/sh
22
# This is a generated file; do not edit or check into version control.
3-
export "FLUTTER_ROOT=/Applications/flutter"
4-
export "FLUTTER_APPLICATION_PATH=/Users/raoxudong/JPush/jpush-github/jverify-flutter-plugin/example"
5-
export "FLUTTER_TARGET=lib/main.dart"
3+
export "FLUTTER_ROOT=/Users/allan/Documents/flutter"
4+
export "FLUTTER_APPLICATION_PATH=/Users/allan/Documents/GitHub/jverify-flutter-plugin/example"
5+
export "FLUTTER_TARGET=/Users/allan/Documents/GitHub/jverify-flutter-plugin/example/lib/main.dart"
66
export "FLUTTER_BUILD_DIR=build"
77
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
8-
export "FLUTTER_FRAMEWORK_DIR=/Applications/flutter/bin/cache/artifacts/engine/ios"
8+
export "FLUTTER_FRAMEWORK_DIR=/Users/allan/Documents/flutter/bin/cache/artifacts/engine/ios"
99
export "FLUTTER_BUILD_NAME=1.0.0"
1010
export "FLUTTER_BUILD_NUMBER=1"
11+
export "TRACK_WIDGET_CREATION=true"

example/ios/Podfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
PODS:
22
- Flutter (1.0.0)
33
- JCore (2.1.8)
4-
- JVerification (2.5.3):
5-
- JCore (< 3.0.0, >= 1.2.6)
4+
- JVerification (2.6.0):
5+
- JCore (< 3.0.0, >= 2.1.6)
66
- jverify (0.0.1):
77
- Flutter
8-
- JCore
9-
- JVerification
8+
- JCore (~> 2.1.6)
9+
- JVerification (~> 2.6.0)
1010

1111
DEPENDENCIES:
1212
- Flutter (from `.symlinks/flutter/ios`)
@@ -26,9 +26,9 @@ EXTERNAL SOURCES:
2626
SPEC CHECKSUMS:
2727
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
2828
JCore: a7f1dead960d77a97717c73ea8b0aa5b33706491
29-
JVerification: 0d0b4474a250f19ef2bc45da7bd0d0e151350012
30-
jverify: 39f3e355cdb0d7c03fd2f8497ea11b273339547f
29+
JVerification: c2b96de0379b9e6f9ec2f91f2ba5fc9499ddc203
30+
jverify: b7e7417c622468c2fcf7483c3a2bb82f1ef5a9b2
3131

3232
PODFILE CHECKSUM: aff02bfeed411c636180d6812254b2daeea14d09
3333

34-
COCOAPODS: 1.8.4
34+
COCOAPODS: 1.9.1

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
97C146EC1CF9000F007C117D /* Resources */,
179179
9705A1C41CF9048500538489 /* Embed Frameworks */,
180180
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
181-
000280B1279B4171F5DDD7DA /* [CP] Embed Pods Frameworks */,
181+
D166C758B9692330C07C5D0D /* [CP] Embed Pods Frameworks */,
182182
);
183183
buildRules = (
184184
);
@@ -240,24 +240,6 @@
240240
/* End PBXResourcesBuildPhase section */
241241

242242
/* Begin PBXShellScriptBuildPhase section */
243-
000280B1279B4171F5DDD7DA /* [CP] Embed Pods Frameworks */ = {
244-
isa = PBXShellScriptBuildPhase;
245-
buildActionMask = 2147483647;
246-
files = (
247-
);
248-
inputPaths = (
249-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
250-
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
251-
);
252-
name = "[CP] Embed Pods Frameworks";
253-
outputPaths = (
254-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
255-
);
256-
runOnlyForDeploymentPostprocessing = 0;
257-
shellPath = /bin/sh;
258-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
259-
showEnvVarsInLog = 0;
260-
};
261243
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
262244
isa = PBXShellScriptBuildPhase;
263245
buildActionMask = 2147483647;
@@ -308,6 +290,24 @@
308290
shellPath = /bin/sh;
309291
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
310292
};
293+
D166C758B9692330C07C5D0D /* [CP] Embed Pods Frameworks */ = {
294+
isa = PBXShellScriptBuildPhase;
295+
buildActionMask = 2147483647;
296+
files = (
297+
);
298+
inputPaths = (
299+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
300+
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
301+
);
302+
name = "[CP] Embed Pods Frameworks";
303+
outputPaths = (
304+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
305+
);
306+
runOnlyForDeploymentPostprocessing = 0;
307+
shellPath = /bin/sh;
308+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
309+
showEnvVarsInLog = 0;
310+
};
311311
/* End PBXShellScriptBuildPhase section */
312312

313313
/* Begin PBXSourcesBuildPhase section */
@@ -412,7 +412,7 @@
412412
"$(PROJECT_DIR)/Flutter",
413413
"$(PROJECT_DIR)/Runner",
414414
);
415-
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.xxx;
415+
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.verification;
416416
PRODUCT_NAME = "$(TARGET_NAME)";
417417
PROVISIONING_PROFILE_SPECIFIER = JVerificationDemo_dev;
418418
VERSIONING_SYSTEM = "apple-generic";
@@ -543,7 +543,7 @@
543543
"$(PROJECT_DIR)/Flutter",
544544
"$(PROJECT_DIR)/Runner",
545545
);
546-
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.xxx;
546+
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.verification;
547547
PRODUCT_NAME = "$(TARGET_NAME)";
548548
PROVISIONING_PROFILE_SPECIFIER = JVerificationDemo_dev;
549549
VERSIONING_SYSTEM = "apple-generic";
@@ -571,7 +571,7 @@
571571
"$(PROJECT_DIR)/Flutter",
572572
"$(PROJECT_DIR)/Runner",
573573
);
574-
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.xxx;
574+
PRODUCT_BUNDLE_IDENTIFIER = com.jiguang.verification;
575575
PRODUCT_NAME = "$(TARGET_NAME)";
576576
PROVISIONING_PROFILE_SPECIFIER = JVerificationDemo_dev;
577577
VERSIONING_SYSTEM = "apple-generic";

example/lib/main.dart

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,19 @@ class _MyAppState extends State<MyApp> {
139139
width: double.infinity,
140140
),
141141
margin: EdgeInsets.fromLTRB(40, 5, 40, 5),
142-
)
142+
),
143+
new Container(
144+
child: SizedBox(
145+
child: new CustomButton(
146+
onPressed: () {
147+
getSMSCode();
148+
},
149+
title: "获取验证码",
150+
),
151+
width: double.infinity,
152+
),
153+
margin: EdgeInsets.fromLTRB(40, 5, 40, 5),
154+
),
143155
],
144156
mainAxisAlignment: MainAxisAlignment.start,
145157
),
@@ -207,6 +219,7 @@ class _MyAppState extends State<MyApp> {
207219
setState(() {
208220
_loading = true;
209221
});
222+
getSMSCode();
210223

211224
jverify.checkVerifyEnable().then((map) {
212225
bool result = map[f_result_key];
@@ -229,12 +242,17 @@ class _MyAppState extends State<MyApp> {
229242
});
230243
}
231244

245+
void getSMSCode(){
246+
jverify.getSMSCode(phoneNumber: "18565775329").then((map){
247+
print("预取号接口回调:${map.toString()}");
248+
});
249+
}
250+
232251
/// SDK 请求授权一键登录
233252
void loginAuth() {
234253
setState(() {
235254
_loading = true;
236255
});
237-
238256
jverify.checkVerifyEnable().then((map) {
239257
bool result = map[f_result_key];
240258
if (result) {
@@ -258,7 +276,7 @@ class _MyAppState extends State<MyApp> {
258276
uiConfig.navReturnImgPath = "return_bg";//图片必须存在
259277

260278
uiConfig.logoWidth = 100;
261-
uiConfig.logoHeight = 100;
279+
uiConfig.logoHeight = 80;
262280
//uiConfig.logoOffsetX = isiOS ? 0 : null;//(screenWidth/2 - uiConfig.logoWidth/2).toInt();
263281
uiConfig.logoOffsetY = 10;
264282
uiConfig.logoVerticalLayoutItem = JVIOSLayoutItem.ItemSuper;
@@ -277,6 +295,7 @@ class _MyAppState extends State<MyApp> {
277295
uiConfig.sloganVerticalLayoutItem = JVIOSLayoutItem.ItemNumber;
278296
uiConfig.sloganTextColor = Colors.black.value;
279297
uiConfig.sloganTextSize = 15;
298+
// uiConfig.slogan
280299
//uiConfig.sloganHidden = 0;
281300

282301
uiConfig.logBtnWidth = 220;
@@ -475,4 +494,6 @@ class CustomButton extends StatelessWidget {
475494
padding: EdgeInsets.fromLTRB(10, 5, 10, 5),
476495
);
477496
}
478-
}
497+
}
498+
499+

0 commit comments

Comments
 (0)