聊天室绘制动态回答的问题

This commit is contained in:
pengguangjian 2024-10-29 18:26:27 +08:00
parent ca56711ef2
commit 331ecc3ebf
85 changed files with 3119 additions and 187 deletions

View File

@ -76,6 +76,18 @@
CA11ED742CA69AC600209DFC /* GaiXieRunSeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA11ED732CA69AC600209DFC /* GaiXieRunSeViewController.m */; };
CA11ED782CA69B5200209DFC /* GaiXieRunSeView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA11ED772CA69B5200209DFC /* GaiXieRunSeView.m */; };
CA11ED7D2CA6B0DE00209DFC /* XieZuoFenXiangAlterView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA11ED7C2CA6B0DE00209DFC /* XieZuoFenXiangAlterView.m */; };
CA22D1BF2CD071C700CA7E93 /* WriteSaveHestoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1BE2CD071C700CA7E93 /* WriteSaveHestoryModel.m */; };
CA22D1C32CD078C300CA7E93 /* XieZuoJiLuXiangQingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1C22CD078C300CA7E93 /* XieZuoJiLuXiangQingViewController.m */; };
CA22D1C72CD0790200CA7E93 /* XieZuoJiLuXiangQingView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1C62CD0790200CA7E93 /* XieZuoJiLuXiangQingView.m */; };
CA22D1CA2CD07D9100CA7E93 /* CorrectSaveModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1C92CD07D9100CA7E93 /* CorrectSaveModel.m */; };
CA22D1CD2CD0829300CA7E93 /* CorrectSaveDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1CC2CD0829300CA7E93 /* CorrectSaveDetailModel.m */; };
CA22D1D02CD091AF00CA7E93 /* PicAiSaveDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1CF2CD091AF00CA7E93 /* PicAiSaveDetailModel.m */; };
CA22D1D32CD0AF4100CA7E93 /* TextStarModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1D22CD0AF4100CA7E93 /* TextStarModel.m */; };
CA22D1D62CD0B86900CA7E93 /* ExampleTextTypeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1D52CD0B86900CA7E93 /* ExampleTextTypeModel.m */; };
CA22D1DA2CD0C44700CA7E93 /* FanWenSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1D92CD0C44700CA7E93 /* FanWenSearchViewController.m */; };
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 */; };
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 */; };
@ -645,6 +657,30 @@
CA11ED772CA69B5200209DFC /* GaiXieRunSeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GaiXieRunSeView.m; sourceTree = "<group>"; };
CA11ED7B2CA6B0DE00209DFC /* XieZuoFenXiangAlterView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XieZuoFenXiangAlterView.h; sourceTree = "<group>"; };
CA11ED7C2CA6B0DE00209DFC /* XieZuoFenXiangAlterView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XieZuoFenXiangAlterView.m; sourceTree = "<group>"; };
CA22D1BD2CD071C700CA7E93 /* WriteSaveHestoryModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WriteSaveHestoryModel.h; sourceTree = "<group>"; };
CA22D1BE2CD071C700CA7E93 /* WriteSaveHestoryModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WriteSaveHestoryModel.m; sourceTree = "<group>"; };
CA22D1C12CD078C300CA7E93 /* XieZuoJiLuXiangQingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XieZuoJiLuXiangQingViewController.h; sourceTree = "<group>"; };
CA22D1C22CD078C300CA7E93 /* XieZuoJiLuXiangQingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XieZuoJiLuXiangQingViewController.m; sourceTree = "<group>"; };
CA22D1C52CD0790200CA7E93 /* XieZuoJiLuXiangQingView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XieZuoJiLuXiangQingView.h; sourceTree = "<group>"; };
CA22D1C62CD0790200CA7E93 /* XieZuoJiLuXiangQingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XieZuoJiLuXiangQingView.m; sourceTree = "<group>"; };
CA22D1C82CD07D9100CA7E93 /* CorrectSaveModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CorrectSaveModel.h; sourceTree = "<group>"; };
CA22D1C92CD07D9100CA7E93 /* CorrectSaveModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CorrectSaveModel.m; sourceTree = "<group>"; };
CA22D1CB2CD0829300CA7E93 /* CorrectSaveDetailModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CorrectSaveDetailModel.h; sourceTree = "<group>"; };
CA22D1CC2CD0829300CA7E93 /* CorrectSaveDetailModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CorrectSaveDetailModel.m; sourceTree = "<group>"; };
CA22D1CE2CD091AF00CA7E93 /* PicAiSaveDetailModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PicAiSaveDetailModel.h; sourceTree = "<group>"; };
CA22D1CF2CD091AF00CA7E93 /* PicAiSaveDetailModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PicAiSaveDetailModel.m; sourceTree = "<group>"; };
CA22D1D12CD0AF4100CA7E93 /* TextStarModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextStarModel.h; sourceTree = "<group>"; };
CA22D1D22CD0AF4100CA7E93 /* TextStarModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TextStarModel.m; sourceTree = "<group>"; };
CA22D1D42CD0B86900CA7E93 /* ExampleTextTypeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExampleTextTypeModel.h; sourceTree = "<group>"; };
CA22D1D52CD0B86900CA7E93 /* ExampleTextTypeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleTextTypeModel.m; sourceTree = "<group>"; };
CA22D1D82CD0C44700CA7E93 /* FanWenSearchViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FanWenSearchViewController.h; sourceTree = "<group>"; };
CA22D1D92CD0C44700CA7E93 /* FanWenSearchViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FanWenSearchViewController.m; sourceTree = "<group>"; };
CA22D1DC2CD0C77B00CA7E93 /* FanWenSearchView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FanWenSearchView.h; sourceTree = "<group>"; };
CA22D1DD2CD0C77B00CA7E93 /* FanWenSearchView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FanWenSearchView.m; sourceTree = "<group>"; };
CA22D1DF2CD0C7F300CA7E93 /* FanWenSearchHestoryView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FanWenSearchHestoryView.h; sourceTree = "<group>"; };
CA22D1E02CD0C7F300CA7E93 /* FanWenSearchHestoryView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FanWenSearchHestoryView.m; sourceTree = "<group>"; };
CA22D1E22CD0D7B200CA7E93 /* ChatRoomTipsModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChatRoomTipsModel.h; sourceTree = "<group>"; };
CA22D1E32CD0D7B200CA7E93 /* ChatRoomTipsModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChatRoomTipsModel.m; sourceTree = "<group>"; };
CA38684B2CC1F66E009C98B0 /* LoginAppleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginAppleView.h; sourceTree = "<group>"; };
CA38684C2CC1F66E009C98B0 /* LoginAppleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginAppleView.m; sourceTree = "<group>"; };
CA38684D2CC1F66E009C98B0 /* LoginTelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginTelView.h; sourceTree = "<group>"; };
@ -1753,6 +1789,7 @@
CA0D08622CA548A50086855E /* 写作 */ = {
isa = PBXGroup;
children = (
CA22D1C02CD078AD00CA7E93 /* 详情 */,
CA0D086E2CA54D350086855E /* cell */,
CA0D08652CA548E50086855E /* ShouYeLiShiJiLuXZTableViewController.h */,
CA0D08662CA548E50086855E /* ShouYeLiShiJiLuXZTableViewController.m */,
@ -1932,14 +1969,14 @@
path = view;
sourceTree = "<group>";
};
CA11ED712CA69AAF00209DFC /* 改写润色 */ = {
CA11ED712CA69AAF00209DFC /* 改写润色(未使用) */ = {
isa = PBXGroup;
children = (
CA11ED752CA69B4500209DFC /* view */,
CA11ED722CA69AC600209DFC /* GaiXieRunSeViewController.h */,
CA11ED732CA69AC600209DFC /* GaiXieRunSeViewController.m */,
);
path = "改写润色";
path = "改写润色(未使用)";
sourceTree = "<group>";
};
CA11ED752CA69B4500209DFC /* view */ = {
@ -1974,6 +2011,46 @@
path = "写作分享";
sourceTree = "<group>";
};
CA22D1C02CD078AD00CA7E93 /* 详情 */ = {
isa = PBXGroup;
children = (
CA22D1C42CD078F200CA7E93 /* view */,
CA22D1C12CD078C300CA7E93 /* XieZuoJiLuXiangQingViewController.h */,
CA22D1C22CD078C300CA7E93 /* XieZuoJiLuXiangQingViewController.m */,
);
path = "详情";
sourceTree = "<group>";
};
CA22D1C42CD078F200CA7E93 /* view */ = {
isa = PBXGroup;
children = (
CA22D1C52CD0790200CA7E93 /* XieZuoJiLuXiangQingView.h */,
CA22D1C62CD0790200CA7E93 /* XieZuoJiLuXiangQingView.m */,
);
path = view;
sourceTree = "<group>";
};
CA22D1D72CD0C43600CA7E93 /* 搜索 */ = {
isa = PBXGroup;
children = (
CA22D1DB2CD0C77100CA7E93 /* view */,
CA22D1D82CD0C44700CA7E93 /* FanWenSearchViewController.h */,
CA22D1D92CD0C44700CA7E93 /* FanWenSearchViewController.m */,
);
path = "搜索";
sourceTree = "<group>";
};
CA22D1DB2CD0C77100CA7E93 /* view */ = {
isa = PBXGroup;
children = (
CA22D1DC2CD0C77B00CA7E93 /* FanWenSearchView.h */,
CA22D1DD2CD0C77B00CA7E93 /* FanWenSearchView.m */,
CA22D1DF2CD0C7F300CA7E93 /* FanWenSearchHestoryView.h */,
CA22D1E02CD0C7F300CA7E93 /* FanWenSearchHestoryView.m */,
);
path = view;
sourceTree = "<group>";
};
CA3868532CC1F66E009C98B0 /* view */ = {
isa = PBXGroup;
children = (
@ -2822,7 +2899,7 @@
CAB0D3722CAA47CF009BF67D /* 智能写作 */,
CAA600CE2CA9470800026CF4 /* 课堂写作 */,
CA11ED7A2CA6B0BA00209DFC /* 写作分享 */,
CA11ED712CA69AAF00209DFC /* 改写润色 */,
CA11ED712CA69AAF00209DFC /* 改写润色(未使用) */,
CA0D08802CA568120086855E /* 自定义相机 */,
CA0D085E2CA547B60086855E /* 历史记录 */,
CA0D083E2CA52F680086855E /* 切换身份 */,
@ -2836,6 +2913,7 @@
CABA145B2C9D0AF7002CB3B1 /* 范文 */ = {
isa = PBXGroup;
children = (
CA22D1D72CD0C43600CA7E93 /* 搜索 */,
CAF2BC7E2CCF8D1100028275 /* 范文搜索列表 */,
CA6B97132CBCBCA4000213F3 /* 详情 */,
CA6B970F2CBCAC01000213F3 /* cell */,
@ -3087,6 +3165,20 @@
CA6D547F2CCBA3C2001B530A /* WriteCorrectScoreModel.m */,
CAF2BC7B2CCF7F7800028275 /* TextbookModel.h */,
CAF2BC7C2CCF7F7800028275 /* TextbookModel.m */,
CA22D1BD2CD071C700CA7E93 /* WriteSaveHestoryModel.h */,
CA22D1BE2CD071C700CA7E93 /* WriteSaveHestoryModel.m */,
CA22D1C82CD07D9100CA7E93 /* CorrectSaveModel.h */,
CA22D1C92CD07D9100CA7E93 /* CorrectSaveModel.m */,
CA22D1CB2CD0829300CA7E93 /* CorrectSaveDetailModel.h */,
CA22D1CC2CD0829300CA7E93 /* CorrectSaveDetailModel.m */,
CA22D1CE2CD091AF00CA7E93 /* PicAiSaveDetailModel.h */,
CA22D1CF2CD091AF00CA7E93 /* PicAiSaveDetailModel.m */,
CA22D1D12CD0AF4100CA7E93 /* TextStarModel.h */,
CA22D1D22CD0AF4100CA7E93 /* TextStarModel.m */,
CA22D1D42CD0B86900CA7E93 /* ExampleTextTypeModel.h */,
CA22D1D52CD0B86900CA7E93 /* ExampleTextTypeModel.m */,
CA22D1E22CD0D7B200CA7E93 /* ChatRoomTipsModel.h */,
CA22D1E32CD0D7B200CA7E93 /* ChatRoomTipsModel.m */,
);
path = models;
sourceTree = "<group>";
@ -4564,6 +4656,7 @@
CA4257982CA2914100A36A10 /* StartZNPPTHUDAlter.m in Sources */,
CA6B97222CBCEB56000213F3 /* AIChatArcView.m in Sources */,
CA5D03602CC0DE8D007B3BA5 /* YaoQingGZView.m in Sources */,
CA22D1C72CD0790200CA7E93 /* XieZuoJiLuXiangQingView.m in Sources */,
CAF76E912CBE663000825E5E /* GongJuCreateSelectView.m in Sources */,
CB489F7C2744A0BD00DA044A /* RSAEncrypt.m in Sources */,
CAF2BC7D2CCF7F7800028275 /* TextbookModel.m in Sources */,
@ -4589,6 +4682,7 @@
CAC8063E2CA10B1600C21AA7 /* StartZWPIViewController.m in Sources */,
CA11ED7D2CA6B0DE00209DFC /* XieZuoFenXiangAlterView.m in Sources */,
CA6D54802CCBA3C2001B530A /* WriteCorrectScoreModel.m in Sources */,
CA22D1DA2CD0C44700CA7E93 /* FanWenSearchViewController.m in Sources */,
CAC806732CA171ED00C21AA7 /* StartPZXZPageView.m in Sources */,
CA5D02AB2CC0B2DE007B3BA5 /* SetTableViewCell.m in Sources */,
CA6B971A2CBCBD56000213F3 /* FanWenDetailView.m in Sources */,
@ -4610,6 +4704,7 @@
CA4257952CA2671400A36A10 /* StartZNPPTCell.m in Sources */,
CABA14CC2C9D4395002CB3B1 /* NSData+PEHIExtension.m in Sources */,
CAF76E662CBE01F100825E5E /* AIChatYuYinBackView.m in Sources */,
CA22D1D02CD091AF00CA7E93 /* PicAiSaveDetailModel.m in Sources */,
CA0C3AA22CB4DBB900E01A72 /* DuanLuoXieZuoView.m in Sources */,
CA0D08542CA543370086855E /* ShouYeLSZWPGTableViewCell.m in Sources */,
CABA14EB2C9D7AB2002CB3B1 /* StartKeTangXieZuoView.m in Sources */,
@ -4642,6 +4737,7 @@
CAC8065C2CA1449E00C21AA7 /* StartZNXZKeysViewController.m in Sources */,
CA5D035F2CC0DE8D007B3BA5 /* YaoQingERView.m in Sources */,
CAB0D3872CAA5693009BF67D /* TiCaiAlterTableViewCell.m in Sources */,
CA22D1DE2CD0C77B00CA7E93 /* FanWenSearchView.m in Sources */,
CA6B97342CBD1FA0000213F3 /* AIChaAnswerView.m in Sources */,
CA0FD6A42CA8FF5C009A4417 /* FXWDPFView.m in Sources */,
CA8181992C9E77FB00EE7E6E /* DownJDLoadView.m in Sources */,
@ -4678,12 +4774,14 @@
CABD8C892CBF9198009A5E5E /* GongJuWenBenViewController.m in Sources */,
CB489FB02744A0BD00DA044A /* FSActionSheet.m in Sources */,
CB489F652744A0BD00DA044A /* DAYComponentView.m in Sources */,
CA22D1CD2CD0829300CA7E93 /* CorrectSaveDetailModel.m in Sources */,
CB489FAC2744A0BD00DA044A /* XLPhotoBrowser.m in Sources */,
CB489F522744A0BD00DA044A /* PlayAudio.m in Sources */,
CA0D08492CA534ED0086855E /* ShouYeShenFenCollectionViewCell.m in Sources */,
CA5D03662CC0DE8D007B3BA5 /* YouHuiQuanDuiHuanListView.m in Sources */,
CA0C3AAD2CB4FF0300E01A72 /* DuanLuoXieZuoQWView.m in Sources */,
CAB0F3642CAA8523003B0C39 /* XieZuoXiangQingView.m in Sources */,
CA22D1E12CD0C7F300CA7E93 /* FanWenSearchHestoryView.m in Sources */,
CB489F662744A0BD00DA044A /* DAYUtils.m in Sources */,
CA4257B22CA2BB8500A36A10 /* StartPayViewController.m in Sources */,
CB489F6A2744A0BD00DA044A /* UILabel+PGGLabText.m in Sources */,
@ -4732,6 +4830,7 @@
CB489F9B2744A0BD00DA044A /* YSAPIClient.m in Sources */,
CB489F822744A0BD00DA044A /* NSData+Base64.m in Sources */,
CA3868692CC211FE009C98B0 /* LoadAlterView.m in Sources */,
CA22D1D62CD0B86900CA7E93 /* ExampleTextTypeModel.m in Sources */,
CB489FA62744A0BD00DA044A /* ZJScrollSegmentView.m in Sources */,
CA5D035D2CC0DE8D007B3BA5 /* TiXianViewController.m in Sources */,
CA0D08332CA4FFB90086855E /* ShouYeBannerTableViewCell.m in Sources */,
@ -4806,6 +4905,8 @@
CA5D03282CC0DDF0007B3BA5 /* PayPublicYouHuiLogListView.m in Sources */,
CABD8CA32CBFA787009A5E5E /* GongJuImageToTextViewController.m in Sources */,
CAF76E632CBDFF8500825E5E /* AIChatYuYinView.m in Sources */,
CA22D1D32CD0AF4100CA7E93 /* TextStarModel.m in Sources */,
CA22D1BF2CD071C700CA7E93 /* WriteSaveHestoryModel.m in Sources */,
CA9CFF772CCA457400C3E90E /* XieZuoSaveAlterView.m in Sources */,
CA8181AD2C9EB95700EE7E6E /* StartKTXZPGDetailZHView.m in Sources */,
CA5D02E42CC0DD6B007B3BA5 /* ActivityCouponModel.m in Sources */,
@ -4852,6 +4953,7 @@
CA0FD6932CA8EEF3009A4417 /* XieZuoFenXiangAlterNOTableViewCell.m in Sources */,
CA487D9B2CA40D3A00AE773B /* StartPayGoodsPayView.m in Sources */,
CABD8C792CBF6AC4009A5E5E /* GongJuCreateResultViewController.m in Sources */,
CA22D1CA2CD07D9100CA7E93 /* CorrectSaveModel.m in Sources */,
CAC8066C2CA16DCC00C21AA7 /* StartPZXZViewController.m in Sources */,
CB489F722744A0BD00DA044A /* MCTabBarController.m in Sources */,
CABD8CAB2CBFB39F009A5E5E /* GongJuMinGanCiController.m in Sources */,
@ -4862,6 +4964,7 @@
CABA147B2C9D17C3002CB3B1 /* StartNJViewController.m in Sources */,
CB489F732744A0BD00DA044A /* BaseViewController.m in Sources */,
CA5D02732CC09D4E007B3BA5 /* WoDeView.m in Sources */,
CA22D1E42CD0D7B200CA7E93 /* ChatRoomTipsModel.m in Sources */,
CB489FA42744A0BD00DA044A /* ZJCollectionView.m in Sources */,
CA0C3A922CB4D03B00E01A72 /* ChongXieYiPianViewController.m in Sources */,
CABD8C912CBF9741009A5E5E /* GongJuFanYiViewController.m in Sources */,
@ -4876,6 +4979,7 @@
CB489F572744A0BD00DA044A /* AudioRecored.m in Sources */,
CA5D02BA2CC0B77D007B3BA5 /* QuanXianGuanLiViewController.m in Sources */,
CA0C3AA92CB4FE6300E01A72 /* DuanLuoXieZuoQWViewController.m in Sources */,
CA22D1C32CD078C300CA7E93 /* XieZuoJiLuXiangQingViewController.m in Sources */,
CA0D083D2CA50F480086855E /* ShouYeZuoWenTableViewCell.m in Sources */,
CA8181B32C9EB96F00EE7E6E /* StartKTXZPGDetailXZView.m in Sources */,
CA0C3AB52CB5061500E01A72 /* ZhiNengPPTView.m in Sources */,

View File

@ -116,5 +116,67 @@
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "EC064E0C-A664-4402-82EA-C5D8E23079FF"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ProductApp/ProductMain/AIChart/AIChatViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "273"
endingLineNumber = "273"
landmarkName = "-getSseValue:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "A7B72150-FE2D-4D82-A2D8-53ED4C0BC8C8"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ProductApp/ProductMain/AIChart/cell/AIChatTextTableViewCell.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "297"
endingLineNumber = "297"
landmarkName = "-setModel:"
landmarkType = "7">
<Locations>
<Location
uuid = "A7B72150-FE2D-4D82-A2D8-53ED4C0BC8C8 - be6ca2d6d6189178"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "-[AIChatTextTableViewCell setModel:]"
moduleName = "ProductApp"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/gongzuo/Desktop/%E5%85%AC%E5%8F%B8GIT/%E6%9E%81%E5%85%89%E5%86%99%E4%BD%9C/ProductApp/ProductApp/ProductMain/AIChart/cell/AIChatTextTableViewCell.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "300"
endingLineNumber = "300">
</Location>
<Location
uuid = "A7B72150-FE2D-4D82-A2D8-53ED4C0BC8C8 - be6ca2d6d61896dd"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "-[AIChatTextTableViewCell setModel:]"
moduleName = "ProductApp"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/gongzuo/Desktop/%E5%85%AC%E5%8F%B8GIT/%E6%9E%81%E5%85%89%E5%86%99%E4%BD%9C/ProductApp/ProductApp/ProductMain/AIChart/cell/AIChatTextTableViewCell.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "297"
endingLineNumber = "297">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

View File

@ -25,6 +25,8 @@ NS_ASSUME_NONNULL_BEGIN
///
@property (nonatomic , strong) NSString *title;
@property (nonatomic , assign) BOOL isClostAnimation;
@end
NS_ASSUME_NONNULL_END

View File

@ -351,7 +351,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (NSNumber *)freeDiskSpaceInBytes;
///处理h5字体颜色 转换成富文本
+(NSMutableAttributedString *)applyCSS:(NSString *)text;
+(NSMutableAttributedString *)applyCSS:(NSString *)text stylealignment:(NSTextAlignment)stylealignment;
///创建二维码
+(UIImage *)CreateStrcode:(NSString *)strcode size:(CGFloat)f_width;
///将小写数字转换为大写

View File

@ -2021,7 +2021,7 @@ static dispatch_source_t _timer;
return [NSNumber numberWithFloat:freeSpace];
}
///h5
+(NSMutableAttributedString *)applyCSS:(NSString *)text {
+(NSMutableAttributedString *)applyCSS:(NSString *)text stylealignment:(NSTextAlignment)stylealignment {
NSArray *arrtemp = [text componentsSeparatedByString:@"<span style=\"color:red\">"];
NSMutableArray *arrsave = [NSMutableArray new];
[arrsave addObject:@{@"text":arrtemp[0],@"clolrType":@"0"}];
@ -2060,7 +2060,7 @@ static dispatch_source_t _timer;
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
style.lineSpacing = 5;
style.lineBreakMode = NSLineBreakByTruncatingTail;
style.alignment = NSTextAlignmentLeft;
style.alignment = stylealignment;
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:strLast];
[attrString addAttribute:NSForegroundColorAttributeName value:[UIColor blackColor] range:NSMakeRange(0, strLast.length)];

View File

@ -102,7 +102,10 @@
[self mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(fheight);
}];
self.backHeight(fheight,NO);
if(self.backHeight)
{
self.backHeight(fheight,YES);
}
});
}
else
@ -144,13 +147,19 @@
self.timer = nil;
[self.imgvb setHidden:YES];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.backHeight(self.height,YES);
if(self.backHeight)
{
self.backHeight(self.height,YES);
}
});
return;
}
if(self.inow+1>self.strValue.length)
{
self.backHeight(-1,NO);
if(self.backHeight)
{
self.backHeight(-1,NO);
}
return;
}
NSString *str = [self.strValue substringToIndex:self.inow];
@ -171,7 +180,10 @@
// [self mas_updateConstraints:^(MASConstraintMaker *make) {
// make.height.offset(fheight);
// }];
self.backHeight(fheight,NO);
if(self.backHeight)
{
self.backHeight(fheight,NO);
}
CGPoint point = [self boundingRectForLastCharacterInLabel:self.lbname];
if(point.x>0&&point.y>0)

