diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json index f004bc5..f6ea9da 100644 --- a/.dart_tool/package_config.json +++ b/.dart_tool/package_config.json @@ -367,6 +367,12 @@ "packageUri": "lib/", "languageVersion": "2.4" }, + { + "name": "photo_view", + "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/photo_view-0.10.2", + "packageUri": "lib/", + "languageVersion": "2.6" + }, { "name": "platform", "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.1", @@ -638,7 +644,7 @@ "languageVersion": "2.8" } ], - "generated": "2020-11-11T02:35:44.319396Z", + "generated": "2020-11-14T05:34:27.631373Z", "generator": "pub", "generatorVersion": "2.8.2" } diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index ae111d6..2f807cd 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -14,6 +14,7 @@ 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + 9F04BF68255F882600C4594E /* JDSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9F04BF67255F882600C4594E /* JDSDK.bundle */; }; 9FFCE301251ADE0600F4F353 /* yw_1222_baichuan.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 9FFCE2F7251ADE0600F4F353 /* yw_1222_baichuan.jpg */; }; 9FFCE303251ADE0600F4F353 /* 1.png in Resources */ = {isa = PBXBuildFile; fileRef = 9FFCE2FB251ADE0600F4F353 /* 1.png */; }; 9FFCE304251ADE0600F4F353 /* 2.png in Resources */ = {isa = PBXBuildFile; fileRef = 9FFCE2FC251ADE0600F4F353 /* 2.png */; }; @@ -51,6 +52,7 @@ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9F04BF67255F882600C4594E /* JDSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = JDSDK.bundle; sourceTree = ""; }; 9F2FEDAD2520C194002374CF /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 9FFCE2F7251ADE0600F4F353 /* yw_1222_baichuan.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = yw_1222_baichuan.jpg; sourceTree = ""; }; 9FFCE2FB251ADE0600F4F353 /* 1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1.png; sourceTree = ""; }; @@ -159,6 +161,7 @@ 9FFCE2F5251ADE0600F4F353 /* config */ = { isa = PBXGroup; children = ( + 9F04BF67255F882600C4594E /* JDSDK.bundle */, 9FFCE2F7251ADE0600F4F353 /* yw_1222_baichuan.jpg */, ); path = config; @@ -258,6 +261,7 @@ 9FFCE305251ADE0600F4F353 /* 3.png in Resources */, 9FFCE307251ADE0600F4F353 /* 智莺生活.xcassets in Resources */, 9FFCE304251ADE0600F4F353 /* 2.png in Resources */, + 9F04BF68255F882600C4594E /* JDSDK.bundle in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index 5755355..ae26fa4 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -95,7 +95,7 @@ JD CFBundleURLSchemes - sdkback + sdkbackf17dcdf22df3bd440fac4c3cbcc76bff @@ -167,6 +167,8 @@ alitrip fleamarket youku + suning + kaola LSRequiresIPhoneOS diff --git a/example/ios/Runner/项目资源/智莺生活/config/JDSDK.bundle/safe.jpg b/example/ios/Runner/项目资源/智莺生活/config/JDSDK.bundle/safe.jpg new file mode 100755 index 0000000..34a5501 --- /dev/null +++ b/example/ios/Runner/项目资源/智莺生活/config/JDSDK.bundle/safe.jpg @@ -0,0 +1 @@ +YVj \ No newline at end of file diff --git a/example/lib/main.dart b/example/lib/main.dart index eee27ff..86b8439 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,15 +1,17 @@ +import 'dart:io'; + import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_alibc/flutter_alibc.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:jdsdk/jdsdk.dart'; import 'package:provider/provider.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:zhiying_base_widget/pages/home_page/home_page.dart'; import 'package:zhiying_base_widget/pages/launch_page/launch_page.dart'; import 'package:zhiying_base_widget/register.dart'; -import 'package:zhiying_comm/zhiying_comm.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:zhiying_comm/util/update/app_update_util.dart'; -import 'package:jdsdk/jdsdk.dart'; +import 'package:zhiying_comm/zhiying_comm.dart'; import 'util/localizations_delegate.dart'; @@ -32,7 +34,8 @@ class _MyAppState extends State { return Center( child: Text( "走神了~\n${error.exceptionAsString()}", - style: Theme.of(context).textTheme.title.copyWith(color: Colors.redAccent), + style: + Theme.of(context).textTheme.title.copyWith(color: Colors.redAccent), ), ); } @@ -47,7 +50,16 @@ class _MyAppState extends State { print("白川" + '${result.errorCode} ${result.errorMessage}'); }); print('初始化京东~'); - Jdsdk.init(appKey: 'c0abbe1f201464ee139d613591a1be02', appSecret: 'a0eeac7105bf4c7cb573972aa03ed95c'); + if (Platform.isIOS) { + Jdsdk.init( + appKey: 'f17dcdf22df3bd440fac4c3cbcc76bff', + appSecret: 'a60bea3315794ae9bb9b7ea749be8506'); + } else if (Platform.isAndroid) { + Jdsdk.init( + appKey: 'c0abbe1f201464ee139d613591a1be02', + appSecret: 'a0eeac7105bf4c7cb573972aa03ed95c'); + } + // app更新插件 AppUpdateUtil.initXUpdate(); } @@ -72,14 +84,16 @@ class _MyAppState extends State { const Locale('en'), const Locale('zh'), ], - localeResolutionCallback: (Locale locale, Iterable supportedLocales) { + localeResolutionCallback: + (Locale locale, Iterable supportedLocales) { print("change language ${locale.toString()}"); return locale; }, home: GestureDetector( onTap: () { FocusScopeNode currentFocus = FocusScope.of(context); - if (!currentFocus.hasPrimaryFocus && currentFocus.focusedChild != null) { + if (!currentFocus.hasPrimaryFocus && + currentFocus.focusedChild != null) { FocusManager.instance.primaryFocus.unfocus(); } },