diff --git a/ProductApp/ProductApp.xcodeproj/project.pbxproj b/ProductApp/ProductApp.xcodeproj/project.pbxproj index 7adf84e..b0cc1c2 100644 --- a/ProductApp/ProductApp.xcodeproj/project.pbxproj +++ b/ProductApp/ProductApp.xcodeproj/project.pbxproj @@ -197,6 +197,22 @@ CAC8066C2CA16DCC00C21AA7 /* StartPZXZViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAC8066B2CA16DCC00C21AA7 /* StartPZXZViewController.m */; }; CAC806702CA16E0700C21AA7 /* StartPZXZView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAC8066F2CA16E0700C21AA7 /* StartPZXZView.m */; }; CAC806732CA171ED00C21AA7 /* StartPZXZPageView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAC806722CA171ED00C21AA7 /* StartPZXZPageView.m */; }; + CAF76E632CBDFF8500825E5E /* AIChatYuYinView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E622CBDFF8500825E5E /* AIChatYuYinView.m */; }; + CAF76E662CBE01F100825E5E /* AIChatYuYinBackView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E652CBE01F100825E5E /* AIChatYuYinBackView.m */; }; + CAF76E692CBE0A1C00825E5E /* ToolsTypeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E682CBE0A1C00825E5E /* ToolsTypeModel.m */; }; + CAF76E6C2CBE0BAA00825E5E /* ToolsListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E6B2CBE0BAA00825E5E /* ToolsListModel.m */; }; + CAF76E6F2CBE111200825E5E /* GongJuListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E6E2CBE111200825E5E /* GongJuListViewController.m */; }; + CAF76E732CBE37C900825E5E /* GongJuListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E722CBE37C900825E5E /* GongJuListTableViewCell.m */; }; + CAF76E772CBE513A00825E5E /* GongJuSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E762CBE513A00825E5E /* GongJuSearchViewController.m */; }; + CAF76E7A2CBE569500825E5E /* SearchInputHestoryView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E782CBE569500825E5E /* SearchInputHestoryView.m */; }; + CAF76E7F2CBE588900825E5E /* GongJuSearchListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E7E2CBE588900825E5E /* GongJuSearchListViewController.m */; }; + CAF76E832CBE5D6600825E5E /* GongJuCreateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E822CBE5D6600825E5E /* GongJuCreateViewController.m */; }; + CAF76E872CBE5F8B00825E5E /* GongJuCreateView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E862CBE5F8B00825E5E /* GongJuCreateView.m */; }; + CAF76E8B2CBE642C00825E5E /* GongJuCreateInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E8A2CBE642C00825E5E /* GongJuCreateInputView.m */; }; + CAF76E8E2CBE650600825E5E /* GongJuCreateTextInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E8D2CBE650600825E5E /* GongJuCreateTextInputView.m */; }; + CAF76E912CBE663000825E5E /* GongJuCreateSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E902CBE663000825E5E /* GongJuCreateSelectView.m */; }; + CAF76E942CBE69F900825E5E /* GongJuCreateTimeView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E932CBE69F900825E5E /* GongJuCreateTimeView.m */; }; + CAF76E972CBE6AB900825E5E /* GongJuCreateTimeTwoView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E962CBE6AB900825E5E /* GongJuCreateTimeTwoView.m */; }; CB489DCA27449D5C00DA044A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CB489DC927449D5C00DA044A /* AppDelegate.m */; }; CB489DD027449D5C00DA044A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CB489DCF27449D5C00DA044A /* ViewController.m */; }; CB489DD327449D5C00DA044A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CB489DD127449D5C00DA044A /* Main.storyboard */; }; @@ -729,6 +745,38 @@ CAC8066F2CA16E0700C21AA7 /* StartPZXZView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StartPZXZView.m; sourceTree = ""; }; CAC806712CA171ED00C21AA7 /* StartPZXZPageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StartPZXZPageView.h; sourceTree = ""; }; CAC806722CA171ED00C21AA7 /* StartPZXZPageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StartPZXZPageView.m; sourceTree = ""; }; + CAF76E612CBDFF8500825E5E /* AIChatYuYinView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AIChatYuYinView.h; sourceTree = ""; }; + CAF76E622CBDFF8500825E5E /* AIChatYuYinView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIChatYuYinView.m; sourceTree = ""; }; + CAF76E642CBE01F100825E5E /* AIChatYuYinBackView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AIChatYuYinBackView.h; sourceTree = ""; }; + CAF76E652CBE01F100825E5E /* AIChatYuYinBackView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIChatYuYinBackView.m; sourceTree = ""; }; + CAF76E672CBE0A1C00825E5E /* ToolsTypeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ToolsTypeModel.h; sourceTree = ""; }; + CAF76E682CBE0A1C00825E5E /* ToolsTypeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ToolsTypeModel.m; sourceTree = ""; }; + CAF76E6A2CBE0BAA00825E5E /* ToolsListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ToolsListModel.h; sourceTree = ""; }; + CAF76E6B2CBE0BAA00825E5E /* ToolsListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ToolsListModel.m; sourceTree = ""; }; + CAF76E6D2CBE111200825E5E /* GongJuListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuListViewController.h; sourceTree = ""; }; + CAF76E6E2CBE111200825E5E /* GongJuListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuListViewController.m; sourceTree = ""; }; + CAF76E712CBE37C900825E5E /* GongJuListTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuListTableViewCell.h; sourceTree = ""; }; + CAF76E722CBE37C900825E5E /* GongJuListTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuListTableViewCell.m; sourceTree = ""; }; + CAF76E752CBE513A00825E5E /* GongJuSearchViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuSearchViewController.h; sourceTree = ""; }; + CAF76E762CBE513A00825E5E /* GongJuSearchViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuSearchViewController.m; sourceTree = ""; }; + CAF76E782CBE569500825E5E /* SearchInputHestoryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchInputHestoryView.m; sourceTree = ""; }; + CAF76E792CBE569500825E5E /* SearchInputHestoryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchInputHestoryView.h; sourceTree = ""; }; + CAF76E7D2CBE588900825E5E /* GongJuSearchListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuSearchListViewController.h; sourceTree = ""; }; + CAF76E7E2CBE588900825E5E /* GongJuSearchListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuSearchListViewController.m; sourceTree = ""; }; + CAF76E812CBE5D6600825E5E /* GongJuCreateViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuCreateViewController.h; sourceTree = ""; }; + CAF76E822CBE5D6600825E5E /* GongJuCreateViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuCreateViewController.m; sourceTree = ""; }; + CAF76E852CBE5F8B00825E5E /* GongJuCreateView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuCreateView.h; sourceTree = ""; }; + CAF76E862CBE5F8B00825E5E /* GongJuCreateView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuCreateView.m; sourceTree = ""; }; + CAF76E892CBE642C00825E5E /* GongJuCreateInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuCreateInputView.h; sourceTree = ""; }; + CAF76E8A2CBE642C00825E5E /* GongJuCreateInputView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuCreateInputView.m; sourceTree = ""; }; + CAF76E8C2CBE650600825E5E /* GongJuCreateTextInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuCreateTextInputView.h; sourceTree = ""; }; + CAF76E8D2CBE650600825E5E /* GongJuCreateTextInputView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuCreateTextInputView.m; sourceTree = ""; }; + CAF76E8F2CBE663000825E5E /* GongJuCreateSelectView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuCreateSelectView.h; sourceTree = ""; }; + CAF76E902CBE663000825E5E /* GongJuCreateSelectView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuCreateSelectView.m; sourceTree = ""; }; + CAF76E922CBE69F900825E5E /* GongJuCreateTimeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuCreateTimeView.h; sourceTree = ""; }; + CAF76E932CBE69F900825E5E /* GongJuCreateTimeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuCreateTimeView.m; sourceTree = ""; }; + CAF76E952CBE6AB900825E5E /* GongJuCreateTimeTwoView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuCreateTimeTwoView.h; sourceTree = ""; }; + CAF76E962CBE6AB900825E5E /* GongJuCreateTimeTwoView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuCreateTimeTwoView.m; sourceTree = ""; }; CB001E19298BBCFB005E0907 /* ProductApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ProductApp.entitlements; sourceTree = ""; }; CB489DC527449D5C00DA044A /* ProductApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProductApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; CB489DC827449D5C00DA044A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -1704,6 +1752,10 @@ children = ( CA6B971C2CBCC8C3000213F3 /* AIChatBottomView.h */, CA6B971D2CBCC8C3000213F3 /* AIChatBottomView.m */, + CAF76E612CBDFF8500825E5E /* AIChatYuYinView.h */, + CAF76E622CBDFF8500825E5E /* AIChatYuYinView.m */, + CAF76E642CBE01F100825E5E /* AIChatYuYinBackView.h */, + CAF76E652CBE01F100825E5E /* AIChatYuYinBackView.m */, ); path = view; sourceTree = ""; @@ -2023,8 +2075,13 @@ CABA145D2C9D0B06002CB3B1 /* 工具 */ = { isa = PBXGroup; children = ( + CAF76E802CBE5D5200825E5E /* 通用工具 */, + CAF76E742CBE512600825E5E /* 搜索 */, + CAF76E702CBE37BC00825E5E /* cell */, CABA14682C9D0B38002CB3B1 /* GongJuViewController.h */, CABA14692C9D0B38002CB3B1 /* GongJuViewController.m */, + CAF76E6D2CBE111200825E5E /* GongJuListViewController.h */, + CAF76E6E2CBE111200825E5E /* GongJuListViewController.m */, ); path = "工具"; sourceTree = ""; @@ -2184,6 +2241,10 @@ CABA14DF2C9D6F30002CB3B1 /* RoleTreeModel.m */, CABA14E12C9D707E002CB3B1 /* TextbookInfoModel.h */, CABA14E22C9D707E002CB3B1 /* TextbookInfoModel.m */, + CAF76E672CBE0A1C00825E5E /* ToolsTypeModel.h */, + CAF76E682CBE0A1C00825E5E /* ToolsTypeModel.m */, + CAF76E6A2CBE0BAA00825E5E /* ToolsListModel.h */, + CAF76E6B2CBE0BAA00825E5E /* ToolsListModel.m */, ); path = models; sourceTree = ""; @@ -2342,6 +2403,81 @@ path = view; sourceTree = ""; }; + CAF76E702CBE37BC00825E5E /* cell */ = { + isa = PBXGroup; + children = ( + CAF76E712CBE37C900825E5E /* GongJuListTableViewCell.h */, + CAF76E722CBE37C900825E5E /* GongJuListTableViewCell.m */, + ); + path = cell; + sourceTree = ""; + }; + CAF76E742CBE512600825E5E /* 搜索 */ = { + isa = PBXGroup; + children = ( + CAF76E7C2CBE587C00825E5E /* 搜索列表 */, + CAF76E7B2CBE569A00825E5E /* view */, + CAF76E752CBE513A00825E5E /* GongJuSearchViewController.h */, + CAF76E762CBE513A00825E5E /* GongJuSearchViewController.m */, + ); + path = "搜索"; + sourceTree = ""; + }; + CAF76E7B2CBE569A00825E5E /* view */ = { + isa = PBXGroup; + children = ( + CAF76E792CBE569500825E5E /* SearchInputHestoryView.h */, + CAF76E782CBE569500825E5E /* SearchInputHestoryView.m */, + ); + path = view; + sourceTree = ""; + }; + CAF76E7C2CBE587C00825E5E /* 搜索列表 */ = { + isa = PBXGroup; + children = ( + CAF76E7D2CBE588900825E5E /* GongJuSearchListViewController.h */, + CAF76E7E2CBE588900825E5E /* GongJuSearchListViewController.m */, + ); + path = "搜索列表"; + sourceTree = ""; + }; + CAF76E802CBE5D5200825E5E /* 通用工具 */ = { + isa = PBXGroup; + children = ( + CAF76E842CBE5F3A00825E5E /* view */, + CAF76E812CBE5D6600825E5E /* GongJuCreateViewController.h */, + CAF76E822CBE5D6600825E5E /* GongJuCreateViewController.m */, + ); + path = "通用工具"; + sourceTree = ""; + }; + CAF76E842CBE5F3A00825E5E /* view */ = { + isa = PBXGroup; + children = ( + CAF76E882CBE641500825E5E /* son */, + CAF76E852CBE5F8B00825E5E /* GongJuCreateView.h */, + CAF76E862CBE5F8B00825E5E /* GongJuCreateView.m */, + ); + path = view; + sourceTree = ""; + }; + CAF76E882CBE641500825E5E /* son */ = { + isa = PBXGroup; + children = ( + CAF76E892CBE642C00825E5E /* GongJuCreateInputView.h */, + CAF76E8A2CBE642C00825E5E /* GongJuCreateInputView.m */, + CAF76E8C2CBE650600825E5E /* GongJuCreateTextInputView.h */, + CAF76E8D2CBE650600825E5E /* GongJuCreateTextInputView.m */, + CAF76E8F2CBE663000825E5E /* GongJuCreateSelectView.h */, + CAF76E902CBE663000825E5E /* GongJuCreateSelectView.m */, + CAF76E922CBE69F900825E5E /* GongJuCreateTimeView.h */, + CAF76E932CBE69F900825E5E /* GongJuCreateTimeView.m */, + CAF76E952CBE6AB900825E5E /* GongJuCreateTimeTwoView.h */, + CAF76E962CBE6AB900825E5E /* GongJuCreateTimeTwoView.m */, + ); + path = son; + sourceTree = ""; + }; CB489DBC27449D5C00DA044A = { isa = PBXGroup; children = ( @@ -3338,6 +3474,7 @@ CAB0F3602CAA84B3003B0C39 /* XieZuoXiangQingViewController.m in Sources */, CA4257A02CA299F900A36A10 /* StartZNPPTDaGangView.m in Sources */, CA0C3A8B2CB4C80300E01A72 /* HuanGeSiLuCollectionViewCell.m in Sources */, + CAF76E832CBE5D6600825E5E /* GongJuCreateViewController.m in Sources */, CA81818B2C9E598300EE7E6E /* StartKTXZWenZhangView.m in Sources */, CB489FA72744A0BD00DA044A /* ZJScrollPageView.m in Sources */, CA4257A62CA29FE700A36A10 /* StartZNPPTDaGangAlterLoadView.m in Sources */, @@ -3349,6 +3486,7 @@ CABA14B02C9D4318002CB3B1 /* UserAccountModel.m in Sources */, CA4257982CA2914100A36A10 /* StartZNPPTHUDAlter.m in Sources */, CA6B97222CBCEB56000213F3 /* AIChatArcView.m in Sources */, + CAF76E912CBE663000825E5E /* GongJuCreateSelectView.m in Sources */, CB489F7C2744A0BD00DA044A /* RSAEncrypt.m in Sources */, CB489F6B2744A0BD00DA044A /* LJsignView.m in Sources */, CB489F622744A0BD00DA044A /* MDBwebVIew.m in Sources */, @@ -3359,6 +3497,7 @@ CB489F8B2744A0BD00DA044A /* NSString+extend.m in Sources */, CAA600D92CA95AAC00026CF4 /* KeTangXieZuoNJViewController.m in Sources */, CA0C3AB92CB51D5900E01A72 /* ZhiNengPPTCollectionViewCell.m in Sources */, + CAF76E692CBE0A1C00825E5E /* ToolsTypeModel.m in Sources */, CB489F8D2744A0BD00DA044A /* NaviGationView.m in Sources */, CB489F9C2744A0BD00DA044A /* LogTableViewCell.m in Sources */, CABA14B12C9D4318002CB3B1 /* UserAuthModel.m in Sources */, @@ -3382,6 +3521,7 @@ CB489FCC2744A0BD00DA044A /* ConfigireSetting.m in Sources */, CA4257952CA2671400A36A10 /* StartZNPPTCell.m in Sources */, CABA14CC2C9D4395002CB3B1 /* NSData+PEHIExtension.m in Sources */, + CAF76E662CBE01F100825E5E /* AIChatYuYinBackView.m in Sources */, CA0C3AA22CB4DBB900E01A72 /* DuanLuoXieZuoView.m in Sources */, CA0D08542CA543370086855E /* ShouYeLSZWPGTableViewCell.m in Sources */, CABA14AC2C9D4318002CB3B1 /* OrderGoodsModel.m in Sources */, @@ -3396,6 +3536,7 @@ CA11ED782CA69B5200209DFC /* GaiXieRunSeView.m in Sources */, CB489F6D2744A0BD00DA044A /* UIView+Additions.m in Sources */, CAB0D3752CAA47F3009BF67D /* ZhiNengXieZuoViewController.m in Sources */, + CAF76E972CBE6AB900825E5E /* GongJuCreateTimeTwoView.m in Sources */, CABA14CD2C9D4395002CB3B1 /* NSString+AES.m in Sources */, CA42579C2CA2998200A36A10 /* StartZNPPTDaGangViewController.m in Sources */, CABA14B52C9D4318002CB3B1 /* UserModel.m in Sources */, @@ -3421,6 +3562,7 @@ CA487D8A2CA3AB6B00AE773B /* UITableView+MoveCell.m in Sources */, CA0D08782CA557700086855E /* ShouYeLiShiJiLuPGCollectionViewCell.m in Sources */, CAB0F3512CAA7321003B0C39 /* ZhiShuAlterView.m in Sources */, + CAF76E732CBE37C900825E5E /* GongJuListTableViewCell.m in Sources */, CABA14AE2C9D4318002CB3B1 /* OrderInfoModel.m in Sources */, CB489F502744A0BD00DA044A /* Tools.m in Sources */, CAC806682CA1521200C21AA7 /* StartZNXZSiLuView.m in Sources */, @@ -3455,6 +3597,7 @@ CB489F892744A0BD00DA044A /* TagInfoModel.m in Sources */, CABA14712C9D0D4E002CB3B1 /* StartViewController.m in Sources */, CABA14892C9D2AE2002CB3B1 /* StartGNTiShiView.m in Sources */, + CAF76E7A2CBE569500825E5E /* SearchInputHestoryView.m in Sources */, CB489F8E2744A0BD00DA044A /* UITextFieldYS.m in Sources */, CA6B97302CBD11B1000213F3 /* AIChatFunctionCollectionViewCell.m in Sources */, CB489F922744A0BD00DA044A /* IndexGetNewsModel.m in Sources */, @@ -3479,6 +3622,7 @@ CABA14AF2C9D4318002CB3B1 /* PayOrderModel.m in Sources */, CAA600CD2CA92FB700026CF4 /* FXErView.m in Sources */, CA0C3A872CB4C34800E01A72 /* HuanGeSiLuView.m in Sources */, + CAF76E7F2CBE588900825E5E /* GongJuSearchListViewController.m in Sources */, CB489F812744A0BD00DA044A /* GTMBase64.m in Sources */, CAC806642CA151ED00C21AA7 /* StartZNXZSiLuViewController.m in Sources */, CB489F962744A0BD00DA044A /* SmsloginCodeModel.m in Sources */, @@ -3514,6 +3658,8 @@ CABA14AD2C9D4318002CB3B1 /* OrderInfoListModel.m in Sources */, CABA14AB2C9D4318002CB3B1 /* DownLoadModel.m in Sources */, CABA14D92C9D5071002CB3B1 /* PageControlView.m in Sources */, + CAF76E8E2CBE650600825E5E /* GongJuCreateTextInputView.m in Sources */, + CAF76E772CBE513A00825E5E /* GongJuSearchViewController.m in Sources */, CA4257852CA24E1100A36A10 /* StartPZXZDetailViewController.m in Sources */, CB489FA52744A0BD00DA044A /* ZJSegmentStyle.m in Sources */, CA6B97122CBCAC14000213F3 /* FanWenListTableViewCell.m in Sources */, @@ -3529,6 +3675,7 @@ CB489FB82744A0BD00DA044A /* HXLoadingHUD.m in Sources */, CABA14D12C9D4961002CB3B1 /* StartGNView.m in Sources */, CB489FA82744A0BD00DA044A /* XLProgressView.m in Sources */, + CAF76E632CBDFF8500825E5E /* AIChatYuYinView.m in Sources */, CA8181AD2C9EB95700EE7E6E /* StartKTXZPGDetailZHView.m in Sources */, CA6B97162CBCBCC1000213F3 /* FanWenDetailViewController.m in Sources */, CB489F802744A0BD00DA044A /* NSString+Base64.m in Sources */, @@ -3548,9 +3695,11 @@ CAA600D12CA9565500026CF4 /* KeTangXieZuoViewController.m in Sources */, CB489FA12744A0BD00DA044A /* ZJTitleView.m in Sources */, CA0D082D2CA4F8930086855E /* ShouYeZNXZTableViewCell.m in Sources */, + CAF76E872CBE5F8B00825E5E /* GongJuCreateView.m in Sources */, CAB0D3792CAA488C009BF67D /* ZhiNengXieZuoView.m in Sources */, CB489FAF2744A0BD00DA044A /* FSActionSheetConfig.m in Sources */, CA11ED612CA6556900209DFC /* CamreImagesCollectionViewCell.m in Sources */, + CAF76E942CBE69F900825E5E /* GongJuCreateTimeView.m in Sources */, CA0D08452CA5316B0086855E /* ShouYeShenFenView.m in Sources */, CB489FB52744A0BD00DA044A /* HYTimePickerView.m in Sources */, CA4257A32CA29BF900A36A10 /* StartZNPPTDaGangAlterView.m in Sources */, @@ -3560,6 +3709,7 @@ CAC8066C2CA16DCC00C21AA7 /* StartPZXZViewController.m in Sources */, CB489F722744A0BD00DA044A /* MCTabBarController.m in Sources */, CB489F9F2744A0BD00DA044A /* LogView.m in Sources */, + CAF76E8B2CBE642C00825E5E /* GongJuCreateInputView.m in Sources */, CABA146D2C9D0B3F002CB3B1 /* WoDeViewController.m in Sources */, CABA147B2C9D17C3002CB3B1 /* StartNJViewController.m in Sources */, CB489F732744A0BD00DA044A /* BaseViewController.m in Sources */, @@ -3578,6 +3728,8 @@ CA0D083D2CA50F480086855E /* ShouYeZuoWenTableViewCell.m in Sources */, CA8181B32C9EB96F00EE7E6E /* StartKTXZPGDetailXZView.m in Sources */, CA0C3AB52CB5061500E01A72 /* ZhiNengPPTView.m in Sources */, + CAF76E6C2CBE0BAA00825E5E /* ToolsListModel.m in Sources */, + CAF76E6F2CBE111200825E5E /* GongJuListViewController.m in Sources */, CAB0F35C2CAA7664003B0C39 /* ChuangZuoSiLuView.m in Sources */, CA0D084C2CA538710086855E /* ShouYeShenFenNianJiView.m in Sources */, ); diff --git a/ProductApp/ProductApp.xcworkspace/xcuserdata/gongzuo.xcuserdatad/UserInterfaceState.xcuserstate b/ProductApp/ProductApp.xcworkspace/xcuserdata/gongzuo.xcuserdatad/UserInterfaceState.xcuserstate index c7b898a..6146f0d 100644 Binary files a/ProductApp/ProductApp.xcworkspace/xcuserdata/gongzuo.xcuserdatad/UserInterfaceState.xcuserstate and b/ProductApp/ProductApp.xcworkspace/xcuserdata/gongzuo.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ProductApp/ProductApp.xcworkspace/xcuserdata/gongzuo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/ProductApp/ProductApp.xcworkspace/xcuserdata/gongzuo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index c814176..6b8852a 100644 --- a/ProductApp/ProductApp.xcworkspace/xcuserdata/gongzuo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/ProductApp/ProductApp.xcworkspace/xcuserdata/gongzuo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -36,5 +36,53 @@ landmarkType = "7"> + + + + + + + + + + + + diff --git a/ProductApp/ProductApp/AppDelegate.m b/ProductApp/ProductApp/AppDelegate.m index 173b22a..23eb337 100644 --- a/ProductApp/ProductApp/AppDelegate.m +++ b/ProductApp/ProductApp/AppDelegate.m @@ -33,9 +33,9 @@ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.backgroundColor = [UIColor whiteColor]; -// [self.window setRootViewController:[[NavgationController alloc] initWithRootViewController:[StartPayViewController new]]]; + [self.window setRootViewController:[[NavgationController alloc] initWithRootViewController:[StartViewController new]]]; - [self.window setRootViewController:[TabBarController new]]; +// [self.window setRootViewController:[TabBarController new]]; [self.window makeKeyAndVisible]; diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_1.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_1.imageset/Contents.json new file mode 100644 index 0000000..13f310b --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_1.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43313@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43313@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_1.imageset/组 43313@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_1.imageset/组 43313@2x.png new file mode 100644 index 0000000..0f253b4 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_1.imageset/组 43313@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_1.imageset/组 43313@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_1.imageset/组 43313@3x.png new file mode 100644 index 0000000..6fe4378 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_1.imageset/组 43313@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_2.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_2.imageset/Contents.json new file mode 100644 index 0000000..1a61d93 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_2.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43314@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43314@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_2.imageset/组 43314@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_2.imageset/组 43314@2x.png new file mode 100644 index 0000000..791c02e Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_2.imageset/组 43314@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_2.imageset/组 43314@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_2.imageset/组 43314@3x.png new file mode 100644 index 0000000..1986a9c Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_2.imageset/组 43314@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_3.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_3.imageset/Contents.json new file mode 100644 index 0000000..1f4eca0 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_3.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43317@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43317@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_3.imageset/组 43317@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_3.imageset/组 43317@2x.png new file mode 100644 index 0000000..cc3c8c5 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_3.imageset/组 43317@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_3.imageset/组 43317@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_3.imageset/组 43317@3x.png new file mode 100644 index 0000000..575abf5 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_3.imageset/组 43317@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_4.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_4.imageset/Contents.json new file mode 100644 index 0000000..8026ee2 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_4.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43316@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43316@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_4.imageset/组 43316@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_4.imageset/组 43316@2x.png new file mode 100644 index 0000000..91f241b Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_4.imageset/组 43316@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_4.imageset/组 43316@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_4.imageset/组 43316@3x.png new file mode 100644 index 0000000..ad4fac1 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_4.imageset/组 43316@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_5.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_5.imageset/Contents.json new file mode 100644 index 0000000..c65bf4e --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_5.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43315@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43315@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_5.imageset/组 43315@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_5.imageset/组 43315@2x.png new file mode 100644 index 0000000..446a451 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_5.imageset/组 43315@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_5.imageset/组 43315@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_5.imageset/组 43315@3x.png new file mode 100644 index 0000000..c61af43 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_5.imageset/组 43315@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_6.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_6.imageset/Contents.json new file mode 100644 index 0000000..f17b7e7 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_6.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43494@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43494@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_6.imageset/组 43494@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_6.imageset/组 43494@2x.png new file mode 100644 index 0000000..272bf22 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_6.imageset/组 43494@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_6.imageset/组 43494@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_6.imageset/组 43494@3x.png new file mode 100644 index 0000000..b75149e Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_6.imageset/组 43494@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_7.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_7.imageset/Contents.json new file mode 100644 index 0000000..2299d0b --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_7.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43319@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43319@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_7.imageset/组 43319@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_7.imageset/组 43319@2x.png new file mode 100644 index 0000000..5677d86 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_7.imageset/组 43319@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_7.imageset/组 43319@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_7.imageset/组 43319@3x.png new file mode 100644 index 0000000..f32020d Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_7.imageset/组 43319@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_8.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_8.imageset/Contents.json new file mode 100644 index 0000000..11a76a7 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_8.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43318@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43318@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_8.imageset/组 43318@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_8.imageset/组 43318@2x.png new file mode 100644 index 0000000..7d33877 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_8.imageset/组 43318@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_8.imageset/组 43318@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_8.imageset/组 43318@3x.png new file mode 100644 index 0000000..cc67879 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_8.imageset/组 43318@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_9.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_9.imageset/Contents.json new file mode 100644 index 0000000..2074b0e --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_9.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43312@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43312@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_9.imageset/组 43312@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_9.imageset/组 43312@2x.png new file mode 100644 index 0000000..9a47de7 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_9.imageset/组 43312@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_9.imageset/组 43312@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_9.imageset/组 43312@3x.png new file mode 100644 index 0000000..635c8cf Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_9.imageset/组 43312@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_back.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_back.imageset/Contents.json new file mode 100644 index 0000000..f5e7aa1 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_back.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "蒙版组 12961@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "蒙版组 12961@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_back.imageset/蒙版组 12961@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_back.imageset/蒙版组 12961@2x.png new file mode 100644 index 0000000..91e935b Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_back.imageset/蒙版组 12961@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_back.imageset/蒙版组 12961@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_back.imageset/蒙版组 12961@3x.png new file mode 100644 index 0000000..07aee66 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_back.imageset/蒙版组 12961@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_banner.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_banner.imageset/Contents.json new file mode 100644 index 0000000..f9fd3cc --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_banner.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "助手banner@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "助手banner@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_banner.imageset/助手banner@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_banner.imageset/助手banner@2x.png new file mode 100644 index 0000000..b172622 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_banner.imageset/助手banner@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_banner.imageset/助手banner@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_banner.imageset/助手banner@3x.png new file mode 100644 index 0000000..88db15a Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_banner.imageset/助手banner@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_scN.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scN.imageset/Contents.json new file mode 100644 index 0000000..da6c686 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scN.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 42943@2x(1).png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 42943@3x(1).png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_scN.imageset/组 42943@2x(1).png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scN.imageset/组 42943@2x(1).png new file mode 100644 index 0000000..f712a44 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scN.imageset/组 42943@2x(1).png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_scN.imageset/组 42943@3x(1).png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scN.imageset/组 42943@3x(1).png new file mode 100644 index 0000000..ffefcba Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scN.imageset/组 42943@3x(1).png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_scY.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scY.imageset/Contents.json new file mode 100644 index 0000000..9315925 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scY.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 42943@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 42943@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_scY.imageset/组 42943@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scY.imageset/组 42943@2x.png new file mode 100644 index 0000000..8211f85 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scY.imageset/组 42943@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_scY.imageset/组 42943@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scY.imageset/组 42943@3x.png new file mode 100644 index 0000000..dfcfb25 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_scY.imageset/组 42943@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_search.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_search.imageset/Contents.json new file mode 100644 index 0000000..7b6156b --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_search.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "容器@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "容器@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_search.imageset/容器@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_search.imageset/容器@2x.png new file mode 100644 index 0000000..3aec886 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_search.imageset/容器@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_search.imageset/容器@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_search.imageset/容器@3x.png new file mode 100644 index 0000000..2b3ca76 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_search.imageset/容器@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_select_time.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/gj_select_time.imageset/Contents.json new file mode 100644 index 0000000..7b6156b --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/gj_select_time.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "容器@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "容器@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_select_time.imageset/容器@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_select_time.imageset/容器@2x.png new file mode 100644 index 0000000..9d62092 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_select_time.imageset/容器@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/gj_select_time.imageset/容器@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/gj_select_time.imageset/容器@3x.png new file mode 100644 index 0000000..d6c9b12 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/gj_select_time.imageset/容器@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/search_del.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/search_del.imageset/Contents.json new file mode 100644 index 0000000..504ad1e --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/search_del.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Slice 31@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Slice 31@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/search_del.imageset/Slice 31@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/search_del.imageset/Slice 31@2x.png new file mode 100644 index 0000000..1c2d719 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/search_del.imageset/Slice 31@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/search_del.imageset/Slice 31@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/search_del.imageset/Slice 31@3x.png new file mode 100644 index 0000000..3d65833 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/search_del.imageset/Slice 31@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/暂无搜索记录.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/工具/暂无搜索记录.imageset/Contents.json new file mode 100644 index 0000000..fe6a7d2 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/工具/暂无搜索记录.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "切图 150@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "切图 150@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/暂无搜索记录.imageset/切图 150@2x.png b/ProductApp/ProductApp/Assets.xcassets/工具/暂无搜索记录.imageset/切图 150@2x.png new file mode 100644 index 0000000..6bf16a3 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/暂无搜索记录.imageset/切图 150@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/工具/暂无搜索记录.imageset/切图 150@3x.png b/ProductApp/ProductApp/Assets.xcassets/工具/暂无搜索记录.imageset/切图 150@3x.png new file mode 100644 index 0000000..627b9ca Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/工具/暂无搜索记录.imageset/切图 150@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_gt.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_gt.imageset/Contents.json new file mode 100644 index 0000000..06a4a21 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_gt.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "提醒,感叹号_jurassic.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_gt.imageset/提醒,感叹号_jurassic.png b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_gt.imageset/提醒,感叹号_jurassic.png new file mode 100644 index 0000000..490a933 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_gt.imageset/提醒,感叹号_jurassic.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_ok.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_ok.imageset/Contents.json new file mode 100644 index 0000000..7159a00 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_ok.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43022@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43022@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_ok.imageset/组 43022@2x.png b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_ok.imageset/组 43022@2x.png new file mode 100644 index 0000000..ad82d2d Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_ok.imageset/组 43022@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_ok.imageset/组 43022@3x.png b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_ok.imageset/组 43022@3x.png new file mode 100644 index 0000000..d25c8ff Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_ok.imageset/组 43022@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_x.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_x.imageset/Contents.json new file mode 100644 index 0000000..98233da --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_x.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43021@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43021@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_x.imageset/组 43021@2x.png b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_x.imageset/组 43021@2x.png new file mode 100644 index 0000000..8de4e4f Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_x.imageset/组 43021@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_x.imageset/组 43021@3x.png b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_x.imageset/组 43021@3x.png new file mode 100644 index 0000000..17880c8 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/聊天/ai_yuyin_x.imageset/组 43021@3x.png differ diff --git a/ProductApp/ProductApp/BaseControl/ZJScrollPageView/ZJScrollSegmentView.m b/ProductApp/ProductApp/BaseControl/ZJScrollPageView/ZJScrollSegmentView.m index 1777256..62722e1 100644 --- a/ProductApp/ProductApp/BaseControl/ZJScrollPageView/ZJScrollSegmentView.m +++ b/ProductApp/ProductApp/BaseControl/ZJScrollPageView/ZJScrollSegmentView.m @@ -105,7 +105,25 @@ static CGFloat const contentSizeXOff = 20.0; [self addSubview:self.extraBtn]; } } - +-(void)scrollLineColorsSet +{ + if(self.segmentStyle.lineColors) + { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + NSArray *arr = [self.scrollLine.layer sublayers]; + if(arr>0) + { + CAGradientLayer *layer = arr.lastObject; + + layer.frame = self.scrollLine.layer.bounds; + } + else + { + [Tools changedView:self.scrollLine colors:self.segmentStyle.lineColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)]; + } + }); + } +} - (void)dealloc { #if DEBUG @@ -367,6 +385,7 @@ static CGFloat const contentSizeXOff = 20.0; if (weakSelf.segmentStyle.isScrollTitle) { weakSelf.scrollLine.zj_x = currentTitleView.zj_x; weakSelf.scrollLine.zj_width = currentTitleView.zj_width; + [self scrollLineColorsSet]; } else { if (self.segmentStyle.isAdjustCoverOrLineWidth) { CGFloat scrollLineW = [self.titleWidths[_currentIndex] floatValue] + wGap; @@ -448,6 +467,7 @@ static CGFloat const contentSizeXOff = 20.0; if (self.segmentStyle.isScrollTitle) { self.scrollLine.zj_x = oldTitleView.zj_x + xDistance * progress; self.scrollLine.zj_width = oldTitleView.zj_width + wDistance * progress; + [self scrollLineColorsSet]; } else { if (self.segmentStyle.isAdjustCoverOrLineWidth) { CGFloat oldScrollLineW = [self.titleWidths[oldIndex] floatValue] + wGap; diff --git a/ProductApp/ProductApp/BaseControl/ZJScrollPageView/ZJSegmentStyle.h b/ProductApp/ProductApp/BaseControl/ZJScrollPageView/ZJSegmentStyle.h index e1134c4..4fb7cec 100644 --- a/ProductApp/ProductApp/BaseControl/ZJScrollPageView/ZJSegmentStyle.h +++ b/ProductApp/ProductApp/BaseControl/ZJScrollPageView/ZJSegmentStyle.h @@ -99,4 +99,7 @@ typedef NS_OPTIONS(NSInteger, SegmentViewComponent) { /**未使用*/ @property (assign, nonatomic) SegmentViewComponent segmentViewComponent; +///滚动条渐变数组 +@property (nonatomic , strong) NSArray *lineColors; + @end diff --git a/ProductApp/ProductApp/Other/PGJSearchView.h b/ProductApp/ProductApp/Other/PGJSearchView.h index bb3591c..639dc49 100644 --- a/ProductApp/ProductApp/Other/PGJSearchView.h +++ b/ProductApp/ProductApp/Other/PGJSearchView.h @@ -13,6 +13,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, strong) UIView *searchview; @property (nonatomic, strong) UIButton *searchbtn; @property (nonatomic, strong) UITextField *searchField; +@property (nonatomic, strong) UIImageView *fangdajing; + @property (nonatomic, copy) void (^searchBackAction)(NSString *search); @end diff --git a/ProductApp/ProductApp/Other/PGJSearchView.m b/ProductApp/ProductApp/Other/PGJSearchView.m index 6a87a40..2b28c50 100644 --- a/ProductApp/ProductApp/Other/PGJSearchView.m +++ b/ProductApp/ProductApp/Other/PGJSearchView.m @@ -24,9 +24,9 @@ searchview.backgroundColor = RGBCOLOR(248, 248, 248); [self addSubview:searchview]; [searchview mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.equalTo(self).offset(13); - make.right.equalTo(self).offset(-87); - make.top.equalTo(self).offset(14); + make.left.equalTo(self); + make.right.equalTo(self).offset(-60); + make.centerY.equalTo(self); make.height.offset(34); }]; _searchview = searchview; @@ -39,6 +39,7 @@ make.centerY.equalTo(searchview); make.width.height.offset(15); }]; + _fangdajing = fangdajing; UITextField *search = [[UITextField alloc] init]; NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:@" 请输入小区名称" attributes: @@ -55,6 +56,7 @@ make.height.offset(30); make.right.equalTo(searchview).offset(-10); }]; + [search setClearButtonMode:UITextFieldViewModeWhileEditing|UITextFieldViewModeUnlessEditing]; _searchField = search; UIButton *searchbtn = [[UIButton alloc] init]; @@ -67,7 +69,7 @@ [self addSubview:searchbtn]; [searchbtn mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.equalTo(searchview); - make.right.equalTo(self).offset(-13); + make.right.equalTo(self); make.width.offset(60); make.height.offset(34); }]; diff --git a/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatBottomView.m b/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatBottomView.m index bfb446f..76c208a 100644 --- a/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatBottomView.m +++ b/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatBottomView.m @@ -8,6 +8,7 @@ #import "AIChatBottomView.h" #import "HuanGeSiLuCollectionViewCell.h" #import "FSTextView.h" +#import "AIChatYuYinView.h" @interface AIChatBottomView () /// @@ -130,13 +131,26 @@ make.height.offset(40); make.right.equalTo(self).offset(-20); }]; -// [btyuyin addTarget:self action:@selector(yuyinAction) forControlEvents:UIControlEventTouchUpInside]; + + [btyuyin addTarget:self action:@selector(yuyinDownAction) forControlEvents:UIControlEventTouchDown]; + [btyuyin addTarget:self action:@selector(yuyinUpAction) forControlEvents:UIControlEventTouchUpInside]; [btyuyin setHidden:YES]; _btyuyin = btyuyin; } return self; } +-(void)yuyinDownAction +{ + AIChatYuYinView *view = [[AIChatYuYinView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT)];; + [self.viewController.view.window addSubview:view]; + NSLog(@"按下"); +} +-(void)yuyinUpAction +{ + NSLog(@"放开"); +} + -(void)inputAction:(UIButton *)sender { sender.selected = !sender.selected; diff --git a/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinBackView.h b/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinBackView.h new file mode 100644 index 0000000..f3b2438 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinBackView.h @@ -0,0 +1,18 @@ +// +// AIChatYuYinBackView.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AIChatYuYinBackView : UIView +/// +@property (nonatomic , strong) UIColor *colorbc; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinBackView.m b/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinBackView.m new file mode 100644 index 0000000..7356909 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinBackView.m @@ -0,0 +1,58 @@ +// +// AIChatYuYinBackView.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "AIChatYuYinBackView.h" + +@implementation AIChatYuYinBackView + +- (void)drawRect:(CGRect)rect +{ + CGContextRef context= UIGraphicsGetCurrentContext(); + CGContextSetLineWidth(context, 2.0); + CGContextSetFillColorWithColor(context, self.colorbc.CGColor); + + [self getDrawPath:context]; + + CGContextFillPath(context); +} +-(void)getDrawPath:(CGContextRef)context{ + + CGRect rrect = self.bounds; + + CGFloat radius = 16.0; + + CGFloat minx = CGRectGetMinX(rrect), + + midx = CGRectGetMidX(rrect), + + maxx = CGRectGetMaxX(rrect); + + CGFloat miny = CGRectGetMinY(rrect), + + maxy = CGRectGetMaxY(rrect)-10; + + + + CGContextMoveToPoint(context, midx+6, maxy); + + CGContextAddLineToPoint(context, midx, maxy+10); + + CGContextAddLineToPoint(context, midx-6, maxy); + + CGContextAddArcToPoint(context, minx, maxy, minx, miny, radius); + + CGContextAddArcToPoint(context, minx, miny, maxx, miny, radius); + + CGContextAddArcToPoint(context, maxx, miny, maxx, maxy, radius); + + CGContextAddArcToPoint(context, maxx, maxy, midx, maxy, radius); + + CGContextClosePath(context); + +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinView.h b/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinView.h new file mode 100644 index 0000000..26cb4cc --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinView.h @@ -0,0 +1,16 @@ +// +// AIChatYuYinView.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AIChatYuYinView : UIView + +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinView.m b/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinView.m new file mode 100644 index 0000000..ebf2da0 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/AIChart/view/AIChatYuYinView.m @@ -0,0 +1,122 @@ +// +// AIChatYuYinView.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "AIChatYuYinView.h" +#import "AIChatYuYinBackView.h" + +@interface AIChatYuYinView () +/// +@property (nonatomic , strong) UIButton *btok; + +/// +@property (nonatomic , strong) AIChatYuYinBackView *viewback; +/// +@property (nonatomic , strong) UITextView *textview; + +@end + +@implementation AIChatYuYinView + +-(id)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + [self setBackgroundColor:RGBACOLOR(0, 0, 0, 0.3)]; + + UIButton *btcancle = [[UIButton alloc] init]; + [btcancle setImage:[UIImage imageNamed:@"ai_yuyin_x"] forState:UIControlStateNormal]; + [self addSubview:btcancle]; + [btcancle mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(40); + make.bottom.offset(-TabHeight-80); + make.width.height.offset(70); + }]; + [btcancle addTarget:self action:@selector(cancleAction) forControlEvents:UIControlEventTouchUpInside]; + + UIButton *btok = [[UIButton alloc] init]; + [btok setImage:[UIImage imageNamed:@"ai_yuyin_ok"] forState:UIControlStateNormal]; + [self addSubview:btok]; + [btok mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(self).offset(-30); + make.centerY.equalTo(btcancle); + make.width.height.offset(90); + }]; + [btok addTarget:self action:@selector(okAction) forControlEvents:UIControlEventTouchUpInside]; + _btok = btok; + + AIChatYuYinBackView *viewback = [[AIChatYuYinBackView alloc] init]; + viewback.colorbc = RGBCOLOR(108, 119, 246); + [self addSubview:viewback]; + [viewback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(20); + make.right.equalTo(self).offset(-20); + make.bottom.equalTo(btcancle.mas_top).offset(-60); + make.height.offset(112); + }]; + [viewback setBackgroundColor:[UIColor clearColor]]; + _viewback = viewback; + + UITextView *textview = [[UITextView alloc] init]; + [textview setTextColor:[UIColor whiteColor]]; + [textview setTextAlignment:NSTextAlignmentLeft]; + [textview setFont:[UIFont systemFontOfSize:16]]; + [textview setBackgroundColor:[UIColor clearColor]]; + [viewback addSubview:textview]; + [textview mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.offset(5); + make.left.offset(10); + make.right.equalTo(viewback).offset(-10); + make.bottom.equalTo(viewback).offset(-20); + }]; + _textview = textview; + + } + return self; +} + +-(void)noinfo +{ + self.viewback.colorbc = RGBCOLOR(227, 90, 79); + + [self.viewback setNeedsDisplay]; + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:@"未识别到文字!"]; + [lbname setTextColor:[UIColor whiteColor]]; + [lbname setTextAlignment:NSTextAlignmentCenter]; + [lbname setFont:[UIFont systemFontOfSize:24]]; + [self.viewback addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(self.viewback); + make.centerY.equalTo(self.viewback).offset(-10); + }]; + + UIImageView *imgvback = [[UIImageView alloc] init]; + [imgvback setImage:[UIImage imageNamed:@"ai_yuyin_gt"]]; + [self.viewback addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.offset(20); + make.centerY.equalTo(lbname); + make.right.equalTo(lbname.mas_left).offset(-2); + }]; + + +} + +-(void)cancleAction +{ + [self removeFromSuperview]; +} +-(void)okAction +{ + [self noinfo]; +// self.textview.text = @"测试"; + + +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/NetWorkManager/NetWorkManager.h b/ProductApp/ProductApp/ProductMain/NetWorkManager/NetWorkManager.h index 4a739fd..400f715 100644 --- a/ProductApp/ProductApp/ProductMain/NetWorkManager/NetWorkManager.h +++ b/ProductApp/ProductApp/ProductMain/NetWorkManager/NetWorkManager.h @@ -9,7 +9,8 @@ #import "RoleTreeModel.h" #import "TextbookInfoModel.h" - +#import "ToolsTypeModel.h" +#import "ToolsListModel.h" NS_ASSUME_NONNULL_BEGIN @@ -41,6 +42,41 @@ NS_ASSUME_NONNULL_BEGIN /api/textbook/detail */ + + +/* + 工具类型 + /api/tools/type + */ ++ (void)requestToolsTypeData:(UIView *)view + Callback:(completeModeBlock)callback; + +/* + 工具列表 + /api/tools/list + page + type_id + tool_name + is_recommend 热门穿0 其他空 + */ ++ (void)requestToolsListData:(UIView *)view + page:(int)page + type_id:(NSString *)type_id + tool_name:(NSString *)tool_name + is_recommend:(NSString *)is_recommend + Callback:(completeModeBlock)callback; + +/* + 搜索工具列表 + /api/tools/search + page + query + */ ++ (void)requestToolsSearchData:(UIView *)view + page:(int)page + query:(NSString *)query + Callback:(completeModeBlock)callback; + @end NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/NetWorkManager/NetWorkManager.m b/ProductApp/ProductApp/ProductMain/NetWorkManager/NetWorkManager.m index 295b0d4..5cd4d3c 100644 --- a/ProductApp/ProductApp/ProductMain/NetWorkManager/NetWorkManager.m +++ b/ProductApp/ProductApp/ProductMain/NetWorkManager/NetWorkManager.m @@ -83,4 +83,124 @@ } + + + + +/* + 工具类型 + /api/tools/type + */ ++ (void)requestToolsTypeData:(UIView *)view + Callback:(completeModeBlock)callback +{ + NSMutableDictionary *dicQuery = [NSMutableDictionary new]; + + NSMutableDictionary *dicHeader = [NSMutableDictionary new]; + + NSMutableDictionary *dicpush = [NSMutableDictionary new]; + + [YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/tools/type" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) { + BOOL state = NO; + NSString *describle = @""; + if (responseObject==nil) { + describle = @"网络错误"; + BaseModel *model = [BaseModel new]; + model.message =describle; + callback(state,model,describle); + }else{ + NSDictionary *dicAll=responseObject; + describle = dicAll[@"message"]; + if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) { + state = YES; + } + callback(state,[ToolsTypeModel yy_modelWithJSON:dicAll],describle); + } + }]; +} + +/* + 工具列表 + /api/tools/list + page + type_id + tool_name + is_recommend 热门穿0 其他空 + */ ++ (void)requestToolsListData:(UIView *)view + page:(int)page + type_id:(NSString *)type_id + tool_name:(NSString *)tool_name + is_recommend:(NSString *)is_recommend + Callback:(completeModeBlock)callback +{ + NSMutableDictionary *dicQuery = [NSMutableDictionary new]; + [dicQuery setObject:[NSString stringWithFormat:@"%d",page] forKey:@"page"]; + [dicQuery setObject:@"10" forKey:@"size"]; + [dicQuery setObject:[Tools isStringnil:type_id] forKey:@"type_id"]; +// [dicQuery setObject:[Tools stringEncode:[Tools isStringnil:tool_name]] forKey:@"tool_name"]; + [dicQuery setObject:[Tools isStringnil:is_recommend] forKey:@"is_recommend"]; + + NSMutableDictionary *dicHeader = [NSMutableDictionary new]; + + NSMutableDictionary *dicpush = [NSMutableDictionary new]; + + [YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/tools/list" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) { + BOOL state = NO; + NSString *describle = @""; + if (responseObject==nil) { + describle = @"网络错误"; + BaseModel *model = [BaseModel new]; + model.message =describle; + callback(state,model,describle); + }else{ + NSDictionary *dicAll=responseObject; + describle = dicAll[@"message"]; + if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) { + state = YES; + } + callback(state,[ToolsListModel yy_modelWithJSON:dicAll],describle); + } + }]; +} + +/* + 搜索工具列表 + /api/tools/search + page + query + */ ++ (void)requestToolsSearchData:(UIView *)view + page:(int)page + query:(NSString *)query + Callback:(completeModeBlock)callback +{ + NSMutableDictionary *dicQuery = [NSMutableDictionary new]; + [dicQuery setObject:[NSString stringWithFormat:@"%d",page] forKey:@"page"]; + [dicQuery setObject:@"10" forKey:@"size"]; + [dicQuery setObject:[Tools stringEncode:[Tools isStringnil:query]] forKey:@"query"]; + + NSMutableDictionary *dicHeader = [NSMutableDictionary new]; + + NSMutableDictionary *dicpush = [NSMutableDictionary new]; + + [YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/tools/search" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) { + BOOL state = NO; + NSString *describle = @""; + if (responseObject==nil) { + describle = @"网络错误"; + BaseModel *model = [BaseModel new]; + model.message =describle; + callback(state,model,describle); + }else{ + NSDictionary *dicAll=responseObject; + describle = dicAll[@"message"]; + if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) { + state = YES; + } + callback(state,[ToolsListModel yy_modelWithJSON:dicAll],describle); + } + }]; +} + @end diff --git a/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsListModel.h b/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsListModel.h new file mode 100644 index 0000000..cb4cb8d --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsListModel.h @@ -0,0 +1,91 @@ +// +// ToolsListModel.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "BaseModel.h" + +NS_ASSUME_NONNULL_BEGIN +@class ToolsListModelData,ToolsListModelDataItems,ToolsListModelDataItemsConfig,ToolsListModelDataItemsConfigPrompt; +@interface ToolsListModel : BaseModel +/// +@property (nonatomic , strong) ToolsListModelData *data; +@end +@interface ToolsListModelData : NSObject +/// +@property (nonatomic , strong) NSString *total; + +@property (nonatomic , strong) NSArray *items; +@end +@interface ToolsListModelDataItems : NSObject +/// +@property (nonatomic , strong) NSString *ID; +/// +@property (nonatomic , strong) NSString *Descriptions; +/// +@property (nonatomic , strong) NSString *is_fav; +/// +@property (nonatomic , strong) NSString *scene; +/// +@property (nonatomic , strong) NSString *sort; +/// +@property (nonatomic , strong) NSString *status; +/// +@property (nonatomic , strong) NSString *tool_icon; +/// +@property (nonatomic , strong) NSString *tool_name; +/// +@property (nonatomic , strong) NSString *type_id; +/// +@property (nonatomic , strong) NSString *type_name; +/// +@property (nonatomic , strong) NSString *update_time; +/// +@property (nonatomic , strong) NSString *use_count; +/// +@property (nonatomic , strong) ToolsListModelDataItemsConfig *config; +@end +@interface ToolsListModelDataItemsConfig : NSObject +/// +@property (nonatomic , strong) NSArray *prompt; + +@end +@interface ToolsListModelDataItemsConfigPrompt : NSObject +///input select +@property (nonatomic , strong) NSString *multi_select; +/// +@property (nonatomic , strong) NSString *name; +/// +@property (nonatomic , strong) NSString *name_edit; +/// +@property (nonatomic , strong) NSArray *options; +/// +@property (nonatomic , strong) NSString *other_option; +///是否必填 * +@property (nonatomic , strong) NSString *require; +/// +@property (nonatomic , strong) NSString *type; + + +/// textarea +@property (nonatomic , strong) NSString *default_value; +/// +@property (nonatomic , strong) NSString *desc; +/// +@property (nonatomic , strong) NSString *max_len; + + +/// time_zone +@property (nonatomic , strong) NSString *end_time; +/// +@property (nonatomic , strong) NSString *format; +/// +@property (nonatomic , strong) NSString *start_time; + +///time_select +@property (nonatomic , strong) NSString *time; + +@end +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsListModel.m b/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsListModel.m new file mode 100644 index 0000000..fb2a690 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsListModel.m @@ -0,0 +1,40 @@ +// +// ToolsListModel.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "ToolsListModel.h" + +@implementation ToolsListModel ++ (NSDictionary *)modelContainerPropertyGenericClass { + return @{@"data" : [ToolsListModelData class]}; +} +@end +@implementation ToolsListModelData ++ (NSDictionary *)modelContainerPropertyGenericClass { + return @{@"items" : [ToolsListModelDataItems class]}; +} +@end +@implementation ToolsListModelDataItems ++ (nullable NSDictionary *)modelCustomPropertyMapper +{ + return @{@"ID" : @"id",@"Descriptions":@"description"}; +} + ++ (NSDictionary *)modelContainerPropertyGenericClass { + return @{@"config" : [ToolsListModelDataItemsConfig class]}; +} + +@end + +@implementation ToolsListModelDataItemsConfig ++ (NSDictionary *)modelContainerPropertyGenericClass { + return @{@"prompt" : [ToolsListModelDataItemsConfigPrompt class]}; +} +@end + +@implementation ToolsListModelDataItemsConfigPrompt + +@end diff --git a/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsTypeModel.h b/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsTypeModel.h new file mode 100644 index 0000000..1a0b2b7 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsTypeModel.h @@ -0,0 +1,23 @@ +// +// ToolsTypeModel.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "BaseModel.h" + +NS_ASSUME_NONNULL_BEGIN +@class ToolsTypeModelData; +@interface ToolsTypeModel : BaseModel +/// +@property (nonatomic , strong) NSArray *data; +@end +@interface ToolsTypeModelData : NSObject +/// +@property (nonatomic , strong) NSString *ID; +/// +@property (nonatomic , strong) NSString *type_name; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsTypeModel.m b/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsTypeModel.m new file mode 100644 index 0000000..eca77f3 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/NetWorkManager/models/ToolsTypeModel.m @@ -0,0 +1,21 @@ +// +// ToolsTypeModel.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "ToolsTypeModel.h" + +@implementation ToolsTypeModel ++ (NSDictionary *)modelContainerPropertyGenericClass { + return @{@"data" : [ToolsTypeModelData class]}; +} +@end +@implementation ToolsTypeModelData ++ (nullable NSDictionary *)modelCustomPropertyMapper +{ + return @{@"ID" : @"id"}; +} +@end + diff --git a/ProductApp/ProductApp/ProductMain/工具/GongJuListViewController.h b/ProductApp/ProductApp/ProductMain/工具/GongJuListViewController.h new file mode 100644 index 0000000..bf443a9 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/GongJuListViewController.h @@ -0,0 +1,18 @@ +// +// GongJuListViewController.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import +#import "ZJScrollPageView.h" +#import "ToolsTypeModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuListViewController : UIViewController +/// +@property (nonatomic , strong) ToolsTypeModelData *model; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/GongJuListViewController.m b/ProductApp/ProductApp/ProductMain/工具/GongJuListViewController.m new file mode 100644 index 0000000..9b7ca20 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/GongJuListViewController.m @@ -0,0 +1,135 @@ +// +// GongJuListViewController.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuListViewController.h" +#import "GongJuListTableViewCell.h" +#import "NetWorkManager.h" +#import "GongJuCreateViewController.h" + + +@interface GongJuListViewController () +/// +@property (nonatomic , strong) UITableView *tableView; +@property (nonatomic , assign) int ipage; +/// +@property (nonatomic , strong) NSMutableArray *arrdata; + +@end + +@implementation GongJuListViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + [self.view setBackgroundColor:[UIColor clearColor]]; + + UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; + [tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone]; + [tableView setBackgroundColor:[UIColor clearColor]]; + [tableView setDelegate:self]; + [tableView setDataSource:self]; + [self.view addSubview:tableView]; + [tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.view); + }]; + _tableView = tableView; + tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ + self.ipage += 1; + [self getdata]; + }]; +} + +-(void)setModel:(ToolsTypeModelData *)model +{ + _model = model; + self.ipage = 1; + self.arrdata = [NSMutableArray new]; + [self.tableView reloadData]; + [self getdata]; +} + +-(void)getdata +{ + [HXLoadingHUD showWithStatus:@"" maskType:0]; + [NetWorkManager requestToolsListData:self.view page:self.ipage type_id:self.model.ID tool_name:self.model.type_name is_recommend:[Tools isStringnil:self.model.ID].length==0?@"0":@"" Callback:^(BOOL state, ToolsListModel *responseObject, NSString * _Nullable describle) { + [HXLoadingHUD dismiss]; + [self.tableView.mj_header endRefreshing]; + [self.tableView.mj_footer endRefreshing]; + if(self.ipage==1)self.arrdata = [NSMutableArray new]; + if(state) + { + [self.arrdata addObjectsFromArray:responseObject.data.items]; + } + else + { + [HXHud showMessage:responseObject.message afterDelayType:1]; + } + [self.tableView reloadData]; + }]; +} + +#pragma mark - UITableView +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.arrdata.count; +} +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *strcell = @"GongJuListTableViewCell"; + GongJuListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell]; + if(!cell) + { + cell = [[GongJuListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell]; + [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; + [cell setBackgroundColor:[UIColor clearColor]]; + } + cell.model = self.arrdata[indexPath.row]; + return cell; +} +-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return 0.01; +} +-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return 10; +} +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + float fheight = 82; + ToolsListModelDataItems *model = self.arrdata[indexPath.row]; + float f_w = [Tools getWidthWithText:model.Descriptions height:20 font:12]+1; + if(f_w>UISCREEN_WIDTH-157) + { + fheight = 95; + } + return fheight; +} +-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section +{ + return [UIView new]; +} +-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section +{ + return [UIView new]; +} +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + ToolsListModelDataItems *model = self.arrdata[indexPath.row]; + if(model.ID.intValue>=1 && model.ID.intValue<=9) + { + + } + else + { + GongJuCreateViewController *vc = [GongJuCreateViewController new]; + vc.modelDetail = model; + [self.navigationController pushViewController:vc animated:YES]; + } +} + + +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/GongJuViewController.m b/ProductApp/ProductApp/ProductMain/工具/GongJuViewController.m index f641066..1328122 100644 --- a/ProductApp/ProductApp/ProductMain/工具/GongJuViewController.m +++ b/ProductApp/ProductApp/ProductMain/工具/GongJuViewController.m @@ -6,26 +6,213 @@ // #import "GongJuViewController.h" +#import "PGJSearchView.h" +#import "ZJScrollPageView.h" +#import "GongJuListViewController.h" +#import "NetWorkManager.h" +#import "GongJuSearchViewController.h" -@interface GongJuViewController () + +@interface GongJuViewController () +//轮播 +@property (nonatomic, strong) SDCycleScrollView *cleScrollView; + +@property (nonatomic , strong) ZJScrollPageView *scrollPageView; + +/// +@property (nonatomic , strong) NSMutableArray *arrdata; @end @implementation GongJuViewController - +-(UIStatusBarStyle)preferredStatusBarStyle { + return UIStatusBarStyleDefault; +} +-(void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; +} - (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. + [super viewDidLoad]; + [self.navigationController setNavigationBarHidden:YES animated:NO]; + [self showNaviGationView:YES]; + [self.navigationView setTitle:@"" titleColor:RGBCOLOR(60, 60, 60)]; + [self.navigationView setBackgroundColor:[UIColor clearColor]]; + [self drawTopView]; + + SDCycleScrollView *cleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero imageNamesGroup:@[]]; + cleScrollView.scrollDirection = UICollectionViewScrollDirectionHorizontal; + cleScrollView.delegate = self; + cleScrollView.backgroundColor = [UIColor whiteColor]; + cleScrollView.titleLabelBackgroundColor = [UIColor clearColor]; + cleScrollView.titleLabelTextColor = [UIColor darkGrayColor]; + cleScrollView.titleLabelTextFont = [UIFont systemFontOfSize:[Tools sizeFont:14]]; + cleScrollView.autoScrollTimeInterval = 3.0; + cleScrollView.placeholderImage = [UIImage imageNamed:@"home_bannernomo"]; + cleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill; + [cleScrollView setShowPageControl:YES]; + cleScrollView.pageControlBottomOffset = -5; + cleScrollView.pageControlDotSize = CGSizeMake(4, 4); + [self.view addSubview:cleScrollView]; + [cleScrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(20); + make.top.offset(NavHeight+10); + make.right.equalTo(self.view).offset(-20); + make.height.offset(90); + }]; + [cleScrollView.layer setMasksToBounds:YES]; + [cleScrollView.layer setCornerRadius:8]; + _cleScrollView = cleScrollView; + + cleScrollView.imageURLStringsGroup = @[@"",@"",@""]; + + [self drawUI]; + + [self getdata]; } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. +-(void)drawUI +{ + ZJSegmentStyle *style = [[ZJSegmentStyle alloc] init]; + //显示滚动条 + style.showLine = YES; + style.normalTitleColor = RGBCOLOR(153, 153, 153); + style.selectedTitleColor = RGBCOLOR(26, 26, 26); + style.titleFont = [UIFont systemFontOfSize:14]; + style.scrollLineSpacing = -5; + style.scrollLineHeight = 3; + style.titleMargin = 30; + style.scrollLineColor = [UIColor clearColor]; + style.autoAdjustTitlesWidth = YES; + style.lineColors = @[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(167, 247, 153).CGColor]; + ZJScrollPageView *scrollPageView = [[ZJScrollPageView alloc] initWithFrame:CGRectMake(0, NavHeight+110, UISCREEN_WIDTH, UISCREEN_HEIGHT - NavHeight-TabHeight-110) segmentStyle:style titles:@[] parentViewController:self delegate:self]; + [self.view addSubview:scrollPageView]; + [scrollPageView setBackgroundColor:[UIColor clearColor]]; + scrollPageView.segmentView.backgroundColor = [UIColor clearColor]; + scrollPageView.contentView.backgroundColor = [UIColor clearColor]; + scrollPageView.contentView.collectionView.backgroundColor = [UIColor clearColor]; + _scrollPageView = scrollPageView; } -*/ +-(void)drawTopView +{ + [self.view setBackgroundColor:RGBCOLOR(255, 255, 255)]; + UIImageView *imgvback = [[UIImageView alloc] init]; + [imgvback setImage:[UIImage imageNamed:@"gj_back"]]; + [self.view addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.equalTo(self.view); + }]; + [self.view sendSubviewToBack:imgvback]; + + UIButton *btnianji = [[UIButton alloc] init]; + [btnianji setTitle:@"学生-五年级" forState:UIControlStateNormal]; + [btnianji setTitleColor:RGBCOLOR(26, 26, 26) forState:UIControlStateNormal]; + [btnianji.titleLabel setFont:[UIFont systemFontOfSize:16]]; + [btnianji.titleLabel sizeToFit]; + [btnianji setImage:[UIImage imageNamed:@"home_三角"] forState:UIControlStateNormal]; + [self.navigationView addSubview:btnianji]; + [btnianji mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(16); + make.bottom.equalTo(self.navigationView).offset(-2); + make.height.offset(40); + make.width.offset(100); + }]; + [btnianji setIconInRightWithSpacing:6]; + [btnianji setTag:0]; + [btnianji addTarget:self action:@selector(topAction:) forControlEvents:UIControlEventTouchUpInside]; + + PGJSearchView *viewsearh = [[PGJSearchView alloc] init]; + [self.navigationView addSubview:viewsearh]; + [viewsearh mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(btnianji.mas_right).offset(10); + make.right.equalTo(self.navigationView).offset(-15); + make.height.offset(34); + make.centerY.equalTo(btnianji); + }]; + [viewsearh.searchview setBackgroundColor:[UIColor whiteColor]]; + [viewsearh.searchview.layer setCornerRadius:17]; + viewsearh.fangdajing.image = [UIImage imageNamed:@"gj_search"]; + viewsearh.searchField.placeholder = @"请输入关键词"; + [viewsearh.searchbtn setHidden:YES]; + [viewsearh.searchview mas_remakeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(viewsearh); + }]; + + UIButton *btsearch = [[UIButton alloc] init]; + [viewsearh addSubview:btsearch]; + [btsearch mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(viewsearh); + }]; + [btsearch setTag:1]; + [btsearch addTarget:self action:@selector(topAction:) forControlEvents:UIControlEventTouchUpInside]; + +} + +-(void)topAction:(UIButton *)sender +{ + if(sender.tag==0) + { + + } + else + { + GongJuSearchViewController *vc = [GongJuSearchViewController new]; + [self.navigationController pushViewController:vc animated:YES]; + } +} + +-(void)getdata +{ + [HXLoadingHUD showWithStatus:@"" maskType:0]; + [NetWorkManager requestToolsTypeData:self.view Callback:^(BOOL state, ToolsTypeModel *responseObject, NSString * _Nullable describle) { + [HXLoadingHUD dismiss]; + if(state) + { + self.arrdata = [NSMutableArray new]; + ToolsTypeModelData *model0 = [ToolsTypeModelData new]; + model0.type_name = @"热门"; + model0.ID = @""; + [self.arrdata addObject:model0]; + [self.arrdata addObjectsFromArray:responseObject.data]; + + NSMutableArray *arrtitle = [NSMutableArray new]; + for(ToolsTypeModelData *model in self.arrdata) + { + [arrtitle addObject:model.type_name]; + } + + [self.scrollPageView reloadWithNewTitles:arrtitle]; + } + else + { + [HXHud showMessage:responseObject.message afterDelayType:1]; + } + }]; +} +#pragma mark -/** 点击图片回调 */ +- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index +{ + +} +#pragma mark - custom delegate - 自定义或者第三方控件的delegate +- (NSInteger)numberOfChildViewControllers { + return self.arrdata.count; +} + +- (UIViewController *)childViewController:(UIViewController *)reuseViewController forIndex:(NSInteger)index { + GongJuListViewController *childVC = (GongJuListViewController *)reuseViewController; + if (!childVC) { + childVC = [[GongJuListViewController alloc] init]; + } + childVC.model = self.arrdata[index]; + + return childVC; +} +- (void)scrollPageController:(UIViewController *)scrollPageController childViewControllDidAppear:(UIViewController *)childViewController forIndex:(NSInteger)index +{ +} +- (BOOL)shouldAutomaticallyForwardAppearanceMethods { + return NO; +} @end diff --git a/ProductApp/ProductApp/ProductMain/工具/cell/GongJuListTableViewCell.h b/ProductApp/ProductApp/ProductMain/工具/cell/GongJuListTableViewCell.h new file mode 100644 index 0000000..2473c32 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/cell/GongJuListTableViewCell.h @@ -0,0 +1,17 @@ +// +// GongJuListTableViewCell.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import +#import "ToolsListModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuListTableViewCell : UITableViewCell +/// +@property (nonatomic , strong) ToolsListModelDataItems *model; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/cell/GongJuListTableViewCell.m b/ProductApp/ProductApp/ProductMain/工具/cell/GongJuListTableViewCell.m new file mode 100644 index 0000000..c4237be --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/cell/GongJuListTableViewCell.m @@ -0,0 +1,124 @@ +// +// GongJuListTableViewCell.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuListTableViewCell.h" + +@interface GongJuListTableViewCell () +/// +@property (nonatomic , strong) UIImageView *imgvback; +/// +@property (nonatomic , strong) UILabel *lbname; +@property (nonatomic , strong) UILabel *lbinfo; +@property (nonatomic , strong) UIButton *btcollect; + +@end + +@implementation GongJuListTableViewCell + +-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier +{ + if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) + { + UIView *viewback = [[UIView alloc] init]; + [viewback setBackgroundColor:[UIColor whiteColor]]; + [self.contentView addSubview:viewback]; + [viewback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(16); + make.right.equalTo(self).offset(-16); + make.top.offset(6); + make.bottom.equalTo(self).offset(-6); + }]; + [Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 0, 0, 0.05) shadowOpacity:1 cornerRadius:4 shadowRadius:5]; + + UIImageView *imgvback = [[UIImageView alloc] init]; + [viewback addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.offset(38); + make.centerY.equalTo(viewback); + make.left.offset(12); + }]; + _imgvback = imgvback; + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:@"文本比较"]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont systemFontOfSize:15]]; + [viewback addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(imgvback.mas_right).offset(10); + make.top.offset(16); + }]; + _lbname = lbname; + + UILabel *lbinfo = [[UILabel alloc] init]; + [lbinfo setText:@"给于两段文本进行逐字比较差异"]; + [lbinfo setTextColor:RGBCOLOR(153, 153, 153)]; + [lbinfo setTextAlignment:NSTextAlignmentLeft]; + [lbinfo setFont:[UIFont systemFontOfSize:12]]; + [lbinfo setNumberOfLines:2]; + [viewback addSubview:lbinfo]; + [lbinfo mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(lbname); + make.top.equalTo(lbname.mas_bottom).offset(2); + make.right.equalTo(viewback).offset(-65); + }]; + _lbinfo = lbinfo; + + UIButton *btcollect = [[UIButton alloc] init]; + [btcollect setTitle:@"235" forState:UIControlStateNormal]; + [btcollect setTitleColor:RGBCOLOR(196, 196, 196) forState:UIControlStateNormal]; + [btcollect.titleLabel setFont:[UIFont systemFontOfSize:10]]; + [btcollect setImage:[UIImage imageNamed:@"gj_scN"] forState:UIControlStateNormal]; + [btcollect setImage:[UIImage imageNamed:@"gj_scY"] forState:UIControlStateSelected]; + [viewback addSubview:btcollect]; + [btcollect mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(viewback).offset(-1); + make.top.bottom.equalTo(viewback); + make.width.offset(60); + }]; + [btcollect setIconInTopWithSpacing:4]; + [btcollect addTarget:self action:@selector(collectAction:) forControlEvents:UIControlEventTouchUpInside]; + _btcollect = btcollect; + } + return self; +} + +-(void)collectAction:(UIButton *)sender +{ + +} + +-(void)setModel:(ToolsListModelDataItems *)model +{ + _model = model; + + self.lbname.text = [Tools isStringnilkong:model.tool_name]; + self.lbinfo.text = [Tools isStringnilkong:model.Descriptions]; + [self.btcollect setTitle:[Tools isStringnilkong:model.use_count] forState:UIControlStateNormal]; + if(model.is_fav.intValue == 1) + { + [self.btcollect setSelected:YES]; + } + else + { + [self.btcollect setSelected:NO]; + } + [self.btcollect setIconInTopWithSpacing:4]; + + if([model.tool_icon containsString:@"http"]) + { + [self.imgvback sd_setImageWithURL:[NSURL URLWithString:model.tool_icon] placeholderImage:nil]; + } + else + { + self.imgvback.image = [UIImage imageNamed:[NSString stringWithFormat:@"gj_%@",model.ID]]; + } + +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/搜索/GongJuSearchViewController.h b/ProductApp/ProductApp/ProductMain/工具/搜索/GongJuSearchViewController.h new file mode 100644 index 0000000..c3e1e44 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/搜索/GongJuSearchViewController.h @@ -0,0 +1,16 @@ +// +// GongJuSearchViewController.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuSearchViewController : BaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/搜索/GongJuSearchViewController.m b/ProductApp/ProductApp/ProductMain/工具/搜索/GongJuSearchViewController.m new file mode 100644 index 0000000..d844931 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/搜索/GongJuSearchViewController.m @@ -0,0 +1,105 @@ +// +// GongJuSearchViewController.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuSearchViewController.h" +#import "PGJSearchView.h" +#import "SearchInputHestoryView.h" +#import "GongJuSearchListViewController.h" + +@interface GongJuSearchViewController () +/// +@property (nonatomic , strong) SearchInputHestoryView *viewhestory; + +@end + +@implementation GongJuSearchViewController +- (UIStatusBarStyle)preferredStatusBarStyle { + return UIStatusBarStyleDefault; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + [self.navigationController setNavigationBarHidden:YES animated:animated]; + [self showNaviGationView:YES]; + [self.navigationView setTitle:@" " titleColor:RGBCOLOR(60, 60, 60)]; + [self.navigationView setBackgroundColor:[UIColor whiteColor]]; + if(self.viewhestory) + { + [self.viewhestory refShow]; + } +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self.view setBackgroundColor:RGBCOLOR(242, 242, 242)]; + [self drawSearch]; + + SearchInputHestoryView *viewhestory = [SearchInputHestoryView new]; + [self.view addSubview:viewhestory]; + [viewhestory mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(self.view); + make.top.offset(NavHeight+10); + }]; + [viewhestory setBackValue:^(NSString * _Nonnull strkey) { + [self searchAction:strkey]; + }]; + _viewhestory = viewhestory; +} + +-(void)drawSearch +{ + PGJSearchView *viewsearh = [[PGJSearchView alloc] init]; + [self.navigationView addSubview:viewsearh]; + [viewsearh mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(60); + make.right.equalTo(self.navigationView); + make.height.offset(34); + make.bottom.equalTo(self.navigationView).offset(-5); + }]; + [viewsearh.searchview setBackgroundColor:[UIColor whiteColor]]; + [viewsearh.searchview.layer setCornerRadius:17]; + viewsearh.fangdajing.image = [UIImage imageNamed:@"gj_search"]; + viewsearh.searchField.placeholder = @"请输入关键词"; + [viewsearh.searchview.layer setBorderWidth:1]; + [viewsearh.searchview.layer setBorderColor:RGBCOLOR(108, 119, 246).CGColor]; + [viewsearh.searchview mas_remakeConstraints:^(MASConstraintMaker *make) { + make.left.offset(0); + make.centerY.equalTo(viewsearh); + make.height.offset(34); + make.right.equalTo(viewsearh).offset(-60); + }]; + [viewsearh.searchbtn setBackgroundColor:[UIColor whiteColor]]; + [viewsearh.searchbtn setTitleColor:RGBCOLOR(51, 51, 51) forState:UIControlStateNormal]; + [viewsearh.searchbtn.titleLabel setFont:[UIFont systemFontOfSize:16]]; + [viewsearh setSearchBackAction:^(NSString * _Nonnull search) { + if(search.length>0) + { + NSMutableArray *arrShow = [[NSUserDefaults standardUserDefaults] objectForKey:SearchKeywordsHestory]; + if(arrShow == nil) + { + arrShow = [NSMutableArray new]; + } + NSMutableArray *arrtemp = [NSMutableArray new]; + if([arrShow containsObject:search]==NO) + { + [arrtemp addObject:search]; + } + [arrtemp addObjectsFromArray:arrShow]; + [[NSUserDefaults standardUserDefaults] setObject:arrtemp forKey:SearchKeywordsHestory]; + [self.viewhestory refShow]; + [self searchAction:search]; + } + }]; + +} +-(void)searchAction:(NSString *)value +{ + [self.view endEditing:YES]; + GongJuSearchListViewController *vc = [GongJuSearchListViewController new]; + vc.strvalue = value; + [self.navigationController pushViewController:vc animated:YES]; +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/搜索/view/SearchInputHestoryView.h b/ProductApp/ProductApp/ProductMain/工具/搜索/view/SearchInputHestoryView.h new file mode 100644 index 0000000..ef0828a --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/搜索/view/SearchInputHestoryView.h @@ -0,0 +1,21 @@ +// +// SearchInputHestoryView.h +// ProductApp +// +// Created by 工作 on 2024/7/11. +// + +#import + +///搜索历史 +#define SearchKeywordsHestory @"SearchKeywordsHestory" +NS_ASSUME_NONNULL_BEGIN + +typedef void(^SearchInputHestoryViewBack)(NSString *strkey); +@interface SearchInputHestoryView : UIView +/// +@property (nonatomic , strong) SearchInputHestoryViewBack backValue; +-(void)refShow; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/搜索/view/SearchInputHestoryView.m b/ProductApp/ProductApp/ProductMain/工具/搜索/view/SearchInputHestoryView.m new file mode 100644 index 0000000..169ba16 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/搜索/view/SearchInputHestoryView.m @@ -0,0 +1,222 @@ +// +// SearchInputHestoryView.m +// ProductApp +// +// Created by 工作 on 2024/7/11. +// + +#import "SearchInputHestoryView.h" + + +@interface SearchInputHestoryView () +/// +@property (nonatomic , strong) UIView *viewNo; +/// +@property (nonatomic , strong) MASConstraint *bottomSelf; + +/// +@property (nonatomic , strong) UIView *viewKeywords; +/// +@property (nonatomic , strong) NSMutableArray *arrShow; +@end + +@implementation SearchInputHestoryView + +-(id)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:@"历史搜索"]; + [lbname setTextColor:RGBCOLOR(60, 60, 60)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont systemFontOfSize:16]]; + [self addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(16); + make.top.offset(10); + }]; + + UIButton *btref = [[UIButton alloc] init]; + [btref setImage:[Tools imageWithImageName:[UIImage imageNamed:@"search_del"] imageColor:RGBCOLOR(158, 158, 158)] forState:UIControlStateNormal]; + [self addSubview:btref]; + [btref mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.equalTo(lbname); + make.height.offset(30); + make.width.offset(40); + make.right.equalTo(self).offset(-10); + }]; + [btref addTarget:self action:@selector(delAction) forControlEvents:UIControlEventTouchUpInside]; + + UIView *viewline1 = [[UIView alloc] init]; + [self addSubview:viewline1]; + [viewline1 mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(lbname); + make.right.equalTo(self).offset(-20); + make.top.equalTo(lbname.mas_bottom).offset(13); + make.height.offset(1); + }]; + + UIView *viewNo = [[UIView alloc] init]; + [self addSubview:viewNo]; + [viewNo mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(self); + make.top.equalTo(viewline1.mas_bottom); + make.height.offset(137); + }]; + [self drawViewNo:viewNo]; + _viewNo = viewNo; + + UIView *viewKeywords = [[UIView alloc] init]; + [self addSubview:viewKeywords]; + [viewKeywords mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(viewline1); + make.top.equalTo(viewline1.mas_bottom).offset(10); + make.height.offset(1); + }]; + _viewKeywords = viewKeywords; + + [self mas_makeConstraints:^(MASConstraintMaker *make) { + self.bottomSelf = make.bottom.equalTo(viewNo); + }]; + + self.arrShow = [[NSUserDefaults standardUserDefaults] objectForKey:SearchKeywordsHestory]; + if(self.arrShow == nil) + { + self.arrShow = [NSMutableArray new]; + } + [self drawKeyWordsView]; + + } + return self; +} + +-(void)drawViewNo:(UIView *)view +{ + UIImageView *imgvback = [[UIImageView alloc] init]; + [imgvback setImage:[UIImage imageNamed:@"暂无搜索记录"]]; + [view addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.offset(15); + make.width.height.offset(80); + make.centerX.equalTo(view); + }]; + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:@"暂无搜索记录"]; + [lbname setTextColor:RGBCOLOR(156, 156, 156)]; + [lbname setTextAlignment:NSTextAlignmentCenter]; + [lbname setFont:[UIFont systemFontOfSize:12]]; + [view addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(view); + make.top.equalTo(imgvback.mas_bottom).offset(10); + }]; + +} + +-(void)drawKeyWordsView +{ + for(UIView *view in self.viewKeywords.subviews) + { + [view removeFromSuperview]; + } + float f_width = UISCREEN_WIDTH-56; + + float ftop = 0; + float fleft = 0; + UIView *viewlast = nil; + for(int i = 0 ; i < self.arrShow.count; i++) + { + float f_w = [Tools getWidthWithText:self.arrShow[i] height:20 font:14]+32; + if((fleft+f_w)>f_width) + { + ftop+=40; + fleft = 0; + } + if(f_w>f_width)f_w = f_width; + UIView *viewitem = [[UIView alloc] init]; + [viewitem setBackgroundColor:[UIColor whiteColor]]; + [self.viewKeywords addSubview:viewitem]; + [viewitem mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.offset(f_w); + make.height.offset(30); + make.top.offset(ftop); + make.left.offset(fleft); + }]; + [viewitem.layer setMasksToBounds:YES]; + [viewitem.layer setCornerRadius:15]; + viewlast = viewitem; + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:self.arrShow[i]]; + [lbname setTextColor:RGBCOLOR(60, 60, 60)]; + [lbname setTextAlignment:NSTextAlignmentCenter]; + [lbname setFont:[UIFont systemFontOfSize:14]]; + [viewitem addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(15); + make.right.equalTo(viewitem).offset(-15); + make.centerY.equalTo(viewitem); + }]; + UIButton *btitem = [[UIButton alloc] init]; + [viewitem addSubview:btitem]; + [btitem mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(viewitem); + }]; + [btitem setTag:i]; + [btitem addTarget:self action:@selector(itemAction:) forControlEvents:UIControlEventTouchUpInside]; + + fleft+=f_w+10; + } + + if(viewlast) + { + [self.viewKeywords mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.offset(ftop+40); + }]; + [self.viewNo setHidden:YES]; + [self.bottomSelf uninstall]; + [self mas_makeConstraints:^(MASConstraintMaker *make) { + self.bottomSelf = make.bottom.equalTo(self.viewKeywords).offset(15); + }]; + } + else + { + [self.viewKeywords mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.offset(10); + }]; + [self.viewNo setHidden:NO]; + [self.bottomSelf uninstall]; + [self mas_makeConstraints:^(MASConstraintMaker *make) { + self.bottomSelf = make.bottom.equalTo(self.viewNo); + }]; + + } +} +-(void)refShow +{ + self.arrShow = [[NSUserDefaults standardUserDefaults] objectForKey:SearchKeywordsHestory]; + if(self.arrShow == nil) + { + self.arrShow = [NSMutableArray new]; + } + [self drawKeyWordsView]; +} +-(void)delAction +{ + if(self.arrShow.count==0)return; + self.arrShow = [NSMutableArray new]; + [[NSUserDefaults standardUserDefaults] setObject:@[] forKey:SearchKeywordsHestory]; + [self drawKeyWordsView]; + + +} + +-(void)itemAction:(UIButton *)sender +{ + self.backValue(self.arrShow[sender.tag]); +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/搜索/搜索列表/GongJuSearchListViewController.h b/ProductApp/ProductApp/ProductMain/工具/搜索/搜索列表/GongJuSearchListViewController.h new file mode 100644 index 0000000..2a88bcc --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/搜索/搜索列表/GongJuSearchListViewController.h @@ -0,0 +1,17 @@ +// +// GongJuSearchListViewController.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuSearchListViewController : BaseViewController +/// +@property (nonatomic , strong) NSString *strvalue; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/搜索/搜索列表/GongJuSearchListViewController.m b/ProductApp/ProductApp/ProductMain/工具/搜索/搜索列表/GongJuSearchListViewController.m new file mode 100644 index 0000000..00615c6 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/搜索/搜索列表/GongJuSearchListViewController.m @@ -0,0 +1,197 @@ +// +// GongJuSearchListViewController.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuSearchListViewController.h" +#import "PGJSearchView.h" +#import "SearchInputHestoryView.h" +#import "GongJuListTableViewCell.h" +#import "NetWorkManager.h" + +@interface GongJuSearchListViewController () +/// +@property (nonatomic , strong) UITableView *tableView; + +/// +@property (nonatomic , strong) NSMutableArray *arrdata; +@property (nonatomic , assign) int ipage; + +@end + +@implementation GongJuSearchListViewController +- (UIStatusBarStyle)preferredStatusBarStyle { + return UIStatusBarStyleDefault; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + [self.navigationController setNavigationBarHidden:YES animated:animated]; + [self showNaviGationView:YES]; + [self.navigationView setTitle:@" " titleColor:RGBCOLOR(60, 60, 60)]; + [self.navigationView setBackgroundColor:[UIColor whiteColor]]; +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self.view setBackgroundColor:[UIColor whiteColor]]; + [self drawSearch]; + + UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; + [tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone]; + [tableView setBackgroundColor:[UIColor clearColor]]; + [tableView setDelegate:self]; + [tableView setDataSource:self]; + [self.view addSubview:tableView]; + [tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.equalTo(self.view); + make.top.offset(NavHeight); + }]; + _tableView = tableView; + tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ + self.ipage += 1; + [self getdata]; + }]; + self.ipage = 1; + [self getdata]; +} +-(void)drawSearch +{ + PGJSearchView *viewsearh = [[PGJSearchView alloc] init]; + [self.navigationView addSubview:viewsearh]; + [viewsearh mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(60); + make.right.equalTo(self.navigationView); + make.height.offset(34); + make.bottom.equalTo(self.navigationView).offset(-5); + }]; + [viewsearh.searchview setBackgroundColor:[UIColor whiteColor]]; + [viewsearh.searchview.layer setCornerRadius:17]; + viewsearh.fangdajing.image = [UIImage imageNamed:@"gj_search"]; + viewsearh.searchField.placeholder = @"请输入关键词"; + [viewsearh.searchview.layer setBorderWidth:1]; + [viewsearh.searchview.layer setBorderColor:RGBCOLOR(108, 119, 246).CGColor]; + [viewsearh.searchview mas_remakeConstraints:^(MASConstraintMaker *make) { + make.left.offset(0); + make.centerY.equalTo(viewsearh); + make.height.offset(34); + make.right.equalTo(viewsearh).offset(-60); + }]; + [viewsearh.searchbtn setBackgroundColor:[UIColor whiteColor]]; + [viewsearh.searchbtn setTitleColor:RGBCOLOR(51, 51, 51) forState:UIControlStateNormal]; + [viewsearh.searchbtn.titleLabel setFont:[UIFont systemFontOfSize:16]]; + [viewsearh setSearchBackAction:^(NSString * _Nonnull search) { + if(search.length>0) + { + NSMutableArray *arrShow = [[NSUserDefaults standardUserDefaults] objectForKey:SearchKeywordsHestory]; + if(arrShow == nil) + { + arrShow = [NSMutableArray new]; + } + NSMutableArray *arrtemp = [NSMutableArray new]; + if([arrShow containsObject:search]==NO) + { + [arrtemp addObject:search]; + } + [arrtemp addObjectsFromArray:arrShow]; + [[NSUserDefaults standardUserDefaults] setObject:arrtemp forKey:SearchKeywordsHestory]; + [self searchAction:search]; + } + }]; + viewsearh.searchField.text = self.strvalue; + +} +-(void)searchAction:(NSString *)value +{ + [self.view endEditing:YES]; + self.strvalue = value; + self.ipage = 1; + [self getdata]; +} + +-(void)getdata +{ + [HXLoadingHUD showWithStatus:@"" maskType:0]; + [NetWorkManager requestToolsSearchData:self.view page:self.ipage query:self.strvalue Callback:^(BOOL state, ToolsListModel *responseObject, NSString * _Nullable describle) { + [HXLoadingHUD dismiss]; + [self.tableView.mj_footer endRefreshing]; + if(self.ipage==1)self.arrdata = [NSMutableArray new]; + if(state) + { + [self.arrdata addObjectsFromArray:responseObject.data.items]; + } + else + { + [HXHud showMessage:responseObject.message afterDelayType:1]; + } + [self.tableView reloadData]; + }]; +} + + +#pragma mark - UITableView +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.arrdata.count; +} +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *strcell = @"GongJuListTableViewCell"; + GongJuListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell]; + if(!cell) + { + cell = [[GongJuListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell]; + [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; + [cell setBackgroundColor:[UIColor clearColor]]; + } + cell.model = self.arrdata[indexPath.row]; + return cell; +} +-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return 50; +} +-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return 0.01; +} +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + float fheight = 82; + ToolsListModelDataItems *model = self.arrdata[indexPath.row]; + float f_w = [Tools getWidthWithText:model.Descriptions height:20 font:12]+1; + if(f_w>UISCREEN_WIDTH-157) + { + fheight = 95; + } + return fheight; +} +-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section +{ + UIView *viewback = [[UIView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, 50)]; + [viewback setBackgroundColor:[UIColor whiteColor]]; + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:[NSString stringWithFormat:@"已为您找到%ld个工具",self.arrdata.count]]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont systemFontOfSize:16]]; + [viewback addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(16); + make.centerY.equalTo(viewback); + }]; + lbname.attributedText = [Tools arrstring:lbname.text andstart:5 andend:(int)lbname.text.length-8 andfont:[UIFont systemFontOfSize:16] andcolor:RGBCOLOR(108, 119, 246)]; + + return viewback; +} +-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section +{ + return [UIView new]; +} +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/GongJuCreateViewController.h b/ProductApp/ProductApp/ProductMain/工具/通用工具/GongJuCreateViewController.h new file mode 100644 index 0000000..7afde49 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/GongJuCreateViewController.h @@ -0,0 +1,17 @@ +// +// GongJuCreateViewController.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "BaseViewController.h" +#import "ToolsListModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuCreateViewController : BaseViewController +/// +@property (nonatomic , strong) ToolsListModelDataItems *modelDetail; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/GongJuCreateViewController.m b/ProductApp/ProductApp/ProductMain/工具/通用工具/GongJuCreateViewController.m new file mode 100644 index 0000000..b63b46b --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/GongJuCreateViewController.m @@ -0,0 +1,47 @@ +// +// GongJuCreateViewController.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuCreateViewController.h" +#import "GongJuCreateView.h" + +@interface GongJuCreateViewController () + +@end + +@implementation GongJuCreateViewController +- (UIStatusBarStyle)preferredStatusBarStyle { + return UIStatusBarStyleDefault; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + [self.navigationController setNavigationBarHidden:YES animated:animated]; + [self showNaviGationView:YES]; + [self.navigationView setTitle:self.modelDetail.tool_name titleColor:RGBCOLOR(60, 60, 60)]; + [self.navigationView setBackgroundColor:[UIColor clearColor]]; +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self.view setBackgroundColor:RGBCOLOR(251, 251, 253)]; + UIImageView *imgvback = [[UIImageView alloc] init]; + [imgvback setImage:[UIImage imageNamed:@"znxz_back"]]; + [self.view addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.equalTo(self.view); + }]; + [self.view sendSubviewToBack:imgvback]; + + GongJuCreateView *view = [GongJuCreateView new]; + [self.view addSubview:view]; + [view mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.equalTo(self.view); + make.top.offset(NavHeight); + }]; + view.modelDetail = self.modelDetail; +} + + +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/GongJuCreateView.h b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/GongJuCreateView.h new file mode 100644 index 0000000..d654178 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/GongJuCreateView.h @@ -0,0 +1,17 @@ +// +// GongJuCreateView.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import +#import "ToolsListModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuCreateView : UIView +/// +@property (nonatomic , strong) ToolsListModelDataItems *modelDetail; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/GongJuCreateView.m b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/GongJuCreateView.m new file mode 100644 index 0000000..e249ec6 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/GongJuCreateView.m @@ -0,0 +1,224 @@ +// +// GongJuCreateView.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuCreateView.h" +#import "GongJuCreateInputView.h" +#import "GongJuCreateTextInputView.h" +#import "GongJuCreateSelectView.h" +#import "GongJuCreateTimeView.h" +#import "GongJuCreateTimeTwoView.h" + +@interface GongJuCreateView () +/// +@property (nonatomic , strong) UIView *viewback; + +/// +@property (nonatomic , strong) NSMutableArray *arrViews; + +@end + +@implementation GongJuCreateView + +-(id)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + UIScrollView *scvback = [[UIScrollView alloc] init]; + [scvback setShowsVerticalScrollIndicator:NO]; + [self addSubview:scvback]; + [scvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.top.offset(0); + make.width.equalTo(self); + make.height.equalTo(self).offset(-TabHeight-30); + }]; + + UIView *viewback = [[UIView alloc] init]; + [viewback setBackgroundColor:[UIColor whiteColor]]; + [scvback addSubview:viewback]; + [viewback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.top.offset(16); + make.width.equalTo(scvback).offset(-32); + }]; + [viewback.layer setMasksToBounds:YES]; + [viewback.layer setCornerRadius:8]; + _viewback = viewback; + + [scvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(viewback).offset(10); + }]; + + + UIView *viewbottom = [[UIView alloc] init]; + [viewbottom setBackgroundColor:[UIColor whiteColor]]; + [self addSubview:viewbottom]; + [viewbottom mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.equalTo(self); + make.top.equalTo(scvback.mas_bottom); + }]; + [self drawBottomView:viewbottom]; + + } + return self; +} + +-(void)drawBottomView:(UIView *)view +{ + UIButton *btclear = [[UIButton alloc] init]; + [btclear setTitle:@"清空" forState:UIControlStateNormal]; + [btclear setTitleColor:RGBCOLOR(108, 119, 246) forState:UIControlStateNormal]; + [btclear.titleLabel setFont:[UIFont systemFontOfSize:16]]; + [btclear.layer setMasksToBounds:YES]; + [btclear.layer setCornerRadius:8]; + [btclear.layer setBorderWidth:1]; + [btclear.layer setBorderColor:RGBCOLOR(108, 119, 246).CGColor]; + [view addSubview:btclear]; + [btclear mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(16); + make.top.offset(10); + make.height.offset(44); + make.width.offset(103); + }]; + [btclear setTag:0]; + [btclear addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside]; + + UIButton *btsend = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-145, 44)]; + [btsend setTitle:@"提交" forState:UIControlStateNormal]; + [btsend setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [btsend.titleLabel setFont:[UIFont systemFontOfSize:16]]; + [btsend.layer setMasksToBounds:YES]; + [btsend.layer setCornerRadius:8]; + [view addSubview:btsend]; + [btsend mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(btclear.mas_right).offset(10); + make.top.height.equalTo(btclear); + make.right.equalTo(view).offset(-16); + }]; + [btsend setTag:1]; + [btsend addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside]; + [Tools changedView:btsend colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)]; +} + +-(void)setModelDetail:(ToolsListModelDataItems *)modelDetail +{ + _modelDetail = modelDetail; + + + UIView *viewlast = nil; + + self.arrViews = [NSMutableArray new]; + for(ToolsListModelDataItemsConfigPrompt *model in modelDetail.config.prompt) + { + if([model.type isEqualToString:@"input"]) + { + GongJuCreateInputView *view = [[GongJuCreateInputView alloc] init]; + [self.viewback addSubview:view]; + [view mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(self.viewback); + if(viewlast==nil) + { + make.top.offset(0); + } + else + { + make.top.equalTo(viewlast.mas_bottom); + } + }]; + view.model = model; + viewlast = view; + [self.arrViews addObject:view]; + } + else if([model.type isEqualToString:@"textarea"]) + { + GongJuCreateTextInputView *view = [[GongJuCreateTextInputView alloc] init]; + [self.viewback addSubview:view]; + [view mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(self.viewback); + if(viewlast==nil) + { + make.top.offset(0); + } + else + { + make.top.equalTo(viewlast.mas_bottom); + } + }]; + view.model = model; + viewlast = view; + [self.arrViews addObject:view]; + } + else if([model.type isEqualToString:@"select"]) + { + GongJuCreateSelectView *view = [[GongJuCreateSelectView alloc] init]; + [self.viewback addSubview:view]; + [view mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(self.viewback); + if(viewlast==nil) + { + make.top.offset(0); + } + else + { + make.top.equalTo(viewlast.mas_bottom); + } + }]; + view.model = model; + viewlast = view; + [self.arrViews addObject:view]; + } + else if([model.type isEqualToString:@"time_select"]) + { + GongJuCreateTimeView *view = [[GongJuCreateTimeView alloc] init]; + [self.viewback addSubview:view]; + [view mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(self.viewback); + if(viewlast==nil) + { + make.top.offset(0); + } + else + { + make.top.equalTo(viewlast.mas_bottom); + } + }]; + view.model = model; + viewlast = view; + [self.arrViews addObject:view]; + } + else if([model.type isEqualToString:@"time_zone"]) + { + GongJuCreateTimeTwoView *view = [[GongJuCreateTimeTwoView alloc] init]; + [self.viewback addSubview:view]; + [view mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(self.viewback); + if(viewlast==nil) + { + make.top.offset(0); + } + else + { + make.top.equalTo(viewlast.mas_bottom); + } + }]; + view.model = model; + viewlast = view; + [self.arrViews addObject:view]; + } + } + if(viewlast) + { + [self.viewback mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(viewlast).offset(10); + }]; + } +} + +-(void)bottomAction:(UIButton *)sender +{ + +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateInputView.h b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateInputView.h new file mode 100644 index 0000000..87df778 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateInputView.h @@ -0,0 +1,17 @@ +// +// GongJuCreateInputView.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import +#import "ToolsListModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuCreateInputView : UIView +/// +@property (nonatomic , strong) ToolsListModelDataItemsConfigPrompt *model; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateInputView.m b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateInputView.m new file mode 100644 index 0000000..94ee5d4 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateInputView.m @@ -0,0 +1,91 @@ +// +// GongJuCreateInputView.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuCreateInputView.h" +#import "UITextField+SY.h" + +@interface GongJuCreateInputView () +/// +@property (nonatomic , strong) UILabel *lbname; +/// +@property (nonatomic , strong) UITextField *field; + +@end + +@implementation GongJuCreateInputView + +-(id)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + UILabel *lbname = [[UILabel alloc] init]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont systemFontOfSize:14]]; + [lbname setText:@" "]; + [self addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.offset(16); + }]; + _lbname = lbname; + + UIView *viewinput = [[UIView alloc] init]; + [viewinput setBackgroundColor:RGBCOLOR(246, 246, 246)]; + [self addSubview:viewinput]; + [viewinput mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.right.equalTo(self).offset(-12); + make.top.equalTo(lbname.mas_bottom).offset(12); + make.height.offset(50); + }]; + [viewinput.layer setMasksToBounds:YES]; + [viewinput.layer setCornerRadius:4]; + + UITextField *field = [[UITextField alloc] init]; + [field setTextColor:RGBCOLOR(51, 51, 51)]; + [field setTextAlignment:NSTextAlignmentLeft]; + [field setFont:[UIFont systemFontOfSize:15]]; + [field setPlaceholder:@"请输入"]; + [viewinput addSubview:field]; + [field mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.bottom.equalTo(viewinput); + make.right.equalTo(viewinput).offset(-12); + }]; + _field = field; + + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(viewinput).offset(8); + }]; + } + return self; +} + +-(void)setModel:(ToolsListModelDataItemsConfigPrompt *)model +{ + _model = model; + self.lbname.text = [Tools isStringnilkong:model.name]; + if(model.require.intValue==1) + { + self.lbname.text = [NSString stringWithFormat:@"*%@",[Tools isStringnilkong:model.name]]; + self.lbname.attributedText = [Tools arrstring:self.lbname.text andstart:0 andend:1 andfont:[UIFont systemFontOfSize:15] andcolor:RGBCOLOR(255, 98, 98)]; + } + if([Tools isStringnil:model.default_value].length>0) + { + self.field.placeholder = [Tools isStringnil:model.default_value]; + } + + if(model.max_len.intValue>0) + { + self.field.maxlength = model.max_len.intValue; + } + +} + + +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateSelectView.h b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateSelectView.h new file mode 100644 index 0000000..0aab8ca --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateSelectView.h @@ -0,0 +1,18 @@ +// +// GongJuCreateSelectView.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import +#import "ToolsListModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuCreateSelectView : UIView +/// +@property (nonatomic , strong) ToolsListModelDataItemsConfigPrompt *model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateSelectView.m b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateSelectView.m new file mode 100644 index 0000000..63638d4 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateSelectView.m @@ -0,0 +1,260 @@ +// +// GongJuCreateSelectView.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuCreateSelectView.h" + + +@interface GongJuCreateSelectView () +/// +@property (nonatomic , strong) UILabel *lbname; + +/// +@property (nonatomic , strong) UIView *viewitems; +/// +@property (nonatomic , strong) NSMutableArray *arrBtn; +/// +@property (nonatomic , strong) UIView *viewother; +@property (nonatomic , strong) UITextField *fieldOther; + +/// +@property (nonatomic , strong) NSMutableArray *arrSelect; + +@end + +@implementation GongJuCreateSelectView + +-(id)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + [self setClipsToBounds:YES]; + UILabel *lbname = [[UILabel alloc] init]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont systemFontOfSize:14]]; + [lbname setText:@" "]; + [self addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.offset(16); + }]; + _lbname = lbname; + + UIView *viewitems = [[UIView alloc] init]; + [self addSubview:viewitems]; + [viewitems mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.right.equalTo(self).offset(-12); + make.top.equalTo(lbname.mas_bottom).offset(12); + }]; + _viewitems = viewitems; + + + UIView *viewother = [[UIView alloc] init]; + [self addSubview:viewother]; + [viewother mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(self); + make.top.equalTo(viewitems.mas_bottom); + make.height.offset(0);///62 + }]; + [viewother setClipsToBounds:YES]; + [self drawOtherView:viewother]; + _viewother = viewother; + + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(viewother).offset(8); + }]; + } + return self; +} +-(void)drawOtherView:(UIView *)view +{ + UIView *viewinput = [[UIView alloc] init]; + [viewinput setBackgroundColor:RGBCOLOR(246, 246, 246)]; + [view addSubview:viewinput]; + [viewinput mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.right.equalTo(view).offset(-12); + make.top.offset(12); + make.height.offset(50); + }]; + [viewinput.layer setMasksToBounds:YES]; + [viewinput.layer setCornerRadius:4]; + + UITextField *field = [[UITextField alloc] init]; + [field setTextColor:RGBCOLOR(51, 51, 51)]; + [field setTextAlignment:NSTextAlignmentLeft]; + [field setFont:[UIFont systemFontOfSize:15]]; + [field setPlaceholder:@"请输入"]; + [viewinput addSubview:field]; + [field mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.bottom.equalTo(viewinput); + make.right.equalTo(viewinput).offset(-12); + }]; + _fieldOther = field; +} + +-(void)drawItemsValue:(NSArray *)value +{ + float f_width = UISCREEN_WIDTH-58; + + self.arrBtn = [NSMutableArray new]; + + float ftop = 0; + float fleft = 0; + UIView *viewlast = nil; + for(int i = 0 ; i < value.count; i++) + { + NSDictionary *dic = value[i]; + NSString *strvalue = [dic objectForKey:@"name"]; + float f_w = [Tools getWidthWithText:strvalue height:20 font:15]+40; + if((fleft+f_w)>f_width) + { + ftop+=50; + fleft = 0; + } + if(f_w>f_width)f_w = f_width; + + UIButton *btitem = [[UIButton alloc] init]; + [btitem setTitle:strvalue forState:UIControlStateNormal]; + [btitem setTitleColor:RGBCOLOR(51, 51, 51) forState:UIControlStateNormal]; + [btitem setTitleColor:RGBCOLOR(108, 119, 246) forState:UIControlStateSelected]; + [btitem.titleLabel setFont:[UIFont systemFontOfSize:15]]; + [btitem.layer setMasksToBounds:YES]; + [btitem.layer setCornerRadius:4]; + [btitem setBackgroundColor:RGBCOLOR(246, 246, 246)]; + [self.viewitems addSubview:btitem]; + [btitem mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.offset(f_w); + make.height.offset(40); + make.top.offset(ftop); + make.left.offset(fleft); + }]; + [btitem setTag:i]; + [btitem addTarget:self action:@selector(itemAction:) forControlEvents:UIControlEventTouchUpInside]; + viewlast = btitem; + [self.arrBtn addObject:btitem]; + + fleft+=f_w+12; + } + + if(viewlast) + { + [self.viewitems mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.offset(ftop+40); + }]; + } + else + { + [self.viewitems mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.offset(0); + }]; + } +} + +-(void)setModel:(ToolsListModelDataItemsConfigPrompt *)model +{ + _model = model; + self.lbname.text = [Tools isStringnilkong:model.name]; + if(model.require.intValue==1) + { + self.lbname.text = [NSString stringWithFormat:@"*%@",[Tools isStringnilkong:model.name]]; + self.lbname.attributedText = [Tools arrstring:self.lbname.text andstart:0 andend:1 andfont:[UIFont systemFontOfSize:15] andcolor:RGBCOLOR(255, 98, 98)]; + } + NSMutableArray *arritems = [NSMutableArray new]; + [arritems addObjectsFromArray:model.options]; + if(self.model.other_option.intValue==1) + { + [arritems addObject:@{@"name":@"其他"}]; + } + [self drawItemsValue:arritems]; + self.arrSelect = [NSMutableArray new]; +} + +-(void)itemAction:(UIButton *)sender +{ + if(self.model.multi_select.intValue==1) + {///多选 + sender.selected = !sender.selected; + if([self.arrSelect containsObject:sender]) + { + [self.arrSelect removeObject:sender]; + } + else + { + [self.arrSelect addObject:sender]; + } + if([self isotherBtn]) + { + [self.viewother setHidden:NO]; + [self.viewother mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.offset(62); + }]; + } + else + { + [self.viewother setHidden:YES]; + [self.viewother mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.offset(0); + }]; + } + } + else + {///单选 + for(UIButton *bt in self.arrBtn) + { + [bt setSelected:NO]; + [bt setBackgroundColor:RGBCOLOR(246, 246, 246)]; + } + sender.selected = YES; + [self.arrSelect removeAllObjects]; + [self.arrSelect addObject:sender]; + + if([sender.titleLabel.text isEqualToString:@"其他"]) + { + [self.viewother setHidden:NO]; + [self.viewother mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.offset(62); + }]; + } + else + { + [self.viewother setHidden:YES]; + [self.viewother mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.offset(0); + }]; + } + + } + if(sender.selected) + { + [sender setSelected:YES]; + [sender setBackgroundColor:RGBCOLOR(239, 240, 255)]; + } + else + { + [sender setSelected:NO]; + [sender setBackgroundColor:RGBCOLOR(246, 246, 246)]; + } +} + +-(BOOL)isotherBtn +{ + BOOL isyou = NO; + for(UIButton *btn in self.arrSelect) + { + if([btn.titleLabel.text isEqualToString:@"其他"]) + { + isyou = YES; + break; + } + } + return isyou; +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTextInputView.h b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTextInputView.h new file mode 100644 index 0000000..c38f756 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTextInputView.h @@ -0,0 +1,17 @@ +// +// GongJuCreateTextInputView.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import +#import "ToolsListModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuCreateTextInputView : UIView +/// +@property (nonatomic , strong) ToolsListModelDataItemsConfigPrompt *model; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTextInputView.m b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTextInputView.m new file mode 100644 index 0000000..b9eb3af --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTextInputView.m @@ -0,0 +1,115 @@ +// +// GongJuCreateTextInputView.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuCreateTextInputView.h" +#import "FSTextView.h" + +@interface GongJuCreateTextInputView () +/// +@property (nonatomic , strong) UILabel *lbname; +/// +@property (nonatomic , strong) FSTextView *textview; + +/// +@property (nonatomic , strong) UILabel *lbnumber; + + +@end + +@implementation GongJuCreateTextInputView + +-(id)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + UILabel *lbname = [[UILabel alloc] init]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont systemFontOfSize:14]]; + [lbname setText:@" "]; + [self addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.offset(16); + }]; + _lbname = lbname; + + UIView *viewinput = [[UIView alloc] init]; + [viewinput setBackgroundColor:RGBCOLOR(246, 246, 246)]; + [self addSubview:viewinput]; + [viewinput mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.right.equalTo(self).offset(-12); + make.top.equalTo(lbname.mas_bottom).offset(12); + make.height.offset(130); + }]; + [viewinput.layer setMasksToBounds:YES]; + [viewinput.layer setCornerRadius:4]; + + FSTextView *textview = [[FSTextView alloc] init]; + [textview setTextColor:RGBCOLOR(51, 51, 51)]; + [textview setTextAlignment:NSTextAlignmentLeft]; + [textview setFont:[UIFont systemFontOfSize:15]]; + [textview setBackgroundColor:[UIColor clearColor]]; + [textview setPlaceholder:@"请输入"]; + [viewinput addSubview:textview]; + [textview mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(2); + make.top.offset(2); + make.bottom.equalTo(viewinput).offset(-2); + make.right.equalTo(viewinput).offset(-2); + }]; + _textview = textview; + + UILabel *lbnumber = [[UILabel alloc] init]; + [lbnumber setText:@"0/100"]; + [lbnumber setTextColor:RGBCOLOR(102, 102, 102)]; + [lbnumber setTextAlignment:NSTextAlignmentLeft]; + [lbnumber setFont:[UIFont systemFontOfSize:14]]; + [viewinput addSubview:lbnumber]; + [lbnumber mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.bottom.equalTo(viewinput).offset(-6); + }]; + _lbnumber = lbnumber; + + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(viewinput).offset(8); + }]; + } + return self; +} +-(void)setModel:(ToolsListModelDataItemsConfigPrompt *)model +{ + _model = model; + self.lbname.text = [Tools isStringnilkong:model.name]; + if(model.require.intValue==1) + { + self.lbname.text = [NSString stringWithFormat:@"*%@",[Tools isStringnilkong:model.name]]; + self.lbname.attributedText = [Tools arrstring:self.lbname.text andstart:0 andend:1 andfont:[UIFont systemFontOfSize:15] andcolor:RGBCOLOR(255, 98, 98)]; + } + if([Tools isStringnil:model.default_value].length>0) + { + self.textview.placeholder = [Tools isStringnil:model.default_value]; + } + + if(model.max_len.intValue>0) + { + self.textview.maxLength = model.max_len.intValue; + self.lbnumber.text = [NSString stringWithFormat:@"0/%d",model.max_len.intValue]; + __block UILabel *lbtemp = self.lbnumber; + [self.textview addTextDidChangeHandler:^(FSTextView *textView) { + lbtemp.text = [NSString stringWithFormat:@"%ld/%d",textView.text.length,model.max_len.intValue]; + }]; + } + else + { + [self.lbnumber setHidden:YES]; + } + +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeTwoView.h b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeTwoView.h new file mode 100644 index 0000000..ad97c1e --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeTwoView.h @@ -0,0 +1,17 @@ +// +// GongJuCreateTimeTwoView.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import +#import "ToolsListModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuCreateTimeTwoView : UIView +/// +@property (nonatomic , strong) ToolsListModelDataItemsConfigPrompt *model; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeTwoView.m b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeTwoView.m new file mode 100644 index 0000000..9541690 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeTwoView.m @@ -0,0 +1,194 @@ +// +// GongJuCreateTimeTwoView.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuCreateTimeTwoView.h" + +@interface GongJuCreateTimeTwoView () +/// +@property (nonatomic , strong) UILabel *lbname; + +/// +@property (nonatomic , strong) UITextField *fieldStart; +@property (nonatomic , strong) UITextField *fieldEnd; +@end + +@implementation GongJuCreateTimeTwoView + +-(id)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + UILabel *lbname = [[UILabel alloc] init]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont systemFontOfSize:14]]; + [lbname setText:@" "]; + [self addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.offset(16); + }]; + _lbname = lbname; + + UIView *viewinput = [[UIView alloc] init]; + [viewinput setBackgroundColor:RGBCOLOR(246, 246, 246)]; + [self addSubview:viewinput]; + [viewinput mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.right.equalTo(self).offset(-12); + make.top.equalTo(lbname.mas_bottom).offset(12); + make.height.offset(50); + }]; + [viewinput.layer setMasksToBounds:YES]; + [viewinput.layer setCornerRadius:4]; + + UIImageView *imgvback = [[UIImageView alloc] init]; + [imgvback setImage:[UIImage imageNamed:@"gj_select_time"]]; + [viewinput addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.width.height.offset(20); + make.centerY.equalTo(viewinput); + }]; + + UITextField *fieldStart = [[UITextField alloc] init]; + [fieldStart setTextColor:RGBCOLOR(51, 51, 51)]; + [fieldStart setTextAlignment:NSTextAlignmentCenter]; + [fieldStart setFont:[UIFont systemFontOfSize:14]]; + [fieldStart setPlaceholder:@"请选择开始日期"]; + [viewinput addSubview:fieldStart]; + [fieldStart mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(imgvback.mas_right).offset(8); + make.top.bottom.equalTo(viewinput); + make.right.equalTo(viewinput.mas_centerX); + }]; + _fieldStart = fieldStart; + UIButton *btstart = [[UIButton alloc] init]; + [viewinput addSubview:btstart]; + [btstart mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(fieldStart); + }]; + [btstart addTarget:self action:@selector(startAction) forControlEvents:UIControlEventTouchUpInside]; + + UILabel *lbzhi = [[UILabel alloc] init]; + [lbzhi setText:@"至"]; + [lbzhi setTextColor:RGBCOLOR(153, 153, 153)]; + [lbzhi setTextAlignment:NSTextAlignmentCenter]; + [lbzhi setFont:[UIFont systemFontOfSize:15]]; + [viewinput addSubview:lbzhi]; + [lbzhi mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(fieldStart.mas_right); + make.centerY.equalTo(viewinput); + make.width.offset(20); + }]; + + UITextField *fieldEnd = [[UITextField alloc] init]; + [fieldEnd setTextColor:RGBCOLOR(51, 51, 51)]; + [fieldEnd setTextAlignment:NSTextAlignmentCenter]; + [fieldEnd setFont:[UIFont systemFontOfSize:14]]; + [fieldEnd setPlaceholder:@"请选择结束日期"]; + [viewinput addSubview:fieldEnd]; + [fieldEnd mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(lbzhi.mas_right); + make.top.bottom.equalTo(viewinput); + make.right.equalTo(viewinput); + }]; + _fieldEnd = fieldEnd; + UIButton *btend = [[UIButton alloc] init]; + [viewinput addSubview:btend]; + [btend mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(fieldEnd); + }]; + [btend addTarget:self action:@selector(endAction) forControlEvents:UIControlEventTouchUpInside]; + + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(viewinput).offset(8); + }]; + } + return self; +} +-(void)setModel:(ToolsListModelDataItemsConfigPrompt *)model +{ + _model = model; + self.lbname.text = [Tools isStringnilkong:model.name]; + if(model.require.intValue==1) + { + self.lbname.text = [NSString stringWithFormat:@"*%@",[Tools isStringnilkong:model.name]]; + self.lbname.attributedText = [Tools arrstring:self.lbname.text andstart:0 andend:1 andfont:[UIFont systemFontOfSize:15] andcolor:RGBCOLOR(255, 98, 98)]; + } + +} +-(void)startAction +{ + CXDatePickerView *view = [[CXDatePickerView alloc] initWithDateStyle:[self getTimeType] scrollToDate:[NSDate new] CompleteBlock:^(NSDate *date) { + NSString *strtime = [Tools timestampToString:date Format:[self getFormat]]; + if(self.fieldEnd.text.length>0) + { + if( [Tools compareOneDay:date withAnotherDay:[Tools stringToTimestamp:self.fieldEnd.text Format:[self getFormat]] dateFormat:[self getFormat]] <0) + { + [HXHud showMessage:@"开始时间需要小于结束时间" afterDelayType:0]; + return; + } + } + self.fieldStart.text = strtime; + }]; + [view show]; +} +-(void)endAction +{ + CXDatePickerView *view = [[CXDatePickerView alloc] initWithDateStyle:[self getTimeType] scrollToDate:[NSDate new] CompleteBlock:^(NSDate *date) { + if(self.fieldStart.text.length>0) + { + if( [Tools compareOneDay:[Tools stringToTimestamp:self.fieldStart.text Format:[self getFormat]] withAnotherDay:date dateFormat:[self getFormat]] <0) + { + [HXHud showMessage:@"结束时间需要大于开始时间" afterDelayType:0]; + return; + } + } + + self.fieldEnd.text = [Tools timestampToString:date Format:[self getFormat]]; + }]; + [view show]; +} +-(NSString *)getFormat +{ + NSString *strback = @"yyyy-MM-dd"; + if([Tools isStringnil:self.model.format].length>0) + { + strback = self.model.format; + } + return strback; +} + +/* + CXDateStyleShowYearMonthDayHourMinute = 0,//年月日时分 + CXDateStyleShowMonthDayHourMinute,//月日时分 + CXDateStyleShowYearMonthDay,//年月日 + CXDateStyleShowDayHourMinute, //日时分 + CXDateStyleShowYearMonth,//年月 + CXDateStyleShowMonthDay,//月日 + CXDateStyleShowHourMinute,//时分 + */ +-(CXDateStyle)getTimeType +{ + CXDateStyle back = CXDateStyleShowYearMonthDay; + if([self.model.format isEqualToString:@"yyyy-MM-dd HH:mm"]) + { + back = CXDateStyleShowYearMonthDayHourMinute; + } + else if([self.model.format isEqualToString:@"yyyy-MM-dd"]) + { + back = CXDateStyleShowYearMonthDay; + } + else if([self.model.format isEqualToString:@"yyyy-MM"]) + { + back = CXDateStyleShowYearMonth; + } + + return back; +} +@end diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeView.h b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeView.h new file mode 100644 index 0000000..63f00cb --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeView.h @@ -0,0 +1,17 @@ +// +// GongJuCreateTimeView.h +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import +#import "ToolsListModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface GongJuCreateTimeView : UIView +/// +@property (nonatomic , strong) ToolsListModelDataItemsConfigPrompt *model; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeView.m b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeView.m new file mode 100644 index 0000000..8324163 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/工具/通用工具/view/son/GongJuCreateTimeView.m @@ -0,0 +1,143 @@ +// +// GongJuCreateTimeView.m +// ProductApp +// +// Created by 工作 on 2024/10/15. +// + +#import "GongJuCreateTimeView.h" +#import "CXDatePickerView.h" + + +@interface GongJuCreateTimeView () +/// +@property (nonatomic , strong) UILabel *lbname; + +/// +@property (nonatomic , strong) UITextField *field; + +@end + +@implementation GongJuCreateTimeView + +-(id)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + UILabel *lbname = [[UILabel alloc] init]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont systemFontOfSize:14]]; + [lbname setText:@" "]; + [self addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.offset(16); + }]; + _lbname = lbname; + + UIView *viewinput = [[UIView alloc] init]; + [viewinput setBackgroundColor:RGBCOLOR(246, 246, 246)]; + [self addSubview:viewinput]; + [viewinput mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.right.equalTo(self).offset(-12); + make.top.equalTo(lbname.mas_bottom).offset(12); + make.height.offset(50); + }]; + [viewinput.layer setMasksToBounds:YES]; + [viewinput.layer setCornerRadius:4]; + + UIImageView *imgvback = [[UIImageView alloc] init]; + [imgvback setImage:[UIImage imageNamed:@"gj_select_time"]]; + [viewinput addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.width.height.offset(20); + make.centerY.equalTo(viewinput); + }]; + + + UITextField *field = [[UITextField alloc] init]; + [field setTextColor:RGBCOLOR(51, 51, 51)]; + [field setTextAlignment:NSTextAlignmentLeft]; + [field setFont:[UIFont systemFontOfSize:15]]; + [field setPlaceholder:@"请选择日期"]; + [viewinput addSubview:field]; + [field mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(imgvback.mas_right).offset(8); + make.top.bottom.equalTo(viewinput); + make.right.equalTo(viewinput).offset(-12); + }]; + _field = field; + + UIButton *bttime = [[UIButton alloc] init]; + [viewinput addSubview:bttime]; + [bttime mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(viewinput); + }]; + [bttime addTarget:self action:@selector(timeAction) forControlEvents:UIControlEventTouchUpInside]; + + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(viewinput).offset(8); + }]; + } + return self; +} +-(void)setModel:(ToolsListModelDataItemsConfigPrompt *)model +{ + _model = model; + self.lbname.text = [Tools isStringnilkong:model.name]; + if(model.require.intValue==1) + { + self.lbname.text = [NSString stringWithFormat:@"*%@",[Tools isStringnilkong:model.name]]; + self.lbname.attributedText = [Tools arrstring:self.lbname.text andstart:0 andend:1 andfont:[UIFont systemFontOfSize:15] andcolor:RGBCOLOR(255, 98, 98)]; + } + +} + +-(void)timeAction +{ + CXDatePickerView *view = [[CXDatePickerView alloc] initWithDateStyle:[self getTimeType] scrollToDate:[NSDate new] CompleteBlock:^(NSDate *date) { + self.field.text = [Tools timestampToString:date Format:[self getFormat]]; + }]; + [view show]; +} +-(NSString *)getFormat +{ + NSString *strback = @"yyyy-MM-dd"; + if([Tools isStringnil:self.model.format].length>0) + { + strback = self.model.format; + } + return strback; +} +/* + CXDateStyleShowYearMonthDayHourMinute = 0,//年月日时分 + CXDateStyleShowMonthDayHourMinute,//月日时分 + CXDateStyleShowYearMonthDay,//年月日 + CXDateStyleShowDayHourMinute, //日时分 + CXDateStyleShowYearMonth,//年月 + CXDateStyleShowMonthDay,//月日 + CXDateStyleShowHourMinute,//时分 + */ +-(CXDateStyle)getTimeType +{ + CXDateStyle back = CXDateStyleShowYearMonthDay; + if([self.model.format isEqualToString:@"yyyy-MM-dd HH:mm"]) + { + back = CXDateStyleShowYearMonthDayHourMinute; + } + else if([self.model.format isEqualToString:@"yyyy-MM-dd"]) + { + back = CXDateStyleShowYearMonthDay; + } + else if([self.model.format isEqualToString:@"yyyy-MM"]) + { + back = CXDateStyleShowYearMonth; + } + + return back; +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/引导/StartViewController.m b/ProductApp/ProductApp/ProductMain/引导/StartViewController.m index 6ed0c3b..fb7ad39 100644 --- a/ProductApp/ProductApp/ProductMain/引导/StartViewController.m +++ b/ProductApp/ProductApp/ProductMain/引导/StartViewController.m @@ -15,6 +15,8 @@ #import #import +#import "TabBarController.h" +#import "AppDelegate.h" @interface StartViewController () @@ -292,7 +294,7 @@ [UserInfoModel shareModel].isloadconfig = YES; [self.imgvmeng setHidden:YES]; - + [self pushVC]; } else { @@ -302,4 +304,11 @@ }]; } +-(void)pushVC +{ + TabBarController *vc = [TabBarController new]; + AppDelegate *appde = (AppDelegate *)[UIApplication sharedApplication].delegate; + [appde.window setRootViewController:vc]; +} + @end