diff --git a/ProductApp/ProductApp.xcodeproj/project.pbxproj b/ProductApp/ProductApp.xcodeproj/project.pbxproj index 7a2491a..42390fe 100644 --- a/ProductApp/ProductApp.xcodeproj/project.pbxproj +++ b/ProductApp/ProductApp.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 664551746CA42328436EB43A /* Pods_ProductApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E9D1598912BF8D031CA536 /* Pods_ProductApp.framework */; }; + CA0372992CE6E954001CE910 /* CamreImageEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0372982CE6E954001CE910 /* CamreImageEditViewController.m */; }; CA0688CD2CD328C500DF7025 /* ToolCheckModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0688CC2CD328C500DF7025 /* ToolCheckModel.m */; }; CA0688D02CD3291900DF7025 /* OcrModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0688CF2CD3291900DF7025 /* OcrModel.m */; }; CA0688D32CD329AD00DF7025 /* TranslateLanguageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0688D22CD329AD00DF7025 /* TranslateLanguageModel.m */; }; @@ -97,6 +98,18 @@ CA22D1DE2CD0C77B00CA7E93 /* FanWenSearchView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1DD2CD0C77B00CA7E93 /* FanWenSearchView.m */; }; CA22D1E12CD0C7F300CA7E93 /* FanWenSearchHestoryView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1E02CD0C7F300CA7E93 /* FanWenSearchHestoryView.m */; }; CA22D1E42CD0D7B200CA7E93 /* ChatRoomTipsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1E32CD0D7B200CA7E93 /* ChatRoomTipsModel.m */; }; + CA2A38D12CEB0C4600156CD2 /* ImageEditDrawView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38C52CEB0C4600156CD2 /* ImageEditDrawView.m */; }; + CA2A38D22CEB0C4600156CD2 /* MosaiManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38C82CEB0C4600156CD2 /* MosaiManager.m */; }; + CA2A38D32CEB0C4600156CD2 /* MosaiPath.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38CA2CEB0C4600156CD2 /* MosaiPath.m */; }; + CA2A38D42CEB0C4600156CD2 /* MosaiView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38CC2CEB0C4600156CD2 /* MosaiView.m */; }; + CA2A38D52CEB0C4600156CD2 /* ImageEditDrawViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38CF2CEB0C4600156CD2 /* ImageEditDrawViewController.m */; }; + CA2A38D92CEB142300156CD2 /* PiLiangXiuGaiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38D82CEB142300156CD2 /* PiLiangXiuGaiViewController.m */; }; + CA2A38DD2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38DC2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m */; }; + CA2A38E02CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38DF2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m */; }; + CA2A38E42CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38E32CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.m */; }; + CA2A38E82CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38E72CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.m */; }; + CA2DB77D2CE5814200AF3DAD /* NotNetWorkView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2DB77C2CE5814200AF3DAD /* NotNetWorkView.m */; }; + CA2DB7822CE5E17F00AF3DAD /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2DB7812CE5E17F00AF3DAD /* StoreKit.framework */; }; CA3868572CC1F66E009C98B0 /* LoginAppleView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA38684C2CC1F66E009C98B0 /* LoginAppleView.m */; }; CA3868582CC1F66E009C98B0 /* LoginTelView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA38684E2CC1F66E009C98B0 /* LoginTelView.m */; }; CA3868592CC1F66E009C98B0 /* LoginView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA3868502CC1F66E009C98B0 /* LoginView.m */; }; @@ -546,6 +559,8 @@ /* Begin PBXFileReference section */ 87167CC240BDAA55C86F80DE /* Pods-ProductApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProductApp.debug.xcconfig"; path = "Target Support Files/Pods-ProductApp/Pods-ProductApp.debug.xcconfig"; sourceTree = ""; }; B3DBEC0C6ED0E182F65EDBEA /* Pods-ProductApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProductApp.release.xcconfig"; path = "Target Support Files/Pods-ProductApp/Pods-ProductApp.release.xcconfig"; sourceTree = ""; }; + CA0372972CE6E954001CE910 /* CamreImageEditViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CamreImageEditViewController.h; sourceTree = ""; }; + CA0372982CE6E954001CE910 /* CamreImageEditViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CamreImageEditViewController.m; sourceTree = ""; }; CA0688CB2CD328C500DF7025 /* ToolCheckModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ToolCheckModel.h; sourceTree = ""; }; CA0688CC2CD328C500DF7025 /* ToolCheckModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ToolCheckModel.m; sourceTree = ""; }; CA0688CE2CD3291900DF7025 /* OcrModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OcrModel.h; sourceTree = ""; }; @@ -726,6 +741,29 @@ CA22D1E02CD0C7F300CA7E93 /* FanWenSearchHestoryView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FanWenSearchHestoryView.m; sourceTree = ""; }; CA22D1E22CD0D7B200CA7E93 /* ChatRoomTipsModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChatRoomTipsModel.h; sourceTree = ""; }; CA22D1E32CD0D7B200CA7E93 /* ChatRoomTipsModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChatRoomTipsModel.m; sourceTree = ""; }; + CA2A38C42CEB0C4600156CD2 /* ImageEditDrawView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageEditDrawView.h; sourceTree = ""; }; + CA2A38C52CEB0C4600156CD2 /* ImageEditDrawView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageEditDrawView.m; sourceTree = ""; }; + CA2A38C72CEB0C4600156CD2 /* MosaiManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MosaiManager.h; sourceTree = ""; }; + CA2A38C82CEB0C4600156CD2 /* MosaiManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MosaiManager.m; sourceTree = ""; }; + CA2A38C92CEB0C4600156CD2 /* MosaiPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MosaiPath.h; sourceTree = ""; }; + CA2A38CA2CEB0C4600156CD2 /* MosaiPath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MosaiPath.m; sourceTree = ""; }; + CA2A38CB2CEB0C4600156CD2 /* MosaiView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MosaiView.h; sourceTree = ""; }; + CA2A38CC2CEB0C4600156CD2 /* MosaiView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MosaiView.m; sourceTree = ""; }; + CA2A38CE2CEB0C4600156CD2 /* ImageEditDrawViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageEditDrawViewController.h; sourceTree = ""; }; + CA2A38CF2CEB0C4600156CD2 /* ImageEditDrawViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageEditDrawViewController.m; sourceTree = ""; }; + CA2A38D72CEB142300156CD2 /* PiLiangXiuGaiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiViewController.h; sourceTree = ""; }; + CA2A38D82CEB142300156CD2 /* PiLiangXiuGaiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiViewController.m; sourceTree = ""; }; + CA2A38DB2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiTableViewCell.h; sourceTree = ""; }; + CA2A38DC2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiTableViewCell.m; sourceTree = ""; }; + CA2A38DE2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiPGTableViewCell.h; sourceTree = ""; }; + CA2A38DF2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiPGTableViewCell.m; sourceTree = ""; }; + CA2A38E22CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiLiShiViewController.h; sourceTree = ""; }; + CA2A38E32CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiLiShiViewController.m; sourceTree = ""; }; + CA2A38E62CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiLiShiTableViewCell.h; sourceTree = ""; }; + CA2A38E72CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiLiShiTableViewCell.m; sourceTree = ""; }; + CA2DB77B2CE5814200AF3DAD /* NotNetWorkView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotNetWorkView.h; sourceTree = ""; }; + CA2DB77C2CE5814200AF3DAD /* NotNetWorkView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotNetWorkView.m; sourceTree = ""; }; + CA2DB7812CE5E17F00AF3DAD /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; CA38684B2CC1F66E009C98B0 /* LoginAppleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginAppleView.h; sourceTree = ""; }; CA38684C2CC1F66E009C98B0 /* LoginAppleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginAppleView.m; sourceTree = ""; }; CA38684D2CC1F66E009C98B0 /* LoginTelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginTelView.h; sourceTree = ""; }; @@ -1602,6 +1640,7 @@ CA3868812CC23A0E009C98B0 /* SystemConfiguration.framework in Frameworks */, CA38687F2CC23A06009C98B0 /* QuartzCore.framework in Frameworks */, CA38687D2CC239FF009C98B0 /* libz.tbd in Frameworks */, + CA2DB7822CE5E17F00AF3DAD /* StoreKit.framework in Frameworks */, CA38687B2CC239FA009C98B0 /* libc++.tbd in Frameworks */, CA3868792CC239EA009C98B0 /* CoreTelephony.framework in Frameworks */, CA3868772CC239E3009C98B0 /* CoreLocation.framework in Frameworks */, @@ -1955,10 +1994,13 @@ CA0D08802CA568120086855E /* 自定义相机 */ = { isa = PBXGroup; children = ( + CA2A38D02CEB0C4600156CD2 /* ImageEditDraw */, CA11ED5E2CA6555B00209DFC /* cell */, CA11ED572CA6489600209DFC /* view */, CA0D08812CA5682D0086855E /* CamreViewController.h */, CA0D08822CA5682D0086855E /* CamreViewController.m */, + CA0372972CE6E954001CE910 /* CamreImageEditViewController.h */, + CA0372982CE6E954001CE910 /* CamreImageEditViewController.m */, ); path = "自定义相机"; sourceTree = ""; @@ -2159,6 +2201,80 @@ path = view; sourceTree = ""; }; + CA2A38C62CEB0C4600156CD2 /* view */ = { + isa = PBXGroup; + children = ( + CA2A38C42CEB0C4600156CD2 /* ImageEditDrawView.h */, + CA2A38C52CEB0C4600156CD2 /* ImageEditDrawView.m */, + ); + path = view; + sourceTree = ""; + }; + CA2A38CD2CEB0C4600156CD2 /* YJMosaiView */ = { + isa = PBXGroup; + children = ( + CA2A38C72CEB0C4600156CD2 /* MosaiManager.h */, + CA2A38C82CEB0C4600156CD2 /* MosaiManager.m */, + CA2A38C92CEB0C4600156CD2 /* MosaiPath.h */, + CA2A38CA2CEB0C4600156CD2 /* MosaiPath.m */, + CA2A38CB2CEB0C4600156CD2 /* MosaiView.h */, + CA2A38CC2CEB0C4600156CD2 /* MosaiView.m */, + ); + path = YJMosaiView; + sourceTree = ""; + }; + CA2A38D02CEB0C4600156CD2 /* ImageEditDraw */ = { + isa = PBXGroup; + children = ( + CA2A38CD2CEB0C4600156CD2 /* YJMosaiView */, + CA2A38C62CEB0C4600156CD2 /* view */, + CA2A38CE2CEB0C4600156CD2 /* ImageEditDrawViewController.h */, + CA2A38CF2CEB0C4600156CD2 /* ImageEditDrawViewController.m */, + ); + path = ImageEditDraw; + sourceTree = ""; + }; + CA2A38D62CEB13E300156CD2 /* 批量批改 */ = { + isa = PBXGroup; + children = ( + CA2A38E12CEB45BB00156CD2 /* 历史记录 */, + CA2A38DA2CEB2CCA00156CD2 /* cell */, + CA2A38D72CEB142300156CD2 /* PiLiangXiuGaiViewController.h */, + CA2A38D82CEB142300156CD2 /* PiLiangXiuGaiViewController.m */, + ); + path = "批量批改"; + sourceTree = ""; + }; + CA2A38DA2CEB2CCA00156CD2 /* cell */ = { + isa = PBXGroup; + children = ( + CA2A38DB2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.h */, + CA2A38DC2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m */, + CA2A38DE2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.h */, + CA2A38DF2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m */, + ); + path = cell; + sourceTree = ""; + }; + CA2A38E12CEB45BB00156CD2 /* 历史记录 */ = { + isa = PBXGroup; + children = ( + CA2A38E52CEB464200156CD2 /* cell */, + CA2A38E22CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.h */, + CA2A38E32CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.m */, + ); + path = "历史记录"; + sourceTree = ""; + }; + CA2A38E52CEB464200156CD2 /* cell */ = { + isa = PBXGroup; + children = ( + CA2A38E62CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.h */, + CA2A38E72CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.m */, + ); + path = cell; + sourceTree = ""; + }; CA3868532CC1F66E009C98B0 /* view */ = { isa = PBXGroup; children = ( @@ -3007,6 +3123,7 @@ CABA145A2C9D0AF2002CB3B1 /* 首页 */ = { isa = PBXGroup; children = ( + CA2A38D62CEB13E300156CD2 /* 批量批改 */, CA0C3AAE2CB5051800E01A72 /* 智能PPT生成 */, CAB0D3722CAA47CF009BF67D /* 智能写作 */, CAA600CE2CA9470800026CF4 /* 课堂写作 */, @@ -3121,6 +3238,8 @@ CABA14862C9D277E002CB3B1 /* view */ = { isa = PBXGroup; children = ( + CA2DB77B2CE5814200AF3DAD /* NotNetWorkView.h */, + CA2DB77C2CE5814200AF3DAD /* NotNetWorkView.m */, CABA14872C9D2AE2002CB3B1 /* StartGNTiShiView.h */, CABA14882C9D2AE2002CB3B1 /* StartGNTiShiView.m */, CABA14CF2C9D4961002CB3B1 /* StartGNView.h */, @@ -4499,6 +4618,7 @@ F2AFD5F388A8B6D60B4992F6 /* Frameworks */ = { isa = PBXGroup; children = ( + CA2DB7812CE5E17F00AF3DAD /* StoreKit.framework */, CA3868802CC23A0E009C98B0 /* SystemConfiguration.framework */, CA38687E2CC23A06009C98B0 /* QuartzCore.framework */, CA38687C2CC239FF009C98B0 /* libz.tbd */, @@ -4739,6 +4859,7 @@ CA5D03272CC0DDF0007B3BA5 /* PayPublicView.m in Sources */, CA5D02A82CC0B2DE007B3BA5 /* ZhangHuGuanLiAlterView.m in Sources */, CB489DD027449D5C00DA044A /* ViewController.m in Sources */, + CA2A38D92CEB142300156CD2 /* PiLiangXiuGaiViewController.m in Sources */, CA0FD6902CA8EECE009A4417 /* XieZuoFenXiangAlterTableViewCell.m in Sources */, CAC806702CA16E0700C21AA7 /* StartPZXZView.m in Sources */, CB489FAA2744A0BD00DA044A /* UIImage+XLExtension.m in Sources */, @@ -4762,6 +4883,7 @@ CB489F612744A0BD00DA044A /* ListAlterView.m in Sources */, CA5D02E02CC0DD6B007B3BA5 /* UserConfigModel.m in Sources */, CBD422C028DAF38900C32440 /* KAlterView.m in Sources */, + CA2A38DD2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m in Sources */, CA0D08302CA4FBDB0086855E /* ShouYeXieZuoTableViewCell.m in Sources */, CABA14BB2C9D4330002CB3B1 /* PublicUploadImageManager.m in Sources */, CA6B97292CBD04FA000213F3 /* AIChatModel.m in Sources */, @@ -4842,6 +4964,7 @@ CA6B97372CBD2102000213F3 /* AIChaAnswerTableViewCell.m in Sources */, CAF2BC812CCF8D2700028275 /* FanWenSearchListViewController.m in Sources */, CB489F4B2744A0BD00DA044A /* PGGDatePickView.m in Sources */, + CA0372992CE6E954001CE910 /* CamreImageEditViewController.m in Sources */, CB489FB72744A0BD00DA044A /* UIAlertController+Blocks.m in Sources */, CABA14612C9D0B1C002CB3B1 /* ShouYeViewController.m in Sources */, CA5D02E72CC0DD6B007B3BA5 /* OrderGoodsModel.m in Sources */, @@ -4871,6 +4994,7 @@ CA11ED782CA69B5200209DFC /* GaiXieRunSeView.m in Sources */, CB489F6D2744A0BD00DA044A /* UIView+Additions.m in Sources */, CAB0D3752CAA47F3009BF67D /* ZhiNengXieZuoViewController.m in Sources */, + CA2A38D12CEB0C4600156CD2 /* ImageEditDrawView.m in Sources */, CAF76E972CBE6AB900825E5E /* GongJuCreateTimeTwoView.m in Sources */, CABA14CD2C9D4395002CB3B1 /* NSString+AES.m in Sources */, CA42579C2CA2998200A36A10 /* StartZNPPTDaGangViewController.m in Sources */, @@ -4932,6 +5056,7 @@ CB489FB02744A0BD00DA044A /* FSActionSheet.m in Sources */, CB489F652744A0BD00DA044A /* DAYComponentView.m in Sources */, CA22D1CD2CD0829300CA7E93 /* CorrectSaveDetailModel.m in Sources */, + CA2A38D22CEB0C4600156CD2 /* MosaiManager.m in Sources */, CB489FAC2744A0BD00DA044A /* XLPhotoBrowser.m in Sources */, CB489F522744A0BD00DA044A /* PlayAudio.m in Sources */, CA0D08492CA534ED0086855E /* ShouYeShenFenCollectionViewCell.m in Sources */, @@ -4957,6 +5082,7 @@ CB489F602744A0BD00DA044A /* GETCorelLocation.m in Sources */, CB489F892744A0BD00DA044A /* TagInfoModel.m in Sources */, CABA14712C9D0D4E002CB3B1 /* StartViewController.m in Sources */, + CA2A38D32CEB0C4600156CD2 /* MosaiPath.m in Sources */, CABA14892C9D2AE2002CB3B1 /* StartGNTiShiView.m in Sources */, CAF76E7A2CBE569500825E5E /* SearchInputHestoryView.m in Sources */, CA5D02E12CC0DD6B007B3BA5 /* M3u8Model.m in Sources */, @@ -4964,6 +5090,7 @@ CB489F8E2744A0BD00DA044A /* UITextFieldYS.m in Sources */, CA6B97302CBD11B1000213F3 /* AIChatFunctionCollectionViewCell.m in Sources */, CB489F922744A0BD00DA044A /* IndexGetNewsModel.m in Sources */, + CA2DB77D2CE5814200AF3DAD /* NotNetWorkView.m in Sources */, CAC806522CA137E600C21AA7 /* StartZNXZViewController.m in Sources */, CAA600DD2CA95B0200026CF4 /* KeTangXieZuoNJTableViewCell.m in Sources */, CA5D02A12CC0B2DE007B3BA5 /* PeiZhiShowView.m in Sources */, @@ -5016,6 +5143,7 @@ CAA144CA2CDC66A300A25AC4 /* UpdataAlterView.m in Sources */, CB489F8A2744A0BD00DA044A /* UIButton+HQCustomIcon.m in Sources */, CA4257912CA2652D00A36A10 /* StartZNPPTView.m in Sources */, + CA2A38E02CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m in Sources */, CB489F632744A0BD00DA044A /* CountDownManager.m in Sources */, CB489F9A2744A0BD00DA044A /* baseInfoModel.m in Sources */, CA9CFF742CCA2FB200C3E90E /* SSEDrawListTextModel.m in Sources */, @@ -5073,6 +5201,7 @@ CA6B97162CBCBCC1000213F3 /* FanWenDetailViewController.m in Sources */, CABD8C8D2CBF91B0009A5E5E /* GongJuWenBenView.m in Sources */, CB489F802744A0BD00DA044A /* NSString+Base64.m in Sources */, + CA2A38E42CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.m in Sources */, CA0D08572CA543440086855E /* ShouYeLSKTPGTableViewCell.m in Sources */, CB489FD82744A30000DA044A /* PGGMovieLineSetView.m in Sources */, CB489F4D2744A0BD00DA044A /* AddressListAlterView.m in Sources */, @@ -5097,6 +5226,7 @@ CA0D082D2CA4F8930086855E /* ShouYeZNXZTableViewCell.m in Sources */, CA0688D02CD3291900DF7025 /* OcrModel.m in Sources */, CA07CD232CC6601500AF41ED /* SSENetWorkManager.m in Sources */, + CA2A38E82CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.m in Sources */, CAF76E872CBE5F8B00825E5E /* GongJuCreateView.m in Sources */, CA07CD172CC5F25B00AF41ED /* TextbookDetailModel.m in Sources */, CAB0D3792CAA488C009BF67D /* ZhiNengXieZuoView.m in Sources */, @@ -5106,6 +5236,7 @@ CA5D02E52CC0DD6B007B3BA5 /* UserAuthModel.m in Sources */, CABD8C982CBF9D26009A5E5E /* LanguageKeyModel.m in Sources */, CA11ED612CA6556900209DFC /* CamreImagesCollectionViewCell.m in Sources */, + CA2A38D42CEB0C4600156CD2 /* MosaiView.m in Sources */, CAF76E942CBE69F900825E5E /* GongJuCreateTimeView.m in Sources */, CA0D08452CA5316B0086855E /* ShouYeShenFenView.m in Sources */, CA0688E82CD374CD00DF7025 /* NSString+JavaSubstring.m in Sources */, @@ -5135,6 +5266,7 @@ CA11ED702CA6946500209DFC /* KaiTongAlterTQView.m in Sources */, CA6B972C2CBD10FB000213F3 /* AIChatFunctionView.m in Sources */, CAB0D3712CAA3DAE009BF67D /* KeTangXieZuoXiangQingView.m in Sources */, + CA2A38D52CEB0C4600156CD2 /* ImageEditDrawViewController.m in Sources */, CABA14CE2C9D4395002CB3B1 /* MIUAES.m in Sources */, CA0FD69A2CA8F6DE009A4417 /* FenXiangHaiBaoView.m in Sources */, CB489F562744A0BD00DA044A /* amrFileCodec.m in Sources */, @@ -5296,7 +5428,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = ProductApp/ProductApp.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = D5PBFE23SF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -5367,7 +5499,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = ProductApp/ProductApp.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = D5PBFE23SF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/ProductApp/ProductApp.xcworkspace/xcuserdata/gongzuo.xcuserdatad/UserInterfaceState.xcuserstate b/ProductApp/ProductApp.xcworkspace/xcuserdata/gongzuo.xcuserdatad/UserInterfaceState.xcuserstate index fc607de..ccc1c74 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/AppDelegate.m b/ProductApp/ProductApp/AppDelegate.m index 38a06fc..a96f754 100644 --- a/ProductApp/ProductApp/AppDelegate.m +++ b/ProductApp/ProductApp/AppDelegate.m @@ -141,7 +141,7 @@ self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight; { if ([url.host isEqualToString:@"safepay"]) { - // 支付跳转支付宝钱包进行支付,处理支付结果 + // [[AlipaySDK defaultService] processOrderWithPaymentResult:url standbyCallback:^(NSDictionary *resultDic) { [[NSNotificationCenter defaultCenter] postNotificationName:ZhiFuBaoPayNotifi object:resultDic]; }]; diff --git a/ProductApp/ProductApp/Assets.xcassets/引导页/支付/微信pay.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/引导页/支付/wxzf.imageset/Contents.json similarity index 100% rename from ProductApp/ProductApp/Assets.xcassets/引导页/支付/微信pay.imageset/Contents.json rename to ProductApp/ProductApp/Assets.xcassets/引导页/支付/wxzf.imageset/Contents.json diff --git a/ProductApp/ProductApp/Assets.xcassets/引导页/支付/微信pay.imageset/微信支付2 1@2x.png b/ProductApp/ProductApp/Assets.xcassets/引导页/支付/wxzf.imageset/微信支付2 1@2x.png similarity index 100% rename from ProductApp/ProductApp/Assets.xcassets/引导页/支付/微信pay.imageset/微信支付2 1@2x.png rename to ProductApp/ProductApp/Assets.xcassets/引导页/支付/wxzf.imageset/微信支付2 1@2x.png diff --git a/ProductApp/ProductApp/Assets.xcassets/引导页/支付/微信pay.imageset/微信支付2 1@3x.png b/ProductApp/ProductApp/Assets.xcassets/引导页/支付/wxzf.imageset/微信支付2 1@3x.png similarity index 100% rename from ProductApp/ProductApp/Assets.xcassets/引导页/支付/微信pay.imageset/微信支付2 1@3x.png rename to ProductApp/ProductApp/Assets.xcassets/引导页/支付/wxzf.imageset/微信支付2 1@3x.png diff --git a/ProductApp/ProductApp/Assets.xcassets/引导页/支付/支付宝pay.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/引导页/支付/zbzf.imageset/Contents.json similarity index 100% rename from ProductApp/ProductApp/Assets.xcassets/引导页/支付/支付宝pay.imageset/Contents.json rename to ProductApp/ProductApp/Assets.xcassets/引导页/支付/zbzf.imageset/Contents.json diff --git a/ProductApp/ProductApp/Assets.xcassets/引导页/支付/支付宝pay.imageset/支付宝支付@2x.png b/ProductApp/ProductApp/Assets.xcassets/引导页/支付/zbzf.imageset/支付宝支付@2x.png similarity index 100% rename from ProductApp/ProductApp/Assets.xcassets/引导页/支付/支付宝pay.imageset/支付宝支付@2x.png rename to ProductApp/ProductApp/Assets.xcassets/引导页/支付/zbzf.imageset/支付宝支付@2x.png diff --git a/ProductApp/ProductApp/Assets.xcassets/引导页/支付/支付宝pay.imageset/支付宝支付@3x.png b/ProductApp/ProductApp/Assets.xcassets/引导页/支付/zbzf.imageset/支付宝支付@3x.png similarity index 100% rename from ProductApp/ProductApp/Assets.xcassets/引导页/支付/支付宝pay.imageset/支付宝支付@3x.png rename to ProductApp/ProductApp/Assets.xcassets/引导页/支付/zbzf.imageset/支付宝支付@3x.png diff --git a/ProductApp/ProductApp/Assets.xcassets/网络错误.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/网络错误.imageset/Contents.json new file mode 100644 index 0000000..4c1ebd4 --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/网络错误.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/网络错误.imageset/网络错误@2x.png b/ProductApp/ProductApp/Assets.xcassets/网络错误.imageset/网络错误@2x.png new file mode 100644 index 0000000..b9bbc5a Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/网络错误.imageset/网络错误@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/网络错误.imageset/网络错误@3x.png b/ProductApp/ProductApp/Assets.xcassets/网络错误.imageset/网络错误@3x.png new file mode 100644 index 0000000..d76feaa Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/网络错误.imageset/网络错误@3x.png differ 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/首页/批量批改/plpg_backhd.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_backhd.imageset/Contents.json new file mode 100644 index 0000000..4160adb --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_backhd.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "蒙版组 13090@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "蒙版组 13090@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_backhd.imageset/蒙版组 13090@2x.png b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_backhd.imageset/蒙版组 13090@2x.png new file mode 100644 index 0000000..d53a057 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_backhd.imageset/蒙版组 13090@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_backhd.imageset/蒙版组 13090@3x.png b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_backhd.imageset/蒙版组 13090@3x.png new file mode 100644 index 0000000..2ec2074 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_backhd.imageset/蒙版组 13090@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_通用批改.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_通用批改.imageset/Contents.json new file mode 100644 index 0000000..5208a4f --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_通用批改.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "w@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "w@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_通用批改.imageset/w@2x.png b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_通用批改.imageset/w@2x.png new file mode 100644 index 0000000..f272fe8 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_通用批改.imageset/w@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_通用批改.imageset/w@3x.png b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_通用批改.imageset/w@3x.png new file mode 100644 index 0000000..9d10ab4 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_通用批改.imageset/w@3x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpj_next.imageset/Contents.json b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpj_next.imageset/Contents.json new file mode 100644 index 0000000..36397ac --- /dev/null +++ b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpj_next.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "组 43019@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "组 43019@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpj_next.imageset/组 43019@2x.png b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpj_next.imageset/组 43019@2x.png new file mode 100644 index 0000000..26ad311 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpj_next.imageset/组 43019@2x.png differ diff --git a/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpj_next.imageset/组 43019@3x.png b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpj_next.imageset/组 43019@3x.png new file mode 100644 index 0000000..5bcb645 Binary files /dev/null and b/ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpj_next.imageset/组 43019@3x.png differ diff --git a/ProductApp/ProductApp/BaseControl/UserInfo/UserInfoModel.m b/ProductApp/ProductApp/BaseControl/UserInfo/UserInfoModel.m index 75c91c2..8267ef0 100644 --- a/ProductApp/ProductApp/BaseControl/UserInfo/UserInfoModel.m +++ b/ProductApp/ProductApp/BaseControl/UserInfo/UserInfoModel.m @@ -13,6 +13,7 @@ #import "PublicNetWorkManager.h" #import "RoleTreeModel.h" #import "StartPayViewController.h" +#import "LoginViewController.h" static UserInfoModel *userinfo; @implementation UserInfoModel @@ -117,12 +118,13 @@ static UserInfoModel *userinfo; +(BOOL)pushLoinVC:(UIViewController *)vc ispush:(BOOL)ispush { ///需要判断是否需要登录 - if([[[UserInfoModel shareModel].config objectForKey:@"client.nologin.pay.enable"] intValue] == 0 && [UserInfoModel shareModel].temp.intValue == 1) + if([[[UserInfoModel shareModel].config objectForKey:@"client.nologin.pay.enable"] intValue] == 1 && [UserInfoModel shareModel].temp.intValue == 1) { if(ispush) { -// LoginViewController *lvc = [[LoginViewController alloc] init]; -// [vc.navigationController pushViewController:lvc animated:YES]; + LoginViewController *lvc = [[LoginViewController alloc] init]; + lvc.isbind = YES; + [vc.navigationController pushViewController:lvc animated:YES]; [HXHud showMessage:@"请登录" afterDelayType:0]; } @@ -186,13 +188,14 @@ static UserInfoModel *userinfo; int icode = code.intValue; if(icode==1001003||icode==1001004||icode==1001005) {///需要登录 - + LoginViewController *lvc = [[LoginViewController alloc] init]; + AppDelegate *appde = (AppDelegate *)[UIApplication sharedApplication].delegate; + [appde.window setRootViewController:[[NavgationController alloc] initWithRootViewController:lvc]]; } else if (icode==12002||icode==12003||icode==12004) {///需要充值 } - }); } diff --git a/ProductApp/ProductApp/Configure/ConfigireSetting.h b/ProductApp/ProductApp/Configure/ConfigireSetting.h index 8b5c57b..519220f 100644 --- a/ProductApp/ProductApp/Configure/ConfigireSetting.h +++ b/ProductApp/ProductApp/Configure/ConfigireSetting.h @@ -27,7 +27,8 @@ NS_ASSUME_NONNULL_BEGIN /// #define WeiXinStringPay @"5b6u5L+h5pSv5LuY" -#define ZhiFuBaoStringPay @"5pSv5LuY5a6d5pSv5LuY" +//#define ZhiFuBaoStringPay @"5pSv5LuY5a6d5pSv5LuY" +#define ZhiFuBaoStringPay @"5pSv5LuY5a6d" ///zfb #define ZhiFuBaoPayNotifi @"ZhiFuBaoPayNotifi" @@ -35,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN #define WeiXinZhiFuSQ @"WeiXinZhiFuSQ" ///支付 + #define WeiXinAPPID @"wx31efd88bd33ae068" #define WeiXinUrlLink @"https://aiw.batiao8.com/ulink/" diff --git a/ProductApp/ProductApp/Other/支付view/PayPublicView.m b/ProductApp/ProductApp/Other/支付view/PayPublicView.m index 19961c8..01beb8a 100644 --- a/ProductApp/ProductApp/Other/支付view/PayPublicView.m +++ b/ProductApp/ProductApp/Other/支付view/PayPublicView.m @@ -8,6 +8,7 @@ #import "PayPublicView.h" #import "PayPublicYouHuiView.h" #import "PublicNetWorkManager.h" +#import "NSString+Base64.h" @interface PayPublicView () /// @@ -256,7 +257,7 @@ } else if([title isEqualToString:@"alipay"]) { - strname = @"支付宝"; + strname = [ZhiFuBaoStringPay base64DecodedString]; [btitem setTag:2]; } [lbname setText:strname]; diff --git a/ProductApp/ProductApp/ProductMain/AIChart/AIChatViewController.m b/ProductApp/ProductApp/ProductMain/AIChart/AIChatViewController.m index a71b2c0..da87928 100644 --- a/ProductApp/ProductApp/ProductMain/AIChart/AIChatViewController.m +++ b/ProductApp/ProductApp/ProductMain/AIChart/AIChatViewController.m @@ -33,6 +33,10 @@ /// @property (nonatomic , strong) AIChatModel *modelAudio; @property (nonatomic , assign) BOOL isDragging; + +/// +@property (nonatomic , strong) NSString *chat_start_time; + @end @implementation AIChatViewController @@ -475,7 +479,13 @@ [self.tableView beginUpdates]; NSInteger nowtime = [[NSDate date] timeIntervalSince1970]; - NSDictionary *dicpush = @{@"chat_start_time":[NSString stringWithFormat:@"%ld",nowtime], + if(self.chat_start_time.length==0) + { + NSString *chat_start_time = [NSString stringWithFormat:@"%ld",nowtime]; + self.chat_start_time = chat_start_time; + } + + NSDictionary *dicpush = @{@"chat_start_time":self.chat_start_time, @"content":[Tools isStringnil:value]}; [[SSENetWorkManager shareManager] requestTo:[NSString stringWithFormat:@"https://aiw.batiao8.com/api/chat/room?scene=chat_room"] dicpush:dicpush config:^(SSEConfigModel * _Nonnull config) { diff --git a/ProductApp/ProductApp/ProductMain/NetWorkManager/PayManager.m b/ProductApp/ProductApp/ProductMain/NetWorkManager/PayManager.m index 51a6878..e1e82bc 100644 --- a/ProductApp/ProductApp/ProductMain/NetWorkManager/PayManager.m +++ b/ProductApp/ProductApp/ProductMain/NetWorkManager/PayManager.m @@ -46,7 +46,7 @@ static PayManager *manager = nil; { self.source = source; self.number = number; - + self.orderId = @""; [LoadAlterView show]; [PublicNetWorkManager requestOrderData:nil goods_id:goods_id pay_type:pay_type source:source pay_source:@"app" coupon:coupon Callback:^(BOOL state, PayOrderModel *responseObject, NSString * _Nullable describle) { if(state) diff --git a/ProductApp/ProductApp/ProductMain/login/view/LoginAppleView.m b/ProductApp/ProductApp/ProductMain/login/view/LoginAppleView.m index 703311d..cfcd855 100644 --- a/ProductApp/ProductApp/ProductMain/login/view/LoginAppleView.m +++ b/ProductApp/ProductApp/ProductMain/login/view/LoginAppleView.m @@ -44,10 +44,12 @@ make.top.offset(NavHeight-20); }]; [btback addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; - if(self.viewController.navigationController.viewControllers.count<=1) - { - [btback setHidden:YES]; - } + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + if(self.viewController.navigationController.viewControllers.count<=1) + { + [btback setHidden:YES]; + } + }); UILabel *lbname = [[UILabel alloc] init]; [lbname setText:@"Hello!"]; diff --git a/ProductApp/ProductApp/ProductMain/login/view/LoginView.m b/ProductApp/ProductApp/ProductMain/login/view/LoginView.m index 96562ed..d959c57 100644 --- a/ProductApp/ProductApp/ProductMain/login/view/LoginView.m +++ b/ProductApp/ProductApp/ProductMain/login/view/LoginView.m @@ -59,10 +59,13 @@ }]; [btback addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; - if(self.viewController.navigationController.viewControllers.count<=1) - { - [btback setHidden:YES]; - } + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + if(self.viewController.navigationController.viewControllers.count<=1) + { + [btback setHidden:YES]; + } + }); + UILabel *lbname = [[UILabel alloc] init]; [lbname setText:@"Hello!"]; diff --git a/ProductApp/ProductApp/ProductMain/login/view/LoginWXView.m b/ProductApp/ProductApp/ProductMain/login/view/LoginWXView.m index 384d1d9..3cf91f5 100644 --- a/ProductApp/ProductApp/ProductMain/login/view/LoginWXView.m +++ b/ProductApp/ProductApp/ProductMain/login/view/LoginWXView.m @@ -44,10 +44,12 @@ make.top.offset(NavHeight-20); }]; [btback addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; - if(self.viewController.navigationController.viewControllers.count<=1) - { - [btback setHidden:YES]; - } + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + if(self.viewController.navigationController.viewControllers.count<=1) + { + [btback setHidden:YES]; + } + }); UILabel *lbname = [[UILabel alloc] init]; [lbname setText:@"Hello!"]; diff --git a/ProductApp/ProductApp/ProductMain/引导/StartViewController.m b/ProductApp/ProductApp/ProductMain/引导/StartViewController.m index e378486..23da6ae 100644 --- a/ProductApp/ProductApp/ProductMain/引导/StartViewController.m +++ b/ProductApp/ProductApp/ProductMain/引导/StartViewController.m @@ -25,6 +25,7 @@ #import "NetWorkManager.h" #import "PublicNetWorkManager.h" +#import "NotNetWorkView.h" @interface StartViewController () /// @@ -40,6 +41,9 @@ /// @property (nonatomic , strong) UserConfigModelData *modelDetail; +/// +@property (nonatomic , strong) NotNetWorkView *noview; + @end @implementation StartViewController @@ -54,16 +58,16 @@ [self.navigationView setHidden:YES]; [self.navigationController setNavigationBarHidden:YES animated:NO]; - ///获取所有字体 - NSArray* familys = [UIFont familyNames]; - for (int i = 0; i<[familys count]; i++) { - NSString* family = [familys objectAtIndex:i]; - NSLog(@"\r\n\r\nFontfamily:%@\r\n=====",family); - NSArray* fonts = [UIFont fontNamesForFamilyName:family]; - for (int j = 0; j<[fonts count]; j++) { - NSLog(@"%@",[fonts objectAtIndex:j]); - } - } +// ///获取所有字体 +// NSArray* familys = [UIFont familyNames]; +// for (int i = 0; i<[familys count]; i++) { +// NSString* family = [familys objectAtIndex:i]; +// NSLog(@"\r\n\r\nFontfamily:%@\r\n=====",family); +// NSArray* fonts = [UIFont fontNamesForFamilyName:family]; +// for (int j = 0; j<[fonts count]; j++) { +// NSLog(@"%@",[fonts objectAtIndex:j]); +// } +// } UIImageView *imgvback = [[UIImageView alloc] init]; [imgvback setImage:[UIImage imageNamed:@"yd_back"]]; @@ -110,6 +114,17 @@ [self.arrLB addObject:lbitem]; } + NotNetWorkView *noview = [[NotNetWorkView alloc] init]; + [self.view addSubview:noview]; + [noview mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.view); + }]; + [noview setHidden:YES]; + [noview setBackValue:^{ + [Tools pushAppSet]; + }]; + _noview = noview; + UIImageView *imgvmeng = [[UIImageView alloc] init]; [imgvmeng setImage:[UIImage imageNamed:@"qidong"]]; [imgvmeng setContentMode:UIViewContentModeScaleAspectFill]; @@ -271,6 +286,8 @@ case AFNetworkReachabilityStatusNotReachable: self.isnetwork = NO; + [self.imgvmeng setHidden:YES]; + [self.noview setHidden:NO]; break; case AFNetworkReachabilityStatusReachableViaWWAN: @@ -346,6 +363,7 @@ [PublicNetWorkManager requestUserConfigData:self.view idfa:stridfa Callback:^(BOOL state, UserConfigModel *responseObject, NSString * _Nullable describle) { if(state) { + [self.noview setHidden:YES]; [[NSNotificationCenter defaultCenter] removeObserver:self name:@"huoquidfanotifi" object:nil]; self.modelDetail = responseObject.data; [UserInfoModel setToken:responseObject.data.token]; diff --git a/ProductApp/ProductApp/ProductMain/引导/view/NotNetWorkView.h b/ProductApp/ProductApp/ProductMain/引导/view/NotNetWorkView.h new file mode 100644 index 0000000..32d157c --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/引导/view/NotNetWorkView.h @@ -0,0 +1,17 @@ +// +// NotNetWorkView.h +// ProductApp +// +// Created by 工作 on 2024/11/14. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +typedef void(^NotNetWorkViewBack)(void); +@interface NotNetWorkView : UIView +/// +@property (nonatomic , strong) NotNetWorkViewBack backValue; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/引导/view/NotNetWorkView.m b/ProductApp/ProductApp/ProductMain/引导/view/NotNetWorkView.m new file mode 100644 index 0000000..f7a233b --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/引导/view/NotNetWorkView.m @@ -0,0 +1,79 @@ +// +// NotNetWorkView.m +// ProductApp +// +// Created by 工作 on 2024/11/14. +// + +#import "NotNetWorkView.h" + +@implementation NotNetWorkView + +-(id)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + [self setBackgroundColor:[UIColor whiteColor]]; + + UIImageView *imgvback = [[UIImageView alloc] init]; + [imgvback setImage:[UIImage imageNamed:@"网络错误"]]; + [self addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(self); + make.centerY.equalTo(self).offset(-100); + make.width.height.offset(UISCREEN_WIDTH-160); + }]; + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:@"网络错误"]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont systemFontOfSize:16]]; + [self addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(self); + make.top.equalTo(imgvback.mas_bottom).offset(40); + }]; + + UILabel *lbts = [[UILabel alloc] init]; + [lbts setText:@"网络连接错误,请检查您的网络状态,或者重启刷新APP"]; + [lbts setTextColor:RGBCOLOR(51, 51, 51)]; + [lbts setTextAlignment:NSTextAlignmentCenter]; + [lbts setFont:[UIFont systemFontOfSize:12]]; + [lbts setNumberOfLines:0]; + [self addSubview:lbts]; + [lbts mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(imgvback); + make.top.equalTo(lbname.mas_bottom).offset(15); + }]; + + UIButton *btref = [[UIButton alloc] init]; + [btref setTitle:@"刷新" forState:UIControlStateNormal]; + [btref setTitleColor:RGBCOLOR(51, 51, 51) forState:UIControlStateNormal]; + [btref.titleLabel setFont:[UIFont systemFontOfSize:12]]; + [btref.layer setMasksToBounds:YES]; + [btref.layer setCornerRadius:15]; + [self addSubview:btref]; + [btref mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.sizeOffset(CGSizeMake(90, 30)); + make.centerX.equalTo(self); + make.top.equalTo(lbts.mas_bottom).offset(15); + }]; + [btref.layer setBorderWidth:1]; + [btref.layer setBorderColor:RGBCOLOR(79, 162, 255).CGColor]; + [btref addTarget:self action:@selector(refAction) forControlEvents:UIControlEventTouchUpInside]; + + + } + return self; +} + +-(void)refAction +{ + if(self.backValue) + { + self.backValue(); + } +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/引导/支付页/cell/StartPayGoodsPayView.m b/ProductApp/ProductApp/ProductMain/引导/支付页/cell/StartPayGoodsPayView.m index e5536c4..b18dc16 100644 --- a/ProductApp/ProductApp/ProductMain/引导/支付页/cell/StartPayGoodsPayView.m +++ b/ProductApp/ProductApp/ProductMain/引导/支付页/cell/StartPayGoodsPayView.m @@ -58,7 +58,7 @@ if([str isEqualToString:@"weixin"]) { - [imgvback setImage:[UIImage imageNamed:@"微信pay"]]; + [imgvback setImage:[UIImage imageNamed:@"wxzf"]]; [lbname setText:[WeiXinStringPay base64DecodedString]]; [btitem setImage:[UIImage imageNamed:@"wx_select_N"] forState:UIControlStateNormal]; [btitem setImage:[UIImage imageNamed:@"wx_select_Y"] forState:UIControlStateSelected]; @@ -66,7 +66,7 @@ } else if([str isEqualToString:@"alipay"]) { - [imgvback setImage:[UIImage imageNamed:@"支付宝pay"]]; + [imgvback setImage:[UIImage imageNamed:@"zbzf"]]; [lbname setText:[ZhiFuBaoStringPay base64DecodedString]]; [btitem setImage:[UIImage imageNamed:@"zfb_select_N"] forState:UIControlStateNormal]; [btitem setImage:[UIImage imageNamed:@"zfb_select_Y"] forState:UIControlStateSelected]; diff --git a/ProductApp/ProductApp/ProductMain/引导/支付页/view/StartPayView.m b/ProductApp/ProductApp/ProductMain/引导/支付页/view/StartPayView.m index 3d5203a..bbb78d4 100644 --- a/ProductApp/ProductApp/ProductMain/引导/支付页/view/StartPayView.m +++ b/ProductApp/ProductApp/ProductMain/引导/支付页/view/StartPayView.m @@ -383,13 +383,13 @@ if([UserInfoModel PayWXQuanXian]==NO) { - NSMutableArray *arr = [NSMutableArray new]; - for(OrderGoodsModelData *model in arrGoods) - { - [arr addObject:[Tools isStringnil:model.apple_buy_id]]; - } - - [self.manager getGoodsPrice:arr]; +// NSMutableArray *arr = [NSMutableArray new]; +// for(OrderGoodsModelData *model in arrGoods) +// { +// [arr addObject:[Tools isStringnil:model.apple_buy_id]]; +// } +// +// [self.manager getGoodsPrice:arr]; } } @@ -434,7 +434,7 @@ ///需要判断是否需要登录 - [UserInfoModel pushLoinVC:self.viewController ispush:YES]; + if([UserInfoModel pushLoinVC:self.viewController ispush:YES]==NO)return; NSString *strc = [[UserInfoModel shareModel].config objectForKey:@"client.agreement.dialog"]; if((strc.intValue == 1 || [Tools isStringnil:strc].length==0) && self.btxiyi.selected == NO) diff --git a/ProductApp/ProductApp/ProductMain/首页/cell/老师/ShouYeLSZWPGTableViewCell.m b/ProductApp/ProductApp/ProductMain/首页/cell/老师/ShouYeLSZWPGTableViewCell.m index 10376c9..da47128 100644 --- a/ProductApp/ProductApp/ProductMain/首页/cell/老师/ShouYeLSZWPGTableViewCell.m +++ b/ProductApp/ProductApp/ProductMain/首页/cell/老师/ShouYeLSZWPGTableViewCell.m @@ -8,6 +8,7 @@ #import "ShouYeLSZWPGTableViewCell.h" #import #import "CamreViewController.h" +#import "PiLiangXiuGaiViewController.h" @interface ShouYeLSZWPGTableViewCell () /// @@ -37,7 +38,7 @@ [viewback setImage:[UIImage imageNamed:@"home_ls_zwpg"]]; UILabel *lbname = [[UILabel alloc] init]; - [lbname setText:@"作文批改"]; + [lbname setText:@"批量批改"]; [lbname setTextColor:RGBCOLOR(26, 26, 26)]; [lbname setTextAlignment:NSTextAlignmentLeft]; [lbname setFont:[UIFont fontWithName:@"AlimamaShuHeiTi-Bold" size:24]]; @@ -48,7 +49,7 @@ }]; UILabel *lbinfo = [[UILabel alloc] init]; - [lbinfo setText:@"拍照批改快速整理作文优缺点"]; + [lbinfo setText:@"自定义拍照批量批改作文"]; [lbinfo setTextColor:RGBCOLOR(102, 102, 102)]; [lbinfo setTextAlignment:NSTextAlignmentLeft]; [lbinfo setFont:[UIFont systemFontOfSize:14]]; @@ -111,11 +112,13 @@ -(void)nextAction { - CamreViewController *vc = [CamreViewController new]; - vc.type = 1; + PiLiangXiuGaiViewController *vc = [PiLiangXiuGaiViewController new]; [self.viewController.navigationController pushViewController:vc animated:YES]; - - [UserInfoModel shijianShangBao:0 key:@"client.jump.to.camera" value:@"correct" extra:@""]; +// CamreViewController *vc = [CamreViewController new]; +// vc.type = 1; +// [self.viewController.navigationController pushViewController:vc animated:YES]; +// +// [UserInfoModel shijianShangBao:0 key:@"client.jump.to.camera" value:@"correct" extra:@""]; } @end diff --git a/ProductApp/ProductApp/ProductMain/首页/批量批改/PiLiangXiuGaiViewController.h b/ProductApp/ProductApp/ProductMain/首页/批量批改/PiLiangXiuGaiViewController.h new file mode 100644 index 0000000..2dc3236 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/批量批改/PiLiangXiuGaiViewController.h @@ -0,0 +1,16 @@ +// +// PiLiangXiuGaiViewController.h +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface PiLiangXiuGaiViewController : BaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/首页/批量批改/PiLiangXiuGaiViewController.m b/ProductApp/ProductApp/ProductMain/首页/批量批改/PiLiangXiuGaiViewController.m new file mode 100644 index 0000000..9f448ac --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/批量批改/PiLiangXiuGaiViewController.m @@ -0,0 +1,246 @@ +// +// PiLiangXiuGaiViewController.m +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import "PiLiangXiuGaiViewController.h" +#import "PiLiangXiuGaiTableViewCell.h" +#import "PiLiangXiuGaiPGTableViewCell.h" +#import "PiLiangXiuGaiLiShiViewController.h" + + +@interface PiLiangXiuGaiViewController () +/// +@property (nonatomic , strong) UITableView *tableView; + +@end + +@implementation PiLiangXiuGaiViewController +- (UIStatusBarStyle)preferredStatusBarStyle { + return UIStatusBarStyleDefault; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + [self.navigationController setNavigationBarHidden:YES animated:animated]; + [self showNaviGationView:NO]; + [self.navigationView setTitle:@"批量批改" titleColor:RGBCOLOR(60, 60, 60)]; + [self.navigationView setBackgroundColor:[UIColor clearColor]]; + [self.navigationView setMuenTitle:@"历史记录" titleColor:RGBCOLOR(26, 26, 26)]; + [self.navigationView setMuenImg:@""]; + self.navigationController.interactivePopGestureRecognizer.enabled = NO; +} +-(void)viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; + self.navigationController.interactivePopGestureRecognizer.enabled = YES; +} +-(void)navBackButtonAction +{ + [self.navigationController popViewControllerAnimated:YES]; +} +-(void)navMuenButtonAction +{ + PiLiangXiuGaiLiShiViewController *vc = [PiLiangXiuGaiLiShiViewController new]; + [self.navigationController pushViewController:vc animated:YES]; +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self.view setBackgroundColor:RGBCOLOR(246, 249, 250)]; + + UIView *viewback = [[UIView alloc] init]; + [viewback setBackgroundColor:[UIColor whiteColor]]; + [self.view addSubview:viewback]; + [viewback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.equalTo(self.view); + }]; + UIImageView *imgvback = [[UIImageView alloc] init]; + [imgvback setImage:[UIImage imageNamed:@"plpg_backhd"]]; + [viewback addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.equalTo(viewback); + }]; + [self.view sendSubviewToBack:viewback]; + [self drawZDYView:viewback]; + + 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.equalTo(self.view); + make.top.equalTo(viewback.mas_bottom); + make.bottom.equalTo(self.view).offset(-TabHeight-20); + }]; + _tableView = tableView; + + UIView *viewbottom = [[UIView alloc] init]; + [viewbottom setBackgroundColor:[UIColor whiteColor]]; + [self.view addSubview:viewbottom]; + [viewbottom mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.equalTo(self.view); + make.height.offset(TabHeight+20); + }]; + [self drawBottomView:viewbottom]; + +} +-(void)drawBottomView:(UIView *)view +{ + UIButton *btadd = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-32, 46)]; + [btadd setTitle:@"添加作文" forState:UIControlStateNormal]; + [btadd setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [btadd.titleLabel setFont:[UIFont systemFontOfSize:15]]; + [btadd.layer setMasksToBounds:YES]; + [btadd.layer setCornerRadius:6]; +// [btadd setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal]; + [view addSubview:btadd]; + [btadd mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(16); + make.top.offset(10); + make.right.equalTo(view).offset(-16); + make.height.offset(46); + }]; + [btadd addTarget:self action:@selector(addAction) forControlEvents:UIControlEventTouchUpInside]; + [btadd setIconInLeftWithSpacing:4]; + [Tools changedView:btadd colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)]; + +} + +-(void)drawZDYView:(UIView *)viewback +{ + UIView *view = [[UIView alloc] init]; + [viewback addSubview:view]; + [view mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(viewback); + make.top.offset(NavHeight); + make.height.offset(72); + }]; + [viewback mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(view); + }]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect: viewback.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(20,20)]; + CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; + maskLayer.frame = viewback.bounds; + maskLayer.path = maskPath.CGPath; + viewback.layer.mask = maskLayer; + [Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:0 shadowRadius:10]; + }); + + UIImageView *imgvback = [[UIImageView alloc] init]; + [imgvback setImage:[UIImage imageNamed:@"plpg_通用批改"]]; + [view addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(16); + make.width.height.offset(40); + make.centerY.equalTo(view); + }]; + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:@"通用批改"]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont boldSystemFontOfSize:15]]; + [view addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(imgvback.mas_right).offset(10); + make.centerY.equalTo(view); + }]; + + UIImageView *imgvnext = [[UIImageView alloc] init]; + [imgvnext setImage:[UIImage imageNamed:@"plpj_next"]]; + [view addSubview:imgvnext]; + [imgvnext mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.offset(16); + make.centerY.equalTo(view); + make.right.equalTo(view).offset(-16); + }]; + + UILabel *lbzd = [[UILabel alloc] init]; + [lbzd setText:@"自定义"]; + [lbzd setTextColor:RGBCOLOR(153, 153, 153)]; + [lbzd setTextAlignment:NSTextAlignmentLeft]; + [lbzd setFont:[UIFont systemFontOfSize:14]]; + [view addSubview:lbzd]; + [lbzd mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.equalTo(view); + make.right.equalTo(imgvnext.mas_left).offset(-4); + }]; + + UIButton *btzdy = [[UIButton alloc] init]; + [view addSubview:btzdy]; + [btzdy mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(view); + }]; + [btzdy addTarget:self action:@selector(zidingyiAction) forControlEvents:UIControlEventTouchUpInside]; + +} +-(void)zidingyiAction +{ + +} + +-(void)addAction +{ + +} + +#pragma mark - UITableView +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return 5; +} +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + if(indexPath.row==0) + { + static NSString *strcell = @"PiLiangXiuGaiPGTableViewCell"; + PiLiangXiuGaiPGTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell]; + if(!cell) + { + cell = [[PiLiangXiuGaiPGTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell]; + [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; + [cell setBackgroundColor:[UIColor clearColor]]; + } + + return cell; + } + static NSString *strcell = @"PiLiangXiuGaiTableViewCell"; + PiLiangXiuGaiTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell]; + if(!cell) + { + cell = [[PiLiangXiuGaiTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell]; + [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; + [cell setBackgroundColor:[UIColor clearColor]]; + } + + return cell; +} +-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return 10; +} +-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return 10; +} +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return 132; +} +-(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 +{ + +} +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiPGTableViewCell.h b/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiPGTableViewCell.h new file mode 100644 index 0000000..6b3fd3e --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiPGTableViewCell.h @@ -0,0 +1,16 @@ +// +// PiLiangXiuGaiPGTableViewCell.h +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PiLiangXiuGaiPGTableViewCell : UITableViewCell + +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiPGTableViewCell.m b/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiPGTableViewCell.m new file mode 100644 index 0000000..aa7c835 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiPGTableViewCell.m @@ -0,0 +1,87 @@ +// +// PiLiangXiuGaiPGTableViewCell.m +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import "PiLiangXiuGaiPGTableViewCell.h" + + +@interface PiLiangXiuGaiPGTableViewCell () + +@end + +@implementation PiLiangXiuGaiPGTableViewCell + +-(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(0); + make.bottom.equalTo(self).offset(-10); + }]; + [Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:8 shadowRadius:10]; + + UIImageView *imgvback = [[UIImageView alloc] init]; +// [imgvback setImage:[UIImage imageNamed:@""]]; + [viewback addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.offset(14); + make.bottom.equalTo(viewback).offset(-14); + make.width.offset(72); + }]; + [imgvback.layer setMasksToBounds:YES]; + [imgvback.layer setCornerRadius:6]; + [imgvback.layer setBorderWidth:1]; + [imgvback.layer setBorderColor:RGBCOLOR(42, 211, 237).CGColor]; +// _imgvback = imgvback; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self addJianBianLine:imgvback colors:@[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor] start:CGPointMake(0, 0) end:CGPointMake(0, 1)]; + }); + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:@"批改中..."]; + [lbname setTextColor:RGBCOLOR(255, 59, 55)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont boldSystemFontOfSize:14]]; + [viewback addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.equalTo(viewback); + make.left.equalTo(imgvback.mas_right).offset(12); + make.right.equalTo(viewback).offset(-90); + }]; + + } + return self; +} +///给边框添加渐变 +-(void)addJianBianLine:(UIView *)myView colors:(NSArray *)colors start:(CGPoint)start end:(CGPoint)end +{ + // 创建CAGradientLayer实例 + CAGradientLayer *gradientLayer = [CAGradientLayer layer]; + gradientLayer.frame = myView.bounds; // 确保layer的大小和view相同 + // 设置渐变色 + gradientLayer.colors = colors; + // 设置渐变方向 + gradientLayer.startPoint = start; + gradientLayer.endPoint = end; + + // 创建一个子layer来渲染渐变效果,而不是直接在view的layer上 + CALayer *borderLayer = [CALayer layer]; + borderLayer.frame = CGRectInset(myView.bounds, 1, 1); // 内边框 + borderLayer.masksToBounds = YES; + borderLayer.contents = (__bridge id)([UIImage new].CGImage); + // 将渐变layer添加为borderLayer的mask + borderLayer.mask = gradientLayer; + // 将borderLayer添加到view的layer上 + [myView.layer addSublayer:borderLayer]; +} +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiTableViewCell.h b/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiTableViewCell.h new file mode 100644 index 0000000..76ae663 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiTableViewCell.h @@ -0,0 +1,16 @@ +// +// PiLiangXiuGaiTableViewCell.h +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PiLiangXiuGaiTableViewCell : UITableViewCell + +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiTableViewCell.m b/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiTableViewCell.m new file mode 100644 index 0000000..bbe7b3c --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/批量批改/cell/PiLiangXiuGaiTableViewCell.m @@ -0,0 +1,215 @@ +// +// PiLiangXiuGaiTableViewCell.m +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import "PiLiangXiuGaiTableViewCell.h" + + +@interface PiLiangXiuGaiTableViewCell () + +@end + +@implementation PiLiangXiuGaiTableViewCell + +-(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(0); + make.bottom.equalTo(self).offset(-10); + }]; + [Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:8 shadowRadius:10]; + + UIImageView *imgvback = [[UIImageView alloc] init]; +// [imgvback setImage:[UIImage imageNamed:@""]]; + [viewback addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.offset(14); + make.bottom.equalTo(viewback).offset(-14); + make.width.offset(72); + }]; + [imgvback.layer setMasksToBounds:YES]; + [imgvback.layer setCornerRadius:6]; + [imgvback.layer setBorderWidth:1]; + [imgvback.layer setBorderColor:RGBCOLOR(42, 211, 237).CGColor]; +// _imgvback = imgvback; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self addJianBianLine:imgvback colors:@[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor] start:CGPointMake(0, 0) end:CGPointMake(0, 1)]; + }); + + UIView *viewfen = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 30, 16)]; + [imgvback addSubview:viewfen]; + [viewfen mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.left.equalTo(imgvback); + make.width.offset(30); + make.height.offset(16); + }]; + UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect: viewfen.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(4,4)]; + //创建 layer + CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; + maskLayer.frame = viewfen.bounds; + //赋值 + maskLayer.path = maskPath.CGPath; + viewfen.layer.mask = maskLayer; + [Tools changedView:viewfen colors:@[(id)RGBCOLOR(255, 113, 110).CGColor,(id)RGBCOLOR(242, 61, 79).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 1)]; + + UILabel *lbfen = [[UILabel alloc] init]; + [lbfen setText:@"86分"]; + [lbfen setTextColor:[UIColor whiteColor]]; + [lbfen setTextAlignment:NSTextAlignmentCenter]; + [lbfen setFont:[UIFont systemFontOfSize:10]]; + [viewfen addSubview:lbfen]; + [lbfen mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(viewfen); + }]; + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:@"抓星星的奇妙瞬间"]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont boldSystemFontOfSize:14]]; + [viewback addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.offset(14); + make.left.equalTo(imgvback.mas_right).offset(12); + make.right.equalTo(viewback).offset(-90); + }]; + + 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(6); + make.right.equalTo(viewback).offset(-12); + }]; + + UILabel *lbtime = [[UILabel alloc] init]; + [lbtime setText:@"2024-10-17 14:10:23"]; + [lbtime setTextColor:RGBCOLOR(153, 153, 153)]; + [lbtime setTextAlignment:NSTextAlignmentLeft]; + [lbtime setFont:[UIFont systemFontOfSize:10]]; + [viewback addSubview:lbtime]; + [lbtime mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(lbname); + make.bottom.equalTo(imgvback).offset(-5); + }]; + + UIButton *btxq = [[UIButton alloc] init]; + [btxq setTitle:@"查看详情" forState:UIControlStateNormal]; + [btxq setTitleColor:RGBCOLOR(153, 153, 153) forState:UIControlStateNormal]; + [btxq.titleLabel setFont:[UIFont systemFontOfSize:12]]; + [btxq setImage:[UIImage imageNamed:@"plpj_next"] forState:UIControlStateNormal]; + [viewback addSubview:btxq]; + [btxq mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(viewback).offset(-12); + make.centerY.equalTo(lbname); + make.height.offset(30); + make.width.offset(80); + }]; + [btxq setIconInRight]; + [btxq setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight]; + [btxq setUserInteractionEnabled:NO]; + + UIButton *btcheck = [[UIButton alloc] init]; + [btcheck setTitle:@"查看评语" forState:UIControlStateNormal]; + [btcheck setTitleColor:RGBCOLOR(108, 119, 246) forState:UIControlStateNormal]; + [btcheck.titleLabel setFont:[UIFont systemFontOfSize:12]]; + [btcheck.layer setMasksToBounds:YES]; + [btcheck.layer setCornerRadius:4]; + [btcheck setBackgroundColor:RGBCOLOR(239, 240, 255)]; + [viewback addSubview:btcheck]; + [btcheck mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(lbinfo); + make.centerY.equalTo(lbtime); + make.size.sizeOffset(CGSizeMake(60, 24)); + }]; + [btcheck addTarget:self action:@selector(chakanAction) forControlEvents:UIControlEventTouchUpInside]; + + UIButton *btsave = [[UIButton alloc] init]; + [btsave setTitle:@"保存" forState:UIControlStateNormal]; + [btsave setTitleColor:RGBCOLOR(255, 119, 29) forState:UIControlStateNormal]; + [btsave.titleLabel setFont:[UIFont systemFontOfSize:12]]; + [btsave.layer setMasksToBounds:YES]; + [btsave.layer setCornerRadius:4]; + [btsave setBackgroundColor:RGBCOLOR(255, 241, 232)]; + [viewback addSubview:btsave]; + [btsave mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(btcheck.mas_left).offset(-10); + make.centerY.equalTo(lbtime); + make.width.offset(44); + make.height.offset(24); + }]; + [btsave addTarget:self action:@selector(saveAction) forControlEvents:UIControlEventTouchUpInside]; + + UIView *viewpoint = [[UIView alloc] init]; + [viewpoint setBackgroundColor:RGBCOLOR(12, 219, 199)]; + [btsave addSubview:viewpoint]; + [viewpoint mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.offset(5); + make.left.offset(0); + make.centerY.equalTo(btsave); + }]; + [viewpoint.layer setMasksToBounds:YES]; + [viewpoint.layer setCornerRadius:2.5]; + [viewpoint setHidden:YES]; + + [btsave setTitle:@"已保存" forState:UIControlStateNormal]; + [btsave setTitleColor:RGBCOLOR(12, 219, 199) forState:UIControlStateNormal]; + [btsave mas_updateConstraints:^(MASConstraintMaker *make) { + make.width.offset(47); + }]; + [btsave setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];///UIControlContentHorizontalAlignmentCenter + [viewpoint setHidden:NO]; + [btsave setBackgroundColor:[UIColor clearColor]]; + } + return self; +} +///给边框添加渐变 +-(void)addJianBianLine:(UIView *)myView colors:(NSArray *)colors start:(CGPoint)start end:(CGPoint)end +{ + // 创建CAGradientLayer实例 + CAGradientLayer *gradientLayer = [CAGradientLayer layer]; + gradientLayer.frame = myView.bounds; // 确保layer的大小和view相同 + // 设置渐变色 + gradientLayer.colors = colors; + // 设置渐变方向 + gradientLayer.startPoint = start; + gradientLayer.endPoint = end; + + // 创建一个子layer来渲染渐变效果,而不是直接在view的layer上 + CALayer *borderLayer = [CALayer layer]; + borderLayer.frame = CGRectInset(myView.bounds, 1, 1); // 内边框 + borderLayer.masksToBounds = YES; + borderLayer.contents = (__bridge id)([UIImage new].CGImage); + // 将渐变layer添加为borderLayer的mask + borderLayer.mask = gradientLayer; + // 将borderLayer添加到view的layer上 + [myView.layer addSublayer:borderLayer]; +} + +-(void)chakanAction +{ + +} + +-(void)saveAction +{ + +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/PiLiangXiuGaiLiShiViewController.h b/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/PiLiangXiuGaiLiShiViewController.h new file mode 100644 index 0000000..b5751b1 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/PiLiangXiuGaiLiShiViewController.h @@ -0,0 +1,16 @@ +// +// PiLiangXiuGaiLiShiViewController.h +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface PiLiangXiuGaiLiShiViewController : BaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/PiLiangXiuGaiLiShiViewController.m b/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/PiLiangXiuGaiLiShiViewController.m new file mode 100644 index 0000000..db4804a --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/PiLiangXiuGaiLiShiViewController.m @@ -0,0 +1,92 @@ +// +// PiLiangXiuGaiLiShiViewController.m +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import "PiLiangXiuGaiLiShiViewController.h" +#import "PiLiangXiuGaiLiShiTableViewCell.h" + + +@interface PiLiangXiuGaiLiShiViewController () +/// +@property (nonatomic , strong) UITableView *tableView; + +@end + +@implementation PiLiangXiuGaiLiShiViewController +- (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:RGBCOLOR(246, 249, 250)]; + + 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.equalTo(self.view); + make.top.offset(NavHeight); + make.bottom.equalTo(self.view); + }]; + _tableView = tableView; + +} +#pragma mark - UITableView +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return 5; +} +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *strcell = @"PiLiangXiuGaiLiShiTableViewCell"; + PiLiangXiuGaiLiShiTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell]; + if(!cell) + { + cell = [[PiLiangXiuGaiLiShiTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell]; + [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; + [cell setBackgroundColor:[UIColor clearColor]]; + } + + return cell; +} +-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return 10; +} +-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return 10; +} +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return 132; +} +-(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 +{ + +} + + +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/cell/PiLiangXiuGaiLiShiTableViewCell.h b/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/cell/PiLiangXiuGaiLiShiTableViewCell.h new file mode 100644 index 0000000..911f708 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/cell/PiLiangXiuGaiLiShiTableViewCell.h @@ -0,0 +1,16 @@ +// +// PiLiangXiuGaiLiShiTableViewCell.h +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PiLiangXiuGaiLiShiTableViewCell : UITableViewCell + +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/cell/PiLiangXiuGaiLiShiTableViewCell.m b/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/cell/PiLiangXiuGaiLiShiTableViewCell.m new file mode 100644 index 0000000..7f78126 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/批量批改/历史记录/cell/PiLiangXiuGaiLiShiTableViewCell.m @@ -0,0 +1,174 @@ +// +// PiLiangXiuGaiLiShiTableViewCell.m +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import "PiLiangXiuGaiLiShiTableViewCell.h" + + +@interface PiLiangXiuGaiLiShiTableViewCell () + +@end + +@implementation PiLiangXiuGaiLiShiTableViewCell + +-(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(0); + make.bottom.equalTo(self).offset(-10); + }]; + [Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:8 shadowRadius:10]; + + UIImageView *imgvback = [[UIImageView alloc] init]; +// [imgvback setImage:[UIImage imageNamed:@""]]; + [viewback addSubview:imgvback]; + [imgvback mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.offset(14); + make.bottom.equalTo(viewback).offset(-14); + make.width.offset(72); + }]; + [imgvback.layer setMasksToBounds:YES]; + [imgvback.layer setCornerRadius:6]; + [imgvback.layer setBorderWidth:1]; + [imgvback.layer setBorderColor:RGBCOLOR(42, 211, 237).CGColor]; +// _imgvback = imgvback; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self addJianBianLine:imgvback colors:@[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor] start:CGPointMake(0, 0) end:CGPointMake(0, 1)]; + }); + + UIView *viewfen = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 30, 16)]; + [imgvback addSubview:viewfen]; + [viewfen mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.left.equalTo(imgvback); + make.width.offset(30); + make.height.offset(16); + }]; + UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect: viewfen.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(4,4)]; + //创建 layer + CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; + maskLayer.frame = viewfen.bounds; + //赋值 + maskLayer.path = maskPath.CGPath; + viewfen.layer.mask = maskLayer; + [Tools changedView:viewfen colors:@[(id)RGBCOLOR(255, 113, 110).CGColor,(id)RGBCOLOR(242, 61, 79).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 1)]; + + UILabel *lbfen = [[UILabel alloc] init]; + [lbfen setText:@"86分"]; + [lbfen setTextColor:[UIColor whiteColor]]; + [lbfen setTextAlignment:NSTextAlignmentCenter]; + [lbfen setFont:[UIFont systemFontOfSize:10]]; + [viewfen addSubview:lbfen]; + [lbfen mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(viewfen); + }]; + + UILabel *lbname = [[UILabel alloc] init]; + [lbname setText:@"抓星星的奇妙瞬间"]; + [lbname setTextColor:RGBCOLOR(51, 51, 51)]; + [lbname setTextAlignment:NSTextAlignmentLeft]; + [lbname setFont:[UIFont boldSystemFontOfSize:14]]; + [viewback addSubview:lbname]; + [lbname mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.offset(14); + make.left.equalTo(imgvback.mas_right).offset(12); + make.right.equalTo(viewback).offset(-90); + }]; + + 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(6); + make.right.equalTo(viewback).offset(-12); + }]; + + UILabel *lbtime = [[UILabel alloc] init]; + [lbtime setText:@"2024-10-17 14:10:23"]; + [lbtime setTextColor:RGBCOLOR(153, 153, 153)]; + [lbtime setTextAlignment:NSTextAlignmentLeft]; + [lbtime setFont:[UIFont systemFontOfSize:10]]; + [viewback addSubview:lbtime]; + [lbtime mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(lbname); + make.bottom.equalTo(imgvback).offset(-5); + }]; + + UIButton *btxq = [[UIButton alloc] init]; + [btxq setTitle:@"查看详情" forState:UIControlStateNormal]; + [btxq setTitleColor:RGBCOLOR(153, 153, 153) forState:UIControlStateNormal]; + [btxq.titleLabel setFont:[UIFont systemFontOfSize:12]]; + [btxq setImage:[UIImage imageNamed:@"plpj_next"] forState:UIControlStateNormal]; + [viewback addSubview:btxq]; + [btxq mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(viewback).offset(-12); + make.centerY.equalTo(lbname); + make.height.offset(30); + make.width.offset(80); + }]; + [btxq setIconInRight]; + [btxq setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight]; + [btxq setUserInteractionEnabled:NO]; + + UIButton *btcheck = [[UIButton alloc] init]; + [btcheck setTitle:@"查看评语" forState:UIControlStateNormal]; + [btcheck setTitleColor:RGBCOLOR(108, 119, 246) forState:UIControlStateNormal]; + [btcheck.titleLabel setFont:[UIFont systemFontOfSize:12]]; + [btcheck.layer setMasksToBounds:YES]; + [btcheck.layer setCornerRadius:4]; + [btcheck setBackgroundColor:RGBCOLOR(239, 240, 255)]; + [viewback addSubview:btcheck]; + [btcheck mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(lbinfo); + make.centerY.equalTo(lbtime); + make.size.sizeOffset(CGSizeMake(60, 24)); + }]; + [btcheck addTarget:self action:@selector(chakanAction) forControlEvents:UIControlEventTouchUpInside]; + + } + return self; +} +///给边框添加渐变 +-(void)addJianBianLine:(UIView *)myView colors:(NSArray *)colors start:(CGPoint)start end:(CGPoint)end +{ + // 创建CAGradientLayer实例 + CAGradientLayer *gradientLayer = [CAGradientLayer layer]; + gradientLayer.frame = myView.bounds; // 确保layer的大小和view相同 + // 设置渐变色 + gradientLayer.colors = colors; + // 设置渐变方向 + gradientLayer.startPoint = start; + gradientLayer.endPoint = end; + + // 创建一个子layer来渲染渐变效果,而不是直接在view的layer上 + CALayer *borderLayer = [CALayer layer]; + borderLayer.frame = CGRectInset(myView.bounds, 1, 1); // 内边框 + borderLayer.masksToBounds = YES; + borderLayer.contents = (__bridge id)([UIImage new].CGImage); + // 将渐变layer添加为borderLayer的mask + borderLayer.mask = gradientLayer; + // 将borderLayer添加到view的layer上 + [myView.layer addSublayer:borderLayer]; +} + +-(void)chakanAction +{ + +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/CamreImageEditViewController.h b/ProductApp/ProductApp/ProductMain/首页/自定义相机/CamreImageEditViewController.h new file mode 100644 index 0000000..4385daa --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/CamreImageEditViewController.h @@ -0,0 +1,19 @@ +// +// CamreImageEditViewController.h +// ProductApp +// +// Created by 工作 on 2024/11/15. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface CamreImageEditViewController : BaseViewController + +/// +@property (nonatomic , strong) NSMutableArray *arrImages; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/CamreImageEditViewController.m b/ProductApp/ProductApp/ProductMain/首页/自定义相机/CamreImageEditViewController.m new file mode 100644 index 0000000..ff7afb0 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/CamreImageEditViewController.m @@ -0,0 +1,36 @@ +// +// CamreImageEditViewController.m +// ProductApp +// +// Created by 工作 on 2024/11/15. +// + +#import "CamreImageEditViewController.h" + +@interface CamreImageEditViewController () + +@end + +@implementation CamreImageEditViewController + +- (UIStatusBarStyle)preferredStatusBarStyle { + return UIStatusBarStyleDefault; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; +} +-(void)viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self.navigationController setNavigationBarHidden:YES animated:NO]; + [self.navigationView setHidden:YES]; + [self.navigationView setTitle:@"图片编辑器" titleColor:RGBACOLOR(0, 0, 0, 0.1)]; + [self.view setBackgroundColor:[UIColor blackColor]]; + + +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/ImageEditDrawViewController.h b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/ImageEditDrawViewController.h new file mode 100644 index 0000000..af042fb --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/ImageEditDrawViewController.h @@ -0,0 +1,19 @@ +// +// ImageEditDrawViewController.h +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN +typedef void(^ImageEditDrawViewControllerBack)(NSMutableArray *arrimages); +@interface ImageEditDrawViewController : BaseViewController +/// +@property (nonatomic , strong) NSArray *arrImages; +/// +@property (nonatomic , strong) ImageEditDrawViewControllerBack backValue; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/ImageEditDrawViewController.m b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/ImageEditDrawViewController.m new file mode 100644 index 0000000..7c59de9 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/ImageEditDrawViewController.m @@ -0,0 +1,57 @@ +// +// ImageEditDrawViewController.m +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import "ImageEditDrawViewController.h" +#import "ImageEditDrawView.h" + +@interface ImageEditDrawViewController () +/// +@property (nonatomic , strong) ImageEditDrawView *viewShow; +@end + +@implementation ImageEditDrawViewController +- (UIStatusBarStyle)preferredStatusBarStyle { + return UIStatusBarStyleDefault; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + [self.navigationController setNavigationBarHidden:YES animated:animated]; + [self showNaviGationView:YES]; + [self.navigationView setTitle:@"" titleColor:[UIColor blackColor]]; + [self.navigationView setBackgroundColor:[UIColor clearColor]]; + [self.navigationView setMuenTitle:@"全部完成" titleColor:[UIColor whiteColor]]; + [self.navigationView.muenButton setBackgroundColor:RGBCOLOR(0, 184, 156)]; + [self.navigationView.muenButton.layer setMasksToBounds:YES]; + [self.navigationView.muenButton.layer setCornerRadius:6]; + self.navigationView.muenBtnWidth.constant = 80; +} +-(void)navMuenButtonAction +{ + if(self.backValue) + { + NSMutableArray *arrback = [self.viewShow getAllEditImages]; + self.backValue(arrback); + } + [self.navigationController popViewControllerAnimated:YES]; +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self.view setBackgroundColor:[UIColor blackColor]]; + + ImageEditDrawView *view = [ImageEditDrawView new]; + [self.view addSubview:view]; + [view mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.equalTo(self.view); + make.top.offset(NavHeight); + }]; + view.arrImages = self.arrImages; + _viewShow = view; +} + + + +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiManager.h b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiManager.h new file mode 100755 index 0000000..6ed77c6 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiManager.h @@ -0,0 +1,34 @@ +// +// MosaiManager.h +// YJMosaiDemo +// +// Created by yangjian on 2019/1/28. +// Copyright © 2019 zhangshuyue. All rights reserved. +// + +#import +#import + +@interface MosaiManager : NSObject + + +-(instancetype)initWithOriImage:(UIImage*)originalImage; + +//重做 +-(UIImage*)redo; + +//撤销 +-(UIImage*)undo; + +//当前操作数index +@property(nonatomic,assign)NSInteger currentIndex; +//操作数 +@property(nonatomic,assign)NSInteger operationCount; + +-(void)writeImageToCache:(UIImage*)image; + +-(void)releaseAllImage; + + + +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiManager.m b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiManager.m new file mode 100755 index 0000000..81d0835 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiManager.m @@ -0,0 +1,63 @@ +// +// MosaiManager.m +// YJMosaiDemo +// +// Created by yangjian on 2019/1/28. +// Copyright © 2019 zhangshuyue. All rights reserved. +// + +#import "MosaiManager.h" + +@interface MosaiManager() + +@property(nonatomic,strong)NSMutableArray *cacheArray; +@property(nonatomic,strong)UIImage *originalImage; +@end + +@implementation MosaiManager + +-(instancetype)initWithOriImage:(UIImage *)originalImage{ + if (!originalImage) return nil; + if (self = [super init]) { + _currentIndex = 0; + _cacheArray = [[NSMutableArray alloc]init]; + [_cacheArray addObject:originalImage]; + _originalImage = originalImage; + } + return self; +} + + +-(UIImage *)redo{ + if (_currentIndex + 1 < _cacheArray.count) { + _currentIndex++; + return _cacheArray[_currentIndex]; + } + return nil; +} + +-(UIImage*)undo{ + if (_currentIndex - 1 >= 0) { + _currentIndex--; + return _cacheArray[_currentIndex]; + } + + return nil; +} + + +-(void)writeImageToCache:(UIImage *)image{ + if (!image) return; + if (_currentIndex < _cacheArray.count -1) { + [_cacheArray removeObjectsInRange:NSMakeRange(_currentIndex+1 , _cacheArray.count - 1 - _currentIndex)]; + } + [_cacheArray addObject:image]; + _currentIndex++; + _operationCount = _currentIndex; +} + +-(void)releaseAllImage{ + [self.cacheArray removeAllObjects]; + _currentIndex = 0; +} +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiPath.h b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiPath.h new file mode 100755 index 0000000..204ed27 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiPath.h @@ -0,0 +1,29 @@ +// +// MosaiPath.h +// YJMosaiDemo +// +// Created by yangjian on 2019/1/28. +// Copyright © 2019 zhangshuyue. All rights reserved. +// + +#import +#import + +@interface PathPoint:NSObject + +@property(nonatomic)float xPoint; + +@property(nonatomic)float yPoint; + +@end + + +@interface MosaiPath : NSObject + +@property(nonatomic)CGPoint startPoint; +@property(nonatomic)NSMutableArray *pathPointArray; +@property(nonatomic)CGPoint endPoint; + +-(void)resetStatus; + +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiPath.m b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiPath.m new file mode 100755 index 0000000..356f398 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiPath.m @@ -0,0 +1,70 @@ +// +// MosaiPath.m +// YJMosaiDemo +// +// Created by yangjian on 2019/1/28. +// Copyright © 2019 zhangshuyue. All rights reserved. +// + +#import "MosaiPath.h" + +@interface MosaiPath() + +@end + +@implementation MosaiPath + +- (instancetype)init +{ + self = [super init]; + if (self) { + _startPoint = CGPointZero; + _endPoint = CGPointZero; + _pathPointArray = [[NSMutableArray alloc]init]; + } + return self; +} + + +-(void)resetStatus{ + _startPoint = CGPointZero; + _endPoint = CGPointZero; + [_pathPointArray removeAllObjects]; +} + + + +- (id)copyWithZone:(NSZone *)zone +{ + MosaiPath *obj = [[[self class] allocWithZone:zone] init]; + obj.pathPointArray = [self.pathPointArray copyWithZone:zone]; + obj.startPoint = self.startPoint; + obj.endPoint = self.endPoint; + + return obj; +} + +- (id)mutableCopyWithZone:(NSZone *)zone +{ + MosaiPath *obj = [[[self class] allocWithZone:zone] init]; + obj.pathPointArray = [self.pathPointArray copyWithZone:zone]; + obj.startPoint = self.startPoint; + obj.endPoint = self.endPoint; + return obj; +} + +@end + + +@implementation PathPoint + +- (instancetype)init +{ + self = [super init]; + if (self) { + _xPoint = _yPoint = 0; + } + return self; +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiView.h b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiView.h new file mode 100755 index 0000000..0889880 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiView.h @@ -0,0 +1,52 @@ +// +// MosaiView.h +// YJMosaiDemo +// +// Created by yangjian on 2019/1/28. +// Copyright © 2019 zhangshuyue. All rights reserved. +// + +#import +@protocol MosaiViewDelegate; +@interface MosaiView : UIView + +//底图为马赛克图 +@property (nonatomic, strong) UIImage *mosaicImage; +//表图为正常图片 +@property (nonatomic, strong) UIImage *originalImage; +//OperationCount +@property (nonatomic, assign, readonly) NSInteger operationCount; +//CurrentIndex +@property (nonatomic, assign, readonly) NSInteger currentIndex; +//Delegate +@property (nonatomic, weak) id deleagate; + +//ResetMosai +-(void)resetMosaiImage; + +//下一步 +-(void)redo; + +//上一步 +-(void)undo; + +-(BOOL)canUndo; + +-(BOOL)canRedo; + +-(UIImage*)resultImage; + +@end + + +@protocol MosaiViewDelegate + +@optional + +-(void)mosaiView:(MosaiView*)view TouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; + +-(void)mosaiView:(MosaiView*)view TouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; + +-(void)mosaiView:(MosaiView*)view TouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; + +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiView.m b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiView.m new file mode 100755 index 0000000..6c72621 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/YJMosaiView/MosaiView.m @@ -0,0 +1,355 @@ +// +// MosaiView.m +// YJMosaiDemo +// +// Created by yangjian on 2019/1/28. +// Copyright © 2019 zhangshuyue. All rights reserved. +// + +#import "MosaiView.h" +#import "MosaiPath.h" +#import "MosaiManager.h" + +@interface MosaiView() + +//存放顶层图片的UIImageView,图片为正常的图片 +@property (nonatomic, strong) UIImageView *topImageView; + +//展示马赛克图片的涂层 +@property (nonatomic, strong) CALayer *mosaicImageLayer; + +//遮罩层,用于设置形状路径 +@property (nonatomic, strong) CAShapeLayer *shapeLayer; + +//手指涂抹的路径 +@property (nonatomic, assign) CGMutablePathRef path; + +//当前绘制的信息 +@property (nonatomic, strong) MosaiPath *currentPath; + +//绘制路径 +@property (nonatomic, strong) NSMutableArray *pathArray; + +//每一次作图后的马赛克图 +@property (nonatomic ,strong) UIImage *mosaiFinalImage; + +//MosaiManager +@property(nonatomic ,strong) MosaiManager *mosaiManager; +@end + + +@implementation MosaiView + +- (void)dealloc{ + if (self.path) { + CGPathRelease(self.path); + } + [self.mosaiManager releaseAllImage]; +} + +- (instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if (self) { + + _currentPath = [[MosaiPath alloc]init]; + _pathArray = [[NSMutableArray alloc]init]; + _operationCount = 0; + + + //初始化顶层图片视图 + self.topImageView = [[UIImageView alloc] initWithFrame:self.bounds]; + [self addSubview:self.topImageView]; + + } + return self; +} + +- (void)setOriginalImage:(UIImage *)originalImage{ + _originalImage = originalImage;//原始图片 + self.topImageView.image = originalImage;//顶层视图展示原始图片 + self.mosaiFinalImage = originalImage; + _mosaiManager = [[MosaiManager alloc]initWithOriImage:originalImage]; + +} + +- (void)setMosaicImage:(UIImage *)mosaicImage{ + mosaicImage = [self mosaicImage:mosaicImage mosaicLevel:20];///??? + _mosaicImage = mosaicImage;//马赛克图片 + [self resetMosaiImage]; +} + +//重新设置马赛克 +-(void)resetMosaiImage{ + //重新设置Layer与Path + if (self.path) { + CGPathRelease(self.path); + self.path = nil; + } + self.path = CGPathCreateMutable(); + self.topImageView.image = _mosaiFinalImage; + + //移除轨迹 + [self.pathArray removeAllObjects]; + [_currentPath resetStatus]; + + [self.shapeLayer removeFromSuperlayer]; + self.shapeLayer = nil; + + [self.mosaicImageLayer removeFromSuperlayer]; + self.mosaicImageLayer = nil; + + + self.mosaicImageLayer = [CALayer layer]; + self.mosaicImageLayer.frame = self.bounds; + [self.layer addSublayer:self.mosaicImageLayer]; +// self.mosaicImageLayer.contents = (__bridge id _Nullable)([self.mosaicImage CGImage]);//将马赛克图层内容设置为马赛克图片内容 + + self.mosaicImageLayer.contents = (__bridge id _Nullable)([[UIImage imageNamed:@"writeback"] CGImage]);//将马赛克图层内容设置为马赛克图片内容 + + + + //初始化遮罩图层 + self.shapeLayer = [CAShapeLayer layer]; + self.shapeLayer.frame = self.bounds; + self.shapeLayer.lineCap = kCALineCapRound; + self.shapeLayer.lineJoin = kCALineJoinRound; + self.shapeLayer.lineWidth = 15.0f;///画笔大小 + self.shapeLayer.strokeColor = [[UIColor blueColor] CGColor]; + self.shapeLayer.fillColor = [UIColor whiteColor].CGColor; + [self.layer addSublayer:self.shapeLayer]; + self.mosaicImageLayer.mask = self.shapeLayer; + +} + + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event +{ + [super touchesBegan:touches withEvent:event]; + UITouch *touch = [touches anyObject]; + CGPoint point = [touch locationInView:self]; + CGPathMoveToPoint(self.path, NULL, point.x, point.y); + CGMutablePathRef path = CGPathCreateMutableCopy(self.path); + self.shapeLayer.path = path; + CGPathRelease(path); + + + CGSize size = self.topImageView.image.size; + CGFloat rate = size.width/self.topImageView.bounds.size.width; + _currentPath.startPoint = CGPointMake(point.x * rate, point.y * rate); + + if ([self.deleagate respondsToSelector:@selector(mosaiView:TouchesBegan:withEvent:)]) { + [self.deleagate mosaiView:self TouchesBegan:touches withEvent:event]; + } + +} + +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event +{ + [super touchesMoved:touches withEvent:event]; + UITouch *touch = [touches anyObject]; + CGPoint point = [touch locationInView:self]; + CGPathAddLineToPoint(self.path, NULL, point.x, point.y); + CGMutablePathRef path = CGPathCreateMutableCopy(self.path); + self.shapeLayer.path = path; + CGPathRelease(path); + + + CGSize size = self.topImageView.image.size; + CGFloat rate = size.width/self.topImageView.bounds.size.width; + PathPoint *pointPath = [[PathPoint alloc]init]; + pointPath.xPoint = point.x * rate; + pointPath.yPoint = point.y * rate; + [_currentPath.pathPointArray addObject:pointPath]; + + if ([self.deleagate respondsToSelector:@selector(mosaiView:TouchesMoved:withEvent:)]) { + [self.deleagate mosaiView:self TouchesMoved:touches withEvent:event]; + } +} + + +-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ + [super touchesMoved:touches withEvent:event]; + + //画完之后需要保存一张原图,因为做多层马赛克的话,就是在上一次马赛克画笔之后的图作为原图,后面再叠加一层 + UITouch *touch = [touches anyObject]; + CGPoint point = [touch locationInView:self]; + CGSize size = self.topImageView.image.size; + CGFloat rate = size.width/self.topImageView.bounds.size.width; + _currentPath.endPoint = CGPointMake(point.x * rate, point.y * rate); + + + MosaiPath *path = [_currentPath copy]; + [_pathArray addObject:path]; + [_currentPath resetStatus]; + + UIGraphicsBeginImageContext(size); + [self.topImageView.image drawInRect:CGRectMake(0, 0, size.width, size.height)]; + for (MosaiPath *path in _pathArray) { + + CGContextMoveToPoint(UIGraphicsGetCurrentContext(), path.startPoint.x, path.startPoint.y); + CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), path.startPoint.x, path.startPoint.y); + + for (PathPoint *point in path.pathPointArray) { + CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), point.xPoint, point.yPoint); + } + + } + CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); + CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 15.f * rate); + CGContextSetBlendMode(UIGraphicsGetCurrentContext(), kCGBlendModeClear); + CGContextStrokePath(UIGraphicsGetCurrentContext()); + + UIImage *finalPath = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + UIGraphicsBeginImageContextWithOptions(size, YES, 1.0); + CGContextSetRGBFillColor(UIGraphicsGetCurrentContext(), 255, 255, 255, 1); + [self.mosaicImage drawInRect:CGRectMake(0, 0, size.width, size.height)]; + [finalPath drawInRect:CGRectMake(0, 0, size.width, size.height)]; + _mosaiFinalImage = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + //写入缓存 + [self.mosaiManager writeImageToCache:_mosaiFinalImage]; + _operationCount = self.mosaiManager.operationCount; + + if ([self.deleagate respondsToSelector:@selector(mosaiView:TouchesEnded:withEvent:)]) { + [self.deleagate mosaiView:self TouchesEnded:touches withEvent:event]; + } +} + + +-(void)redo{ + UIImage *image = [self.mosaiManager redo]; + if (!image)return; + self.mosaiFinalImage = image; + [self resetMosaiImage]; + +} + +-(void)undo{ + UIImage *image = [self.mosaiManager undo]; + if (!image)return; + self.mosaiFinalImage = image; + [self resetMosaiImage]; +} + +-(BOOL)canUndo{ + if (self.mosaiManager.currentIndex > 0) { + return YES; + } + return NO; + +} + + +-(NSInteger)currentIndex{ + return self.mosaiManager.currentIndex; +} + + +-(BOOL)canRedo{ + if (self.mosaiManager.currentIndex < self.mosaiManager.operationCount) { + return YES; + } + return NO; +} + +-(UIImage*)resultImage{ + return self.mosaiFinalImage; +} + + + +//生成原图马赛克图片 +-(UIImage *)mosaicImage:(UIImage *)sourceImage mosaicLevel:(NSUInteger)level{ + +// //1、这一部分是为了把原始图片转成位图,位图再转成可操作的数据 +// CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();//颜色通道 +// CGImageRef imageRef = sourceImage.CGImage;//位图 +// CGFloat width = CGImageGetWidth(imageRef);//位图宽 +// CGFloat height = CGImageGetHeight(imageRef);//位图高 +// CGContextRef context = CGBitmapContextCreate(nil, width, height, 8, width * 4, colorSpace, kCGImageAlphaPremultipliedLast);//生成上下午 +// +// +// CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, width, height), imageRef);//绘制图片到上下文中 +// unsigned char *bitmapData = CGBitmapContextGetData(context);//获取位图的数据 +// +// //2、这一部分是往右往下填充色值 +// NSUInteger index,preIndex; +// unsigned char pixel[4] = {0}; +// for (int i = 0; i < height; i++) {//表示高,也可以说是行 +// for (int j = 0; j < width; j++) {//表示宽,也可以说是列 +// index = i * width + j; +// if (i % level == 0) { +// if (j % level == 0) { +// //把当前的色值数据保存一份,开始为i=0,j=0,所以一开始会保留一份 +// memcpy(pixel, bitmapData + index * 4, 4); +// }else{ +// //把上一次保留的色值数据填充到当前的内存区域,这样就起到把前面数据往后挪的作用,也是往右填充 +// memcpy(bitmapData +index * 4, pixel, 4); +// } +// }else{ +// //这里是把上一行的往下填充 +// preIndex = (i - 1) * width + j; +// memcpy(bitmapData + index * 4, bitmapData + preIndex * 4, 4); +// } +// } +// } +// +// //把数据转回位图,再从位图转回UIImage +// NSUInteger dataLength = width * height * 4; +// CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, bitmapData, dataLength, NULL); +// +// CGImageRef mosaicImageRef = CGImageCreate(width, height, +// 8, +// 32, +// width*4 , +// colorSpace, +// kCGBitmapByteOrderDefault, +// provider, +// NULL, NO, +// kCGRenderingIntentDefault); +// CGContextRef outputContext = CGBitmapContextCreate(nil, +// width, +// height, +// 8, +// width*4, +// colorSpace, +// kCGImageAlphaPremultipliedLast); +// CGContextDrawImage(outputContext, CGRectMake(0.0f, 0.0f, width, height), mosaicImageRef); +// CGImageRef resultImageRef = CGBitmapContextCreateImage(outputContext); +// UIImage *resultImage = nil; +// if([UIImage respondsToSelector:@selector(imageWithCGImage:scale:orientation:)]) { +// float scale = [[UIScreen mainScreen] scale]; +// resultImage = [UIImage imageWithCGImage:resultImageRef scale:scale orientation:UIImageOrientationUp]; +// } else { +// resultImage = [UIImage imageWithCGImage:resultImageRef]; +// } +// CFRelease(resultImageRef); +// CFRelease(mosaicImageRef); +// CFRelease(colorSpace); +// CFRelease(provider); +// CFRelease(context); +// CFRelease(outputContext); + + UIColor *pureColor = [UIColor whiteColor]; // 设置图片的纯色为红色 + + // 开始图形上下文 + UIGraphicsBeginImageContextWithOptions(sourceImage.size, NO, 0.0); + + // 使用纯色填充图形上下文 + [pureColor setFill]; + UIRectFill(CGRectMake(0, 0, sourceImage.size.width, sourceImage.size.height)); + + // 从图形上下文获取图片 + UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext(); + + // 结束图形上下文 + UIGraphicsEndImageContext(); + + + return resultImage; +} + +@end diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/view/ImageEditDrawView.h b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/view/ImageEditDrawView.h new file mode 100644 index 0000000..3acbac7 --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/view/ImageEditDrawView.h @@ -0,0 +1,17 @@ +// +// ImageEditDrawView.h +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface ImageEditDrawView : UIView +@property (nonatomic , strong) NSArray *arrImages; +-(NSMutableArray *)getAllEditImages; +@end + +NS_ASSUME_NONNULL_END diff --git a/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/view/ImageEditDrawView.m b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/view/ImageEditDrawView.m new file mode 100644 index 0000000..94fff0b --- /dev/null +++ b/ProductApp/ProductApp/ProductMain/首页/自定义相机/ImageEditDraw/view/ImageEditDrawView.m @@ -0,0 +1,234 @@ +// +// ImageEditDrawView.m +// ProductApp +// +// Created by 工作 on 2024/11/18. +// + +#import "ImageEditDrawView.h" +#import "MosaiView.h" + + +#define headerViewHeight 45 +#define footViewHeight TabHeight+20 + +@interface ImageEditDrawView () + +/// +@property (nonatomic , strong) UIScrollView *mainScrollView;; + +@property (nonatomic,strong)MosaiView * mosaicView; + +/// +@property (nonatomic , strong) UIButton *btlast; +@property (nonatomic , strong) UIButton *btnext; + +@property (nonatomic , assign) int ipage; + +/// +@property (nonatomic , strong) NSMutableArray *arrdata; + +@end +@implementation ImageEditDrawView + +-(id)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + + [self createwithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT - footViewHeight-NavHeight)]; + + + UIView *viewbottom = [[UIView alloc] init]; + [viewbottom setBackgroundColor:[UIColor whiteColor]]; + [self addSubview:viewbottom]; + [viewbottom mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.equalTo(self); + make.height.offset(footViewHeight); + }]; + [self drawBottomView:viewbottom]; + + } + return self; +} + +-(void)drawBottomView:(UIView *)view +{ + UIButton *btlast = [[UIButton alloc] init]; + [btlast setTitle:@"上一张" forState:UIControlStateNormal]; + [btlast setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [btlast.titleLabel setFont:[UIFont systemFontOfSize:15]]; + [btlast.layer setMasksToBounds:YES]; + [btlast.layer setCornerRadius:6]; + [btlast setBackgroundColor:RGBCOLOR(0, 184, 156)]; + [view addSubview:btlast]; + [btlast mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.offset(12); + make.top.offset(10); + make.height.offset(45); + make.width.offset(80); + }]; + [btlast addTarget:self action:@selector(lastAction) forControlEvents:UIControlEventTouchUpInside]; + _btlast = btlast; + + UIButton *btnext = [[UIButton alloc] init]; + [btnext setTitle:@"下一张" forState:UIControlStateNormal]; + [btnext setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [btnext.titleLabel setFont:[UIFont systemFontOfSize:15]]; + [btnext.layer setMasksToBounds:YES]; + [btnext.layer setCornerRadius:6]; + [btnext setBackgroundColor:RGBCOLOR(0, 184, 156)]; + [view addSubview:btnext]; + [btnext mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(view).offset(-12); + make.top.width.height.equalTo(btlast); + }]; + [btnext addTarget:self action:@selector(nextAction) forControlEvents:UIControlEventTouchUpInside]; + _btnext = btnext; + + UIButton *btcancle = [[UIButton alloc] init]; + [btcancle setTitle:@"撤销" forState:UIControlStateNormal]; + [btcancle setTitleColor:RGBCOLOR(51, 51, 51) forState:UIControlStateNormal]; + [btcancle.titleLabel setFont:[UIFont systemFontOfSize:15]]; + [view addSubview:btcancle]; + [btcancle mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(view); + make.centerY.equalTo(btlast); + make.height.offset(40); + make.width.offset(60); + }]; + [btcancle addTarget:self action:@selector(chexiaoAction) forControlEvents:UIControlEventTouchUpInside]; + +} + +-(void)setArrImages:(NSArray *)arrImages +{ + _arrImages = arrImages; + if(self.arrImages.count==0)return; + + self.arrdata = [NSMutableArray new]; + [self.arrdata addObjectsFromArray:self.arrImages]; + + if(self.arrdata.count>0) + { + [self.btlast setBackgroundColor:RGBCOLOR(200, 200, 200)]; + self.ipage=0; + [self setMosaicsView:self.arrdata[0]]; + } + if(self.arrImages.count==1) + { + [self.btlast setBackgroundColor:RGBCOLOR(200, 200, 200)]; + [self.btnext setBackgroundColor:RGBCOLOR(200, 200, 200)]; + } +} + +-(void)lastAction +{ + if(self.ipage<=0)return; + self.arrdata[self.ipage]=self.mosaicView.resultImage; + self.ipage-=1; + [self setMosaicsView:self.arrdata[self.ipage]]; + if(self.ipage==0) + { + [self.btlast setBackgroundColor:RGBCOLOR(200, 200, 200)]; + } + if(self.ipage=self.arrdata.count-1)return; + self.arrdata[self.ipage]=self.mosaicView.resultImage; + self.ipage+=1; + [self setMosaicsView:self.arrdata[self.ipage]]; + if(self.ipage>=self.arrdata.count-1) + { + [self.btnext setBackgroundColor:RGBCOLOR(200, 200, 200)]; + } + if(self.ipage>0) + { + [self.btlast setBackgroundColor:RGBCOLOR(0, 184, 156)]; + } +} + +-(void)chexiaoAction +{ + [self.mosaicView undo]; +} + +/** + 创建马赛克画板 + @param frame 画板frame + */ +- (void)createwithFrame:(CGRect)frame { + if (self.mainScrollView != nil) { + [self.mainScrollView removeFromSuperview]; + self.mainScrollView = nil; + } + self.mainScrollView = [[UIScrollView alloc] initWithFrame:frame]; + +// self.mainScrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + self.mainScrollView.showsHorizontalScrollIndicator = NO; + self.mainScrollView.showsVerticalScrollIndicator = NO; + self.mainScrollView.delegate = self; + self.mainScrollView.clipsToBounds = NO; +// self.mainScrollView.y = frame.origin.y; + [self addSubview:self.mainScrollView]; + + + self.mainScrollView.maximumZoomScale = 2.0; + self.mainScrollView.minimumZoomScale = 1; + self.mainScrollView.panGestureRecognizer.minimumNumberOfTouches = 2; + self.mainScrollView.panGestureRecognizer.delaysTouchesBegan = NO; + self.mainScrollView.pinchGestureRecognizer.delaysTouchesBegan = NO; +} + +-(void)setMosaicsView:(UIImage *)image +{ + if(self.mosaicView) + { + [self.mosaicView removeFromSuperview]; + } + CGFloat img_Width = (image.size.width * self.mainScrollView.height)/image.size.height; + CGRect showRect = CGRectMake(0, 0, img_Width, self.mainScrollView.height); + if (image.size.width > image.size.height) { + CGFloat img_Height = (image.size.height * self.mainScrollView.width)/image.size.width; + showRect = CGRectMake(0, 0, self.mainScrollView.width,img_Height); + showRect.origin.y = (self.mainScrollView.height - img_Height)*0.5; + } + + + self.mosaicView = [[MosaiView alloc] initWithFrame:showRect]; + self.mosaicView.centerX = self.mainScrollView.width * 0.5; + self.mosaicView.deleagate = self; + self.mosaicView.originalImage = image;//原图 + self.mosaicView.mosaicImage = image;//马赛克图 + [self.mainScrollView addSubview:self.mosaicView]; +} +#pragma mark -UIScrollViewDelegate +- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView +{ + return self.mosaicView; +} + +- (void)scrollViewDidZoom:(UIScrollView *)scrollView +{ + CGFloat Ws = self.mainScrollView.frame.size.width - self.mainScrollView.contentInset.left - self.mainScrollView.contentInset.right; + CGFloat Hs = self.mainScrollView.frame.size.height - self.mainScrollView.contentInset.top - self.mainScrollView.contentInset.bottom; + CGFloat W = self.mainScrollView.frame.size.width; + CGFloat H = self.mainScrollView.frame.size.height; + + CGRect rct = self.mosaicView.frame; + rct.origin.x = MAX((Ws-W)/2, (UISCREEN_WIDTH - self.mosaicView.width)*0.5); + rct.origin.y = MAX((Hs-H)/2, (self.mainScrollView.height - self.mosaicView.height)*0.5); + self.mosaicView.frame = rct; +} + +-(NSMutableArray *)getAllEditImages +{ + return self.arrdata; +} +@end