View File

@ -8,15 +8,20 @@
#import "AIChatViewController.h"
#import "AIChatBottomView.h"
#import "AIChatTextTableViewCell.h"
#import "NetWorkManager.h"
#import "SSENetWorkManager.h"
@interface AIChatViewController ()<UITableViewDelegate,UITableViewDataSource>
///
@property (nonatomic , strong) UITableView *tableView;
///
@property (nonatomic , strong) AIChatBottomView *viewbottom;
///
@property (nonatomic , strong) NSMutableArray *arrdata;
///model
@property (nonatomic , strong) AIChatModel *modelDraw;
@end
@implementation AIChatViewController
@ -57,6 +62,7 @@
[viewbottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.bottom.width.equalTo(viewback);
}];
_viewbottom = viewbottom;
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
[tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
@ -71,47 +77,44 @@
_tableView = tableView;
[self getData];
[self getTiShiData];
}
-(void)getData
{
self.arrdata = [NSMutableArray new];
AIChatModel *model = [AIChatModel new];
model.messageType = 0;
model.text = @"你好我是你的AI助手有什么写作方面的问题都可以问我你看需要我在哪些方面帮助你呢";
model.isAnimation = NO;
[self.arrdata addObject:model];
AIChatModel *model1 = [AIChatModel new];
model1.messageType = 0;
model1.text = @"你好我是你的AI助手";
model1.isAnimation = NO;
[self.arrdata addObject:model1];
AIChatModel *model2 = [AIChatModel new];
model2.messageType = 2;
model2.text = @"";
model2.arrfunction = @[@"写作灵感",@"作文框架",@"语句扩写",@"作文开头",@"写作技巧",@"诗句名言"];
model2.isAnimation = NO;
[self.arrdata addObject:model2];
// AIChatModel *model3 = [AIChatModel new];
// model3.messageType = 1;
// model3.text = @"你好我是你的AI助手";
// model3.isAnimation = NO;
// model3.ismy = YES;
// [self.arrdata addObject:model3];
//
//
// AIChatModel *model4 = [AIChatModel new];
// model4.messageType = 3;
// model4.text = @"你对写作灵感有疑问,请参考以下方式向我提问:";
// model4.arrfunction = @[@"介绍一种事物的创作灵感",@"记一次游戏的写作灵感",@"如何从电影中获得写作启示"];
// model4.isAnimation = NO;
// [self.arrdata addObject:model4];
AIChatModel *model3 = [AIChatModel new];
model3.messageType = 1;
model3.text = @"你好我是你的AI助手";
model3.isAnimation = NO;
model3.ismy = YES;
[self.arrdata addObject:model3];
AIChatModel *model4 = [AIChatModel new];
model4.messageType = 3;
model4.text = @"你对写作灵感有疑问,请参考以下方式向我提问:";
model4.arrfunction = @[@"介绍一种事物的创作灵感",@"记一次游戏的写作灵感",@"如何从电影中获得写作启示"];
model4.isAnimation = NO;
[self.arrdata addObject:model4];
[self.tableView reloadData];
// [self.tableView reloadData];
}
-(void)scrollToBottom
{
dispatch_async(dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if(self.tableView.contentSize.height-self.tableView.height>0)
{
[self.tableView setContentOffset:CGPointMake(0, self.tableView.contentSize.height-self.tableView.height) animated:YES];
}
});
});
}
#pragma mark - UITableView
@ -131,6 +134,16 @@
}
cell.model = self.arrdata[indexPath.row];
[cell setBackValue:^(AIChatModel * _Nonnull model) {
[self.arrdata addObject:model];
[self.tableView reloadData];
if(model.isnetwork)
{
[self getSseValue:model.text];
}
[self scrollToBottom];
}];
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
@ -160,7 +173,16 @@
else if (model.messageType==3)
{///
fheight = [Tools getLabelHeightWithText:model.text width:UISCREEN_WIDTH-80 font:14 linHeight:0]+1;
fheight+=model.arrfunction.count*47+35;
int icount = 0;
for(NSString *strtemp in model.arrfunction)
{
if(icount>=3)break;
fheight += [Tools getLabelHeightWithText:strtemp width:UISCREEN_WIDTH-80-65 font:12 linHeight:0]+35;
icount++;
}
fheight+=35;
return fheight;
}
if([Tools getWidthWithText:strtext height:20 font:14]>UISCREEN_WIDTH-80)
@ -183,4 +205,81 @@
}
-(void)getTiShiData
{
[LoadAlterView show];
[NetWorkManager requestChatRoomTipsData:self.view Callback:^(BOOL state, ChatRoomTipsModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
self.viewbottom.arrdata = responseObject.data.items;
if(self.arrdata.count==0)
{
AIChatModel *model = [AIChatModel new];
model.messageType = 0;
model.text = @"你好我是你的AI助手有什么写作方面的问题都可以问我你看需要我在哪些方面帮助你呢";
model.isAnimation = NO;
[self.arrdata addObject:model];
AIChatModel *model2 = [AIChatModel new];
model2.messageType = 2;
model2.text = @"";
model2.arrfunction = responseObject.data.items;
model2.isAnimation = NO;
[self.arrdata addObject:model2];
///
[self.tableView reloadData];
}
}
}];
}
-(void)getSseValue:(NSString *)value
{
AIChatModel *modelDraw = [AIChatModel new];
modelDraw.isAnimation = YES;
self.modelDraw = modelDraw;
[self.arrdata addObject:self.modelDraw];
[self.tableView reloadData];
[self scrollToBottom];
// AIChatTextTableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"AIChatTextTableViewCell" forIndexPath:[NSIndexPath indexPathForRow:self.arrdata.count-1 inSection:0]];
NSInteger nowtime = [[NSDate date] timeIntervalSince1970];
NSDictionary *dicpush = @{@"chat_start_time":[NSString stringWithFormat:@"%ld",nowtime],
@"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) {
} backValue:^(NSString * _Nonnull value, BOOL isfinish) {
NSLog(@"%@",value);
if(value.length>4)
{
self.modelDraw.text = value;
NSIndexPath *indexpath = [NSIndexPath indexPathForRow:self.arrdata.count-1 inSection:0];
[self.tableView reloadRowsAtIndexPaths:@[indexpath] withRowAnimation:UITableViewRowAnimationFade];
[self scrollToBottom];
}
else
{
if(isfinish)
{
///
self.modelDraw.isWriteEnd = YES;
NSIndexPath *indexpath = [NSIndexPath indexPathForRow:self.arrdata.count-1 inSection:0];
[self.tableView reloadRowsAtIndexPaths:@[indexpath] withRowAnimation:UITableViewRowAnimationFade];
// [self.tableView reloadData];
}
}
} error:^(NSString * _Nonnull errorString) {
[HXHud showMessage:errorString afterDelayType:0];
} ID:^(NSString * _Nonnull value) {
}];
}
@end

View File

@ -9,9 +9,12 @@
#import "AIChatModel.h"
NS_ASSUME_NONNULL_BEGIN
typedef void(^AIChatTextTableViewCellBack)(AIChatModel *model);
@interface AIChatTextTableViewCell : UITableViewCell
///
@property (nonatomic , strong) AIChatModel *model;
///
@property (nonatomic , strong) AIChatTextTableViewCellBack backValue;
@end
NS_ASSUME_NONNULL_END

View File

@ -9,6 +9,7 @@
#import "AIChatArcView.h"
#import "AIChatFunctionView.h"
#import "AIChaAnswerView.h"
#import "ChatRoomTipsModel.h"
@interface AIChatTextTableViewCell ()
///
@ -90,17 +91,8 @@
make.right.equalTo(viewinfoLeft).offset(-15);
make.height.offset(10);
}];
lbvalueLeft.isWriteEnd = YES;
lbvalueLeft.isCloseAnimation = YES;
[lbvalueLeft setBackHeight:^(float fheight, BOOL isend) {
[self.viewinfoLeft mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(fheight+20);
}];
[self.viewinfoLeft setNeedsDisplay];
if(isend)
{
self.model.height = fheight+35;
}
}];
_lbvalueLeft = lbvalueLeft;
AIChatArcView *viewinforight = [AIChatArcView new];
@ -128,11 +120,14 @@
}];
lbvalueright.isCloseAnimation = YES;
[lbvalueright setBackHeight:^(float fheight, BOOL isend) {
[self.viewinforight mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(fheight+20);
}];
[self.viewinforight setNeedsDisplay];
if(fheight>0)
{
[self.viewinforight mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(fheight+20);
}];
[self.viewinforight setNeedsDisplay];
}
if(isend)
{
self.model.height = fheight+35;
@ -204,24 +199,61 @@
[self.viewinfoLeft setHidden:YES];
[self.functionView setHidden:NO];
self.functionView.arrdata = model.arrfunction;
AIChatFunctionView *functiontemp = self.functionView;
[functiontemp setBackValue:^(ChatRoomTipsModelDataItems * _Nonnull value) {
AIChatModel *modeltemp = [AIChatModel new];
modeltemp.text = value.title;
modeltemp.ismy = YES;
AIChatModel *modelhuida = [AIChatModel new];
modelhuida.messageType = 3;
modelhuida.text = [NSString stringWithFormat:@"你对%@有疑问,请参考以下方式向我提问:",value.title];
modelhuida.arrfunction = value.tips.select;
if(self.backValue)
{
self.backValue(modeltemp);
self.backValue(modelhuida);
}
}];
}
else if(model.messageType==3)
{
[self.answerView setHidden:NO];
self.answerView.strvalue = model.text;
self.answerView.arrdata = model.arrfunction;
AIChaAnswerView *answerviewtemp = self.answerView;
[answerviewtemp setBackValue:^(NSString * _Nonnull value) {
AIChatModel *modeltemp = [AIChatModel new];
modeltemp.text = value;
modeltemp.ismy = YES;
modeltemp.isnetwork = YES;
if(self.backValue)
{
self.backValue(modeltemp);
}
}];
[self.viewinfoLeft mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.offset(UISCREEN_WIDTH-40);
}];
[self.viewinfoLeft setNeedsDisplay];
float fheigh = [Tools getLabelHeightWithText:model.text width:UISCREEN_WIDTH-80 font:14 linHeight:0]+1;
fheigh+=model.arrfunction.count*47+35;
int icount = 0;
for(NSString *strtemp in model.arrfunction)
{
if(icount>=3)break;
fheigh += [Tools getLabelHeightWithText:strtemp width:UISCREEN_WIDTH-80-65 font:12 linHeight:0]+35;
icount++;
}
fheigh+=35;
[self.answerView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(fheigh-25);
}];
[self.viewinfoLeft mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(fheigh-15);
}];
@ -231,18 +263,38 @@
else
{
[self.lbvalueLeft setHidden:NO];
float f_width = [Tools getWidthWithText:model.text height:20 font:14]+41;
if(f_width>UISCREEN_WIDTH-40)
{
f_width = UISCREEN_WIDTH-40;
}
[self.viewinfoLeft mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.offset(f_width);
}];
ViewLable *lbwz = self.lbvalueLeft;
[lbwz setBackHeight:^(float fheight, BOOL isend) {
if(fheight>0)
{
[self.viewinfoLeft mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(fheight+20);
}];
[self.viewinfoLeft setNeedsDisplay];
}
if(isend)
{
self.model.height = fheight+35;
}
}];
self.lbvalueLeft.isCloseAnimation = !model.isAnimation;
self.lbvalueLeft.strValue = model.text;
self.lbvalueLeft.isWriteEnd = YES;
self.lbvalueLeft.isWriteEnd = model.isWriteEnd;
}
}

View File

@ -23,7 +23,7 @@
[self.contentView addSubview:viewback];
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(self);
make.height.offset(37);
make.bottom.equalTo(self).offset(-10);
}];
[viewback.layer setMasksToBounds:YES];
[viewback.layer setCornerRadius:12];
@ -33,12 +33,14 @@
[lbname setTextColor:RGBCOLOR(108, 119, 246)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont systemFontOfSize:12]];
[lbname setNumberOfLines:0];
[viewback addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(15);
make.centerY.equalTo(viewback);
make.right.equalTo(viewback).offset(-50);
}];
_lbname = lbname;
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"ai_cell_item_next"]];

View File

@ -8,12 +8,16 @@
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef void(^AIChaAnswerViewBack)(NSString *value);
@interface AIChaAnswerView : UIView
///
@property (nonatomic , strong) NSString *strvalue;
///
@property (nonatomic , strong) NSArray *arrdata;
///
@property (nonatomic , strong) AIChaAnswerViewBack backValue;
@end
NS_ASSUME_NONNULL_END

View File

@ -55,14 +55,23 @@
-(void)setArrdata:(NSArray *)arrdata
{
_arrdata = arrdata;
float fheight = 0.0;
int icount = 0;
for(NSString *strtemp in arrdata)
{
if(icount>=3)break;
fheight += [Tools getLabelHeightWithText:strtemp width:UISCREEN_WIDTH-80-65 font:12 linHeight:0]+35;
icount++;
}
[self.tableView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(47*self.arrdata.count);
make.height.offset(fheight);
}];
[self.tableView reloadData];
}
-(void)setStrvalue:(NSString *)strvalue
{
_strvalue = strvalue;
self.lbname.text = strvalue;
}
#pragma mark - UITableView
@ -94,7 +103,9 @@
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 47;
NSString *strtemp = self.arrdata[indexPath.row];
float fheight = [Tools getLabelHeightWithText:strtemp width:UISCREEN_WIDTH-80-65 font:12 linHeight:0]+35;
return fheight;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
@ -106,7 +117,10 @@
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(self.backValue)
{
self.backValue(self.arrdata[indexPath.row]);
}
}
@end

View File

@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface AIChatFunctionCollectionViewCell : UICollectionViewCell
///
@property (nonatomic , strong) NSString *strname;
@property (nonatomic , strong) NSString *strimageurl;
@end
NS_ASSUME_NONNULL_END

View File

@ -65,4 +65,8 @@
self.lbname.text = strname;
self.imgvback.image = [UIImage imageNamed:[NSString stringWithFormat:@"ai_%@",strname]];
}
-(void)setStrimageurl:(NSString *)strimageurl
{
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:[Tools isStringnil:strimageurl]] placeholderImage:nil];
}
@end

View File

@ -9,9 +9,14 @@
NS_ASSUME_NONNULL_BEGIN
@class ChatRoomTipsModelDataItems;
typedef void(^AIChatFunctionViewBack)(ChatRoomTipsModelDataItems *value);
@interface AIChatFunctionView : UIView
///
@property (nonatomic , strong) NSArray *arrdata;
///
@property (nonatomic , strong) AIChatFunctionViewBack backValue;
@end
NS_ASSUME_NONNULL_END

View File

@ -7,7 +7,7 @@
#import "AIChatFunctionView.h"
#import "AIChatFunctionCollectionViewCell.h"
#import "ChatRoomTipsModel.h"
@interface AIChatFunctionView ()<UICollectionViewDelegate,UICollectionViewDataSource>
///
@ -54,7 +54,9 @@
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
AIChatFunctionCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"AIChatFunctionCollectionViewCell" forIndexPath:indexPath];
cell.strname = self.arrdata[indexPath.row];
ChatRoomTipsModelDataItems *model = self.arrdata[indexPath.row];
cell.strname = [Tools isStringnilkong:model.title];
cell.strimageurl = model.image;
return cell;
}
//section
@ -78,6 +80,10 @@
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
///
if(self.backValue)
{
ChatRoomTipsModelDataItems *model = self.arrdata[indexPath.row];
self.backValue(model);
}
}
@end

View File

@ -10,21 +10,27 @@
NS_ASSUME_NONNULL_BEGIN
@interface AIChatModel : NSObject
///消息类型0文本 1语 2默认功能 3返回的提问列表
///消息类型0文本 1语 2默认功能 3返回的提问列表
@property (nonatomic , assign) int messageType;
///
@property (nonatomic , strong) NSString *text;
///语音链接(只有自己发的才有语音)
@property (nonatomic , strong) NSString *audioUrl;
///
/// ChatRoomTipsModelDataItems 或者 nsstring
@property (nonatomic , strong) NSArray *arrfunction;
///是否是我发的消息
@property (nonatomic , assign) BOOL ismy;
///动画写作使用
@property (nonatomic , assign) BOOL isAnimation;
///是否写入完成
@property (nonatomic , assign) BOOL isWriteEnd;
@property (nonatomic , assign) float height;
///是否需要去网络请求数据
@property (nonatomic , assign) BOOL isnetwork;
@end

View File

@ -10,7 +10,8 @@
NS_ASSUME_NONNULL_BEGIN
@interface AIChatBottomView : UIView
///
@property (nonatomic , strong) NSArray *arrdata;
@end
NS_ASSUME_NONNULL_END

View File

@ -9,12 +9,12 @@
#import "HuanGeSiLuCollectionViewCell.h"
#import "FSTextView.h"
#import "AIChatYuYinView.h"
#import "ChatRoomTipsModel.h"
@interface AIChatBottomView ()<UICollectionViewDelegate,UICollectionViewDataSource>
///
@property (nonatomic , strong) UICollectionView *collect;
///
@property (nonatomic , strong) NSArray *arrdata;
///
@property (nonatomic , strong) FSTextView *viewtext;
///
@ -54,7 +54,6 @@
[collect registerClass:[HuanGeSiLuCollectionViewCell class] forCellWithReuseIdentifier:@"HuanGeSiLuCollectionViewCell"];
_collect = collect;
self.arrdata = @[@"写作灵感",@"写作题材",@"语句扩写",@"作文开头",@"写作技巧",@"诗句名言"];
FSTextView *viewtext = [[FSTextView alloc] init];
[viewtext setTextColor:RGBCOLOR(51, 51, 51)];
@ -210,21 +209,22 @@
if(self.viewtext.text.length>0)
{
[self.btsend setHidden:NO];
[self.viewtext becomeFirstResponder];
float fheight = [Tools getLabelHeightWithText:self.viewtext.text width:UISCREEN_WIDTH-55-60-16 font:14 linHeight:0]+20;
if(fheight<40)fheight=40;
if(fheight>96)fheight=96;
[self.btsend setHidden:NO];
[self.viewtext mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self).offset(-60);
make.height.offset(fheight);
}];
}
else
{
[self.btsend setHidden:YES];
}
[self.viewtext setHidden:NO];
[self.viewtext becomeFirstResponder];
float fheight = [Tools getLabelHeightWithText:self.viewtext.text width:UISCREEN_WIDTH-55-60-16 font:14 linHeight:0]+20;
if(fheight<40)fheight=40;
if(fheight>96)fheight=96;
[self.btsend setHidden:NO];
[self.viewtext mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self).offset(-60);
make.height.offset(fheight);
}];
}
}
@ -234,6 +234,11 @@
}
-(void)setArrdata:(NSArray *)arrdata
{
_arrdata = arrdata;
[self.collect reloadData];
}
#pragma mark - UICollectionView
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
@ -242,7 +247,9 @@
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
HuanGeSiLuCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"HuanGeSiLuCollectionViewCell" forIndexPath:indexPath];
cell.lbname.text = self.arrdata[indexPath.row];
ChatRoomTipsModelDataItems *model = self.arrdata[indexPath.row];
cell.lbname.text = [Tools isStringnilkong:model.title];
[cell.viewback.layer setCornerRadius:13];
return cell;

View File

