完善登录ticket请求&网络层header配置;增加flutter模块。

This commit is contained in:
zu
2021-09-08 20:28:37 +08:00
parent f5c178bdfd
commit 95f9d0067b
293 changed files with 48684 additions and 51 deletions

View File

@@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 51; objectVersion = 52;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
@@ -35,10 +35,50 @@
189DD76226E60DDC00AB55B1 /* Api+Login.m in Sources */ = {isa = PBXBuildFile; fileRef = 189DD76126E60DDC00AB55B1 /* Api+Login.m */; }; 189DD76226E60DDC00AB55B1 /* Api+Login.m in Sources */ = {isa = PBXBuildFile; fileRef = 189DD76126E60DDC00AB55B1 /* Api+Login.m */; };
18E7B1B226E8AF980064BC9B /* MainPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B1B126E8AF980064BC9B /* MainPresenter.m */; }; 18E7B1B226E8AF980064BC9B /* MainPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B1B126E8AF980064BC9B /* MainPresenter.m */; };
18E7B1B726E8B2D10064BC9B /* Api+Main.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B1B626E8B2D10064BC9B /* Api+Main.m */; }; 18E7B1B726E8B2D10064BC9B /* Api+Main.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B1B626E8B2D10064BC9B /* Api+Main.m */; };
18E7B22626E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B22326E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m */; };
18E7B25326E8D43D0064BC9B /* FlutterPluginRegistrant.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24A26E8D43C0064BC9B /* FlutterPluginRegistrant.xcframework */; };
18E7B25726E8D4430064BC9B /* App.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24B26E8D43C0064BC9B /* App.xcframework */; };
18E7B25826E8D4430064BC9B /* App.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24B26E8D43C0064BC9B /* App.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18E7B25926E8D4440064BC9B /* flutter_boost.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24D26E8D43C0064BC9B /* flutter_boost.xcframework */; };
18E7B25A26E8D4450064BC9B /* flutter_boost.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24D26E8D43C0064BC9B /* flutter_boost.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18E7B25B26E8D4460064BC9B /* Flutter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24C26E8D43C0064BC9B /* Flutter.xcframework */; };
18E7B25C26E8D4460064BC9B /* Flutter.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24C26E8D43C0064BC9B /* Flutter.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18E7B25D26E8D4490064BC9B /* fluttertoast.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24526E8D43C0064BC9B /* fluttertoast.xcframework */; };
18E7B25E26E8D4490064BC9B /* fluttertoast.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24526E8D43C0064BC9B /* fluttertoast.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18E7B25F26E8D44B0064BC9B /* FMDB.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24826E8D43C0064BC9B /* FMDB.xcframework */; };
18E7B26026E8D44B0064BC9B /* FMDB.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24826E8D43C0064BC9B /* FMDB.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18E7B26126E8D44D0064BC9B /* path_provider.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24926E8D43C0064BC9B /* path_provider.xcframework */; };
18E7B26226E8D44E0064BC9B /* path_provider.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24926E8D43C0064BC9B /* path_provider.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18E7B26326E8D4500064BC9B /* sqflite.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24626E8D43C0064BC9B /* sqflite.xcframework */; };
18E7B26426E8D4500064BC9B /* sqflite.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24626E8D43C0064BC9B /* sqflite.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18E7B26526E8D4510064BC9B /* Toast.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24726E8D43C0064BC9B /* Toast.xcframework */; };
18E7B26626E8D4510064BC9B /* Toast.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 18E7B24726E8D43C0064BC9B /* Toast.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18E7B26926E8D5D60064BC9B /* XCCurrentVCStackManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B26726E8D5D60064BC9B /* XCCurrentVCStackManager.m */; };
73FFADDC93E195344047A2EC /* Pods_xplan_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACF623970097D653132D69A /* Pods_xplan_ios.framework */; }; 73FFADDC93E195344047A2EC /* Pods_xplan_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACF623970097D653132D69A /* Pods_xplan_ios.framework */; };
9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0E1C5826E77022005D4442 /* BaseNavigationController.m */; }; 9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0E1C5826E77022005D4442 /* BaseNavigationController.m */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
18E7B21326E8CD220064BC9B /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
18E7B25E26E8D4490064BC9B /* fluttertoast.xcframework in Embed Frameworks */,
18E7B25C26E8D4460064BC9B /* Flutter.xcframework in Embed Frameworks */,
18E7B26026E8D44B0064BC9B /* FMDB.xcframework in Embed Frameworks */,
18E7B26626E8D4510064BC9B /* Toast.xcframework in Embed Frameworks */,
18E7B26426E8D4500064BC9B /* sqflite.xcframework in Embed Frameworks */,
18E7B26226E8D44E0064BC9B /* path_provider.xcframework in Embed Frameworks */,
18E7B25A26E8D4450064BC9B /* flutter_boost.xcframework in Embed Frameworks */,
18E7B25826E8D4430064BC9B /* App.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
187EEEDA26E89B32002833B2 /* BaseModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseModel.h; sourceTree = "<group>"; }; 187EEEDA26E89B32002833B2 /* BaseModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseModel.h; sourceTree = "<group>"; };
187EEEDB26E89B32002833B2 /* BaseModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseModel.m; sourceTree = "<group>"; }; 187EEEDB26E89B32002833B2 /* BaseModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseModel.m; sourceTree = "<group>"; };
@@ -98,6 +138,20 @@
18E7B1B126E8AF980064BC9B /* MainPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MainPresenter.m; sourceTree = "<group>"; }; 18E7B1B126E8AF980064BC9B /* MainPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MainPresenter.m; sourceTree = "<group>"; };
18E7B1B526E8B2D10064BC9B /* Api+Main.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+Main.h"; sourceTree = "<group>"; }; 18E7B1B526E8B2D10064BC9B /* Api+Main.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+Main.h"; sourceTree = "<group>"; };
18E7B1B626E8B2D10064BC9B /* Api+Main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+Main.m"; sourceTree = "<group>"; }; 18E7B1B626E8B2D10064BC9B /* Api+Main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+Main.m"; sourceTree = "<group>"; };
18E7B22326E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XplanFlutterBoostDelegate.m; sourceTree = "<group>"; };
18E7B22426E8CDCF0064BC9B /* XplanFlutterBoostDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XplanFlutterBoostDelegate.h; sourceTree = "<group>"; };
18E7B22826E8CE100064BC9B /* XCFlutterKeyConst.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCFlutterKeyConst.h; sourceTree = "<group>"; };
18E7B24526E8D43C0064BC9B /* fluttertoast.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = fluttertoast.xcframework; sourceTree = "<group>"; };
18E7B24626E8D43C0064BC9B /* sqflite.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = sqflite.xcframework; sourceTree = "<group>"; };
18E7B24726E8D43C0064BC9B /* Toast.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Toast.xcframework; sourceTree = "<group>"; };
18E7B24826E8D43C0064BC9B /* FMDB.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = FMDB.xcframework; sourceTree = "<group>"; };
18E7B24926E8D43C0064BC9B /* path_provider.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = path_provider.xcframework; sourceTree = "<group>"; };
18E7B24A26E8D43C0064BC9B /* FlutterPluginRegistrant.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = FlutterPluginRegistrant.xcframework; sourceTree = "<group>"; };
18E7B24B26E8D43C0064BC9B /* App.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = App.xcframework; sourceTree = "<group>"; };
18E7B24C26E8D43C0064BC9B /* Flutter.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Flutter.xcframework; sourceTree = "<group>"; };
18E7B24D26E8D43C0064BC9B /* flutter_boost.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = flutter_boost.xcframework; sourceTree = "<group>"; };
18E7B26726E8D5D60064BC9B /* XCCurrentVCStackManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCCurrentVCStackManager.m; sourceTree = "<group>"; };
18E7B26826E8D5D60064BC9B /* XCCurrentVCStackManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCCurrentVCStackManager.h; sourceTree = "<group>"; };
7DB00EC07F1D0ADFF900B38D /* Pods-xplan-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-xplan-ios.debug.xcconfig"; path = "Target Support Files/Pods-xplan-ios/Pods-xplan-ios.debug.xcconfig"; sourceTree = "<group>"; }; 7DB00EC07F1D0ADFF900B38D /* Pods-xplan-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-xplan-ios.debug.xcconfig"; path = "Target Support Files/Pods-xplan-ios/Pods-xplan-ios.debug.xcconfig"; sourceTree = "<group>"; };
9B0E1C5726E77022005D4442 /* BaseNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseNavigationController.h; sourceTree = "<group>"; }; 9B0E1C5726E77022005D4442 /* BaseNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseNavigationController.h; sourceTree = "<group>"; };
9B0E1C5826E77022005D4442 /* BaseNavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseNavigationController.m; sourceTree = "<group>"; }; 9B0E1C5826E77022005D4442 /* BaseNavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseNavigationController.m; sourceTree = "<group>"; };
@@ -110,7 +164,16 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
18E7B25B26E8D4460064BC9B /* Flutter.xcframework in Frameworks */,
73FFADDC93E195344047A2EC /* Pods_xplan_ios.framework in Frameworks */, 73FFADDC93E195344047A2EC /* Pods_xplan_ios.framework in Frameworks */,
18E7B25F26E8D44B0064BC9B /* FMDB.xcframework in Frameworks */,
18E7B26126E8D44D0064BC9B /* path_provider.xcframework in Frameworks */,
18E7B26326E8D4500064BC9B /* sqflite.xcframework in Frameworks */,
18E7B26526E8D4510064BC9B /* Toast.xcframework in Frameworks */,
18E7B25D26E8D4490064BC9B /* fluttertoast.xcframework in Frameworks */,
18E7B25926E8D4440064BC9B /* flutter_boost.xcframework in Frameworks */,
18E7B25726E8D4430064BC9B /* App.xcframework in Frameworks */,
18E7B25326E8D43D0064BC9B /* FlutterPluginRegistrant.xcframework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@@ -216,6 +279,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
18E7B1B426E8B2960064BC9B /* Tabbar */, 18E7B1B426E8B2960064BC9B /* Tabbar */,
18E7B1FD26E8CC510064BC9B /* Match */,
189DD56226DE460400AB55B1 /* Login */, 189DD56226DE460400AB55B1 /* Login */,
); );
path = Main; path = Main;
@@ -252,6 +316,8 @@
189DD54A26DE338800AB55B1 /* BaseViewController.m */, 189DD54A26DE338800AB55B1 /* BaseViewController.m */,
9B0E1C5726E77022005D4442 /* BaseNavigationController.h */, 9B0E1C5726E77022005D4442 /* BaseNavigationController.h */,
9B0E1C5826E77022005D4442 /* BaseNavigationController.m */, 9B0E1C5826E77022005D4442 /* BaseNavigationController.m */,
18E7B26826E8D5D60064BC9B /* XCCurrentVCStackManager.h */,
18E7B26726E8D5D60064BC9B /* XCCurrentVCStackManager.m */,
189DD67C26E1FD8900AB55B1 /* UIImage+Utils.h */, 189DD67C26E1FD8900AB55B1 /* UIImage+Utils.h */,
189DD67D26E1FD8900AB55B1 /* UIImage+Utils.m */, 189DD67D26E1FD8900AB55B1 /* UIImage+Utils.m */,
189DD68326E1FDBB00AB55B1 /* XCHUDTool.h */, 189DD68326E1FDBB00AB55B1 /* XCHUDTool.h */,
@@ -377,6 +443,33 @@
path = Tabbar; path = Tabbar;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
18E7B1FD26E8CC510064BC9B /* Match */ = {
isa = PBXGroup;
children = (
18E7B24426E8D4050064BC9B /* XplanFrameworks */,
18E7B22826E8CE100064BC9B /* XCFlutterKeyConst.h */,
18E7B22426E8CDCF0064BC9B /* XplanFlutterBoostDelegate.h */,
18E7B22326E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m */,
);
path = Match;
sourceTree = "<group>";
};
18E7B24426E8D4050064BC9B /* XplanFrameworks */ = {
isa = PBXGroup;
children = (
18E7B24B26E8D43C0064BC9B /* App.xcframework */,
18E7B24D26E8D43C0064BC9B /* flutter_boost.xcframework */,
18E7B24C26E8D43C0064BC9B /* Flutter.xcframework */,
18E7B24A26E8D43C0064BC9B /* FlutterPluginRegistrant.xcframework */,
18E7B24526E8D43C0064BC9B /* fluttertoast.xcframework */,
18E7B24826E8D43C0064BC9B /* FMDB.xcframework */,
18E7B24926E8D43C0064BC9B /* path_provider.xcframework */,
18E7B24626E8D43C0064BC9B /* sqflite.xcframework */,
18E7B24726E8D43C0064BC9B /* Toast.xcframework */,
);
path = XplanFrameworks;
sourceTree = "<group>";
};
BFB922F5D81845AC32D1E1ED /* Frameworks */ = { BFB922F5D81845AC32D1E1ED /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -407,6 +500,7 @@
189DD52726DE255300AB55B1 /* Resources */, 189DD52726DE255300AB55B1 /* Resources */,
8311720C3643AC2030B96510 /* [CP] Embed Pods Frameworks */, 8311720C3643AC2030B96510 /* [CP] Embed Pods Frameworks */,
4C25F8F9E2D1F501119C383D /* [CP] Copy Pods Resources */, 4C25F8F9E2D1F501119C383D /* [CP] Copy Pods Resources */,
18E7B21326E8CD220064BC9B /* Embed Frameworks */,
); );
buildRules = ( buildRules = (
); );
@@ -525,6 +619,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
189DD76226E60DDC00AB55B1 /* Api+Login.m in Sources */, 189DD76226E60DDC00AB55B1 /* Api+Login.m in Sources */,
18E7B22626E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m in Sources */,
189DD73E26E21C3F00AB55B1 /* YYUtility.m in Sources */, 189DD73E26E21C3F00AB55B1 /* YYUtility.m in Sources */,
189DD53426DE255300AB55B1 /* TabbarViewController.m in Sources */, 189DD53426DE255300AB55B1 /* TabbarViewController.m in Sources */,
187EEEFE26E8A82C002833B2 /* NSObject+AutoCoding.m in Sources */, 187EEEFE26E8A82C002833B2 /* NSObject+AutoCoding.m in Sources */,
@@ -533,6 +628,7 @@
189DD74A26E21D8400AB55B1 /* SSKeychain.m in Sources */, 189DD74A26E21D8400AB55B1 /* SSKeychain.m in Sources */,
189DD68426E1FDBB00AB55B1 /* XCHUDTool.m in Sources */, 189DD68426E1FDBB00AB55B1 /* XCHUDTool.m in Sources */,
189DD73F26E21C3F00AB55B1 /* YYUtility+Carrier.m in Sources */, 189DD73F26E21C3F00AB55B1 /* YYUtility+Carrier.m in Sources */,
18E7B26926E8D5D60064BC9B /* XCCurrentVCStackManager.m in Sources */,
9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */, 9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */,
189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */, 189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */,
18E7B1B726E8B2D10064BC9B /* Api+Main.m in Sources */, 18E7B1B726E8B2D10064BC9B /* Api+Main.m in Sources */,

