|
@@ -20,6 +20,7 @@
|
|
@interface AppDelegate ()<JPUSHRegisterDelegate>
|
|
@interface AppDelegate ()<JPUSHRegisterDelegate>
|
|
|
|
|
|
@property(nonatomic, strong)UIImageView *imgView;
|
|
@property(nonatomic, strong)UIImageView *imgView;
|
|
|
|
+@property(nonatomic, assign)BOOL wakeUpBool;
|
|
|
|
|
|
@end
|
|
@end
|
|
|
|
|
|
@@ -34,13 +35,15 @@
|
|
|
|
|
|
|
|
|
|
if (launchOptions) {
|
|
if (launchOptions) {
|
|
-
|
|
|
|
|
|
+ self.wakeUpBool = YES;//唤醒启动
|
|
// 不是空 就是推送点击 否则是图标启动
|
|
// 不是空 就是推送点击 否则是图标启动
|
|
NSDictionary * remoteNotification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; //这个判断是在程序没有运行的情况下收到通知,点击通知跳转页面
|
|
NSDictionary * remoteNotification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; //这个判断是在程序没有运行的情况下收到通知,点击通知跳转页面
|
|
if ([[UIDevice currentDevice].systemVersion floatValue] < 10.0 && remoteNotification) {
|
|
if ([[UIDevice currentDevice].systemVersion floatValue] < 10.0 && remoteNotification) {
|
|
// iOS 10 不必走此方法
|
|
// iOS 10 不必走此方法
|
|
[self clickNotification:remoteNotification];
|
|
[self clickNotification:remoteNotification];
|
|
}
|
|
}
|
|
|
|
+ }else {
|
|
|
|
+ self.wakeUpBool = NO;
|
|
}
|
|
}
|
|
|
|
|
|
return YES;
|
|
return YES;
|
|
@@ -247,13 +250,20 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
|
|
|
|
|
[[LXDataBaseManager shareDataBaseManager] changeCatagoryTypeWithURL:info[@"url"]];
|
|
[[LXDataBaseManager shareDataBaseManager] changeCatagoryTypeWithURL:info[@"url"]];
|
|
|
|
|
|
|
|
+ NSDictionary * infoDic;
|
|
|
|
+ if(self.wakeUpBool) {
|
|
|
|
+ infoDic = @{@"url":info[@"url"],
|
|
|
|
+ @"rectype":@"A",
|
|
|
|
+ @"openid":info[@"openid"],
|
|
|
|
+ };
|
|
|
|
+ }else {
|
|
|
|
+ infoDic = @{@"url":info[@"url"],
|
|
|
|
+ @"rectype":@"C",
|
|
|
|
+ @"openid":info[@"openid"],
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
|
- NSDictionary * infoDic = @{@"url":info[@"url"],
|
|
|
|
- @"rectype":@"C",
|
|
|
|
- @"openid":info[@"openid"],
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
|
|
+ self.wakeUpBool = NO;
|
|
//post请求
|
|
//post请求
|
|
NSLog(@"%@",[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost]);
|
|
NSLog(@"%@",[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost]);
|
|
[[LXNetworkManager shareLXNetworkManager]postWithURLStr:[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost] parameters:infoDic progress:^(NSProgress *progress) {
|
|
[[LXNetworkManager shareLXNetworkManager]postWithURLStr:[NSString stringWithFormat:@"%@jyapp/free/message/receive",kHost] parameters:infoDic progress:^(NSProgress *progress) {
|