@ -23,6 +23,13 @@
#import "CorrectWriteErrorModel.h"
#import "WriteCorrectScoreModel.h"
#import "TextbookModel.h"
#import "WriteSaveHestoryModel.h"
#import "CorrectSaveModel.h"
#import "CorrectSaveDetailModel.h"
#import "PicAiSaveDetailModel.h"
#import "TextStarModel.h"
#import "ExampleTextTypeModel.h"
#import "ChatRoomTipsModel.h"
NS_ASSUME_NONNULL_BEGIN
@ -210,7 +217,73 @@ NS_ASSUME_NONNULL_BEGIN
size:(NSString *)size
role_id:(NSString *)role_id
Callback:(completeModeBlock)callback;
#pragma mark - 写作记录
/*
/api/example/text/star
text_id
*/
+ (void)requestExampleTextStarData:(UIView *)view
text_id:(NSString *)text_id
Callback:(completeModeBlock)callback;
/*
/api/example/text/star
text_id
star
*/
+ (void)requestExampleTextStarAddData:(UIView *)view
text_id:(NSString *)text_id
star:(NSString *)star
Callback:(completeModeBlock)callback;
/*
/api/example/text/type
*/
+ (void)requestExampleTextTypeData:(UIView *)view
Callback:(completeModeBlock)callback;
/*
()
/api/example/text
page
type_id
role_id
topic
title
textbook_id
*/
+ (void)requestExampleTextData:(UIView *)view
page:(NSString *)page
type_id:(NSString *)type_id
role_id:(NSString *)role_id
topic:(NSString *)topic
title:(NSString *)title
textbook_id:(NSString *)textbook_id
Callback:(completeModeBlock)callback;
/*
/api/example/text/search
page
type_id
role_id
topic
title
textbook_id
*/
+ (void)requestExampleTextSearchData:(UIView *)view
page:(NSString *)page
type_id:(NSString *)type_id
role_id:(NSString *)role_id
topic:(NSString *)topic
title:(NSString *)title
textbook_id:(NSString *)textbook_id
Callback:(completeModeBlock)callback;
#pragma mark - 写作
/*
/api/write/save
@ -239,6 +312,21 @@ NS_ASSUME_NONNULL_BEGIN
info:(NSDictionary *)info
Callback:(completeModeBlock)callback;
/*
/api/write/save
*/
+ (void)requestWriteSaveHestoryData:(UIView *)view
Callback:(completeModeBlock)callback;
/*
/api/write/save
id
*/
+ (void)requestWriteSaveHestoryDelData:(UIView *)view
ID:(NSString *)ID
Callback:(completeModeBlock)callback;
#pragma mark - 拍照写作
/*
1
@ -282,6 +370,31 @@ NS_ASSUME_NONNULL_BEGIN
content:(NSString *)content
Callback:(completeModeBlock)callback;
/*
/api/pic/ai/save
*/
+ (void)requestPicAiSaveHestoryData:(UIView *)view
Callback:(completeModeBlock)callback;
/*
/api/pic/ai/save
id
*/
+ (void)requestPicAiSaveDelData:(UIView *)view
ID:(NSString *)ID
Callback:(completeModeBlock)callback;
/*
/api/pic/ai/save/detail
id
*/
+ (void)requestPicAiSaveDetailData:(UIView *)view
ID:(NSString *)ID
Callback:(completeModeBlock)callback;
#pragma mark - 作文批改
/*
{
@ -369,6 +482,31 @@ NS_ASSUME_NONNULL_BEGIN
ID:(NSString *)ID
Callback:(completeModeBlock)callback;
/*
/api/correct/save
*/
+ (void)requestCorrectSaveHestoryData:(UIView *)view
Callback:(completeModeBlock)callback;
/*
/api/correct/save/detail
id
*/
+ (void)requestCorrectSaveDetailData:(UIView *)view
ID:(NSString *)ID
Callback:(completeModeBlock)callback;
/*
/api/correct/save
id
*/
+ (void)requestCorrectSaveDelData:(UIView *)view
ID:(NSString *)ID
Callback:(completeModeBlock)callback;
#pragma mark - 课堂写作
/*
@ -395,6 +533,16 @@ NS_ASSUME_NONNULL_BEGIN
textbook_id:(NSString *)textbook_id
Callback:(completeModeBlock)callback;
#pragma mark - 聊天室
/*
/api/chat/room/tips
*/
+ (void)requestChatRoomTipsData:(UIView *)view
Callback:(completeModeBlock)callback;
/*
key分组
/api/translate/language/key

View File

@ -660,6 +660,216 @@
}
}];
}
/*
/api/example/text/star
text_id
*/
+ (void)requestExampleTextStarData:(UIView *)view
text_id:(NSString *)text_id
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
[dicQuery setObject:[Tools isStringnil:text_id] forKey:@"text_id"];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/example/text/star" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[TextStarModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
/api/example/text/star
text_id
star
*/
+ (void)requestExampleTextStarAddData:(UIView *)view
text_id:(NSString *)text_id
star:(NSString *)star
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[dicpush setObject:[Tools isStringnil:text_id] forKey:@"text_id"];
[dicpush setObject:[Tools isStringnil:star] forKey:@"star"];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/example/text/star" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[BaseModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
/api/example/text/type
*/
+ (void)requestExampleTextTypeData:(UIView *)view
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/example/text/type" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[ExampleTextTypeModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
()
/api/example/text
page
type_id
role_id
topic
title
textbook_id
*/
+ (void)requestExampleTextData:(UIView *)view
page:(NSString *)page
type_id:(NSString *)type_id
role_id:(NSString *)role_id
topic:(NSString *)topic
title:(NSString *)title
textbook_id:(NSString *)textbook_id
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
[dicQuery setObject:[Tools isStringnil:page] forKey:@"page"];
[dicQuery setObject:[Tools isStringnil:type_id] forKey:@"type_id"];
[dicQuery setObject:[Tools isStringnil:role_id] forKey:@"role_id"];
[dicQuery setObject:[Tools isStringnil:[Tools stringEncode:topic]] forKey:@"topic"];
[dicQuery setObject:[Tools isStringnil:[Tools stringEncode:title]] forKey:@"title"];
[dicQuery setObject:[Tools isStringnil:textbook_id] forKey:@"textbook_id"];
[dicQuery setObject:[Tools stringEncode:@"score desc"] forKey:@"sort"];
[dicQuery setObject:@"20" forKey:@"size"];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/example/text" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[ExampleTextGreatModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
/api/example/text/search
page
type_id
role_id
topic
title
textbook_id
*/
+ (void)requestExampleTextSearchData:(UIView *)view
page:(NSString *)page
type_id:(NSString *)type_id
role_id:(NSString *)role_id
topic:(NSString *)topic
title:(NSString *)title
textbook_id:(NSString *)textbook_id
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
[dicQuery setObject:[Tools isStringnil:page] forKey:@"page"];
[dicQuery setObject:[Tools isStringnil:type_id] forKey:@"type_id"];
[dicQuery setObject:[Tools isStringnil:role_id] forKey:@"role_id"];
[dicQuery setObject:[Tools isStringnil:[Tools stringEncode:topic]] forKey:@"topic"];
[dicQuery setObject:[Tools isStringnil:[Tools stringEncode:title]] forKey:@"title"];
[dicQuery setObject:[Tools isStringnil:textbook_id] forKey:@"textbook_id"];
// [dicQuery setObject:[Tools stringEncode:@"score desc"] forKey:@"sort"];
[dicQuery setObject:@"20" forKey:@"size"];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/example/text/search" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[ExampleTextGreatModel yy_modelWithJSON:dicAll],describle);
}
}];
}
#pragma mark -
/*
@ -718,6 +928,73 @@
}];
}
/*
/api/write/save
*/
+ (void)requestWriteSaveHestoryData:(UIView *)view
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/write/save" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[WriteSaveHestoryModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
/api/write/save
id
*/
+ (void)requestWriteSaveHestoryDelData:(UIView *)view
ID:(NSString *)ID
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
[dicQuery setObject:[Tools isStringnil:ID] forKey:@"id"];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:4 url:@"api/write/save" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[BaseModel yy_modelWithJSON:dicAll],describle);
}
}];
}
#pragma mark -
/*
1
@ -844,6 +1121,108 @@
id (Body)
*/
/*
/api/pic/ai/save
*/
+ (void)requestPicAiSaveHestoryData:(UIView *)view
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/pic/ai/save" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[CorrectSaveModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
/api/pic/ai/save
id
*/
+ (void)requestPicAiSaveDelData:(UIView *)view
ID:(NSString *)ID
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
[dicQuery setObject:[Tools isStringnil:ID] forKey:@"id"];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:4 url:@"api/pic/ai/save" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[BaseModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
/api/pic/ai/save/detail
id
*/
+ (void)requestPicAiSaveDetailData:(UIView *)view
ID:(NSString *)ID
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
[dicQuery setObject:[Tools isStringnil:ID] forKey:@"id"];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/pic/ai/save/detail" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[PicAiSaveDetailModel yy_modelWithJSON:dicAll],describle);
}
}];
}
#pragma mark -
/*
{
@ -1049,6 +1428,108 @@
}];
}
/*
/api/correct/save
*/
+ (void)requestCorrectSaveHestoryData:(UIView *)view
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/correct/save" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[CorrectSaveModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
/api/correct/save/detail
id
*/
+ (void)requestCorrectSaveDetailData:(UIView *)view
ID:(NSString *)ID
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
[dicQuery setObject:[Tools isStringnil:ID] forKey:@"id"];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/correct/save/detail" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[CorrectSaveDetailModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
/api/correct/save
id
*/
+ (void)requestCorrectSaveDelData:(UIView *)view
ID:(NSString *)ID
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
[dicQuery setObject:[Tools isStringnil:ID] forKey:@"id"];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:4 url:@"api/correct/save" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[BaseModel yy_modelWithJSON:dicAll],describle);
}
}];
}
#pragma mark -
/*
@ -1131,6 +1612,39 @@
}
}];
}
#pragma mark -
/*
/api/chat/room/tips
*/
+ (void)requestChatRoomTipsData:(UIView *)view
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/chat/room/tips" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
BOOL state = NO;
NSString *describle = @"";
if (responseObject==nil) {
describle = @"网络错误";
BaseModel *model = [BaseModel new];
model.message =describle;
callback(state,model,describle);
}else{
NSDictionary *dicAll=responseObject;
describle = dicAll[@"message"];
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
state = YES;
}
callback(state,[ChatRoomTipsModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
key

View File

@ -0,0 +1,35 @@
//
// ChatRoomTipsModel.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@class ChatRoomTipsModelData,ChatRoomTipsModelDataItems,ChatRoomTipsModelDataItemsTips;
@interface ChatRoomTipsModel : BaseModel
///
@property (nonatomic , strong) ChatRoomTipsModelData *data;
@end
@interface ChatRoomTipsModelData : NSObject
///
@property (nonatomic , strong) NSArray *items;
@end
@interface ChatRoomTipsModelDataItems : NSObject
///
@property (nonatomic , strong) NSString *ID;
///
@property (nonatomic , strong) NSString *title;
///
@property (nonatomic , strong) NSString *image;
///
@property (nonatomic , strong) ChatRoomTipsModelDataItemsTips *tips;
@end
@interface ChatRoomTipsModelDataItemsTips : NSObject
///
@property (nonatomic , strong) NSArray *select;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,32 @@
//
// ChatRoomTipsModel.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "ChatRoomTipsModel.h"
@implementation ChatRoomTipsModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"data" : [ChatRoomTipsModelData class]};
}
@end
@implementation ChatRoomTipsModelData
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"items" : [ChatRoomTipsModelDataItems class]};
}
@end
@implementation ChatRoomTipsModelDataItems
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
{
return @{@"ID" : @"id"};
}
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"tips" : [ChatRoomTipsModelDataItemsTips class]};
}
@end
@implementation ChatRoomTipsModelDataItemsTips
@end

View File

@ -0,0 +1,39 @@
//
// CorrectSaveDetailModel.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@class CorrectSaveDetailModelData,CorrectSaveDetailModelDataResult;
@class WriteCorrectScoreModelData,CorrectWriteCorrectModelData;
@interface CorrectSaveDetailModel : BaseModel
///
@property (nonatomic , strong) CorrectSaveDetailModelData *data;
@end
@interface CorrectSaveDetailModelData : NSObject
///
@property (nonatomic , strong) NSString *ID;
///
@property (nonatomic , strong) CorrectSaveDetailModelDataResult *result;
///
@property (nonatomic , strong) NSString *create_time;
///
@property (nonatomic , strong) NSArray *images;
@end
@interface CorrectSaveDetailModelDataResult : NSObject
///句子
@property (nonatomic , strong) CorrectWriteCorrectModelData *write_correct;
///综合评分
@property (nonatomic , strong) WriteCorrectScoreModelData *write_correct_score;
///综合评价
@property (nonatomic , strong) NSString *write_correct_evaluate;
@end
//@interface CorrectSaveDetailModelDataResult : NSObject
//
//@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,32 @@
//
// CorrectSaveDetailModel.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "CorrectSaveDetailModel.h"
#import "CorrectWriteCorrectModel.h"
#import "WriteCorrectScoreModel.h"
@implementation CorrectSaveDetailModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"data" : [CorrectSaveDetailModelData class]};
}
@end
@implementation CorrectSaveDetailModelData
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
{
return @{@"ID" : @"id"};
}
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"result" : [CorrectSaveDetailModelDataResult class]};
}
@end
@implementation CorrectSaveDetailModelDataResult
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"write_correct" : [CorrectWriteCorrectModelData class],
@"write_correct_score" : [WriteCorrectScoreModelData class]};
}
@end

View File

@ -0,0 +1,44 @@
//
// CorrectSaveModel.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@class CorrectSaveModelData,CorrectSaveModelDataItem;
@interface CorrectSaveModel : BaseModel
///
@property (nonatomic , strong) CorrectSaveModelData *data;
@end
@interface CorrectSaveModelData : NSObject
///
@property (nonatomic , strong) NSArray *items;
@end
@interface CorrectSaveModelDataItem : NSObject
///
@property (nonatomic , strong) NSString *ID;
///
@property (nonatomic , strong) NSArray *images;
///
@property (nonatomic , strong) NSString *create_time;
///拍题的类型
@property (nonatomic , strong) NSString *scene;
/////
//@property (nonatomic , strong) NSString *value;
/////
//@property (nonatomic , strong) NSString *value;
/////
//@property (nonatomic , strong) NSString *value;
/////
//@property (nonatomic , strong) NSString *value;
/////
//@property (nonatomic , strong) NSString *value;
/////
//@property (nonatomic , strong) NSString *value;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,26 @@
//
// CorrectSaveModel.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "CorrectSaveModel.h"
@implementation CorrectSaveModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"data" : [CorrectSaveModelData class]};
}
@end
@implementation CorrectSaveModelData
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"items" : [CorrectSaveModelDataItem class]};
}
@end
@implementation CorrectSaveModelDataItem
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
{
return @{@"ID" : @"id"};
}
@end

View File

@ -0,0 +1,29 @@
//
// ExampleTextTypeModel.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@class ExampleTextTypeModelData,ExampleTextTypeModelDataItems;
@interface ExampleTextTypeModel : BaseModel
///
@property (nonatomic , strong) ExampleTextTypeModelData *data;
@end
@interface ExampleTextTypeModelData : NSObject
///
@property (nonatomic , strong) NSArray *items;
@end
@interface ExampleTextTypeModelDataItems : NSObject
///
@property (nonatomic , strong) NSString *ID;
///
@property (nonatomic , strong) NSString *name;
///
@property (nonatomic , strong) NSString *url;
@property (nonatomic , strong) NSString *create_time;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,26 @@
//
// ExampleTextTypeModel.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "ExampleTextTypeModel.h"
@implementation ExampleTextTypeModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"data" : [ExampleTextTypeModelData class]};
}
@end
@implementation ExampleTextTypeModelData
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"items" : [ExampleTextTypeModelDataItems class]};
}
@end
@implementation ExampleTextTypeModelDataItems
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
{
return @{@"ID" : @"id"};
}
@end

View File

@ -0,0 +1,32 @@
//
// PicAiSaveDetailModel.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@class PicAiSaveDetailModelData,PicAiSaveDetailModelDataResult;
@interface PicAiSaveDetailModel : BaseModel
///
@property (nonatomic , strong) PicAiSaveDetailModelData *data;
@end
@interface PicAiSaveDetailModelData : NSObject
///
@property (nonatomic , strong) NSString *create_time;
///
@property (nonatomic , strong) NSString *ID;
///
@property (nonatomic , strong) NSArray *images;
///
@property (nonatomic , strong) PicAiSaveDetailModelDataResult *result;
@end
@interface PicAiSaveDetailModelDataResult : NSObject
///
@property (nonatomic , strong) NSString *content;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,27 @@
//
// PicAiSaveDetailModel.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "PicAiSaveDetailModel.h"
@implementation PicAiSaveDetailModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"data" : [PicAiSaveDetailModelData class]};
}
@end
@implementation PicAiSaveDetailModelData
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
{
return @{@"ID" : @"id"};
}
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"result" : [PicAiSaveDetailModelDataResult class]};
}
@end
@implementation PicAiSaveDetailModelDataResult
@end

View File

@ -0,0 +1,26 @@
//
// TextStarModel.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@class TextStarModelData;
@interface TextStarModel : BaseModel
///
@property (nonatomic , strong) TextStarModelData *data;
@end
@interface TextStarModelData : NSObject
///
@property (nonatomic , strong) NSString *ID;
///
@property (nonatomic , strong) NSString *text_id;
///
@property (nonatomic , strong) NSString *star;
///
@property (nonatomic , strong) NSString *create_time;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,21 @@
//
// TextStarModel.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "TextStarModel.h"
@implementation TextStarModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"data" : [TextStarModelData class]};
}
@end
@implementation TextStarModelData
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
{
return @{@"ID" : @"id"};
}
@end

View File

@ -0,0 +1,48 @@
//
// WriteSaveHestoryModel.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@class WriteSaveHestoryModelData,WriteSaveHestoryModelDataItems,WriteSaveHestoryModelDataItemsInfo;
@interface WriteSaveHestoryModel : BaseModel
///
@property (nonatomic , strong) WriteSaveHestoryModelData *data;
@end
@interface WriteSaveHestoryModelData : NSObject
///
@property (nonatomic , strong) NSString *total;
@property (nonatomic , strong) NSArray *items;
@end
@interface WriteSaveHestoryModelDataItems : NSObject
///
@property (nonatomic , strong) NSString *ID;
///
@property (nonatomic , strong) NSString *title;
///
@property (nonatomic , strong) NSString *scene;
///
@property (nonatomic , strong) WriteSaveHestoryModelDataItemsInfo *info;
///
@property (nonatomic , strong) NSString *create_time;
@end
@interface WriteSaveHestoryModelDataItemsInfo : NSObject
///
@property (nonatomic , strong) NSString *content;
///
@property (nonatomic , strong) NSString *score;
///
@property (nonatomic , strong) NSString *stage;
///
@property (nonatomic , strong) NSString *title;
///
@property (nonatomic , strong) NSString *type;
///
@property (nonatomic , strong) NSString *wordsNum;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,31 @@
//
// WriteSaveHestoryModel.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "WriteSaveHestoryModel.h"
@implementation WriteSaveHestoryModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"data" : [WriteSaveHestoryModelData class]};
}
@end
@implementation WriteSaveHestoryModelData
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"items" : [WriteSaveHestoryModelDataItems class]};
}
@end
@implementation WriteSaveHestoryModelDataItems
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
{
return @{@"ID" : @"id"};
}
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"info" : [WriteSaveHestoryModelDataItemsInfo class]};
}
@end
@implementation WriteSaveHestoryModelDataItemsInfo
@end

View File

@ -7,6 +7,7 @@
#import "BaseViewController.h"
#import "ExampleCorrectList.h"
#import "CorrectSaveDetailModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface StartZWPIDetailViewController : BaseViewController
@ -20,6 +21,9 @@ NS_ASSUME_NONNULL_BEGIN
///
@property (nonatomic , strong) NSString *strID;
///批改历史
@property (nonatomic , strong) CorrectSaveDetailModelData *modelHestory;
@end
NS_ASSUME_NONNULL_END

View File

@ -24,10 +24,14 @@
[self.navigationView setTitle:@"作文批改" titleColor:RGBCOLOR(60, 60, 60)];
[self.navigationView setBackgroundColor:[UIColor whiteColor]];
[self.navigationView.backButton setHidden:self.isshiyong];
if(self.strID.length>0)
if(self.strID.length>0||self.modelHestory)
{
[self.navigationView setMuenImg:@"xz_fenxiang"];
}
if(self.modelHestory)
{
[self.navigationView setTitle:@"作文批改记录" titleColor:RGBCOLOR(60, 60, 60)];
}
}
-(void)navMuenButtonAction
{///
@ -45,6 +49,7 @@
}];
view.isshiyong = self.isshiyong;
view.modelDetailZWPG = self.modelDetailZWPG;
view.modelHestory = self.modelHestory;
view.arrXZImages = self.arrXZImages;
view.strID = self.strID;
if(self.arrXZImages.count>0)

View File

@ -10,6 +10,9 @@
#import "WriteCorrectScoreModel.h"
#import "CorrectWriteCorrectModel.h"
#import "CorrectSaveDetailModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface StartZWPIDetailView : UIView
@ -28,6 +31,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic , strong) NSArray *arrErrorLocation;
///句子数据
@property (nonatomic , strong) CorrectWriteCorrectModelData *modelContentItems;
///批改历史
@property (nonatomic , strong) CorrectSaveDetailModelData *modelHestory;
@end
NS_ASSUME_NONNULL_END

View File

