点击app系统消息打开app并进入指定页面

简介: 点击app系统消息打开app并进入指定页面

点击app系统消息可以打开app,解析消息,根据消息里的参数可以跳到指定页面。

大家知道,app启动时首先调用需要进一步完善的函数:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions(在AppDelegate.m文件或AppDelegate.mm)。若是点击应用图标打开app,launchOptions为nil。若是点击app的系统消消息,打开app,这个系统消息可以传递参数给该函数,参数是launchOptions。

 NSDictionary* message = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];

通过上面的代码可以获取到字典。

服务器按照第4个透传消息模版推送的消息,其中自定义字段,键是payload,值时对应的一个json字符串。客户端收到的消息,打印日志如下(我们的推送在推送模块AWGeTuiModule里不是在AppDelegate文件里,所以你看到日志文件名是AWGeTuiModule.m):

2018/09/11 17:29:02:329  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule application:didFinishLaunchingWithOptions:]:37 Verbose:didFinishLaunchingWithOptions
2018/09/11 17:29:02:344  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule application:didFinishLaunchingWithOptions:]:45 Verbose:didFinishLaunchingWithOptions  message:{
    "_ge_" = 1;
    "_gmid_" = "OSS-0911_59e9037e052e7333e399614830e701a7:d910d849e38349e8ab2e7278520d8bcb:2c2ea418e66ec33e367fc1a24223fb65";
    "_gurl_" = "sdk.open.extension.getui.com:8123";
    aps =     {
        alert =         {
            body = test;
            title = "\U60a8\U6709\U4e00\U6761\U672a\U8bfb\U6d88\U606f";
        };
        badge = 2;
        "content-available" = 1;
        "mutable-content" = 1;
        sound = default;
    };
    payload = "{\"title\":\"\U60a8\U6709\U4e00\U6761\U672a\U8bfb\U6d88\U606f\",\"body\":\"test\",\"redirectUrl\":\"https://m.1-joy.com/market/gift/agent/manage.htm?catId=14533\"}";
},[message className]:__NSDictionaryI
2018/09/11 17:29:02:345  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule application:didFinishLaunchingWithOptions:]:49 Verbose:payload:{"title":"您有一条未读消息","body":"test","redirectUrl":"https://m.1-joy.com/market/gift/agent/manage.htm?catId=14533"},[payload className]:__NSCFString
2018/09/11 17:29:02:345  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule application:didFinishLaunchingWithOptions:]:53 Verbose:jsondata:<7b227469 746c6522 3a22e682 a8e69c89 e4b880e6 9da1e69c aae8afbb e6b688e6 81af222c 22626f64 79223a22 74657374 222c2272 65646972 65637455 726c223a 22687474 70733a2f 2f6d2e31 2d6a6f79 2e636f6d 2f6d6172 6b65742f 67696674 2f616765 6e742f6d 616e6167 652e6874 6d3f6361 7449643d 31343533 33227d>,[jsondata className]:NSConcreteMutableData
2018/09/11 17:29:02:345  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule application:didFinishLaunchingWithOptions:]:57 Verbose:jsonObject:{
    body = test;
    redirectUrl = "https://m.1-joy.com/manage.htm?catId=14533";
    title = "\U60a8\U6709\U4e00\U6761\U672a\U8bfb\U6d88\U606f";
},[jsonObject className]:__NSDictionaryI,[jsonObject isKindOfClass:[NSDictionary class]]:1, error:(null)
2018/09/11 17:29:02:346  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule application:didFinishLaunchingWithOptions:]:61 Verbose:redirectUrl:https://m.1-joy.com/market/gift/agent/manage.htm?catId=14533,[redirectUrl className]:__NSCFString

可以看到payload对应的是一个Json串,进行解析后,redirectUrl的地址就是登录后所要强制跳转的页面参数。