View File

@@ -8,6 +8,11 @@
#import "AppDelegate.h" #import "AppDelegate.h"
#import "TabbarViewController.h" #import "TabbarViewController.h"
#import "BaseNavigationController.h" #import "BaseNavigationController.h"
#import "XplanFlutterBoostDelegate.h"
#import "XCFlutterKeyConst.h"
#import "YYUtility.h"
#import "HttpRequestHelper.h"
#import "AccountInfoStorage.h"
@interface AppDelegate () @interface AppDelegate ()
@@ -16,9 +21,45 @@
@implementation AppDelegate @implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
XplanFlutterBoostDelegate* delegate=[[XplanFlutterBoostDelegate alloc] init];
[[FlutterBoost instance] setup:application delegate:delegate callback:^(FlutterEngine *engine) {
FlutterMethodChannel* methodChannel = [FlutterMethodChannel
methodChannelWithName:@"com.mango.flutter.xplan"
binaryMessenger:engine.binaryMessenger];
[methodChannel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) {
NSString *method = call.method;
if ([method isEqualToString:YYFlutterGetNativeGetDeviceInfo]) {
NSDictionary *dic = [HttpRequestHelper configBaseParmars:[[NSDictionary alloc] init]];
result(dic);
} else if ([method isEqualToString:YYFlutterGetNativeGetAuth]) {
NSDictionary *dic = @{
@"pub_uid" : [[AccountInfoStorage instance] getUid],
@"pub_ticket" : [[AccountInfoStorage instance] getTicket]
};
result(dic);
} else if ([method isEqualToString:YYFlutterGetNativeGetDiamond]) {
// [[GetCore(PurseCore) rac_requestBalanceInfo:GetCore(AuthCore).getUid.userIDValue] subscribeNext:^(id _Nullable x) {
// BalanceInfo * info = (BalanceInfo *)x;
// NSNumber *diamonds = [[NSNumber alloc] initWithDouble:info.diamonds.doubleValue];
// result(diamonds);
// }];
} else if([method isEqualToString:YYFlutterGetNativeGetEncodePwd]) {
// if (call.arguments) {
// NSString * password = call.arguments;
// NSString * encrptStr = [DESEncrypt encryptUseDES:password key:keyWithType(KeyType_PwdEncode, NO)];
// result(encrptStr);
// }
} else if([method isEqualToString:YYFlutterGetNativeNotifyShowInvite]) {
// BOOL show = [NSString stringWithFormat:@"%@", call.arguments].boolValue;
// NotifyCoreClient(ShowInviteClient, @selector(onShowInvite:), onShowInvite:show);
}
}];
}];
TabbarViewController *vc = [[TabbarViewController alloc] init]; TabbarViewController *vc = [[TabbarViewController alloc] init];
BaseNavigationController *bnc = [[BaseNavigationController alloc] initWithRootViewController:vc]; BaseNavigationController *bnc = [[BaseNavigationController alloc] initWithRootViewController:vc];
[bnc setNavigationBarHidden:YES];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.rootViewController = bnc; self.window.rootViewController = bnc;
[self.window makeKeyAndVisible]; [self.window makeKeyAndVisible];