@ -193,7 +193,15 @@
else
{///
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[dicpush setObject:[Tools isStringnil:self.strID] forKey:@"id"];
if(self.modelHestory)
{
[dicpush setObject:[Tools isStringnil:self.modelHestory.result.write_correct.ID] forKey:@"id"];
}
else
{
[dicpush setObject:[Tools isStringnil:self.strID] forKey:@"id"];
}
XieZuoXiangQingViewController *vc = [XieZuoXiangQingViewController new];
vc.dicpush = dicpush;
vc.scene = @"rewrite_correct";
@ -231,6 +239,10 @@
}];
viewxz.modelResult = self.modelDetailZWPG.result;
viewxz.strID = self.strID;
if(self.modelHestory)
{
viewxz.strID = self.modelHestory.result.write_correct.ID;
}
_viewxz = viewxz;
}
}
@ -302,6 +314,52 @@
self.viewzh.modelResult = modelDetailZWPG.result;
}
-(void)setModelHestory:(CorrectSaveDetailModelData *)modelHestory
{
_modelHestory = modelHestory;
if(self.modelHestory==nil)return;
UIView *viewlast = nil;
for(NSString *str in self.modelHestory.images)
{
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setContentMode:UIViewContentModeScaleAspectFit];
[self.scvback addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(0);
make.width.offset(UISCREEN_WIDTH);
if(viewlast)
{
make.top.equalTo(viewlast.mas_bottom).offset(20);
}
else
{
make.top.offset(0);
}
make.height.offset(100);
}];
[imgvback sd_setImageWithURL:[NSURL URLWithString:str] placeholderImage:nil completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
if(image)
{
[imgvback mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(image.size.height*UISCREEN_WIDTH/image.size.width);
}];
}
}];
viewlast = imgvback;
}
[self.scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(viewlast).offset(20);
}];
self.viewzh.modelHestoryResult = self.modelHestory.result;
self.modelContentItems = self.modelHestory.result.write_correct;
}
-(void)setArrXZImages:(NSArray *)arrXZImages
{
_arrXZImages = arrXZImages;

View File

@ -7,6 +7,8 @@
#import <UIKit/UIKit.h>
#import "ExamplePicModel.h"
#import "PicAiSaveDetailModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface StartPZXZPageView : UIView
@ -19,6 +21,9 @@ NS_ASSUME_NONNULL_BEGIN
///写作的图片
@property (nonatomic , strong) NSArray *arrXZImages;
///历史记录
@property (nonatomic , strong) PicAiSaveDetailModelData *modelHestory;
@end
NS_ASSUME_NONNULL_END

View File

@ -142,6 +142,46 @@
}
}
-(void)setModelHestory:(PicAiSaveDetailModelData *)modelHestory
{
_modelHestory = modelHestory;
[self.imgvback removeFromSuperview];
[self.scvback setUserInteractionEnabled:YES];
[self.scvback setScrollEnabled:YES];
UIView *viewlast = nil;
for(int i = 0 ; i < modelHestory.images.count;i++)
{
UIImageView *imgvback = [[UIImageView alloc] init];
[self.scvback addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.width.equalTo(self.scvback);
if(viewlast!=nil)
{
make.top.equalTo(viewlast.mas_bottom);
}
else
{
make.top.offset(0);
}
}];
viewlast = imgvback;
[imgvback sd_setImageWithURL:[NSURL URLWithString:modelHestory.images[i]] placeholderImage:nil completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
if(image)
{
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.offset(UISCREEN_WIDTH*image.size.height/image.size.width);
}];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.scvback setContentSize:CGSizeMake(0, imgvback.bottom)];
});
}
}];
}
}
///1 x y
-(void)setYidongsize:(CGSize)yidongsize
{

View File

@ -7,6 +7,9 @@
#import "BaseViewController.h"
#import "ExamplePicModel.h"
#import "PicAiSaveDetailModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface StartPZXZDetailViewController : BaseViewController
@ -24,6 +27,9 @@ NS_ASSUME_NONNULL_BEGIN
///
@property (nonatomic , strong) NSString *strID;
///历史记录
@property (nonatomic , strong) PicAiSaveDetailModelData *modelHestory;
@end
NS_ASSUME_NONNULL_END

View File

@ -51,7 +51,7 @@
}
[self.navigationView setBackgroundColor:[UIColor whiteColor]];
[self.navigationView.backButton setHidden:self.isshiyong];
if(self.isshiyong==NO)
if(self.isshiyong==NO && self.modelHestory==nil)
{
[self.navigationView setMuenTitle:@"反馈" titleColor:RGBCOLOR(60, 60, 60)];
}
@ -73,7 +73,7 @@
view.type = self.type;
view.isshiyong = self.isshiyong;
view.modelYD = self.modelYD;
view.modelHestory = self.modelHestory;
view.arrXZImages = self.arrXZImages;
view.strID = self.strID;

View File

@ -7,6 +7,9 @@
#import <UIKit/UIKit.h>
#import "ExamplePicModel.h"
#import "PicAiSaveDetailModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface StartPZXZDetailView : UIView
@ -22,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN
///
@property (nonatomic , strong) NSString *strID;
///历史记录
@property (nonatomic , strong) PicAiSaveDetailModelData *modelHestory;
@end
NS_ASSUME_NONNULL_END

View File

@ -177,7 +177,37 @@
[btcreate addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside];
[Tools changedView:btcreate colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
}
-(void)drawBottomHestoryView:(UIView *)view
{
for(UIView *viewson in view.subviews)
{
[viewson removeFromSuperview];
}
UIView *viewline = [[UIView alloc] init];
[viewline setBackgroundColor:RGBCOLOR(217, 217, 217)];
[self addSubview:viewline];
[viewline mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(view);
make.height.offset(1);
}];
UIButton *btpigai = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-40, 44)];
[btpigai setTitle:@"复制全文" forState:UIControlStateNormal];
[btpigai setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btpigai.titleLabel setFont:[UIFont boldSystemFontOfSize:16]];
[btpigai.layer setMasksToBounds:YES];
[btpigai.layer setCornerRadius:5];
[view addSubview:btpigai];
[btpigai mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(20);
make.right.equalTo(view).offset(-20);
make.top.offset(10);
make.height.offset(44);
}];
[btpigai addTarget:self action:@selector(copyAction) forControlEvents:UIControlEventTouchUpInside];
[Tools changedView:btpigai colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
_btpigai = btpigai;
}
-(void)drawInfoView:(UIView *)view
{
[view setBackgroundColor:[UIColor whiteColor]];
@ -328,7 +358,7 @@
-(void)setModelYD:(ExamplePicModelDataItems *)modelYD
{
_modelYD = modelYD;
if(modelYD==nil)return;
self.viweBack.model = self.modelYD;
if(modelYD)
@ -342,6 +372,19 @@
self.lbwz.isWriteEnd = YES;
}
}
-(void)setModelHestory:(PicAiSaveDetailModelData *)modelHestory
{
_modelHestory = modelHestory;
if(modelHestory==nil)return;
self.viweBack.modelHestory = self.modelHestory;
NSString *strcontet = self.modelHestory.result.content;
self.lbwz.isCloseAnimation = YES;
self.lbwz.strValue = strcontet;
[self drawBottomHestoryView:self.viewbottom];
}
-(void)setType:(int)type
{
_type = type;
@ -353,13 +396,14 @@
-(void)setArrXZImages:(NSArray *)arrXZImages
{
_arrXZImages = arrXZImages;
if(arrXZImages.count==0)return;
[self.lbwz setHidden:YES];
self.viweBack.arrXZImages = self.arrXZImages;
}
-(void)setStrID:(NSString *)strID
{
_strID = strID;
if([Tools isStringnil:strID].length==0)return;
[self getdata];
}
@ -439,7 +483,7 @@
}
}
[NetWorkManager requestPicAiSaveData:self ID:self.strID scene:strscene content:[arrcontent componentsJoinedByString:@"\n"] Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
[NetWorkManager requestPicAiSaveData:self ID:self.strID scene:strscene content:[NSString stringWithFormat:@" %@",[arrcontent componentsJoinedByString:@"\n "]] Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
@ -462,6 +506,14 @@
break;
}
}
-(void)copyAction
{
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = [Tools isStringnilkong:self.modelHestory.result.content];
[HXHud showMessage:@"复制成功" afterDelayType:0];
}
////
-(void)tiyanAction
{

View File

@ -8,6 +8,9 @@
#import <UIKit/UIKit.h>
#import "TextbookInfoModel.h"
#import "WriteCorrectScoreModel.h"
#import "CorrectSaveDetailModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface StartKTXZPGDetailZHView : UIView
@ -19,6 +22,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic , strong) NSString *strID;
///评分
@property (nonatomic , strong) WriteCorrectScoreModelData *modelPF;
///批改历史
@property (nonatomic , strong) CorrectSaveDetailModelDataResult *modelHestoryResult;
@end
NS_ASSUME_NONNULL_END

View File

@ -179,6 +179,10 @@
{
[lbbzName setText:[UserInfoModel shareModel].user_stage.parent_name];
}
if(self.modelHestoryResult)
{
[lbbzName setText:[UserInfoModel shareModel].user_stage.parent_name];
}
[lbbzName setTextColor:RGBCOLOR(61, 61, 61)];
[lbbzName setTextAlignment:NSTextAlignmentLeft];
[lbbzName setFont:[UIFont systemFontOfSize:12]];
@ -208,6 +212,11 @@
iline = self.modelPF.complex_review.score.count/2.0;
if(self.modelPF.complex_review.score.count%2!=0)iline+=1;
}
if(self.modelHestoryResult)
{
iline = self.modelHestoryResult.write_correct_score.complex_review.score.count/2.0;
if(self.modelHestoryResult.write_correct_score.complex_review.score.count%2!=0)iline+=1;
}
UIView *viewlast = nil;
for(int i = 0; i < iline; i++)
{
@ -224,6 +233,11 @@
if(i*2+j>=self.modelPF.complex_review.score.count)break;
model = self.modelPF.complex_review.score[i*2+j];
}
if(self.modelHestoryResult)
{
if(i*2+j>=self.modelHestoryResult.write_correct_score.complex_review.score.count)break;
model = self.modelHestoryResult.write_correct_score.complex_review.score[i*2+j];
}
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:[Tools isStringnilkong:model.name]];
@ -336,7 +350,52 @@
[self drawTopView:self.viewtop];
[self getdata];
}
-(void)setModelHestoryResult:(CorrectSaveDetailModelDataResult *)modelHestoryResult
{
_modelHestoryResult = modelHestoryResult;
if(modelHestoryResult==nil)return;
[self drawTopView:self.viewtop];
NSString *value = modelHestoryResult.write_correct_evaluate;
NSString *strshow = [value stringByReplacingOccurrencesOfString:@"# 综合评价" withString:@""];
strshow = [strshow stringByReplacingOccurrencesOfString:@"#综合评价" withString:@""];
strshow = [strshow stringByReplacingOccurrencesOfString:@"# 作文优点" withString:@"|&&|"];
strshow = [strshow stringByReplacingOccurrencesOfString:@"#作文优点" withString:@"|&&|"];
strshow = [strshow stringByReplacingOccurrencesOfString:@"# 作文缺点" withString:@"|&&|"];
strshow = [strshow stringByReplacingOccurrencesOfString:@"#作文缺点" withString:@"|&&|"];
strshow = [strshow stringByReplacingOccurrencesOfString:@"#" withString:@"|&&|"];
NSArray *arrvalues = [strshow componentsSeparatedByString:@"|&&|"];
NSArray *arrtt = @[@"",@"优点",@"建议"];
self.arrdata = [NSMutableArray new];
for(int i = 0 ; i < 3;i++)
{
SSEDrawListTextModel *model = [SSEDrawListTextModel new];
model.title = arrtt[i];
if(i<arrvalues.count)
{
model.value = [arrvalues[i] stringByReplacingOccurrencesOfString:@"\n" withString:@""];
}
model.isaddEnd = YES;
model.isClostAnimation = YES;
[self.arrdata addObject:model];
}
self.isStartDrawText = NO;
self.isdrawEnd = NO;
self.iDraw = 0;
self.viewDarwLast = nil;
dispatch_async(dispatch_get_main_queue(), ^{
if(self.isStartDrawText==NO)
{
self.isStartDrawText = YES;
[self drawTextInfo];
}
});
}
#pragma mark - UIScrollView
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
{
@ -461,7 +520,7 @@
colortemp = RGBCOLOR(230, 172, 40);
}
lbwz = [self drawTextItem:self.viewinfo title:model.title color:colortemp lastview:self.viewDarwLast];
lbwz.isCloseAnimation = model.isClostAnimation;
if(self.modelConfig.time.intValue>0)
{
lbwz.fspeed = self.modelConfig.time.intValue/1000.0;

View File

@ -85,7 +85,7 @@
{
[lbname setFont:[UIFont systemFontOfSize:self.textFont]];
}
[lbname setAttributedText:[Tools applyCSS:[dicitem objectForKey:@"text"]]];
[lbname setAttributedText:[Tools applyCSS:[dicitem objectForKey:@"text"] stylealignment:NSTextAlignmentLeft]];
[view addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {

View File

@ -10,7 +10,8 @@
NS_ASSUME_NONNULL_BEGIN
@interface FanWenListViewController : UIViewController<ZJScrollPageViewChildVcDelegate>
///
@property (nonatomic , strong) NSString *strid;
@end
NS_ASSUME_NONNULL_END

View File

@ -8,10 +8,14 @@
#import "FanWenListViewController.h"
#import "FanWenListTableViewCell.h"
#import "FanWenDetailViewController.h"
#import "NetWorkManager.h"
@interface FanWenListViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetDelegate,DZNEmptyDataSetSource>
///
@property (nonatomic , strong) UITableView *tableView;
///
@property (nonatomic , strong) NSMutableArray *arrdata;
@property (nonatomic , assign) int ipage;
@end
@implementation FanWenListViewController
@ -30,16 +34,47 @@
make.left.right.bottom.equalTo(self.view);
make.top.offset(0);
}];
[tableView setEmptyDataSetDelegate:self];
[tableView setEmptyDataSetSource:self];
_tableView = tableView;
tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
self.ipage=1;
[self getdata];
}];
tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
self.ipage+=1;
[self getdata];
}];
self.ipage=1;
[self getdata];
}
-(void)getdata
{
[LoadAlterView show];
[NetWorkManager requestExampleTextData:self.view page:[NSString stringWithFormat:@"%d",self.ipage] type_id:self.strid role_id:@"" topic:@"" title:@"" textbook_id:@"" Callback:^(BOOL state, ExampleTextGreatModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
[self.tableView.mj_header endRefreshing];
[self.tableView.mj_footer endRefreshing];
if(self.ipage==1)self.arrdata=[NSMutableArray new];
if(state)
{
[self.arrdata addObjectsFromArray:responseObject.data.items];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
[self.tableView setEmptyDataSetDelegate:self];
[self.tableView setEmptyDataSetSource:self];
[self.tableView reloadData];
}];
}
#pragma mark - UITableView
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 10;
return self.arrdata.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
@ -51,7 +86,7 @@
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
[cell setBackgroundColor:[UIColor clearColor]];
}
cell.model = self.arrdata[indexPath.row];
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
@ -77,6 +112,7 @@
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
FanWenDetailViewController *vc = [FanWenDetailViewController new];
vc.modelDetail = self.arrdata[indexPath.row];
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - DZNEmptyDataSetSource

View File

