Commit 761ba49d authored by admin's avatar admin

完成公告大部分

parent 0ef0fbc5
......@@ -49,10 +49,19 @@
84970E361BD8E09D00C1728A /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84970E351BD8E09D00C1728A /* LoginViewController.m */; };
84970E391BD8E0B300C1728A /* LoginView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84970E381BD8E0B300C1728A /* LoginView.m */; };
8497B62B1C043671007ECBE6 /* InspectTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8497B62A1C043671007ECBE6 /* InspectTableView.m */; };
849B2F711C0CA22F005D809F /* AnnoContentTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 849B2F701C0CA22F005D809F /* AnnoContentTableViewCell.m */; };
849B2F741C0CA60E005D809F /* AnnounceDetailFootView.m in Sources */ = {isa = PBXBuildFile; fileRef = 849B2F731C0CA60E005D809F /* AnnounceDetailFootView.m */; };
849B2F771C0CABE6005D809F /* AnnounceDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 849B2F761C0CABE6005D809F /* AnnounceDetailModel.m */; };
84A673881C0B50B4000F828E /* OnLineCompleteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A673871C0B50B4000F828E /* OnLineCompleteViewController.m */; };
84A6738B1C0B54A6000F828E /* OnLineCompleteHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A6738A1C0B54A6000F828E /* OnLineCompleteHeadView.m */; };
84A6738E1C0BE2D0000F828E /* OnLineCompleteCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A6738D1C0BE2D0000F828E /* OnLineCompleteCell.m */; };
84A673911C0C2681000F828E /* FunctionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A673901C0C2681000F828E /* FunctionViewController.m */; };
84A673BE1C0C7AEB000F828E /* AnnoTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A673B41C0C7AEB000F828E /* AnnoTableViewCell.m */; };
84A673BF1C0C7AEB000F828E /* AnnounceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A673B71C0C7AEB000F828E /* AnnounceModel.m */; };
84A673C01C0C7AEB000F828E /* FuncItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A673BA1C0C7AEB000F828E /* FuncItem.m */; };
84A673C11C0C7AEB000F828E /* AnnounceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A673BD1C0C7AEB000F828E /* AnnounceViewController.m */; };
84A673C41C0C7B0A000F828E /* AnnoDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A673C31C0C7B0A000F828E /* AnnoDetailViewController.m */; };
84A673C71C0C7E0C000F828E /* AnnounceDetailHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A673C61C0C7E0C000F828E /* AnnounceDetailHeadView.m */; };
84AD4F201BF425AC00BFB37C /* InspectDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84AD4F1F1BF425AC00BFB37C /* InspectDetailView.m */; };
84AD4F221BF42F8E00BFB37C /* classfiy.plist in Resources */ = {isa = PBXBuildFile; fileRef = 84AD4F211BF42F8E00BFB37C /* classfiy.plist */; };
84AD4F261BF4356A00BFB37C /* TaskModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 84AD4F251BF4356A00BFB37C /* TaskModel.m */; };
......@@ -67,7 +76,6 @@
84AD4F491BF4BC0600BFB37C /* RankDetailTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84AD4F481BF4BC0600BFB37C /* RankDetailTableCell.m */; };
84C9574D1BDB344900083584 /* UIBarButtonItem+Create.m in Sources */ = {isa = PBXBuildFile; fileRef = 84C9574A1BDB344900083584 /* UIBarButtonItem+Create.m */; };
84C9574E1BDB344900083584 /* UIView+Frame.m in Sources */ = {isa = PBXBuildFile; fileRef = 84C9574C1BDB344900083584 /* UIView+Frame.m */; };
84C957551BDB54D600083584 /* AnnounceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84C957541BDB54D600083584 /* AnnounceViewController.m */; };
84CC34CC1C093C2F002F10E2 /* OnLineTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34C11C093C2F002F10E2 /* OnLineTableViewCell.m */; };
84CC34CD1C093C2F002F10E2 /* OnLineFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34C41C093C2F002F10E2 /* OnLineFooterView.m */; };
84CC34CE1C093C2F002F10E2 /* OnLineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34C71C093C2F002F10E2 /* OnLineViewController.m */; };
......@@ -91,7 +99,6 @@
84DAB3EA1C07605F00F3E416 /* InspectNoUpLoadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DAB3E91C07605F00F3E416 /* InspectNoUpLoadViewController.m */; };
84DAB3ED1C07645F00F3E416 /* InspectPointCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DAB3EC1C07645F00F3E416 /* InspectPointCell.m */; };
84DAB3F01C076C2E00F3E416 /* InpectPictureCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DAB3EF1C076C2E00F3E416 /* InpectPictureCell.m */; };
84DAB3F61C0802FD00F3E416 /* FuncItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DAB3F51C0802FD00F3E416 /* FuncItem.m */; };
84DB9BC41BDCD4B600822CC4 /* CustomDropMenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DB9BC31BDCD4B600822CC4 /* CustomDropMenuView.m */; };
84DB9BC71BDCD67200822CC4 /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DB9BC61BDCD67200822CC4 /* UIView+Extension.m */; };
84E0ABCD1BFB082E001C8F45 /* TaskDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E0ABCC1BFB082E001C8F45 /* TaskDetailModel.m */; };
......@@ -219,6 +226,12 @@
84970E3F1BD9127A00C1728A /* Constant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constant.h; sourceTree = "<group>"; };
8497B6291C043671007ECBE6 /* InspectTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectTableView.h; sourceTree = "<group>"; };
8497B62A1C043671007ECBE6 /* InspectTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectTableView.m; sourceTree = "<group>"; };
849B2F6F1C0CA22F005D809F /* AnnoContentTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnoContentTableViewCell.h; sourceTree = "<group>"; };
849B2F701C0CA22F005D809F /* AnnoContentTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnoContentTableViewCell.m; sourceTree = "<group>"; };
849B2F721C0CA60E005D809F /* AnnounceDetailFootView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnounceDetailFootView.h; sourceTree = "<group>"; };
849B2F731C0CA60E005D809F /* AnnounceDetailFootView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnounceDetailFootView.m; sourceTree = "<group>"; };
849B2F751C0CABE6005D809F /* AnnounceDetailModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnounceDetailModel.h; sourceTree = "<group>"; };
849B2F761C0CABE6005D809F /* AnnounceDetailModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnounceDetailModel.m; sourceTree = "<group>"; };
84A673861C0B50B4000F828E /* OnLineCompleteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnLineCompleteViewController.h; sourceTree = "<group>"; };
84A673871C0B50B4000F828E /* OnLineCompleteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OnLineCompleteViewController.m; sourceTree = "<group>"; };
84A673891C0B54A6000F828E /* OnLineCompleteHeadView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnLineCompleteHeadView.h; sourceTree = "<group>"; };
......@@ -227,6 +240,18 @@
84A6738D1C0BE2D0000F828E /* OnLineCompleteCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OnLineCompleteCell.m; sourceTree = "<group>"; };
84A6738F1C0C2681000F828E /* FunctionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FunctionViewController.h; sourceTree = "<group>"; };
84A673901C0C2681000F828E /* FunctionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FunctionViewController.m; sourceTree = "<group>"; };
84A673B31C0C7AEB000F828E /* AnnoTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnoTableViewCell.h; sourceTree = "<group>"; };
84A673B41C0C7AEB000F828E /* AnnoTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnoTableViewCell.m; sourceTree = "<group>"; };
84A673B61C0C7AEB000F828E /* AnnounceModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnounceModel.h; sourceTree = "<group>"; };
84A673B71C0C7AEB000F828E /* AnnounceModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnounceModel.m; sourceTree = "<group>"; };
84A673B91C0C7AEB000F828E /* FuncItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FuncItem.h; sourceTree = "<group>"; };
84A673BA1C0C7AEB000F828E /* FuncItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FuncItem.m; sourceTree = "<group>"; };
84A673BC1C0C7AEB000F828E /* AnnounceViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnounceViewController.h; sourceTree = "<group>"; };
84A673BD1C0C7AEB000F828E /* AnnounceViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnounceViewController.m; sourceTree = "<group>"; };
84A673C21C0C7B0A000F828E /* AnnoDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnoDetailViewController.h; sourceTree = "<group>"; };
84A673C31C0C7B0A000F828E /* AnnoDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnoDetailViewController.m; sourceTree = "<group>"; };
84A673C51C0C7E0C000F828E /* AnnounceDetailHeadView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnounceDetailHeadView.h; sourceTree = "<group>"; };
84A673C61C0C7E0C000F828E /* AnnounceDetailHeadView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnounceDetailHeadView.m; sourceTree = "<group>"; };
84AD4F1E1BF425AC00BFB37C /* InspectDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectDetailView.h; sourceTree = "<group>"; };
84AD4F1F1BF425AC00BFB37C /* InspectDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectDetailView.m; sourceTree = "<group>"; };
84AD4F211BF42F8E00BFB37C /* classfiy.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = classfiy.plist; sourceTree = "<group>"; };
......@@ -254,8 +279,6 @@
84C9574B1BDB344900083584 /* UIView+Frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Frame.h"; sourceTree = "<group>"; };
84C9574C1BDB344900083584 /* UIView+Frame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Frame.m"; sourceTree = "<group>"; };
84C9574F1BDB38AA00083584 /* redstar.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = redstar.pch; sourceTree = "<group>"; };
84C957531BDB54D600083584 /* AnnounceViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnounceViewController.h; sourceTree = "<group>"; };
84C957541BDB54D600083584 /* AnnounceViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnounceViewController.m; sourceTree = "<group>"; };
84CC34C01C093C2F002F10E2 /* OnLineTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnLineTableViewCell.h; sourceTree = "<group>"; };
84CC34C11C093C2F002F10E2 /* OnLineTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OnLineTableViewCell.m; sourceTree = "<group>"; };
84CC34C31C093C2F002F10E2 /* OnLineFooterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnLineFooterView.h; sourceTree = "<group>"; };
......@@ -302,8 +325,6 @@
84DAB3EC1C07645F00F3E416 /* InspectPointCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectPointCell.m; sourceTree = "<group>"; };
84DAB3EE1C076C2E00F3E416 /* InpectPictureCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InpectPictureCell.h; sourceTree = "<group>"; };
84DAB3EF1C076C2E00F3E416 /* InpectPictureCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InpectPictureCell.m; sourceTree = "<group>"; };
84DAB3F41C0802FD00F3E416 /* FuncItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FuncItem.h; sourceTree = "<group>"; };
84DAB3F51C0802FD00F3E416 /* FuncItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FuncItem.m; sourceTree = "<group>"; };
84DB9BC21BDCD4B600822CC4 /* CustomDropMenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomDropMenuView.h; sourceTree = "<group>"; };
84DB9BC31BDCD4B600822CC4 /* CustomDropMenuView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomDropMenuView.m; sourceTree = "<group>"; };
84DB9BC51BDCD67200822CC4 /* UIView+Extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = "<group>"; };
......@@ -1107,6 +1128,102 @@
path = ViewController;
sourceTree = "<group>";
};
84A673AC1C0C7AEB000F828E /* AnnounceDetail */ = {
isa = PBXGroup;
children = (
84A673AD1C0C7AEB000F828E /* Cell */,
84A673AE1C0C7AEB000F828E /* Model */,
84A673AF1C0C7AEB000F828E /* View */,
84A673B01C0C7AEB000F828E /* ViewController */,
);
path = AnnounceDetail;
sourceTree = "<group>";
};
84A673AD1C0C7AEB000F828E /* Cell */ = {
isa = PBXGroup;
children = (
849B2F6F1C0CA22F005D809F /* AnnoContentTableViewCell.h */,
849B2F701C0CA22F005D809F /* AnnoContentTableViewCell.m */,
);
path = Cell;
sourceTree = "<group>";
};
84A673AE1C0C7AEB000F828E /* Model */ = {
isa = PBXGroup;
children = (
849B2F751C0CABE6005D809F /* AnnounceDetailModel.h */,
849B2F761C0CABE6005D809F /* AnnounceDetailModel.m */,
);
path = Model;
sourceTree = "<group>";
};
84A673AF1C0C7AEB000F828E /* View */ = {
isa = PBXGroup;
children = (
84A673C51C0C7E0C000F828E /* AnnounceDetailHeadView.h */,
84A673C61C0C7E0C000F828E /* AnnounceDetailHeadView.m */,
849B2F721C0CA60E005D809F /* AnnounceDetailFootView.h */,
849B2F731C0CA60E005D809F /* AnnounceDetailFootView.m */,
);
path = View;
sourceTree = "<group>";
};
84A673B01C0C7AEB000F828E /* ViewController */ = {
isa = PBXGroup;
children = (
84A673C21C0C7B0A000F828E /* AnnoDetailViewController.h */,
84A673C31C0C7B0A000F828E /* AnnoDetailViewController.m */,
);
path = ViewController;
sourceTree = "<group>";
};
84A673B11C0C7AEB000F828E /* AnnounceList */ = {
isa = PBXGroup;
children = (
84A673B21C0C7AEB000F828E /* Cell */,
84A673B51C0C7AEB000F828E /* Model */,
84A673B81C0C7AEB000F828E /* View */,
84A673BB1C0C7AEB000F828E /* ViewController */,
);
path = AnnounceList;
sourceTree = "<group>";
};
84A673B21C0C7AEB000F828E /* Cell */ = {
isa = PBXGroup;
children = (
84A673B31C0C7AEB000F828E /* AnnoTableViewCell.h */,
84A673B41C0C7AEB000F828E /* AnnoTableViewCell.m */,
);
path = Cell;
sourceTree = "<group>";
};
84A673B51C0C7AEB000F828E /* Model */ = {
isa = PBXGroup;
children = (
84A673B61C0C7AEB000F828E /* AnnounceModel.h */,
84A673B71C0C7AEB000F828E /* AnnounceModel.m */,
);
path = Model;
sourceTree = "<group>";
};
84A673B81C0C7AEB000F828E /* View */ = {
isa = PBXGroup;
children = (
84A673B91C0C7AEB000F828E /* FuncItem.h */,
84A673BA1C0C7AEB000F828E /* FuncItem.m */,
);
path = View;
sourceTree = "<group>";
};
84A673BB1C0C7AEB000F828E /* ViewController */ = {
isa = PBXGroup;
children = (
84A673BC1C0C7AEB000F828E /* AnnounceViewController.h */,
84A673BD1C0C7AEB000F828E /* AnnounceViewController.m */,
);
path = ViewController;
sourceTree = "<group>";
};
84AD4F1D1BF4257C00BFB37C /* View */ = {
isa = PBXGroup;
children = (
......@@ -1197,30 +1314,12 @@
84C957501BDB54BB00083584 /* Announce */ = {
isa = PBXGroup;
children = (
84C957511BDB54BB00083584 /* View */,
84C957521BDB54BB00083584 /* ViewController */,
84A673AC1C0C7AEB000F828E /* AnnounceDetail */,
84A673B11C0C7AEB000F828E /* AnnounceList */,
);
path = Announce;
sourceTree = "<group>";
};
84C957511BDB54BB00083584 /* View */ = {
isa = PBXGroup;
children = (
84DAB3F41C0802FD00F3E416 /* FuncItem.h */,
84DAB3F51C0802FD00F3E416 /* FuncItem.m */,
);
path = View;
sourceTree = "<group>";
};
84C957521BDB54BB00083584 /* ViewController */ = {
isa = PBXGroup;
children = (
84C957531BDB54D600083584 /* AnnounceViewController.h */,
84C957541BDB54D600083584 /* AnnounceViewController.m */,
);
path = ViewController;
sourceTree = "<group>";
};
84CC34BE1C093C2F002F10E2 /* AddOnLine */ = {
isa = PBXGroup;
children = (
......@@ -1787,6 +1886,7 @@
841D24FB1BEB75CA0005CC9F /* QuestionDetailFooterView.m in Sources */,
84CF0FA21BE9EDA900C855CE /* TakePhotoView.m in Sources */,
846206BB1C06AFF50015C456 /* RankCommentCell.m in Sources */,
849B2F741C0CA60E005D809F /* AnnounceDetailFootView.m in Sources */,
841D24F81BEB473C0005CC9F /* CheckPicViewController.m in Sources */,
84D80EB61BF714BE00A10EA4 /* GroupTabBar.m in Sources */,
8487D7721BF19A9C00E63E90 /* SearchToolBar.m in Sources */,
......@@ -1817,8 +1917,10 @@
84F30DA41BFC19F200CBAD13 /* RankListModel.m in Sources */,
84CC34EF1C09AEC0002F10E2 /* LookOnLineDetailViewController.m in Sources */,
8487D8091BF20FAD00E63E90 /* TaxisView.m in Sources */,
84A673C71C0C7E0C000F828E /* AnnounceDetailHeadView.m in Sources */,
84AD4F361BF45BEB00BFB37C /* InspectSortTableCell.m in Sources */,
84970E281BD8DEFE00C1728A /* AppDelegate.m in Sources */,
849B2F771C0CABE6005D809F /* AnnounceDetailModel.m in Sources */,
8490C4C31BF9A394006B6569 /* CustomPageControl.m in Sources */,
84F57C461BEC388A00DDEEB1 /* CommentView.m in Sources */,
84ED5DD81BF2E64300A1BB6D /* ScreenView.m in Sources */,
......@@ -1833,14 +1935,16 @@
8487D80C1BF218F900E63E90 /* MenuView.m in Sources */,
84CC34CE1C093C2F002F10E2 /* OnLineViewController.m in Sources */,
8474C5921BE78A85007DCF19 /* QuestionViewController.m in Sources */,
84A673BF1C0C7AEB000F828E /* AnnounceModel.m in Sources */,
84CC34CD1C093C2F002F10E2 /* OnLineFooterView.m in Sources */,
84AD4F291BF4360E00BFB37C /* TaskGroup.m in Sources */,
84FAC7611BFF2C6E00FD094D /* NoDataView.m in Sources */,
84A673C41C0C7B0A000F828E /* AnnoDetailViewController.m in Sources */,
84AD4F2F1BF4370E00BFB37C /* InspectHeaderView.m in Sources */,
84F57C9C1BECA73800DDEEB1 /* StarBar.m in Sources */,
84F57C4C1BEC785E00DDEEB1 /* AddQuestionViewController.m in Sources */,
84C957551BDB54D600083584 /* AnnounceViewController.m in Sources */,
84D80EB51BF714BE00A10EA4 /* GroupItems.m in Sources */,
84A673BE1C0C7AEB000F828E /* AnnoTableViewCell.m in Sources */,
84C9574D1BDB344900083584 /* UIBarButtonItem+Create.m in Sources */,
84AD4F3D1BF4894D00BFB37C /* RankDetailView.m in Sources */,
84ECCF1B1C0210F000EA4960 /* CommentModel.m in Sources */,
......@@ -1864,15 +1968,17 @@
8462C6EC1BF5F3BE00344DDD /* MenuButton.m in Sources */,
8442BA5C1BDB8FDB005E5657 /* MineTableHeaderView.m in Sources */,
84CC34E21C09583D002F10E2 /* LookOnLineTableViewCell.m in Sources */,
84DAB3F61C0802FD00F3E416 /* FuncItem.m in Sources */,
849B2F711C0CA22F005D809F /* AnnoContentTableViewCell.m in Sources */,
84D3E6021C04DA85001FF1DD /* InspectUpLoadFootView.m in Sources */,
84A673881C0B50B4000F828E /* OnLineCompleteViewController.m in Sources */,
8474C5991BE78BBC007DCF19 /* QuestionDetailCell.m in Sources */,
8474C5911BE78A85007DCF19 /* QuestionListTableCell.m in Sources */,
8490C4D71BF9DF1D006B6569 /* PictureStoryViewController.m in Sources */,
84A673C01C0C7AEB000F828E /* FuncItem.m in Sources */,
84F1669B1BE715E40061D350 /* ZanButton.m in Sources */,
84CC34DF1C0953C3002F10E2 /* HandOutViewController.m in Sources */,
8419EAD41BEDC98F002635ED /* HttpClient.m in Sources */,
84A673C11C0C7AEB000F828E /* AnnounceViewController.m in Sources */,
842547FC1BF03977006C79C5 /* QuestionModel.m in Sources */,
84E420441BE84A2300689976 /* QuestionCommentCell.m in Sources */,
);
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "横幅背景@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "横幅背景@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "灰色园背景@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "灰色园背景@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "绿色圆@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "绿色圆@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "红色圆@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "红色圆@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "黄色圆@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "黄色圆@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -126,6 +126,10 @@
// #444444
#define kLightBlack [UIColor colorWithRed:68 / 255.0 green:68 / 255.0 blue:68 / 255.0 alpha:1.0]
#define kAnnounceHeaderColor [UIColor colorWithRed:236 / 255.0 green:238 / 255.0 blue:250 / 255.0 alpha:1.0]
#define kCommentViewHeight 300
#define kTaxisViewHeight 150
......
......@@ -50,4 +50,13 @@
// 上报巡检结果
#define kUpLoadInspectResult @"redstar-server/rest/praise/report/"
// 公告
#define kAnnounceListURL @"redstar-server/rest/affiche/download/"
// 单个公告详情
#define kAnnounceDetailURL @"redstar-server/rest/affiche/get/"
// 提交公告
#define kAnnounceYetReadURL @"redstar-server/rest/affiche/read/"
#endif /* Url_h */
//
// AnnoContentTableViewCell.h
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AnnoContentTableViewCell : UITableViewCell
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *contentLabel;
@end
//
// AnnoContentTableViewCell.m
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "AnnoContentTableViewCell.h"
@implementation AnnoContentTableViewCell
- (UILabel *)titleLabel
{
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.textColor = kNavigationBarColor;
_titleLabel.font = [UIFont systemFontOfSize:13.0];
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_titleLabel];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self.contentView addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.contentView addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20];
[self.contentView addConstraint:contentHeight];
}
return _titleLabel;
}
- (UILabel *)contentLabel
{
if (!_contentLabel) {
_contentLabel = [[UILabel alloc] init];
_contentLabel.textColor = kLightBlack;
_contentLabel.font = [UIFont systemFontOfSize:13.0];
_contentLabel.numberOfLines = 0;
_contentLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_contentLabel];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_contentLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.titleLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:2];
[self.contentView addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_contentLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.contentView addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_contentLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:contentRight];
NSLayoutConstraint *contentBottom = [NSLayoutConstraint constraintWithItem:_contentLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-10];
[self.contentView addConstraint:contentBottom];
}
return _contentLabel;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// AnnounceDetailModel.h
// redstar
//
// Created by admin on 15/12/1.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface AnnounceDetailModel : NSObject
@property (nonatomic, copy) NSString *attachmentId;
@property (nonatomic, strong) NSArray *attachmentUrls;
@property (nonatomic, copy) NSString *content;
@property (nonatomic, copy) NSString *create_id;
@property (nonatomic, copy) NSString *create_operName;
@property (nonatomic, copy) NSString *create_time;
@property (nonatomic, copy) NSString *enterprise;
@property (nonatomic, copy) NSString *lastModify_id;
@property (nonatomic, copy) NSString *lastModify_operName;
@property (nonatomic, copy) NSString *lastModify_time;
@property (nonatomic, assign) int priority;
@property (nonatomic, strong) NSArray *publishes;
@property (nonatomic, assign) int state;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *uuid;
@property (nonatomic, copy) NSString *version;
+ (instancetype)announceDetailModelWithDict:(NSDictionary *)dict;
- (instancetype)initWithDict:(NSDictionary *)dict;
@end
//
// AnnounceDetailModel.m
// redstar
//
// Created by admin on 15/12/1.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "AnnounceDetailModel.h"
@implementation AnnounceDetailModel
+ (instancetype)announceDetailModelWithDict:(NSDictionary *)dict
{
return [[self alloc] initWithDict:dict];
}
- (instancetype)initWithDict:(NSDictionary *)dict
{
if (self = [super init]) {
[self setValuesForKeysWithDictionary:dict];
}
return self;
}
@end
//
// AnnounceDetailFootView.h
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AnnounceDetailModel.h"
@interface AnnounceDetailFootView : UIView
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) AnnounceDetailModel *annoDetail;
@end
//
// AnnounceDetailFootView.m
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "AnnounceDetailFootView.h"
@implementation AnnounceDetailFootView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self setup];
}
return self;
}
- (void)setup
{
self.titleLabel.text = @"附件";
}
- (void)setAnnoDetail:(AnnounceDetailModel *)annoDetail
{
_annoDetail = annoDetail;
}
- (UILabel *)titleLabel
{
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.textColor = kNavigationBarColor;
_titleLabel.font = [UIFont systemFontOfSize:13.0];
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_titleLabel];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1.0 constant:20];
[self addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20];
[self addConstraint:contentHeight];
}
return _titleLabel;
}
@end
//
// AnnounceDetailHeadView.h
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AnnounceDetailModel.h"
@interface AnnounceDetailHeadView : UIView
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *nameLabel;
@property (nonatomic, strong) UILabel *timeLabel;
@property (nonatomic, strong) AnnounceDetailModel *annoDetail;
@end
//
// AnnounceDetailHeadView.m
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "AnnounceDetailHeadView.h"
@interface AnnounceDetailHeadView ()
@property (nonatomic, strong) UIImageView *bannerImageView;
@property (nonatomic, strong) UILabel *peopleLabel;
@property (nonatomic, strong) UILabel *dateLabel;
@end
@implementation AnnounceDetailHeadView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self setup];
}
return self;
}
- (void)setup
{
UIImage *image = [UIImage imageNamed:@"anno_banner"];
image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(0, 30, 50, 30) resizingMode:UIImageResizingModeStretch];
self.bannerImageView.image = image;
self.peopleLabel.text = @"发布人";
self.dateLabel.text = @"发布日期";
}
- (void)setAnnoDetail:(AnnounceDetailModel *)annoDetail
{
_annoDetail = annoDetail;
self.titleLabel.text = [NSString stringWithFormat:@"%@", _annoDetail.title];
self.nameLabel.text = [NSString stringWithFormat:@"%@", _annoDetail.lastModify_operName];
self.timeLabel.text = [NSString stringWithFormat:@"%@", _annoDetail.lastModify_time];
}
- (UIImageView *)bannerImageView
{
if (!_bannerImageView) {
_bannerImageView = [[UIImageView alloc] init];
_bannerImageView.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_bannerImageView];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_bannerImageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1.0 constant:5];
[self addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_bannerImageView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_bannerImageView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_bannerImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:54];
[self addConstraint:contentHeight];
}
return _bannerImageView;
}
- (UILabel *)titleLabel
{
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.textAlignment = NSTextAlignmentCenter;
_titleLabel.textColor = [UIColor whiteColor];
_titleLabel.font = [UIFont systemFontOfSize:16.0];
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self.bannerImageView addSubview:_titleLabel];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.bannerImageView attribute:NSLayoutAttributeTop multiplier:1.0 constant:2];
[self.bannerImageView addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bannerImageView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.bannerImageView addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.bannerImageView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.bannerImageView addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:44];
[self.bannerImageView addConstraint:contentHeight];
}
return _titleLabel;
}
- (UILabel *)peopleLabel
{
if (!_peopleLabel) {
_peopleLabel = [[UILabel alloc] init];
_peopleLabel.textColor = kNavigationBarColor;
_peopleLabel.font = [UIFont systemFontOfSize:13.0];
_peopleLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_peopleLabel];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.bannerImageView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:12];
[self addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:contentLeft];
NSLayoutConstraint *contentWidth = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:50];
[self addConstraint:contentWidth];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20];
[self addConstraint:contentHeight];
}
return _peopleLabel;
}
- (UILabel *)dateLabel
{
if (!_dateLabel) {
_dateLabel = [[UILabel alloc] init];
_dateLabel.textColor = kNavigationBarColor;
_dateLabel.font = [UIFont systemFontOfSize:13.0];
_dateLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_dateLabel];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_dateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.bannerImageView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:12];
[self addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_dateLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0];
[self addConstraint:contentLeft];
NSLayoutConstraint *contentWidth = [NSLayoutConstraint constraintWithItem:_dateLabel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:80];
[self addConstraint:contentWidth];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_dateLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20];
[self addConstraint:contentHeight];
}
return _dateLabel;
}
- (UILabel *)nameLabel
{
if (!_nameLabel) {
_nameLabel = [[UILabel alloc] init];
_nameLabel.textColor = kLightBlack;
_nameLabel.font = [UIFont systemFontOfSize:15.0];
_nameLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_nameLabel];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_nameLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.peopleLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:1];
[self addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_nameLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_nameLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:20];
[self addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_nameLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20];
[self addConstraint:contentHeight];
}
return _nameLabel;
}
- (UILabel *)timeLabel
{
if (!_timeLabel) {
_timeLabel = [[UILabel alloc] init];
_timeLabel.textColor = kLightBlack;
_timeLabel.font = [UIFont systemFontOfSize:15.0];
_timeLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_timeLabel];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_timeLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.dateLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:1];
[self addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_timeLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0];
[self addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_timeLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_timeLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20];
[self addConstraint:contentHeight];
}
return _timeLabel;
}
@end
//
// AnnoDetailViewController.h
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AnnoDetailViewController : UIViewController
@property (nonatomic, copy) NSString *affiche_uuid;
@end
//
// AnnoDetailViewController.m
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "AnnoDetailViewController.h"
#import "AnnounceDetailHeadView.h"
#import "AnnoContentTableViewCell.h"
#import "AnnounceDetailFootView.h"
#import "HttpClient.h"
#import "AnnounceDetailModel.h"
#define kAnnounceContentCell @"AnnoContentTableViewCell"
@interface AnnoDetailViewController ()<UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) AnnounceDetailHeadView *headerView;
@property (nonatomic, strong) AnnounceDetailFootView *footerView;
@property (nonatomic, strong) AnnounceDetailModel *annoDetail;
@end
@implementation AnnoDetailViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[self setNav];
[self requestAnnoDetail];
[self settingYetRead];
}
- (void)requestAnnoDetail
{
NSString *url = [NSString stringWithFormat:@"%@%@%@", kRedStarURL, kAnnounceDetailURL, self.affiche_uuid];
HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url];
[httpCilent getAnnounceDetailWithCompletion:^(id response, NSError *error) {
NSLog(@"anno详情 = %@", response);
NSDictionary *dict = response[@"data"];
AnnounceDetailModel *annoDetail = [AnnounceDetailModel announceDetailModelWithDict:dict];
_annoDetail = annoDetail;
self.tableView.delegate = self;
self.tableView.dataSource = self;
}];
}
- (void)settingYetRead
{
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
NSDate *date = [NSDate date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"YYYY-MM-dd hh:mm:ss"];
NSString *dateString = [dateFormatter stringFromDate:date];
NSString *url = [NSString stringWithFormat:@"%@%@%@?user_uuid=%@&read_time=%@", kRedStarURL, kAnnounceYetReadURL, self.affiche_uuid, user_uuid, dateString];
url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url];
NSLog(@"uuurl = %@", url);
[httpCilent settingAnnounceYetReadWithCompletion:^(id response, NSError *error) {
NSLog(@"已读 response = %@", response);
}];
}
// 返回上一页面
- (void)doBack:(UIBarButtonItem *)sender
{
[self.navigationController popViewControllerAnimated:YES];
}
- (void)setNav
{
UILabel *customLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 40, 30)];
[customLab setTextColor:[UIColor whiteColor]];
[customLab setText:@"公告"];
customLab.font = [UIFont boldSystemFontOfSize:19];
self.navigationItem.titleView = customLab;
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(0, 0, 30, 44);
[backBtn setImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal];
[backBtn addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
self.navigationItem.leftBarButtonItem = backItem;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - UITableView Delegate/DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 1;
}
// cell显示的内容
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
AnnoContentTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:kAnnounceContentCell];
if (!cell) {
cell = [[AnnoContentTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kAnnounceContentCell];
}
cell.titleLabel.text = @"内容";
cell.contentLabel.text = [NSString stringWithFormat:@"%@",_annoDetail.content];
cell.backgroundColor = kAnnounceHeaderColor;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
- (UITableView *)tableView
{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
_tableView.translatesAutoresizingMaskIntoConstraints = NO;
_tableView.showsVerticalScrollIndicator = NO;
_tableView.showsHorizontalScrollIndicator = NO;
_tableView.tableFooterView = [[UIView alloc] init];
_tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.estimatedRowHeight = 100.0;
_tableView.tableHeaderView = self.headerView;
_tableView.tableFooterView = self.footerView;
[_tableView registerClass:[AnnoContentTableViewCell class] forCellReuseIdentifier:kAnnounceContentCell];
[self.view addSubview:_tableView];
NSLayoutConstraint *tableTop = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self.view addConstraint:tableTop];
NSLayoutConstraint *tableLeft = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.view addConstraint:tableLeft];
NSLayoutConstraint *tableRight = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.view addConstraint:tableRight];
NSLayoutConstraint *tableBottom = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.view addConstraint:tableBottom];
}
return _tableView;
}
- (AnnounceDetailHeadView *)headerView
{
if (!_headerView) {
_headerView = [[AnnounceDetailHeadView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 120)];
_headerView.backgroundColor = kAnnounceHeaderColor;
_headerView.annoDetail = _annoDetail;
}
return _headerView;
}
- (AnnounceDetailFootView *)footerView
{
if (!_footerView) {
_footerView = [[AnnounceDetailFootView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 120)];
_footerView.backgroundColor = [UIColor whiteColor];
}
return _footerView;
}
@end
//
// AnnoTableViewCell.h
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AnnounceModel.h"
@interface AnnoTableViewCell : UITableViewCell
@property (nonatomic, strong) UILabel *stateLabel;
@property (nonatomic, strong) UIImageView *bgImageView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *peopleLabel;
@property (nonatomic, strong) AnnounceModel *announce;
@property (nonatomic, copy) NSString *currentState;
@end
//
// AnnoTableViewCell.m
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "AnnoTableViewCell.h"
@implementation AnnoTableViewCell
- (void)setAnnounce:(AnnounceModel *)announce
{
_announce = announce;
self.titleLabel.text = [NSString stringWithFormat:@"%@", announce.content];
self.peopleLabel.text = [NSString stringWithFormat:@"发布人:%@ 发布日期:%@", announce.lastModify_operName ,announce.lastModify_time];
if ([self.currentState isEqualToString:@"false"]) {
if (announce.priority == 0) {
self.stateLabel.text = @"低";
self.bgImageView.image = [UIImage imageNamed:@"green_back"];
} else if (announce.priority == 1) {
self.stateLabel.text = @"中";
self.bgImageView.image = [UIImage imageNamed:@"yellow_back"];
} else {
self.stateLabel.text = @"高";
self.bgImageView.image = [UIImage imageNamed:@"red_back"];
}
} else if ([self.currentState isEqualToString:@"true"]) {
self.bgImageView.image = [UIImage imageNamed:@"gray_back"];
if (announce.priority == 0) {
self.stateLabel.text = @"低";
} else if (announce.priority == 1) {
self.stateLabel.text = @"中";
} else {
self.stateLabel.text = @"高";
}
} else {
if (announce.priority == 0) {
self.stateLabel.text = @"低";
self.bgImageView.image = [UIImage imageNamed:@"green_back"];
} else if (announce.priority == 1) {
self.stateLabel.text = @"中";
self.bgImageView.image = [UIImage imageNamed:@"yellow_back"];
} else {
self.stateLabel.text = @"高";
self.bgImageView.image = [UIImage imageNamed:@"red_back"];
}
}
}
- (UIImageView *)bgImageView
{
if (!_bgImageView) {
_bgImageView = [[UIImageView alloc] init];
_bgImageView.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_bgImageView];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_bgImageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:22];
[self.contentView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint constraintWithItem:_bgImageView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.contentView addConstraint:overDateLeft];
NSLayoutConstraint *overDateWidth = [NSLayoutConstraint constraintWithItem:_bgImageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:30];
[self.contentView addConstraint:overDateWidth];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint constraintWithItem:_bgImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:30];
[self.contentView addConstraint:overDateHeight];
NSLayoutConstraint *overDateBottom = [NSLayoutConstraint constraintWithItem:_bgImageView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-22];
[self.contentView addConstraint:overDateBottom];
}
return _bgImageView;
}
- (UILabel *)titleLabel
{
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
_titleLabel.textColor = kLightBlack;
_titleLabel.font = [UIFont systemFontOfSize:15.0];
[self.contentView addSubview:_titleLabel];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:17];
[self.contentView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:55];
[self.contentView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20];
[self.contentView addConstraint:overDateHeight];
}
return _titleLabel;
}
- (UILabel *)peopleLabel
{
if (!_peopleLabel) {
_peopleLabel = [[UILabel alloc] init];
_peopleLabel.translatesAutoresizingMaskIntoConstraints = NO;
_peopleLabel.textColor = kLightGray;
_peopleLabel.font = [UIFont systemFontOfSize:13.0];
[self.contentView addSubview:_peopleLabel];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.titleLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:2];
[self.contentView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:55];
[self.contentView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.contentView addConstraint:overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20];
[self.contentView addConstraint:overDateHeight];
}
return _peopleLabel;
}
- (UILabel *)stateLabel
{
if (!_stateLabel) {
_stateLabel = [[UILabel alloc] init];
_stateLabel.translatesAutoresizingMaskIntoConstraints = NO;
_stateLabel.textAlignment = NSTextAlignmentCenter;
_stateLabel.textColor = [UIColor whiteColor];
_stateLabel.font = [UIFont systemFontOfSize:14.0];
[self.bgImageView addSubview:_stateLabel];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_stateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.bgImageView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self.bgImageView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint constraintWithItem:_stateLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgImageView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.bgImageView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_stateLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.bgImageView attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.bgImageView addConstraint:overDateRight];
NSLayoutConstraint *overDateBottom = [NSLayoutConstraint constraintWithItem:_stateLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.bgImageView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.bgImageView addConstraint:overDateBottom];
}
return _stateLabel;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// AnnounceModel.h
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface AnnounceModel : NSObject
@property (nonatomic, copy) NSString *attachmentId;
@property (nonatomic, strong) NSArray *attachmentUrls;
@property (nonatomic, copy) NSString *content;
@property (nonatomic, copy) NSString *create_id;
@property (nonatomic, copy) NSString *create_operName;
@property (nonatomic, copy) NSString *create_time;
@property (nonatomic, copy) NSString *enterprise;
@property (nonatomic, copy) NSString *lastModify_id;
@property (nonatomic, copy) NSString *lastModify_operName;
@property (nonatomic, copy) NSString *lastModify_time;
@property (nonatomic, assign) int priority;
@property (nonatomic, strong) NSArray *publishes;
@property (nonatomic, assign) int state;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *uuid;
@property (nonatomic, copy) NSString *version;
+ (instancetype)announceModelWithDict:(NSDictionary *)dict;
- (instancetype)initWithDict:(NSDictionary *)dict;
@end
//
// AnnounceModel.m
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "AnnounceModel.h"
@implementation AnnounceModel
+ (instancetype)announceModelWithDict:(NSDictionary *)dict
{
return [[self alloc] initWithDict:dict];
}
- (instancetype)initWithDict:(NSDictionary *)dict
{
if (self = [super init]) {
[self setValuesForKeysWithDictionary:dict];
}
return self;
}
@end
......@@ -7,13 +7,23 @@
//
#import "AnnounceViewController.h"
#import "AnnoTableViewCell.h"
#import "HttpClient.h"
#import "AnnounceModel.h"
#import "AnnoDetailViewController.h"
#import <MBProgressHUD.h>
#define kAnnoTableViewCell @"AnnoTableViewCell"
@interface AnnounceViewController () <UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, strong) UIView *bgBar;
@property (nonatomic, strong) UISegmentedControl *segmentedControl;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSString *stateStr;
@property (nonatomic, assign) BOOL isRead;
@property (nonatomic, strong) NSMutableArray *allAnnoArray;
@end
@implementation AnnounceViewController
......@@ -30,13 +40,17 @@
self.navigationController.navigationBar.translucent = NO;
}
self.stateStr = @"未读";
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.allAnnoArray = [NSMutableArray array];
self.isRead = NO;
self.stateStr = @"false";
[self setNav];
[self setup];
[self requestAnnoList];
}
- (void)viewWillAppear:(BOOL)animated
......@@ -49,6 +63,30 @@
}
#pragma mark - Prative Methods
- (void)requestAnnoList
{
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
int page_number = 0;
int page_size = 10;
NSString *url = [NSString stringWithFormat:@"%@%@%@?read=%@&page_number=%d&page_size=%d", kRedStarURL, kAnnounceListURL ,user_uuid ,_stateStr, page_number, page_size];
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
[httpClient getAnnounceListWithCompletion:^(id response, NSError *error) {
if (response[@"success"]) {
NSDictionary *dict = response[@"data"];
NSArray *array = dict[@"records"];
for (NSDictionary *annoDict in array) {
AnnounceModel *anno = [AnnounceModel announceModelWithDict:annoDict];
[_allAnnoArray addObject:anno];
self.tableView.delegate = self;
self.tableView.dataSource = self;
}
}
}];
}
// 返回上一页面
- (void)doBack:(UIBarButtonItem *)sender
{
......@@ -79,42 +117,70 @@
}
- (void)segmentChangedValue:(id)sender
- (void)segmentChangedValue:(UISegmentedControl *)sender
{
NSString *url;
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
int page_number = 0;
int page_size = 10;
if (sender.selectedSegmentIndex == 0) {
self.stateStr = @"false";
url = [NSString stringWithFormat:@"%@%@%@?read=%@&page_number=%d&page_size=%d", kRedStarURL, kAnnounceListURL ,user_uuid ,_stateStr, page_number, page_size];
} else if (sender.selectedSegmentIndex == 1) {
self.stateStr = @"true";
url = [NSString stringWithFormat:@"%@%@%@?read=%@&page_number=%d&page_size=%d", kRedStarURL, kAnnounceListURL ,user_uuid ,_stateStr, page_number, page_size];
} else {
self.stateStr = @"";
url = [NSString stringWithFormat:@"%@%@%@?page_number=%d&page_size=%d", kRedStarURL, kAnnounceListURL ,user_uuid , page_number, page_size];
}
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
[httpClient getAnnounceListWithCompletion:^(id response, NSError *error) {
if (response[@"success"]) {
NSDictionary *dict = response[@"data"];
NSArray *array = dict[@"records"];
NSMutableArray *annoArray = [NSMutableArray array];
for (NSDictionary *annoDict in array) {
AnnounceModel *anno = [AnnounceModel announceModelWithDict:annoDict];
[annoArray addObject:anno];
}
_allAnnoArray = annoArray;
[self.tableView reloadData];
}
}];
}
#pragma mark - UITableView Delegate/DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 10;
return _allAnnoArray.count;
}
// cell显示的内容
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *CellIdentifier = [NSString stringWithFormat:@"Cell%ld%ld", (long)[indexPath section], (long)[indexPath row]];
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
AnnoTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:kAnnoTableViewCell];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
cell = [[AnnoTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kAnnoTableViewCell];
}
if ([self.stateStr isEqualToString:@"未读"]) {
cell.textLabel.text = [NSString stringWithFormat:@"未读%@", CellIdentifier];
} else if ([self.stateStr isEqualToString:@"已读"]) {
cell.textLabel.text = [NSString stringWithFormat:@"已读%@", CellIdentifier];
} else {
cell.textLabel.text = [NSString stringWithFormat:@"历史%@", CellIdentifier];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.currentState = self.stateStr;
cell.announce = _allAnnoArray[indexPath.row];
return cell;
}
// cell的点击事件
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
AnnounceModel *announce = _allAnnoArray[indexPath.row];
AnnoDetailViewController *detailVC = [[AnnoDetailViewController alloc] init];
detailVC.affiche_uuid = announce.uuid;
[self.navigationController pushViewController:detailVC animated:YES];
}
......@@ -124,6 +190,8 @@
if (!_bgBar) {
_bgBar = [[UIView alloc] init];
_bgBar.translatesAutoresizingMaskIntoConstraints = NO;
_bgBar.layer.borderColor = kSeparateLineCGColor;
_bgBar.layer.borderWidth = 0.5;
[self.view addSubview:_bgBar];
NSLayoutConstraint *tableTop = [NSLayoutConstraint constraintWithItem:_bgBar attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
......@@ -177,7 +245,9 @@
_tableView.showsVerticalScrollIndicator = NO;
_tableView.showsHorizontalScrollIndicator = NO;
_tableView.tableFooterView = [[UIView alloc] init];
// [_tableView registerClass:[InspectListCell class] forCellReuseIdentifier:kInspectListCell];
_tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.estimatedRowHeight = 100.0;
[_tableView registerClass:[AnnoTableViewCell class] forCellReuseIdentifier:kAnnoTableViewCell];
[self.view addSubview:_tableView];
......
......@@ -208,7 +208,6 @@
// 请求地址
NSString *urlStr = [NSString stringWithFormat:@"%@%@", kRedStarURL, kQuestionListURL];
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
NSLog(@"useruuid= %@", user_uuid);
// 请求参数
NSDictionary *parameters = @{@"user":user_uuid,
@"scope":@"all",
......
......@@ -55,4 +55,12 @@ typedef void (^completionBlock) (id response, NSError *error);
// 上传新检查点
- (void)uploadInspectResultWithParameters:(id)parameters completion:(completionBlock)completion;
// 获取公告列表
- (void)getAnnounceListWithCompletion:(completionBlock)completion;
// 获取公告详情
- (void)getAnnounceDetailWithCompletion:(completionBlock)completion;
// 提交公告已读状态
- (void)settingAnnounceYetReadWithCompletion:(completionBlock)completion;
@end
......@@ -211,4 +211,32 @@
}];
}
- (void)getAnnounceListWithCompletion:(completionBlock)completion
{
[self postParameters:nil completion:^(id response, NSError *error) {
if (completion) {
completion (response, error);
}
}];
}
- (void)getAnnounceDetailWithCompletion:(completionBlock)completion
{
[self getParameters:nil completion:^(id response, NSError *error) {
if (completion) {
completion (response, error);
}
}];
}
// 提交公告已读状态
- (void)settingAnnounceYetReadWithCompletion:(completionBlock)completion
{
[self postParameters:nil completion:^(id response, NSError *error) {
if (completion) {
completion (response, error);
}
}];
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment