diff --git a/ManagerDemo.xcodeproj/project.pbxproj b/ManagerDemo.xcodeproj/project.pbxproj index d19a6f9..63c4379 100644 --- a/ManagerDemo.xcodeproj/project.pbxproj +++ b/ManagerDemo.xcodeproj/project.pbxproj @@ -26,6 +26,8 @@ A91C6D4119AB8E9C00AEBF4D /* p2c_datesum@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A91C6D3E19AB8E9C00AEBF4D /* p2c_datesum@2x.png */; }; A91C6D4219AB8E9C00AEBF4D /* p2c_safeicon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A91C6D3F19AB8E9C00AEBF4D /* p2c_safeicon@2x.png */; }; A9233E64199CA44700DA80D8 /* more_icon_5@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9233E63199CA44700DA80D8 /* more_icon_5@2x.png */; }; + A9354F5C19B870C700FDCB52 /* BaseListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9354F5A19B870C700FDCB52 /* BaseListViewController.m */; }; + A9354F5D19B870C700FDCB52 /* BaseListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9354F5B19B870C700FDCB52 /* BaseListViewController.xib */; }; A93F87741999AA8300875287 /* ManagerUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A93F87731999AA8300875287 /* ManagerUtil.m */; }; A93F877C1999ACF600875287 /* MBProgressHUD+Util.m in Sources */ = {isa = PBXBuildFile; fileRef = A93F877B1999ACF600875287 /* MBProgressHUD+Util.m */; }; A93F87801999B92800875287 /* QCSlideSwitchView.m in Sources */ = {isa = PBXBuildFile; fileRef = A93F877F1999B92800875287 /* QCSlideSwitchView.m */; }; @@ -62,8 +64,6 @@ A986268A19B40AAC00FF9E2C /* SVModalWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A986268619B40AAC00FF9E2C /* SVModalWebViewController.m */; }; A986268B19B40AAC00FF9E2C /* SVWebViewController.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A986268719B40AAC00FF9E2C /* SVWebViewController.bundle */; }; A986268C19B40AAC00FF9E2C /* SVWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A986268919B40AAC00FF9E2C /* SVWebViewController.m */; }; - A986269019B411AA00FF9E2C /* DailyIncomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A986268E19B411AA00FF9E2C /* DailyIncomeViewController.m */; }; - A986269119B411AA00FF9E2C /* DailyIncomeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A986268F19B411AA00FF9E2C /* DailyIncomeViewController.xib */; }; A986269519B413D600FF9E2C /* DailyIncomeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A986269319B413D600FF9E2C /* DailyIncomeTableViewCell.m */; }; A986269619B413D600FF9E2C /* DailyIncomeTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A986269419B413D600FF9E2C /* DailyIncomeTableViewCell.xib */; }; A986269A19B423EB00FF9E2C /* ActivityCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A986269819B423EB00FF9E2C /* ActivityCenterViewController.m */; }; @@ -73,6 +73,9 @@ A988A8FC199A50D900EB10AA /* TriangleView.m in Sources */ = {isa = PBXBuildFile; fileRef = A988A8FB199A50D900EB10AA /* TriangleView.m */; }; A988A900199A751500EB10AA /* FundListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A988A8FF199A751500EB10AA /* FundListCell.m */; }; A988A902199A755300EB10AA /* FundListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A988A901199A755300EB10AA /* FundListCell.xib */; }; + A9971D7519B8BC410079F143 /* DailyProfitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9971D7419B8BC410079F143 /* DailyProfitViewController.m */; }; + A9971D7919B8C39C0079F143 /* DatailProfitTopTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A9971D7719B8C39C0079F143 /* DatailProfitTopTableViewCell.m */; }; + A9971D7A19B8C39C0079F143 /* DatailProfitTopTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9971D7819B8C39C0079F143 /* DatailProfitTopTableViewCell.xib */; }; A9AA325A199702DB000BE4FB /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A9AA3259199702DB000BE4FB /* Images.xcassets */; }; A9AA326019970335000BE4FB /* HomeAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9AA325D19970335000BE4FB /* HomeAdView.m */; }; A9AA326119970335000BE4FB /* ImagePlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9AA325F19970335000BE4FB /* ImagePlayerView.m */; }; @@ -214,6 +217,9 @@ A91C6D3E19AB8E9C00AEBF4D /* p2c_datesum@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "p2c_datesum@2x.png"; sourceTree = ""; }; A91C6D3F19AB8E9C00AEBF4D /* p2c_safeicon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "p2c_safeicon@2x.png"; sourceTree = ""; }; A9233E63199CA44700DA80D8 /* more_icon_5@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "more_icon_5@2x.png"; sourceTree = ""; }; + A9354F5919B870C700FDCB52 /* BaseListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseListViewController.h; sourceTree = ""; }; + A9354F5A19B870C700FDCB52 /* BaseListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseListViewController.m; sourceTree = ""; }; + A9354F5B19B870C700FDCB52 /* BaseListViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BaseListViewController.xib; sourceTree = ""; }; A93F87721999AA8300875287 /* ManagerUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagerUtil.h; sourceTree = ""; }; A93F87731999AA8300875287 /* ManagerUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ManagerUtil.m; sourceTree = ""; }; A93F877A1999AC9900875287 /* MBProgressHUD+Util.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MBProgressHUD+Util.h"; sourceTree = ""; }; @@ -269,9 +275,6 @@ A986268719B40AAC00FF9E2C /* SVWebViewController.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = SVWebViewController.bundle; sourceTree = ""; }; A986268819B40AAC00FF9E2C /* SVWebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVWebViewController.h; sourceTree = ""; }; A986268919B40AAC00FF9E2C /* SVWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVWebViewController.m; sourceTree = ""; }; - A986268D19B411AA00FF9E2C /* DailyIncomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DailyIncomeViewController.h; sourceTree = ""; }; - A986268E19B411AA00FF9E2C /* DailyIncomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DailyIncomeViewController.m; sourceTree = ""; }; - A986268F19B411AA00FF9E2C /* DailyIncomeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DailyIncomeViewController.xib; sourceTree = ""; }; A986269219B413D600FF9E2C /* DailyIncomeTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DailyIncomeTableViewCell.h; sourceTree = ""; }; A986269319B413D600FF9E2C /* DailyIncomeTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DailyIncomeTableViewCell.m; sourceTree = ""; }; A986269419B413D600FF9E2C /* DailyIncomeTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DailyIncomeTableViewCell.xib; sourceTree = ""; }; @@ -286,6 +289,11 @@ A988A8FE199A751500EB10AA /* FundListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FundListCell.h; sourceTree = ""; }; A988A8FF199A751500EB10AA /* FundListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FundListCell.m; sourceTree = ""; }; A988A901199A755300EB10AA /* FundListCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FundListCell.xib; sourceTree = ""; }; + A9971D7319B8BC410079F143 /* DailyProfitViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DailyProfitViewController.h; sourceTree = ""; }; + A9971D7419B8BC410079F143 /* DailyProfitViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DailyProfitViewController.m; sourceTree = ""; }; + A9971D7619B8C39C0079F143 /* DatailProfitTopTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatailProfitTopTableViewCell.h; sourceTree = ""; }; + A9971D7719B8C39C0079F143 /* DatailProfitTopTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DatailProfitTopTableViewCell.m; sourceTree = ""; }; + A9971D7819B8C39C0079F143 /* DatailProfitTopTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DatailProfitTopTableViewCell.xib; sourceTree = ""; }; A9AA3259199702DB000BE4FB /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; A9AA325C19970335000BE4FB /* HomeAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeAdView.h; sourceTree = ""; }; A9AA325D19970335000BE4FB /* HomeAdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeAdView.m; sourceTree = ""; }; @@ -477,6 +485,16 @@ path = ProductView; sourceTree = ""; }; + A9354F5819B870B900FDCB52 /* BaseView */ = { + isa = PBXGroup; + children = ( + A9354F5919B870C700FDCB52 /* BaseListViewController.h */, + A9354F5A19B870C700FDCB52 /* BaseListViewController.m */, + A9354F5B19B870C700FDCB52 /* BaseListViewController.xib */, + ); + path = BaseView; + sourceTree = ""; + }; A93F87751999AB4400875287 /* MBProgressHUD */ = { isa = PBXGroup; children = ( @@ -700,6 +718,7 @@ A9AF6C4A19949B510076C0EE /* Common */ = { isa = PBXGroup; children = ( + A9354F5819B870B900FDCB52 /* BaseView */, A986268419B40AAC00FF9E2C /* SVWebViewController */, A9F1E18319ACB24500B6A441 /* CustomCell */, A9E8589A19AC2940001996DF /* DaiDaiTongApi */, @@ -843,9 +862,6 @@ A919055319B02741002575DF /* AccountInfoViewController.h */, A919055419B02741002575DF /* AccountInfoViewController.m */, A919056B19B0882E002575DF /* AccountInfoViewController.xib */, - A986268D19B411AA00FF9E2C /* DailyIncomeViewController.h */, - A986268E19B411AA00FF9E2C /* DailyIncomeViewController.m */, - A986268F19B411AA00FF9E2C /* DailyIncomeViewController.xib */, A986269219B413D600FF9E2C /* DailyIncomeTableViewCell.h */, A986269319B413D600FF9E2C /* DailyIncomeTableViewCell.m */, A986269419B413D600FF9E2C /* DailyIncomeTableViewCell.xib */, @@ -858,6 +874,11 @@ A95CEA3D19B766F400D4605F /* MessageDetailViewController.h */, A95CEA3E19B766F400D4605F /* MessageDetailViewController.m */, A95CEA3F19B766F400D4605F /* MessageDetailViewController.xib */, + A9971D7319B8BC410079F143 /* DailyProfitViewController.h */, + A9971D7419B8BC410079F143 /* DailyProfitViewController.m */, + A9971D7619B8C39C0079F143 /* DatailProfitTopTableViewCell.h */, + A9971D7719B8C39C0079F143 /* DatailProfitTopTableViewCell.m */, + A9971D7819B8C39C0079F143 /* DatailProfitTopTableViewCell.xib */, ); path = MyView; sourceTree = ""; @@ -1025,6 +1046,7 @@ A919055F19B02A72002575DF /* icon_color_bank@2x.png in Resources */, A9AF6C751994B5890076C0EE /* icon_indicate_arrow_don@2x.png in Resources */, A9AF6C5D19949CD30076C0EE /* icon_dock_forum@2x.png in Resources */, + A9971D7A19B8C39C0079F143 /* DatailProfitTopTableViewCell.xib in Resources */, A9EAA04E1998787B001A872A /* hk_home_center__cycle@2x.png in Resources */, A9EAA0501998787B001A872A /* hk_home_center_cover@2x.png in Resources */, A9C0540619ADBCB2002331A5 /* FundProductInfoViewController.xib in Resources */, @@ -1070,7 +1092,6 @@ A9C69458199BD14D00B2CECE /* more_icon_10@2x.png in Resources */, A9AF6C34199484200076C0EE /* HomeViewController.xib in Resources */, A9AF6C0019947DD00076C0EE /* Main.storyboard in Resources */, - A986269119B411AA00FF9E2C /* DailyIncomeViewController.xib in Resources */, A97F9D2419B595550073E7E6 /* InputPassWordViewController.xib in Resources */, A9AF6C3E199486CA0076C0EE /* ProductListViewController.xib in Resources */, A95CEA4119B766F400D4605F /* MessageDetailViewController.xib in Resources */, @@ -1080,6 +1101,7 @@ A9C69455199BD14D00B2CECE /* more_icon_7@2x.png in Resources */, A9EAA04F1998787B001A872A /* hk_home_center_bg@2x.png in Resources */, A9AF6C6319949CD30076C0EE /* icon_dock_rt@2x.png in Resources */, + A9354F5D19B870C700FDCB52 /* BaseListViewController.xib in Resources */, A97F9D1B19B592FD0073E7E6 /* login_button@2x.png in Resources */, A9EC95BC19B54FDB00681678 /* textField_cancel_ios7.png in Resources */, A9AF6C721994B5890076C0EE /* icon_bar_card@2x.png in Resources */, @@ -1158,6 +1180,7 @@ A9B2506F19B4C75E003E8855 /* HelpCenterViewController.m in Sources */, A986269519B413D600FF9E2C /* DailyIncomeTableViewCell.m in Sources */, A986268A19B40AAC00FF9E2C /* SVModalWebViewController.m in Sources */, + A9354F5C19B870C700FDCB52 /* BaseListViewController.m in Sources */, A95CEA4019B766F400D4605F /* MessageDetailViewController.m in Sources */, A96F2A7F199D01C000608237 /* NSString+FontAwesome.m in Sources */, A9EAA035199857F5001A872A /* HomeMainView.m in Sources */, @@ -1168,6 +1191,7 @@ A9AF6C951994C5700076C0EE /* UIScrollView+MJRefresh.m in Sources */, A9EC95B719B54F6E00681678 /* LoginViewController.m in Sources */, A9AA326119970335000BE4FB /* ImagePlayerView.m in Sources */, + A9971D7919B8C39C0079F143 /* DatailProfitTopTableViewCell.m in Sources */, A9AF6C0319947DD00076C0EE /* ViewController.m in Sources */, A90BEC01199DDA9E00230242 /* WYDProductViewController.m in Sources */, A97F9D2319B595550073E7E6 /* InputPassWordViewController.m in Sources */, @@ -1188,11 +1212,11 @@ A986269A19B423EB00FF9E2C /* ActivityCenterViewController.m in Sources */, A93F87801999B92800875287 /* QCSlideSwitchView.m in Sources */, A9B9F14519AEF9BE001A1315 /* TableCellLineView.m in Sources */, + A9971D7519B8BC410079F143 /* DailyProfitViewController.m in Sources */, A9AF6C901994C5700076C0EE /* MJRefreshBaseView.m in Sources */, A9C0540519ADBCB2002331A5 /* FundProductInfoViewController.m in Sources */, A94FE51E199C9C3C00626DE5 /* MoveSocialCellView.m in Sources */, A93F8806199A077F00875287 /* OtherListViewController.m in Sources */, - A986269019B411AA00FF9E2C /* DailyIncomeViewController.m in Sources */, A9AF6C2E199483520076C0EE /* MainViewController.m in Sources */, A9AF6C42199498C40076C0EE /* MyViewController.m in Sources */, ); diff --git a/ManagerDemo.xcworkspace/xcuserdata/xmfish.xcuserdatad/UserInterfaceState.xcuserstate b/ManagerDemo.xcworkspace/xcuserdata/xmfish.xcuserdatad/UserInterfaceState.xcuserstate index 7b31178..e12dc6b 100644 Binary files a/ManagerDemo.xcworkspace/xcuserdata/xmfish.xcuserdatad/UserInterfaceState.xcuserstate and b/ManagerDemo.xcworkspace/xcuserdata/xmfish.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ManagerDemo/Common/BaseView/BaseListViewController.h b/ManagerDemo/Common/BaseView/BaseListViewController.h new file mode 100644 index 0000000..4da4f93 --- /dev/null +++ b/ManagerDemo/Common/BaseView/BaseListViewController.h @@ -0,0 +1,25 @@ +// +// BaseListViewController.h +// ManagerDemo +// +// Created by xmfish on 14-9-4. +// Copyright (c) 2014年 ash. All rights reserved. +// + +#import +@interface BaseListViewController : UIViewController +{ + NSInteger _pageNum; + NSMutableArray* _infoArray; +} +@property (weak, nonatomic) IBOutlet UITableView *tableView; +@property (strong, nonatomic)NSMutableArray* infoArray; +@property (assign, nonatomic)NSInteger pageNum; + +- (void)headerRereshing; +- (void)footerRereshing; +- (void)headerBeginRefreshing; +- (void)headerEndRefreshing; +- (void)footerEndRefreshing; +- (void)loadDataWithDic:(NSDictionary*)dic withType:(NSString*)typeStr WithcompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock;; +@end diff --git a/ManagerDemo/Common/BaseView/BaseListViewController.m b/ManagerDemo/Common/BaseView/BaseListViewController.m new file mode 100644 index 0000000..25f1fcb --- /dev/null +++ b/ManagerDemo/Common/BaseView/BaseListViewController.m @@ -0,0 +1,115 @@ +// +// BaseListViewController.m +// ManagerDemo +// +// Created by xmfish on 14-9-4. +// Copyright (c) 2014年 ash. All rights reserved. +// + +#import "BaseListViewController.h" +#import "MJRefresh.h" +@interface BaseListViewController () + +@end + +@implementation BaseListViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + _pageNum = 1; + _infoArray = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view from its nib. + self.tableView.delegate = self; + self.tableView.dataSource = self; + [self.tableView addHeaderWithTarget:self action:@selector(headerRereshing)]; + [self.tableView addFooterWithTarget:self action:@selector(footerRereshing)]; + [self.tableView headerBeginRefreshing]; +} + +#pragma mark MJRefreshDelegate +- (void)headerRereshing +{ + _pageNum = 1; + [self loadDataWithDic:nil withType:nil WithcompletionBlock:^(id jsonRes) { + + } failedBlock:^(NSError *error) { + + }]; +} + +- (void)footerRereshing +{ + _pageNum++; + [self loadDataWithDic:nil withType:nil WithcompletionBlock:^(id jsonRes) { + + } failedBlock:^(NSError *error) { + + }]; +} +- (void)headerBeginRefreshing +{ + [self.tableView headerBeginRefreshing]; +} +-(void)headerEndRefreshing +{ + [self.tableView headerEndRefreshing]; +} +-(void)footerEndRefreshing +{ + [self.tableView footerEndRefreshing]; +} +-(void)loadDataWithDic:(NSDictionary *)dic withType:(NSString *)typeStr WithcompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock +{ + DaiDaiTongApi* daiDaiTongApi = [DaiDaiTongApi shareInstance]; + [daiDaiTongApi getListwithPageNum:_pageNum withType:typeStr withParam:dic withCompletionBlock:^(id jsonRes) { + if ([[jsonRes objectForKey:@"succ"] integerValue] == 1) { + if (_pageNum == 1) { + [_infoArray removeAllObjects]; + [self.tableView addFooterWithTarget:self action:@selector(footerRereshing)]; + } + if ([[jsonRes objectForKey:@"totalPages"] integerValue] <= [[jsonRes objectForKey:@"pageNum"] integerValue]) { + [self.tableView removeFooter]; + } + completionBlock(jsonRes); + [self.tableView reloadData]; + }else{ + [MBProgressHUD errorHudWithView:nil label:[jsonRes objectForKey:@"err_msg"] hidesAfter:0.5]; + } + [self headerEndRefreshing]; + [self footerEndRefreshing]; + + } failedBlock:^(NSError *error) { + [MBProgressHUD errorHudWithView:self.view label:@"网络出错" hidesAfter:1.0]; + [self headerEndRefreshing]; + [self footerEndRefreshing]; + failedBlock(error); + }]; + +} + +#pragma mark UITableViewDelegate +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return 0; +} +-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return nil; +} +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/ManagerDemo/Common/BaseView/BaseListViewController.xib b/ManagerDemo/Common/BaseView/BaseListViewController.xib new file mode 100644 index 0000000..4b4222f --- /dev/null +++ b/ManagerDemo/Common/BaseView/BaseListViewController.xib @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ManagerDemo/Common/DaiDaiTongApi/DaiDaiTongApi.h b/ManagerDemo/Common/DaiDaiTongApi/DaiDaiTongApi.h index 8418719..de42952 100644 --- a/ManagerDemo/Common/DaiDaiTongApi/DaiDaiTongApi.h +++ b/ManagerDemo/Common/DaiDaiTongApi/DaiDaiTongApi.h @@ -91,8 +91,40 @@ typedef void (^FailedBlock) (NSError *error); * * @param completionBlock 请求完成 * @param failedBlock 请求失败 - * @param msgId 页数 + * @param msgId 消息id * @return MKNetworkOperation */ -(MKNetworkOperation*)getMsgDetailwithPageNum:(NSString*)msgId withCompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock; + +/** + * 获取个人详细信息 + * + * @param completionBlock 请求完成 + * @param failedBlock 请求失败 + * + * @return MKNetworkOperation + */ +-(MKNetworkOperation*)getPersonDetailWithcompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock; + +/** + * 获取每日收益信息 + * + * @param completionBlock 请求完成 + * @param failedBlock 请求失败 + * + * @return MKNetworkOperation + */ +-(MKNetworkOperation*)getProfitDatedetailWithcompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock; + +/** + * 读取有页数的列表 + * + * @param completionBlock 请求完成 + * @param failedBlock 请求失败 + * @param pageNum 页数 + * @param typeStr 列表类型 + * @param param 附加参数 + * @return MKNetworkOperation + */ +-(MKNetworkOperation*)getListwithPageNum:(NSInteger)pageNum withType:(NSString*)typeStr withParam:(NSDictionary*)param withCompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock; @end diff --git a/ManagerDemo/Common/DaiDaiTongApi/DaiDaiTongApi.m b/ManagerDemo/Common/DaiDaiTongApi/DaiDaiTongApi.m index a423a90..6224097 100644 --- a/ManagerDemo/Common/DaiDaiTongApi/DaiDaiTongApi.m +++ b/ManagerDemo/Common/DaiDaiTongApi/DaiDaiTongApi.m @@ -199,4 +199,60 @@ return op; } +-(MKNetworkOperation*)getPersonDetailWithcompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock +{ + NSDictionary* dic = [NSDictionary dictionaryWithObjectsAndKeys:[ManagerUser shareInstance].userId, @"userId",[ManagerUser shareInstance].token,@"token", nil]; + MKNetworkOperation* op = [self postWithPath:@"uAccCenter.do" params:dic]; + [op addCompletionHandler:^(MKNetworkOperation *completedOperation) { + completionBlock(completedOperation.responseJSON); + } errorHandler:^(MKNetworkOperation *completedOperation, NSError *error) { + DLog(@"%@", error); + failedBlock(error); + }]; + + [self enqueueOperation:op forceReload:YES]; + + return op; +} +-(MKNetworkOperation*)getProfitDatedetailWithcompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock +{ + NSDictionary* dic = [NSDictionary dictionaryWithObjectsAndKeys:[ManagerUser shareInstance].userId, @"userId",[ManagerUser shareInstance].token,@"token", nil]; + MKNetworkOperation* op = [self postWithPath:@"profitDatedetail.do" params:dic]; + [op addCompletionHandler:^(MKNetworkOperation *completedOperation) { + completionBlock(completedOperation.responseJSON); + } errorHandler:^(MKNetworkOperation *completedOperation, NSError *error) { + DLog(@"%@", error); + failedBlock(error); + }]; + + [self enqueueOperation:op forceReload:YES]; + + return op; +} +-(MKNetworkOperation*)getListwithPageNum:(NSInteger)pageNum withType:(NSString *)typeStr withParam:(NSDictionary *)param withCompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock +{ + NSMutableDictionary* dic; + if (param) { + dic = [[NSMutableDictionary alloc] initWithDictionary:param]; + }else{ + dic = [[NSMutableDictionary alloc] init]; + } + [dic setObject:[ManagerUser shareInstance].userId forKey:@"userId"]; + [dic setObject:[ManagerUser shareInstance].token forKey:@"token"]; + [dic setObject:[NSNumber numberWithInt:pageNum] forKey:@"pageNum"]; + MKNetworkOperation* op = [self postWithPath:typeStr params:dic]; + + [op addCompletionHandler:^(MKNetworkOperation *completedOperation) { + completionBlock(completedOperation.responseJSON); + + } errorHandler:^(MKNetworkOperation *completedOperation, NSError *error) { + DLog(@"%@", error); + failedBlock(error); + }]; + + [self enqueueOperation:op forceReload:YES]; + + return op; + +} @end diff --git a/ManagerDemo/MainView/ListView/ListViewController.m b/ManagerDemo/MainView/ListView/ListViewController.m index a604985..f98a2c4 100644 --- a/ManagerDemo/MainView/ListView/ListViewController.m +++ b/ManagerDemo/MainView/ListView/ListViewController.m @@ -41,7 +41,6 @@ [self.tableView addHeaderWithTarget:self action:@selector(headerRereshing)]; [self.tableView addFooterWithTarget:self action:@selector(footerRereshing)]; _pageNum = 1; - } #pragma mark MJRefreshDelegate - (void)headerRereshing @@ -72,6 +71,10 @@ if (_productInfoArray.count <= 0) { [self headerBeginRefreshing]; } +} +-(void)loadData +{ + } #pragma mark UITableViewDelegate -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ diff --git a/ManagerDemo/MainView/MyView/AccountInfoViewController.m b/ManagerDemo/MainView/MyView/AccountInfoViewController.m index eaa2241..240b894 100644 --- a/ManagerDemo/MainView/MyView/AccountInfoViewController.m +++ b/ManagerDemo/MainView/MyView/AccountInfoViewController.m @@ -9,7 +9,9 @@ #import "AccountInfoViewController.h" @interface AccountInfoViewController () - +{ + NSDictionary* _infoDic; +} @end @implementation AccountInfoViewController @@ -19,6 +21,7 @@ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization + _infoDic = nil; } return self; } @@ -29,11 +32,29 @@ // Do any additional setup after loading the view from its nib. _tableView.delegate = self; _tableView.dataSource = self; + [self loadData]; +} +-(void)loadData +{ + DaiDaiTongApi* daiDaiTongApi = [DaiDaiTongApi shareInstance]; + [daiDaiTongApi getPersonDetailWithcompletionBlock:^(id jsonRes) { + if ([[jsonRes objectForKey:@"succ"] integerValue] == 1) { + _infoDic = [NSDictionary dictionaryWithDictionary:jsonRes]; + [_tableView reloadData]; + } + else{ + [MBProgressHUD errorHudWithView:nil label:[jsonRes objectForKey:@"err_msg"] hidesAfter:0.5]; + } + } failedBlock:^(NSError *error) { + [MBProgressHUD errorHudWithView:self.view label:Net_Error_Str hidesAfter:0.5]; + }]; } - #pragma mark UITableViewDelegate -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + if (!_infoDic) { + return 0; + } return 5; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section @@ -66,6 +87,14 @@ } return 44; } +-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return 10.0; +} +-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return 1.0; +} -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString* cellIdentifier = @"cellidentifier"; @@ -78,8 +107,8 @@ case 0: { cell.imageView.image = [UIImage imageNamed:@"icon_person_take_image"]; - cell.textLabel.text = @"我的名字"; - cell.detailTextLabel.text = @"1356725***334"; + cell.textLabel.text = @"账户"; + cell.detailTextLabel.text = [_infoDic objectForKey:@"cell"]; cell.selectionStyle = UITableViewCellSelectionStyleNone; } break; @@ -88,12 +117,12 @@ cell.selectionStyle = UITableViewCellSelectionStyleNone; if (indexPath.row == 0) { cell.imageView.image = [UIImage imageNamed:@"icon_color_name"]; - cell.textLabel.text = @"我的名字"; - cell.detailTextLabel.text = @"*名字"; + cell.textLabel.text = @"实名认证"; + cell.detailTextLabel.text = [_infoDic objectForKey:@"realName"]; }else{ cell.imageView.image = [UIImage imageNamed:@"icon_color_idcard"]; cell.textLabel.text = @"身份认证"; - cell.detailTextLabel.text = @"13123131313**13132"; + cell.detailTextLabel.text = [_infoDic objectForKey:@"certNo"]; } } @@ -103,6 +132,7 @@ cell.imageView.image = [UIImage imageNamed:@"icon_color_bank"]; cell.textLabel.text = @"银行卡管理"; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + cell.detailTextLabel.text = [NSString stringWithFormat:@"(%@)",[_infoDic objectForKey:@"cardNum"]]; } break; diff --git a/ManagerDemo/MainView/MyView/AccountInfoViewController.xib b/ManagerDemo/MainView/MyView/AccountInfoViewController.xib index a4667d3..35afe44 100644 --- a/ManagerDemo/MainView/MyView/AccountInfoViewController.xib +++ b/ManagerDemo/MainView/MyView/AccountInfoViewController.xib @@ -18,10 +18,10 @@ - + - + diff --git a/ManagerDemo/MainView/MyView/DailyIncomeTableViewCell.h b/ManagerDemo/MainView/MyView/DailyIncomeTableViewCell.h index c678483..bffa4ca 100644 --- a/ManagerDemo/MainView/MyView/DailyIncomeTableViewCell.h +++ b/ManagerDemo/MainView/MyView/DailyIncomeTableViewCell.h @@ -9,6 +9,10 @@ #import @interface DailyIncomeTableViewCell : UITableViewCell +{ + NSString* _profitId; +} +@property (strong, nonatomic)NSString* profitId; @property (weak, nonatomic) IBOutlet UILabel *nameLabel; @property (weak, nonatomic) IBOutlet UILabel *timeLabel; diff --git a/ManagerDemo/MainView/MyView/DailyIncomeTableViewCell.m b/ManagerDemo/MainView/MyView/DailyIncomeTableViewCell.m index 1e18ce4..efce4fc 100644 --- a/ManagerDemo/MainView/MyView/DailyIncomeTableViewCell.m +++ b/ManagerDemo/MainView/MyView/DailyIncomeTableViewCell.m @@ -13,6 +13,7 @@ - (void)awakeFromNib { // Initialization code + _profitId = @""; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated diff --git a/ManagerDemo/MainView/MyView/DailyIncomeViewController.h b/ManagerDemo/MainView/MyView/DailyIncomeViewController.h deleted file mode 100644 index 7a9dde9..0000000 --- a/ManagerDemo/MainView/MyView/DailyIncomeViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// DailyIncomeViewController.h -// ManagerDemo -// -// Created by xmfish on 14-9-1. -// Copyright (c) 2014年 ash. All rights reserved. -// - -#import "ViewController.h" - -@interface DailyIncomeViewController : ViewController -@property (weak, nonatomic) IBOutlet UITableView *tableView; -@property (strong, nonatomic) IBOutlet UITableViewCell *topCell; - -@end diff --git a/ManagerDemo/MainView/MyView/DailyIncomeViewController.m b/ManagerDemo/MainView/MyView/DailyIncomeViewController.m deleted file mode 100644 index efcf40b..0000000 --- a/ManagerDemo/MainView/MyView/DailyIncomeViewController.m +++ /dev/null @@ -1,81 +0,0 @@ -// -// DailyIncomeViewController.m -// ManagerDemo -// -// Created by xmfish on 14-9-1. -// Copyright (c) 2014年 ash. All rights reserved. -// - -#import "DailyIncomeViewController.h" -#import "DailyIncomeTableViewCell.h" -@interface DailyIncomeViewController () - -@end - -@implementation DailyIncomeViewController - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Do any additional setup after loading the view from its nib. - _tableView.delegate = self; - _tableView.dataSource = self; - _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; -} - -#pragma mark UITableViewDelegate --(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return 1; -} --(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 10; -} --(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath -{ - return 90.0; -} --(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section -{ - return 1.0; -} --(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section -{ - return 10.0; -} --(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *dailyIncomeTableViewCell = @"DailyIncomeTableViewCell"; - UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:dailyIncomeTableViewCell]; - if (cell == nil) { - - UINib *nib = [UINib nibWithNibName:@"DailyIncomeTableViewCell" bundle:nil]; - [tableView registerNib:nib forCellReuseIdentifier:dailyIncomeTableViewCell]; - cell = (DailyIncomeTableViewCell *)[tableView dequeueReusableCellWithIdentifier:dailyIncomeTableViewCell]; - } - if (indexPath.section == 0) { - return _topCell; - } - return cell; -} --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [tableView deselectRowAtIndexPath:indexPath animated:NO]; -} -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/ManagerDemo/MainView/MyView/DailyIncomeViewController.xib b/ManagerDemo/MainView/MyView/DailyIncomeViewController.xib deleted file mode 100644 index 7937a23..0000000 --- a/ManagerDemo/MainView/MyView/DailyIncomeViewController.xib +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ManagerDemo/MainView/MyView/DailyProfitViewController.h b/ManagerDemo/MainView/MyView/DailyProfitViewController.h new file mode 100644 index 0000000..11e5fb8 --- /dev/null +++ b/ManagerDemo/MainView/MyView/DailyProfitViewController.h @@ -0,0 +1,16 @@ +// +// DailyProfitViewController.h +// ManagerDemo +// +// Created by xmfish on 14-9-4. +// Copyright (c) 2014年 ash. All rights reserved. +// + +#import +#import "BaseListViewController.h" +@interface DailyProfitViewController : BaseListViewController +{ + NSString* _profitDate; +} +@property(strong, nonatomic)NSString* profitDate; +@end diff --git a/ManagerDemo/MainView/MyView/DailyProfitViewController.m b/ManagerDemo/MainView/MyView/DailyProfitViewController.m new file mode 100644 index 0000000..efc9a81 --- /dev/null +++ b/ManagerDemo/MainView/MyView/DailyProfitViewController.m @@ -0,0 +1,120 @@ +// +// DailyProfitViewController.m +// ManagerDemo +// +// Created by xmfish on 14-9-4. +// Copyright (c) 2014年 ash. All rights reserved. +// + +#import "DailyProfitViewController.h" +#import "DailyIncomeTableViewCell.h" +#import "DatailProfitTopTableViewCell.h" +@interface DailyProfitViewController () +{ + DatailProfitTopTableViewCell* _topCell; +} +@end + +@implementation DailyProfitViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view. + _topCell = [DatailProfitTopTableViewCell instance]; + + [self headerBeginRefreshing]; +} +-(void)loadDataWithDic:(NSDictionary *)dic withType:(NSString *)typeStr WithcompletionBlock:(CompletionBlock)completionBlock failedBlock:(FailedBlock)failedBlock +{ + NSDictionary* tempDic = [[NSDictionary alloc] initWithObjectsAndKeys:_profitDate, @"profitDate", nil]; + [super loadDataWithDic:tempDic withType:@"profitDatedetail.do" WithcompletionBlock:^(id jsonRes){ + _topCell.profitLabel.text = [jsonRes objectForKey:@"dateProfit"]; + _topCell.timeLabel.text = [NSString stringWithFormat:@"%@收益(元)",[jsonRes objectForKey:@"profitShowDate"]]; + self.navigationItem.title = [NSString stringWithFormat:@"%@收益",[jsonRes objectForKey:@"profitShowDate"]]; + [_infoArray addObjectsFromArray:[jsonRes objectForKey:@"datas"]]; + }failedBlock:^(NSError *error){ + + }]; +} +#pragma mark UITableViewDelegate +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return 1; +} +-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return _infoArray.count+1; +} +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return 90.0; +} +-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return 1.0; +} +-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section +{ + return nil; +} +-(UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section +{ + UIView* view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 10)]; + view.backgroundColor = [UIColor clearColor]; + return view; +} +-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return 10.0; +} +-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *dailyIncomeTableViewCell = @"DailyIncomeTableViewCell"; + DailyIncomeTableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:dailyIncomeTableViewCell]; + if (cell == nil) { + + UINib *nib = [UINib nibWithNibName:@"DailyIncomeTableViewCell" bundle:nil]; + [tableView registerNib:nib forCellReuseIdentifier:dailyIncomeTableViewCell]; + cell = (DailyIncomeTableViewCell *)[tableView dequeueReusableCellWithIdentifier:dailyIncomeTableViewCell]; + } + if (indexPath.section == 0) { + return _topCell; + } + cell.nameLabel.text = [[_infoArray objectAtIndex:indexPath.section-1] objectForKey:@"name"]; + cell.timeLabel.text = [[_infoArray objectAtIndex:indexPath.section-1] objectForKey:@"date"]; + cell.profitLabel.text = [[_infoArray objectAtIndex:indexPath.section-1] objectForKey:@"profit"]; + return cell; +} +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + [tableView deselectRowAtIndexPath:indexPath animated:NO]; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +{ + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/ManagerDemo/MainView/MyView/DatailProfitTopTableViewCell.h b/ManagerDemo/MainView/MyView/DatailProfitTopTableViewCell.h new file mode 100644 index 0000000..3887606 --- /dev/null +++ b/ManagerDemo/MainView/MyView/DatailProfitTopTableViewCell.h @@ -0,0 +1,16 @@ +// +// DatailProfitTopTableViewCell.h +// ManagerDemo +// +// Created by xmfish on 14-9-4. +// Copyright (c) 2014年 ash. All rights reserved. +// + +#import + +@interface DatailProfitTopTableViewCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UILabel *timeLabel; +@property (weak, nonatomic) IBOutlet UILabel *profitLabel; + ++(DatailProfitTopTableViewCell*)instance; +@end diff --git a/ManagerDemo/MainView/MyView/DatailProfitTopTableViewCell.m b/ManagerDemo/MainView/MyView/DatailProfitTopTableViewCell.m new file mode 100644 index 0000000..3424370 --- /dev/null +++ b/ManagerDemo/MainView/MyView/DatailProfitTopTableViewCell.m @@ -0,0 +1,29 @@ +// +// DatailProfitTopTableViewCell.m +// ManagerDemo +// +// Created by xmfish on 14-9-4. +// Copyright (c) 2014年 ash. All rights reserved. +// + +#import "DatailProfitTopTableViewCell.h" + +@implementation DatailProfitTopTableViewCell + +- (void)awakeFromNib +{ + // Initialization code +} ++(DatailProfitTopTableViewCell*)instance +{ + NSArray* nibView = [[NSBundle mainBundle] loadNibNamed:@"DatailProfitTopTableViewCell" owner:nil options:nil]; + return [nibView objectAtIndex:0]; +} +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/ManagerDemo/MainView/MyView/DatailProfitTopTableViewCell.xib b/ManagerDemo/MainView/MyView/DatailProfitTopTableViewCell.xib new file mode 100644 index 0000000..3cc5928 --- /dev/null +++ b/ManagerDemo/MainView/MyView/DatailProfitTopTableViewCell.xib @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ManagerDemo/MainViewControll/MoreViewController.xib b/ManagerDemo/MainViewControll/MoreViewController.xib index 2b1867f..c10a5e3 100644 --- a/ManagerDemo/MainViewControll/MoreViewController.xib +++ b/ManagerDemo/MainViewControll/MoreViewController.xib @@ -1,7 +1,7 @@ - + - + @@ -18,7 +18,7 @@ - + @@ -27,4 +27,4 @@ - \ No newline at end of file + diff --git a/ManagerDemo/MainViewControll/MyViewController.m b/ManagerDemo/MainViewControll/MyViewController.m index c738291..c49ae3d 100644 --- a/ManagerDemo/MainViewControll/MyViewController.m +++ b/ManagerDemo/MainViewControll/MyViewController.m @@ -10,7 +10,7 @@ #import "MyTotalProfitCellView.h" #import "MJRefresh.h" #import "AccountInfoViewController.h" -#import "DailyIncomeViewController.h" +#import "DailyProfitViewController.h" #import "MessageCenterViewController.h" @interface MyViewController () { @@ -219,13 +219,16 @@ case 0: { AccountInfoViewController* accountInfoViewController = [[AccountInfoViewController alloc] init]; + accountInfoViewController.hidesBottomBarWhenPushed = YES; [self.navigationController pushViewController:accountInfoViewController animated:YES]; } break; case 1: { - DailyIncomeViewController* dailyIncomeViewController = [[DailyIncomeViewController alloc] init]; - [self.navigationController pushViewController:dailyIncomeViewController animated:YES]; + DailyProfitViewController* dailyProfitViewController = [[DailyProfitViewController alloc] initWithNibName:@"BaseListViewController" bundle:nil]; + dailyProfitViewController.hidesBottomBarWhenPushed = YES; + dailyProfitViewController.profitDate = [_myInfoDic objectForKey:@"profitDate"]; + [self.navigationController pushViewController:dailyProfitViewController animated:YES]; } break; default: diff --git a/ManagerDemo/MainViewControll/MyViewController.xib b/ManagerDemo/MainViewControll/MyViewController.xib index 2c7061e..f1d8e73 100644 --- a/ManagerDemo/MainViewControll/MyViewController.xib +++ b/ManagerDemo/MainViewControll/MyViewController.xib @@ -18,7 +18,7 @@ - +