@ -8,12 +8,16 @@
#import "FanWenViewController.h"
#import "ZJScrollPageView.h"
#import "FanWenListViewController.h"
#import "NetWorkManager.h"
#import "FanWenSearchViewController.h"
@interface FanWenViewController ()<ZJScrollPageViewDelegate>
///
@property (nonatomic , strong) ZJScrollPageView *scrollPageView;
///
@property (nonatomic , strong) NSArray *arrdata;
@end
@implementation FanWenViewController
@ -63,13 +67,15 @@
style.titleBigScale = 1.2;
style.autoAdjustTitlesWidth = NO;
style.adjustCoverOrLineWidth = NO;
ZJScrollPageView *scrollPageView = [[ZJScrollPageView alloc] initWithFrame:CGRectMake(0, KMagrinTop+75, UISCREEN_WIDTH, UISCREEN_HEIGHT - KMagrinTop-TabHeight-75) segmentStyle:style titles:@[@"全部",@"写给自己",@"检讨书",@"中考作文",@"青春",@"中考作文",@"检讨书",@"写给自己",@"青春",@"检讨书"] parentViewController:self delegate:self];
ZJScrollPageView *scrollPageView = [[ZJScrollPageView alloc] initWithFrame:CGRectMake(0, KMagrinTop+75, UISCREEN_WIDTH, UISCREEN_HEIGHT - KMagrinTop-TabHeight-75) segmentStyle:style titles:@[] parentViewController:self delegate:self];
[self.view addSubview:scrollPageView];
scrollPageView.segmentView.backgroundColor = [UIColor clearColor];
scrollPageView.contentView.backgroundColor = [UIColor clearColor];
scrollPageView.contentView.collectionView.backgroundColor = [UIColor clearColor];
_scrollPageView = scrollPageView;
[self.scrollPageView reloadWithNewTitles:@[@"全部",@"写给自己",@"检讨书",@"中考作文",@"青春",@"中考作文",@"检讨书",@"写给自己",@"青春",@"检讨书"]];
[self getdata];
}
-(void)drawSearchView:(UIView *)view
@ -99,19 +105,49 @@
make.top.bottom.right.equalTo(view);
make.width.offset(50);
}];
[btsearch addTarget:self action:@selector(searchAction) forControlEvents:UIControlEventTouchUpInside];
UIButton *btaction = [[UIButton alloc] init];
[view addSubview:btaction];
[btaction mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(view);
}];
[btaction addTarget:self action:@selector(searchAction) forControlEvents:UIControlEventTouchUpInside];
}
-(void)searchAction
{
FanWenSearchViewController *vc = [FanWenSearchViewController new];
[self.navigationController pushViewController:vc animated:YES];
}
-(void)getdata
{
[LoadAlterView show];
[NetWorkManager requestExampleTextTypeData:self.view Callback:^(BOOL state, ExampleTextTypeModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
self.arrdata = responseObject.data.items;
NSMutableArray *arrname = [NSMutableArray new];
[arrname addObject:@"全部"];
for(ExampleTextTypeModelDataItems *model in responseObject.data.items)
{
[arrname addObject:[Tools isStringnil:model.name]];
}
[self.scrollPageView reloadWithNewTitles:arrname];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
#pragma mark - custom delegate - delegate
- (NSInteger)numberOfChildViewControllers {
return 10;
return self.arrdata.count;
}
- (UIViewController<ZJScrollPageViewChildVcDelegate> *)childViewController:(UIViewController<ZJScrollPageViewChildVcDelegate> *)reuseViewController forIndex:(NSInteger)index {
@ -119,7 +155,15 @@
if (!childVC) {
childVC = [[FanWenListViewController alloc] init];
}
if(index>0)
{
ExampleTextTypeModelDataItems *model = self.arrdata[index-1];
childVC.strid = model.ID;
}
else
{
childVC.strid = @"";
}
return childVC;
}

View File

@ -6,11 +6,12 @@
//
#import <UIKit/UIKit.h>
#import "ExampleTextGreatModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface FanWenListTableViewCell : UITableViewCell
///
@property (nonatomic , strong) ExampleTextGreatModelDataItems *model;
@end
NS_ASSUME_NONNULL_END

View File

@ -9,6 +9,13 @@
@interface FanWenListTableViewCell ()
///
@property (nonatomic , strong) UILabel *lbfen;
@property (nonatomic , strong) UILabel *lbname;
@property (nonatomic , strong) UILabel *lbtype;
@property (nonatomic , strong) UILabel *lbinfo;
@property (nonatomic , strong) UIView *viewnj;
@property (nonatomic , strong) UIView *viewzs;
@end
@ -62,6 +69,7 @@
make.top.offset(11);
make.right.equalTo(viewback).offset(-15);
}];
_lbfen = lbfen;
UILabel *lbname = [[UILabel alloc] init];
@ -74,6 +82,7 @@
make.left.top.offset(15);
make.width.lessThanOrEqualTo(@(UISCREEN_WIDTH-210));
}];
_lbname = lbname;
UIView *viewtype = [[UIView alloc] init];
[viewtype setBackgroundColor:RGBCOLOR(240, 241, 254)];
@ -96,6 +105,7 @@
make.left.offset(4);
make.centerY.equalTo(viewtype);
}];
_lbtype = lbtype;
[viewtype mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(lbtype).offset(4);
@ -113,6 +123,7 @@
make.top.equalTo(lbname.mas_bottom).offset(10);
make.right.equalTo(viewback).offset(-15);
}];
_lbinfo = lbinfo;
UIView *viewline = [[UIView alloc] init];
[viewline setBackgroundColor:RGBCOLOR(239, 239, 239)];
@ -130,6 +141,7 @@
make.top.equalTo(viewline.mas_bottom).offset(12);
make.height.offset(21);
}];
_viewnj = viewnj;
UIView *viewzs = [self drawLBType];
[viewback addSubview:viewzs];
@ -137,6 +149,7 @@
make.left.equalTo(viewnj.mas_right).offset(10);
make.top.height.equalTo(viewnj);
}];
_viewzs = viewzs;
UIButton *btqw = [[UIButton alloc] init];
[btqw setTitle:@"查看全文" forState:UIControlStateNormal];
@ -182,4 +195,30 @@
return viewback;
}
-(void)setModel:(ExampleTextGreatModelDataItems *)model
{
_model = model;
self.lbfen.text = [NSString stringWithFormat:@"%@分",[Tools backprice:self.model.score]];
self.lbname.attributedText = [Tools applyCSS:[Tools isStringnilkong:model.title] stylealignment:NSTextAlignmentCenter];
self.lbtype.text = [Tools isStringnilkong:model.topic];
// self.lbinfo.text = [Tools isStringnilkong:model.content];
NSString *str = [Tools isStringnilkong:model.content];
///
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
style.lineSpacing = 5;
style.lineBreakMode = NSLineBreakByTruncatingTail;
style.alignment = NSTextAlignmentLeft;
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:str];
[attrString addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, str.length)];
self.lbinfo.attributedText = attrString;
UILabel *lbxd = [self.viewnj viewWithTag:1];
lbxd.text = [Tools isStringnilkong:model.role_name];
UILabel *lbzs = [self.viewzs viewWithTag:1];
lbzs.text = [NSString stringWithFormat:@"%@字",model.total_words];
}
@end

View File

@ -0,0 +1,16 @@
//
// FanWenSearchViewController.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface FanWenSearchViewController : BaseViewController
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,41 @@
//
// FanWenSearchViewController.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "FanWenSearchViewController.h"
#import "FanWenSearchView.h"
@interface FanWenSearchViewController ()
@end
@implementation FanWenSearchViewController
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleDefault;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
[self showNaviGationView:YES];
[self.navigationView setTitle:@"搜索" titleColor:RGBCOLOR(60, 60, 60)];
[self.navigationView setBackgroundColor:[UIColor whiteColor]];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:[UIColor whiteColor]];
FanWenSearchView *view = [FanWenSearchView new];
[self.view addSubview:view];
[view mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.top.offset(NavHeight);
}];
}
@end

View File

@ -0,0 +1,22 @@
//
// FanWenSearchHestoryView.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
///搜索历史
#define FanWenSearchKeywordsHestory @"FanWenSearchKeywordsHestory"
typedef void(^FanWenSearchHestoryViewBack)(NSString *strkey);
@interface FanWenSearchHestoryView : UIView
///
@property (nonatomic , strong) FanWenSearchHestoryViewBack backValue;
-(void)refShow;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,221 @@
//
// FanWenSearchHestoryView.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "FanWenSearchHestoryView.h"
@interface FanWenSearchHestoryView ()
///
@property (nonatomic , strong) UIView *viewNo;
///
@property (nonatomic , strong) MASConstraint *bottomSelf;
///
@property (nonatomic , strong) UIView *viewKeywords;
///
@property (nonatomic , strong) NSMutableArray *arrShow;
@end
@implementation FanWenSearchHestoryView
-(id)initWithFrame:(CGRect)frame
{
if(self = [super initWithFrame:frame])
{
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"历史搜索"];
[lbname setTextColor:RGBCOLOR(60, 60, 60)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont systemFontOfSize:16]];
[self addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(16);
make.top.offset(10);
}];
UIButton *btref = [[UIButton alloc] init];
[btref setImage:[Tools imageWithImageName:[UIImage imageNamed:@"search_del"] imageColor:RGBCOLOR(158, 158, 158)] forState:UIControlStateNormal];
[self addSubview:btref];
[btref mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(lbname);
make.height.offset(30);
make.width.offset(40);
make.right.equalTo(self).offset(-10);
}];
[btref addTarget:self action:@selector(delAction) forControlEvents:UIControlEventTouchUpInside];
UIView *viewline1 = [[UIView alloc] init];
[self addSubview:viewline1];
[viewline1 mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(lbname);
make.right.equalTo(self).offset(-20);
make.top.equalTo(lbname.mas_bottom).offset(13);
make.height.offset(1);
}];
UIView *viewNo = [[UIView alloc] init];
[self addSubview:viewNo];
[viewNo mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self);
make.top.equalTo(viewline1.mas_bottom);
make.height.offset(137);
}];
[self drawViewNo:viewNo];
_viewNo = viewNo;
UIView *viewKeywords = [[UIView alloc] init];
[self addSubview:viewKeywords];
[viewKeywords mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(viewline1);
make.top.equalTo(viewline1.mas_bottom).offset(10);
make.height.offset(1);
}];
_viewKeywords = viewKeywords;
[self mas_makeConstraints:^(MASConstraintMaker *make) {
self.bottomSelf = make.bottom.equalTo(viewNo);
}];
self.arrShow = [[NSUserDefaults standardUserDefaults] objectForKey:FanWenSearchKeywordsHestory];
if(self.arrShow == nil)
{
self.arrShow = [NSMutableArray new];
}
[self drawKeyWordsView];
}
return self;
}
-(void)drawViewNo:(UIView *)view
{
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"暂无搜索记录"]];
[view addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(15);
make.width.height.offset(80);
make.centerX.equalTo(view);
}];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"暂无搜索记录"];
[lbname setTextColor:RGBCOLOR(156, 156, 156)];
[lbname setTextAlignment:NSTextAlignmentCenter];
[lbname setFont:[UIFont systemFontOfSize:12]];
[view addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(view);
make.top.equalTo(imgvback.mas_bottom).offset(10);
}];
}
-(void)drawKeyWordsView
{
for(UIView *view in self.viewKeywords.subviews)
{
[view removeFromSuperview];
}
float f_width = UISCREEN_WIDTH-56;
float ftop = 0;
float fleft = 0;
UIView *viewlast = nil;
for(int i = 0 ; i < self.arrShow.count; i++)
{
float f_w = [Tools getWidthWithText:self.arrShow[i] height:20 font:14]+32;
if((fleft+f_w)>f_width)
{
ftop+=40;
fleft = 0;
}
if(f_w>f_width)f_w = f_width;
UIView *viewitem = [[UIView alloc] init];
[viewitem setBackgroundColor:RGBCOLOR(238, 238, 238)];
[self.viewKeywords addSubview:viewitem];
[viewitem mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.offset(f_w);
make.height.offset(30);
make.top.offset(ftop);
make.left.offset(fleft);
}];
[viewitem.layer setMasksToBounds:YES];
[viewitem.layer setCornerRadius:15];
viewlast = viewitem;
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:self.arrShow[i]];
[lbname setTextColor:RGBCOLOR(60, 60, 60)];
[lbname setTextAlignment:NSTextAlignmentCenter];
[lbname setFont:[UIFont systemFontOfSize:14]];
[viewitem addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(15);
make.right.equalTo(viewitem).offset(-15);
make.centerY.equalTo(viewitem);
}];
UIButton *btitem = [[UIButton alloc] init];
[viewitem addSubview:btitem];
[btitem mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(viewitem);
}];
[btitem setTag:i];
[btitem addTarget:self action:@selector(itemAction:) forControlEvents:UIControlEventTouchUpInside];
fleft+=f_w+10;
}
if(viewlast)
{
[self.viewKeywords mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(ftop+40);
}];
[self.viewNo setHidden:YES];
[self.bottomSelf uninstall];
[self mas_makeConstraints:^(MASConstraintMaker *make) {
self.bottomSelf = make.bottom.equalTo(self.viewKeywords).offset(15);
}];
}
else
{
[self.viewKeywords mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(10);
}];
[self.viewNo setHidden:NO];
[self.bottomSelf uninstall];
[self mas_makeConstraints:^(MASConstraintMaker *make) {
self.bottomSelf = make.bottom.equalTo(self.viewNo);
}];
}
}
-(void)refShow
{
self.arrShow = [[NSUserDefaults standardUserDefaults] objectForKey:FanWenSearchKeywordsHestory];
if(self.arrShow == nil)
{
self.arrShow = [NSMutableArray new];
}
[self drawKeyWordsView];
}
-(void)delAction
{
if(self.arrShow.count==0)return;
self.arrShow = [NSMutableArray new];
[[NSUserDefaults standardUserDefaults] setObject:@[] forKey:FanWenSearchKeywordsHestory];
[self drawKeyWordsView];
}
-(void)itemAction:(UIButton *)sender
{
self.backValue(self.arrShow[sender.tag]);
}
@end

View File

@ -0,0 +1,16 @@
//
// FanWenSearchView.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface FanWenSearchView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,87 @@
//
// FanWenSearchView.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "FanWenSearchView.h"
#import "PGJSearchView.h"
#import "FanWenSearchHestoryView.h"
#import "FanWenSearchListViewController.h"
@interface FanWenSearchView ()
///
@property (nonatomic , strong) FanWenSearchHestoryView *viewhestory;
@end
@implementation FanWenSearchView
-(id)initWithFrame:(CGRect)frame
{
if(self = [super initWithFrame:frame])
{
PGJSearchView *viewsearch = [[PGJSearchView alloc] init];
[viewsearch setBackgroundColor:[UIColor whiteColor]];
[self addSubview:viewsearch];
[viewsearch mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(20);
make.right.equalTo(self).offset(-20);
make.top.offset(10);
make.height.offset(40);
}];
[viewsearch.searchview mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(40);
}];
[viewsearch.searchview.layer setMasksToBounds:YES];
[viewsearch.searchview.layer setCornerRadius:6];
[viewsearch.searchview setBackgroundColor:[UIColor whiteColor]];
viewsearch.searchField.placeholder = @"请输入文章标题或者关键词";
[viewsearch.searchbtn setBackgroundColor:[UIColor whiteColor]];
[viewsearch.searchbtn setTitleColor:RGBCOLOR(108, 119, 246) forState:UIControlStateNormal];
[Tools normalShadow:viewsearch shadowColor:RGBACOLOR(0, 0, 0, 0.1) shadowOpacity:1 cornerRadius:6 shadowRadius:10];
[viewsearch setSearchBackAction:^(NSString * _Nonnull search) {
if(search.length>0)
{
NSMutableArray *arrShow = [[NSUserDefaults standardUserDefaults] objectForKey:FanWenSearchKeywordsHestory];
if(arrShow == nil)
{
arrShow = [NSMutableArray new];
}
NSMutableArray *arrtemp = [NSMutableArray new];
if([arrShow containsObject:search]==NO)
{
[arrtemp addObject:search];
}
[arrtemp addObjectsFromArray:arrShow];
[[NSUserDefaults standardUserDefaults] setObject:arrtemp forKey:FanWenSearchKeywordsHestory];
[self.viewhestory refShow];
[self searchAction:search];
}
}];
FanWenSearchHestoryView *viewhestory = [[FanWenSearchHestoryView alloc] init];
[viewhestory setBackgroundColor:[UIColor whiteColor]];
[self addSubview:viewhestory];
[viewhestory mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(viewsearch);
make.top.equalTo(viewsearch.mas_bottom).offset(15);
}];
[Tools normalShadow:viewhestory shadowColor:RGBACOLOR(0, 0, 0, 0.1) shadowOpacity:1 cornerRadius:6 shadowRadius:10];
[viewhestory setBackValue:^(NSString * _Nonnull strkey) {
[self searchAction:strkey];
}];
_viewhestory = viewhestory;
}
return self;
}
-(void)searchAction:(NSString *)value
{
[self endEditing:YES];
FanWenSearchListViewController *vc = [FanWenSearchListViewController new];
vc.strkey = value;
[self.viewController.navigationController pushViewController:vc animated:YES];
}
@end

View File

@ -10,6 +10,14 @@
NS_ASSUME_NONNULL_BEGIN
@interface FanWenSearchListViewController : BaseViewController
///
@property (nonatomic , strong) NSString *strkey;
///
@property (nonatomic , strong) NSString *type_id;
@property (nonatomic , strong) NSString *role_id;
@property (nonatomic , strong) NSString *topic;///应用文
@property (nonatomic , strong) NSString *textbook_id;
@end

View File

