更换阿里推送,消息页面,以及部分bug修复

This commit is contained in:
wbzhan 2019-06-15 17:44:25 +08:00
parent 1ff1ff84b1
commit 5a10dfa182
13 changed files with 97 additions and 98 deletions

View File

@ -40,6 +40,8 @@
+(NSString*)getAppVersion; +(NSString*)getAppVersion;
@property (strong, nonatomic) NSString *token; @property (strong, nonatomic) NSString *token;
@property (strong, nonatomic) NSDictionary* remoteNotification;//如果是点击通知打开的app则json有数据
//摄像头处于后台 //摄像头处于后台
@property (nonatomic) BOOL isGoBack; @property (nonatomic) BOOL isGoBack;
//设备处于后台 //设备处于后台

View File

@ -186,9 +186,10 @@
NSLog(@"\n ====== launchOptions: %@",launchOptions); NSLog(@"\n ====== launchOptions: %@",launchOptions);
NSDictionary *pushNotificationKey = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; NSDictionary *pushNotificationKey = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (pushNotificationKey) { if (pushNotificationKey) {
self.remoteNotification = pushNotificationKey;
// //
// BadgeNum (icon) // BadgeNum (icon)
// [UIApplication sharedApplication].applicationIconBadgeNumber = 10; //[UIApplication sharedApplication].applicationIconBadgeNumber = 10;
} }
} }
/** /**
@ -206,16 +207,6 @@
*/ */
// islaunchedByNotification userInfo // islaunchedByNotification userInfo
NSDictionary* remoteNotification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
NSLog(@"%@",remoteNotification);
if (remoteNotification) {
_islaunchedByNotification=YES;
launchedByNotification = YES;
}else{
_islaunchedByNotification=NO;
launchedByNotification = NO;
}
/** /**
* TalkingData * TalkingData
@ -270,7 +261,7 @@
// 5autoSizeScaleX=1autoSizeScaleY=1 // 5autoSizeScaleX=1autoSizeScaleY=1
// 6autoSizeScaleX=1.171875autoSizeScaleY=1.17429577 // 6autoSizeScaleX=1.171875autoSizeScaleY=1.17429577
// 6PlusautoSizeScaleX=1.29375autoSizeScaleY=1.2957 // 6PlusautoSizeScaleX=1.29375autoSizeScaleY=1.2957
AppDelegate*laoutDelegate=(AppDelegate*)[[UIApplication sharedApplication]delegate]; AppDelegate*laoutDelegate=(AppDelegate*)[[UIApplication sharedApplication]delegate];
if (kScreenSize.height>480) { if (kScreenSize.height>480) {
laoutDelegate.autoSizeScaleX=kScreenSize.width/320; laoutDelegate.autoSizeScaleX=kScreenSize.width/320;
laoutDelegate.autoSizeScaleY=kScreenSize.height/568; laoutDelegate.autoSizeScaleY=kScreenSize.height/568;
@ -290,13 +281,6 @@ if (kScreenSize.height>480) {
firstLogIn=NO; firstLogIn=NO;
[self loginAnimated:application]; [self loginAnimated:application];
//
// dispatch_async(dispatch_get_main_queue(), ^{
// if (_islaunchedByNotification==NO) {
// [self testCurrenVersion];
// }
// });
}else{ }else{

View File

@ -8,6 +8,7 @@
#import "AppDelegate+AliPushConfig.h" #import "AppDelegate+AliPushConfig.h"
#import <objc/runtime.h> #import <objc/runtime.h>
#import "IfishMessageViewController.h"
static const void *NotificationCenterKey = &NotificationCenterKey; static const void *NotificationCenterKey = &NotificationCenterKey;
@implementation AppDelegate (AliPushConfig) @implementation AppDelegate (AliPushConfig)
- (UNUserNotificationCenter *)notificationCenter { - (UNUserNotificationCenter *)notificationCenter {
@ -255,8 +256,18 @@ static const void *NotificationCenterKey = &NotificationCenterKey;
NSString *body = [[NSString alloc] initWithData:message.body encoding:NSUTF8StringEncoding]; NSString *body = [[NSString alloc] initWithData:message.body encoding:NSUTF8StringEncoding];
NSLog(@"\n ====== Receive message title: %@, content: %@.", title, body); NSLog(@"\n ====== Receive message title: %@, content: %@.", title, body);
NSLog(@"\n ====== 当前线程 %@",[NSThread currentThread]); NSLog(@"\n ====== 当前线程 %@",[NSThread currentThread]);
[CommonUtils showAlerWithTitle:IsEmptyStr(title)?@"新消息":title withMsg:body]; // [CommonUtils showAlerWithTitle:IsEmptyStr(title)?@"新消息":title withMsg:body];
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:IsEmptyStr(title)?@"新消息":title message:body preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *alertAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
//
IfishMessageViewController *message = [[IfishMessageViewController alloc]init];
UIViewController *vc= (UINavigationController *)[CommonUtils appRootViewController];
vc.hidesBottomBarWhenPushed = YES;
[vc.navigationController pushViewController:message animated:YES];
vc.hidesBottomBarWhenPushed = NO;
}];
[alertController addAction:alertAction];
[[CommonUtils appRootViewController] presentViewController:alertController animated:YES completion:nil];
} }
#pragma mark () #pragma mark ()
@ -284,28 +295,16 @@ static const void *NotificationCenterKey = &NotificationCenterKey;
NSString *userAction = response.actionIdentifier; NSString *userAction = response.actionIdentifier;
// app // appapp
if ([userAction isEqualToString:UNNotificationDefaultActionIdentifier]) { if ([userAction isEqualToString:UNNotificationDefaultActionIdentifier]) {
NSLog(@"\n ====== User opened the notification."); NSLog(@"\n ====== User opened the notification.");
// iOS 10 // iOS 10
[self handleiOS10Notification:response.notification]; [self handleiOS10Notification:response.notification isActive:NO];
} }
// dismisscategory UNNotificationCategoryOptionCustomDismissAction // dismisscategory UNNotificationCategoryOptionCustomDismissAction
if ([userAction isEqualToString:UNNotificationDismissActionIdentifier]) { if ([userAction isEqualToString:UNNotificationDismissActionIdentifier]) {
NSLog(@"\n ====== User dismissed the notification."); NSLog(@"\n ====== User dismissed the notification.");
} }
// NSString *customAction1 = @"action1";
// NSString *customAction2 = @"action2";
//
// // Action1
// if ([userAction isEqualToString:customAction1]) {
// NSLog(@"User custom action1.");
// }
//
// // Action2
// if ([userAction isEqualToString:customAction2]) {
// NSLog(@"User custom action2.");
// }
completionHandler(); completionHandler();
} }
/** /**
@ -318,7 +317,7 @@ static const void *NotificationCenterKey = &NotificationCenterKey;
NSLog(@"\n ====== App 处于前台时收到通知 (iOS 10+ )"); NSLog(@"\n ====== App 处于前台时收到通知 (iOS 10+ )");
// iOS 10 // iOS 10
[self handleiOS10Notification:notification]; [self handleiOS10Notification:notification isActive:YES];
/* /*
completionHandler completionHandler
@ -345,7 +344,7 @@ static const void *NotificationCenterKey = &NotificationCenterKey;
/** /**
* App (iOS 10+ ) * App (iOS 10+ )
*/ */
- (void)handleiOS10Notification:(UNNotification *)notification { - (void)handleiOS10Notification:(UNNotification *)notification isActive:(BOOL)isActive{
UNNotificationRequest *request = notification.request; UNNotificationRequest *request = notification.request;
UNNotificationContent *content = request.content; UNNotificationContent *content = request.content;
@ -370,9 +369,29 @@ static const void *NotificationCenterKey = &NotificationCenterKey;
// //
[CloudPushSDK sendNotificationAck:userInfo]; [CloudPushSDK sendNotificationAck:userInfo];
//App
NSLog(@"\n ====== App 处于前台时收到通知 (iOS 10+ ) Notification, == date: %@, == title: %@, == subtitle: %@, == body: %@, == badge: %d, == extras: %@.", noticeDate, title, subtitle, body, badge, extras); if (isActive) {
[CommonUtils showAlerWithTitle:IsEmptyStr(title)?@"新通知":title withMsg:body]; NSLog(@"\n ====== App 处于前台时收到通知 (iOS 10+ ) Notification, == date: %@, == title: %@, == subtitle: %@, == body: %@, == badge: %d, == extras: %@.", noticeDate, title, subtitle, body, badge, extras);
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:IsEmptyStr(title)?@"新通知":title message:body preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *alertAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
//
IfishMessageViewController *message = [[IfishMessageViewController alloc]init];
UIViewController *vc= (UINavigationController *)[CommonUtils appRootViewController];
vc.hidesBottomBarWhenPushed = YES;
[vc.navigationController pushViewController:message animated:YES];
vc.hidesBottomBarWhenPushed = NO;
}];
[alertController addAction:alertAction];
[[CommonUtils appRootViewController] presentViewController:alertController animated:YES completion:nil];
}else{
NSLog(@"\n ====== App 处于后台时收到通知 (iOS 10+ ) Notification点击通知打开应用, == date: %@, == title: %@, == subtitle: %@, == body: %@, == badge: %d, == extras: %@.", noticeDate, title, subtitle, body, badge, extras);
//
IfishMessageViewController *message = [[IfishMessageViewController alloc]init];
UIViewController *vc= (UINavigationController *)[CommonUtils appRootViewController];
vc.hidesBottomBarWhenPushed = YES;
[vc.navigationController pushViewController:message animated:YES];
vc.hidesBottomBarWhenPushed = NO;
}
} }
@ -417,14 +436,12 @@ static const void *NotificationCenterKey = &NotificationCenterKey;
*/ */
} else if (application.applicationState == UIApplicationStateInactive) { } else if (application.applicationState == UIApplicationStateInactive) {
// // // //app
// for (NSString *tfStr in userInfo) { // IfishMessageViewController *message = [[IfishMessageViewController alloc]init];
// if ([tfStr isEqualToString:@"careline"]) { // UIViewController *vc= (UINavigationController *)[CommonUtils appRootViewController];
// JumpViewController *_viewController = [[JumpViewController alloc]init]; // vc.hidesBottomBarWhenPushed = YES;
// UINavigationController *nav= (UINavigationController *)self.window.rootViewController; // [vc.navigationController pushViewController:message animated:YES];
// [nav pushViewController:_viewController animated:YES]; // vc.hidesBottomBarWhenPushed = NO;
// }
// }
} }
} }