View File

@@ -75,6 +75,9 @@ static AccountInfoStorage *_instance = nil;
- (NSString *)getTicket - (NSString *)getTicket
{ {
if (self.ticket == nil) {
return @"";
}
return self.ticket; return self.ticket;
} }

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface AccountModel : NSObject<NSCopying, YYModel> @interface AccountModel : NSObject<YYModel>
@property (nonatomic , assign) NSString *uid; @property (nonatomic , assign) NSString *uid;
@property (nonatomic , copy) NSString *jti; @property (nonatomic , copy) NSString *jti;

View File

@@ -12,14 +12,17 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
typedef void(^HttpSuccess)(BaseModel *data); typedef void(^HttpSuccess)(BaseModel *data);
typedef void(^HttpFail)(NSNumber * _Nonnull code, NSString * _Nullable msg); typedef void(^HttpFail)(NSInteger code, NSString * _Nullable msg);
@interface BaseMvpPresenter : NSObject @interface BaseMvpPresenter : NSObject
- (void)attatchView:(id)view; - (void)attatchView:(id)view;
- (id)getView; - (id)getView;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail showLoading:(BOOL)loading errorToast:(BOOL)toast;
- (void)detatchView; - (void)detatchView;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail showLoading:(BOOL)loading;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail errorToast:(BOOL)toast;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail showLoading:(BOOL)loading errorToast:(BOOL)toast;
@end @end

View File