@ -9,11 +9,14 @@
#import "PGJSearchView.h"
#import "FanWenListTableViewCell.h"
#import "FanWenDetailViewController.h"
#import "NetWorkManager.h"
@interface FanWenSearchListViewController ()<UITableViewDelegate,UITableViewDataSource>
@interface FanWenSearchListViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetDelegate,DZNEmptyDataSetSource>
///
@property (nonatomic , strong) UITableView *tableView;
@property (nonatomic , assign) int ipage;
///
@property (nonatomic , strong) NSMutableArray *arrdata;
@end
@implementation FanWenSearchListViewController
@ -49,11 +52,17 @@
[viewsearch.searchview setBackgroundColor:[UIColor whiteColor]];
viewsearch.searchField.placeholder = @"请输入文章标题或者关键词";
[viewsearch.searchbtn setBackgroundColor:[UIColor whiteColor]];
[viewsearch.searchbtn setTitleColor:RGBCOLOR(252, 80, 80) forState:UIControlStateNormal];
[viewsearch.searchbtn setTitleColor:RGBCOLOR(108, 119, 246) forState:UIControlStateNormal];
[Tools normalShadow:viewsearch shadowColor:RGBACOLOR(0, 0, 0, 0.1) shadowOpacity:1 cornerRadius:6 shadowRadius:10];
[viewsearch setSearchBackAction:^(NSString * _Nonnull search) {
self.strkey = search;
self.ipage=1;
[self getdata];
}];
if(self.strkey)
{
viewsearch.searchField.text = self.strkey;
}
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
[tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
@ -66,14 +75,44 @@
make.top.equalTo(viewsearch.mas_bottom).offset(20);
}];
_tableView = tableView;
tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
self.ipage=1;
[self getdata];
}];
tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
self.ipage+=1;
[self getdata];
}];
self.ipage=1;
[self getdata];
}
-(void)getdata
{
[LoadAlterView show];
[NetWorkManager requestExampleTextSearchData:self.view page:[NSString stringWithFormat:@"%d",self.ipage] type_id:self.type_id role_id:self.role_id topic:self.topic title:self.strkey textbook_id:self.textbook_id Callback:^(BOOL state, ExampleTextGreatModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
[self.tableView.mj_header endRefreshing];
[self.tableView.mj_footer endRefreshing];
if(self.ipage==1)self.arrdata=[NSMutableArray new];
if(state)
{
[self.arrdata addObjectsFromArray:responseObject.data.items];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
[self.tableView setEmptyDataSetDelegate:self];
[self.tableView setEmptyDataSetSource:self];
[self.tableView reloadData];
}];
}
#pragma mark - UITableView
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 10;
return self.arrdata.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
@ -85,7 +124,7 @@
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
[cell setBackgroundColor:[UIColor clearColor]];
}
cell.model = self.arrdata[indexPath.row];
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
@ -111,6 +150,7 @@
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
FanWenDetailViewController *vc = [FanWenDetailViewController new];
vc.modelDetail = self.arrdata[indexPath.row];
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - DZNEmptyDataSetSource
@ -157,28 +197,8 @@
make.centerX.equalTo(viewback);
}];
UIButton *btok = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-230, 40)];
[btok setTitle:@"AI写一篇" forState:UIControlStateNormal];
[btok setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btok.titleLabel setFont:[UIFont systemFontOfSize:16]];
[btok.layer setMasksToBounds:YES];
[btok.layer setCornerRadius:20];
[btok setBackgroundColor:RGBCOLOR(108, 119, 246)];
[viewback addSubview:btok];
[btok mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(115);
make.right.equalTo(viewback).offset(-115);
make.top.equalTo(lbinfo.mas_bottom).offset(38);
make.height.offset(40);
}];
[btok addTarget:self action:@selector(aiAction) forControlEvents:UIControlEventTouchUpInside];
return viewback;
}
-(void)aiAction
{
}
@end

View File

@ -6,11 +6,12 @@
//
#import "BaseViewController.h"
#import "ExampleTextGreatModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface FanWenDetailViewController : BaseViewController
///
@property (nonatomic , strong) ExampleTextGreatModelDataItems *modelDetail;
@end
NS_ASSUME_NONNULL_END

View File

@ -21,7 +21,7 @@
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
[self showNaviGationView:YES];
[self.navigationView setTitle:@" " titleColor:RGBCOLOR(60, 60, 60)];
[self.navigationView setTitle:@"范文详情" titleColor:RGBCOLOR(60, 60, 60)];
[self.navigationView setBackgroundColor:[UIColor whiteColor]];
}
- (void)viewDidLoad {
@ -34,7 +34,7 @@
make.left.right.bottom.equalTo(self.view);
make.top.offset(NavHeight);
}];
view.modelDetail = self.modelDetail;
}

View File

@ -6,11 +6,12 @@
//
#import <UIKit/UIKit.h>
#import "ExampleTextGreatModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface FanWenDetailView : UIView
///
@property (nonatomic , strong) ExampleTextGreatModelDataItems *modelDetail;
@end
NS_ASSUME_NONNULL_END

View File

@ -6,10 +6,19 @@
//
#import "FanWenDetailView.h"
#import "NetWorkManager.h"
#import "XieZuoXiangQingViewController.h"
@interface FanWenDetailView ()
///
@property (nonatomic , strong) UILabel *lbname;
@property (nonatomic , strong) UILabel *lbinfo;
@property (nonatomic , strong) UILabel *lbcontent;
@property (nonatomic , strong) UILabel *lbpf;
@property (nonatomic , strong) UILabel *lbts;
@property (nonatomic , strong) UIView *viewxin;
///
@property (nonatomic , strong) NSMutableArray *arrBtXin;
@end
@ -33,12 +42,14 @@
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
[lbname setTextAlignment:NSTextAlignmentCenter];
[lbname setFont:[UIFont boldSystemFontOfSize:24]];
[lbname setNumberOfLines:0];
[scvback addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(20);
make.left.offset(20);
make.width.equalTo(scvback).offset(-40);
}];
_lbname = lbname;
UILabel *lbinfo = [[UILabel alloc] init];
[lbinfo setText:@"初一丨应用文丨145字"];
@ -50,6 +61,7 @@
make.centerX.equalTo(lbname);
make.top.equalTo(lbname.mas_bottom).offset(15);
}];
_lbinfo = lbinfo;
UILabel *lbcontent = [[UILabel alloc] init];
[lbcontent setText:@" 给自己一个微笑,鼓励自己,让自己的自信心恢复原来的样子。给自己一个微笑,失败了可以重来,梦碎了可以重建,但我们不必太自责。给自己一个微笑,让自己坚持把这件事干好,干的比之前更好。"];
@ -62,6 +74,7 @@
make.left.right.equalTo(lbname);
make.top.equalTo(lbinfo.mas_bottom).offset(20);
}];
_lbcontent = lbcontent;
UILabel *lbpf = [[UILabel alloc] init];
[lbpf setText:@"请给以上内容评分"];
@ -73,6 +86,7 @@
make.top.equalTo(lbcontent.mas_bottom).offset(40);
make.centerX.equalTo(lbname);
}];
_lbpf = lbpf;
UIView *viewxin = [[UIView alloc] init];
[scvback addSubview:viewxin];
@ -82,17 +96,19 @@
make.centerX.equalTo(lbname);
}];
[self drawXinView:viewxin];
_viewxin = viewxin;
UILabel *lbts = [[UILabel alloc] init];
[lbts setText:@"请给以上内容评分"];
[lbts setTextColor:RGBCOLOR(109, 109, 109)];
[lbts setText:@" "];///
[lbts setTextColor:RGBCOLOR(51, 51, 51)];
[lbts setTextAlignment:NSTextAlignmentLeft];
[lbts setFont:[UIFont systemFontOfSize:14]];
[lbts setFont:[UIFont systemFontOfSize:16]];
[scvback addSubview:lbts];
[lbts mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(viewxin.mas_bottom).offset(15);
make.centerX.equalTo(lbname);
}];
_lbts = lbts;
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(lbts).offset(20);
@ -182,25 +198,131 @@
[btchange addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside];
}
-(void)setModelDetail:(ExampleTextGreatModelDataItems *)modelDetail
{
_modelDetail = modelDetail;
self.lbname.text = [Tools flattenHTML:[Tools isStringnilkong:modelDetail.title]];
// self.lbname.attributedText = [Tools applyCSS:[Tools isStringnilkong:modelDetail.title] stylealignment:NSTextAlignmentCenter];
self.lbinfo.text = [NSString stringWithFormat:@"%@ | %@ | %@字",modelDetail.role_name,modelDetail.topic,modelDetail.total_words];
NSString *str = modelDetail.content;
///
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
style.lineSpacing = 8;
style.lineBreakMode = NSLineBreakByCharWrapping;
style.alignment = NSTextAlignmentLeft;
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:str];
[attrString addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, str.length)];
self.lbcontent.attributedText = attrString;
[self getxinxi];
}
-(void)xinAction:(UIButton *)sender
{
for(int i = 0 ; i < self.arrBtXin.count;i++)
{
UIButton *bt = self.arrBtXin[i];
if(i<=sender.tag)
[LoadAlterView show];
[NetWorkManager requestExampleTextStarAddData:self text_id:self.modelDetail.ID star:[NSString stringWithFormat:@"%ld",sender.tag+1] Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
[bt setSelected:YES];
[self.viewxin setUserInteractionEnabled:NO];
for(int i = 0 ; i < self.arrBtXin.count;i++)
{
UIButton *bt = self.arrBtXin[i];
if(i<=sender.tag)
{
[bt setSelected:YES];
}
else
{
[bt setSelected:NO];
}
}
self.lbts.text = [self getXinText:sender.tag];
}
else
{
[bt setSelected:NO];
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}
}];
}
-(void)bottomAction:(UIButton *)sender
{
if(sender.tag==0)
{
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = [Tools isStringnil:self.modelDetail.content];
[HXHud showMessage:@"复制成功" afterDelayType:0];
}
else
{
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[dicpush setObject:[Tools isStringnil:self.modelDetail.ID] forKey:@"example_text_id"];
[dicpush setObject:[Tools isStringnil:self.modelDetail.title] forKey:@"title"];
[dicpush setObject:[Tools isStringnil:self.modelDetail.topic] forKey:@"require"];
XieZuoXiangQingViewController *vc = [XieZuoXiangQingViewController new];
vc.dicpush = dicpush;
vc.scene = @"rewrite_example_text";
[self.viewController.navigationController pushViewController:vc animated:YES];
}
}
-(void)getxinxi
{
[self.viewxin setUserInteractionEnabled:NO];
[LoadAlterView show];
[NetWorkManager requestExampleTextStarData:self text_id:self.modelDetail.ID Callback:^(BOOL state, TextStarModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
if([Tools isStringnil:responseObject.data.create_time].length>0)
{
for(int i = 0 ; i < self.arrBtXin.count;i++)
{
UIButton *bt = self.arrBtXin[i];
if(i<responseObject.data.star.intValue)
{
[bt setSelected:YES];
}
else
{
[bt setSelected:NO];
}
}
self.lbts.text = [self getXinText:responseObject.data.star.integerValue];
}
else
{
[self.viewxin setUserInteractionEnabled:YES];
}
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
-(NSString *)getXinText:(NSInteger)value
{
NSString *strback = @"";
NSArray *arrt = @[@"完全不可用!", @"较差不理想。", @"改改还能用。", @"基本满意有点瑕疵。", @"很不错完美。"];
@try {
strback = arrt[value-1];
} @catch (NSException *exception) {
} @finally {
}
return strback;
}
@end

View File

@ -20,7 +20,7 @@
#import "ShouYeLiShiJiLuViewController.h"
#import "PublicNetWorkManager.h"
#import "NetWorkManager.h"
#import "FanWenDetailViewController.h"
@interface ShouYeViewController ()<UITableViewDelegate,UITableViewDataSource>
///
@ -418,7 +418,10 @@
{
if(indexPath.section==4)
{
ExampleTextGreatModelDataItems *model = self.arrFanWen[indexPath.row];
FanWenDetailViewController *vc = [FanWenDetailViewController new];
vc.modelDetail = model;
[self.navigationController pushViewController:vc animated:YES];
}
}
///

View File

@ -7,11 +7,13 @@
#import "ShouYeLiShiJiLuXZTableViewController.h"
#import "ShouYeLiShiJiLuXZTableViewCell.h"
#import "NetWorkManager.h"
@interface ShouYeLiShiJiLuXZTableViewController ()<UITableViewDelegate,UITableViewDataSource>
///
@property (nonatomic , strong) UITableView *tableView;
///
@property (nonatomic , strong) NSMutableArray *arrdata;
@end
@implementation ShouYeLiShiJiLuXZTableViewController
@ -30,12 +32,30 @@
make.edges.equalTo(self.view);
}];
_tableView = tableView;
[self getdata];
}
-(void)getdata
{
[LoadAlterView show];
[NetWorkManager requestWriteSaveHestoryData:self.view Callback:^(BOOL state, WriteSaveHestoryModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
self.arrdata = [[NSMutableArray alloc] initWithArray:responseObject.data.items];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
[self.tableView reloadData];
}];
}
#pragma mark - Table view data source
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 10;
return self.arrdata.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
@ -47,7 +67,11 @@
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
[cell setBackgroundColor:[UIColor clearColor]];
}
cell.model = self.arrdata[indexPath.row];
[cell setBackValue:^(WriteSaveHestoryModelDataItems * _Nonnull model) {
[self.arrdata removeObject:model];
[self.tableView reloadData];
}];
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

View File

@ -6,11 +6,14 @@
//
#import <UIKit/UIKit.h>
#import "WriteSaveHestoryModel.h"
NS_ASSUME_NONNULL_BEGIN
typedef void(^ShouYeLiShiJiLuXZTableViewCellBack)(WriteSaveHestoryModelDataItems *model);
@interface ShouYeLiShiJiLuXZTableViewCell : UITableViewCell
///
@property (nonatomic , strong) WriteSaveHestoryModelDataItems *model;
///
@property (nonatomic , strong) ShouYeLiShiJiLuXZTableViewCellBack backValue;
@end
NS_ASSUME_NONNULL_END

View File

@ -6,9 +6,16 @@
//
#import "ShouYeLiShiJiLuXZTableViewCell.h"
#import "NomoAlterView.h"
#import "NetWorkManager.h"
#import "XieZuoJiLuXiangQingViewController.h"
@interface ShouYeLiShiJiLuXZTableViewCell ()
///
@property (nonatomic , strong) UILabel *lbname;
@property (nonatomic , strong) UILabel *lbinfo;
@property (nonatomic , strong) UILabel *lbtime;
@property (nonatomic , strong) UILabel *lbtype;
@end
@ -41,6 +48,7 @@
make.top.offset(14);
make.right.equalTo(viewback).offset(-12);
}];
_lbname = lbname;
UILabel *lbinfo = [[UILabel alloc] init];
[lbinfo setText:@"描绘早晨的场景:运用细节描绘,如“熙攘的人群热吧校门口的敬礼仪式”,体现新环境的秩序与规矩,象征着成长的仪..."];
@ -53,6 +61,7 @@
make.left.right.equalTo(lbname);
make.top.equalTo(lbname.mas_bottom).offset(8);
}];
_lbinfo = lbinfo;
UIView *viewline = [[UIView alloc] init];
[viewline setBackgroundColor:RGBCOLOR(238, 238, 238)];
@ -73,7 +82,7 @@
make.left.equalTo(viewline);
make.top.equalTo(viewline.mas_bottom).offset(16);
}];
_lbtime = lbtime;
UIButton *btchakan = [[UIButton alloc] init];
[btchakan setTitle:@"查看详情" forState:UIControlStateNormal];
@ -89,6 +98,7 @@
make.right.equalTo(viewline);
make.top.equalTo(viewline.mas_bottom).offset(12);
}];
[btchakan addTarget:self action:@selector(seeAction) forControlEvents:UIControlEventTouchUpInside];
UIButton *btdel = [[UIButton alloc] init];
[btdel setTitle:@"删除" forState:UIControlStateNormal];
@ -104,6 +114,7 @@
make.top.equalTo(btchakan);
make.size.sizeOffset(CGSizeMake(38, 26));
}];
[btdel addTarget:self action:@selector(delAction) forControlEvents:UIControlEventTouchUpInside];
UIView *viewtype = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 84, 24)];
[viewtype setBackgroundColor:[UIColor whiteColor]];
@ -123,6 +134,7 @@
[lbtype mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(viewtype);
}];
_lbtype = lbtype;
///CGAffineTransform
viewtype.transform = CGAffineTransformMakeRotation(45 * M_PI/180.0);;
@ -132,4 +144,71 @@
return self;
}
-(void)setModel:(WriteSaveHestoryModelDataItems *)model
{
_model = model;
self.lbname.text = [Tools isStringnilkong:model.title];
self.lbtime.text = [Tools isStringnilkong:model.create_time];
self.lbtype.text = [self getContentType:model.scene];
NSString *str = model.info.content;
///
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
style.lineSpacing = 5;
style.lineBreakMode = NSLineBreakByTruncatingTail;
style.alignment = NSTextAlignmentLeft;
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:str];
[attrString addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, str.length)];
self.lbinfo.attributedText = attrString;
}
-(void)seeAction
{
XieZuoJiLuXiangQingViewController *vc = [XieZuoJiLuXiangQingViewController new];
vc.modelDetail = self.model;
[self.viewController.navigationController pushViewController:vc animated:YES];
}
-(void)delAction
{
[NomoAlterView showInfo:@"您确定要删除记录吗?" SelectTag:^(NSInteger tag) {
if(tag==1)
{
[LoadAlterView show];
[NetWorkManager requestWriteSaveHestoryDelData:self ID:self.model.ID Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
if(self.backValue)
{
self.backValue(self.model);
}
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
}];
}
-(NSString *)getContentType:(NSString *)value
{
NSString *strback = @"改写润色";
NSDictionary *dic = @{@"write_with_outline":@"思路成文",
@"write_one_key":@"一键成文",
@"rewrite_example_text":@"范文改写",
@"write_with_content":@"段落续写"};
@try {
strback = [Tools isStringnil:[dic objectForKey:value]];
} @catch (NSException *exception) {
} @finally {
if(strback.length==0)strback = @"改写润色";
}
return strback;
}
@end

View File

@ -0,0 +1,17 @@
//
// XieZuoJiLuXiangQingViewController.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import "BaseViewController.h"
#import "WriteSaveHestoryModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface XieZuoJiLuXiangQingViewController : BaseViewController
///
@property (nonatomic , strong) WriteSaveHestoryModelDataItems *modelDetail;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,40 @@
//
// XieZuoJiLuXiangQingViewController.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "XieZuoJiLuXiangQingViewController.h"
#import "XieZuoJiLuXiangQingView.h"
@interface XieZuoJiLuXiangQingViewController ()
@end
@implementation XieZuoJiLuXiangQingViewController
- (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 clearColor]];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:[UIColor whiteColor]];
XieZuoJiLuXiangQingView *view = [XieZuoJiLuXiangQingView new];
[self.view addSubview:view];
[view mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.top.offset(NavHeight);
}];
view.modelDetail = self.modelDetail;
}
@end