View File

@ -529,6 +529,12 @@ CGAffineTransform GetCGAffineTransformRotateAroundPoint(float centerX, float ce
while (topVC.presentedViewController) { while (topVC.presentedViewController) {
topVC = topVC.presentedViewController; topVC = topVC.presentedViewController;
} }
if ([topVC isKindOfClass:[UITabBarController class]]) {
topVC = [(UITabBarController *)topVC selectedViewController];
}
if ([topVC isKindOfClass:[UINavigationController class]]) {
topVC = [(UINavigationController *)topVC topViewController];
}
return topVC; return topVC;
} }
+(void)showAlerWithTitle:(NSString*)title withMsg:(NSString*)msg{ +(void)showAlerWithTitle:(NSString*)title withMsg:(NSString*)msg{

View File

@ -70,7 +70,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>9.8.5</string> <string>9.8.8</string>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>
<false/> <false/>
<key>LSApplicationCategoryType</key> <key>LSApplicationCategoryType</key>
@ -379,11 +379,9 @@
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string>为获取爱鱼奇智能硬件产品及用户的地址区域分布,以提供更好的特色服务,爱鱼奇将获取您的地址</string> <string>为获取爱鱼奇智能硬件产品及用户的地址区域分布,以提供更好的特色服务,爱鱼奇将获取您的地址</string>
<key>NSMicrophoneUsageDescription</key> <key>NSMicrophoneUsageDescription</key>
<string>爱鱼奇需要您的同意,才能访问麦克风</string> <string>爱鱼奇需要您的同意,才能访问麦克风,以便于使用语音对讲等功能</string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>爱鱼奇需要您的同意,才能访问相册,以使用更换头像等图片上传功能</string> <string>爱鱼奇需要您的同意,才能访问相册,以使用更换头像等图片上传功能</string>
<key>UIApplicationExitsOnSuspend</key>
<false/>
<key>UIBackgroundModes</key> <key>UIBackgroundModes</key>
<array> <array>
<string>remote-notification</string> <string>remote-notification</string>

View File

@ -133,16 +133,15 @@ alpha:1.0]
// 测试云 @"www.zhangxinyanv5.top" // 测试云 @"www.zhangxinyanv5.top"
//#define SOCKETPORT @"www.zhangxinyanv5.top" //#define SOCKETPORT @"www.zhangxinyanv5.top"
// 云 @"app.ifish7.com" // 云 @"app.ifish7.com"
//正式环境
//#define SOCKETPORT @"app.ifish7.com" //#define SOCKETPORT @"app.ifish7.com"
// 本地 @"192.168.61.128"
#define SOCKETPORT @"test.ifish7.com:9955"
//#define JIEKOUPORT @"https://app.ifish7.com" //#define JIEKOUPORT @"https://app.ifish7.com"
//#define JIEKOUPORT @"http://test.ifish7.com:7080" //#define JIEKOUPORTHTTP @"https://app.ifish7.com"
//测试环境
#define SOCKETPORT @"test.ifish7.com:9955"
#define JIEKOUPORT @"http://139.196.24.156:7080" #define JIEKOUPORT @"http://139.196.24.156:7080"
#define JIEKOUPORTHTTP @"https://app.ifish7.com" #define JIEKOUPORTHTTP @"https://app.ifish7.com"
//云 @"https://app.ifish7.com" //云 @"https://app.ifish7.com"
//云图片头像等地址 @"http://app.ifish7.com" //云图片头像等地址 @"http://app.ifish7.com"
//#define JIEKOUPORTHTTP @"https://app.ifish7.com" //#define JIEKOUPORTHTTP @"https://app.ifish7.com"
@ -476,7 +475,7 @@ alpha:1.0]
// //
#define getHotBarHistory [NSString stringWithFormat:@"%@/api/user/getDeviceHeaterPhsByDate.do",JIEKOUPORT] #define getHotBarHistory [NSString stringWithFormat:@"%@/api/user/getDeviceHeaterPhsByDate.do",JIEKOUPORT]
/*=====================add V4.9.8=======================================*/ /*=====================add V4.9.8 by wbzhan=======================================*/
//获取推送消息列表 //获取推送消息列表
/** /**
pushID pushId pushID pushId

View File

@ -41,8 +41,4 @@
#define IFISHTASK_ARR @"IfishTaskArray" #define IFISHTASK_ARR @"IfishTaskArray"
#define IFISHTASK_HAVEDONEALL @"ifishTaskAllDone" #define IFISHTASK_HAVEDONEALL @"ifishTaskAllDone"
//注册成功 登录云信
#define IFISHIMLOGINSUCSESS @"ifishIMuserLoginSucsses"
#endif /* IfishAddGoldRuleType_h */ #endif /* IfishAddGoldRuleType_h */

