增加WKWebViewController
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
189DD75026E21D9000AB55B1 /* GCDHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 189DD74E26E21D9000AB55B1 /* GCDHelper.m */; };
|
189DD75026E21D9000AB55B1 /* GCDHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 189DD74E26E21D9000AB55B1 /* GCDHelper.m */; };
|
||||||
189DD75926E6003C00AB55B1 /* Api.m in Sources */ = {isa = PBXBuildFile; fileRef = 189DD75826E6003C00AB55B1 /* Api.m */; };
|
189DD75926E6003C00AB55B1 /* Api.m in Sources */ = {isa = PBXBuildFile; fileRef = 189DD75826E6003C00AB55B1 /* Api.m */; };
|
||||||
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 */; };
|
||||||
|
18C17A5D26F338F300C48E11 /* XplanFBFlutterViewContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C17A5C26F338F300C48E11 /* XplanFBFlutterViewContainer.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 */; };
|
18E7B22626E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B22326E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m */; };
|
||||||
@@ -59,6 +60,7 @@
|
|||||||
18E7B31B26F0982E0064BC9B /* UserExpand.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B31A26F0982E0064BC9B /* UserExpand.m */; };
|
18E7B31B26F0982E0064BC9B /* UserExpand.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B31A26F0982E0064BC9B /* UserExpand.m */; };
|
||||||
18E7B31E26F0984C0064BC9B /* UserLevelVo.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B31D26F0984C0064BC9B /* UserLevelVo.m */; };
|
18E7B31E26F0984C0064BC9B /* UserLevelVo.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B31D26F0984C0064BC9B /* UserLevelVo.m */; };
|
||||||
18E7B32126F098650064BC9B /* UserInfoSkillVo.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B32026F098650064BC9B /* UserInfoSkillVo.m */; };
|
18E7B32126F098650064BC9B /* UserInfoSkillVo.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B32026F098650064BC9B /* UserInfoSkillVo.m */; };
|
||||||
|
18E7B33226F317A20064BC9B /* XPWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E7B33126F317A20064BC9B /* XPWebViewController.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 */; };
|
||||||
E81366E326F0A1FC0076364C /* LoginBindPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E81366E226F0A1FC0076364C /* LoginBindPhoneViewController.m */; };
|
E81366E326F0A1FC0076364C /* LoginBindPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E81366E226F0A1FC0076364C /* LoginBindPhoneViewController.m */; };
|
||||||
@@ -168,6 +170,8 @@
|
|||||||
189DD76026E60DDC00AB55B1 /* Api+Login.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+Login.h"; sourceTree = "<group>"; };
|
189DD76026E60DDC00AB55B1 /* Api+Login.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+Login.h"; sourceTree = "<group>"; };
|
||||||
189DD76126E60DDC00AB55B1 /* Api+Login.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+Login.m"; sourceTree = "<group>"; };
|
189DD76126E60DDC00AB55B1 /* Api+Login.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+Login.m"; sourceTree = "<group>"; };
|
||||||
189DD78026E620FE00AB55B1 /* ApiHost.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ApiHost.h; sourceTree = "<group>"; };
|
189DD78026E620FE00AB55B1 /* ApiHost.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ApiHost.h; sourceTree = "<group>"; };
|
||||||
|
18C17A5B26F338F300C48E11 /* XplanFBFlutterViewContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XplanFBFlutterViewContainer.h; sourceTree = "<group>"; };
|
||||||
|
18C17A5C26F338F300C48E11 /* XplanFBFlutterViewContainer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XplanFBFlutterViewContainer.m; sourceTree = "<group>"; };
|
||||||
18E7B1AE26E8AD760064BC9B /* MainProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainProtocol.h; sourceTree = "<group>"; };
|
18E7B1AE26E8AD760064BC9B /* MainProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainProtocol.h; sourceTree = "<group>"; };
|
||||||
18E7B1B026E8AF980064BC9B /* MainPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainPresenter.h; sourceTree = "<group>"; };
|
18E7B1B026E8AF980064BC9B /* MainPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainPresenter.h; sourceTree = "<group>"; };
|
||||||
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>"; };
|
||||||
@@ -197,6 +201,8 @@
|
|||||||
18E7B31D26F0984C0064BC9B /* UserLevelVo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserLevelVo.m; sourceTree = "<group>"; };
|
18E7B31D26F0984C0064BC9B /* UserLevelVo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserLevelVo.m; sourceTree = "<group>"; };
|
||||||
18E7B31F26F098650064BC9B /* UserInfoSkillVo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserInfoSkillVo.h; sourceTree = "<group>"; };
|
18E7B31F26F098650064BC9B /* UserInfoSkillVo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserInfoSkillVo.h; sourceTree = "<group>"; };
|
||||||
18E7B32026F098650064BC9B /* UserInfoSkillVo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserInfoSkillVo.m; sourceTree = "<group>"; };
|
18E7B32026F098650064BC9B /* UserInfoSkillVo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserInfoSkillVo.m; sourceTree = "<group>"; };
|
||||||
|
18E7B33026F317A20064BC9B /* XPWebViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPWebViewController.h; sourceTree = "<group>"; };
|
||||||
|
18E7B33126F317A20064BC9B /* XPWebViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPWebViewController.m; 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>"; };
|
||||||
@@ -396,6 +402,8 @@
|
|||||||
18E7B1B426E8B2960064BC9B /* Tabbar */,
|
18E7B1B426E8B2960064BC9B /* Tabbar */,
|
||||||
18E7B1FD26E8CC510064BC9B /* Match */,
|
18E7B1FD26E8CC510064BC9B /* Match */,
|
||||||
189DD56226DE460400AB55B1 /* Login */,
|
189DD56226DE460400AB55B1 /* Login */,
|
||||||
|
18E7B33026F317A20064BC9B /* XPWebViewController.h */,
|
||||||
|
18E7B33126F317A20064BC9B /* XPWebViewController.m */,
|
||||||
);
|
);
|
||||||
path = Main;
|
path = Main;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -590,6 +598,8 @@
|
|||||||
18E7B22826E8CE100064BC9B /* XCFlutterKeyConst.h */,
|
18E7B22826E8CE100064BC9B /* XCFlutterKeyConst.h */,
|
||||||
18E7B22426E8CDCF0064BC9B /* XplanFlutterBoostDelegate.h */,
|
18E7B22426E8CDCF0064BC9B /* XplanFlutterBoostDelegate.h */,
|
||||||
18E7B22326E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m */,
|
18E7B22326E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m */,
|
||||||
|
18C17A5B26F338F300C48E11 /* XplanFBFlutterViewContainer.h */,
|
||||||
|
18C17A5C26F338F300C48E11 /* XplanFBFlutterViewContainer.m */,
|
||||||
18E7B28E26EA0E6B0064BC9B /* FlutterBoost+Xplan.h */,
|
18E7B28E26EA0E6B0064BC9B /* FlutterBoost+Xplan.h */,
|
||||||
18E7B28F26EA0E6B0064BC9B /* FlutterBoost+Xplan.m */,
|
18E7B28F26EA0E6B0064BC9B /* FlutterBoost+Xplan.m */,
|
||||||
);
|
);
|
||||||
@@ -897,6 +907,8 @@
|
|||||||
E81C278D26EAFAF60031E639 /* DESEncrypt.m in Sources */,
|
E81C278D26EAFAF60031E639 /* DESEncrypt.m in Sources */,
|
||||||
E81366E726F0A49E0076364C /* NSString+Regex.m in Sources */,
|
E81366E726F0A49E0076364C /* NSString+Regex.m in Sources */,
|
||||||
189DD56526DE465A00AB55B1 /* LoginViewController.m in Sources */,
|
189DD56526DE465A00AB55B1 /* LoginViewController.m in Sources */,
|
||||||
|
18E7B33226F317A20064BC9B /* XPWebViewController.m in Sources */,
|
||||||
|
18C17A5D26F338F300C48E11 /* XplanFBFlutterViewContainer.m in Sources */,
|
||||||
E8B825BF26E9E57D009E8E9F /* LoginTicketInfo.m in Sources */,
|
E8B825BF26E9E57D009E8E9F /* LoginTicketInfo.m in Sources */,
|
||||||
187EEEF026E89FE8002833B2 /* AccountInfoStorage.m in Sources */,
|
187EEEF026E89FE8002833B2 /* AccountInfoStorage.m in Sources */,
|
||||||
E872309326E8D31500B90D4F /* LoginVerifCodeView.m in Sources */,
|
E872309326E8D31500B90D4F /* LoginVerifCodeView.m in Sources */,
|
||||||
|
@@ -21,7 +21,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
||||||
|
if(self.topViewController == viewController) return;
|
||||||
|
if (self.childViewControllers.count > 0) {
|
||||||
|
viewController.hidesBottomBarWhenPushed = YES;
|
||||||
|
}
|
||||||
viewController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
|
viewController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
|
||||||
|
|
||||||
[super pushViewController:viewController animated:animated];
|
[super pushViewController:viewController animated:animated];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
[self.navigationController setNavigationBarHidden:self.isHiddenNavBar animated:animated];
|
[self.navigationController setNavigationBarHidden:self.isHiddenNavBar animated:animated];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
[self themeConfig];
|
[self themeConfig];
|
||||||
|
@@ -16,15 +16,15 @@ UIKIT_EXTERN NSString * const kChannelKey;
|
|||||||
|
|
||||||
|
|
||||||
typedef NS_ENUM(NSUInteger, KeyType) {
|
typedef NS_ENUM(NSUInteger, KeyType) {
|
||||||
KeyType_PasswordEncode,///密码des 加密的
|
KeyType_PasswordEncode,///密码 des 加密的
|
||||||
KeyType_NTESQuickLoginBusinessId,///玩意易盾 快捷登录 id
|
KeyType_NTESQuickLoginBusinessId,///玩意易盾 快捷登录 id
|
||||||
KeyType_QQAppid,///qqde appid
|
KeyType_QQAppid,///qq appid
|
||||||
KeyType_QQSecret, ///QQ的 secret
|
KeyType_QQSecret, ///QQ 的 secret
|
||||||
KeyType_WechatAppid,///微信的appid
|
KeyType_WechatAppid,///微信的 appid
|
||||||
KeyType_WechatSecret,///微信的secret
|
KeyType_WechatSecret,///微信的 secret
|
||||||
};
|
};
|
||||||
|
|
||||||
/// 获取当前项目中所用到的 type 所对应的valu的值 type 类型
|
/// 获取当前项目中所用到的 type 所对应的 value 的值 type 类型
|
||||||
NSString * const KeyWithType(KeyType type);
|
NSString * const KeyWithType(KeyType type);
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
typedef NS_ENUM(NSUInteger, URLType) {
|
typedef NS_ENUM(NSUInteger, URLType) {
|
||||||
kPrivacyURL,///隐私政策
|
kPrivacyURL,///隐私政策
|
||||||
kUserProtocalURL, ///用户协议
|
kUserProtocalURL, ///用户协议
|
||||||
|
kUserInviteFriendURL, ///邀请好友
|
||||||
};
|
};
|
||||||
|
|
||||||
NSString * const URLWithType(URLType type);
|
NSString * const URLWithType(URLType type);
|
||||||
|
@@ -13,7 +13,8 @@ NSString * const URLWithType(URLType type) {
|
|||||||
NSString * prefix = @"yinyou";
|
NSString * prefix = @"yinyou";
|
||||||
NSDictionary * dic = @{
|
NSDictionary * dic = @{
|
||||||
@(kPrivacyURL): @"modules/rule/privacy-wap.html",
|
@(kPrivacyURL): @"modules/rule/privacy-wap.html",
|
||||||
@(kUserProtocalURL) : @"modules/rule/protocol.html"
|
@(kUserProtocalURL) : @"modules/rule/protocol.html",
|
||||||
|
@(kUserInviteFriendURL): @"modules/game/index.html"
|
||||||
|
|
||||||
};
|
};
|
||||||
NSString * url = [dic objectForKey:@(type)];
|
NSString * url = [dic objectForKey:@(type)];
|
||||||
|
17
xplan-ios/Main/Match/XplanFBFlutterViewContainer.h
Normal file
17
xplan-ios/Main/Match/XplanFBFlutterViewContainer.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// XplanFBFlutterViewContainer.h
|
||||||
|
// PlanetStar
|
||||||
|
//
|
||||||
|
// Created by apple on 2021/3/30.
|
||||||
|
// Copyright © 2021 WUJIE INTERACTIVE. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <flutter_boost/FBFlutterViewContainer.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XplanFBFlutterViewContainer : FBFlutterViewContainer
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
22
xplan-ios/Main/Match/XplanFBFlutterViewContainer.m
Normal file
22
xplan-ios/Main/Match/XplanFBFlutterViewContainer.m
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
//
|
||||||
|
// XplanFBFlutterViewContainer.m
|
||||||
|
// PlanetStar
|
||||||
|
//
|
||||||
|
// Created by apple on 2021/3/30.
|
||||||
|
// Copyright © 2021 WUJIE INTERACTIVE. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XplanFBFlutterViewContainer.h"
|
||||||
|
|
||||||
|
@interface XplanFBFlutterViewContainer ()
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XplanFBFlutterViewContainer
|
||||||
|
|
||||||
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
|
[super viewWillAppear:animated];
|
||||||
|
[self.navigationController setNavigationBarHidden:YES animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
@@ -11,6 +11,9 @@
|
|||||||
#import "BaseNavigationController.h"
|
#import "BaseNavigationController.h"
|
||||||
#import "XplanFlutterBoostDelegate.h"
|
#import "XplanFlutterBoostDelegate.h"
|
||||||
#import "XCFlutterKeyConst.h"
|
#import "XCFlutterKeyConst.h"
|
||||||
|
#import "XPWebViewController.h"
|
||||||
|
#import "XPHtmlUrl.h"
|
||||||
|
#import "XplanFBFlutterViewContainer.h"
|
||||||
|
|
||||||
@implementation XplanFlutterBoostDelegate
|
@implementation XplanFlutterBoostDelegate
|
||||||
|
|
||||||
@@ -39,7 +42,7 @@
|
|||||||
|
|
||||||
///原生的页面打开一个flutter页面
|
///原生的页面打开一个flutter页面
|
||||||
- (void)pushFlutterRoute:(NSString *)pageName uniqueId:(NSString *)uniqueId arguments:(NSDictionary *)arguments completion:(void (^)(BOOL))completion {
|
- (void)pushFlutterRoute:(NSString *)pageName uniqueId:(NSString *)uniqueId arguments:(NSDictionary *)arguments completion:(void (^)(BOOL))completion {
|
||||||
FBFlutterViewContainer *vc = FBFlutterViewContainer.new;
|
XplanFBFlutterViewContainer *vc = XplanFBFlutterViewContainer.new;
|
||||||
[vc setName:pageName uniqueId:nil params:arguments];
|
[vc setName:pageName uniqueId:nil params:arguments];
|
||||||
UIViewController *rvc = [XCCurrentVCStackManager shareManager].getCurrentVC;
|
UIViewController *rvc = [XCCurrentVCStackManager shareManager].getCurrentVC;
|
||||||
self.navigationController = rvc.navigationController;
|
self.navigationController = rvc.navigationController;
|
||||||
@@ -75,17 +78,18 @@
|
|||||||
// TTWKWebViewViewController * webVC = [[TTWKWebViewViewController alloc] init];
|
// TTWKWebViewViewController * webVC = [[TTWKWebViewViewController alloc] init];
|
||||||
// webVC.urlString = HtmlUrlKey(kGameBindAccountURL);
|
// webVC.urlString = HtmlUrlKey(kGameBindAccountURL);
|
||||||
// return webVC;
|
// return webVC;
|
||||||
// } else if([pageName isEqualToString:YYFlutterPushNavitePageInvite]){
|
// } else
|
||||||
// TTWKWebViewViewController * webVC = [[TTWKWebViewViewController alloc] init];
|
if([pageName isEqualToString:YYFlutterPushNavitePageInvite]){
|
||||||
// webVC.urlString = HtmlUrlKey(kUserInviteFriendURL);
|
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||||
// return webVC;
|
webVC.url = URLWithType(kUserInviteFriendURL);
|
||||||
// } else if([pageName isEqualToString:YYFlutterPushNavitePageWebview]) {
|
return webVC;
|
||||||
// TTWKWebViewViewController * webVC = [[TTWKWebViewViewController alloc] init];
|
} else if([pageName isEqualToString:YYFlutterPushNavitePageWebview]) {
|
||||||
// webVC.urlString = arguments[@"webviewUrl"];
|
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||||
// return webVC;
|
webVC.url = arguments[@"webviewUrl"];
|
||||||
// } else {
|
return webVC;
|
||||||
|
} else {
|
||||||
return nil;
|
return nil;
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#import "BaseNavigationController.h"
|
#import "BaseNavigationController.h"
|
||||||
#import "LoginBindPhoneViewController.h"
|
#import "LoginBindPhoneViewController.h"
|
||||||
#import "LoginFullInfoViewController.h"
|
#import "LoginFullInfoViewController.h"
|
||||||
|
#import "XplanFBFlutterViewContainer.h"
|
||||||
///Present
|
///Present
|
||||||
#import "MainPresenter.h"
|
#import "MainPresenter.h"
|
||||||
#import "MainProtocol.h"
|
#import "MainProtocol.h"
|
||||||
@@ -110,28 +111,29 @@
|
|||||||
NSArray *selectImageNames = @[@"tab_game_selected", @"tab_mine_selected"];
|
NSArray *selectImageNames = @[@"tab_game_selected", @"tab_mine_selected"];
|
||||||
NSArray *tabLabel = @[@"赛事", @"我的"];
|
NSArray *tabLabel = @[@"赛事", @"我的"];
|
||||||
|
|
||||||
FBFlutterViewContainer *fvcGame = FBFlutterViewContainer.new;
|
XplanFBFlutterViewContainer *fvcGame = XplanFBFlutterViewContainer.new;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
[fvcGame setName:@"debug" uniqueId:nil params:nil];
|
[fvcGame setName:@"debug" uniqueId:nil params:nil];
|
||||||
#else
|
#else
|
||||||
[fvc setName:@"/" uniqueId:nil params:nil];
|
[fvc setName:@"/" uniqueId:nil params:nil];
|
||||||
#endif
|
#endif
|
||||||
[self createTabBarItem:fvcGame title:tabLabel[0] image:normalImageNames[0] selectedImage:selectImageNames[0]];
|
[self addChildViewController:[self createTabBarItem:fvcGame title:tabLabel[0] image:normalImageNames[0] selectedImage:selectImageNames[0]]];
|
||||||
[self addChildViewController:fvcGame];
|
|
||||||
|
|
||||||
BaseViewController *bvcMe = [[BaseViewController alloc] init];
|
BaseViewController *bvcMe = [[BaseViewController alloc] init];
|
||||||
[self createTabBarItem:bvcMe title:tabLabel[1] image:normalImageNames[1] selectedImage:selectImageNames[1]];
|
[self addChildViewController:[self createTabBarItem:bvcMe title:tabLabel[1] image:normalImageNames[1] selectedImage:selectImageNames[1]]];
|
||||||
[self addChildViewController:bvcMe];
|
|
||||||
|
|
||||||
self.selectedIndex = 1;
|
self.selectedIndex = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)createTabBarItem:(UIViewController *)itemVc title:(NSString *)title image:(NSString *)image selectedImage:(NSString *)selectedImage{
|
- (BaseNavigationController *)createTabBarItem:(UIViewController *)itemVc title:(NSString *)title image:(NSString *)image selectedImage:(NSString *)selectedImage{
|
||||||
itemVc.title = title;
|
itemVc.title = title;
|
||||||
itemVc.tabBarItem.image = [[UIImage imageNamed:image] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
itemVc.tabBarItem.image = [[UIImage imageNamed:image] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||||
itemVc.tabBarItem.selectedImage = [[UIImage imageNamed:selectedImage] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
itemVc.tabBarItem.selectedImage = [[UIImage imageNamed:selectedImage] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]} forState:UIControlStateSelected];
|
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]} forState:UIControlStateSelected];
|
||||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor tabbarNormalColor]} forState:UIControlStateNormal];
|
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor tabbarNormalColor]} forState:UIControlStateNormal];
|
||||||
|
|
||||||
|
BaseNavigationController *nav = [[BaseNavigationController alloc] initWithRootViewController:itemVc];
|
||||||
|
return nav;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - 如果不实现的话 如果在main里面请求接口的时候 需要的话 就会导致方法找不到的错误
|
#pragma mark - 如果不实现的话 如果在main里面请求接口的时候 需要的话 就会导致方法找不到的错误
|
||||||
@@ -144,7 +146,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)showLoading {
|
- (void)showLoading {
|
||||||
[XCHUDTool showGIFLoading];
|
[XCHUDTool showLoading];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)hideHUD {
|
- (void)hideHUD {
|
||||||
|
19
xplan-ios/Main/XPWebViewController.h
Normal file
19
xplan-ios/Main/XPWebViewController.h
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// XPWebViewController.h
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by zu on 2021/9/16.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "BaseViewController.h"
|
||||||
|
#import <WebKit/WebKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XPWebViewController : BaseViewController
|
||||||
|
|
||||||
|
@property (copy, nonatomic) NSString *url;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
275
xplan-ios/Main/XPWebViewController.m
Normal file
275
xplan-ios/Main/XPWebViewController.m
Normal file
@@ -0,0 +1,275 @@
|
|||||||
|
//
|
||||||
|
// XPWebViewController.m
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by zu on 2021/9/16.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XPWebViewController.h"
|
||||||
|
#import "AccountInfoStorage.h"
|
||||||
|
#import "ThemeColor.h"
|
||||||
|
#import "ApiHost.h"
|
||||||
|
#import "YYUtility.h"
|
||||||
|
#import "HttpRequestHelper.h"
|
||||||
|
#import <Masonry/Masonry.h>
|
||||||
|
#import <MJExtension/MJExtension.h>
|
||||||
|
|
||||||
|
@interface WeakWebViewScriptMessageDelegate : NSObject<WKScriptMessageHandler>
|
||||||
|
|
||||||
|
//WKScriptMessageHandler 这个协议类专门用来处理JavaScript调用原生OC的方法
|
||||||
|
@property (nonatomic, weak) id<WKScriptMessageHandler> scriptDelegate;
|
||||||
|
|
||||||
|
- (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate;
|
||||||
|
|
||||||
|
@end
|
||||||
|
@implementation WeakWebViewScriptMessageDelegate
|
||||||
|
|
||||||
|
- (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate {
|
||||||
|
self = [super init];
|
||||||
|
if (self) {
|
||||||
|
_scriptDelegate = scriptDelegate;
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
//遵循WKScriptMessageHandler协议,必须实现如下方法,然后把方法向外传递
|
||||||
|
//通过接收JS传出消息的name进行捕捉的回调方法
|
||||||
|
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
|
||||||
|
|
||||||
|
if ([self.scriptDelegate respondsToSelector:@selector(userContentController:didReceiveScriptMessage:)]) {
|
||||||
|
[self.scriptDelegate userContentController:userContentController didReceiveScriptMessage:message];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface XPWebViewController () <WKNavigationDelegate, WKScriptMessageHandler>
|
||||||
|
|
||||||
|
@property (strong, nonatomic) WKWebView *webview;
|
||||||
|
@property (strong, nonatomic) UIProgressView *progressView;
|
||||||
|
@property (nonatomic, strong) WKUserContentController *userContentController;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NSString * const kJSOpenPurse = @"openPurse";
|
||||||
|
NSString * const kJSOpenChargePage = @"openChargePage";
|
||||||
|
NSString * const kJSOpenSharePage = @"openSharePage";
|
||||||
|
NSString * const kJSGetUid = @"getUid";
|
||||||
|
NSString * const kJSGetDeviceId = @"getDeviceId";
|
||||||
|
NSString * const kJSGetTicket = @"getTicket";
|
||||||
|
NSString * const kJSGetDeviceInfo = @"getDeviceInfo";
|
||||||
|
|
||||||
|
@implementation XPWebViewController
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
[self initView];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)initView {
|
||||||
|
if (self.navigationController.viewControllers.count > 1){
|
||||||
|
UIBarButtonItem *leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"common_nav_back"] style:UIBarButtonItemStylePlain target:self action:@selector(backButtonClick)];
|
||||||
|
|
||||||
|
leftBarButtonItem.tintColor = UIColor.whiteColor;
|
||||||
|
|
||||||
|
self.navigationItem.leftBarButtonItem = leftBarButtonItem;
|
||||||
|
}
|
||||||
|
self.automaticallyAdjustsScrollViewInsets = NO;
|
||||||
|
[self.view addSubview:self.webview];
|
||||||
|
[self.webview mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.right.top.bottom.mas_equalTo(self.view);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.view addSubview:self.progressView];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
|
||||||
|
if ([message.name isEqualToString:kJSOpenSharePage]) {
|
||||||
|
[self showSuccessToast:@"打开分享面板,尚未实现"];
|
||||||
|
} else if ([message.name isEqualToString:kJSGetUid]) {
|
||||||
|
NSString *uid = [[AccountInfoStorage instance] getUid];
|
||||||
|
NSString *js = [NSString stringWithFormat:@"getMessage(\"uid\",%@)", uid];
|
||||||
|
[self.webview evaluateJavaScript:js completionHandler:^(id _Nullable other, NSError * _Nullable error) {
|
||||||
|
NSLog(@"%@",error);
|
||||||
|
}];
|
||||||
|
} else if ([message.name isEqualToString:kJSGetTicket]) {
|
||||||
|
NSString *ticket = [[AccountInfoStorage instance] getTicket];
|
||||||
|
NSString *js = [NSString stringWithFormat:@"getMessage(\"ticket\",\"%@\")",ticket];
|
||||||
|
[self.webview evaluateJavaScript:js completionHandler:^(id _Nullable other, NSError * _Nullable error) {
|
||||||
|
NSLog(@"%@",error);
|
||||||
|
}];
|
||||||
|
} else if ([message.name isEqualToString:kJSGetDeviceId]) {
|
||||||
|
NSString *js = [NSString stringWithFormat:@"getMessage(\"deviceId\",\"%@\")",[YYUtility deviceUniqueIdentification]];
|
||||||
|
[self.webview evaluateJavaScript:js completionHandler:^(id _Nullable other, NSError * _Nullable error) {
|
||||||
|
NSLog(@"%@",error);
|
||||||
|
}];
|
||||||
|
} else if ([message.name isEqualToString:kJSGetDeviceInfo]) {
|
||||||
|
NSDictionary *basicParmars = [HttpRequestHelper configBaseParmars:[[NSDictionary alloc] init]];
|
||||||
|
NSString *json = [basicParmars mj_JSONString];
|
||||||
|
NSString *js = [NSString stringWithFormat:@"getMessage(\"deviceInfo\",%@)", json];
|
||||||
|
[self.webview evaluateJavaScript:js completionHandler:^(id _Nullable ohter, NSError * _Nullable error) {
|
||||||
|
NSLog(@"%@", error);
|
||||||
|
}];
|
||||||
|
} else if ([message.name isEqualToString:kJSOpenPurse]) {
|
||||||
|
|
||||||
|
} else if ([message.name isEqualToString:kJSOpenChargePage]) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setUrl:(NSString *)urlString{
|
||||||
|
_url = urlString;
|
||||||
|
if (_url == nil) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (![_url hasPrefix:@"http"] && ![_url hasPrefix:@"https"]){
|
||||||
|
_url = [NSString stringWithFormat:@"%@/%@", API_HOST_URL, _url];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (![_url containsString:@"?"]) {
|
||||||
|
_url = [NSString stringWithFormat:@"%@?platform=%@", _url, [YYUtility appName]];
|
||||||
|
} else {
|
||||||
|
_url = [NSString stringWithFormat:@"%@&platform=%@", _url, [YYUtility appName]];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 去掉 urlString 中的空格。
|
||||||
|
NSString *noSpaceTextUrl = [_url stringByReplacingOccurrencesOfString:@" " withString:@""];
|
||||||
|
|
||||||
|
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:noSpaceTextUrl]];
|
||||||
|
[self.webview loadRequest:request];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)backButtonClick {
|
||||||
|
BOOL canGoBack = YES;
|
||||||
|
if (self.webview.backForwardList.backList.count <= 1) {
|
||||||
|
canGoBack = NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([self.webview canGoBack]) {
|
||||||
|
[self.webview goBack];
|
||||||
|
} else {
|
||||||
|
[self.navigationController popViewControllerAnimated:YES];
|
||||||
|
[self.userContentController removeAllUserScripts];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {
|
||||||
|
if ([keyPath isEqualToString:@"estimatedProgress"]) {
|
||||||
|
self.progressView.progress = self.webview.estimatedProgress;
|
||||||
|
if (self.progressView.progress == 1) {
|
||||||
|
__weak typeof (self)weakSelf = self;
|
||||||
|
[UIView animateWithDuration:0.25f delay:0.3f options:UIViewAnimationOptionCurveEaseOut animations:^{
|
||||||
|
weakSelf.progressView.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
|
||||||
|
} completion:^(BOOL finished) {
|
||||||
|
weakSelf.progressView.hidden = YES;
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
} else if ([keyPath isEqualToString:@"title"]) {
|
||||||
|
if (object == self.webview) {
|
||||||
|
self.navigationItem.title = self.webview.title;
|
||||||
|
}else{
|
||||||
|
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
[self.webview removeObserver:self forKeyPath:@"estimatedProgress"];
|
||||||
|
[self.webview removeObserver:self forKeyPath:@"title"];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (WKWebView *)webview {
|
||||||
|
if (_webview == nil) {
|
||||||
|
WKWebViewConfiguration *configuration = [[WKWebViewConfiguration alloc]init];
|
||||||
|
|
||||||
|
if (@available(iOS 10.0, *)) {
|
||||||
|
configuration.mediaTypesRequiringUserActionForPlayback = NO;
|
||||||
|
} else {
|
||||||
|
// Fallback on earlier versions
|
||||||
|
}
|
||||||
|
configuration.allowsInlineMediaPlayback = YES;
|
||||||
|
|
||||||
|
NSString *uid = [[AccountInfoStorage instance] getUid];
|
||||||
|
NSString *realCookie = [NSString stringWithFormat:@"%@=%@",@"uid",uid];
|
||||||
|
|
||||||
|
WKUserScript *cookieScript = [[WKUserScript alloc] initWithSource: [NSString stringWithFormat:@"document.cookie = '%@';", realCookie] injectionTime:WKUserScriptInjectionTimeAtDocumentStart forMainFrameOnly:NO];
|
||||||
|
[self.userContentController addUserScript:cookieScript];
|
||||||
|
//根据生成的WKUserScript对象,初始化WKWebViewConfiguration
|
||||||
|
configuration.preferences.javaScriptEnabled = YES;
|
||||||
|
configuration.preferences.javaScriptCanOpenWindowsAutomatically = YES;
|
||||||
|
configuration.preferences.minimumFontSize = 10;
|
||||||
|
configuration.selectionGranularity = WKSelectionGranularityCharacter;
|
||||||
|
configuration.userContentController = self.userContentController;
|
||||||
|
|
||||||
|
CGSize size = [UIScreen mainScreen].bounds.size;
|
||||||
|
_webview = [[WKWebView alloc]initWithFrame:CGRectMake(0, 0, size.width,size.height) configuration:configuration];
|
||||||
|
|
||||||
|
_webview.navigationDelegate = self;
|
||||||
|
//添加KVO,WKWebView有一个属性estimatedProgress,就是当前网页加载的进度,所以监听这个属性
|
||||||
|
[_webview addObserver:self forKeyPath:@"estimatedProgress" options:NSKeyValueObservingOptionNew context:nil];
|
||||||
|
//添加KVO,监听title属性
|
||||||
|
[_webview addObserver:self forKeyPath:@"title" options:NSKeyValueObservingOptionNew context:NULL];
|
||||||
|
|
||||||
|
UISwipeGestureRecognizer *swipeGesture = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(backButtonClick)];
|
||||||
|
[_webview addGestureRecognizer:swipeGesture];
|
||||||
|
|
||||||
|
[_webview.scrollView setShowsVerticalScrollIndicator:NO];
|
||||||
|
[_webview.scrollView setShowsHorizontalScrollIndicator:NO];
|
||||||
|
|
||||||
|
//set useragent
|
||||||
|
__weak typeof(self) weakSelf = self;
|
||||||
|
[_webview evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id result, NSError *error) {
|
||||||
|
NSString *userAgent = result;
|
||||||
|
|
||||||
|
if (![userAgent containsString:@"tutuAppIos erbanAppIos"]){
|
||||||
|
NSString *newUserAgent = [userAgent stringByAppendingString:@" tutuAppIos erbanAppIos"];
|
||||||
|
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:newUserAgent, @"UserAgent", nil];
|
||||||
|
[[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];
|
||||||
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
[weakSelf.webview setCustomUserAgent:newUserAgent];
|
||||||
|
}
|
||||||
|
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
|
return _webview;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (UIProgressView *)progressView{
|
||||||
|
if (!_progressView) {
|
||||||
|
_progressView = [[UIProgressView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, 1)];
|
||||||
|
_progressView.progressTintColor = [ThemeColor appMainColor];
|
||||||
|
_progressView.trackTintColor = [UIColor clearColor];
|
||||||
|
_progressView.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
|
||||||
|
}
|
||||||
|
return _progressView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (WKUserContentController *)userContentController{
|
||||||
|
if (!_userContentController) {
|
||||||
|
//自定义的WKScriptMessageHandler 是为了解决内存不释放的问题
|
||||||
|
WeakWebViewScriptMessageDelegate *weakScriptMessageDelegate = [[WeakWebViewScriptMessageDelegate alloc] initWithDelegate:self];
|
||||||
|
_userContentController = [[WKUserContentController alloc] init];
|
||||||
|
// 分享面板
|
||||||
|
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSOpenSharePage];
|
||||||
|
// 钱包页面
|
||||||
|
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSOpenPurse];
|
||||||
|
// 充值页面
|
||||||
|
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSOpenChargePage];
|
||||||
|
// 获取uid
|
||||||
|
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetUid];
|
||||||
|
// 获取设备id
|
||||||
|
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetDeviceId];
|
||||||
|
// 获取Ticket
|
||||||
|
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetTicket];
|
||||||
|
// 获取设备info
|
||||||
|
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetDeviceInfo];
|
||||||
|
|
||||||
|
}
|
||||||
|
return _userContentController;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
Reference in New Issue
Block a user