View File

@ -0,0 +1,16 @@
//
// XieZuoJiLuXiangQingView.h
// ProductApp
//
// Created by 工作 on 2024/10/29.
//
#import <UIKit/UIKit.h>
#import "WriteSaveHestoryModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface XieZuoJiLuXiangQingView : UIView
@property (nonatomic , strong) WriteSaveHestoryModelDataItems *modelDetail;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,150 @@
//
// XieZuoJiLuXiangQingView.m
// ProductApp
//
// Created by on 2024/10/29.
//
#import "XieZuoJiLuXiangQingView.h"
@interface XieZuoJiLuXiangQingView ()
///
@property (nonatomic , strong) UIScrollView *scvback;
///
@property (nonatomic , strong) UILabel *lbname;
@property (nonatomic , strong) UILabel *lbrequer;
@property (nonatomic , strong) UILabel *lbzhishu;
///
@property (nonatomic , strong) ViewLable *lbwz;
@end
@implementation XieZuoJiLuXiangQingView
-(id)initWithFrame:(CGRect)frame
{
if(self = [super initWithFrame:frame])
{
UIScrollView *scvback = [[UIScrollView alloc] init];
[self addSubview:scvback];
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.offset(0);
make.width.equalTo(self);
make.height.equalTo(self).offset(-TabHeight-20);
}];
_scvback = scvback;
[self drawInfoView:scvback];
UIView *viewbottom = [[UIView alloc] init];
[viewbottom setBackgroundColor:[UIColor whiteColor]];
[self addSubview:viewbottom];
[viewbottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self);
make.top.equalTo(scvback.mas_bottom);
}];
[self drawBottomView:viewbottom];
}
return self;
}
-(void)drawInfoView:(UIScrollView *)view
{
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"写人作文"];
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
[lbname setTextAlignment:NSTextAlignmentCenter];
[lbname setFont:[UIFont boldSystemFontOfSize:24]];
[view addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.offset(10);
make.width.equalTo(view).offset(-40);
}];
_lbname = lbname;
UILabel *lbrequer = [[UILabel alloc] init];
[lbrequer setText:@""];
[lbrequer setTextColor:RGBCOLOR(109, 109, 109)];
[lbrequer setTextAlignment:NSTextAlignmentCenter];
[lbrequer setFont:[UIFont systemFontOfSize:12]];
[lbrequer setNumberOfLines:0];
[view addSubview:lbrequer];
[lbrequer mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(lbname);
make.top.equalTo(lbname.mas_bottom).offset(15);
}];
_lbrequer = lbrequer;
UILabel *lbzhishu = [[UILabel alloc] init];
[lbzhishu setText:@"800字"];
[lbzhishu setTextColor:RGBCOLOR(109, 109, 109)];
[lbzhishu setTextAlignment:NSTextAlignmentCenter];
[lbzhishu setFont:[UIFont systemFontOfSize:12]];
[view addSubview:lbzhishu];
[lbzhishu mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(lbname);
make.top.equalTo(lbrequer.mas_bottom).offset(15);
}];
_lbzhishu = lbzhishu;
ViewLable *lbwz = [[ViewLable alloc] init];
[view addSubview:lbwz];
[lbwz mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(20);
make.width.equalTo(view).offset(-40);
make.top.equalTo(lbzhishu.mas_bottom).offset(20);
}];
lbwz.textColor = RGBCOLOR(61, 61, 61);
lbwz.textFont = [UIFont systemFontOfSize:16];
[self.scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(lbwz.mas_bottom).offset(20);
}];
lbwz.isCloseAnimation = YES;
_lbwz = lbwz;
}
-(void)drawBottomView:(UIView *)view
{
UIView *viewline = [[UIView alloc] init];
[viewline setBackgroundColor:RGBCOLOR(248, 248, 248)];
[view addSubview:viewline];
[viewline mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(view);
make.height.offset(1);
}];
UIButton *btcreate = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-40, 40)];
[btcreate setTitle:@"复制全文" forState:UIControlStateNormal];
[btcreate setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btcreate.titleLabel setFont:[UIFont boldSystemFontOfSize:18]];
[btcreate.layer setMasksToBounds:YES];
[btcreate.layer setCornerRadius:10];
[view addSubview:btcreate];
[btcreate mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(20);
make.right.equalTo(view).offset(-20);
make.height.offset(40);
make.top.offset(10);
}];
[btcreate addTarget:self action:@selector(bottomAction) forControlEvents:UIControlEventTouchUpInside];
[Tools changedView:btcreate colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
}
-(void)setModelDetail:(WriteSaveHestoryModelDataItems *)modelDetail
{
_modelDetail = modelDetail;
self.lbname.text = modelDetail.title;
self.lbrequer.text = [Tools isStringnil:modelDetail.info.type];
self.lbzhishu.text = [Tools isStringnil:modelDetail.info.stage];
if([Tools isStringnil:modelDetail.info.stage].length==0)
{
self.lbzhishu.text = @"全学段";
}
self.lbwz.strValue = modelDetail.info.content;
}
-(void)bottomAction
{
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = [Tools isStringnil:self.modelDetail.info.content];;
[HXHud showMessage:@"复制成功" afterDelayType:0];
}
@end

View File

@ -7,11 +7,13 @@
#import "ShouYeLiShiJiLuPGTableViewController.h"
#import "ShouYeLiShiJiLuPGTableViewCell.h"
#import "NetWorkManager.h"
@interface ShouYeLiShiJiLuPGTableViewController ()<UITableViewDelegate,UITableViewDataSource>
///
@property (nonatomic , strong) UITableView *tableView;
///
@property (nonatomic , strong) NSMutableArray *arrdata;
@end
@implementation ShouYeLiShiJiLuPGTableViewController
@ -30,12 +32,50 @@
make.edges.equalTo(self.view);
}];
_tableView = tableView;
[self getdata];
}
-(void)getdata
{
[LoadAlterView show];
if(self.type==1)
{
[NetWorkManager requestCorrectSaveHestoryData:self.view Callback:^(BOOL state, CorrectSaveModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
self.arrdata = [[NSMutableArray alloc] initWithArray:responseObject.data.items];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
[self.tableView reloadData];
}];
}
else
{
[NetWorkManager requestPicAiSaveHestoryData:self.view Callback:^(BOOL state, CorrectSaveModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
self.arrdata = [[NSMutableArray alloc] initWithArray:responseObject.data.items];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
[self.tableView reloadData];
}];
}
}
#pragma mark - Table view data source
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 10;
return self.arrdata.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
@ -48,7 +88,11 @@
[cell setBackgroundColor:[UIColor clearColor]];
}
cell.type = self.type;
cell.model = self.arrdata[indexPath.row];
[cell setBackValue:^(id _Nonnull model) {
[self.arrdata removeObject:model];
[self.tableView reloadData];
}];
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

View File

@ -6,12 +6,18 @@
//
#import <UIKit/UIKit.h>
#import "CorrectSaveModel.h"
NS_ASSUME_NONNULL_BEGIN
typedef void(^ShouYeLiShiJiLuPGTableViewCellBack)(id model);
@interface ShouYeLiShiJiLuPGTableViewCell : UITableViewCell
///1批改 2拍题
@property (nonatomic , assign) NSInteger type;
///
@property (nonatomic , strong) CorrectSaveModelDataItem *model;
///
@property (nonatomic , strong) ShouYeLiShiJiLuPGTableViewCellBack backValue;
@end
NS_ASSUME_NONNULL_END

View File

@ -8,6 +8,11 @@
#import "ShouYeLiShiJiLuPGTableViewCell.h"
#import "ShouYeLiShiJiLuPGCollectionViewCell.h"
#import "NomoAlterView.h"
#import "NetWorkManager.h"
#import "StartZWPIDetailViewController.h"
#import "StartPZXZDetailViewController.h"
@interface ShouYeLiShiJiLuPGTableViewCell ()<UICollectionViewDelegate,UICollectionViewDataSource>
///
@ -68,8 +73,9 @@
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.minimumLineSpacing = 0;
layout.minimumInteritemSpacing = 0;
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
UICollectionView *collect = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
[collect setScrollEnabled:NO];
// [collect setScrollEnabled:NO];
[collect setDelegate:self];
[collect setDataSource:self];
[collect setBackgroundColor:[UIColor clearColor]];
@ -121,6 +127,7 @@
make.right.equalTo(viewline);
make.top.equalTo(viewline.mas_bottom).offset(12);
}];
[btchakan addTarget:self action:@selector(seeAction) forControlEvents:UIControlEventTouchUpInside];
UIButton *btdel = [[UIButton alloc] init];
[btdel setTitle:@"删除" forState:UIControlStateNormal];
@ -136,7 +143,7 @@
make.top.equalTo(btchakan);
make.size.sizeOffset(CGSizeMake(38, 26));
}];
[btdel addTarget:self action:@selector(delAction) forControlEvents:UIControlEventTouchUpInside];
}
return self;
}
@ -158,19 +165,123 @@
}];
[self.viewtype setHidden:YES];
}
}
-(void)setModel:(CorrectSaveModelDataItem *)model
{
_model = model;
self.lbtime.text = [Tools isStringnilkong:model.create_time];
[self.collect reloadData];
}
-(void)delAction
{
[NomoAlterView showInfo:@"您确定要删除记录吗?" SelectTag:^(NSInteger tag) {
if(tag==1)
{
[LoadAlterView show];
if(self.type==1)
{///
[NetWorkManager requestCorrectSaveDelData:self ID:self.model.ID Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
if(self.backValue)
{
self.backValue(self.model);
}
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
else
{///
[NetWorkManager requestPicAiSaveDelData:self ID:self.model.ID Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
if(self.backValue)
{
self.backValue(self.model);
}
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
}
}];
}
-(void)seeAction
{
[LoadAlterView show];
if(self.type==1)
{
[NetWorkManager requestCorrectSaveDetailData:self ID:self.model.ID Callback:^(BOOL state, CorrectSaveDetailModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
StartZWPIDetailViewController *vc = [StartZWPIDetailViewController new];
vc.modelHestory = responseObject.data;
[self.viewController.navigationController pushViewController:vc animated:YES];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
else
{
[NetWorkManager requestPicAiSaveDetailData:self ID:self.model.ID Callback:^(BOOL state, PicAiSaveDetailModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
StartPZXZDetailViewController *vc = [StartPZXZDetailViewController new];
vc.modelHestory = responseObject.data;
vc.type = [self getSceneBack:self.model.scene];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
}
///pic_rewrite pic_question pic_with_front
///10 11 12
-(int)getSceneBack:(NSString *)value
{
int back = 10;
if([value isEqualToString:@"pic_question"])
{
back = 11;
}
else if([value isEqualToString:@"pic_with_front"])
{
back = 12;
}
return back;
}
#pragma mark - UICollectionView
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return 3;
return self.model.images.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
ShouYeLiShiJiLuPGCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ShouYeLiShiJiLuPGCollectionViewCell" forIndexPath:indexPath];
[cell.imgvback setBackgroundColor:[UIColor grayColor]];
[cell.imgvback sd_setImageWithURL:[NSURL URLWithString:self.model.images[indexPath.row]] placeholderImage:nil];
return cell;
}

View File

@ -22,7 +22,7 @@
[self.navigationController setNavigationBarHidden:YES animated:animated];
[self showNaviGationView:YES];
[self.navigationView setTitle:@"写作生成" titleColor:RGBCOLOR(60, 60, 60)];
if([self.scene isEqualToString:@"rewrite_correct"])
if([self.scene isEqualToString:@"rewrite_correct"]||[self.scene isEqualToString:@"rewrite_example_text"])
{
[self.navigationView setTitle:@"改写润色" titleColor:RGBCOLOR(60, 60, 60)];
}

View File

@ -220,13 +220,24 @@
{
_dicpush = dicpush;
self.lbname.text = [Tools isStringnilkong:[dicpush objectForKey:@"title"]];
self.lbzhishu.text = [NSString stringWithFormat:@"%@字",[dicpush objectForKey:@"require_num"]];
if([Tools isStringnil:[dicpush objectForKey:@"require_num"]].length>0)
{
self.lbzhishu.text = [NSString stringWithFormat:@"%@字",[dicpush objectForKey:@"require_num"]];
}
else
{
self.lbzhishu.text = @"";
}
if([Tools isStringnil:[dicpush objectForKey:@"require"]].length>0)
{
[self.lbrequer mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.lbname.mas_bottom).offset(15);
}];
self.lbrequer.text = [dicpush objectForKey:@"require"];
self.lbrequer.text = [NSString stringWithFormat:@"全文要求:%@",[dicpush objectForKey:@"require"]];
if([[dicpush objectForKey:@"require"] length]<20)
{
[self.lbrequer setTextAlignment:NSTextAlignmentCenter];
}
}
}
-(void)setArrSL:(NSArray *)arrSL
@ -330,7 +341,7 @@
[arrcontent addObject:model.value];
}
}
[dicinfo setObject:[arrcontent componentsJoinedByString:@"\n"] forKey:@"content"];
[dicinfo setObject:[NSString stringWithFormat:@" %@",[arrcontent componentsJoinedByString:@"\n "]] forKey:@"content"];
[dicinfo setObject:[NSString stringWithFormat:@"%d",rand()%5+95] forKey:@"score"];
if(self.arrSL.count==4)
{

View File

@ -248,7 +248,7 @@
[arrcontent addObject:model.value];
}
}
[dicinfo setObject:[arrcontent componentsJoinedByString:@"\n"] forKey:@"content"];
[dicinfo setObject:[NSString stringWithFormat:@" %@",[arrcontent componentsJoinedByString:@"\n "]] forKey:@"content"];
[dicinfo setObject:[NSString stringWithFormat:@"%d",rand()%6+95] forKey:@"score"];
[dicinfo setObject:[Tools isStringnil:[self.dicpush objectForKey:@"paragraph"]] forKey:@"paragraph"];

View File

@ -443,7 +443,16 @@
///
-(void)moreAction
{
/*
@property (nonatomic , strong) NSString *type_id;
@property (nonatomic , strong) NSString *role_id;
@property (nonatomic , strong) NSString *topic;///
@property (nonatomic , strong) NSString *textbook_id;
*/
FanWenSearchListViewController *vc = [FanWenSearchListViewController new];
// vc.strkey = self.modelDetail.title;
// vc.topic = self.modelDetail.genre;
vc.textbook_id = self.modelDetail.ID;
[self.viewController.navigationController pushViewController:vc animated:YES];
}
///