From 7ebc20bc97b2aba101905e9e16c84c5aad873985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=93=88=E5=93=88=E5=93=88?= Date: Thu, 19 Aug 2021 01:17:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Runner.xcodeproj/project.pbxproj | 12 ++++++------ ios/Runner/AppDelegate.mm | 29 +++++++++++++++++++--------- lib/order/order_history_page.dart | 6 +++--- lib/retrofit/retrofit_api.dart | 8 ++++---- pubspec.lock | 8 ++++---- 5 files changed, 37 insertions(+), 26 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 6db6cb88..31d7417a 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -874,7 +874,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 34; + CURRENT_PROJECT_VERSION = 35; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -924,7 +924,7 @@ "$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/Runner/baidu", ); - MARKETING_VERSION = 1.0.34; + MARKETING_VERSION = 1.0.35; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", @@ -1110,7 +1110,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 34; + CURRENT_PROJECT_VERSION = 35; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -1160,7 +1160,7 @@ "$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/Runner/baidu", ); - MARKETING_VERSION = 1.0.34; + MARKETING_VERSION = 1.0.35; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(inherited)", @@ -1239,7 +1239,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 34; + CURRENT_PROJECT_VERSION = 35; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -1289,7 +1289,7 @@ "$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/Runner/baidu", ); - MARKETING_VERSION = 1.0.34; + MARKETING_VERSION = 1.0.35; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", diff --git a/ios/Runner/AppDelegate.mm b/ios/Runner/AppDelegate.mm index a8430e65..7bab5906 100644 --- a/ios/Runner/AppDelegate.mm +++ b/ios/Runner/AppDelegate.mm @@ -85,7 +85,7 @@ } result(@""); } - if (condition[method isEqual:@"toAppStore"]) { + if ([method isEqual:@"toAppStore"]) { NSString *appURL = @"https://itunes.apple.com/cn/app/1575124838?action=write-review"; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:appURL]]; result(@""); @@ -97,22 +97,33 @@ } - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray> * _Nullable))restorationHandler { - NSLog(@"%@", userActivity.webpageURL); - NSLog(@"%@", [userActivity.webpageURL.query componentsSeparatedByString:@"="][0]); - NSLog(@"%@", [userActivity.webpageURL.query componentsSeparatedByString:@"="][1]); - __block NSString *custom = [userActivity.webpageURL.query componentsSeparatedByString:@"="][1]; + NSLog(@"userActivity%@", userActivity.webpageURL); + + NSArray *params = [userActivity.webpageURL.query componentsSeparatedByString:@"&"]; + + __block NSString *customParam = @""; + + for (NSString *string in params) { + NSLog(@"userActivity%@", string); + NSArray *array =[string componentsSeparatedByString:@"="]; + if ([array[0] isEqual:@"id"]) { + customParam = [NSString stringWithFormat:@"{\"typed\":1,\"info\":\"%@\"}", array[1]]; + } + } + + NSLog(@"userActivity%@", customParam); FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController; FlutterMethodChannel* bridgeAppChannel = [FlutterMethodChannel methodChannelWithName:@"bridge" binaryMessenger:(NSObject *)controller]; [bridgeAppChannel setMethodCallHandler:^(FlutterMethodCall * _Nonnull call, FlutterResult _Nonnull result) { NSString * method = call.method; if ([method isEqual:@"action"]) { - if (custom != NULL) { - result(custom); - custom = @""; + if (customParam != NULL) { + result(customParam); + customParam = @""; } result(@""); } - if (condition[method isEqual:@"toAppStore"]) { + if ([method isEqual:@"toAppStore"]) { NSString *appURL = @"https://itunes.apple.com/cn/app/1575124838?action=write-review"; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:appURL]]; result(@""); diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index 0ca1c903..9a30b44d 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -473,9 +473,9 @@ class _OrderHistoryList extends State children: [ MImage( e.skuImg, - width: 75, - height: 75, - fit: BoxFit.contain, + width: 75.w, + height: 75.w, + fit: BoxFit.cover, errorSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png", ), diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 0e1c9dd3..27956173 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -14,11 +14,11 @@ import 'package:shared_preferences/shared_preferences.dart'; part 'retrofit_api.g.dart'; -// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -const base_url = "http://192.168.10.236:8766/app/"; -const baseUrl = "http://192.168.10.236:8766/app/"; +// const base_url = "http://192.168.10.236:8766/app/"; +// const baseUrl = "http://192.168.10.236:8766/app/"; /// 本地 diff --git a/pubspec.lock b/pubspec.lock index b0b745bb..b7f09328 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.6.1" + version: "2.5.0" barcode: dependency: transitive description: @@ -900,7 +900,7 @@ packages: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.0" + version: "0.2.19" timing: dependency: transitive description: @@ -1063,7 +1063,7 @@ packages: name: win32 url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.5" + version: "2.0.5" xdg_directories: dependency: transitive description: @@ -1086,5 +1086,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.13.0 <3.0.0" + dart: ">=2.12.0 <3.0.0" flutter: ">=2.0.0"