个推测试网站的测试消息这样填写。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    FLDDLogVerbose(@"didFinishLaunchingWithOptions");
    // [EXT] 重新上线
    [GeTuiSdk startSdkWithAppId:kGeXinAppId appKey:kGeXinAppKey appSecret:kGeXinAppSecret delegate:self];
    // 注册 APNs
    [self registerRemoteNotification];
    // [2-EXT]: 获取启动时收到的APN
    NSDictionary* message = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
    
    FLDDLogVerbose(@"didFinishLaunchingWithOptions  message:%@,[message className]:%@", message, [message className]);
    if (message) {
//        [AWSingleObject sharedInstance].redirectUrl = @"https://m.1-joy.com/market/cat/list.htm";
        NSString *payload = [message objectForKey:@"payload"];
        FLDDLogVerbose(@"payload:%@,[payload className]:%@", payload, [payload className]);
        if(payload)
        {
            self.payloadFlag = YES;
            NSData* jsondata = [payload dataUsingEncoding:NSUTF8StringEncoding];
            FLDDLogVerbose(@"jsondata:%@,[jsondata className]:%@", jsondata, [jsondata className]);
            NSError *error = nil;
            id jsonObject = [NSJSONSerialization JSONObjectWithData:jsondata options:NSJSONReadingAllowFragments error:&error];
            
            FLDDLogVerbose(@"jsonObject:%@,[jsonObject className]:%@,[jsonObject isKindOfClass:[NSDictionary class]]:%d, error:%@", jsonObject ,[jsonObject className], [jsonObject isKindOfClass:[NSDictionary class]], error);
            if(!error && jsonObject && [jsonObject isKindOfClass:[NSDictionary class]])
            {
                NSString *redirectUrl = [jsonObject safeObjectForKey:@"redirectUrl"];
                FLDDLogVerbose(@"redirectUrl:%@,[redirectUrl className]:%@", redirectUrl, [redirectUrl className]);
                if(redirectUrl)
                {
                    [AWSingleObject sharedInstance].redirectUrl = redirectUrl;
//                    [[NSNotificationCenter defaultCenter] postNotificationName:@"redirectLoginNotification" object:nil userInfo:@{@"redirectUrl":@"http://getui.com\\"}];
                }
            }
        }
//        NSString *record = [NSString stringWithFormat:@"[APN]%@, %@", [NSDate date], payload];
        
        //如何跳转页面自己添加代码
        //
        //        self.window.rootViewController = self.viewController;
    }
    
    self.isLaunch = YES;
    return YES;
}

消息解析向上面一样。大姐姐,我试验失败的方案是发送通知,让那个根页面自己调用点击登录按钮事件来实现自动登录并传递参数。经过测试是失败方案。原始是:通知的注册与接收是需要时间的,应该受一个系统线程管理,他做不到立即注册,立即能收到消息,这两者之间有时间差。在个推模块或AppDelegate文件的- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions函数中直接设置根目录页面,这和我们的模块化开发相违背。

我们的处理是,调整模块的加载顺序(由modules.plist里的各个成员的顺序决定),保证组件管理模块首先启动,其次加载框架与日志模块,然后加载个推模块, 加载框架类组件(AWUISkeleton,根目录或tabbar),最后加载登录模块。把个推模块获取的到redirectUrl存入单例对象的变量(单例的生成是可以忽略时间的)中。在设置根页面(登录页面)时,把单例变量赋值给登录页面的成员变量。在AWLoginViewController的viewDidLoad中通过 self.loginView.redirectUrl = _redirectUrl;设置变量,AWLoginView类中重置-(void)setRedirectUrl:(NSString *)redirectUrl函数。通过self.loginPanel.redirectUrl = self.redirectUrl;设置变量,AWLoginPanel类中重置-(void)setRedirectUrl:(NSString *)redirectUrl函数,并调用登录按钮函数。那为何AWLoginViewController不重置-(void)setRedirectUrl:(NSString *)redirectUrl函数呢?因为通常AWLoginViewController在创建成功,并不是立即加载页面控件,而是在回调viewDidLoad函数时加载页面控件,这个函数回调是有时间差的,而-(void)setRedirectUrl:(NSString *)redirectUrl是立即生效的,无时间差的。调用AWLoginView *loginView = [[AWLoginView alloc]init];那么AWLoginView的初始化函数init立即执行,立即创建了页面控件,所以可以用采用重置-(void)setRedirectUrl:(NSString *)redirectUrl函数来实现跳转参数的传递与处理。相关部分代码如下:

AWUISkeleton.m文件

#import "AWLoginViewController.h"

@interface AWUISkeleton ()

@end

@implementation AWUISkeleton

