diff --git a/ManagerDemo.xcodeproj/project.pbxproj b/ManagerDemo.xcodeproj/project.pbxproj index 4b3c3c6..9c55b6e 100644 --- a/ManagerDemo.xcodeproj/project.pbxproj +++ b/ManagerDemo.xcodeproj/project.pbxproj @@ -70,6 +70,8 @@ A9623E2F19CBEB1A004F7D9D /* NSDictionary+ChangeNull.m in Sources */ = {isa = PBXBuildFile; fileRef = A9623E2E19CBEB1A004F7D9D /* NSDictionary+ChangeNull.m */; }; A96F2A7C199D008200608237 /* UIButton+Bootstrap.m in Sources */ = {isa = PBXBuildFile; fileRef = A96F2A7B199D008200608237 /* UIButton+Bootstrap.m */; }; A96F2A7F199D01C000608237 /* NSString+FontAwesome.m in Sources */ = {isa = PBXBuildFile; fileRef = A96F2A7E199D01C000608237 /* NSString+FontAwesome.m */; }; + A970886219D273E700F880C1 /* OtherCaculateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A970886019D273E700F880C1 /* OtherCaculateViewController.m */; }; + A970886319D273E700F880C1 /* OtherCaculateViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A970886119D273E700F880C1 /* OtherCaculateViewController.xib */; }; A97F9D1519B592E90073E7E6 /* get_ver_button_gry@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A97F9D1219B592E90073E7E6 /* get_ver_button_gry@2x.png */; }; A97F9D1619B592E90073E7E6 /* get_ver_button_red_s@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A97F9D1319B592E90073E7E6 /* get_ver_button_red_s@2x.png */; }; A97F9D1719B592E90073E7E6 /* get_ver_button_red@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A97F9D1419B592E90073E7E6 /* get_ver_button_red@2x.png */; }; @@ -106,6 +108,16 @@ A99FDB0319CAACA400D2B3D3 /* InputVerificationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A99FDB0119CAACA400D2B3D3 /* InputVerificationViewController.xib */; }; A99FDB0A19CAC16E00D2B3D3 /* SetPassWordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A99FDB0819CAC16E00D2B3D3 /* SetPassWordViewController.m */; }; A99FDB0B19CAC16E00D2B3D3 /* SetPassWordViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A99FDB0919CAC16E00D2B3D3 /* SetPassWordViewController.xib */; }; + A9A59E7519D299DE00D7DC4F /* sale_gray_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A59E7319D299DE00D7DC4F /* sale_gray_icon@2x.png */; }; + A9A59E7619D299DE00D7DC4F /* sale_red_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A59E7419D299DE00D7DC4F /* sale_red_icon@2x.png */; }; + A9A59E7F19D299EA00D7DC4F /* tab_fund_list_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A59E7719D299EA00D7DC4F /* tab_fund_list_bg@2x.png */; }; + A9A59E8019D299EA00D7DC4F /* tab_fund_list_p_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A59E7819D299EA00D7DC4F /* tab_fund_list_p_bg@2x.png */; }; + A9A59E8119D299EA00D7DC4F /* tab_home_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A59E7919D299EA00D7DC4F /* tab_home_bg@2x.png */; }; + A9A59E8219D299EA00D7DC4F /* tab_home_p_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A59E7A19D299EA00D7DC4F /* tab_home_p_bg@2x.png */; }; + A9A59E8319D299EA00D7DC4F /* tab_mine_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A59E7B19D299EA00D7DC4F /* tab_mine_bg@2x.png */; }; + A9A59E8419D299EA00D7DC4F /* tab_mine_p_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A59E7C19D299EA00D7DC4F /* tab_mine_p_bg@2x.png */; }; + A9A59E8519D299EA00D7DC4F /* tab_more_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A59E7D19D299EA00D7DC4F /* tab_more_bg@2x.png */; }; + A9A59E8619D299EA00D7DC4F /* tab_more_p_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A59E7E19D299EA00D7DC4F /* tab_more_p_bg@2x.png */; }; A9A6AD2F19CB1C7000626B48 /* MainOrderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6AD2D19CB1C7000626B48 /* MainOrderViewController.m */; }; A9A6AD3019CB1C7000626B48 /* MainOrderViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9A6AD2E19CB1C7000626B48 /* MainOrderViewController.xib */; }; A9A6AD3419CB26FD00626B48 /* OrderPassWordViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9A6AD3219CB26FD00626B48 /* OrderPassWordViewController.mm */; }; @@ -191,6 +203,7 @@ A9C69457199BD14D00B2CECE /* more_icon_9@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9C6944F199BD14D00B2CECE /* more_icon_9@2x.png */; }; A9C69458199BD14D00B2CECE /* more_icon_10@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9C69450199BD14D00B2CECE /* more_icon_10@2x.png */; }; A9C6945A199BD16000B2CECE /* more_icon_1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9C69459199BD16000B2CECE /* more_icon_1@2x.png */; }; + A9D4CE9619D2607700B38E75 /* DottedLineView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9D4CE9519D2607700B38E75 /* DottedLineView.m */; }; A9D7A71C19C913A60029911F /* sale_blue_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9D7A71B19C913A60029911F /* sale_blue_icon@2x.png */; }; A9E76DD519AB378A00C0D232 /* hk_home_icon1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9E76DD219AB378A00C0D232 /* hk_home_icon1@2x.png */; }; A9E76DD619AB378A00C0D232 /* hk_home_icon2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9E76DD319AB378A00C0D232 /* hk_home_icon2@2x.png */; }; @@ -324,6 +337,9 @@ A96F2A7B199D008200608237 /* UIButton+Bootstrap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+Bootstrap.m"; sourceTree = ""; }; A96F2A7D199D01C000608237 /* NSString+FontAwesome.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+FontAwesome.h"; sourceTree = ""; }; A96F2A7E199D01C000608237 /* NSString+FontAwesome.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+FontAwesome.m"; sourceTree = ""; }; + A970885F19D273E700F880C1 /* OtherCaculateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OtherCaculateViewController.h; sourceTree = ""; }; + A970886019D273E700F880C1 /* OtherCaculateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OtherCaculateViewController.m; sourceTree = ""; }; + A970886119D273E700F880C1 /* OtherCaculateViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OtherCaculateViewController.xib; sourceTree = ""; }; A97F9D1219B592E90073E7E6 /* get_ver_button_gry@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "get_ver_button_gry@2x.png"; sourceTree = ""; }; A97F9D1319B592E90073E7E6 /* get_ver_button_red_s@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "get_ver_button_red_s@2x.png"; sourceTree = ""; }; A97F9D1419B592E90073E7E6 /* get_ver_button_red@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "get_ver_button_red@2x.png"; sourceTree = ""; }; @@ -377,6 +393,16 @@ A99FDB0719CAC16E00D2B3D3 /* SetPassWordViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetPassWordViewController.h; sourceTree = ""; }; A99FDB0819CAC16E00D2B3D3 /* SetPassWordViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SetPassWordViewController.m; sourceTree = ""; }; A99FDB0919CAC16E00D2B3D3 /* SetPassWordViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SetPassWordViewController.xib; sourceTree = ""; }; + A9A59E7319D299DE00D7DC4F /* sale_gray_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sale_gray_icon@2x.png"; sourceTree = ""; }; + A9A59E7419D299DE00D7DC4F /* sale_red_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sale_red_icon@2x.png"; sourceTree = ""; }; + A9A59E7719D299EA00D7DC4F /* tab_fund_list_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_fund_list_bg@2x.png"; sourceTree = ""; }; + A9A59E7819D299EA00D7DC4F /* tab_fund_list_p_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_fund_list_p_bg@2x.png"; sourceTree = ""; }; + A9A59E7919D299EA00D7DC4F /* tab_home_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_home_bg@2x.png"; sourceTree = ""; }; + A9A59E7A19D299EA00D7DC4F /* tab_home_p_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_home_p_bg@2x.png"; sourceTree = ""; }; + A9A59E7B19D299EA00D7DC4F /* tab_mine_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_mine_bg@2x.png"; sourceTree = ""; }; + A9A59E7C19D299EA00D7DC4F /* tab_mine_p_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_mine_p_bg@2x.png"; sourceTree = ""; }; + A9A59E7D19D299EA00D7DC4F /* tab_more_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_more_bg@2x.png"; sourceTree = ""; }; + A9A59E7E19D299EA00D7DC4F /* tab_more_p_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_more_p_bg@2x.png"; sourceTree = ""; }; A9A6AD2C19CB1C7000626B48 /* MainOrderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainOrderViewController.h; sourceTree = ""; }; A9A6AD2D19CB1C7000626B48 /* MainOrderViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainOrderViewController.m; sourceTree = ""; }; A9A6AD2E19CB1C7000626B48 /* MainOrderViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainOrderViewController.xib; sourceTree = ""; }; @@ -494,6 +520,8 @@ A9C6944F199BD14D00B2CECE /* more_icon_9@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "more_icon_9@2x.png"; sourceTree = ""; }; A9C69450199BD14D00B2CECE /* more_icon_10@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "more_icon_10@2x.png"; sourceTree = ""; }; A9C69459199BD16000B2CECE /* more_icon_1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "more_icon_1@2x.png"; sourceTree = ""; }; + A9D4CE9419D2607700B38E75 /* DottedLineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DottedLineView.h; sourceTree = ""; }; + A9D4CE9519D2607700B38E75 /* DottedLineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DottedLineView.m; sourceTree = ""; }; A9D7A71B19C913A60029911F /* sale_blue_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sale_blue_icon@2x.png"; sourceTree = ""; }; A9E76DD219AB378A00C0D232 /* hk_home_icon1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "hk_home_icon1@2x.png"; sourceTree = ""; }; A9E76DD319AB378A00C0D232 /* hk_home_icon2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "hk_home_icon2@2x.png"; sourceTree = ""; }; @@ -590,6 +618,9 @@ A9A6AD3119CB26FD00626B48 /* OrderPassWordViewController.h */, A9A6AD3219CB26FD00626B48 /* OrderPassWordViewController.mm */, A9A6AD3319CB26FD00626B48 /* OrderPassWordViewController.xib */, + A970885F19D273E700F880C1 /* OtherCaculateViewController.h */, + A970886019D273E700F880C1 /* OtherCaculateViewController.m */, + A970886119D273E700F880C1 /* OtherCaculateViewController.xib */, ); path = ProductView; sourceTree = ""; @@ -682,6 +713,8 @@ children = ( A988A8FA199A50D900EB10AA /* TriangleView.h */, A988A8FB199A50D900EB10AA /* TriangleView.m */, + A9D4CE9419D2607700B38E75 /* DottedLineView.h */, + A9D4CE9519D2607700B38E75 /* DottedLineView.m */, ); path = UIViewShape; sourceTree = ""; @@ -862,6 +895,16 @@ A9AF6C4D19949CAD0076C0EE /* Resource */ = { isa = PBXGroup; children = ( + A9A59E7719D299EA00D7DC4F /* tab_fund_list_bg@2x.png */, + A9A59E7819D299EA00D7DC4F /* tab_fund_list_p_bg@2x.png */, + A9A59E7919D299EA00D7DC4F /* tab_home_bg@2x.png */, + A9A59E7A19D299EA00D7DC4F /* tab_home_p_bg@2x.png */, + A9A59E7B19D299EA00D7DC4F /* tab_mine_bg@2x.png */, + A9A59E7C19D299EA00D7DC4F /* tab_mine_p_bg@2x.png */, + A9A59E7D19D299EA00D7DC4F /* tab_more_bg@2x.png */, + A9A59E7E19D299EA00D7DC4F /* tab_more_p_bg@2x.png */, + A9A59E7319D299DE00D7DC4F /* sale_gray_icon@2x.png */, + A9A59E7419D299DE00D7DC4F /* sale_red_icon@2x.png */, A99EBEB319CBAF55005E1AA0 /* Icon-57.png */, A99EBEBB19CBAFE3005E1AA0 /* Icon-114.png */, A9D7A71B19C913A60029911F /* sale_blue_icon@2x.png */, @@ -1173,6 +1216,7 @@ A93F8802199A077F00875287 /* ListViewController.xib in Resources */, A93F8804199A077F00875287 /* LoanListCell.xib in Resources */, A9C69448199BC1F500B2CECE /* gray_select_arrow@2x.png in Resources */, + A9A59E8119D299EA00D7DC4F /* tab_home_bg@2x.png in Resources */, A986268B19B40AAC00FF9E2C /* SVWebViewController.bundle in Resources */, A9AF6C731994B5890076C0EE /* icon_bar_share@2x.png in Resources */, A97F9D1519B592E90073E7E6 /* get_ver_button_gry@2x.png in Resources */, @@ -1182,6 +1226,7 @@ A9AF6C6919949CD30076C0EE /* icon_dock_session@2x.png in Resources */, A936792C19D06A1B004F6EBE /* AuthenticationViewController.xib in Resources */, A9AF6C5C19949CD30076C0EE /* icon_dock_forum_actived@2x.png in Resources */, + A970886319D273E700F880C1 /* OtherCaculateViewController.xib in Resources */, A9C2E4E519B6A0C900C659B3 /* icon_email@2x.png in Resources */, A97F9D1E19B5931C0073E7E6 /* register_button_s@2x.png in Resources */, A9EC95BE19B54FEC00681678 /* textField_bg@2x.png in Resources */, @@ -1201,8 +1246,10 @@ A9C6945A199BD16000B2CECE /* more_icon_1@2x.png in Resources */, A9EC95B819B54F6E00681678 /* LoginViewController.xib in Resources */, A99FDB0B19CAC16E00D2B3D3 /* SetPassWordViewController.xib in Resources */, + A9A59E8419D299EA00D7DC4F /* tab_mine_p_bg@2x.png in Resources */, A9EAA05F1998BB82001A872A /* about_dot@2x.png in Resources */, A93320C819C0227F0090D640 /* MyHoldAmountViewController.xib in Resources */, + A9A59E8519D299EA00D7DC4F /* tab_more_bg@2x.png in Resources */, A9AF6C5E19949CD30076C0EE /* icon_dock_home_actived@2x.png in Resources */, A9EAA04519986DC3001A872A /* fund_cell_label_bg_blue@2x.png in Resources */, A97F9D1719B592E90073E7E6 /* get_ver_button_red@2x.png in Resources */, @@ -1214,6 +1261,7 @@ A9AF6C741994B5890076C0EE /* icon_indicate_add_module@2x.png in Resources */, A919055F19B02A72002575DF /* icon_color_bank@2x.png in Resources */, A9AF6C751994B5890076C0EE /* icon_indicate_arrow_don@2x.png in Resources */, + A9A59E8019D299EA00D7DC4F /* tab_fund_list_p_bg@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 */, @@ -1228,7 +1276,9 @@ A9AA325A199702DB000BE4FB /* Images.xcassets in Resources */, A9AF6C6519949CD30076C0EE /* icon_dock_service@2x.png in Resources */, A93F87821999BB1D00875287 /* red_line_and_shadow@2x.png in Resources */, + A9A59E8619D299EA00D7DC4F /* tab_more_p_bg@2x.png in Resources */, A91C6D4019AB8E9C00AEBF4D /* p2c_alert@2x.png in Resources */, + A9A59E8319D299EA00D7DC4F /* tab_mine_bg@2x.png in Resources */, A904E4AB19BEF18A0014F694 /* about_logo@2x.png in Resources */, A9AF6C6019949CD30076C0EE /* icon_dock_mine_actived@2x.png in Resources */, A95CEA3C19B7667400D4605F /* icon_success@2x.png in Resources */, @@ -1239,13 +1289,16 @@ A9E76DD619AB378A00C0D232 /* hk_home_icon2@2x.png in Resources */, A9AF6C6419949CD30076C0EE /* icon_dock_service_actived@2x.png in Resources */, A904E4A719BEF11F0014F694 /* AboutViewController.xib in Resources */, + A9A59E7619D299DE00D7DC4F /* sale_red_icon@2x.png in Resources */, A9E76DD719AB378A00C0D232 /* hk_home_icon3@2x.png in Resources */, A9AF6C791994B5890076C0EE /* tabbarShadowImage@2x.png in Resources */, + A9A59E7519D299DE00D7DC4F /* sale_gray_icon@2x.png in Resources */, A9E76DD519AB378A00C0D232 /* hk_home_icon1@2x.png in Resources */, A9D7A71C19C913A60029911F /* sale_blue_icon@2x.png in Resources */, A919055B19B02A5F002575DF /* icon_color_idcard@2x.png in Resources */, A9C69453199BD14D00B2CECE /* more_icon_4@2x.png in Resources */, A91C6D4119AB8E9C00AEBF4D /* p2c_datesum@2x.png in Resources */, + A9A59E8219D299EA00D7DC4F /* tab_home_p_bg@2x.png in Resources */, A9C69442199BB7B100B2CECE /* icon_person_take_image@2x.png in Resources */, A9C69457199BD14D00B2CECE /* more_icon_9@2x.png in Resources */, A90BEC07199DDAFB00230242 /* WYDInfoHeadView.xib in Resources */, @@ -1266,6 +1319,7 @@ A99EBEBC19CBAFE3005E1AA0 /* Icon-114.png in Resources */, A9EAA052199879CC001A872A /* pie_chart_center@2x.png in Resources */, A9C69458199BD14D00B2CECE /* more_icon_10@2x.png in Resources */, + A9A59E7F19D299EA00D7DC4F /* tab_fund_list_bg@2x.png in Resources */, A9AF6C34199484200076C0EE /* HomeViewController.xib in Resources */, A9AF6C0019947DD00076C0EE /* Main.storyboard in Resources */, A99EBEAF19CB9E8A005E1AA0 /* TransactionRecordsTableViewCell.xib in Resources */, @@ -1381,6 +1435,7 @@ A9AF6C951994C5700076C0EE /* UIScrollView+MJRefresh.m in Sources */, A93320C219BFE8090090D640 /* MyTotalAmountViewController.m in Sources */, A9EC95B719B54F6E00681678 /* LoginViewController.m in Sources */, + A9D4CE9619D2607700B38E75 /* DottedLineView.m in Sources */, A9AA326119970335000BE4FB /* ImagePlayerView.m in Sources */, A93320C719C0227F0090D640 /* MyHoldAmountViewController.m in Sources */, A99EBEAE19CB9E8A005E1AA0 /* TransactionRecordsTableViewCell.m in Sources */, @@ -1399,6 +1454,7 @@ A95CEA3919B755C000D4605F /* MessageCenterTableViewCell.m in Sources */, A9F1E18619ACB63100B6A441 /* DTCoreTextTableViewCell.m in Sources */, A9AF6BF919947DD00076C0EE /* main.m in Sources */, + A970886219D273E700F880C1 /* OtherCaculateViewController.m in Sources */, A99FDAFE19CA683100D2B3D3 /* DaiDaiTongTestApi.m in Sources */, A90BEC05199DDACA00230242 /* WYDInfoHeadView.m in Sources */, A95EAEE319C9BE2E00D1592B /* FundCaculateViewController.m in Sources */, diff --git a/ManagerDemo.xcworkspace/xcuserdata/xmfish.xcuserdatad/UserInterfaceState.xcuserstate b/ManagerDemo.xcworkspace/xcuserdata/xmfish.xcuserdatad/UserInterfaceState.xcuserstate index 810df16..6fe8d24 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/ManagerConstants.h b/ManagerDemo/Common/ManagerConstants.h index 8e09a12..a936f38 100644 --- a/ManagerDemo/Common/ManagerConstants.h +++ b/ManagerDemo/Common/ManagerConstants.h @@ -36,7 +36,7 @@ /** * 点击的背景颜色 */ -#define Touch_BackGroudColor [UIColor colorWithWhite:0.5 alpha:0.3] +#define Touch_BackGroudColor [UIColor colorWithWhite:0.8 alpha:0.3] /** * 错误字符串 */ diff --git a/ManagerDemo/Common/ManagerUtil.h b/ManagerDemo/Common/ManagerUtil.h index 7501f33..63839ae 100644 --- a/ManagerDemo/Common/ManagerUtil.h +++ b/ManagerDemo/Common/ManagerUtil.h @@ -40,6 +40,8 @@ /** * */ ++(UIView*)dottedlinewithFrame:(CGRect)frame; + +(UIView*)lineWithColor:(UIColor*)color withAlpha:(CGFloat)alpha withFrame:(CGRect)frame; +(UIView*)selectBackgroudViewWithFrame:(CGRect)frame; diff --git a/ManagerDemo/Common/ManagerUtil.m b/ManagerDemo/Common/ManagerUtil.m index 6ffe7ce..965b88f 100644 --- a/ManagerDemo/Common/ManagerUtil.m +++ b/ManagerDemo/Common/ManagerUtil.m @@ -9,6 +9,7 @@ #import "ManagerUtil.h" #import "LoginViewController.h" #import "AppDelegate.h" +#import "DottedLineView.h" #import @implementation ManagerUtil @@ -82,6 +83,12 @@ blue:((float) b / 255.0f) alpha:alpha]; } ++(UIView*)dottedlinewithFrame:(CGRect)frame +{ + DottedLineView* dottedlineView = [[DottedLineView alloc] initWithFrame:frame]; + dottedlineView.backgroundColor = [UIColor clearColor]; + return dottedlineView; +} +(UIView*)lineWithColor:(UIColor*)color withAlpha:(CGFloat)alpha withFrame:(CGRect)frame { UIView* lineView = [[UIView alloc] initWithFrame:frame]; diff --git a/ManagerDemo/Common/UIViewShape/DottedLineView.h b/ManagerDemo/Common/UIViewShape/DottedLineView.h new file mode 100644 index 0000000..a7834e3 --- /dev/null +++ b/ManagerDemo/Common/UIViewShape/DottedLineView.h @@ -0,0 +1,13 @@ +// +// DottedLineView.h +// ManagerDemo +// +// Created by xmfish on 14-9-24. +// Copyright (c) 2014年 ash. All rights reserved. +// + +#import + +@interface DottedLineView : UIView + +@end diff --git a/ManagerDemo/Common/UIViewShape/DottedLineView.m b/ManagerDemo/Common/UIViewShape/DottedLineView.m new file mode 100644 index 0000000..0fde161 --- /dev/null +++ b/ManagerDemo/Common/UIViewShape/DottedLineView.m @@ -0,0 +1,49 @@ +// +// DottedLineView.m +// ManagerDemo +// +// Created by xmfish on 14-9-24. +// Copyright (c) 2014年 ash. All rights reserved. +// + +#import "DottedLineView.h" + +@implementation DottedLineView + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + // Initialization code + } + return self; +} + +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect +{ + // Drawing code + UIImageView *imageView1 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; + [self addSubview:imageView1]; + + + UIGraphicsBeginImageContext(imageView1.frame.size); //开始画线 + [imageView1.image drawInRect:CGRectMake(0, 0, imageView1.frame.size.width, imageView1.frame.size.height)]; + CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); //设置线条终点形状 + + + CGFloat lengths[] = {1,50}; + CGContextRef line = UIGraphicsGetCurrentContext(); + CGContextSetStrokeColorWithColor(line, [UIColor lightGrayColor].CGColor); + + CGContextSetLineDash(line, 0, lengths, 1); //画虚线 + CGContextMoveToPoint(line, 0.0, self.frame.size.height); //开始画线 + CGContextAddLineToPoint(line, self.frame.size.width, self.frame.size.height); + CGContextStrokePath(line); + + imageView1.image = UIGraphicsGetImageFromCurrentImageContext(); +} + + +@end diff --git a/ManagerDemo/MainView/HomeView/HomeMainView.h b/ManagerDemo/MainView/HomeView/HomeMainView.h index 759b8bd..f131bc8 100644 --- a/ManagerDemo/MainView/HomeView/HomeMainView.h +++ b/ManagerDemo/MainView/HomeView/HomeMainView.h @@ -25,6 +25,7 @@ @property (weak, nonatomic) IBOutlet UILabel *infoLabel; - (IBAction)sureBtnClick:(id)sender; @property (weak, nonatomic) IBOutlet UILabel *securityDescLabel; +@property (weak, nonatomic) IBOutlet UIImageView *tipImg; @@ -36,5 +37,6 @@ -(void)setInfo:(NSString*)info; -(void)setSecurityDesc:(NSString*)securityDesc; -(void)setTime:(NSString*)time withStartBuy:(NSInteger)money; +-(void)setTipColor:(NSString*)tipColor; @end diff --git a/ManagerDemo/MainView/HomeView/HomeMainView.m b/ManagerDemo/MainView/HomeView/HomeMainView.m index 681a534..a5e9772 100644 --- a/ManagerDemo/MainView/HomeView/HomeMainView.m +++ b/ManagerDemo/MainView/HomeView/HomeMainView.m @@ -95,7 +95,7 @@ NSCharacterSet* nonDigits = [[NSCharacterSet decimalDigitCharacterSet] invertedSet]; time = [time stringByReplacingOccurrencesOfString:[time stringByTrimmingCharactersInSet:nonDigits] withString:[NSString stringWithFormat:@"限%@个月",[time stringByTrimmingCharactersInSet:nonDigits]]]; //时间 - NSString* htmlStr = [NSString stringWithFormat:@"%@%d元起购",time,money]; + NSString* htmlStr = [NSString stringWithFormat:@"%@%ld元起购",time,money]; NSData* data = [htmlStr dataUsingEncoding:NSUTF8StringEncoding]; NSAttributedString* percentString = [[NSAttributedString alloc] initWithHTMLData:data documentAttributes:NULL]; _timeLabel.attributedString = percentString; @@ -112,6 +112,16 @@ { [_securityDescLabel setText:securityDesc]; } +-(void)setTipColor:(NSString*)tipColor +{ + if ([tipColor isEqualToString:@"RED"]) { + [_tipImg setImage:[UIImage imageNamed:@"sale_red_icon"]]; + }else if([tipColor isEqualToString:@"GRAY"]){ + [_tipImg setImage:[UIImage imageNamed:@"sale_gray_icon"]]; + }else{ + [_tipImg setImage:[UIImage imageNamed:@"sale_blue_icon"]]; + } +} #pragma mark - CABasicAnimationDelegate - (void)animationDidStart:(CAAnimation *)theAnimation diff --git a/ManagerDemo/MainView/HomeView/HomeMainView.xib b/ManagerDemo/MainView/HomeView/HomeMainView.xib index 81c1f34..4ece33e 100644 --- a/ManagerDemo/MainView/HomeView/HomeMainView.xib +++ b/ManagerDemo/MainView/HomeView/HomeMainView.xib @@ -120,6 +120,7 @@ + diff --git a/ManagerDemo/MainView/ListView/FundListCell.m b/ManagerDemo/MainView/ListView/FundListCell.m index 04fce04..0250fe3 100644 --- a/ManagerDemo/MainView/ListView/FundListCell.m +++ b/ManagerDemo/MainView/ListView/FundListCell.m @@ -53,21 +53,28 @@ } -(void)setInfoDic:(NSDictionary *)dic { - self.productId = [dic objectForKey:@"id"]; - self.nameLabel.text = [dic objectForKey:@"proName"]; - self.profitLabel.text = [NSString stringWithFormat:@"%.2f + %.2f%%",[[dic objectForKey:@"nhsy"] floatValue],[[dic objectForKeyWithoutNull:@"fd"] floatValue]]; + self.productId = [dic objectForKeyWithoutNull:@"id"]; + self.nameLabel.text = [dic objectForKeyWithoutNull:@"proName"]; + self.profitLabel.text = [NSString stringWithFormat:@"%.2f + %.2f%%",[[dic objectForKeyWithoutNull:@"nhsy"] floatValue],[[dic objectForKeyWithoutNull:@"fd"] floatValue]]; self.totalLabel.text = [NSString stringWithFormat:@"已申购%.0f人",[[dic objectForKeyWithoutNull:@"ygrs"] floatValue]]; - self.priceLabel.text = [NSString stringWithFormat:@"%@元",[dic objectForKey:@"wfsy"]]; + self.priceLabel.text = [NSString stringWithFormat:@"%@元",[dic objectForKeyWithoutNull:@"wfsy"]]; [self setLowestPriceWtihCount:[[dic objectForKey:@"startBuy"] integerValue]]; NSMutableString* timeStr = [[NSMutableString alloc] initWithString:@"随买随卖"]; [timeStr insertString:@"" atIndex:1]; [timeStr insertString:@"" atIndex:0]; [self setBuyTypeWithString:timeStr]; - if ([[dic objectForKey:@"tip"] isKindOfClass:[NSString class]]) { + if ([[dic objectForKeyWithoutNull:@"proType"] isEqualToString:@"JJ"]) { + _typeImg.hidden = YES; + }else{ _typeImg.hidden = NO; _typeLabel.text = [dic objectForKey:@"tip"]; - }else{ - _typeImg.hidden = YES; + if ([[dic objectForKeyWithoutNull:@"tipColor"] isEqualToString:@"RED"]) { + [_typeImg setImage:[UIImage imageNamed:@"sale_red_icon"]]; + }else if ([[dic objectForKeyWithoutNull:@"tipColor"] isEqualToString:@"GRAY"]){ + [_typeImg setImage:[UIImage imageNamed:@"sale_gray_icon"]]; + }else{ + [_typeImg setImage:[UIImage imageNamed:@"sale_blue_icon"]]; + } } } @end diff --git a/ManagerDemo/MainView/ListView/FundListViewController.m b/ManagerDemo/MainView/ListView/FundListViewController.m index a780d93..101b892 100644 --- a/ManagerDemo/MainView/ListView/FundListViewController.m +++ b/ManagerDemo/MainView/ListView/FundListViewController.m @@ -33,31 +33,6 @@ #pragma mark MJRefreshDelegate -(void)loadData { -// DaiDaiTongApi* daiDaiTongApi = [DaiDaiTongApi shareInstance]; -// [daiDaiTongApi productListForType:@"HW" withPageNum:_pageNum withCompletionBlock:^(id jsonRes) { -// -// if ([[jsonRes objectForKey:@"succ"] integerValue] == 1) { -// if (_pageNum == 1) { -// [_productInfoArray removeAllObjects]; -// [self.tableView addFooterWithTarget:self action:@selector(footerRereshing)]; -// } -// [_productInfoArray addObjectsFromArray:[jsonRes objectForKey:@"datas"]]; -// // 刷新表格 -// if ([[jsonRes objectForKey:@"totalPages"] integerValue] <= [[jsonRes objectForKey:@"pageNum"] integerValue]) { -// [self.tableView removeFooter]; -// } -// [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]; -// }]; DaiDaiTongTestApi* daiDaiTongTestApi = [DaiDaiTongTestApi shareInstance]; [daiDaiTongTestApi getApiWithParam:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInteger:_pageNum],@"pageNum",@"JJ",@"type", nil] withApiType:@"proList" completionBlock:^(id jsonRes) { diff --git a/ManagerDemo/MainView/ListView/LoanListCell.m b/ManagerDemo/MainView/ListView/LoanListCell.m index 29b1ff3..a9ade24 100644 --- a/ManagerDemo/MainView/ListView/LoanListCell.m +++ b/ManagerDemo/MainView/ListView/LoanListCell.m @@ -67,7 +67,7 @@ } -(void)setStartBuy:(NSInteger)price { - _priceLabel.text = [NSString stringWithFormat:@"%d元起购",price]; + _priceLabel.text = [NSString stringWithFormat:@"%ld元起购",price]; } -(void)setInfoDic:(NSDictionary *)dic { @@ -80,44 +80,17 @@ }else{ self.typeLabel.text = [dic objectForKeyWithoutNull:@"tip"]; } -// if ([[dic objectForKey:@"state"] integerValue] == 1 ) { - [self setPercent:[[dic objectForKeyWithoutNull:@"percent"] floatValue]]; - [self setStartBuy:[[dic objectForKeyWithoutNull:@"startBuy"] integerValue]]; - NSString* timeStr = [NSString stringWithFormat:@"%@个月起",[dic objectForKeyWithoutNull:@"timeLimit"]]; - [self setTimeWithString:timeStr]; -// } -// else if([[dic objectForKey:@"state"] integerValue] == 2){ -// [self setTimeWithString:@"最近还款日"]; -// [_percentView setProgress:0 animated:NO]; -// NSString* htmlStr = [NSString stringWithFormat:@"%@ ",[dic objectForKey:@"percent"]]; -// htmlStr = [htmlStr stringByReplacingOccurrencesOfString:@"\n" withString:@"

"]; -// NSData *data = [htmlStr dataUsingEncoding:NSUTF8StringEncoding]; -// NSDictionary* optionsDic = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:kCTTextAlignmentCenter],DTDefaultTextAlignment, nil]; -// NSAttributedString *percentString = [[NSAttributedString alloc] initWithHTMLData:data options:optionsDic documentAttributes:nil]; -// _percentDtlabel.attributedString = percentString; -// CGRect frame = _percentDtlabel.frame; -// CGSize size = [_percentDtlabel suggestedFrameSizeToFitEntireStringConstraintedToWidth:60.0]; -// frame.size.height = size.height+2; -// _percentDtlabel.frame = frame; -// _percentDtlabel.center = _pieImage.center; -// _priceLabel.text = [dic objectForKey:@"startTime"]; -// }else if ([[dic objectForKey:@"state"] integerValue] == 3) -// { -// [self setPercent:[[dic objectForKey:@"percent"] floatValue]]; -// [self setStartBuy:[[dic objectForKey:@"startBuy"] integerValue]]; -// NSString* htmlStr = [NSString stringWithFormat:@"%@ ",[dic objectForKey:@"percent"]]; -// htmlStr = [htmlStr stringByReplacingOccurrencesOfString:@"\n" withString:@"

"]; -// NSData *data = [htmlStr dataUsingEncoding:NSUTF8StringEncoding]; -// NSDictionary* optionsDic = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:kCTTextAlignmentCenter],DTDefaultTextAlignment, nil]; -// NSAttributedString *percentString = [[NSAttributedString alloc] initWithHTMLData:data options:optionsDic documentAttributes:nil]; -// _percentDtlabel.attributedString = percentString; -// CGRect frame = _percentDtlabel.frame; -// CGSize size = [_percentDtlabel suggestedFrameSizeToFitEntireStringConstraintedToWidth:_percentDtlabel.frame.size.width]; -// frame.size.height = size.height; -// _percentDtlabel.frame = frame; -// _percentDtlabel.center = _pieImage.center; -// -// } - + [self setPercent:[[dic objectForKeyWithoutNull:@"percent"] floatValue]]; + [self setStartBuy:[[dic objectForKeyWithoutNull:@"startBuy"] integerValue]]; + NSString* timeStr = [NSString stringWithFormat:@"%@个月起",[dic objectForKeyWithoutNull:@"timeLimit"]]; + [self setTimeWithString:timeStr]; + + if ([[dic objectForKeyWithoutNull:@"tipColor"] isEqualToString:@"RED"]) { + [_typeImg setImage:[UIImage imageNamed:@"sale_red_icon"]]; + }else if ([[dic objectForKeyWithoutNull:@"tipColor"] isEqualToString:@"GRAY"]){ + [_typeImg setImage:[UIImage imageNamed:@"sale_gray_icon"]]; + }else{ + [_typeImg setImage:[UIImage imageNamed:@"sale_blue_icon"]]; + } } @end diff --git a/ManagerDemo/MainView/ListView/OtherListViewController.m b/ManagerDemo/MainView/ListView/OtherListViewController.m index 3c0231c..8364436 100644 --- a/ManagerDemo/MainView/ListView/OtherListViewController.m +++ b/ManagerDemo/MainView/ListView/OtherListViewController.m @@ -34,21 +34,20 @@ -(void)headerRereshing { - DaiDaiTongApi* daiDaiTongApi = [DaiDaiTongApi shareInstance]; - [daiDaiTongApi productListForType:@"HK" withPageNum:_pageNum withCompletionBlock:^(id jsonRes) { - - if ([[jsonRes objectForKey:@"succ"] integerValue] == 1) { + DaiDaiTongTestApi* daiDaiTongTestApi = [DaiDaiTongTestApi shareInstance]; + [daiDaiTongTestApi getApiWithParam:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInteger:_pageNum],@"pageNum",@"QT",@"type", nil] withApiType:@"proList" completionBlock:^(id jsonRes) { + if ([[jsonRes objectForKey:@"resultflag"] integerValue] == 0) { if (_pageNum == 1) { [_productInfoArray removeAllObjects]; [self.tableView addFooterWithTarget:self action:@selector(footerRereshing)]; } - [_productInfoArray addObjectsFromArray: [jsonRes objectForKey:@"datas"]]; + [_productInfoArray addObjectsFromArray:[jsonRes objectForKey:@"proList"]]; // 刷新表格 - if ([[jsonRes objectForKey:@"totalPages"] integerValue] <= [[jsonRes objectForKey:@"pageNum"] integerValue]) { + if ([[jsonRes objectForKey:@"totalNum"] integerValue] <= _pageNum*20) { [self.tableView removeFooter]; } - [self.tableView reloadData]; + [self.tableView reloadData]; }else{ [MBProgressHUD errorHudWithView:nil label:[jsonRes objectForKey:@"err_msg"] hidesAfter:0.5]; } @@ -56,7 +55,7 @@ [self footerEndRefreshing]; } failedBlock:^(NSError *error) { - [MBProgressHUD errorHudWithView:self.view label:@"网络出错" hidesAfter:1.0]; + [MBProgressHUD errorHudWithView:self.view label:@"网络出错" hidesAfter:0.5]; [self headerEndRefreshing]; [self footerEndRefreshing]; }]; @@ -94,7 +93,9 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:NO]; + FundListCell* cell = (FundListCell*)[tableView cellForRowAtIndexPath:indexPath]; OtherProductInfoViewController* otherProductInfoViewController =[[OtherProductInfoViewController alloc] init]; + otherProductInfoViewController.productId = cell.productId; otherProductInfoViewController.hidesBottomBarWhenPushed = YES; [self.delegate.navigationController pushViewController:otherProductInfoViewController animated:YES]; diff --git a/ManagerDemo/MainView/ProductView/FundCaculateViewController.h b/ManagerDemo/MainView/ProductView/FundCaculateViewController.h index 5975595..0fe117c 100644 --- a/ManagerDemo/MainView/ProductView/FundCaculateViewController.h +++ b/ManagerDemo/MainView/ProductView/FundCaculateViewController.h @@ -11,10 +11,15 @@ @interface FundCaculateViewController : UIViewController { float _qrnh; + float _extraPoint; NSString* _name; + NSString* _productId; + } @property (strong, nonatomic)NSString* name; +@property (strong, nonatomic)NSString* productId; @property (assign, nonatomic)float qrnh; +@property (assign, nonatomic)float extraPoint; @property (weak, nonatomic) IBOutlet UITableView *tableView; @property (weak, nonatomic) IBOutlet UILabel *nameLabel; @property (weak, nonatomic) IBOutlet UILabel *sgqeLabel; diff --git a/ManagerDemo/MainView/ProductView/FundCaculateViewController.m b/ManagerDemo/MainView/ProductView/FundCaculateViewController.m index da09b63..c5926df 100644 --- a/ManagerDemo/MainView/ProductView/FundCaculateViewController.m +++ b/ManagerDemo/MainView/ProductView/FundCaculateViewController.m @@ -46,12 +46,27 @@ } -(void)initData { +// [MBProgressHUD hudWithView:self.view label:@"安全加载中"]; +// DaiDaiTongTestApi* daiDaiTongTestApi = [DaiDaiTongTestApi shareInstance]; +// [daiDaiTongTestApi getApiWithParam:[NSDictionary dictionaryWithObjectsAndKeys:@"10000",@"money", @"365", @"days", _productId, @"proId",nil] withApiType:@"estimateJjProfit" completionBlock:^(id jsonRes) { +// [MBProgressHUD hideAllHUDsForView:self.view animated:YES]; +// if ([[jsonRes objectForKey:@"resultflag"] integerValue] == 1) { +// [MBProgressHUD errorHudWithView:self.view label:[jsonRes objectForKey:@"resultMsg"] hidesAfter:0.5]; +// }else{ +// +// } +// } failedBlock:^(NSError *error) { +// [MBProgressHUD errorHudWithView:self.view label:@"网络出错" hidesAfter:0.5]; +// }]; + _nameLabel.text = _name; _ygsy1Label.text = [NSString stringWithFormat:@"%.2f元",_qrnh*10000*1/365]; _ygsy7Label.text = [NSString stringWithFormat:@"%.2f元",_qrnh*10000*7/365]; _ygsy30Label.text = [NSString stringWithFormat:@"%.2f元",_qrnh*10000*30/365]; _ygsy90Label.text = [NSString stringWithFormat:@"%.2f元",_qrnh*10000*90/365]; _ygsy365Label.text = [NSString stringWithFormat:@"%.2f元",_qrnh*10000*365/365]; + + } #pragma mark Responding to keyboard events - (void)keyboardWillShow:(NSNotification *)notification @@ -139,10 +154,12 @@ if ([_amountTextField.text isEqualToString:@""] && [_timeTextField.text isEqualToString:@""]) { _ygsyLabel.text = [NSString stringWithFormat:@"%.2f 元",_qrnh*10000]; _yhhqsyLabel.text = [NSString stringWithFormat:@"%.2f 元",0.0035*10000]; + _jfsyLabel.text = [NSString stringWithFormat:@"%.0f 分",10000*_extraPoint]; }else{ NSInteger amount = [_amountTextField.text intValue]; NSInteger time = [_timeTextField.text intValue]; _ygsyLabel.text = [NSString stringWithFormat:@"%.2f 元",_qrnh*amount*time/365]; + _jfsyLabel.text = [NSString stringWithFormat:@"%.0f 分",_extraPoint * amount * (time/365.0)]; _yhhqsyLabel.text = [NSString stringWithFormat:@"%.2f 元",0.0035*amount*time/365]; } } diff --git a/ManagerDemo/MainView/ProductView/FundProductInfoViewController.m b/ManagerDemo/MainView/ProductView/FundProductInfoViewController.m index 4a1220e..2930afc 100644 --- a/ManagerDemo/MainView/ProductView/FundProductInfoViewController.m +++ b/ManagerDemo/MainView/ProductView/FundProductInfoViewController.m @@ -200,6 +200,7 @@ UIView* view = [ManagerUtil lineWithColor:Touch_BackGroudColor withAlpha:1.0 withFrame:CGRectMake(0, 0, 320, 1)]; return view; } + -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { if (section == 0) { @@ -281,7 +282,9 @@ FundCaculateViewController* fundCaculateViewController = [[FundCaculateViewController alloc] init]; fundCaculateViewController.qrnh = [[[_infoDic objectForKeyWithoutNull:@"fundcomp"] objectForKeyWithoutNull:@"qrnh"] floatValue]/100.0; -// fundCaculateViewController.name = + fundCaculateViewController.productId =[[_infoDic objectForKey:@"proInfo"] objectForKey:@"id"]; + fundCaculateViewController.extraPoint = [[[_infoDic objectForKey:@"proInfo"] objectForKey:@"extraPoint"] floatValue]; + fundCaculateViewController.name = [[_infoDic objectForKeyWithoutNull:@"fundcomp"] objectForKeyWithoutNull:@"comName"]; [self.navigationController pushViewController:fundCaculateViewController animated:YES]; } diff --git a/ManagerDemo/MainView/ProductView/OtherCaculateViewController.h b/ManagerDemo/MainView/ProductView/OtherCaculateViewController.h new file mode 100644 index 0000000..8524552 --- /dev/null +++ b/ManagerDemo/MainView/ProductView/OtherCaculateViewController.h @@ -0,0 +1,36 @@ +// +// OtherCaculateViewController.h +// ManagerDemo +// +// Created by xmfish on 14-9-24. +// Copyright (c) 2014年 ash. All rights reserved. +// + +#import + +@interface OtherCaculateViewController : UIViewController +{ + float _qrnh; + float _extraPoint; + NSString* _name; + NSString* _productId; +} +@property (strong, nonatomic)NSString* name; +@property (strong, nonatomic)NSString* productId; +@property (assign, nonatomic)float qrnh; +@property (assign, nonatomic)float extraPoint; +@property (weak, nonatomic) IBOutlet UITableView *tableView; +@property (weak, nonatomic) IBOutlet UILabel *profit1Label; +@property (weak, nonatomic) IBOutlet UILabel *profit3Label; +@property (weak, nonatomic) IBOutlet UILabel *profit5Label; +@property (weak, nonatomic) IBOutlet UILabel *profit7Label; +@property (weak, nonatomic) IBOutlet UITextField *amountTextField; +@property (weak, nonatomic) IBOutlet UITextField *timeTextField; +@property (weak, nonatomic) IBOutlet UILabel *ygsyLabel; +@property (weak, nonatomic) IBOutlet UILabel *jfsyLabel; +@property (strong, nonatomic) IBOutlet UIView *headView; +@property (weak, nonatomic) IBOutlet UILabel *nameLabel; +@property (weak, nonatomic) IBOutlet UIButton *caculateBtn; +- (IBAction)caculateBtnClick:(id)sender; + +@end diff --git a/ManagerDemo/MainView/ProductView/OtherCaculateViewController.m b/ManagerDemo/MainView/ProductView/OtherCaculateViewController.m new file mode 100644 index 0000000..5c17984 --- /dev/null +++ b/ManagerDemo/MainView/ProductView/OtherCaculateViewController.m @@ -0,0 +1,175 @@ +// +// OtherCaculateViewController.m +// ManagerDemo +// +// Created by xmfish on 14-9-24. +// Copyright (c) 2014年 ash. All rights reserved. +// + +#import "OtherCaculateViewController.h" + +@interface OtherCaculateViewController () + +@end + +@implementation OtherCaculateViewController + +- (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. + self.navigationItem.title = @"预估收益"; + _tableView.tableHeaderView = _headView; + _tableView.delegate = self; + _tableView.dataSource = self; + _amountTextField.delegate = self; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldTextDidChange:) name:UITextFieldTextDidChangeNotification object:_amountTextField]; + _timeTextField.delegate = self; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldTextDidChange:) name:UITextFieldTextDidChangeNotification object:_timeTextField]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; + + _caculateBtn.enabled = NO; + _caculateBtn.backgroundColor = [UIColor grayColor]; + [self initData]; + [self caculateBtnClick:nil]; +} +-(void)initData +{ + // [MBProgressHUD hudWithView:self.view label:@"安全加载中"]; + // DaiDaiTongTestApi* daiDaiTongTestApi = [DaiDaiTongTestApi shareInstance]; + // [daiDaiTongTestApi getApiWithParam:[NSDictionary dictionaryWithObjectsAndKeys:@"10000",@"money", @"365", @"days", _productId, @"proId",nil] withApiType:@"estimateJjProfit" completionBlock:^(id jsonRes) { + // [MBProgressHUD hideAllHUDsForView:self.view animated:YES]; + // if ([[jsonRes objectForKey:@"resultflag"] integerValue] == 1) { + // [MBProgressHUD errorHudWithView:self.view label:[jsonRes objectForKey:@"resultMsg"] hidesAfter:0.5]; + // }else{ + // + // } + // } failedBlock:^(NSError *error) { + // [MBProgressHUD errorHudWithView:self.view label:@"网络出错" hidesAfter:0.5]; + // }]; + + _nameLabel.text = _name; + _profit1Label.text = [NSString stringWithFormat:@"%.2f元",[self caculateProfit:10000 withDay:365]]; + _profit3Label.text = [NSString stringWithFormat:@"%.2f元",[self caculateProfit:10000 withDay:365*3]]; + _profit5Label.text = [NSString stringWithFormat:@"%.2f元",[self caculateProfit:10000 withDay:365*5]]; + _profit7Label.text = [NSString stringWithFormat:@"%.2f元",[self caculateProfit:10000 withDay:365*7]]; + +} +-(float)caculateProfit:(NSInteger)amount withDay:(NSInteger)dayTotal +{ + NSInteger tempDay = dayTotal; + float proFit = 0.0; + while (tempDay>0) { + if (tempDay>=365) { + proFit += _qrnh*(amount+proFit); + }else{ + proFit += _qrnh*(amount+proFit)*(tempDay/365.0); + } + tempDay -= 365; + } + return proFit; +} +#pragma mark Responding to keyboard events +- (void)keyboardWillShow:(NSNotification *)notification +{ + [UIView animateWithDuration:0.3 delay:0 options:0 animations:^(){ + CGRect frame = _tableView.frame; + frame.origin.y -= 120; + _tableView.frame = frame; + } completion:^(BOOL finished) + { + + }]; +} +- (void)keyboardWillHide:(NSNotification *)notification +{ + [UIView animateWithDuration:0.3 delay:0 options:0 animations:^(){ + CGRect frame = _tableView.frame; + frame.origin.y += 120; + _tableView.frame = frame; + } completion:^(BOOL finished) + { + + }]; +} +#pragma mark UITableViewDelegate +-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 0; +} +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return 0; +} +-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return nil; +} +-(void)scrollViewDidScroll:(UIScrollView *)scrollView +{ + [_timeTextField resignFirstResponder]; + [_amountTextField resignFirstResponder]; +} +#pragma mark UITextFieldDelegate +-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField +{ + textField.layer.borderColor = [[UIColor orangeColor]CGColor]; + return YES; +} +- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string +{ + + if ([textField.text length] >= 7) + return NO; // return NO to not change text + + return YES; +} +-(void)textFieldTextDidChange:(NSNotification *)sender +{ + if ([_amountTextField.text isEqualToString:@""] || [_timeTextField.text isEqualToString:@""]) { + _caculateBtn.enabled = NO; + _caculateBtn.backgroundColor = [UIColor grayColor]; + }else{ + _caculateBtn.enabled = YES; + _caculateBtn.backgroundColor = [UIColor redColor]; + } +} +-(BOOL)textFieldShouldEndEditing:(UITextField *)textField +{ + + return YES; +} + +-(void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (IBAction)caculateBtnClick:(id)sender { + if ([_amountTextField.text isEqualToString:@""] && [_timeTextField.text isEqualToString:@""]) { + _ygsyLabel.text = [NSString stringWithFormat:@"%.2f 元",_qrnh*10000]; + _jfsyLabel.text = [NSString stringWithFormat:@"%.0f 分",10000*_extraPoint]; + }else{ + NSInteger amount = [_amountTextField.text intValue]; + NSInteger time = [_timeTextField.text intValue]; + _ygsyLabel.text = [NSString stringWithFormat:@"%.2f 元",[self caculateProfit:amount withDay:time]]; + _jfsyLabel.text = [NSString stringWithFormat:@"%.0f 分",_extraPoint * amount * (time/365.0)]; + } +} +@end diff --git a/ManagerDemo/MainView/ProductView/OtherCaculateViewController.xib b/ManagerDemo/MainView/ProductView/OtherCaculateViewController.xib new file mode 100644 index 0000000..b2c069b --- /dev/null +++ b/ManagerDemo/MainView/ProductView/OtherCaculateViewController.xib @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.h b/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.h index 7df225d..ce459be 100644 --- a/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.h +++ b/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.h @@ -8,7 +8,12 @@ #import #import "ToolBarView.h" +#import "TableCellLineView.h" @interface OtherProductInfoViewController : UIViewController +{ + NSString* _productId; +} +@property (strong, nonatomic)NSString* productId; @property (weak, nonatomic) IBOutlet UITableView *tableView; @property (weak, nonatomic) IBOutlet ToolBarView *toolBarView; @property (strong, nonatomic) IBOutlet UITableViewCell *headCell; @@ -16,5 +21,19 @@ @property (strong, nonatomic) IBOutlet UITableViewCell *resultsInfoCell; @property (strong, nonatomic) IBOutlet UITableViewCell *aboutCell; @property (strong, nonatomic) IBOutlet UITableViewCell *securityInfoCell; +@property (weak, nonatomic) IBOutlet UILabel *startBuyLabel; +@property (weak, nonatomic) IBOutlet UILabel *qrnhLabel; +@property (weak, nonatomic) IBOutlet UILabel *sgrsLabel; +@property (weak, nonatomic) IBOutlet UILabel *wfsyLabel; +@property (weak, nonatomic) IBOutlet UILabel *detailLabel; +@property (weak, nonatomic) IBOutlet TableCellLineView *ygrsLabel; +@property (weak, nonatomic) IBOutlet TableCellLineView *gmbsLabel; +@property (weak, nonatomic) IBOutlet TableCellLineView *totalAmountLabel; +@property (weak, nonatomic) IBOutlet TableCellLineView *rjsgLabel; +@property (weak, nonatomic) IBOutlet TableCellLineView *profitLabel; +@property (weak, nonatomic) IBOutlet UILabel *jgaqInfoLabel; +@property (weak, nonatomic) IBOutlet UILabel *gsaqInfoLabel; +@property (weak, nonatomic) IBOutlet TableCellLineView *comPanyNameLabel; +@property (weak, nonatomic) IBOutlet UILabel *comPanyInfoLabel; @end diff --git a/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.m b/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.m index 0bbfb34..4d9e3fc 100644 --- a/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.m +++ b/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.m @@ -9,8 +9,12 @@ #import "OtherProductInfoViewController.h" #import "MJRefresh.h" #import "FundCaculateViewController.h" +#import "MainOrderViewController.h" +#import "OtherCaculateViewController.h" @interface OtherProductInfoViewController () - +{ + NSDictionary* _infoDic; +} @end @implementation OtherProductInfoViewController @@ -40,20 +44,75 @@ //右边按钮。 [self.navigationItem setRightBarButtonItem:[[UIBarButtonItem alloc]initWithTitle:@"刷新" style:UIBarButtonItemStyleDone target:self action:@selector(headerBeginRefreshing)]]; - + [self headerBeginRefreshing]; } + +-(void)initData +{ + self.navigationItem.title = [[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"proName"]; + + + _startBuyLabel.text = [[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"startBuy"]; + _qrnhLabel.text = [NSString stringWithFormat:@"%@%%",[[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"qrsy"]]; +// _sgrsLabel.text = [[_infoDic objectForKeyWithoutNull:@"detail"] objectForKeyWithoutNull:@"buyPerNum"]; + _wfsyLabel.text = [NSString stringWithFormat:@"%.4f%%",[[[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"wfsy"] floatValue]]; + _detailLabel.text = [NSString stringWithFormat:@"额外%@%%积分奖励",[[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"extraPoint"]]; + _ygrsLabel.leftTitleLabel.text = @"已申购人数:"; + _ygrsLabel.leftInfoLabel.hidden = YES; + _ygrsLabel.rightTitleLabel.hidden = YES; +// _ygrsLabel.rightInfoLabel.text = [NSString stringWithFormat:@"%@ 人",[[_infoDic objectForKeyWithoutNull:@"detail"] objectForKeyWithoutNull:@"buyPerNum"]]; + _gmbsLabel.leftTitleLabel.text = @"购买比数:"; + _gmbsLabel.leftInfoLabel.hidden = YES; + _gmbsLabel.rightTitleLabel.hidden = YES; +// _gmbsLabel.rightInfoLabel.text = [NSString stringWithFormat:@"%@ 笔",[[_infoDic objectForKeyWithoutNull:@"detail"] objectForKeyWithoutNull:@"buyNum"]]; + + _totalAmountLabel.leftTitleLabel.text = @"总申购金额:"; + _totalAmountLabel.leftInfoLabel.hidden = YES; + _totalAmountLabel.rightTitleLabel.hidden = YES; + _totalAmountLabel.rightInfoLabel.text = [NSString stringWithFormat:@"%.2f 元",[[[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"totalMoney"] floatValue]]; + + _rjsgLabel.leftTitleLabel.text = @"人均申购金额:"; + _rjsgLabel.leftInfoLabel.hidden = YES; + _rjsgLabel.rightTitleLabel.hidden = YES; +// _rjsgLabel.rightInfoLabel.text = [NSString stringWithFormat:@"%@ 元",[[_infoDic objectForKeyWithoutNull:@"detail"] objectForKeyWithoutNull:@"avgMoney"]]; + _profitLabel.leftTitleLabel.text = @"预期年化:"; + _profitLabel.leftInfoLabel.text = [NSString stringWithFormat:@"%@ %%",[[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"nhsy"]]; + _profitLabel.rightTitleLabel.text = @"万份收益:"; + _profitLabel.rightInfoLabel.text = [NSString stringWithFormat:@"%@元",[[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"wfsy"]]; + + _comPanyNameLabel.leftTitleLabel.text = @"销售公司:"; + _comPanyNameLabel.leftInfoLabel.text = [[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"comName"]; + _comPanyNameLabel.rightTitleLabel.text = @"理财类型:"; + _comPanyNameLabel.rightInfoLabel.text = [[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"saleComName"]; + +} + #pragma mark MJRefreshDelegate - (void)headerRereshing { - // 2.2秒后刷新表格UI - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - // 刷新表格 + DaiDaiTongTestApi* daiDaiTongTestApi = [DaiDaiTongTestApi shareInstance]; + [daiDaiTongTestApi getApiWithParam:[NSDictionary dictionaryWithObjectsAndKeys:_productId,@"proId", nil] withApiType:@"proDetail" completionBlock:^(id jsonRes) { + if ([[jsonRes objectForKey:@"resultflag"] integerValue] == 0) { + self.navigationItem.title = [jsonRes objectForKey:@"fundName"]; + _infoDic = [NSDictionary dictionaryWithDictionary:jsonRes]; + if ([[[jsonRes objectForKey:@"proInfo"] objectForKey:@"state"] integerValue] == 1) { + [_toolBarView setEnable:YES]; + }else{ + [_toolBarView setEnable:NO]; + } + }else{ + + [MBProgressHUD errorHudWithView:nil label:[jsonRes objectForKey:@"err_msg"] hidesAfter:0.5]; + } [self.tableView reloadData]; - - // (最好在刷新表格后调用)调用endRefreshing可以结束刷新状态 + [self initData]; [self.tableView headerEndRefreshing]; - }); + } failedBlock:^(NSError *error) { + [self.tableView headerEndRefreshing]; + [MBProgressHUD errorHudWithView:self.view label:@"网络出错" hidesAfter:0.5]; + }]; + } - (void)footerRereshing @@ -199,21 +258,33 @@ break; } + cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } #pragma mark ToolBarViewDelegate -(void)caculateProfit { -// FundCaculateViewController* fundCaculateViewController = [[FundCaculateViewController alloc] init]; -// -// fundCaculateViewController.qrnh = _infoDic; -// [self.navigationController pushViewController:proFitCaculateViewController animated:YES]; + OtherCaculateViewController* otherCaculateViewController = [[OtherCaculateViewController alloc] init]; + + otherCaculateViewController.qrnh = [[[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"nhsy"] floatValue]/100.0; + otherCaculateViewController.productId =[[_infoDic objectForKey:@"proInfo"] objectForKey:@"id"]; + otherCaculateViewController.extraPoint = [[[_infoDic objectForKey:@"proInfo"] objectForKey:@"extraPoint"] floatValue]; +// otherCaculateViewController.name = [[_infoDic objectForKeyWithoutNull:@"proInfo"] objectForKeyWithoutNull:@"comName"]; + [self.navigationController pushViewController:otherCaculateViewController animated:YES]; } -(void)buyFund { if (![ManagerUser shareInstance].isLogin) { [ManagerUtil presentLoginView]; + }else{ + MainOrderViewController* mainOrderViewController = [[MainOrderViewController alloc] init]; + mainOrderViewController.productId =[[_infoDic objectForKey:@"proInfo"] objectForKey:@"id"]; + mainOrderViewController.productName = [[_infoDic objectForKey:@"proInfo"] objectForKey:@"proName"]; + mainOrderViewController.timeLimitNum = [[[_infoDic objectForKey:@"proInfo"] objectForKey:@"timeLimit"] integerValue]; + mainOrderViewController.startBuy = [[[_infoDic objectForKey:@"proInfo"] objectForKey:@"startBuy"] integerValue]; + mainOrderViewController.type = 1; + [self.navigationController pushViewController:mainOrderViewController animated:YES]; } } - (void)didReceiveMemoryWarning diff --git a/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.xib b/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.xib index e4bfaeb..7c0decb 100644 --- a/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.xib +++ b/ManagerDemo/MainView/ProductView/OtherProductInfoViewController.xib @@ -7,13 +7,27 @@ + + + + + + + + + + + + + + @@ -75,7 +89,7 @@ -