@@ -24,29 +24,38 @@
return self.view; return self.view;
} }
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail {
return [self createHttpCompletion:success fail:fail showLoading:YES errorToast:YES];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail showLoading:(BOOL)loading {
return [self createHttpCompletion:success fail:fail showLoading:loading errorToast:YES];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail errorToast:(BOOL)toast {
return [self createHttpCompletion:success fail:fail showLoading:YES errorToast:toast];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail showLoading:(BOOL)loading errorToast:(BOOL)toast { - (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail showLoading:(BOOL)loading errorToast:(BOOL)toast {
if (loading) { if (loading) {
[XCHUDTool showLoading]; [XCHUDTool showLoading];
} }
return ^(BaseModel *data, NSNumber * _Nonnull code, NSString * _Nullable msg) { return ^(BaseModel *data, NSInteger code, NSString * _Nullable msg) {
if (loading) { if (loading) {
[XCHUDTool hideHUD]; [XCHUDTool hideHUD];
} }
if (data != nil) { if (code == 200) {
NSString *message = [data valueForKey:@"message"]; success(data);
NSNumber *resCode = [data valueForKey:@"code"]; return;
switch (resCode.intValue) { }
case 200:
success(data); switch (code) {
return; case 401: //
[[self getView] tokenInvalid];
default: return;
if (toast) { case 1415: //
[XCHUDTool showErrorWithMessage:msg]; [[self getView] completeUserInfo];
} return;
fail(resCode, message);
return;
}
} }
if (toast) { if (toast) {

View File

@@ -15,28 +15,29 @@ typedef NS_ENUM(NSUInteger, HttpRequestHelperMethod) {
static dispatch_once_t onceToken; static dispatch_once_t onceToken;
typedef void(^HttpRequestHelperCompletion)(BaseModel* _Nullable data, NSNumber * _Nullable code, NSString * _Nullable msg); typedef void(^HttpRequestHelperCompletion)(BaseModel* _Nullable data, NSInteger code, NSString * _Nullable msg);
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface HttpRequestHelper : NSObject @interface HttpRequestHelper : NSObject
+ (NSDictionary*)configBaseParmars:(NSDictionary *)parmars;
+ (void)GET:(NSString *)method + (void)GET:(NSString *)method
params:(NSDictionary *)params params:(NSDictionary *)params
success:(void (^)(BaseModel *data))success success:(void (^)(BaseModel *data))success
failure:(void (^)(NSNumber *resCode, NSString *message))failure; failure:(void (^)(NSInteger resCode, NSString *message))failure;
+ (void)POST:(NSString *)method + (void)POST:(NSString *)method
params:(NSDictionary *)params params:(NSDictionary *)params
success:(void (^)(BaseModel *data))success success:(void (^)(BaseModel *data))success
failure:(void (^)(NSNumber *resCode, NSString *message))failure; failure:(void (^)(NSInteger resCode, NSString *message))failure;
+ (void)request:(NSString *)url + (void)request:(NSString *)url
method:(HttpRequestHelperMethod)method method:(HttpRequestHelperMethod)method
params:(NSDictionary *)params params:(NSDictionary *)params
success:(void (^)(BaseModel *data))success success:(void (^)(BaseModel *data))success
failure:(void (^)(NSNumber *resCode, NSString *message))failure; failure:(void (^)(NSInteger resCode, NSString *message))failure;
+ (void)request:(NSString *)path + (void)request:(NSString *)path
method:(HttpRequestHelperMethod)method method:(HttpRequestHelperMethod)method

View File

@@ -37,15 +37,16 @@
+ (void)GET:(NSString *)method + (void)GET:(NSString *)method
params:(NSDictionary *)params params:(NSDictionary *)params
success:(void (^)(BaseModel *data))success success:(void (^)(BaseModel *data))success
failure:(void (^)(NSNumber *resCode, NSString *message))failure failure:(void (^)(NSInteger resCode, NSString *message))failure
{ {
if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == 0) { if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == 0) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
failure([NSNumber numberWithInt:-1], @"请检查网络连接。"); failure(-1, @"请检查网络连接。");
}); });
return; return;
} }
[self configHeaders];
params = [self configBaseParmars:params]; params = [self configBaseParmars:params];
#ifdef DEBUG #ifdef DEBUG
NSLog(@"\nmethod:\n%@\nparameter:\n%@", method, params); NSLog(@"\nmethod:\n%@\nparameter:\n%@", method, params);
@@ -56,27 +57,37 @@
#ifdef DEBUG #ifdef DEBUG
NSLog(@"\n%@", [responseObject yy_modelToJSONString]); NSLog(@"\n%@", [responseObject yy_modelToJSONString]);
#endif #endif
success(responseObject); BaseModel *baseModel = [BaseModel yy_modelWithDictionary:responseObject];
if (baseModel.code == 200) {
success(baseModel);
} else {
failure(baseModel.code, baseModel.message);
}
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
#ifdef DEBUG #ifdef DEBUG
NSLog(@"\n%@", error); NSLog(@"\n%@", error);
#endif #endif
failure([NSNumber numberWithLong:error.code], error.domain); if (error.code == -1009) {
failure(error.code, @"网络异常,请检查网络后重试。");
} else {
failure(error.code, @"服务器正忙,请稍后重试。");
}
}]; }];
} }
+ (void)POST:(NSString *)method + (void)POST:(NSString *)method
params:(NSDictionary *)params params:(NSDictionary *)params
success:(void (^)(BaseModel *data))success success:(void (^)(BaseModel *data))success
failure:(void (^)(NSNumber *resCode, NSString *message))failure failure:(void (^)(NSInteger resCode, NSString *message))failure
{ {
if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == 0) { if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == 0) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
failure([NSNumber numberWithInt:-1], @"请检查网络连接。"); failure(-1, @"请检查网络连接。");
}); });
return; return;
} }
[self configHeaders];
params = [self configBaseParmars:params]; params = [self configBaseParmars:params];
#ifdef DEBUG #ifdef DEBUG
NSLog(@"\nmethod:\n%@\nparameter:\n%@", method, params); NSLog(@"\nmethod:\n%@\nparameter:\n%@", method, params);
@@ -87,12 +98,21 @@
#ifdef DEBUG #ifdef DEBUG
NSLog(@"\n%@", [responseObject yy_modelToJSONString]); NSLog(@"\n%@", [responseObject yy_modelToJSONString]);
#endif #endif
success([BaseModel yy_modelWithDictionary:responseObject]); BaseModel *baseModel = [BaseModel yy_modelWithDictionary:responseObject];
if (baseModel.code == 200) {
success(baseModel);
} else {
failure(baseModel.code, baseModel.message);
}
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
#ifdef DEBUG #ifdef DEBUG
NSLog(@"\n%@", error); NSLog(@"\n%@", error);
#endif #endif
failure([NSNumber numberWithLong:error.code], error.domain); if (error.code == -1009) {
failure(error.code, @"网络异常,请检查网络后重试。");
} else {
failure(error.code, @"服务器正忙,请稍后重试。");
}
}]; }];
} }
@@ -100,7 +120,7 @@
method:(HttpRequestHelperMethod)method method:(HttpRequestHelperMethod)method
params:(NSDictionary *)params params:(NSDictionary *)params
success:(void (^)(BaseModel *data))success success:(void (^)(BaseModel *data))success
failure:(void (^)(NSNumber *resCode, NSString *message))failure failure:(void (^)(NSInteger resCode, NSString *message))failure
{ {
switch (method) { switch (method) {
case HttpRequestHelperMethodGET: { case HttpRequestHelperMethodGET: {
@@ -121,16 +141,16 @@
{ {
[self request:path method:method params:params success:^(BaseModel *data) { [self request:path method:method params:params success:^(BaseModel *data) {
if (completion) { if (completion) {
completion(data, nil, nil); completion(data, 200, nil);
} }
} failure:^(NSNumber *resCode, NSString *message) { } failure:^(NSInteger resCode, NSString *message) {
if (completion) { if (completion) {
completion(nil, resCode, message); completion(nil, resCode, message);
} }
}]; }];
} }
+ (NSDictionary*)configBaseParmars:(NSDictionary *)parmars + (void)configHeaders
{ {
AFHTTPSessionManager *client = [HttpRequestHelper requestManager]; AFHTTPSessionManager *client = [HttpRequestHelper requestManager];
if ([[AccountInfoStorage instance] getUid].length > 0) { if ([[AccountInfoStorage instance] getUid].length > 0) {
@@ -143,6 +163,10 @@
}else { }else {
[client.requestSerializer setValue:nil forHTTPHeaderField:@"pub_ticket"]; [client.requestSerializer setValue:nil forHTTPHeaderField:@"pub_ticket"];
} }
}
+ (NSDictionary*)configBaseParmars:(NSDictionary *)parmars
{
NSDictionary *defaultBasciParame = @{ NSDictionary *defaultBasciParame = @{
@"os" : @"iOS", @"os" : @"iOS",
@"osVersion" : [YYUtility systemVersion], @"osVersion" : [YYUtility systemVersion],

View File

@@ -0,0 +1,31 @@
//
// XCCurrentVCStackManager.h
// XCBaseUIKit
//
// Created by 卫明何 on 2018/8/9.
// Copyright © 2018年 KevinWang. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface XCCurrentVCStackManager : NSObject
+ (instancetype)shareManager;
/**
当前的导航控制器
@return 导航控制器
*/
- (UINavigationController *)currentNavigationController;
/**
当前最顶层控制器
@return 当前最顶层控制器
*/
- (UIViewController *)getCurrentVC;
@end

View File

@@ -0,0 +1,121 @@
//
// XCCurrentVCStackManager.m
// XCBaseUIKit
//
// Created by on 2018/8/9.
// Copyright © 2018 KevinWang. All rights reserved.
//
#import "XCCurrentVCStackManager.h"
@implementation XCCurrentVCStackManager
+ (instancetype)shareManager {
static dispatch_once_t onceToken = 0;
static id instance;
dispatch_once(&onceToken, ^{
instance = [[self alloc] init];
});
return instance;
}
- (UIViewController *)getCurrentVC {
UIViewController *rootViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
if ([rootViewController isKindOfClass:NSClassFromString(@"MMDrawerController")]) {
rootViewController = (UIViewController *)[rootViewController valueForKey:@"centerViewController"];
}
UIViewController *currentVC = [self getCurrentVCFrom:rootViewController];
return currentVC;
}
- (UIViewController *)getCurrentVCFrom:(UIViewController *)rootVC {
UIViewController *currentVC;
if ([rootVC presentedViewController]) {
// presented
rootVC = [rootVC presentedViewController];
}
if ([rootVC isKindOfClass:[UITabBarController class]]) {
// UITabBarController
currentVC = [self getCurrentVCFrom:[(UITabBarController *)rootVC selectedViewController]];
} else if ([rootVC isKindOfClass:[UINavigationController class]]) {
// UINavigationController
currentVC = [self getCurrentVCFrom:[(UINavigationController *)rootVC visibleViewController]];
} else {
//
currentVC = rootVC;
}
return currentVC;
}
- (UIViewController *)currentViewController {
UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
UIViewController *vc = keyWindow.rootViewController;
while (vc.presentedViewController) {
vc = vc.presentedViewController;
if ([vc isKindOfClass:[UINavigationController class]]) {
vc = [(UINavigationController *)vc visibleViewController];
}
else if ([vc isKindOfClass:[UITabBarController class]]) {
vc = [(UITabBarController *)vc selectedViewController];
}
}
return vc;
}
- (UINavigationController *)currentNavigationController {
return [self currentNC];
}
- (UINavigationController *)currentNC{
if (![[UIApplication sharedApplication].windows.lastObject isKindOfClass:[UIWindow class]]) {
NSAssert(0, @"未获取到导航控制器");
return nil;
}
UIViewController *rootViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
return [self getCurrentNCFrom:rootViewController];
}
//
- (UINavigationController *)getCurrentNCFrom:(UIViewController *)vc{
if ([vc isKindOfClass:NSClassFromString(@"MMDrawerController")]) {
vc = (UIViewController *)[vc valueForKey:@"centerViewController"];
}
if ([vc isKindOfClass:[UITabBarController class]]) {
UINavigationController *nc = ((UITabBarController *)vc).selectedViewController;
return [self getCurrentNCFrom:nc];
}
else if ([vc isKindOfClass:[UINavigationController class]]) {
if (((UINavigationController *)vc).presentedViewController) {
return [self getCurrentNCFrom:((UINavigationController *)vc).presentedViewController];
}
return [self getCurrentNCFrom:((UINavigationController *)vc).topViewController];
}
else if ([vc isKindOfClass:[UIViewController class]]) {
if (vc.presentedViewController) {
return [self getCurrentNCFrom:vc.presentedViewController];
}
else {
if (!vc.navigationController) {
if (vc.presentingViewController) {
[vc dismissViewControllerAnimated:NO completion:nil];
return [self getCurrentNCFrom:vc.presentingViewController];
} else {
NSAssert(0, @"未获取到导航控制器");
return nil;
}
} else {
return vc.navigationController;
}
}
}
else {
NSAssert(0, @"未获取到导航控制器");
return nil;
}
}
@end

View File

@@ -38,15 +38,11 @@
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
<key>UISupportedInterfaceOrientations~ipad</key> <key>UISupportedInterfaceOrientations~ipad</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>

View File

@@ -20,9 +20,9 @@
[Api phoneQuickLogin:[self createHttpCompletion:^(BaseModel *data) { [Api phoneQuickLogin:[self createHttpCompletion:^(BaseModel *data) {
[[AccountInfoStorage instance] saveAccountInfo:[AccountModel yy_modelWithDictionary:data.data]]; [[AccountInfoStorage instance] saveAccountInfo:[AccountModel yy_modelWithDictionary:data.data]];
[[self getView] phoneQuickLoginSuccess]; [[self getView] phoneQuickLoginSuccess];
} fail:^(NSNumber * _Nonnull code, NSString * _Nullable msg) { } fail:^(NSInteger code, NSString * _Nullable msg) {
// todo fail // todo fail
} showLoading:YES errorToast:YES] accessToken:accessToken token:token]; }] accessToken:accessToken token:token];
} }
@end @end

View File

@@ -0,0 +1,39 @@
//
// XCFlutterKeyConst.h
// PlanetStar
//
// Created by fengshuo on 2021/4/7.
// Copyright © 2021 WUJIE INTERACTIVE. All rights reserved.
//
///flutter 和原生交互所需要的类
#ifndef XCFlutterKeyConst_h
#define XCFlutterKeyConst_h
#pragma mark - Flutter 获取native 的内容
//获取钱包里面的钻石 double类型
static NSString *const YYFlutterGetNativeGetDiamond = @"getDiamond";
//获取deviceninfo dic 类型
static NSString *const YYFlutterGetNativeGetDeviceInfo = @"getDeviceInfo";
//获取uid 和ticket dic 类型
static NSString *const YYFlutterGetNativeGetAuth = @"getAuth";
//加密输入的密码 dic 类型
static NSString *const YYFlutterGetNativeGetEncodePwd = @"getEncodePwd";
//flutter通知客户端显示邀请好友的标示 bool
static NSString *const YYFlutterGetNativeNotifyShowInvite = @"notifyShowInvite";
#pragma mark - Flutter跳转native界面的
///跳转充值也
static NSString *const YYFlutterPushNavitePageCharge = @"charge";
///账号绑定
static NSString *const YYFlutterPushNavitePageBindGameAccount = @"bindGameAccount";
///邀请好友
static NSString *const YYFlutterPushNavitePageInvite = @"invite";
///设置支付密码
static NSString *const YYFlutterPushNavitePagePaymentPwd = @"paymentPwd";
///跳转设置支付密码
static NSString *const YYFlutterPushNavitePageBindPaymentPwd = @"bindPaymentPwd";
///跳转Webview
static NSString *const YYFlutterPushNavitePageWebview = @"openWebview";
#pragma mark - navite跳转flutter页面
#endif /* XCFlutterKeyConst_h */

View File

@@ -0,0 +1,17 @@
//
// XplanFlutterBoostDelegate.h
// PlanetStar
//
// Created by zu on 2021/3/18.
// Copyright © 2021 WUJIE INTERACTIVE. All rights reserved.
//
#import <flutter_boost/FlutterBoost.h>
#import <Foundation/Foundation.h>
@interface XplanFlutterBoostDelegate : NSObject<FlutterBoostDelegate>
@property (nonatomic,strong) UINavigationController *navigationController;
@end

View File

@@ -0,0 +1,95 @@
//
// XplanFlutterBoostDelegate.m
// PlanetStar
//
// Created by zu on 2021/3/18.
// Copyright © 2021 WUJIE INTERACTIVE. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "XCCurrentVCStackManager.h"
#import "BaseNavigationController.h"
#import <flutter_boost/FlutterBoost.h>
#import "XplanFlutterBoostDelegate.h"
#import "XCFlutterKeyConst.h"
@implementation XplanFlutterBoostDelegate
///flutter
- (void) pushNativeRoute:(NSString *) pageName arguments:(NSDictionary *) arguments {
BOOL animated = arguments[@"animated"] ? [arguments[@"animated"] boolValue] : YES;
BOOL present = arguments[@"present"] ? [arguments[@"present"] boolValue] : NO;
UIViewController *controller;
controller = [self getNaviteClassNameWithPageName:pageName arguments:arguments];
UIViewController * currentVC = [[FlutterBoost instance] currentViewController];
if (currentVC.navigationController) {
self.navigationController = currentVC.navigationController;
}
if (controller) {
if(present){
[self.navigationController presentViewController:controller animated:animated completion:^{
}];
}else{
[self.navigationController pushViewController:controller animated:animated];
}
} else {
NSLog(@"输入的类名不存在");
}
}
///flutter
- (void)pushFlutterRoute:(NSString *)pageName uniqueId:(NSString *)uniqueId arguments:(NSDictionary *)arguments completion:(void (^)(BOOL))completion {
FlutterEngine* engine = [[FlutterBoost instance ] engine];
engine.viewController = nil;
FBFlutterViewContainer *vc = FBFlutterViewContainer.new;
[vc setName:pageName uniqueId:nil params:arguments];
UIViewController *rvc = [XCCurrentVCStackManager shareManager].getCurrentVC;
self.navigationController = rvc.navigationController;
BOOL animated = arguments[@"animated"] ? [arguments[@"animated"] boolValue] : YES;
BOOL present = arguments[@"present"] ? [arguments[@"present"] boolValue] : NO;
if(present){
/// flutter
BaseNavigationController * flutterNav = [[BaseNavigationController alloc] initWithRootViewController:vc];
[self.navigationController presentViewController:flutterNav animated:animated completion:^{
}];
}else{
///push 使
[self.navigationController pushViewController:vc animated:animated];
}
}
///flutter退
- (void)popRoute:(NSString *)uniqueId {
///present
if (self.navigationController.presentingViewController) {
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
} else {
[self.navigationController popViewControllerAnimated:YES];
}
}
- (UIViewController *)getNaviteClassNameWithPageName:(NSString *)pageName arguments:(NSDictionary *)arguments {
// if ([pageName isEqualToString:YYFlutterPushNavitePageCharge]) {
// return [[NSClassFromString(@"LLRechargeViewController") alloc] init];
// } else if([pageName isEqualToString:YYFlutterPushNavitePageBindPaymentPwd]){
// return [[NSClassFromString(@"TTPayPwdViewController") alloc] init];;
// } else if([pageName isEqualToString:YYFlutterPushNavitePageBindGameAccount]){
// TTWKWebViewViewController * webVC = [[TTWKWebViewViewController alloc] init];
// webVC.urlString = HtmlUrlKey(kGameBindAccountURL);
// return webVC;
// } else if([pageName isEqualToString:YYFlutterPushNavitePageInvite]){
// TTWKWebViewViewController * webVC = [[TTWKWebViewViewController alloc] init];
// webVC.urlString = HtmlUrlKey(kUserInviteFriendURL);
// return webVC;
// } else if([pageName isEqualToString:YYFlutterPushNavitePageWebview]) {
// TTWKWebViewViewController * webVC = [[TTWKWebViewViewController alloc] init];
// webVC.urlString = arguments[@"webviewUrl"];
// return webVC;
// } else {
return nil;
// }
}
@end

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-x86_64-simulator</string>
<key>LibraryPath</key>
<string>App.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>App.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>

View File

@@ -0,0 +1 @@
{"assets/images/act_bind.png":["assets/images/act_bind.png"],"assets/images/act_record.png":["assets/images/act_record.png"],"assets/images/act_rule.png":["assets/images/act_rule.png"],"assets/images/bag_ticket_bg.png":["assets/images/bag_ticket_bg.png"],"assets/images/empty.png":["assets/images/empty.png"],"assets/images/empty_avatar.png":["assets/images/empty_avatar.png"],"assets/images/free_ticket_banner.png":["assets/images/free_ticket_banner.png"],"assets/images/free_ticket_border.png":["assets/images/free_ticket_border.png"],"assets/images/free_ticket_btn_bg.png":["assets/images/free_ticket_btn_bg.png"],"assets/images/free_ticket_checked.png":["assets/images/free_ticket_checked.png"],"assets/images/free_ticket_day_login.png":["assets/images/free_ticket_day_login.png"],"assets/images/free_ticket_dialog_bg_login.png":["assets/images/free_ticket_dialog_bg_login.png"],"assets/images/free_ticket_dialog_bg_reg.png":["assets/images/free_ticket_dialog_bg_reg.png"],"assets/images/free_ticket_dialog_btn.png":["assets/images/free_ticket_dialog_btn.png"],"assets/images/free_ticket_img.png":["assets/images/free_ticket_img.png"],"assets/images/free_ticket_reg.png":["assets/images/free_ticket_reg.png"],"assets/images/free_ticket_week_login.png":["assets/images/free_ticket_week_login.png"],"assets/images/home_banner.png":["assets/images/home_banner.png"],"assets/images/home_banner_title.png":["assets/images/home_banner_title.png"],"assets/images/home_mall.png":["assets/images/home_mall.png"],"assets/images/home_matches_state.png":["assets/images/home_matches_state.png"],"assets/images/home_my_card.png":["assets/images/home_my_card.png"],"assets/images/home_my_enroll.png":["assets/images/home_my_enroll.png"],"assets/images/mall_add_money.png":["assets/images/mall_add_money.png"],"assets/images/mall_diamonds_icon.png":["assets/images/mall_diamonds_icon.png"],"assets/images/mall_free_ticket_btn_bg.png":["assets/images/mall_free_ticket_btn_bg.png"],"assets/images/march_icon.png":["assets/images/march_icon.png"],"assets/images/march_time.png":["assets/images/march_time.png"],"assets/images/match_award_no1.png":["assets/images/match_award_no1.png"],"assets/images/match_award_no2.png":["assets/images/match_award_no2.png"],"assets/images/match_award_no3.png":["assets/images/match_award_no3.png"],"assets/images/match_award_no4.png":["assets/images/match_award_no4.png"],"assets/images/match_award_no5.png":["assets/images/match_award_no5.png"],"assets/images/match_award_no6.png":["assets/images/match_award_no6.png"],"assets/images/match_detail_chatroom.png":["assets/images/match_detail_chatroom.png"],"assets/images/match_detail_invite.png":["assets/images/match_detail_invite.png"],"assets/images/match_home_free_ticket.png":["assets/images/match_home_free_ticket.png"],"assets/images/match_performance_hpjy.png":["assets/images/match_performance_hpjy.png"],"assets/images/match_progress_0.png":["assets/images/match_progress_0.png"],"assets/images/match_progress_1.png":["assets/images/match_progress_1.png"],"assets/images/match_record_counting.png":["assets/images/match_record_counting.png"],"assets/images/match_record_entering.png":["assets/images/match_record_entering.png"],"assets/images/match_record_matching.png":["assets/images/match_record_matching.png"],"assets/images/match_record_quoted.png":["assets/images/match_record_quoted.png"],"assets/images/prize_bg.png":["assets/images/prize_bg.png"],"assets/images/prize_money.png":["assets/images/prize_money.png"],"assets/images/prize_record.png":["assets/images/prize_record.png"],"assets/images/quick_match_item_bg.png":["assets/images/quick_match_item_bg.png"],"assets/svga/mall_free_ticket_bg.svga":["assets/svga/mall_free_ticket_bg.svga"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"],"packages/flutter_markdown/assets/logo.png":["packages/flutter_markdown/assets/logo.png"],"packages/fluttertoast/assets/toastify.css":["packages/fluttertoast/assets/toastify.css"],"packages/fluttertoast/assets/toastify.js":["packages/fluttertoast/assets/toastify.js"]}

View File

@@ -0,0 +1 @@
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]}]

View File

@@ -0,0 +1,14 @@
/**
* Minified by jsDelivr using clean-css v4.2.3.
* Original file: /npm/toastify-js@1.9.3/src/toastify.css
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
/*!
* Toastify js 1.9.3
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/
.toastify{padding:12px 20px;color:#fff;display:inline-block;box-shadow:0 3px 6px -1px rgba(0,0,0,.12),0 10px 36px -4px rgba(77,96,232,.3);background:-webkit-linear-gradient(315deg,#73a5ff,#5477f5);background:linear-gradient(135deg,#73a5ff,#5477f5);position:fixed;opacity:0;transition:all .4s cubic-bezier(.215,.61,.355,1);border-radius:2px;cursor:pointer;text-decoration:none;max-width:calc(50% - 20px);z-index:2147483647}.toastify.on{opacity:1}.toast-close{opacity:.4;padding:0 5px}.toastify-right{right:15px}.toastify-left{left:15px}.toastify-top{top:-150px}.toastify-bottom{bottom:-150px}.toastify-rounded{border-radius:25px}.toastify-avatar{width:1.5em;height:1.5em;margin:-7px 5px;border-radius:2px}.toastify-center{margin-left:auto;margin-right:auto;left:0;right:0;max-width:fit-content;max-width:-moz-fit-content}@media only screen and (max-width:360px){.toastify-left,.toastify-right{margin-left:auto;margin-right:auto;left:0;right:0;max-width:fit-content}}

View File

@@ -0,0 +1,14 @@
/**
* Minified by jsDelivr using Terser v5.3.0.
* Original file: /npm/toastify-js@1.9.3/src/toastify.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
/*!
* Toastify js 1.9.3
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/
!function(t,o){"object"==typeof module&&module.exports?module.exports=o():t.Toastify=o()}(this,(function(t){var o=function(t){return new o.lib.init(t)};function i(t,o){return o.offset[t]?isNaN(o.offset[t])?o.offset[t]:o.offset[t]+"px":"0px"}function s(t,o){return!(!t||"string"!=typeof o)&&!!(t.className&&t.className.trim().split(/\s+/gi).indexOf(o)>-1)}return o.lib=o.prototype={toastify:"1.9.3",constructor:o,init:function(t){return t||(t={}),this.options={},this.toastElement=null,this.options.text=t.text||"Hi there!",this.options.node=t.node,this.options.duration=0===t.duration?0:t.duration||3e3,this.options.selector=t.selector,this.options.callback=t.callback||function(){},this.options.destination=t.destination,this.options.newWindow=t.newWindow||!1,this.options.close=t.close||!1,this.options.gravity="bottom"===t.gravity?"toastify-bottom":"toastify-top",this.options.positionLeft=t.positionLeft||!1,this.options.position=t.position||"",this.options.backgroundColor=t.backgroundColor,this.options.avatar=t.avatar||"",this.options.className=t.className||"",this.options.stopOnFocus=void 0===t.stopOnFocus||t.stopOnFocus,this.options.onClick=t.onClick,this.options.offset=t.offset||{x:0,y:0},this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var t=document.createElement("div");if(t.className="toastify on "+this.options.className,this.options.position?t.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(t.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):t.className+=" toastify-right",t.className+=" "+this.options.gravity,this.options.backgroundColor&&(t.style.background=this.options.backgroundColor),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(t.innerHTML=this.options.text,""!==this.options.avatar){var o=document.createElement("img");o.src=this.options.avatar,o.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?t.appendChild(o):t.insertAdjacentElement("afterbegin",o)}if(!0===this.options.close){var s=document.createElement("span");s.innerHTML="&#10006;",s.className="toast-close",s.addEventListener("click",function(t){t.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var n=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&n>360?t.insertAdjacentElement("afterbegin",s):t.appendChild(s)}if(this.options.stopOnFocus&&this.options.duration>0){var e=this;t.addEventListener("mouseover",(function(o){window.clearTimeout(t.timeOutValue)})),t.addEventListener("mouseleave",(function(){t.timeOutValue=window.setTimeout((function(){e.removeElement(t)}),e.options.duration)}))}if(void 0!==this.options.destination&&t.addEventListener("click",function(t){t.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&t.addEventListener("click",function(t){t.stopPropagation(),this.options.onClick()}.bind(this)),"object"==typeof this.options.offset){var a=i("x",this.options),p=i("y",this.options),r="left"==this.options.position?a:"-"+a,l="toastify-top"==this.options.gravity?p:"-"+p;t.style.transform="translate("+r+","+l+")"}return t},showToast:function(){var t;if(this.toastElement=this.buildToast(),!(t=void 0===this.options.selector?document.body:document.getElementById(this.options.selector)))throw"Root element is not defined";return t.insertBefore(this.toastElement,t.firstChild),o.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(t){t.className=t.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),o.reposition()}.bind(this),400)}},o.reposition=function(){for(var t,o={top:15,bottom:15},i={top:15,bottom:15},n={top:15,bottom:15},e=document.getElementsByClassName("toastify"),a=0;a<e.length;a++){t=!0===s(e[a],"toastify-top")?"toastify-top":"toastify-bottom";var p=e[a].offsetHeight;t=t.substr(9,t.length-1);(window.innerWidth>0?window.innerWidth:screen.width)<=360?(e[a].style[t]=n[t]+"px",n[t]+=p+15):!0===s(e[a],"toastify-left")?(e[a].style[t]=o[t]+"px",o[t]+=p+15):(e[a].style[t]=i[t]+"px",i[t]+=p+15)}return this},o.lib.init.prototype=o.lib,o}));

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>

View File

@@ -0,0 +1 @@
{"assets/images/act_bind.png":["assets/images/act_bind.png"],"assets/images/act_record.png":["assets/images/act_record.png"],"assets/images/act_rule.png":["assets/images/act_rule.png"],"assets/images/bag_ticket_bg.png":["assets/images/bag_ticket_bg.png"],"assets/images/empty.png":["assets/images/empty.png"],"assets/images/empty_avatar.png":["assets/images/empty_avatar.png"],"assets/images/free_ticket_banner.png":["assets/images/free_ticket_banner.png"],"assets/images/free_ticket_border.png":["assets/images/free_ticket_border.png"],"assets/images/free_ticket_btn_bg.png":["assets/images/free_ticket_btn_bg.png"],"assets/images/free_ticket_checked.png":["assets/images/free_ticket_checked.png"],"assets/images/free_ticket_day_login.png":["assets/images/free_ticket_day_login.png"],"assets/images/free_ticket_dialog_bg_login.png":["assets/images/free_ticket_dialog_bg_login.png"],"assets/images/free_ticket_dialog_bg_reg.png":["assets/images/free_ticket_dialog_bg_reg.png"],"assets/images/free_ticket_dialog_btn.png":["assets/images/free_ticket_dialog_btn.png"],"assets/images/free_ticket_img.png":["assets/images/free_ticket_img.png"],"assets/images/free_ticket_reg.png":["assets/images/free_ticket_reg.png"],"assets/images/free_ticket_week_login.png":["assets/images/free_ticket_week_login.png"],"assets/images/home_banner.png":["assets/images/home_banner.png"],"assets/images/home_banner_title.png":["assets/images/home_banner_title.png"],"assets/images/home_mall.png":["assets/images/home_mall.png"],"assets/images/home_matches_state.png":["assets/images/home_matches_state.png"],"assets/images/home_my_card.png":["assets/images/home_my_card.png"],"assets/images/home_my_enroll.png":["assets/images/home_my_enroll.png"],"assets/images/mall_add_money.png":["assets/images/mall_add_money.png"],"assets/images/mall_diamonds_icon.png":["assets/images/mall_diamonds_icon.png"],"assets/images/mall_free_ticket_btn_bg.png":["assets/images/mall_free_ticket_btn_bg.png"],"assets/images/march_icon.png":["assets/images/march_icon.png"],"assets/images/march_time.png":["assets/images/march_time.png"],"assets/images/match_award_no1.png":["assets/images/match_award_no1.png"],"assets/images/match_award_no2.png":["assets/images/match_award_no2.png"],"assets/images/match_award_no3.png":["assets/images/match_award_no3.png"],"assets/images/match_award_no4.png":["assets/images/match_award_no4.png"],"assets/images/match_award_no5.png":["assets/images/match_award_no5.png"],"assets/images/match_award_no6.png":["assets/images/match_award_no6.png"],"assets/images/match_detail_chatroom.png":["assets/images/match_detail_chatroom.png"],"assets/images/match_detail_invite.png":["assets/images/match_detail_invite.png"],"assets/images/match_home_free_ticket.png":["assets/images/match_home_free_ticket.png"],"assets/images/match_performance_hpjy.png":["assets/images/match_performance_hpjy.png"],"assets/images/match_progress_0.png":["assets/images/match_progress_0.png"],"assets/images/match_progress_1.png":["assets/images/match_progress_1.png"],"assets/images/match_record_counting.png":["assets/images/match_record_counting.png"],"assets/images/match_record_entering.png":["assets/images/match_record_entering.png"],"assets/images/match_record_matching.png":["assets/images/match_record_matching.png"],"assets/images/match_record_quoted.png":["assets/images/match_record_quoted.png"],"assets/images/prize_bg.png":["assets/images/prize_bg.png"],"assets/images/prize_money.png":["assets/images/prize_money.png"],"assets/images/prize_record.png":["assets/images/prize_record.png"],"assets/images/quick_match_item_bg.png":["assets/images/quick_match_item_bg.png"],"assets/svga/mall_free_ticket_bg.svga":["assets/svga/mall_free_ticket_bg.svga"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"],"packages/flutter_markdown/assets/logo.png":["packages/flutter_markdown/assets/logo.png"],"packages/fluttertoast/assets/toastify.css":["packages/fluttertoast/assets/toastify.css"],"packages/fluttertoast/assets/toastify.js":["packages/fluttertoast/assets/toastify.js"]}

View File

@@ -0,0 +1 @@
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]}]

Some files were not shown because too many files have changed in this diff Show More