+ (AWUISkeleton *)sharedInstance
{
    static AWUISkeleton *instance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [[AWUISkeleton alloc] init];
    });
    return instance;
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    FLDDLogVerbose(@"didFinishLaunchingWithOptions");
//    self.tabBarController = [[UXTabBarController alloc] initWithViewControllers:@[[[AWHomeTitlesViewController alloc] init], [[AWArtClassificationViewController alloc] init], [[AWFindViewController alloc] init], [[AWMineViewController alloc] init]]];
//    self.tabBarController.uxTabBarControllerDelegate = self;
    AWLoginViewController *loginViewController = [[AWLoginViewController alloc] init];
    if(!isEmptyString([AWSingleObject sharedInstance].redirectUrl))
    {
        loginViewController.redirectUrl = [AWSingleObject sharedInstance].redirectUrl;
    }
    YXNavigationController *navigationController = [[YXNavigationController alloc] initWithRootViewController:loginViewController];
    navigationController.navigationBar.hidden = YES;
    navigationController.navigationBarHidden = YES;
    if ([UIApplication sharedApplication].delegate.window == nil) {
        [UIApplication sharedApplication].delegate.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
        [UIApplication sharedApplication].delegate.window.backgroundColor = [UIColor blackColor];
    }
    [UIApplication sharedApplication].delegate.window.rootViewController = navigationController;
    [[UIApplication sharedApplication].delegate.window makeKeyAndVisible];

    [[NSNotificationCenter defaultCenter] postNotificationName:skeletonDidFinishLaunchNotification object:self userInfo:launchOptions];
    return YES;
}

@end

AWLoginViewController.m文件

- (void)viewDidLoad {
    [super viewDidLoad];
    AWLoginView *loginView = [[AWLoginView alloc]init];
    [self.view addSubview:loginView];
#if AGENT_APP
    loginView.frame = CGRectMake(0, 0, kUIScreenWidth, kUIScreenHeight);
#else
    loginView.frame = CGRectMake(0, kMainStatusBarHeight, kUIScreenWidth, kUIScreenHeight - kMainStatusBarHeight);
#endif
    self.loginView = loginView;
    self.loginView.redirectUrl = _redirectUrl;
    FLDDLogVerbose(@"redirectUrl:%@", _redirectUrl);
}

AWLoginView.m文件

-(void)setRedirectUrl:(NSString *)redirectUrl
{
    _redirectUrl = redirectUrl;
    if(!isEmptyString(self.redirectUrl))
    {
        self.loginPanel.isRedirectLoginFlag = YES;
    }
    self.loginPanel.redirectUrl = self.redirectUrl;
    FLDDLogVerbose(@"redirectUrl:%@", self.loginPanel.redirectUrl);
}

AWLoginPanel.m文件

-(void)setRedirectUrl:(NSString *)redirectUrl
{
    _redirectUrl = redirectUrl;
    FLDDLogVerbose(@"redirectUrl:%@, self.isRedirectLoginFlag:%d", self.redirectUrl, self.isRedirectLoginFlag);
    if(self.isRedirectLoginFlag && !isEmptyString(self.redirectUrl))
    {
        [self login:self.weChatLoginButton];
    }
}

-(void)login:(UIButton *)button{
    FLDDLogVerbose(@"self.isRedirectLoginFlag:%d, self.redirectUrl:%@",self.isRedirectLoginFlag, self.redirectUrl);
    if(self.isNotSelectAgreement)
    {
        [[AWNoticeView currentNotice] showErrorNotice:[NSString stringWithFormat:@"请先%@", kAgreeServiceAgreement]];
        return;
    }
    if(!(self.isLargerCurrentVersion) || self.isRedirectLoginFlag)
    {
        if ([WXApi isWXAppInstalled]) {
            if(self.isRedirectLoginFlag)
            {
                self.isRedirectLoginingFlag = YES;
            }
            self.isRedirectLoginFlag = NO;
            SendAuthReq *req = [[SendAuthReq alloc]init];
            req.scope = @"snsapi_userinfo";
            NSLog(@"kWeChatKey:%@", kWeChatKey);
            req.openID = kWeChatKey;
            req.state = @"1245";
            [WXApi sendReq:req];
        }else{
            self.isRedirectLoginingFlag = NO;
            self.isRedirectLoginFlag = NO;
            //把微信登录的按钮隐藏掉。
            [[AWNoticeView currentNotice] showErrorNotice:@"您没有安装微信客户端"];
        }
    }
    else
    {
        //app 消息推送 点击跳转 到 具体功能页面 参数 redirectUrl
        [MGJRouter openURL:@"gb://passwordLogin" completion:nil];
    }
}

