天天看點

點選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的位址就是登入後所要強制跳轉的頁面參數。

點選app系統消息打開app并進入指定頁面
點選app系統消息打開app并進入指定頁面

個推測試網站的測試消息這樣填寫。

- (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函數中直接設定根目錄頁面,這和我們的子產品化開發相違背。

點選app系統消息打開app并進入指定頁面

我們的處理是,調整子產品的加載順序(由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);
}      
-(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
      

繼續閱讀