View File

@ -445,7 +445,7 @@
}else { }else {
self.tipLabel.text = @"当月电量"; self.tipLabel.text = @"当月电量";
UInt64 mac = [dataContorl hexToTen:self.dataModel.electricity]; UInt64 mac = [dataContorl hexToTen:self.dataModel.electricity];
NSString *stringTemp = [NSString stringWithFormat:@"%llukwh",mac]; NSString *stringTemp = [NSString stringWithFormat:@"%llukwh",mac/10.0];
[self.tempLabel setAttributedText:[NSString ls_changeFontAndColor:[UIFont systemFontOfSize:15] Color:nil TotalString:stringTemp SubStringArray:@[@"kwh"]]]; [self.tempLabel setAttributedText:[NSString ls_changeFontAndColor:[UIFont systemFontOfSize:15] Color:nil TotalString:stringTemp SubStringArray:@[@"kwh"]]];
if (!_switchTimer) { if (!_switchTimer) {
_switchTimer = [NSTimer timerWithTimeInterval:3.0 target:self selector:@selector(changeTemp) userInfo:nil repeats:YES]; _switchTimer = [NSTimer timerWithTimeInterval:3.0 target:self selector:@selector(changeTemp) userInfo:nil repeats:YES];

View File

@ -66,16 +66,8 @@ extern BOOL launchedByNotification;
}); });
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(imLogInnotifiy) name:IFISHIMLOGINSUCSESS object:nil];
} }
-(void)imLogInnotifiy{
//tab badge UI badge
//NSInteger count = [[[NIMSDK sharedSDK] conversationManager] allUnreadCount];
//count ==0 ? (self.viewControllers[1].tabBarItem.badgeValue =nil):(self.viewControllers[1].tabBarItem.badgeValue = [NSString stringWithFormat:@"%ld",(long)count]);
}
-(void)showAdview{ -(void)showAdview{
IfishStartAdView *adview=[[IfishStartAdView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; IfishStartAdView *adview=[[IfishStartAdView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
@ -106,12 +98,6 @@ extern BOOL launchedByNotification;
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
} }
-(void)creatViewControllers{ -(void)creatViewControllers{
//
// NSArray*VCArr=@[@"IfishDeviceViewController",
// @"IfishMessageViewController",
// @"IfishDiscoverViewController",
// @"IfishMeViewController"];
// v4.3 tab // v4.3 tab
//NSArray*VCArr=@[@"IfishDeviceViewController", //NSArray*VCArr=@[@"IfishDeviceViewController",
@ -197,7 +183,6 @@ extern BOOL launchedByNotification;
if (launchedByNotification) { if (launchedByNotification) {
// tab1 0 tab tab // tab1 0 tab tab
//self.selectedIndex = 1;
self.selectedIndex = 0; self.selectedIndex = 0;
launchedByNotification = NO; launchedByNotification = NO;

View File

@ -297,22 +297,21 @@ extern BOOL launchedByNotification;
[self.dataSource addObject:oldMessageArray]; [self.dataSource addObject:oldMessageArray];
} }
[self.tableView reloadData]; [self.tableView reloadData];
[self postReadMessageRequest];
} }
} failure:^(NSError *err) { } failure:^(NSError *err) {
[SVProgressHUD dismiss]; [SVProgressHUD dismiss];
}]; }];
} }
// //
-(void)postReadMessageRequestWithIndexPath:(NSIndexPath *)indexPath{ -(void)postReadMessageRequest{
UserModel*userModel=[dataContorl getUserInfo]; UserModel*userModel=[dataContorl getUserInfo];
PushmessageModel *model = [[self.dataSource objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];
if([model.isRead integerValue]==1)// NSDictionary *params = @{@"userId":userModel.userId,
{
NSDictionary *params = @{@"userId":userModel.userId,
@"pushId":model.pushId,
}; };
[AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:Push_Message_Readed params:params success:^(id response) { [AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:Push_Message_Readed params:params success:^(id response) {
if (response) { if (response) {
id resault=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil]; id resault=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
NSString *result = [resault objectForKey:RESPONSE_CODE]; NSString *result = [resault objectForKey:RESPONSE_CODE];
@ -324,8 +323,7 @@ extern BOOL launchedByNotification;
} }
} failure:^(NSError *err) { } failure:^(NSError *err) {
}]; }];
}
} }
// //
-(void)deleteSingleMessageWithIndex:(NSIndexPath *)indexPath{ -(void)deleteSingleMessageWithIndex:(NSIndexPath *)indexPath{
@ -517,8 +515,8 @@ extern BOOL launchedByNotification;
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
//
[self postReadMessageRequestWithIndexPath:indexPath]; // [self postReadMessageRequestWithIndexPath:indexPath];
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"确认删除该消息么" preferredStyle:UIAlertControllerStyleAlert]; UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"确认删除该消息么" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
NSLog(@"cancel Action"); NSLog(@"cancel Action");

View File

@ -98,6 +98,7 @@ Assign NSInteger messageCount;//消息个数
[self initUI]; [self initUI];
[self showProgress]; [self showProgress];
[self addDataRequestQueue]; [self addDataRequestQueue];
[self checkNotification];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deleteCurDevice) name:@"DeleteCurDevice" object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deleteCurDevice) name:@"DeleteCurDevice" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateDevice) name:@"updateDevice" object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateDevice) name:@"updateDevice" object:nil];
} }
@ -134,7 +135,17 @@ Assign NSInteger messageCount;//消息个数
self.progressHud.labelText = @"加载中..."; self.progressHud.labelText = @"加载中...";
} }
//appapp
-(void)checkNotification{
//app
if ([AppDelegate sharedDefault].remoteNotification) {
IfishMessageViewController *message = [[IfishMessageViewController alloc]init];
UIViewController *vc= (UINavigationController *)[CommonUtils appRootViewController];
vc.hidesBottomBarWhenPushed = YES;
[vc.navigationController pushViewController:message animated:YES];
vc.hidesBottomBarWhenPushed = NO;
}
}
// //
-(void)getMessageCount{ -(void)getMessageCount{
@ -1591,6 +1602,8 @@ Assign NSInteger messageCount;//消息个数
#pragma mark - , #pragma mark - ,
-(void)navMeaasageBtnAction{ -(void)navMeaasageBtnAction{
self.messageCount = 0;
[self setRedViewData];//
// UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:sessionList]; // UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:sessionList];
// [nav.navigationBar resetBackgroundImage]; // [nav.navigationBar resetBackgroundImage];
// nav.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; // nav.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
@ -1599,6 +1612,7 @@ Assign NSInteger messageCount;//消息个数
self.hidesBottomBarWhenPushed = YES; self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:message animated:YES]; [self.navigationController pushViewController:message animated:YES];
self.hidesBottomBarWhenPushed = NO; self.hidesBottomBarWhenPushed = NO;
} }
@end @end

View File

@ -709,7 +709,7 @@
return; return;
} }
UInt64 mac = [dataContorl hexToTen:_xuanduoBack.electricity]; UInt64 mac = [dataContorl hexToTen:_xuanduoBack.electricity];
NSString *stringTemp = [NSString stringWithFormat:@"%llukwh",mac]; NSString *stringTemp = [NSString stringWithFormat:@"%llukwh",mac/10.0];
cell.templabel.font = [UIFont systemFontOfSize:37]; cell.templabel.font = [UIFont systemFontOfSize:37];
cell.templabel.textColor = RGB(253, 188, 63); cell.templabel.textColor = RGB(253, 188, 63);
[cell.templabel setAttributedText:[NSString ls_changeFontAndColor:[UIFont systemFontOfSize:17] Color:nil TotalString:stringTemp SubStringArray:@[@"kwh"]]]; [cell.templabel setAttributedText:[NSString ls_changeFontAndColor:[UIFont systemFontOfSize:17] Color:nil TotalString:stringTemp SubStringArray:@[@"kwh"]]];

View File

@ -294,7 +294,7 @@
[[IfishUserDataUnity shareDataInstance] userloginValidationSuccsess:DataDic phoneNumber:phoneNumber passward:password]; [[IfishUserDataUnity shareDataInstance] userloginValidationSuccsess:DataDic phoneNumber:phoneNumber passward:password];
//devicetokendevicetoken //devicetokendevicetoken
if (![[NSUserDefaults standardUserDefaults] boolForKey:is_Bind_DeviceToken]) { if (![[NSUserDefaults standardUserDefaults] boolForKey:is_Bind_DeviceToken]) {
UserModel *model=[[UserModel alloc] initWithDict:DataDic]; UserModel *model=[[UserModel alloc] initWithDict:[DataDic objectForKey:@"userInfo"]];
NSDictionary *params = @{@"deviceId":[FuncUserDefault strForKey:kDeviceToken], NSDictionary *params = @{@"deviceId":[FuncUserDefault strForKey:kDeviceToken],
@"userId":model.userId, @"userId":model.userId,
@"phoneType":@"iOS" @"phoneType":@"iOS"