#pragma mark 微信登录回调。
-(void)loginSuccessByCode
{
    self.appdelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    @weakify(self);
    self.appdelegate.loginSuccessByCodeBlock = ^(BaseResp *resp) {
        @strongify(self);
        /*
         enum  WXErrCode {
         WXSuccess           = 0,    成功
         WXErrCodeCommon     = -1,  普通错误类型
         WXErrCodeUserCancel = -2,    用户点击取消并返回
         WXErrCodeSentFail   = -3,   发送失败
         WXErrCodeAuthDeny   = -4,    授权失败
         WXErrCodeUnsupport  = -5,   微信不支持
         };
         */
        if ([resp isKindOfClass:[SendAuthResp class]]) {   //授权登录的类。
            if (resp.errCode == 0) {  //成功。
                //这里处理回调的方法 。 通过代理吧对应的登录消息传送过去。
                SendAuthResp *resp2 = (SendAuthResp *)resp;
                if(!isEmptyString(resp2.code))
                {
                    FLDDLogVerbose(@"code %@",resp2.code);
                    [AWSingleObject sharedInstance].wetChatCode = resp2.code;
//                    self.redirectUrl = @"https://m.1-joy.com/market/gift/agent/manage.htm?catId=14533";
                    NSString *urlString = [NSString stringWithFormat:@"https://m.1-joy.com/redirect.htm?code=%@&appId=%@",resp2.code, kWeChatKey];
                    if(self.isRedirectLoginingFlag && !isEmptyString(urlString))
                    {
                        urlString = [NSString stringWithFormat:@"%@&redirectUrl=%@", urlString, self.redirectUrl];
                    }
                    FLDDLogVerbose(@"urlString:%@", urlString);
                    NSMutableDictionary *userInfo = [AWJsWebEntity creatWithUrl:urlString];
                    [MGJRouter openURL:@"gb://WKWeb" withUserInfo:userInfo completion:nil];
                }
                self.isRedirectLoginingFlag = NO;
            }
            else if (resp.errCode != -2){ //失败
                FLDDLogVerbose(@"error %@",resp.errStr);
                self.isRedirectLoginingFlag = NO;
                [[AWNoticeView currentNotice] showErrorNotice:noWetChatMessage];
            }
        }
    };
}

下面是页面跳转时的部分日志:

2018/09/11 17:29:02:346  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule application:didFinishLaunchingWithOptions:]:61 Verbose:redirectUrl:https://m.1-joy.com/manage.htm?catId=14533,[redirectUrl className]:__NSCFString
2018/09/11 17:29:02:346  AWUISkeleton.m:AWUISkeleton.m:-[AWUISkeleton application:didFinishLaunchingWithOptions:]:39 Verbose:didFinishLaunchingWithOptions
2018/09/11 17:29:02:616  AWLoginViewController.m:AWLoginViewController.m:-[AWLoginViewController viewDidLoad]:36 Verbose:page
2018/09/11 17:29:02:640  AWLoginPane.m:AWLoginPanel.m:-[AWLoginPanel setRedirectUrl:]:179 Verbose:redirectUrl:https://m.1-joy.com/manage.htm?catId=14533, self.isRedirectLoginFlag:1
2018/09/11 17:29:02:640  AWLoginPane.m:AWLoginPanel.m:-[AWLoginPanel login:]:317 Verbose:self.isRedirectLoginFlag:1, self.redirectUrl:https://m.1-joy.com/manage.htm?catId=14533
2018/09/11 17:29:02:717  AWLoginView.m:AWLoginView.m:-[AWLoginView setRedirectUrl:]:194 Verbose:redirectUrl:https://m.1-joy.com/manage.htm?catId=14533
2018/09/11 17:29:02:717  AWLoginViewController.m:AWLoginViewController.m:-[AWLoginViewController viewDidLoad]:48 Verbose:redirectUrl:https://m.1-joy.com/manage.htm?catId=14533
2018/09/11 17:29:03:181  AWBizModule.m:AWBizModule.m:-[AWBizModule monitoringNetworkStatus]_block_invoke:187 Verbose:status:2
2018/09/11 17:29:03:181  AWBizModule.m:AWBizModule.m:-[AWBizModule monitoringNetworkStatus]_block_invoke:189 Verbose:networkStatus:2
2018/09/11 17:29:03:288  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule GeTuiSDkDidNotifySdkState:]:281 Debug:aStatus:0
2018/09/11 17:29:03:294  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule application:didRegisterForRemoteNotificationsWithDeviceToken:]:131 Debug:
>>>[DeviceToken Success]:2d8f670a8a3213768b98c9685713bf7f4900829fec3d977a3303d2fbdc638046

 kGeXinAppId:pQBQPh84rgAEnXRP9xR4Q4
2018/09/11 17:29:03:295  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule application:didRegisterForRemoteNotificationsWithDeviceToken:]:141 Debug:函数 clientId:2c2ea418e66ec33e367fc1a24223fb65
2018/09/11 17:29:03:974  AWUpdateVersionModel.m:AWUpdateVersionModel.m:-[AWUpdateVersionModel setupRACCommand]_block_invoke_3:91 Verbose:data:{
    appCode = agent;
    appId = 4;
    appName = "\U827a\U4eab\U4f18\U9009";
    remark = "";
    type = ios;
    update = N;
    version = "1.0.0";
}
2018/09/11 17:29:03:975  AWBizModule.m:AWBizModule.m:-[AWBizModule forceUpdte]_block_invoke:361 Verbose:resultUpdateVersionEntity:<AWUpdateVersionEntity: 0x13de73980>
2018/09/11 17:29:04:169  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule GeTuiSDkDidNotifySdkState:]:281 Debug:aStatus:2
2018/09/11 17:29:04:495  AWLoginPane.m:AWLoginPanel.m:-[AWLoginPanel loginSuccessByCode]_block_invoke:377 Verbose:code 01185ZtO1Ck1b21e0juO1WJTtO185ZtP
2018/09/11 17:29:04:495  AWLoginPane.m:AWLoginPanel.m:-[AWLoginPanel loginSuccessByCode]_block_invoke:385 Verbose:urlString:https://m.1-joy.com/redirect.htm?code=01185ZtO1Ck1b21e0juO1WJTtO185ZtP&appId=wxbfa2c5c227490fca&redirectUrl=https://m.1-joy.com/manage.htm?catId=14533
2018/09/11 17:29:04:999  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController handleUIApplicationWillChangeStatusBarFrameNotification:]:275 Debug:函数
2018/09/11 17:29:05:944  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController webView:decidePolicyForNavigationAction:decisionHandler:]:854 Verbose:isHaveTelLoginPage:0, strRequest:https://m.1-joy.com/redirect.htm?code=01185ZtO1Ck1b21e0juO1WJTtO185ZtP&appId=wxbfa2c5c227490fca&redirectUrl=https://m.1-joy.com/manage.htm?catId=14533, navigationAction.request.HTTPMethod:GET, navigationAction.request.allHTTPHeaderFields:{
    Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
    "User-Agent" = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15G77";
}
2018/09/11 17:29:05:945  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController updateNavigationItems:]:766 Verbose:current url:https://m.1-joy.com/redirect.htm?code=01185ZtO1Ck1b21e0juO1WJTtO185ZtP&appId=wxbfa2c5c227490fca&redirectUrl=https://m.1-joy.com/manage.htm?catId=14533
2018/09/11 17:29:05:954  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule GeTuiSDkDidNotifySdkState:]:281 Debug:aStatus:1
2018/09/11 17:29:05:955  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule GeTuiSdkDidRegisterClient:]:254 Debug:函数 clientId:2c2ea418e66ec33e367fc1a24223fb65
2018/09/11 17:29:06:366  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController updateNavigationItems:]:766 Verbose:current url:https://m.1-joy.com/cat/list.htm
2018/09/11 17:29:06:369  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController webView:decidePolicyForNavigationAction:decisionHandler:]:854 Verbose:isHaveTelLoginPage:0, strRequest:https://m.1-joy.com/cat/list.htm, navigationAction.request.HTTPMethod:GET, navigationAction.request.allHTTPHeaderFields:{
    Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
    "Accept-Encoding" = "br, gzip, deflate";
    "Accept-Language" = "zh-cn";
    "User-Agent" = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15G77";
}
2018/09/11 17:29:06:369  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController updateNavigationItems:]:766 Verbose:current url:https://m.1-joy.com/cat/list.htm
2018/09/11 17:29:07:878  AWWKWebWeipaiJSBridgeModel.m:AWWKWebWeipaiJSBridgeModel.m:-[AWWKWebWeipaiJSBridgeModel processWeipaiJSBridgeMessage:]:133 Verbose:<AWMenuItemsEntity: 0x13fe24f50>
2018/09/11 17:29:11:986  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController webView:didFinishNavigation:]:778 Verbose:isHaveTelLoginPage:0, webView.URL strRequest:https://m.1-joy.com/cat/list.htm
2018/09/11 17:29:11:987  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController updateNavigationItems:]:766 Verbose:current url:https://m.1-joy.com/cat/list.htm
2018/09/11 17:29:12:079  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController webView:decidePolicyForNavigationAction:decisionHandler:]:854 Verbose:isHaveTelLoginPage:0, strRequest:https://m.1-joy.com/manage.htm?catId=14533, navigationAction.request.HTTPMethod:GET, navigationAction.request.allHTTPHeaderFields:{
    Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
    Referer = "https://m.1-joy.com/cat/list.htm";
    "User-Agent" = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15G77Yixiangweipai/1.0.0";
}
2018/09/11 17:29:12:079  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController updateNavigationItems:]:766 Verbose:current url:https://m.1-joy.com/cat/list.htm
2018/09/11 17:29:12:125  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController updateNavigationItems:]:766 Verbose:current url:https://m.1-joy.com/manage.htm?catId=14533
2018/09/11 17:29:12:954  AWWKWebWeipaiJSBridgeModel.m:AWWKWebWeipaiJSBridgeModel.m:-[AWWKWebWeipaiJSBridgeModel processWeipaiJSBridgeMessage:]:133 Verbose:<AWMenuItemsEntity: 0x13ded7fc0>
2018/09/11 17:29:14:318  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController webView:didFinishNavigation:]:778 Verbose:isHaveTelLoginPage:0, webView.URL strRequest:https://m.1-joy.com/manage.htm?catId=14533
2018/09/11 17:29:14:318  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController updateNavigationItems:]:766 Verbose:current url:https://m.1-joy.com/manage.htm?catId=14533
2018/09/11 17:34:03:433  AWWKWebViewController.m:AWWKWebViewController.m:-[AWWKWebViewController updateNavigationItems:]:766 Verbose:current url:https://m.1-joy.com/manage.htm?catId=14533#!/https://m.1-joy.com/detail2.htm?giftId=7656
2018/09/11 17:34:13:227  AWGeTuiModule.m:AWGeTuiModule.m:-[AWGeTuiModule GeTuiSDkDidNotifySdkState:]:281 Debug:aStatus:2

相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
目录
相关文章
|
30天前
|
移动开发 JavaScript 前端开发
如何识别app中的页面是否是js(h5)页面
如何识别app中的页面是否是js(h5)页面
31 2
|
5天前
|
安全 JavaScript 前端开发
kotlin开发安卓app,JetPack Compose框架,给webview新增一个按钮,点击刷新网页
在Kotlin中开发Android应用,使用Jetpack Compose框架时,可以通过添加一个按钮到TopAppBar来实现WebView页面的刷新功能。按钮位于右上角,点击后调用`webViewState?.reload()`来刷新网页内容。以下是代码摘要:
|
1月前
|
移动开发 监控 供应链
JAVA智慧工厂制造生产管理MES系统,全套源码,多端展示(app、小程序、H5、台后管理端)
一开始接触MES系统,很多人会和博主一样,对MES细节的应用不了解,这样很正常,因为MES系统相对于其他系统来讲应用比较多!
40 1
JAVA智慧工厂制造生产管理MES系统,全套源码,多端展示(app、小程序、H5、台后管理端)
|
2天前
|
人工智能 搜索推荐 机器人
开发者选择:全面对比导购APP、淘宝客机器人与淘客系统
开发者选择:全面对比导购APP、淘宝客机器人与淘客系统
|
29天前
|
移动开发 网络协议 安全
HTML5页面被运营商DNS问题及解决方案,app中h5页面源码的获取
HTML5页面被运营商DNS问题及解决方案,app中h5页面源码的获取
85 4
|
29天前
如何解决iOS16系统app首次启动总是弹出允许粘贴提示框问题
如何解决iOS16系统app首次启动总是弹出允许粘贴提示框问题
32 0
如何解决iOS16系统app首次启动总是弹出允许粘贴提示框问题
|
1月前
|
定位技术
如何让app多个页面只用一个地图实例
如何让app多个页面只用一个地图实例
13 0
|
1月前
|
编译器 程序员 iOS开发
APP页面的三种基本实现方式:storyboard,xib,代码实现 与自动布局
APP页面的三种基本实现方式:storyboard,xib,代码实现 与自动布局
19 0
|
1月前
|
移动开发 JavaScript 前端开发
APP的HTML5页面经过运营商网络被植入手机管家问题及分析,解决方案见新文章
APP的HTML5页面经过运营商网络被植入手机管家问题及分析,解决方案见新文章
24 0

热门文章

最新文章