绘制sse综合评价
This commit is contained in:
parent
c97c18b237
commit
c8ca269f23
|
@ -217,6 +217,11 @@
|
||||||
CA6B97302CBD11B1000213F3 /* AIChatFunctionCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6B972F2CBD11B1000213F3 /* AIChatFunctionCollectionViewCell.m */; };
|
CA6B97302CBD11B1000213F3 /* AIChatFunctionCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6B972F2CBD11B1000213F3 /* AIChatFunctionCollectionViewCell.m */; };
|
||||||
CA6B97342CBD1FA0000213F3 /* AIChaAnswerView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6B97332CBD1FA0000213F3 /* AIChaAnswerView.m */; };
|
CA6B97342CBD1FA0000213F3 /* AIChaAnswerView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6B97332CBD1FA0000213F3 /* AIChaAnswerView.m */; };
|
||||||
CA6B97372CBD2102000213F3 /* AIChaAnswerTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6B97362CBD2102000213F3 /* AIChaAnswerTableViewCell.m */; };
|
CA6B97372CBD2102000213F3 /* AIChaAnswerTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6B97362CBD2102000213F3 /* AIChaAnswerTableViewCell.m */; };
|
||||||
|
CA6D54742CCB3FC8001B530A /* CamreShiLiView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6D54732CCB3FC8001B530A /* CamreShiLiView.m */; };
|
||||||
|
CA6D54772CCB7C5D001B530A /* PicAiModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6D54762CCB7C5D001B530A /* PicAiModel.m */; };
|
||||||
|
CA6D547A2CCB9F00001B530A /* CorrectWriteCorrectModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6D54792CCB9F00001B530A /* CorrectWriteCorrectModel.m */; };
|
||||||
|
CA6D547D2CCB9FA8001B530A /* CorrectWriteErrorModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6D547C2CCB9FA8001B530A /* CorrectWriteErrorModel.m */; };
|
||||||
|
CA6D54802CCBA3C2001B530A /* WriteCorrectScoreModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA6D547F2CCBA3C2001B530A /* WriteCorrectScoreModel.m */; };
|
||||||
CA8181882C9E58B100EE7E6E /* StartKTXZWenZhangViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8181872C9E58B100EE7E6E /* StartKTXZWenZhangViewController.m */; };
|
CA8181882C9E58B100EE7E6E /* StartKTXZWenZhangViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8181872C9E58B100EE7E6E /* StartKTXZWenZhangViewController.m */; };
|
||||||
CA81818B2C9E598300EE7E6E /* StartKTXZWenZhangView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA81818A2C9E598300EE7E6E /* StartKTXZWenZhangView.m */; };
|
CA81818B2C9E598300EE7E6E /* StartKTXZWenZhangView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA81818A2C9E598300EE7E6E /* StartKTXZWenZhangView.m */; };
|
||||||
CA81818E2C9E60B100EE7E6E /* ViewLable.m in Sources */ = {isa = PBXBuildFile; fileRef = CA81818D2C9E60B100EE7E6E /* ViewLable.m */; };
|
CA81818E2C9E60B100EE7E6E /* ViewLable.m in Sources */ = {isa = PBXBuildFile; fileRef = CA81818D2C9E60B100EE7E6E /* ViewLable.m */; };
|
||||||
|
@ -882,6 +887,16 @@
|
||||||
CA6B97332CBD1FA0000213F3 /* AIChaAnswerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIChaAnswerView.m; sourceTree = "<group>"; };
|
CA6B97332CBD1FA0000213F3 /* AIChaAnswerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIChaAnswerView.m; sourceTree = "<group>"; };
|
||||||
CA6B97352CBD2102000213F3 /* AIChaAnswerTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AIChaAnswerTableViewCell.h; sourceTree = "<group>"; };
|
CA6B97352CBD2102000213F3 /* AIChaAnswerTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AIChaAnswerTableViewCell.h; sourceTree = "<group>"; };
|
||||||
CA6B97362CBD2102000213F3 /* AIChaAnswerTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIChaAnswerTableViewCell.m; sourceTree = "<group>"; };
|
CA6B97362CBD2102000213F3 /* AIChaAnswerTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIChaAnswerTableViewCell.m; sourceTree = "<group>"; };
|
||||||
|
CA6D54722CCB3FC8001B530A /* CamreShiLiView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CamreShiLiView.h; sourceTree = "<group>"; };
|
||||||
|
CA6D54732CCB3FC8001B530A /* CamreShiLiView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CamreShiLiView.m; sourceTree = "<group>"; };
|
||||||
|
CA6D54752CCB7C5D001B530A /* PicAiModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PicAiModel.h; sourceTree = "<group>"; };
|
||||||
|
CA6D54762CCB7C5D001B530A /* PicAiModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PicAiModel.m; sourceTree = "<group>"; };
|
||||||
|
CA6D54782CCB9F00001B530A /* CorrectWriteCorrectModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CorrectWriteCorrectModel.h; sourceTree = "<group>"; };
|
||||||
|
CA6D54792CCB9F00001B530A /* CorrectWriteCorrectModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CorrectWriteCorrectModel.m; sourceTree = "<group>"; };
|
||||||
|
CA6D547B2CCB9FA8001B530A /* CorrectWriteErrorModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CorrectWriteErrorModel.h; sourceTree = "<group>"; };
|
||||||
|
CA6D547C2CCB9FA8001B530A /* CorrectWriteErrorModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CorrectWriteErrorModel.m; sourceTree = "<group>"; };
|
||||||
|
CA6D547E2CCBA3C2001B530A /* WriteCorrectScoreModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WriteCorrectScoreModel.h; sourceTree = "<group>"; };
|
||||||
|
CA6D547F2CCBA3C2001B530A /* WriteCorrectScoreModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WriteCorrectScoreModel.m; sourceTree = "<group>"; };
|
||||||
CA8181862C9E58B100EE7E6E /* StartKTXZWenZhangViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StartKTXZWenZhangViewController.h; sourceTree = "<group>"; };
|
CA8181862C9E58B100EE7E6E /* StartKTXZWenZhangViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StartKTXZWenZhangViewController.h; sourceTree = "<group>"; };
|
||||||
CA8181872C9E58B100EE7E6E /* StartKTXZWenZhangViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StartKTXZWenZhangViewController.m; sourceTree = "<group>"; };
|
CA8181872C9E58B100EE7E6E /* StartKTXZWenZhangViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StartKTXZWenZhangViewController.m; sourceTree = "<group>"; };
|
||||||
CA8181892C9E598300EE7E6E /* StartKTXZWenZhangView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StartKTXZWenZhangView.h; sourceTree = "<group>"; };
|
CA8181892C9E598300EE7E6E /* StartKTXZWenZhangView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StartKTXZWenZhangView.h; sourceTree = "<group>"; };
|
||||||
|
@ -1863,6 +1878,8 @@
|
||||||
CA11ED5C2CA653F600209DFC /* CamreImagesView.m */,
|
CA11ED5C2CA653F600209DFC /* CamreImagesView.m */,
|
||||||
CA11ED622CA6851200209DFC /* CamreTiShiAlterView.h */,
|
CA11ED622CA6851200209DFC /* CamreTiShiAlterView.h */,
|
||||||
CA11ED632CA6851200209DFC /* CamreTiShiAlterView.m */,
|
CA11ED632CA6851200209DFC /* CamreTiShiAlterView.m */,
|
||||||
|
CA6D54722CCB3FC8001B530A /* CamreShiLiView.h */,
|
||||||
|
CA6D54732CCB3FC8001B530A /* CamreShiLiView.m */,
|
||||||
);
|
);
|
||||||
path = view;
|
path = view;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -3053,6 +3070,14 @@
|
||||||
CA9CFF6D2CC9DFCC00C3E90E /* ExampleTextGreatModel.m */,
|
CA9CFF6D2CC9DFCC00C3E90E /* ExampleTextGreatModel.m */,
|
||||||
CA9CFF6F2CC9E9E300C3E90E /* RoleInfoModel.h */,
|
CA9CFF6F2CC9E9E300C3E90E /* RoleInfoModel.h */,
|
||||||
CA9CFF702CC9E9E300C3E90E /* RoleInfoModel.m */,
|
CA9CFF702CC9E9E300C3E90E /* RoleInfoModel.m */,
|
||||||
|
CA6D54752CCB7C5D001B530A /* PicAiModel.h */,
|
||||||
|
CA6D54762CCB7C5D001B530A /* PicAiModel.m */,
|
||||||
|
CA6D54782CCB9F00001B530A /* CorrectWriteCorrectModel.h */,
|
||||||
|
CA6D54792CCB9F00001B530A /* CorrectWriteCorrectModel.m */,
|
||||||
|
CA6D547B2CCB9FA8001B530A /* CorrectWriteErrorModel.h */,
|
||||||
|
CA6D547C2CCB9FA8001B530A /* CorrectWriteErrorModel.m */,
|
||||||
|
CA6D547E2CCBA3C2001B530A /* WriteCorrectScoreModel.h */,
|
||||||
|
CA6D547F2CCBA3C2001B530A /* WriteCorrectScoreModel.m */,
|
||||||
);
|
);
|
||||||
path = models;
|
path = models;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -4530,6 +4555,7 @@
|
||||||
CA5D02E22CC0DD6B007B3BA5 /* ActivityListModel.m in Sources */,
|
CA5D02E22CC0DD6B007B3BA5 /* ActivityListModel.m in Sources */,
|
||||||
CAC8064A2CA119C500C21AA7 /* StartZWPIDetailViewController.m in Sources */,
|
CAC8064A2CA119C500C21AA7 /* StartZWPIDetailViewController.m in Sources */,
|
||||||
CA9CFF712CC9E9E300C3E90E /* RoleInfoModel.m in Sources */,
|
CA9CFF712CC9E9E300C3E90E /* RoleInfoModel.m in Sources */,
|
||||||
|
CA6D54772CCB7C5D001B530A /* PicAiModel.m in Sources */,
|
||||||
CB489DCA27449D5C00DA044A /* AppDelegate.m in Sources */,
|
CB489DCA27449D5C00DA044A /* AppDelegate.m in Sources */,
|
||||||
CB489F8B2744A0BD00DA044A /* NSString+extend.m in Sources */,
|
CB489F8B2744A0BD00DA044A /* NSString+extend.m in Sources */,
|
||||||
CA5D02E82CC0DD6B007B3BA5 /* UserLoginModel.m in Sources */,
|
CA5D02E82CC0DD6B007B3BA5 /* UserLoginModel.m in Sources */,
|
||||||
|
@ -4543,6 +4569,7 @@
|
||||||
CB489F532744A0BD00DA044A /* RecordAudio.m in Sources */,
|
CB489F532744A0BD00DA044A /* RecordAudio.m in Sources */,
|
||||||
CAC8063E2CA10B1600C21AA7 /* StartZWPIViewController.m in Sources */,
|
CAC8063E2CA10B1600C21AA7 /* StartZWPIViewController.m in Sources */,
|
||||||
CA11ED7D2CA6B0DE00209DFC /* XieZuoFenXiangAlterView.m in Sources */,
|
CA11ED7D2CA6B0DE00209DFC /* XieZuoFenXiangAlterView.m in Sources */,
|
||||||
|
CA6D54802CCBA3C2001B530A /* WriteCorrectScoreModel.m in Sources */,
|
||||||
CAC806732CA171ED00C21AA7 /* StartPZXZPageView.m in Sources */,
|
CAC806732CA171ED00C21AA7 /* StartPZXZPageView.m in Sources */,
|
||||||
CA5D02AB2CC0B2DE007B3BA5 /* SetTableViewCell.m in Sources */,
|
CA5D02AB2CC0B2DE007B3BA5 /* SetTableViewCell.m in Sources */,
|
||||||
CA6B971A2CBCBD56000213F3 /* FanWenDetailView.m in Sources */,
|
CA6B971A2CBCBD56000213F3 /* FanWenDetailView.m in Sources */,
|
||||||
|
@ -4600,6 +4627,7 @@
|
||||||
CA8181992C9E77FB00EE7E6E /* DownJDLoadView.m in Sources */,
|
CA8181992C9E77FB00EE7E6E /* DownJDLoadView.m in Sources */,
|
||||||
CB489F6F2744A0BD00DA044A /* XLAlertView.m in Sources */,
|
CB489F6F2744A0BD00DA044A /* XLAlertView.m in Sources */,
|
||||||
CA0D085A2CA543E40086855E /* ShouYeZCPPTTableViewCell.m in Sources */,
|
CA0D085A2CA543E40086855E /* ShouYeZCPPTTableViewCell.m in Sources */,
|
||||||
|
CA6D547A2CCB9F00001B530A /* CorrectWriteCorrectModel.m in Sources */,
|
||||||
CA81819D2C9E9C6600EE7E6E /* StartKTXZPGDetailViewController.m in Sources */,
|
CA81819D2C9E9C6600EE7E6E /* StartKTXZPGDetailViewController.m in Sources */,
|
||||||
CB489FA32744A0BD00DA044A /* ZJContentView.m in Sources */,
|
CB489FA32744A0BD00DA044A /* ZJContentView.m in Sources */,
|
||||||
CA5D02E62CC0DD6B007B3BA5 /* UserUploadModel.m in Sources */,
|
CA5D02E62CC0DD6B007B3BA5 /* UserUploadModel.m in Sources */,
|
||||||
|
@ -4623,6 +4651,7 @@
|
||||||
CA0FD6A82CA900E2009A4417 /* FXTextView.m in Sources */,
|
CA0FD6A82CA900E2009A4417 /* FXTextView.m in Sources */,
|
||||||
CA0D086D2CA548F70086855E /* ShouYeLiShiJiLuPPTTableViewController.m in Sources */,
|
CA0D086D2CA548F70086855E /* ShouYeLiShiJiLuPPTTableViewController.m in Sources */,
|
||||||
CA8EE5292CC905BD009D73E3 /* NomoAlterView.m in Sources */,
|
CA8EE5292CC905BD009D73E3 /* NomoAlterView.m in Sources */,
|
||||||
|
CA6D547D2CCB9FA8001B530A /* CorrectWriteErrorModel.m in Sources */,
|
||||||
CA487D932CA4055B00AE773B /* StartPayGoodsCollectionViewCell.m in Sources */,
|
CA487D932CA4055B00AE773B /* StartPayGoodsCollectionViewCell.m in Sources */,
|
||||||
CA4257B62CA2BBB000A36A10 /* StartPayView.m in Sources */,
|
CA4257B62CA2BBB000A36A10 /* StartPayView.m in Sources */,
|
||||||
CB489DDB27449D5D00DA044A /* main.m in Sources */,
|
CB489DDB27449D5D00DA044A /* main.m in Sources */,
|
||||||
|
@ -4736,6 +4765,7 @@
|
||||||
CA5D03672CC0DE8D007B3BA5 /* YouHuiQuanDuiHuanSuccessView.m in Sources */,
|
CA5D03672CC0DE8D007B3BA5 /* YouHuiQuanDuiHuanSuccessView.m in Sources */,
|
||||||
CABA14D92C9D5071002CB3B1 /* PageControlView.m in Sources */,
|
CABA14D92C9D5071002CB3B1 /* PageControlView.m in Sources */,
|
||||||
CAF76E8E2CBE650600825E5E /* GongJuCreateTextInputView.m in Sources */,
|
CAF76E8E2CBE650600825E5E /* GongJuCreateTextInputView.m in Sources */,
|
||||||
|
CA6D54742CCB3FC8001B530A /* CamreShiLiView.m in Sources */,
|
||||||
CAF76E772CBE513A00825E5E /* GongJuSearchViewController.m in Sources */,
|
CAF76E772CBE513A00825E5E /* GongJuSearchViewController.m in Sources */,
|
||||||
CA4257852CA24E1100A36A10 /* StartPZXZDetailViewController.m in Sources */,
|
CA4257852CA24E1100A36A10 /* StartPZXZDetailViewController.m in Sources */,
|
||||||
CB489FA52744A0BD00DA044A /* ZJSegmentStyle.m in Sources */,
|
CB489FA52744A0BD00DA044A /* ZJSegmentStyle.m in Sources */,
|
||||||
|
|
Binary file not shown.
|
@ -119,16 +119,16 @@
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
<BreakpointContent
|
<BreakpointContent
|
||||||
uuid = "22B3080E-B4F4-444B-808E-D572B53FDF79"
|
uuid = "DF95B401-F15A-4534-856F-854FA4C358F4"
|
||||||
shouldBeEnabled = "Yes"
|
shouldBeEnabled = "Yes"
|
||||||
ignoreCount = "0"
|
ignoreCount = "0"
|
||||||
continueAfterRunningActions = "No"
|
continueAfterRunningActions = "No"
|
||||||
filePath = "ProductApp/ProductMain/首页/智能写作/段落/view/DuanLuoXieZuoCellView.m"
|
filePath = "ProductApp/ProductMain/引导/作文批改/批改信息/view/StartZWPIDetailView.m"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "163"
|
startingLineNumber = "188"
|
||||||
endingLineNumber = "163"
|
endingLineNumber = "188"
|
||||||
landmarkName = "-nextAction"
|
landmarkName = "-tiyanAction"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#import <WXApi.h>
|
#import <WXApi.h>
|
||||||
#import <AlipaySDK/AlipaySDK.h>
|
#import <AlipaySDK/AlipaySDK.h>
|
||||||
|
|
||||||
|
#import "SSENetWorkManager.h"
|
||||||
|
|
||||||
@interface AppDelegate ()<WXApiDelegate>
|
@interface AppDelegate ()<WXApiDelegate>
|
||||||
|
|
||||||
|
|
22
ProductApp/ProductApp/Assets.xcassets/首页/cam_shili_ok.imageset/Contents.json
vendored
Normal file
22
ProductApp/ProductApp/Assets.xcassets/首页/cam_shili_ok.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "组 42708@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "组 42708@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
ProductApp/ProductApp/Assets.xcassets/首页/cam_shili_ok.imageset/组 42708@2x.png
vendored
Normal file
BIN
ProductApp/ProductApp/Assets.xcassets/首页/cam_shili_ok.imageset/组 42708@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
BIN
ProductApp/ProductApp/Assets.xcassets/首页/cam_shili_ok.imageset/组 42708@3x.png
vendored
Normal file
BIN
ProductApp/ProductApp/Assets.xcassets/首页/cam_shili_ok.imageset/组 42708@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
|
@ -88,6 +88,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
+(NSMutableArray *)getSyetemPay;
|
+(NSMutableArray *)getSyetemPay;
|
||||||
///根据身份获取字符串
|
///根据身份获取字符串
|
||||||
+(NSString *)getidentityTypeString;
|
+(NSString *)getidentityTypeString;
|
||||||
|
///获取role_id
|
||||||
|
+(NSString *)getRole_id;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#import "NavgationController.h"
|
#import "NavgationController.h"
|
||||||
|
|
||||||
#import "PublicNetWorkManager.h"
|
#import "PublicNetWorkManager.h"
|
||||||
|
#import "RoleTreeModel.h"
|
||||||
|
|
||||||
static UserInfoModel *userinfo;
|
static UserInfoModel *userinfo;
|
||||||
@implementation UserInfoModel
|
@implementation UserInfoModel
|
||||||
|
@ -257,4 +258,27 @@ static UserInfoModel *userinfo;
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///获取role_id
|
||||||
|
+(NSString *)getRole_id
|
||||||
|
{
|
||||||
|
NSString *strback = @"";
|
||||||
|
if([UserInfoModel shareModel].identityType.intValue == 3)
|
||||||
|
{
|
||||||
|
if([UserInfoModel shareModel].isAllLevel.intValue == 1)
|
||||||
|
{
|
||||||
|
strback = [UserInfoModel shareModel].user_stage.pid;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strback = [UserInfoModel shareModel].user_stage.ID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strback = [UserInfoModel shareModel].user_stage.ID;
|
||||||
|
}
|
||||||
|
return strback;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -138,6 +138,10 @@ alpha:alphaValue]
|
||||||
///首页工具刷新
|
///首页工具刷新
|
||||||
#define HomeToosRef @"HomeToosRef"
|
#define HomeToosRef @"HomeToosRef"
|
||||||
|
|
||||||
|
///相机提示 拍照写作和作文批改
|
||||||
|
#define CamreTiShiPaiZhao @"CamreTiShiPaiZhao"
|
||||||
|
#define CamreTiShiPiGai @"CamreTiShiPiGai"
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -133,6 +133,7 @@
|
||||||
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:self.fspeed>0?self.fspeed:0.02 target:self selector:@selector(textSpeedAppend) userInfo:nil repeats:YES];
|
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:self.fspeed>0?self.fspeed:0.02 target:self selector:@selector(textSpeedAppend) userInfo:nil repeats:YES];
|
||||||
_timer = timer;
|
_timer = timer;
|
||||||
[[NSRunLoop mainRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];
|
[[NSRunLoop mainRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];
|
||||||
|
[[NSRunLoop mainRunLoop] addTimer:self.timer forMode:NSDefaultRunLoopMode];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-(void)textSpeedAppend
|
-(void)textSpeedAppend
|
||||||
|
@ -147,7 +148,11 @@
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(self.inow+1>self.strValue.length)return;
|
if(self.inow+1>self.strValue.length)
|
||||||
|
{
|
||||||
|
self.backHeight(-1,NO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
NSString *str = [self.strValue substringToIndex:self.inow];
|
NSString *str = [self.strValue substringToIndex:self.inow];
|
||||||
///行间距
|
///行间距
|
||||||
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
|
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
|
||||||
|
|
|
@ -18,6 +18,11 @@
|
||||||
#import "ExamplePptDetailModel.h"
|
#import "ExamplePptDetailModel.h"
|
||||||
#import "ExampleTextGreatModel.h"
|
#import "ExampleTextGreatModel.h"
|
||||||
#import "RoleInfoModel.h"
|
#import "RoleInfoModel.h"
|
||||||
|
#import "PicAiModel.h"
|
||||||
|
#import "CorrectWriteCorrectModel.h"
|
||||||
|
#import "CorrectWriteErrorModel.h"
|
||||||
|
#import "WriteCorrectScoreModel.h"
|
||||||
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@ -91,6 +96,27 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
scene:(NSString *)scene
|
scene:(NSString *)scene
|
||||||
Callback:(completeModeBlock)callback;
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
case 0://改写作文
|
||||||
|
origin = "photos_write";
|
||||||
|
scene = "pic_rewrite";
|
||||||
|
break;
|
||||||
|
case 1://拍题写作
|
||||||
|
origin = "photos_title";
|
||||||
|
scene = "pic_question";
|
||||||
|
break;
|
||||||
|
case 2://拍照续写
|
||||||
|
origin = "photos_continue";
|
||||||
|
scene = "pic_with_front";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
+ (void)requestExamplePicData:(UIView *)view
|
||||||
|
role_id:(NSString *)role_id
|
||||||
|
scene:(NSString *)scene
|
||||||
|
origin:(NSString *)origin
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
引导页ppt
|
引导页ppt
|
||||||
/api/example/ppt
|
/api/example/ppt
|
||||||
|
@ -213,6 +239,114 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
info:(NSDictionary *)info
|
info:(NSDictionary *)info
|
||||||
Callback:(completeModeBlock)callback;
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
#pragma mark - 拍照写作
|
||||||
|
/*
|
||||||
|
1上传需识别的图片
|
||||||
|
/api/file/ocr
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
2新建带图片记录
|
||||||
|
/api/pic/ai
|
||||||
|
images
|
||||||
|
*/
|
||||||
|
+ (void)requestPicAiData:(UIView *)view
|
||||||
|
images:(NSArray *)images
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
3获取记录的所有图片结果(只调用,是后台需要使用的接口)
|
||||||
|
/api/pic/ai/result
|
||||||
|
id
|
||||||
|
*/
|
||||||
|
+ (void)requestPicAiResultData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
3 sse接口
|
||||||
|
/api/pic/completions
|
||||||
|
scene (Query)
|
||||||
|
id (Body)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
添加拍图写作记录
|
||||||
|
/api/pic/ai/save
|
||||||
|
id
|
||||||
|
result { scene content}
|
||||||
|
*/
|
||||||
|
+ (void)requestPicAiSaveData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
scene:(NSString *)scene
|
||||||
|
content:(NSString *)content
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
#pragma mark - 作文批改
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
AiTypeWrite = 1 //智能写作
|
||||||
|
AiTypeCorrect = 2 //批改
|
||||||
|
AiTypeClassroom = 3 //课堂写作
|
||||||
|
AiTypePic = 4 //图片写作
|
||||||
|
AiTypeTool = 5 //工具
|
||||||
|
AiTypeExample = 6 //范文
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
作文批改-创建记录并识别
|
||||||
|
/api/correct/create
|
||||||
|
images []
|
||||||
|
sse_type
|
||||||
|
*/
|
||||||
|
+ (void)requestCorrectCreateData:(UIView *)view
|
||||||
|
images:(NSArray *)images
|
||||||
|
sse_type:(NSString *)sse_type
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改-反句子1
|
||||||
|
/api/correct/write_correct
|
||||||
|
id
|
||||||
|
*/
|
||||||
|
+ (void)requestCorrectWrite_correctData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改_错误寻找
|
||||||
|
/api/correct/write_correct_error
|
||||||
|
id
|
||||||
|
*/
|
||||||
|
+ (void)requestCorrectWrite_correct_errorData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改-评分2
|
||||||
|
/api/correct/write_correct_score
|
||||||
|
id
|
||||||
|
*/
|
||||||
|
+ (void)requestCorrectWrite_correct_scoreData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改-综合评价3
|
||||||
|
/api/correct sse
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改-句子评价4
|
||||||
|
/api/correct sse
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改-改写润色
|
||||||
|
/api/correct sse
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
语言列表key分组
|
语言列表key分组
|
||||||
/api/translate/language/key
|
/api/translate/language/key
|
||||||
|
|
|
@ -265,6 +265,56 @@
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
case 0://改写作文
|
||||||
|
origin = "photos_write";
|
||||||
|
scene = "pic_rewrite";
|
||||||
|
break;
|
||||||
|
case 1://拍题写作
|
||||||
|
origin = "photos_title";
|
||||||
|
scene = "pic_question";
|
||||||
|
break;
|
||||||
|
case 2://拍照续写
|
||||||
|
origin = "photos_continue";
|
||||||
|
scene = "pic_with_front";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
+ (void)requestExamplePicData:(UIView *)view
|
||||||
|
role_id:(NSString *)role_id
|
||||||
|
scene:(NSString *)scene
|
||||||
|
origin:(NSString *)origin
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
[dicQuery setObject:[Tools isStringnil:role_id] forKey:@"role_id"];
|
||||||
|
[dicQuery setObject:[Tools isStringnil:scene] forKey:@"scene"];
|
||||||
|
[dicQuery setObject:[Tools isStringnil:origin] forKey:@"origin"];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/example/pic" 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,[ExamplePicModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
引导页ppt
|
引导页ppt
|
||||||
/api/example/ppt
|
/api/example/ppt
|
||||||
|
@ -668,6 +718,305 @@
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - 拍照写作
|
||||||
|
/*
|
||||||
|
1上传需识别的图片
|
||||||
|
/api/file/ocr
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
2新建带图片记录
|
||||||
|
/api/pic/ai
|
||||||
|
images 图片ID
|
||||||
|
*/
|
||||||
|
+ (void)requestPicAiData:(UIView *)view
|
||||||
|
images:(NSArray *)images
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:images==nil?@[]:images forKey:@"images"];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/pic/ai" 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,[PicAiModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
3获取记录的所有图片结果(只调用,是后台需要使用的接口)
|
||||||
|
/api/pic/ai/result
|
||||||
|
id
|
||||||
|
*/
|
||||||
|
+ (void)requestPicAiResultData:(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/result" 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,[PicAiModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
添加拍图写作记录
|
||||||
|
/api/pic/ai/save
|
||||||
|
id
|
||||||
|
result { scene content}
|
||||||
|
*/
|
||||||
|
+ (void)requestPicAiSaveData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
scene:(NSString *)scene
|
||||||
|
content:(NSString *)content
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:[Tools isStringnil:ID] forKey:@"id"];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicresult = [NSMutableDictionary new];
|
||||||
|
[dicresult setObject:[Tools isStringnil:scene] forKey:@"scene"];
|
||||||
|
[dicresult setObject:[Tools isStringnil:content] forKey:@"content"];
|
||||||
|
[dicpush setObject:dicresult forKey:@"result"];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 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);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
3 sse接口
|
||||||
|
/api/pic/completions
|
||||||
|
scene (Query)
|
||||||
|
id (Body)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma mark - 作文批改
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
AiTypeWrite = 1 //智能写作
|
||||||
|
AiTypeCorrect = 2 //批改
|
||||||
|
AiTypeClassroom = 3 //课堂写作
|
||||||
|
AiTypePic = 4 //图片写作
|
||||||
|
AiTypeTool = 5 //工具
|
||||||
|
AiTypeExample = 6 //范文
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
作文批改-创建记录并识别
|
||||||
|
/api/correct/create
|
||||||
|
images []
|
||||||
|
sse_type
|
||||||
|
*/
|
||||||
|
+ (void)requestCorrectCreateData:(UIView *)view
|
||||||
|
images:(NSArray *)images
|
||||||
|
sse_type:(NSString *)sse_type
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:images==nil?@[]:images forKey:@"images"];
|
||||||
|
[dicpush setObject:[Tools isStringnil:sse_type] forKey:@"sse_type"];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/correct/create" 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,[PicAiModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改-反句子1
|
||||||
|
/api/correct/write_correct
|
||||||
|
id
|
||||||
|
*/
|
||||||
|
+ (void)requestCorrectWrite_correctData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:[Tools isStringnil:ID] forKey:@"id"];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/correct/write_correct" 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,[CorrectWriteCorrectModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改_错误寻找
|
||||||
|
/api/correct/write_correct_error
|
||||||
|
id
|
||||||
|
*/
|
||||||
|
+ (void)requestCorrectWrite_correct_errorData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:[Tools isStringnil:ID] forKey:@"id"];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/correct/write_correct_error" 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,[CorrectWriteErrorModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改-评分2
|
||||||
|
/api/correct/write_correct_score
|
||||||
|
id
|
||||||
|
*/
|
||||||
|
+ (void)requestCorrectWrite_correct_scoreData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:[Tools isStringnil:ID] forKey:@"id"];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/correct/write_correct_score" 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,[WriteCorrectScoreModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改-综合评价3
|
||||||
|
/api/correct sse
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改-句子评价4
|
||||||
|
/api/correct sse
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
作文批改-改写润色
|
||||||
|
/api/correct sse
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
语言列表key分组
|
语言列表key分组
|
||||||
/api/translate/language/key
|
/api/translate/language/key
|
||||||
|
|
|
@ -47,7 +47,8 @@
|
||||||
|
|
||||||
|
|
||||||
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:host]];
|
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:host]];
|
||||||
[request setValue:@"text/event-stream" forHTTPHeaderField:@"Content-Type"];
|
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
|
||||||
|
[request setValue:@"text/event-stream" forHTTPHeaderField:@"Accept"];
|
||||||
[request setHTTPMethod:@"POST"];
|
[request setHTTPMethod:@"POST"];
|
||||||
|
|
||||||
NSMutableDictionary *dicheadertemp = [NSMutableDictionary new];
|
NSMutableDictionary *dicheadertemp = [NSMutableDictionary new];
|
||||||
|
@ -74,7 +75,6 @@
|
||||||
|
|
||||||
[request setHTTPBody:[bodyString dataUsingEncoding:NSUTF8StringEncoding]];
|
[request setHTTPBody:[bodyString dataUsingEncoding:NSUTF8StringEncoding]];
|
||||||
|
|
||||||
|
|
||||||
NSURLSessionDataTask *task = [session dataTaskWithRequest:request];
|
NSURLSessionDataTask *task = [session dataTaskWithRequest:request];
|
||||||
// 启动任务
|
// 启动任务
|
||||||
[task resume];
|
[task resume];
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
//
|
||||||
|
// CorrectWriteCorrectModel.h
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "BaseModel.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@class CorrectWriteCorrectModelData,CorrectWriteCorrectModelDataSplit;
|
||||||
|
@interface CorrectWriteCorrectModel : BaseModel
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) CorrectWriteCorrectModelData *data;
|
||||||
|
@end
|
||||||
|
@interface CorrectWriteCorrectModelData : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *ID;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *split_review;
|
||||||
|
@end
|
||||||
|
@interface CorrectWriteCorrectModelDataSplit : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *origin_content;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,27 @@
|
||||||
|
//
|
||||||
|
// CorrectWriteCorrectModel.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "CorrectWriteCorrectModel.h"
|
||||||
|
|
||||||
|
@implementation CorrectWriteCorrectModel
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"data" : [CorrectWriteCorrectModelData class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation CorrectWriteCorrectModelData
|
||||||
|
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||||
|
{
|
||||||
|
return @{@"ID" : @"id"};
|
||||||
|
}
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"split_review" : [CorrectWriteCorrectModelDataSplit class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation CorrectWriteCorrectModelDataSplit
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
//
|
||||||
|
// CorrectWriteErrorModel.h
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "BaseModel.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@class CorrectWriteErrorModelData,CorrectWriteErrorModelDataPosition,CorrectWriteErrorModelDataPositionSize;
|
||||||
|
@interface CorrectWriteErrorModel : BaseModel
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *data;
|
||||||
|
@end
|
||||||
|
@interface CorrectWriteErrorModelData : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *page;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *type;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) CorrectWriteErrorModelDataPosition *position;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *before;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *after;
|
||||||
|
@end
|
||||||
|
@interface CorrectWriteErrorModelDataPosition : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *left_top;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *right_bottom;
|
||||||
|
@end
|
||||||
|
@interface CorrectWriteErrorModelDataPositionSize : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *x;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *y;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,29 @@
|
||||||
|
//
|
||||||
|
// CorrectWriteErrorModel.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "CorrectWriteErrorModel.h"
|
||||||
|
|
||||||
|
@implementation CorrectWriteErrorModel
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"data" : [CorrectWriteErrorModelData class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation CorrectWriteErrorModelData
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"position" : [CorrectWriteErrorModelDataPosition class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation CorrectWriteErrorModelDataPosition
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"left_top" : [CorrectWriteErrorModelDataPositionSize class],
|
||||||
|
@"right_bottom" : [CorrectWriteErrorModelDataPositionSize class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation CorrectWriteErrorModelDataPositionSize
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
//
|
||||||
|
// PicAiModel.h
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "BaseModel.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@class PicAiModelData;
|
||||||
|
@interface PicAiModel : BaseModel
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) PicAiModelData *data;
|
||||||
|
@end
|
||||||
|
@interface PicAiModelData : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *ID;
|
||||||
|
@end
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,20 @@
|
||||||
|
//
|
||||||
|
// PicAiModel.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "PicAiModel.h"
|
||||||
|
|
||||||
|
@implementation PicAiModel
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"data" : [PicAiModelData class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation PicAiModelData
|
||||||
|
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||||
|
{
|
||||||
|
return @{@"ID" : @"id"};
|
||||||
|
}
|
||||||
|
@end
|
|
@ -0,0 +1,29 @@
|
||||||
|
//
|
||||||
|
// WriteCorrectScoreModel.h
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "BaseModel.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@class WriteCorrectScoreModelData,WriteCorrectScoreModelDataComplex;
|
||||||
|
@interface WriteCorrectScoreModel : BaseModel
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) WriteCorrectScoreModelData *data;
|
||||||
|
@end
|
||||||
|
@interface WriteCorrectScoreModelData : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) WriteCorrectScoreModelDataComplex *complex_review;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *total_score;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *total_words;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface WriteCorrectScoreModelDataComplex : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *score;
|
||||||
|
@end
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,26 @@
|
||||||
|
//
|
||||||
|
// WriteCorrectScoreModel.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "WriteCorrectScoreModel.h"
|
||||||
|
#import "TextbookInfoModel.h"
|
||||||
|
|
||||||
|
@implementation WriteCorrectScoreModel
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"data" : [WriteCorrectScoreModelData class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation WriteCorrectScoreModelData
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"complex_review" : [WriteCorrectScoreModelDataComplex class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation WriteCorrectScoreModelDataComplex
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"score" : [TextbookInfoModelDataResultComplexScore class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
|
@ -34,10 +34,10 @@ static LoadAlterView *viewshow;
|
||||||
[viewback.layer setMasksToBounds:YES];
|
[viewback.layer setMasksToBounds:YES];
|
||||||
[viewback.layer setCornerRadius:15];
|
[viewback.layer setCornerRadius:15];
|
||||||
|
|
||||||
NSString *strpath = [[NSBundle mainBundle] pathForResource:@"pag_loading" ofType:@"pag"];
|
|
||||||
PAGView *pagView = [[PAGView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
|
PAGView *pagView = [[PAGView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
|
||||||
[viewback addSubview:pagView];
|
[viewback addSubview:pagView];
|
||||||
dispatch_async(dispatch_get_global_queue(0, 0), ^{
|
dispatch_async(dispatch_get_global_queue(0, 0), ^{
|
||||||
|
NSString *strpath = [[NSBundle mainBundle] pathForResource:@"pag_loading" ofType:@"pag"];
|
||||||
PAGFile* pagFile = [PAGFile Load:strpath];
|
PAGFile* pagFile = [PAGFile Load:strpath];
|
||||||
[pagView setComposition:pagFile];
|
[pagView setComposition:pagFile];
|
||||||
[pagView setRepeatCount:0];
|
[pagView setRepeatCount:0];
|
||||||
|
|
|
@ -10,6 +10,12 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartZWPIViewCell : JhtBannerCardView
|
@interface StartZWPIViewCell : JhtBannerCardView
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UILabel *lbname;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UIImageView *imgvback;
|
||||||
|
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) ExampleCorrectListDataItems *model;
|
@property (nonatomic , strong) ExampleCorrectListDataItems *model;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -9,10 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
@interface StartZWPIViewCell ()
|
@interface StartZWPIViewCell ()
|
||||||
///
|
|
||||||
@property (nonatomic , strong) UILabel *lbname;
|
|
||||||
///
|
|
||||||
@property (nonatomic , strong) UIImageView *imgvback;
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation StartZWPIViewCell
|
@implementation StartZWPIViewCell
|
||||||
|
@ -22,7 +19,7 @@
|
||||||
if(self = [super initWithFrame:frame])
|
if(self = [super initWithFrame:frame])
|
||||||
{
|
{
|
||||||
UILabel *lbname = [[UILabel alloc] init];
|
UILabel *lbname = [[UILabel alloc] init];
|
||||||
[lbname setText:@"《一路有你相伴》"];
|
[lbname setText:@""];
|
||||||
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
||||||
[lbname setTextAlignment:NSTextAlignmentCenter];
|
[lbname setTextAlignment:NSTextAlignmentCenter];
|
||||||
[lbname setFont:[UIFont boldSystemFontOfSize:20]];
|
[lbname setFont:[UIFont boldSystemFontOfSize:20]];
|
||||||
|
@ -35,7 +32,7 @@
|
||||||
_lbname = lbname;
|
_lbname = lbname;
|
||||||
|
|
||||||
UIImageView *imgvback = [[UIImageView alloc] init];
|
UIImageView *imgvback = [[UIImageView alloc] init];
|
||||||
[imgvback setContentMode:UIViewContentModeScaleAspectFill];
|
[imgvback setContentMode:UIViewContentModeRedraw];
|
||||||
[self addSubview:imgvback];
|
[self addSubview:imgvback];
|
||||||
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.left.right.equalTo(self);
|
make.left.right.equalTo(self);
|
||||||
|
|
|
@ -14,6 +14,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
@property (nonatomic , assign) BOOL isshiyong;
|
@property (nonatomic , assign) BOOL isshiyong;
|
||||||
///引导页数据-作文批改
|
///引导页数据-作文批改
|
||||||
@property (nonatomic , strong) ExampleCorrectListDataItems *modelDetailZWPG;
|
@property (nonatomic , strong) ExampleCorrectListDataItems *modelDetailZWPG;
|
||||||
|
|
||||||
|
///批改的图片
|
||||||
|
@property (nonatomic , strong) NSArray *arrXZImages;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *strID;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#import "StartZWPIDetailViewController.h"
|
#import "StartZWPIDetailViewController.h"
|
||||||
#import "StartZWPIDetailView.h"
|
#import "StartZWPIDetailView.h"
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
|
||||||
@interface StartZWPIDetailViewController ()
|
@interface StartZWPIDetailViewController ()
|
||||||
|
|
||||||
|
@ -23,7 +23,15 @@
|
||||||
[self showNaviGationView:YES];
|
[self showNaviGationView:YES];
|
||||||
[self.navigationView setTitle:@"作文批改" titleColor:RGBCOLOR(60, 60, 60)];
|
[self.navigationView setTitle:@"作文批改" titleColor:RGBCOLOR(60, 60, 60)];
|
||||||
[self.navigationView setBackgroundColor:[UIColor whiteColor]];
|
[self.navigationView setBackgroundColor:[UIColor whiteColor]];
|
||||||
[self.navigationView.backButton setHidden:YES];
|
[self.navigationView.backButton setHidden:self.isshiyong];
|
||||||
|
if(self.isshiyong==NO)
|
||||||
|
{
|
||||||
|
[self.navigationView setMuenImg:@"xz_fenxiang"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-(void)navMuenButtonAction
|
||||||
|
{///分享
|
||||||
|
|
||||||
}
|
}
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
|
@ -37,7 +45,60 @@
|
||||||
}];
|
}];
|
||||||
view.isshiyong = self.isshiyong;
|
view.isshiyong = self.isshiyong;
|
||||||
view.modelDetailZWPG = self.modelDetailZWPG;
|
view.modelDetailZWPG = self.modelDetailZWPG;
|
||||||
|
view.arrXZImages = self.arrXZImages;
|
||||||
|
view.strID = self.strID;
|
||||||
|
|
||||||
|
if(self.arrXZImages.count>0)
|
||||||
|
{
|
||||||
|
[LoadAlterView show];
|
||||||
|
__block int loadcount = 0;
|
||||||
|
[NetWorkManager requestCorrectWrite_correct_scoreData:self.view ID:self.strID Callback:^(BOOL state, WriteCorrectScoreModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
loadcount++;
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
view.modelPF = responseObject.data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
if(loadcount>=3)
|
||||||
|
{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
[NetWorkManager requestCorrectWrite_correct_errorData:self.view ID:self.strID Callback:^(BOOL state, CorrectWriteErrorModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
loadcount++;
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
view.arrErrorLocation = responseObject.data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
if(loadcount>=3)
|
||||||
|
{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
[NetWorkManager requestCorrectWrite_correctData:self.view ID:self.strID Callback:^(BOOL state, CorrectWriteCorrectModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
loadcount++;
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
view.modelContentItems = responseObject.data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
if(loadcount>=3)
|
||||||
|
{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import "ExampleCorrectList.h"
|
#import "ExampleCorrectList.h"
|
||||||
|
|
||||||
|
#import "WriteCorrectScoreModel.h"
|
||||||
|
#import "CorrectWriteCorrectModel.h"
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartZWPIDetailView : UIView
|
@interface StartZWPIDetailView : UIView
|
||||||
|
@ -14,6 +17,17 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
@property (nonatomic , assign) BOOL isshiyong;
|
@property (nonatomic , assign) BOOL isshiyong;
|
||||||
///引导页数据-作文批改
|
///引导页数据-作文批改
|
||||||
@property (nonatomic , strong) ExampleCorrectListDataItems *modelDetailZWPG;
|
@property (nonatomic , strong) ExampleCorrectListDataItems *modelDetailZWPG;
|
||||||
|
|
||||||
|
///批改的图片
|
||||||
|
@property (nonatomic , strong) NSArray *arrXZImages;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *strID;
|
||||||
|
///评分
|
||||||
|
@property (nonatomic , strong) WriteCorrectScoreModelData *modelPF;
|
||||||
|
///错误位置信息
|
||||||
|
@property (nonatomic , strong) NSArray *arrErrorLocation;
|
||||||
|
///句子数据
|
||||||
|
@property (nonatomic , strong) CorrectWriteCorrectModelData *modelContentItems;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#import "StartKTXZPGDetailZHView.h"
|
#import "StartKTXZPGDetailZHView.h"
|
||||||
#import "StartKTXZPGDetailFJView.h"
|
#import "StartKTXZPGDetailFJView.h"
|
||||||
#import "StartPayViewController.h"
|
#import "StartPayViewController.h"
|
||||||
|
#import "DuanLuoXieZuoQWViewController.h"
|
||||||
|
#import "StartKTXZPGDetailXZView.h"
|
||||||
|
|
||||||
@interface StartZWPIDetailView ()<UIScrollViewDelegate>
|
@interface StartZWPIDetailView ()<UIScrollViewDelegate>
|
||||||
///
|
///
|
||||||
|
@ -24,6 +26,9 @@
|
||||||
@property (nonatomic , strong) StartKTXZPGDetailZHView *viewzh;
|
@property (nonatomic , strong) StartKTXZPGDetailZHView *viewzh;
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) StartKTXZPGDetailFJView *viewfj;
|
@property (nonatomic , strong) StartKTXZPGDetailFJView *viewfj;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) StartKTXZPGDetailXZView *viewxz;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -125,7 +130,6 @@
|
||||||
make.top.offset(30);
|
make.top.offset(30);
|
||||||
make.height.offset(40);
|
make.height.offset(40);
|
||||||
}];
|
}];
|
||||||
viewtop.arrTitle = @[@"综合评价",@"分句点评"];
|
|
||||||
[viewtop setBackSelect:^(NSInteger tag) {
|
[viewtop setBackSelect:^(NSInteger tag) {
|
||||||
[self.scvbackinfo setContentOffset:CGPointMake(UISCREEN_WIDTH*tag, 0)];
|
[self.scvbackinfo setContentOffset:CGPointMake(UISCREEN_WIDTH*tag, 0)];
|
||||||
[self showVC:tag];
|
[self showVC:tag];
|
||||||
|
@ -136,7 +140,7 @@
|
||||||
[scvback setPagingEnabled:YES];
|
[scvback setPagingEnabled:YES];
|
||||||
[scvback setShowsHorizontalScrollIndicator:NO];
|
[scvback setShowsHorizontalScrollIndicator:NO];
|
||||||
[view addSubview:scvback];
|
[view addSubview:scvback];
|
||||||
[scvback setContentSize:CGSizeMake(UISCREEN_WIDTH*3, 0)];
|
[scvback setContentSize:CGSizeMake(UISCREEN_WIDTH*2, 0)];
|
||||||
[scvback setDelegate:self];
|
[scvback setDelegate:self];
|
||||||
_scvbackinfo = scvback;
|
_scvbackinfo = scvback;
|
||||||
|
|
||||||
|
@ -174,8 +178,17 @@
|
||||||
}
|
}
|
||||||
-(void)tiyanAction
|
-(void)tiyanAction
|
||||||
{
|
{
|
||||||
|
if(self.isshiyong)
|
||||||
|
{///支付
|
||||||
StartPayViewController *vc = [StartPayViewController new];
|
StartPayViewController *vc = [StartPayViewController new];
|
||||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{///写作文章
|
||||||
|
DuanLuoXieZuoQWViewController *vc = [DuanLuoXieZuoQWViewController new];
|
||||||
|
// vc.dicpush =
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
-(void)showVC:(NSInteger)page
|
-(void)showVC:(NSInteger)page
|
||||||
{
|
{
|
||||||
|
@ -194,6 +207,21 @@
|
||||||
_viewfj = viewfj;
|
_viewfj = viewfj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (page==2)
|
||||||
|
{
|
||||||
|
if(!self.viewxz)
|
||||||
|
{
|
||||||
|
StartKTXZPGDetailXZView *viewxz = [StartKTXZPGDetailXZView new];
|
||||||
|
[self.scvbackinfo addSubview:viewxz];
|
||||||
|
[viewxz mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.offset(UISCREEN_WIDTH*2);
|
||||||
|
make.top.offset(0);
|
||||||
|
make.width.height.equalTo(self.scvbackinfo);
|
||||||
|
}];
|
||||||
|
viewxz.modelResult = self.modelDetailZWPG.result;
|
||||||
|
_viewxz = viewxz;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#pragma mark - UIScrollView
|
#pragma mark - UIScrollView
|
||||||
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
|
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
|
||||||
|
@ -203,10 +231,25 @@
|
||||||
[self showVC:ipage];
|
[self showVC:ipage];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)setIsshiyong:(BOOL)isshiyong
|
||||||
|
{
|
||||||
|
_isshiyong = isshiyong;
|
||||||
|
if(isshiyong)
|
||||||
|
{
|
||||||
|
[self.scvbackinfo setContentSize:CGSizeMake(UISCREEN_WIDTH*2, 0)];
|
||||||
|
self.viewtop.arrTitle = @[@"综合评价",@"分句点评"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self.scvbackinfo setContentSize:CGSizeMake(UISCREEN_WIDTH*3, 0)];
|
||||||
|
self.viewtop.arrTitle = @[@"综合评价",@"分句点评",@"写作思路"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
-(void)setModelDetailZWPG:(ExampleCorrectListDataItems *)modelDetailZWPG
|
-(void)setModelDetailZWPG:(ExampleCorrectListDataItems *)modelDetailZWPG
|
||||||
{
|
{
|
||||||
_modelDetailZWPG = modelDetailZWPG;
|
_modelDetailZWPG = modelDetailZWPG;
|
||||||
|
if(modelDetailZWPG==nil)return;
|
||||||
|
|
||||||
if(self.modelDetailZWPG.output_image.count>0)
|
if(self.modelDetailZWPG.output_image.count>0)
|
||||||
{
|
{
|
||||||
|
@ -246,7 +289,49 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
self.viewzh.modelResult = modelDetailZWPG.result;
|
self.viewzh.modelResult = modelDetailZWPG.result;
|
||||||
|
}
|
||||||
|
-(void)setArrXZImages:(NSArray *)arrXZImages
|
||||||
|
{
|
||||||
|
_arrXZImages = arrXZImages;
|
||||||
|
if(arrXZImages.count>0)
|
||||||
|
{
|
||||||
|
UIView *viewlast = nil;
|
||||||
|
for(UIImage *image in self.arrXZImages)
|
||||||
|
{
|
||||||
|
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(image.size.height*UISCREEN_WIDTH/image.size.width);
|
||||||
|
}];
|
||||||
|
viewlast = imgvback;
|
||||||
|
}
|
||||||
|
[self.scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.bottom.equalTo(viewlast).offset(20);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
-(void)setStrID:(NSString *)strID
|
||||||
|
{
|
||||||
|
_strID = strID;
|
||||||
|
self.viewzh.strID = strID;
|
||||||
|
}
|
||||||
|
-(void)setModelPF:(WriteCorrectScoreModelData *)modelPF
|
||||||
|
{
|
||||||
|
_modelPF = modelPF;
|
||||||
|
|
||||||
|
self.viewzh.modelPF = modelPF;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -8,12 +8,15 @@
|
||||||
#import "BaseViewController.h"
|
#import "BaseViewController.h"
|
||||||
#import "TextbookInfoModel.h"
|
#import "TextbookInfoModel.h"
|
||||||
#import "ExampleCorrectList.h"
|
#import "ExampleCorrectList.h"
|
||||||
|
|
||||||
|
#import "ExamplePicModel.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartKTXZPGViewController : BaseViewController
|
@interface StartKTXZPGViewController : BaseViewController
|
||||||
///是否是引导页
|
///是否是引导页
|
||||||
@property (nonatomic , assign) BOOL isshiyong;
|
@property (nonatomic , assign) BOOL isshiyong;
|
||||||
///0课堂写作 1作文批改
|
///0课堂写作 1作文批改 10改写作文 11拍题成文 12 拍照续写
|
||||||
@property (nonatomic , assign) int type;
|
@property (nonatomic , assign) int type;
|
||||||
|
|
||||||
///引导页数据-课堂写作
|
///引导页数据-课堂写作
|
||||||
|
@ -21,6 +24,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
///引导页数据-作文批改
|
///引导页数据-作文批改
|
||||||
@property (nonatomic , strong) ExampleCorrectListDataItems *modelDetailZWPG;
|
@property (nonatomic , strong) ExampleCorrectListDataItems *modelDetailZWPG;
|
||||||
|
|
||||||
|
///拍照写作示例
|
||||||
|
@property (nonatomic , strong) ExamplePicModelDataItems *modelXZSL;
|
||||||
|
///写作的图片
|
||||||
|
@property (nonatomic , strong) NSArray *arrXZImages;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
view.type = self.type;
|
view.type = self.type;
|
||||||
view.modelDetailYDY = self.modelDetailYDY;
|
view.modelDetailYDY = self.modelDetailYDY;
|
||||||
view.modelDetailZWPG = self.modelDetailZWPG;
|
view.modelDetailZWPG = self.modelDetailZWPG;
|
||||||
|
view.modelXZSL = self.modelXZSL;
|
||||||
|
view.arrXZImages = self.arrXZImages;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,13 @@
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import "TextbookInfoModel.h"
|
#import "TextbookInfoModel.h"
|
||||||
#import "ExampleCorrectList.h"
|
#import "ExampleCorrectList.h"
|
||||||
|
|
||||||
|
#import "ExamplePicModel.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartKTXZPGView : UIView
|
@interface StartKTXZPGView : UIView
|
||||||
///0课堂写作 1作文批改
|
///0课堂写作 1作文批改 10改写作文 11拍题成文 12 拍照续写
|
||||||
@property (nonatomic , assign) int type;
|
@property (nonatomic , assign) int type;
|
||||||
///是否是引导页
|
///是否是引导页
|
||||||
@property (nonatomic , assign) BOOL isshiyong;
|
@property (nonatomic , assign) BOOL isshiyong;
|
||||||
|
@ -19,6 +22,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
@property (nonatomic , strong) TextbookInfoModelData *modelDetailYDY;
|
@property (nonatomic , strong) TextbookInfoModelData *modelDetailYDY;
|
||||||
///引导页数据-作文批改
|
///引导页数据-作文批改
|
||||||
@property (nonatomic , strong) ExampleCorrectListDataItems *modelDetailZWPG;
|
@property (nonatomic , strong) ExampleCorrectListDataItems *modelDetailZWPG;
|
||||||
|
|
||||||
|
|
||||||
|
///拍照写作示例
|
||||||
|
@property (nonatomic , strong) ExamplePicModelDataItems *modelXZSL;
|
||||||
|
///写作的图片
|
||||||
|
@property (nonatomic , strong) NSArray *arrXZImages;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
#import "DownJDLoadView.h"
|
#import "DownJDLoadView.h"
|
||||||
#import "StartKTXZPGDetailViewController.h"
|
#import "StartKTXZPGDetailViewController.h"
|
||||||
#import "StartZWPIDetailViewController.h"
|
#import "StartZWPIDetailViewController.h"
|
||||||
|
#import "StartPZXZDetailViewController.h"
|
||||||
|
#import "PublicUploadImageManager.h"
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
|
||||||
@interface StartKTXZPGView ()
|
@interface StartKTXZPGView ()
|
||||||
///
|
///
|
||||||
|
@ -23,6 +25,15 @@
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) DownJDLoadView *viewjd;
|
@property (nonatomic , strong) DownJDLoadView *viewjd;
|
||||||
@property (nonatomic , strong) UILabel *lbstate;
|
@property (nonatomic , strong) UILabel *lbstate;
|
||||||
|
|
||||||
|
|
||||||
|
@property (nonatomic , assign) int iputimagetag;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSMutableArray *arrImageIDs;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *strID;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation StartKTXZPGView
|
@implementation StartKTXZPGView
|
||||||
|
@ -138,21 +149,39 @@
|
||||||
|
|
||||||
///模拟
|
///模拟
|
||||||
float fvalue = (self.viewjd.fblv*100+0.2)/100;
|
float fvalue = (self.viewjd.fblv*100+0.2)/100;
|
||||||
|
|
||||||
|
///真实数据
|
||||||
|
if(self.arrXZImages.count>0)
|
||||||
|
{
|
||||||
|
if(self.strID.length==0 && fvalue>=0.98)
|
||||||
|
{
|
||||||
|
fvalue = 0.98;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
self.viewjd.fblv = fvalue;
|
self.viewjd.fblv = fvalue;
|
||||||
|
|
||||||
if(fvalue>0.3 && fvalue<0.8)
|
if(fvalue>0.3 && fvalue<0.8)
|
||||||
{
|
{
|
||||||
[self.lbstate setText:@"作文批改中..."];
|
[self.lbstate setText:@"作文批改中..."];
|
||||||
|
if(self.type>=10&&self.type<=12)
|
||||||
|
{
|
||||||
|
[self.lbstate setText:@"作文识别中..."];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (fvalue>0.99 && fvalue<1)
|
else if (fvalue>0.99 && fvalue<1)
|
||||||
{
|
{
|
||||||
[self.lbstate setText:@"作文批改完成"];
|
[self.lbstate setText:@"作文批改完成"];
|
||||||
|
if(self.type>=10&&self.type<=12)
|
||||||
|
{
|
||||||
|
[self.lbstate setText:@"图片识别完成"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(fvalue>=1)
|
else if(fvalue>=1)
|
||||||
{
|
{
|
||||||
[self.timer invalidate];
|
[self.timer invalidate];
|
||||||
self.timer = nil;
|
self.timer = nil;
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
[self pushVC];
|
[self pushVC];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -173,8 +202,107 @@
|
||||||
[self.imgvvalue sd_setImageWithURL:[NSURL URLWithString:modelDetailZWPG.input_image.firstObject] placeholderImage:nil];
|
[self.imgvvalue sd_setImageWithURL:[NSURL URLWithString:modelDetailZWPG.input_image.firstObject] placeholderImage:nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)setModelXZSL:(ExamplePicModelDataItems *)modelXZSL
|
||||||
|
{
|
||||||
|
_modelXZSL = modelXZSL;
|
||||||
|
if(modelXZSL.image.count>0)
|
||||||
|
{
|
||||||
|
[self.imgvvalue sd_setImageWithURL:[NSURL URLWithString:modelXZSL.image.firstObject] placeholderImage:nil];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-(void)setArrXZImages:(NSArray *)arrXZImages
|
||||||
|
{
|
||||||
|
_arrXZImages = arrXZImages;
|
||||||
|
self.iputimagetag = 0;
|
||||||
|
self.arrImageIDs = [NSMutableArray new];
|
||||||
|
[self uploadImage];
|
||||||
|
}
|
||||||
|
-(void)uploadImage
|
||||||
|
{
|
||||||
|
self.imgvvalue.image = self.arrXZImages[self.iputimagetag];
|
||||||
|
NSString *strurl = @"";
|
||||||
|
if(self.type==1)
|
||||||
|
{
|
||||||
|
strurl = @"api/correct/image";
|
||||||
|
}
|
||||||
|
else if (self.type>=10&&self.type<=12)
|
||||||
|
{
|
||||||
|
strurl = @"api/file/ocr";
|
||||||
|
}
|
||||||
|
[[PublicUploadImageManager shareManager] netWorkUrlUserPost:[NSString stringWithFormat:@"%@%@",BaseUrl,strurl] UploadImage:self.arrXZImages[self.iputimagetag] dicQuery:@{} Callback:^(BOOL state, NSDictionary *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
[self.arrImageIDs addObject:[Tools isStringnil:[responseObject objectForKey:@"id"]]];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:describle afterDelayType:1];
|
||||||
|
}
|
||||||
|
self.iputimagetag++;
|
||||||
|
if(self.iputimagetag>=self.arrXZImages.count)
|
||||||
|
{///
|
||||||
|
[self createJiLu];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self uploadImage];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
-(void)createJiLu
|
||||||
|
{
|
||||||
|
if(self.type==1)
|
||||||
|
{
|
||||||
|
[NetWorkManager requestCorrectCreateData:self images:self.arrImageIDs sse_type:@"2" Callback:^(BOOL state, PicAiModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
self.strID = responseObject.data.ID;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
[self.viewController.navigationController popViewControllerAnimated:YES];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else if (self.type>=10&&self.type<=12)
|
||||||
|
{
|
||||||
|
[NetWorkManager requestPicAiData:self images:self.arrImageIDs Callback:^(BOOL state, PicAiModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
[self getJiLu:responseObject.data.ID];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
[self.viewController.navigationController popViewControllerAnimated:YES];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
-(void)getJiLu:(NSString *)ID
|
||||||
|
{
|
||||||
|
[NetWorkManager requestPicAiResultData:self ID:ID Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
self.strID = ID;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
[self.viewController.navigationController popViewControllerAnimated:YES];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
-(void)pushVC
|
-(void)pushVC
|
||||||
{
|
{
|
||||||
|
///0课堂写作 1作文批改 10改写作文 11拍题成文 12 拍照续写
|
||||||
switch (self.type) {
|
switch (self.type) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
|
@ -189,6 +317,8 @@
|
||||||
StartZWPIDetailViewController *vc = [StartZWPIDetailViewController new];
|
StartZWPIDetailViewController *vc = [StartZWPIDetailViewController new];
|
||||||
vc.isshiyong = self.isshiyong;
|
vc.isshiyong = self.isshiyong;
|
||||||
vc.modelDetailZWPG = self.modelDetailZWPG;
|
vc.modelDetailZWPG = self.modelDetailZWPG;
|
||||||
|
vc.strID = self.strID;
|
||||||
|
vc.arrXZImages = self.arrXZImages;
|
||||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -202,6 +332,17 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 10: case 11: case 12:
|
||||||
|
{
|
||||||
|
StartPZXZDetailViewController *vc = [StartPZXZDetailViewController new];
|
||||||
|
vc.isshiyong = self.isshiyong;
|
||||||
|
vc.modelYD = self.modelXZSL;
|
||||||
|
vc.type = self.type;
|
||||||
|
vc.strID = self.strID;
|
||||||
|
vc.arrXZImages = self.arrXZImages;
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,9 +10,15 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartPZXZPageView : UIView
|
@interface StartPZXZPageView : UIView
|
||||||
|
///是否是引导页
|
||||||
|
@property (nonatomic , assign) BOOL isshiyong;
|
||||||
@property (nonatomic , assign) CGSize yidongsize;
|
@property (nonatomic , assign) CGSize yidongsize;
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) ExamplePicModelDataItems *model;
|
@property (nonatomic , strong) ExamplePicModelDataItems *model;
|
||||||
|
|
||||||
|
///写作的图片
|
||||||
|
@property (nonatomic , strong) NSArray *arrXZImages;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -44,9 +44,56 @@
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
-(void)setIsshiyong:(BOOL)isshiyong
|
||||||
|
{
|
||||||
|
if(isshiyong==NO)
|
||||||
|
{
|
||||||
|
[self.scvback setContentSize:CGSizeMake(0, 0)];
|
||||||
|
}
|
||||||
|
}
|
||||||
-(void)setModel:(ExamplePicModelDataItems *)model
|
-(void)setModel:(ExamplePicModelDataItems *)model
|
||||||
{
|
{
|
||||||
_model = model;
|
_model = model;
|
||||||
|
|
||||||
|
if(self.isshiyong==NO)
|
||||||
|
{
|
||||||
|
[self.imgvback removeFromSuperview];
|
||||||
|
[self.scvback setUserInteractionEnabled:YES];
|
||||||
|
[self.scvback setScrollEnabled:YES];
|
||||||
|
UIView *viewlast = nil;
|
||||||
|
for(int i = 0 ; i < model.image.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:model.image[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)];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if(model.image.count>0)
|
if(model.image.count>0)
|
||||||
{
|
{
|
||||||
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:model.image.firstObject] placeholderImage:nil];
|
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:model.image.firstObject] placeholderImage:nil];
|
||||||
|
@ -55,7 +102,46 @@
|
||||||
{
|
{
|
||||||
[self.imgvback setImage:[UIImage imageNamed:@"yd_nomoxiangji"]];
|
[self.imgvback setImage:[UIImage imageNamed:@"yd_nomoxiangji"]];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)setArrXZImages:(NSArray *)arrXZImages
|
||||||
|
{
|
||||||
|
_arrXZImages = arrXZImages;
|
||||||
|
|
||||||
|
[self.imgvback removeFromSuperview];
|
||||||
|
[self.scvback setUserInteractionEnabled:YES];
|
||||||
|
[self.scvback setScrollEnabled:YES];
|
||||||
|
UIView *viewlast = nil;
|
||||||
|
for(int i = 0 ; i < arrXZImages.count;i++)
|
||||||
|
{
|
||||||
|
UIImage *image = arrXZImages[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);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
imgvback.image = image;
|
||||||
|
viewlast = imgvback;
|
||||||
|
|
||||||
|
[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
|
///去小数点后1 x y
|
||||||
-(void)setYidongsize:(CGSize)yidongsize
|
-(void)setYidongsize:(CGSize)yidongsize
|
||||||
{
|
{
|
||||||
|
|
|
@ -194,6 +194,7 @@
|
||||||
[self stopMotion];
|
[self stopMotion];
|
||||||
///
|
///
|
||||||
StartPZXZDetailViewController *vc = [StartPZXZDetailViewController new];
|
StartPZXZDetailViewController *vc = [StartPZXZDetailViewController new];
|
||||||
|
vc.isshiyong = YES;
|
||||||
vc.modelYD = self.arrdataYD[self.btselect.tag];
|
vc.modelYD = self.arrdataYD[self.btselect.tag];
|
||||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,19 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartPZXZDetailViewController : BaseViewController
|
@interface StartPZXZDetailViewController : BaseViewController
|
||||||
|
///是否是引导页
|
||||||
|
@property (nonatomic , assign) BOOL isshiyong;
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) ExamplePicModelDataItems *modelYD;
|
@property (nonatomic , strong) ExamplePicModelDataItems *modelYD;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *value;
|
||||||
|
///10改写作文 11拍题成文 12 拍照续写
|
||||||
|
@property (nonatomic , assign) int type;
|
||||||
|
|
||||||
|
///写作的图片
|
||||||
|
@property (nonatomic , strong) NSArray *arrXZImages;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *strID;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -36,10 +36,29 @@
|
||||||
{
|
{
|
||||||
[self.navigationView setTitle:@"拍照续写" titleColor:RGBCOLOR(60, 60, 60)];
|
[self.navigationView setTitle:@"拍照续写" titleColor:RGBCOLOR(60, 60, 60)];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(self.type==10)
|
||||||
|
{
|
||||||
|
[self.navigationView setTitle:@"拍照改写" titleColor:RGBCOLOR(60, 60, 60)];
|
||||||
|
}
|
||||||
|
else if(self.type==11)
|
||||||
|
{
|
||||||
|
[self.navigationView setTitle:@"拍题写作" titleColor:RGBCOLOR(60, 60, 60)];
|
||||||
|
}
|
||||||
|
else if(self.type==12)
|
||||||
|
{
|
||||||
|
[self.navigationView setTitle:@"拍照续写" titleColor:RGBCOLOR(60, 60, 60)];
|
||||||
}
|
}
|
||||||
[self.navigationView setBackgroundColor:[UIColor whiteColor]];
|
[self.navigationView setBackgroundColor:[UIColor whiteColor]];
|
||||||
[self.navigationView.backButton setHidden:YES];
|
[self.navigationView.backButton setHidden:self.isshiyong];
|
||||||
|
if(self.isshiyong==NO)
|
||||||
|
{
|
||||||
|
[self.navigationView setMuenTitle:@"反馈" titleColor:RGBCOLOR(60, 60, 60)];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-(void)navMuenButtonAction
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
|
@ -51,8 +70,13 @@
|
||||||
make.left.right.bottom.equalTo(self.view);
|
make.left.right.bottom.equalTo(self.view);
|
||||||
make.top.offset(NavHeight);
|
make.top.offset(NavHeight);
|
||||||
}];
|
}];
|
||||||
|
view.type = self.type;
|
||||||
|
view.isshiyong = self.isshiyong;
|
||||||
view.modelYD = self.modelYD;
|
view.modelYD = self.modelYD;
|
||||||
|
|
||||||
|
view.arrXZImages = self.arrXZImages;
|
||||||
|
view.strID = self.strID;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -10,8 +10,18 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartPZXZDetailView : UIView
|
@interface StartPZXZDetailView : UIView
|
||||||
|
///是否是引导页
|
||||||
|
@property (nonatomic , assign) BOOL isshiyong;
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) ExamplePicModelDataItems *modelYD;
|
@property (nonatomic , strong) ExamplePicModelDataItems *modelYD;
|
||||||
|
///10改写作文 11拍题成文 12 拍照续写
|
||||||
|
@property (nonatomic , assign) int type;
|
||||||
|
|
||||||
|
///写作的图片
|
||||||
|
@property (nonatomic , strong) NSArray *arrXZImages;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *strID;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -10,6 +10,13 @@
|
||||||
#import "StartPZXZPageView.h"
|
#import "StartPZXZPageView.h"
|
||||||
#import "StartPayViewController.h"
|
#import "StartPayViewController.h"
|
||||||
|
|
||||||
|
#import "XieZuoSaveAlterView.h"
|
||||||
|
#import "SSENetWorkManager.h"
|
||||||
|
#import "RoleTreeModel.h"
|
||||||
|
#import "SSEDrawListTextModel.h"
|
||||||
|
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
|
||||||
@interface StartPZXZDetailView ()<UIScrollViewDelegate>
|
@interface StartPZXZDetailView ()<UIScrollViewDelegate>
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) CMMotionManager *motionManager;
|
@property (nonatomic , strong) CMMotionManager *motionManager;
|
||||||
|
@ -18,6 +25,8 @@
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) UIView *viewback;
|
@property (nonatomic , strong) UIView *viewback;
|
||||||
|
|
||||||
|
@property (nonatomic , strong) UIView *viewbottom;
|
||||||
|
|
||||||
@property (nonatomic , assign) BOOL isdrawEnd;
|
@property (nonatomic , assign) BOOL isdrawEnd;
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -28,6 +37,26 @@
|
||||||
@property (nonatomic , strong) UILabel *lbname;
|
@property (nonatomic , strong) UILabel *lbname;
|
||||||
@property (nonatomic , strong) ViewLable *lbwz;
|
@property (nonatomic , strong) ViewLable *lbwz;
|
||||||
|
|
||||||
|
@property (nonatomic , strong) UIButton *btpigai;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) MASConstraint *scrollBottom;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSMutableArray *arrLBWZ;
|
||||||
|
@property (nonatomic , strong) NSMutableArray *arrBTN;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSMutableArray *arrdata;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) SSEConfigModel *modelConfig;
|
||||||
|
@property (nonatomic , assign) BOOL isStartDrawText;
|
||||||
|
|
||||||
|
@property (nonatomic , assign) NSInteger iDraw;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UIView *viewDarwLast;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) SSEDrawListTextModel *modelSelect;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -45,7 +74,7 @@
|
||||||
make.height.equalTo(self).offset(-200);
|
make.height.equalTo(self).offset(-200);
|
||||||
}];
|
}];
|
||||||
_viweBack = viweBack;
|
_viweBack = viweBack;
|
||||||
[self tuoluo];
|
|
||||||
|
|
||||||
UIView *viewback = [[UIView alloc] initWithFrame:CGRectMake(0, UISCREEN_HEIGHT*0.2, UISCREEN_WIDTH, UISCREEN_HEIGHT*0.8-TabHeight-20-NavHeight)];
|
UIView *viewback = [[UIView alloc] initWithFrame:CGRectMake(0, UISCREEN_HEIGHT*0.2, UISCREEN_WIDTH, UISCREEN_HEIGHT*0.8-TabHeight-20-NavHeight)];
|
||||||
[viewback setBackgroundColor:[UIColor whiteColor]];
|
[viewback setBackgroundColor:[UIColor whiteColor]];
|
||||||
|
@ -67,6 +96,7 @@
|
||||||
make.left.right.bottom.equalTo(self);
|
make.left.right.bottom.equalTo(self);
|
||||||
make.height.offset(TabHeight+20);
|
make.height.offset(TabHeight+20);
|
||||||
}];
|
}];
|
||||||
|
_viewbottom = viewbottom;
|
||||||
[self drawBottomView:viewbottom];
|
[self drawBottomView:viewbottom];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -97,7 +127,57 @@
|
||||||
}];
|
}];
|
||||||
[btpigai addTarget:self action:@selector(tiyanAction) forControlEvents:UIControlEventTouchUpInside];
|
[btpigai addTarget:self action:@selector(tiyanAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
[Tools changedView:btpigai colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
|
[Tools changedView:btpigai colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
|
||||||
|
_btpigai = btpigai;
|
||||||
}
|
}
|
||||||
|
-(void)drawBottomViewXZ:(UIView *)view
|
||||||
|
{
|
||||||
|
for(UIView *viewson in view.subviews)
|
||||||
|
{
|
||||||
|
[viewson removeFromSuperview];
|
||||||
|
}
|
||||||
|
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 *btchange = [[UIButton alloc] init];
|
||||||
|
[btchange setTitle:@"重写一篇" forState:UIControlStateNormal];
|
||||||
|
[btchange setTitleColor:RGBCOLOR(61, 61, 61) forState:UIControlStateNormal];
|
||||||
|
[btchange.titleLabel setFont:[UIFont boldSystemFontOfSize:18]];
|
||||||
|
[btchange.layer setMasksToBounds:YES];
|
||||||
|
[btchange.layer setCornerRadius:10];
|
||||||
|
[btchange.layer setBorderWidth:1];
|
||||||
|
[btchange.layer setBorderColor:RGBCOLOR(216, 216, 216).CGColor];
|
||||||
|
[view addSubview:btchange];
|
||||||
|
[btchange mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.offset(20);
|
||||||
|
make.top.offset(10);
|
||||||
|
make.height.offset(40);
|
||||||
|
make.width.offset((UISCREEN_WIDTH-52)/2.0);
|
||||||
|
}];
|
||||||
|
[btchange setTag:0];
|
||||||
|
[btchange addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
|
UIButton *btcreate = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, (UISCREEN_WIDTH-52)/2.0, 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.equalTo(btchange.mas_right).offset(12);
|
||||||
|
make.top.height.equalTo(btchange);
|
||||||
|
make.right.equalTo(view).offset(-30);
|
||||||
|
}];
|
||||||
|
[btcreate setTag:1];
|
||||||
|
[btcreate addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[Tools changedView:btcreate colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
|
||||||
|
}
|
||||||
|
|
||||||
-(void)drawInfoView:(UIView *)view
|
-(void)drawInfoView:(UIView *)view
|
||||||
{
|
{
|
||||||
[view setBackgroundColor:[UIColor whiteColor]];
|
[view setBackgroundColor:[UIColor whiteColor]];
|
||||||
|
@ -135,7 +215,7 @@
|
||||||
_scvback = scvback;
|
_scvback = scvback;
|
||||||
|
|
||||||
UILabel *lbname = [[UILabel alloc] init];
|
UILabel *lbname = [[UILabel alloc] init];
|
||||||
[lbname setText:@"假如我是一颗小星星"];
|
[lbname setText:@""];
|
||||||
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
||||||
[lbname setTextAlignment:NSTextAlignmentCenter];
|
[lbname setTextAlignment:NSTextAlignmentCenter];
|
||||||
[lbname setFont:[UIFont boldSystemFontOfSize:24]];
|
[lbname setFont:[UIFont boldSystemFontOfSize:24]];
|
||||||
|
@ -172,9 +252,117 @@
|
||||||
}];
|
}];
|
||||||
_lbwz = lbwz;
|
_lbwz = lbwz;
|
||||||
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.bottom.equalTo(lbwz).offset(20);
|
self.scrollBottom = make.bottom.equalTo(lbwz).offset(20);
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(ViewLable *)drawItemLastView:(UIView *)view tag:(NSInteger)tag
|
||||||
|
{
|
||||||
|
ViewLable *lbwz = [[ViewLable alloc] init];
|
||||||
|
[self.scvback addSubview:lbwz];
|
||||||
|
[lbwz mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.offset(20);
|
||||||
|
make.width.equalTo(self.scvback).offset(-40);
|
||||||
|
if(view)
|
||||||
|
{
|
||||||
|
make.top.equalTo(view.mas_bottom).offset(20);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
make.top.offset(10);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
lbwz.textColor = RGBCOLOR(61, 61, 61);
|
||||||
|
lbwz.textFont = [UIFont systemFontOfSize:16];
|
||||||
|
if(self.scrollBottom)
|
||||||
|
{
|
||||||
|
[self.scrollBottom uninstall];
|
||||||
|
}
|
||||||
|
[self.scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
self.scrollBottom = make.bottom.equalTo(lbwz.mas_bottom).offset(20);
|
||||||
|
}];
|
||||||
|
[self.arrLBWZ addObject:lbwz];
|
||||||
|
|
||||||
|
UIButton *btcx = [[UIButton alloc] init];
|
||||||
|
[btcx setTitle:@"重写" forState:UIControlStateNormal];
|
||||||
|
[btcx setTitleColor:RGBCOLOR(108, 119, 246) forState:UIControlStateNormal];
|
||||||
|
[btcx.titleLabel setFont:[UIFont systemFontOfSize:12]];
|
||||||
|
[btcx setImage:[UIImage imageNamed:@"xz_chongxie"] forState:UIControlStateNormal];
|
||||||
|
[self.scvback addSubview:btcx];
|
||||||
|
[btcx mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.size.sizeOffset(CGSizeMake(54, 22));
|
||||||
|
make.left.offset(20);
|
||||||
|
if(view)
|
||||||
|
{
|
||||||
|
make.top.equalTo(view.mas_bottom).offset(17);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
make.top.offset(7);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
[btcx setIconInLeft];
|
||||||
|
[btcx setBackgroundColor:RGBCOLOR(226, 228, 253)];
|
||||||
|
[btcx addTarget:self action:@selector(cxAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[btcx setTag:tag];
|
||||||
|
[btcx.layer setMasksToBounds:YES];
|
||||||
|
[btcx.layer setCornerRadius:11];
|
||||||
|
[self.arrBTN addObject:btcx];
|
||||||
|
return lbwz;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)setIsshiyong:(BOOL)isshiyong
|
||||||
|
{
|
||||||
|
_isshiyong = isshiyong;
|
||||||
|
self.viweBack.isshiyong = self.isshiyong;
|
||||||
|
if(self.isshiyong)
|
||||||
|
{
|
||||||
|
[self tuoluo];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self.btpigai setTitle:@"复制全文" forState:UIControlStateNormal];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-(void)setModelYD:(ExamplePicModelDataItems *)modelYD
|
||||||
|
{
|
||||||
|
_modelYD = modelYD;
|
||||||
|
|
||||||
|
self.viweBack.model = self.modelYD;
|
||||||
|
|
||||||
|
if(modelYD)
|
||||||
|
{
|
||||||
|
NSString *strcontet = self.modelYD.result.content;
|
||||||
|
strcontet = [NSString stringWithFormat:@" %@",strcontet];
|
||||||
|
strcontet = [strcontet stringByReplacingOccurrencesOfString:@"\n" withString:@"\n "];
|
||||||
|
|
||||||
|
self.lbwz.fspeed = 0.02;
|
||||||
|
self.lbwz.strValue = strcontet;
|
||||||
|
self.lbwz.isWriteEnd = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-(void)setType:(int)type
|
||||||
|
{
|
||||||
|
_type = type;
|
||||||
|
if(type>=10&&type<=12)
|
||||||
|
{
|
||||||
|
[self drawBottomViewXZ:self.viewbottom];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-(void)setArrXZImages:(NSArray *)arrXZImages
|
||||||
|
{
|
||||||
|
_arrXZImages = arrXZImages;
|
||||||
|
[self.lbwz setHidden:YES];
|
||||||
|
self.viweBack.arrXZImages = self.arrXZImages;
|
||||||
|
}
|
||||||
|
-(void)setStrID:(NSString *)strID
|
||||||
|
{
|
||||||
|
_strID = strID;
|
||||||
|
|
||||||
|
[self getdata];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)panGestureAction:(UIPanGestureRecognizer *)pan
|
- (void)panGestureAction:(UIPanGestureRecognizer *)pan
|
||||||
{
|
{
|
||||||
if(pan.state == UIGestureRecognizerStateChanged)
|
if(pan.state == UIGestureRecognizerStateChanged)
|
||||||
|
@ -196,6 +384,85 @@
|
||||||
[pan setTranslation:CGPointZero inView:self];
|
[pan setTranslation:CGPointZero inView:self];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
-(void)cxAction:(UIButton *)sender
|
||||||
|
{
|
||||||
|
if(self.isdrawEnd==NO)
|
||||||
|
{
|
||||||
|
[HXHud showMessage:@"请等待写作完成" afterDelayType:0];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
self.isdrawEnd = NO;
|
||||||
|
SSEDrawListTextModel *model = self.arrdata[sender.tag];
|
||||||
|
model.isaddEnd = NO;
|
||||||
|
self.modelSelect = model;
|
||||||
|
|
||||||
|
[self getDuanLuo:model.value];
|
||||||
|
}
|
||||||
|
-(void)bottomAction:(UIButton *)sender
|
||||||
|
{
|
||||||
|
if(self.isdrawEnd==NO)
|
||||||
|
{
|
||||||
|
[HXHud showMessage:@"请等待写作完成" afterDelayType:0];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (sender.tag) {
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
[self getdata];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
[LoadAlterView show];
|
||||||
|
|
||||||
|
NSString *strscene = @"";
|
||||||
|
///10改写作文 11拍题成文 12 拍照续写
|
||||||
|
if(self.type == 10)
|
||||||
|
{
|
||||||
|
strscene = @"pic_rewrite";
|
||||||
|
}
|
||||||
|
else if(self.type == 11)
|
||||||
|
{
|
||||||
|
strscene = @"pic_question";
|
||||||
|
}
|
||||||
|
else if(self.type == 12)
|
||||||
|
{
|
||||||
|
strscene = @"pic_with_front";
|
||||||
|
}
|
||||||
|
|
||||||
|
NSMutableArray *arrcontent = [NSMutableArray new];
|
||||||
|
for(SSEDrawListTextModel *model in self.arrdata)
|
||||||
|
{
|
||||||
|
if(model.value.length>0)
|
||||||
|
{
|
||||||
|
[arrcontent addObject:model.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[NetWorkManager requestPicAiSaveData:self ID:self.strID scene:strscene content:[arrcontent componentsJoinedByString:@"\n"] Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
XieZuoSaveAlterView *view = [[XieZuoSaveAlterView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT)];
|
||||||
|
[self.viewController.view addSubview:view];
|
||||||
|
[view setBackValue:^{
|
||||||
|
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
||||||
|
pasteboard.string = [arrcontent componentsJoinedByString:@"\n"];
|
||||||
|
[HXHud showMessage:@"复制成功" afterDelayType:0];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
////
|
||||||
-(void)tiyanAction
|
-(void)tiyanAction
|
||||||
{
|
{
|
||||||
if(self.isdrawEnd==NO)
|
if(self.isdrawEnd==NO)
|
||||||
|
@ -204,10 +471,17 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
[self stopMotion];
|
[self stopMotion];
|
||||||
|
if(self.isshiyong)
|
||||||
|
{
|
||||||
StartPayViewController *vc = [StartPayViewController new];
|
StartPayViewController *vc = [StartPayViewController new];
|
||||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{///复制
|
||||||
|
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
||||||
|
pasteboard.string = self.lbwz.strValue;
|
||||||
|
[HXHud showMessage:@"复制成功" afterDelayType:0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
-(void)tuoluo
|
-(void)tuoluo
|
||||||
{
|
{
|
||||||
|
@ -235,8 +509,11 @@
|
||||||
}
|
}
|
||||||
-(void)stopMotion
|
-(void)stopMotion
|
||||||
{
|
{
|
||||||
|
if(self.motionManager)
|
||||||
|
{
|
||||||
[self.motionManager stopAccelerometerUpdates];
|
[self.motionManager stopAccelerometerUpdates];
|
||||||
self.motionManager = nil;
|
self.motionManager = nil;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#pragma mark - UIScrollView
|
#pragma mark - UIScrollView
|
||||||
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
|
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
|
||||||
|
@ -248,23 +525,221 @@
|
||||||
self.isDragging = NO;
|
self.isDragging = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)setModelYD:(ExamplePicModelDataItems *)modelYD
|
-(void)nomoData
|
||||||
{
|
{
|
||||||
_modelYD = modelYD;
|
for(UIView *view in self.arrLBWZ)
|
||||||
|
{
|
||||||
|
[view removeFromSuperview];
|
||||||
|
}
|
||||||
|
for(UIButton *btin in self.arrBTN)
|
||||||
|
{
|
||||||
|
[btin removeFromSuperview];
|
||||||
|
}
|
||||||
|
self.arrLBWZ = [NSMutableArray new];
|
||||||
|
self.arrBTN = [NSMutableArray new];
|
||||||
|
self.arrdata = [NSMutableArray new];
|
||||||
|
for(int i = 0 ; i < 200;i++)
|
||||||
|
{
|
||||||
|
SSEDrawListTextModel *model = [SSEDrawListTextModel new];
|
||||||
|
[self.arrdata addObject:model];
|
||||||
|
}
|
||||||
|
|
||||||
self.viweBack.model = self.modelYD;
|
self.isStartDrawText = NO;
|
||||||
|
self.isdrawEnd = NO;
|
||||||
|
self.iDraw = 0;
|
||||||
|
self.viewDarwLast = nil;
|
||||||
|
}
|
||||||
|
///段落重写 rewrite {content,type}
|
||||||
|
-(void)getDuanLuo:(NSString *)content
|
||||||
|
{
|
||||||
|
self.modelSelect.lbwz.isWriteEnd = NO;
|
||||||
|
[self.modelSelect.lbwz setBackHeight:^(float fheight, BOOL isend) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
|
||||||
NSString *strcontet = self.modelYD.result.content;
|
NSString *strscene = @"";
|
||||||
strcontet = [NSString stringWithFormat:@" %@",strcontet];
|
///10改写作文 11拍题成文 12 拍照续写
|
||||||
strcontet = [strcontet stringByReplacingOccurrencesOfString:@"\n" withString:@"\n "];
|
if(self.type == 10)
|
||||||
|
{
|
||||||
|
strscene = @"pic_rewrite";
|
||||||
|
}
|
||||||
|
else if(self.type == 10)
|
||||||
|
{
|
||||||
|
strscene = @"pic_question";
|
||||||
|
}
|
||||||
|
else if(self.type == 10)
|
||||||
|
{
|
||||||
|
strscene = @"pic_with_front";
|
||||||
|
}
|
||||||
|
|
||||||
self.lbwz.fspeed = 0.02;
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
self.lbwz.strValue = strcontet;
|
[dicpush setObject:[Tools isStringnil:strscene] forKey:@"type"];
|
||||||
|
[dicpush setObject:[Tools isStringnil:content] forKey:@"content"];
|
||||||
|
|
||||||
|
[[SSENetWorkManager shareManager] requestTo:[NSString stringWithFormat:@"https://aiw.batiao8.com/api/chat?scene=rewrite"] dicpush:dicpush config:^(SSEConfigModel * _Nonnull config) {
|
||||||
|
} backValue:^(NSString * _Nonnull value, BOOL isfinish) {
|
||||||
|
NSLog(@"%@",value);
|
||||||
|
if(value.length>4)
|
||||||
|
{
|
||||||
|
self.modelSelect.value = value;
|
||||||
|
self.modelSelect.lbwz.strValue = [NSString stringWithFormat:@" %@",self.modelSelect.value];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(isfinish)
|
||||||
|
{
|
||||||
|
self.modelSelect.isaddEnd = YES;
|
||||||
|
self.isdrawEnd = YES;
|
||||||
|
self.modelSelect.lbwz.isWriteEnd = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} error:^(NSString * _Nonnull errorString) {
|
||||||
|
[HXHud showMessage:errorString afterDelayType:0];
|
||||||
|
} ID:^(NSString * _Nonnull value) {
|
||||||
|
|
||||||
self.lbwz.isWriteEnd = YES;
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
///全文
|
||||||
|
-(void)getdata
|
||||||
|
{
|
||||||
|
[LoadAlterView show];
|
||||||
|
[self nomoData];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:[NSString stringWithFormat:@"%@",self.strID] forKey:@"id"];
|
||||||
|
|
||||||
|
NSString *strscene = @"";
|
||||||
|
///10改写作文 11拍题成文 12 拍照续写
|
||||||
|
if(self.type == 10)
|
||||||
|
{
|
||||||
|
strscene = @"pic_rewrite";
|
||||||
|
}
|
||||||
|
else if(self.type == 11)
|
||||||
|
{
|
||||||
|
strscene = @"pic_question";
|
||||||
|
}
|
||||||
|
else if(self.type == 12)
|
||||||
|
{
|
||||||
|
strscene = @"pic_with_front";
|
||||||
|
}
|
||||||
|
|
||||||
|
[[SSENetWorkManager shareManager] requestTo:[NSString stringWithFormat:@"https://aiw.batiao8.com/api/pic/completions?scene=%@",strscene] dicpush:dicpush config:^(SSEConfigModel * _Nonnull config) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
self.modelConfig = config;
|
||||||
|
} backValue:^(NSString * _Nonnull value, BOOL isfinish) {
|
||||||
|
if(value.length>10)
|
||||||
|
{
|
||||||
|
[self chuliShuJu:value isfinish:NO];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(isfinish)
|
||||||
|
{
|
||||||
|
[self chuliShuJu:value isfinish:YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} error:^(NSString * _Nonnull errorString) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[HXHud showMessage:errorString afterDelayType:0];
|
||||||
|
} ID:^(NSString * _Nonnull value) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)chuliShuJu:(NSString *)value isfinish:(BOOL)isfinish
|
||||||
|
{
|
||||||
|
if(isfinish)
|
||||||
|
{
|
||||||
|
for(SSEDrawListTextModel *model in self.arrdata)
|
||||||
|
{
|
||||||
|
model.isaddEnd = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSString *strshow = [value stringByReplacingOccurrencesOfString:@"* " withString:@"|&&|"];
|
||||||
|
strshow = [strshow stringByReplacingOccurrencesOfString:@"*" withString:@"|&&|"];
|
||||||
|
NSArray *arrlist = [strshow componentsSeparatedByString:@"|&&|"];
|
||||||
|
SSEDrawListTextModel *modellast;
|
||||||
|
for(int i = 0 ; i < arrlist.count;i++)
|
||||||
|
{
|
||||||
|
NSString *str = arrlist[i];
|
||||||
|
if(str.length<2)
|
||||||
|
{
|
||||||
|
continue;;
|
||||||
|
}
|
||||||
|
if(modellast)
|
||||||
|
{
|
||||||
|
modellast.isaddEnd = YES;
|
||||||
|
}
|
||||||
|
SSEDrawListTextModel *model = self.arrdata[i];
|
||||||
|
str = [str stringByReplacingOccurrencesOfString:@"\n" withString:@""];
|
||||||
|
model.value = str;
|
||||||
|
modellast = model;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
if(self.isStartDrawText==NO)
|
||||||
|
{
|
||||||
|
self.isStartDrawText = YES;
|
||||||
|
[self drawTextInfo];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
-(void)drawTextInfo
|
||||||
|
{
|
||||||
|
if(self.iDraw>=self.arrdata.count)
|
||||||
|
{
|
||||||
|
self.isdrawEnd = YES;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SSEDrawListTextModel *model = self.arrdata[self.iDraw];
|
||||||
|
if(model.value.length==0)
|
||||||
|
{
|
||||||
|
self.iDraw++;
|
||||||
|
[self drawTextInfo];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ViewLable *lbwz;
|
||||||
|
if(model.lbwz==nil)
|
||||||
|
{
|
||||||
|
lbwz = [self drawItemLastView:self.viewDarwLast tag:self.iDraw];
|
||||||
|
if(self.modelConfig.time.intValue>0)
|
||||||
|
{
|
||||||
|
lbwz.fspeed = self.modelConfig.time.intValue/1000.0;
|
||||||
|
}
|
||||||
|
[lbwz setBackHeight:^(float fheight, BOOL isend) {
|
||||||
|
if(isend)
|
||||||
|
{
|
||||||
|
self.iDraw+=1;
|
||||||
|
}
|
||||||
|
if(fheight==-1||isend)
|
||||||
|
{
|
||||||
|
[self drawTextInfo];
|
||||||
|
}
|
||||||
|
if(self.isDragging==NO)
|
||||||
|
{
|
||||||
|
if(self.scvback.contentSize.height-self.scvback.height>0)
|
||||||
|
{
|
||||||
|
[self.scvback setContentOffset:CGPointMake(0, self.scvback.contentSize.height-self.scvback.height) animated:NO];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
self.viewDarwLast = lbwz;
|
||||||
|
model.lbwz = lbwz;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lbwz = model.lbwz;
|
||||||
|
}
|
||||||
|
lbwz.isWriteEnd = model.isaddEnd;
|
||||||
|
|
||||||
|
lbwz.strValue = [NSString stringWithFormat:@" %@",model.value];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import "TextbookInfoModel.h"
|
#import "TextbookInfoModel.h"
|
||||||
|
#import "WriteCorrectScoreModel.h"
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartKTXZPGDetailZHView : UIView
|
@interface StartKTXZPGDetailZHView : UIView
|
||||||
|
@ -14,6 +15,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) TextbookInfoModelDataResult *modelResult;
|
@property (nonatomic , strong) TextbookInfoModelDataResult *modelResult;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *strID;
|
||||||
|
///评分
|
||||||
|
@property (nonatomic , strong) WriteCorrectScoreModelData *modelPF;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "StartKTXZPGDetailZHView.h"
|
#import "StartKTXZPGDetailZHView.h"
|
||||||
|
#import "RoleTreeModel.h"
|
||||||
|
|
||||||
@interface StartKTXZPGDetailZHView ()<UIScrollViewDelegate>
|
@interface StartKTXZPGDetailZHView ()<UIScrollViewDelegate>
|
||||||
///
|
///
|
||||||
|
@ -202,6 +202,10 @@
|
||||||
|
|
||||||
UILabel *lbbzName = [[UILabel alloc] init];
|
UILabel *lbbzName = [[UILabel alloc] init];
|
||||||
[lbbzName setText:[Tools isStringnilkong:self.modelResult.complex_review.full_review.style]];
|
[lbbzName setText:[Tools isStringnilkong:self.modelResult.complex_review.full_review.style]];
|
||||||
|
if(self.modelPF)
|
||||||
|
{
|
||||||
|
[lbbzName setText:[UserInfoModel shareModel].user_stage.parent_name];
|
||||||
|
}
|
||||||
[lbbzName setTextColor:RGBCOLOR(61, 61, 61)];
|
[lbbzName setTextColor:RGBCOLOR(61, 61, 61)];
|
||||||
[lbbzName setTextAlignment:NSTextAlignmentLeft];
|
[lbbzName setTextAlignment:NSTextAlignmentLeft];
|
||||||
[lbbzName setFont:[UIFont systemFontOfSize:12]];
|
[lbbzName setFont:[UIFont systemFontOfSize:12]];
|
||||||
|
@ -226,14 +230,28 @@
|
||||||
|
|
||||||
NSInteger iline = self.modelResult.complex_review.score.count/2.0;
|
NSInteger iline = self.modelResult.complex_review.score.count/2.0;
|
||||||
if(self.modelResult.complex_review.score.count%2!=0)iline+=1;
|
if(self.modelResult.complex_review.score.count%2!=0)iline+=1;
|
||||||
|
if(self.modelPF)
|
||||||
|
{
|
||||||
|
iline = self.modelPF.complex_review.score.count/2.0;
|
||||||
|
if(self.modelPF.complex_review.score.count%2!=0)iline+=1;
|
||||||
|
}
|
||||||
UIView *viewlast = nil;
|
UIView *viewlast = nil;
|
||||||
for(int i = 0; i < iline; i++)
|
for(int i = 0; i < iline; i++)
|
||||||
{
|
{
|
||||||
for(int j = 0 ; j < 2; j++)
|
for(int j = 0 ; j < 2; j++)
|
||||||
|
{
|
||||||
|
TextbookInfoModelDataResultComplexScore *model;
|
||||||
|
if(self.modelResult)
|
||||||
{
|
{
|
||||||
if(i*2+j>=self.modelResult.complex_review.score.count)break;
|
if(i*2+j>=self.modelResult.complex_review.score.count)break;
|
||||||
TextbookInfoModelDataResultComplexScore *model = self.modelResult.complex_review.score[i*2+j];
|
model = self.modelResult.complex_review.score[i*2+j];
|
||||||
|
}
|
||||||
|
if(self.modelPF)
|
||||||
|
{
|
||||||
|
if(i*2+j>=self.modelPF.complex_review.score.count)break;
|
||||||
|
model = self.modelPF.complex_review.score[i*2+j];
|
||||||
|
}
|
||||||
|
|
||||||
UILabel *lbname = [[UILabel alloc] init];
|
UILabel *lbname = [[UILabel alloc] init];
|
||||||
[lbname setText:[Tools isStringnilkong:model.name]];
|
[lbname setText:[Tools isStringnilkong:model.name]];
|
||||||
[lbname setTextColor:RGBCOLOR(61, 61, 61)];
|
[lbname setTextColor:RGBCOLOR(61, 61, 61)];
|
||||||
|
@ -312,7 +330,13 @@
|
||||||
[self drawTopView:self.viewtop];
|
[self drawTopView:self.viewtop];
|
||||||
[self drawContentView:self.viewcontent];
|
[self drawContentView:self.viewcontent];
|
||||||
}
|
}
|
||||||
|
-(void)setModelPF:(WriteCorrectScoreModelData *)modelPF
|
||||||
|
{
|
||||||
|
_modelPF = modelPF;
|
||||||
|
if(modelPF==nil)return;
|
||||||
|
[self drawTopView:self.viewtop];
|
||||||
|
// [self drawContentView:self.viewcontent];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - UIScrollView
|
#pragma mark - UIScrollView
|
||||||
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
|
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
|
||||||
|
|
|
@ -146,7 +146,9 @@
|
||||||
switch (sender.tag) {
|
switch (sender.tag) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
|
CamreViewController *vc = [CamreViewController new];
|
||||||
|
vc.type = 2;
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|
|
@ -40,8 +40,6 @@
|
||||||
@property (nonatomic , strong) SSEConfigModel *modelConfig;
|
@property (nonatomic , strong) SSEConfigModel *modelConfig;
|
||||||
@property (nonatomic , assign) BOOL isStartDrawText;
|
@property (nonatomic , assign) BOOL isStartDrawText;
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) NSTimer *timerDraw;
|
|
||||||
///
|
|
||||||
@property (nonatomic , strong) MASConstraint *bottomScroll;
|
@property (nonatomic , strong) MASConstraint *bottomScroll;
|
||||||
@property (nonatomic , assign) NSInteger iDraw;
|
@property (nonatomic , assign) NSInteger iDraw;
|
||||||
///
|
///
|
||||||
|
@ -243,9 +241,6 @@
|
||||||
SSEDrawListTextModel *model = self.arrdata[sender.tag];
|
SSEDrawListTextModel *model = self.arrdata[sender.tag];
|
||||||
model.isaddEnd = NO;
|
model.isaddEnd = NO;
|
||||||
self.modelSelect = model;
|
self.modelSelect = model;
|
||||||
// model.value = @"";
|
|
||||||
// ViewLable *lbwz = model.lbwz;
|
|
||||||
// lbwz.strValue = @"";
|
|
||||||
|
|
||||||
[self getDuanLuo:model.value];
|
[self getDuanLuo:model.value];
|
||||||
|
|
||||||
|
@ -439,6 +434,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} error:^(NSString * _Nonnull errorString) {
|
} error:^(NSString * _Nonnull errorString) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
[HXHud showMessage:errorString afterDelayType:0];
|
[HXHud showMessage:errorString afterDelayType:0];
|
||||||
} ID:^(NSString * _Nonnull value) {
|
} ID:^(NSString * _Nonnull value) {
|
||||||
|
|
||||||
|
@ -481,8 +477,6 @@
|
||||||
if(self.isStartDrawText==NO)
|
if(self.isStartDrawText==NO)
|
||||||
{
|
{
|
||||||
self.isStartDrawText = YES;
|
self.isStartDrawText = YES;
|
||||||
self.timerDraw = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(drawTextInfo) userInfo:nil repeats:YES];
|
|
||||||
[[NSRunLoop mainRunLoop] addTimer:self.timerDraw forMode:NSRunLoopCommonModes];
|
|
||||||
[self drawTextInfo];
|
[self drawTextInfo];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -491,8 +485,6 @@
|
||||||
{
|
{
|
||||||
if(self.iDraw>=self.arrdata.count)
|
if(self.iDraw>=self.arrdata.count)
|
||||||
{
|
{
|
||||||
[self.timerDraw invalidate];
|
|
||||||
self.timerDraw = nil;
|
|
||||||
self.isdrawEnd = YES;
|
self.isdrawEnd = YES;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -517,6 +509,10 @@
|
||||||
{
|
{
|
||||||
self.iDraw+=1;
|
self.iDraw+=1;
|
||||||
}
|
}
|
||||||
|
if(fheight==-1||isend)
|
||||||
|
{
|
||||||
|
[self drawTextInfo];
|
||||||
|
}
|
||||||
if(self.isDragging==NO)
|
if(self.isDragging==NO)
|
||||||
{
|
{
|
||||||
if(self.scvback.contentSize.height-self.scvback.height>0)
|
if(self.scvback.contentSize.height-self.scvback.height>0)
|
||||||
|
|
|
@ -31,8 +31,6 @@ typedef void(^ChuangZuoSiLuViewDraw)(void);
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) SSEConfigModel *modelConfig;
|
@property (nonatomic , strong) SSEConfigModel *modelConfig;
|
||||||
@property (nonatomic , assign) BOOL isStartDrawText;
|
@property (nonatomic , assign) BOOL isStartDrawText;
|
||||||
///
|
|
||||||
@property (nonatomic , strong) NSTimer *timerDraw;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -270,6 +268,7 @@ typedef void(^ChuangZuoSiLuViewDraw)(void);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} error:^(NSString * _Nonnull errorString) {
|
} error:^(NSString * _Nonnull errorString) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
[HXHud showMessage:errorString afterDelayType:0];
|
[HXHud showMessage:errorString afterDelayType:0];
|
||||||
} ID:^(NSString * _Nonnull value) {
|
} ID:^(NSString * _Nonnull value) {
|
||||||
|
|
||||||
|
@ -352,8 +351,6 @@ typedef void(^ChuangZuoSiLuViewDraw)(void);
|
||||||
if(self.isStartDrawText==NO)
|
if(self.isStartDrawText==NO)
|
||||||
{
|
{
|
||||||
self.isStartDrawText = YES;
|
self.isStartDrawText = YES;
|
||||||
self.timerDraw = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(drawTextInfo) userInfo:nil repeats:YES];
|
|
||||||
[[NSRunLoop mainRunLoop] addTimer:self.timerDraw forMode:NSRunLoopCommonModes];
|
|
||||||
[self drawTextInfo];
|
[self drawTextInfo];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -363,8 +360,6 @@ typedef void(^ChuangZuoSiLuViewDraw)(void);
|
||||||
{
|
{
|
||||||
if(self.iDraw>=self.arrDraw.count)
|
if(self.iDraw>=self.arrDraw.count)
|
||||||
{
|
{
|
||||||
[self.timerDraw invalidate];
|
|
||||||
self.timerDraw = nil;
|
|
||||||
self.isdrawEnd = YES;
|
self.isdrawEnd = YES;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -398,6 +393,10 @@ typedef void(^ChuangZuoSiLuViewDraw)(void);
|
||||||
self.iDraw+=1;
|
self.iDraw+=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(fheight==-1||isend)
|
||||||
|
{
|
||||||
|
[self drawTextInfo];
|
||||||
|
}
|
||||||
if(self.isDragging==NO)
|
if(self.isDragging==NO)
|
||||||
{
|
{
|
||||||
if(self.scvback.contentSize.height-self.scvback.height>0)
|
if(self.scvback.contentSize.height-self.scvback.height>0)
|
||||||
|
|
|
@ -297,6 +297,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} error:^(NSString * _Nonnull errorString) {
|
} error:^(NSString * _Nonnull errorString) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
[HXHud showMessage:errorString afterDelayType:0];
|
[HXHud showMessage:errorString afterDelayType:0];
|
||||||
} ID:^(NSString * _Nonnull value) {
|
} ID:^(NSString * _Nonnull value) {
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
typedef void(^DuanLuoXieZuoCellViewBack)(BOOL isend);
|
typedef void(^DuanLuoXieZuoCellViewBack)(float height, BOOL isend);
|
||||||
@interface DuanLuoXieZuoCellView : UIView
|
@interface DuanLuoXieZuoCellView : UIView
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) NSString *strname;
|
@property (nonatomic , strong) NSString *strname;
|
||||||
|
@ -22,6 +22,9 @@ typedef void(^DuanLuoXieZuoCellViewBack)(BOOL isend);
|
||||||
///0 1 2
|
///0 1 2
|
||||||
@property (nonatomic , strong) NSString *paragraph_type;
|
@property (nonatomic , strong) NSString *paragraph_type;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSDictionary *dicpush;
|
||||||
|
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) DuanLuoXieZuoCellViewBack backValue;
|
@property (nonatomic , strong) DuanLuoXieZuoCellViewBack backValue;
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
lbwz.textFont = [UIFont systemFontOfSize:14];
|
lbwz.textFont = [UIFont systemFontOfSize:14];
|
||||||
_lbwz = lbwz;
|
_lbwz = lbwz;
|
||||||
[lbwz setBackHeight:^(float fheight, BOOL isend) {
|
[lbwz setBackHeight:^(float fheight, BOOL isend) {
|
||||||
self.backValue(isend);
|
self.backValue(fheight,isend);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
UILabel *lbnumber = [[UILabel alloc] init];
|
UILabel *lbnumber = [[UILabel alloc] init];
|
||||||
|
@ -130,6 +130,7 @@
|
||||||
}
|
}
|
||||||
-(void)setIsWriteEnd:(BOOL)isWriteEnd
|
-(void)setIsWriteEnd:(BOOL)isWriteEnd
|
||||||
{
|
{
|
||||||
|
_isWriteEnd = isWriteEnd;
|
||||||
self.lbwz.isWriteEnd = isWriteEnd;
|
self.lbwz.isWriteEnd = isWriteEnd;
|
||||||
}
|
}
|
||||||
-(void)setFspeed:(float)fspeed
|
-(void)setFspeed:(float)fspeed
|
||||||
|
@ -158,9 +159,18 @@
|
||||||
|
|
||||||
-(void)nextAction
|
-(void)nextAction
|
||||||
{
|
{
|
||||||
|
if(self.isWriteEnd==NO)
|
||||||
|
{
|
||||||
|
[HXHud showMessage:@"请等待写作完成" afterDelayType:0];
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(self.paragraph_type.intValue==0)
|
if(self.paragraph_type.intValue==0)
|
||||||
{///开头段落续写
|
{///开头段落续写
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setDictionary:self.dicpush];
|
||||||
|
[dicpush setObject:self.strvalue forKey:@"paragraph"];
|
||||||
DuanLuoXieZuoQWViewController *vc = [DuanLuoXieZuoQWViewController new];
|
DuanLuoXieZuoQWViewController *vc = [DuanLuoXieZuoQWViewController new];
|
||||||
|
vc.dicpush = dicpush;
|
||||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,11 @@
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) NSMutableArray *arrdata;
|
@property (nonatomic , strong) NSMutableArray *arrdata;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSMutableArray *arrCreateData;
|
||||||
|
|
||||||
@property (nonatomic , assign) BOOL isStartDrawText;
|
@property (nonatomic , assign) BOOL isStartDrawText;
|
||||||
@property (nonatomic , assign) BOOL isdrawEnd;
|
@property (nonatomic , assign) BOOL isdrawEnd;
|
||||||
///
|
|
||||||
@property (nonatomic , strong) NSTimer *timerDraw;
|
|
||||||
|
|
||||||
@property (nonatomic , assign) int iDraw;
|
@property (nonatomic , assign) int iDraw;
|
||||||
///
|
///
|
||||||
|
@ -36,6 +37,10 @@
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) MASConstraint *scrollBottom;
|
@property (nonatomic , strong) MASConstraint *scrollBottom;
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSDictionary *dicpush;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation DuanLuoXieZuoView
|
@implementation DuanLuoXieZuoView
|
||||||
|
@ -94,11 +99,6 @@
|
||||||
}];
|
}];
|
||||||
viewitem.technique = self.technique;
|
viewitem.technique = self.technique;
|
||||||
viewitem.paragraph_type = self.paragraph_type;
|
viewitem.paragraph_type = self.paragraph_type;
|
||||||
// viewitem.strname = @"结果一";
|
|
||||||
// viewitem.strvalue = @"阳光透过茂密的树叶,洒在我的帐篷上。我睁开眼睛,闻到了清新的泥土味和远处溪水的声音。这是我第一次露营,心情无比激动。";
|
|
||||||
// [viewitem setBackValue:^(BOOL isend) {
|
|
||||||
//
|
|
||||||
// }];
|
|
||||||
if(self.scrollBottom)
|
if(self.scrollBottom)
|
||||||
{
|
{
|
||||||
[self.scrollBottom uninstall];
|
[self.scrollBottom uninstall];
|
||||||
|
@ -120,12 +120,14 @@
|
||||||
}
|
}
|
||||||
-(void)addValues
|
-(void)addValues
|
||||||
{
|
{
|
||||||
|
self.arrCreateData = [NSMutableArray new];
|
||||||
for(int i = 0 ; i < 3; i++)
|
for(int i = 0 ; i < 3; i++)
|
||||||
{
|
{
|
||||||
SSEDrawListTextModel *model = [SSEDrawListTextModel new];
|
SSEDrawListTextModel *model = [SSEDrawListTextModel new];
|
||||||
model.title = [NSString stringWithFormat:@"结果%@",[Tools convertNumberToUppercase:self.arrdata.count+1]];
|
model.title = [NSString stringWithFormat:@"结果%@",[Tools convertNumberToUppercase:self.arrCreateData.count + self.arrdata.count+1]];
|
||||||
[self.arrdata addObject:model];
|
[self.arrCreateData addObject:model];
|
||||||
}
|
}
|
||||||
|
[self.arrdata addObjectsFromArray:self.arrCreateData];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,6 +159,7 @@
|
||||||
[dicpush setObject:[Tools isStringnil:self.require] forKey:@"require"];
|
[dicpush setObject:[Tools isStringnil:self.require] forKey:@"require"];
|
||||||
[dicpush setObject:[NSNumber numberWithInt:self.paragraph_type.intValue] forKey:@"paragraph_type"];
|
[dicpush setObject:[NSNumber numberWithInt:self.paragraph_type.intValue] forKey:@"paragraph_type"];
|
||||||
[dicpush setObject:[Tools isStringnil:self.technique] forKey:@"technique"];
|
[dicpush setObject:[Tools isStringnil:self.technique] forKey:@"technique"];
|
||||||
|
self.dicpush = dicpush;
|
||||||
|
|
||||||
[[SSENetWorkManager shareManager] requestTo:[NSString stringWithFormat:@"https://aiw.batiao8.com/api/chat?scene=%@",scenct] dicpush:dicpush config:^(SSEConfigModel * _Nonnull config) {
|
[[SSENetWorkManager shareManager] requestTo:[NSString stringWithFormat:@"https://aiw.batiao8.com/api/chat?scene=%@",scenct] dicpush:dicpush config:^(SSEConfigModel * _Nonnull config) {
|
||||||
[LoadAlterView dismiss];
|
[LoadAlterView dismiss];
|
||||||
|
@ -174,6 +177,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} error:^(NSString * _Nonnull errorString) {
|
} error:^(NSString * _Nonnull errorString) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
[HXHud showMessage:errorString afterDelayType:0];
|
[HXHud showMessage:errorString afterDelayType:0];
|
||||||
} ID:^(NSString * _Nonnull value) {
|
} ID:^(NSString * _Nonnull value) {
|
||||||
|
|
||||||
|
@ -183,7 +187,7 @@
|
||||||
{
|
{
|
||||||
if(isfinish)
|
if(isfinish)
|
||||||
{
|
{
|
||||||
for(SSEDrawListTextModel *model in self.arrdata)
|
for(SSEDrawListTextModel *model in self.arrCreateData)
|
||||||
{
|
{
|
||||||
model.isaddEnd = YES;
|
model.isaddEnd = YES;
|
||||||
}
|
}
|
||||||
|
@ -209,7 +213,7 @@
|
||||||
{
|
{
|
||||||
modellast.isaddEnd = YES;
|
modellast.isaddEnd = YES;
|
||||||
}
|
}
|
||||||
SSEDrawListTextModel *model = self.arrdata[i];
|
SSEDrawListTextModel *model = self.arrCreateData[i];
|
||||||
str = [str stringByReplacingOccurrencesOfString:@"\n" withString:@""];
|
str = [str stringByReplacingOccurrencesOfString:@"\n" withString:@""];
|
||||||
model.value = str;
|
model.value = str;
|
||||||
modellast = model;
|
modellast = model;
|
||||||
|
@ -219,8 +223,6 @@
|
||||||
if(self.isStartDrawText==NO)
|
if(self.isStartDrawText==NO)
|
||||||
{
|
{
|
||||||
self.isStartDrawText = YES;
|
self.isStartDrawText = YES;
|
||||||
self.timerDraw = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(drawTextInfo) userInfo:nil repeats:YES];
|
|
||||||
[[NSRunLoop mainRunLoop] addTimer:self.timerDraw forMode:NSRunLoopCommonModes];
|
|
||||||
[self drawTextInfo];
|
[self drawTextInfo];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -230,8 +232,6 @@
|
||||||
{
|
{
|
||||||
if(self.iDraw>=self.arrdata.count)
|
if(self.iDraw>=self.arrdata.count)
|
||||||
{
|
{
|
||||||
[self.timerDraw invalidate];
|
|
||||||
self.timerDraw = nil;
|
|
||||||
self.isdrawEnd = YES;
|
self.isdrawEnd = YES;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -251,11 +251,17 @@
|
||||||
{
|
{
|
||||||
lbwz.fspeed = self.modelConfig.time.intValue/1000.0;
|
lbwz.fspeed = self.modelConfig.time.intValue/1000.0;
|
||||||
}
|
}
|
||||||
[lbwz setBackValue:^(BOOL isend) {
|
lbwz.dicpush = self.dicpush;
|
||||||
|
lbwz.strname = model.title;
|
||||||
|
[lbwz setBackValue:^(float height, BOOL isend) {
|
||||||
if(isend)
|
if(isend)
|
||||||
{
|
{
|
||||||
self.iDraw+=1;
|
self.iDraw+=1;
|
||||||
}
|
}
|
||||||
|
if(height==-1 || isend)
|
||||||
|
{
|
||||||
|
[self drawTextInfo];
|
||||||
|
}
|
||||||
if(self.isDragging==NO)
|
if(self.isDragging==NO)
|
||||||
{
|
{
|
||||||
if(self.scvback.contentSize.height-self.scvback.height>0)
|
if(self.scvback.contentSize.height-self.scvback.height>0)
|
||||||
|
@ -272,10 +278,7 @@
|
||||||
lbwz = model.view;
|
lbwz = model.view;
|
||||||
}
|
}
|
||||||
lbwz.strvalue = model.value;
|
lbwz.strvalue = model.value;
|
||||||
lbwz.strname = model.title;
|
|
||||||
lbwz.isWriteEnd = model.isaddEnd;
|
lbwz.isWriteEnd = model.isaddEnd;
|
||||||
|
|
||||||
// NSLog(@"%@",model.value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface DuanLuoXieZuoQWViewController : BaseViewController
|
@interface DuanLuoXieZuoQWViewController : BaseViewController
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSDictionary *dicpush;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
make.left.right.bottom.equalTo(self.view);
|
make.left.right.bottom.equalTo(self.view);
|
||||||
make.top.offset(NavHeight);
|
make.top.offset(NavHeight);
|
||||||
}];
|
}];
|
||||||
|
view.dicpush = self.dicpush;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface DuanLuoXieZuoQWView : UIView
|
@interface DuanLuoXieZuoQWView : UIView
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSDictionary *dicpush;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -9,7 +9,16 @@
|
||||||
#import "ChongXieYiPianViewController.h"
|
#import "ChongXieYiPianViewController.h"
|
||||||
#import "FenXiangWenZhangAlterView.h"
|
#import "FenXiangWenZhangAlterView.h"
|
||||||
|
|
||||||
@interface DuanLuoXieZuoQWView ()
|
|
||||||
|
#import "XieZuoSaveAlterView.h"
|
||||||
|
#import "SSENetWorkManager.h"
|
||||||
|
#import "RoleTreeModel.h"
|
||||||
|
#import "SSEDrawListTextModel.h"
|
||||||
|
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
|
||||||
|
|
||||||
|
@interface DuanLuoXieZuoQWView ()<UIScrollViewDelegate>
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) UIScrollView *scvback;
|
@property (nonatomic , strong) UIScrollView *scvback;
|
||||||
///
|
///
|
||||||
|
@ -17,12 +26,29 @@
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) UILabel *lbyaoqiu;
|
@property (nonatomic , strong) UILabel *lbyaoqiu;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@property (nonatomic , assign) BOOL isDragging;
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) NSArray *arrdata;
|
@property (nonatomic , strong) NSMutableArray *arrLBWZ;
|
||||||
|
@property (nonatomic , strong) NSMutableArray *arrBTN;
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) NSMutableArray *arrItems;
|
@property (nonatomic , strong) NSMutableArray *arrdata;
|
||||||
@property (nonatomic , strong) NSMutableArray *arrBts;
|
|
||||||
@property (nonatomic , assign) BOOL isdrawEnd;
|
@property (nonatomic , assign) BOOL isdrawEnd;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) SSEConfigModel *modelConfig;
|
||||||
|
@property (nonatomic , assign) BOOL isStartDrawText;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) MASConstraint *bottomScroll;
|
||||||
|
@property (nonatomic , assign) NSInteger iDraw;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UIView *viewDarwLast;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) SSEDrawListTextModel *modelSelect;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation DuanLuoXieZuoQWView
|
@implementation DuanLuoXieZuoQWView
|
||||||
|
@ -32,6 +58,7 @@
|
||||||
if(self = [super initWithFrame:frame])
|
if(self = [super initWithFrame:frame])
|
||||||
{
|
{
|
||||||
UIScrollView *scvback = [[UIScrollView alloc] init];
|
UIScrollView *scvback = [[UIScrollView alloc] init];
|
||||||
|
[scvback setDelegate:self];
|
||||||
[self addSubview:scvback];
|
[self addSubview:scvback];
|
||||||
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.left.top.offset(0);
|
make.left.top.offset(0);
|
||||||
|
@ -68,7 +95,7 @@
|
||||||
_lbname = lbname;
|
_lbname = lbname;
|
||||||
|
|
||||||
UILabel *lbyaoqiu = [[UILabel alloc] init];
|
UILabel *lbyaoqiu = [[UILabel alloc] init];
|
||||||
[lbyaoqiu setText:@"在柔和的阳光中,我怀抱着一颗跳动的心,翘首以盼着那即将到来的露营之旅。那是一个普通而又特别的日子,我的心中充满了对未知世界的好奇和期待。每当夜晚来临,我总会凝视着窗外繁星点点的夜空,梦想着有一天能够亲手点燃篝火,与好友们一起分享这片刻的温馨与快乐。"];
|
[lbyaoqiu setText:@"-"];
|
||||||
[lbyaoqiu setTextColor:RGBCOLOR(109, 109, 109)];
|
[lbyaoqiu setTextColor:RGBCOLOR(109, 109, 109)];
|
||||||
[lbyaoqiu setTextAlignment:NSTextAlignmentLeft];
|
[lbyaoqiu setTextAlignment:NSTextAlignmentLeft];
|
||||||
[lbyaoqiu setNumberOfLines:0];
|
[lbyaoqiu setNumberOfLines:0];
|
||||||
|
@ -80,67 +107,9 @@
|
||||||
}];
|
}];
|
||||||
_lbyaoqiu = lbyaoqiu;
|
_lbyaoqiu = lbyaoqiu;
|
||||||
|
|
||||||
self.arrBts = [NSMutableArray new];
|
|
||||||
self.arrItems = [NSMutableArray new];
|
|
||||||
self.arrdata = @[@"",@"",@"",@""];
|
|
||||||
[self drawItemLastView:lbyaoqiu tag:0 bottom:nil];
|
|
||||||
}
|
|
||||||
-(void)drawItemLastView:(UIView *)view tag:(int)tag bottom:(MASConstraint *)bottom
|
|
||||||
{
|
|
||||||
ViewLable *lbwz = [[ViewLable alloc] init];
|
|
||||||
[self.scvback addSubview:lbwz];
|
|
||||||
[lbwz mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.left.offset(20);
|
|
||||||
make.width.equalTo(self.scvback).offset(-40);
|
|
||||||
make.top.equalTo(view.mas_bottom).offset(20);
|
|
||||||
}];
|
|
||||||
lbwz.textColor = RGBCOLOR(61, 61, 61);
|
|
||||||
lbwz.textFont = [UIFont systemFontOfSize:16];
|
|
||||||
lbwz.fspeed = 0.02;
|
|
||||||
lbwz.strValue = [NSString stringWithFormat:@" %@",@"你的作文非常出色,但是可以在语言表达上更加生动有趣,增加一些形象的比喻和细节描写,让读者更加深入地了解你的思考和感受。同时,可以适当增加一些个人的经历和感受,让作文更加具有个性化和独特性。"];
|
|
||||||
lbwz.isWriteEnd = YES;
|
|
||||||
__strong ViewLable *lbwzSelf = lbwz;
|
|
||||||
__block MASConstraint *bottomScroll;
|
|
||||||
[lbwz setBackHeight:^(float fheight, BOOL isend) {
|
|
||||||
if(isend)
|
|
||||||
{
|
|
||||||
if(tag<self.arrdata.count-1)
|
|
||||||
{
|
|
||||||
[self drawItemLastView:lbwzSelf tag:tag+1 bottom:bottomScroll];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{///全部绘制完
|
|
||||||
self.isdrawEnd = YES;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(self.scvback.contentSize.height-self.scvback.height>0)
|
|
||||||
{
|
|
||||||
[self.scvback setContentOffset:CGPointMake(0, self.scvback.contentSize.height-self.scvback.height)];
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
[self.arrItems addObject:lbwz];
|
|
||||||
if(bottom)
|
|
||||||
{
|
|
||||||
[bottom uninstall];
|
|
||||||
}
|
|
||||||
[self.scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
bottomScroll = make.bottom.equalTo(lbwz.mas_bottom).offset(20);
|
|
||||||
}];
|
|
||||||
|
|
||||||
UIButton *btcx = [[UIButton alloc] init];
|
|
||||||
[btcx setImage:[UIImage imageNamed:@"znxz_chongxie"] forState:UIControlStateNormal];
|
|
||||||
[self.scvback addSubview:btcx];
|
|
||||||
[btcx mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.size.sizeOffset(CGSizeMake(24, 24));
|
|
||||||
make.left.offset(23);
|
|
||||||
make.top.equalTo(view.mas_bottom).offset(17);
|
|
||||||
}];
|
|
||||||
[btcx addTarget:self action:@selector(cxAction:) forControlEvents:UIControlEventTouchUpInside];
|
|
||||||
[btcx setTag:tag];
|
|
||||||
[self.arrBts addObject:btcx];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-(void)drawBottomView:(UIView *)view
|
-(void)drawBottomView:(UIView *)view
|
||||||
{
|
{
|
||||||
UIView *viewline = [[UIView alloc] init];
|
UIView *viewline = [[UIView alloc] init];
|
||||||
|
@ -170,7 +139,7 @@
|
||||||
[btchange addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside];
|
[btchange addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
UIButton *btcreate = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, (UISCREEN_WIDTH-52)/2.0, 40)];
|
UIButton *btcreate = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, (UISCREEN_WIDTH-52)/2.0, 40)];
|
||||||
[btcreate setTitle:@"保存分享" forState:UIControlStateNormal];
|
[btcreate setTitle:@"保存记录" forState:UIControlStateNormal];
|
||||||
[btcreate setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
[btcreate setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
[btcreate.titleLabel setFont:[UIFont boldSystemFontOfSize:18]];
|
[btcreate.titleLabel setFont:[UIFont boldSystemFontOfSize:18]];
|
||||||
[btcreate.layer setMasksToBounds:YES];
|
[btcreate.layer setMasksToBounds:YES];
|
||||||
|
@ -185,6 +154,58 @@
|
||||||
[btcreate addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside];
|
[btcreate addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
[Tools changedView:btcreate colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
|
[Tools changedView:btcreate colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
|
||||||
}
|
}
|
||||||
|
-(ViewLable *)drawItemLastView:(UIView *)view tag:(NSInteger)tag
|
||||||
|
{
|
||||||
|
ViewLable *lbwz = [[ViewLable alloc] init];
|
||||||
|
[self.scvback addSubview:lbwz];
|
||||||
|
[lbwz mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.offset(20);
|
||||||
|
make.width.equalTo(self.scvback).offset(-40);
|
||||||
|
make.top.equalTo(view.mas_bottom).offset(20);
|
||||||
|
}];
|
||||||
|
lbwz.textColor = RGBCOLOR(61, 61, 61);
|
||||||
|
lbwz.textFont = [UIFont systemFontOfSize:16];
|
||||||
|
if(self.bottomScroll)
|
||||||
|
{
|
||||||
|
[self.bottomScroll uninstall];
|
||||||
|
}
|
||||||
|
[self.scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
self.bottomScroll = make.bottom.equalTo(lbwz.mas_bottom).offset(20);
|
||||||
|
}];
|
||||||
|
[self.arrLBWZ addObject:lbwz];
|
||||||
|
|
||||||
|
UIButton *btcx = [[UIButton alloc] init];
|
||||||
|
[btcx setTitle:@"重写" forState:UIControlStateNormal];
|
||||||
|
[btcx setTitleColor:RGBCOLOR(108, 119, 246) forState:UIControlStateNormal];
|
||||||
|
[btcx.titleLabel setFont:[UIFont systemFontOfSize:12]];
|
||||||
|
[btcx setImage:[UIImage imageNamed:@"xz_chongxie"] forState:UIControlStateNormal];
|
||||||
|
[self.scvback addSubview:btcx];
|
||||||
|
[btcx mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.size.sizeOffset(CGSizeMake(54, 22));
|
||||||
|
make.left.offset(20);
|
||||||
|
make.top.equalTo(view.mas_bottom).offset(17);
|
||||||
|
}];
|
||||||
|
[btcx setIconInLeft];
|
||||||
|
[btcx setBackgroundColor:RGBCOLOR(226, 228, 253)];
|
||||||
|
[btcx addTarget:self action:@selector(cxAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[btcx setTag:tag];
|
||||||
|
[btcx.layer setMasksToBounds:YES];
|
||||||
|
[btcx.layer setCornerRadius:11];
|
||||||
|
[self.arrBTN addObject:btcx];
|
||||||
|
return lbwz;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)setDicpush:(NSDictionary *)dicpush
|
||||||
|
{
|
||||||
|
_dicpush = dicpush;
|
||||||
|
|
||||||
|
self.lbname.text = [Tools isStringnilkong:[dicpush objectForKey:@"title"]];
|
||||||
|
self.lbyaoqiu.text = [Tools isStringnilkong:[dicpush objectForKey:@"paragraph"]];
|
||||||
|
|
||||||
|
[self getdata];
|
||||||
|
}
|
||||||
|
|
||||||
-(void)cxAction:(UIButton *)sender
|
-(void)cxAction:(UIButton *)sender
|
||||||
{
|
{
|
||||||
if(self.isdrawEnd==NO)
|
if(self.isdrawEnd==NO)
|
||||||
|
@ -193,15 +214,11 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self.isdrawEnd = NO;
|
self.isdrawEnd = NO;
|
||||||
ViewLable *lbwz = self.arrItems[sender.tag];
|
SSEDrawListTextModel *model = self.arrdata[sender.tag];
|
||||||
lbwz.strValue = [NSString stringWithFormat:@" %@",@"2341234123你的作文非常出色,但是可以在语言表达上更加生动有趣,增加一些形象的比喻和细节描写,让读者更加深入地了解你的思考和感受。同时,可以适当增加一些个人的经历和感受,让作文更加具有个性化和独特性。"];
|
model.isaddEnd = NO;
|
||||||
lbwz.isWriteEnd = YES;
|
self.modelSelect = model;
|
||||||
[lbwz setBackHeight:^(float fheight, BOOL isend) {
|
|
||||||
if(isend)
|
[self getDuanLuo:model.value];
|
||||||
{
|
|
||||||
self.isdrawEnd = YES;
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
-(void)bottomAction:(UIButton *)sender
|
-(void)bottomAction:(UIButton *)sender
|
||||||
{
|
{
|
||||||
|
@ -213,27 +230,45 @@
|
||||||
switch (sender.tag) {
|
switch (sender.tag) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
self.isdrawEnd = NO;
|
[self getdata];
|
||||||
for(UIView *view in self.arrItems)
|
|
||||||
{
|
|
||||||
[view removeFromSuperview];
|
|
||||||
}
|
|
||||||
for(UIButton *bt in self.arrBts)
|
|
||||||
{
|
|
||||||
[bt removeFromSuperview];
|
|
||||||
}
|
|
||||||
[self.arrBts removeAllObjects];
|
|
||||||
[self.arrItems removeAllObjects];
|
|
||||||
[self drawItemLastView:self.lbyaoqiu tag:0 bottom:nil];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
FenXiangWenZhangAlterView *view = [[FenXiangWenZhangAlterView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT)];
|
[LoadAlterView show];
|
||||||
[self.viewController.view addSubview:view];
|
NSMutableDictionary *dicinfo = [NSMutableDictionary new];
|
||||||
[view setBackValue:^(NSInteger tag) {
|
[dicinfo setObject:[Tools isStringnil:[self.dicpush objectForKey:@"title"]] forKey:@"title"];
|
||||||
|
[dicinfo setObject:[Tools isStringnil:[self.dicpush objectForKey:@"stage"]] forKey:@"stage"];
|
||||||
|
[dicinfo setObject:[Tools isStringnil:[self.dicpush objectForKey:@"paragraph"]] forKey:@"paragraph"];
|
||||||
|
NSMutableArray *arrcontent = [NSMutableArray new];
|
||||||
|
for(SSEDrawListTextModel *model in self.arrdata)
|
||||||
|
{
|
||||||
|
if(model.value.length>0)
|
||||||
|
{
|
||||||
|
[arrcontent addObject:model.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[dicinfo setObject:[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"];
|
||||||
|
|
||||||
|
|
||||||
|
[NetWorkManager requestWriteSaveData:self title:[self.dicpush objectForKey:@"title"] scene:@"write_with_content" info:dicinfo Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
XieZuoSaveAlterView *view = [[XieZuoSaveAlterView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT)];
|
||||||
|
[self.viewController.view addSubview:view];
|
||||||
|
[view setBackValue:^{
|
||||||
|
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
||||||
|
pasteboard.string = [arrcontent componentsJoinedByString:@"\n"];
|
||||||
|
[HXHud showMessage:@"复制成功" afterDelayType:0];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -242,4 +277,195 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark - UIScrollView
|
||||||
|
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
|
||||||
|
{
|
||||||
|
self.isDragging = YES;
|
||||||
|
}
|
||||||
|
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
|
||||||
|
{
|
||||||
|
self.isDragging = NO;
|
||||||
|
}
|
||||||
|
-(void)nomoData
|
||||||
|
{
|
||||||
|
for(UIView *view in self.arrLBWZ)
|
||||||
|
{
|
||||||
|
[view removeFromSuperview];
|
||||||
|
}
|
||||||
|
for(UIButton *btin in self.arrBTN)
|
||||||
|
{
|
||||||
|
[btin removeFromSuperview];
|
||||||
|
}
|
||||||
|
self.arrLBWZ = [NSMutableArray new];
|
||||||
|
self.arrBTN = [NSMutableArray new];
|
||||||
|
self.arrdata = [NSMutableArray new];
|
||||||
|
for(int i = 0 ; i < 200;i++)
|
||||||
|
{
|
||||||
|
SSEDrawListTextModel *model = [SSEDrawListTextModel new];
|
||||||
|
[self.arrdata addObject:model];
|
||||||
|
}
|
||||||
|
|
||||||
|
self.isStartDrawText = NO;
|
||||||
|
self.isdrawEnd = NO;
|
||||||
|
self.iDraw = 0;
|
||||||
|
self.viewDarwLast = self.lbyaoqiu;
|
||||||
|
}
|
||||||
|
///段落重写 rewrite {content,type}
|
||||||
|
-(void)getDuanLuo:(NSString *)content
|
||||||
|
{
|
||||||
|
self.modelSelect.lbwz.isWriteEnd = NO;
|
||||||
|
[self.modelSelect.lbwz setBackHeight:^(float fheight, BOOL isend) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:[Tools isStringnil:[self.dicpush objectForKey:@"technique"]] forKey:@"type"];
|
||||||
|
[dicpush setObject:[Tools isStringnil:content] forKey:@"content"];
|
||||||
|
|
||||||
|
[[SSENetWorkManager shareManager] requestTo:[NSString stringWithFormat:@"https://aiw.batiao8.com/api/chat?scene=rewrite"] dicpush:dicpush config:^(SSEConfigModel * _Nonnull config) {
|
||||||
|
} backValue:^(NSString * _Nonnull value, BOOL isfinish) {
|
||||||
|
NSLog(@"%@",value);
|
||||||
|
if(value.length>4)
|
||||||
|
{
|
||||||
|
self.modelSelect.value = value;
|
||||||
|
self.modelSelect.lbwz.strValue = [NSString stringWithFormat:@" %@",self.modelSelect.value];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(isfinish)
|
||||||
|
{
|
||||||
|
self.modelSelect.isaddEnd = YES;
|
||||||
|
self.isdrawEnd = YES;
|
||||||
|
self.modelSelect.lbwz.isWriteEnd = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} error:^(NSString * _Nonnull errorString) {
|
||||||
|
[HXHud showMessage:errorString afterDelayType:0];
|
||||||
|
} ID:^(NSString * _Nonnull value) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
///全文
|
||||||
|
-(void)getdata
|
||||||
|
{
|
||||||
|
[LoadAlterView show];
|
||||||
|
[self nomoData];
|
||||||
|
|
||||||
|
[[SSENetWorkManager shareManager] requestTo:[NSString stringWithFormat:@"https://aiw.batiao8.com/api/chat?scene=%@",@"write_with_content"] dicpush:self.dicpush config:^(SSEConfigModel * _Nonnull config) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
self.modelConfig = config;
|
||||||
|
} backValue:^(NSString * _Nonnull value, BOOL isfinish) {
|
||||||
|
if(value.length>10)
|
||||||
|
{
|
||||||
|
[self chuliShuJu:value isfinish:NO];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(isfinish)
|
||||||
|
{
|
||||||
|
[self chuliShuJu:value isfinish:YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} error:^(NSString * _Nonnull errorString) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[HXHud showMessage:errorString afterDelayType:0];
|
||||||
|
} ID:^(NSString * _Nonnull value) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)chuliShuJu:(NSString *)value isfinish:(BOOL)isfinish
|
||||||
|
{
|
||||||
|
if(isfinish)
|
||||||
|
{
|
||||||
|
for(SSEDrawListTextModel *model in self.arrdata)
|
||||||
|
{
|
||||||
|
model.isaddEnd = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSString *strshow = [value stringByReplacingOccurrencesOfString:@"* " withString:@"|&&|"];
|
||||||
|
strshow = [strshow stringByReplacingOccurrencesOfString:@"*" withString:@"|&&|"];
|
||||||
|
NSArray *arrlist = [strshow componentsSeparatedByString:@"|&&|"];
|
||||||
|
SSEDrawListTextModel *modellast;
|
||||||
|
for(int i = 0 ; i < arrlist.count;i++)
|
||||||
|
{
|
||||||
|
NSString *str = arrlist[i];
|
||||||
|
if(str.length<2)
|
||||||
|
{
|
||||||
|
continue;;
|
||||||
|
}
|
||||||
|
if(modellast)
|
||||||
|
{
|
||||||
|
modellast.isaddEnd = YES;
|
||||||
|
}
|
||||||
|
SSEDrawListTextModel *model = self.arrdata[i];
|
||||||
|
str = [str stringByReplacingOccurrencesOfString:@"\n" withString:@""];
|
||||||
|
model.value = str;
|
||||||
|
modellast = model;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
if(self.isStartDrawText==NO)
|
||||||
|
{
|
||||||
|
self.isStartDrawText = YES;
|
||||||
|
[self drawTextInfo];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
-(void)drawTextInfo
|
||||||
|
{
|
||||||
|
if(self.iDraw>=self.arrdata.count)
|
||||||
|
{
|
||||||
|
self.isdrawEnd = YES;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SSEDrawListTextModel *model = self.arrdata[self.iDraw];
|
||||||
|
if(model.value.length==0)
|
||||||
|
{
|
||||||
|
self.iDraw++;
|
||||||
|
[self drawTextInfo];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ViewLable *lbwz;
|
||||||
|
if(model.lbwz==nil)
|
||||||
|
{
|
||||||
|
lbwz = [self drawItemLastView:self.viewDarwLast tag:self.iDraw];
|
||||||
|
if(self.modelConfig.time.intValue>0)
|
||||||
|
{
|
||||||
|
lbwz.fspeed = self.modelConfig.time.intValue/1000.0;
|
||||||
|
}
|
||||||
|
[lbwz setBackHeight:^(float fheight, BOOL isend) {
|
||||||
|
if(isend)
|
||||||
|
{
|
||||||
|
self.iDraw+=1;
|
||||||
|
}
|
||||||
|
if(fheight==-1||isend)
|
||||||
|
{
|
||||||
|
[self drawTextInfo];
|
||||||
|
}
|
||||||
|
if(self.isDragging==NO)
|
||||||
|
{
|
||||||
|
if(self.scvback.contentSize.height-self.scvback.height>0)
|
||||||
|
{
|
||||||
|
[self.scvback setContentOffset:CGPointMake(0, self.scvback.contentSize.height-self.scvback.height) animated:NO];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
self.viewDarwLast = lbwz;
|
||||||
|
model.lbwz = lbwz;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lbwz = model.lbwz;
|
||||||
|
}
|
||||||
|
lbwz.isWriteEnd = model.isaddEnd;
|
||||||
|
|
||||||
|
lbwz.strValue = [NSString stringWithFormat:@" %@",model.value];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
#import "StartKTXZPGViewController.h"
|
#import "StartKTXZPGViewController.h"
|
||||||
|
|
||||||
|
#import "CamreShiLiView.h"
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
|
||||||
@interface CamreViewController () <AVCapturePhotoCaptureDelegate,HXCustomNavigationControllerDelegate>
|
@interface CamreViewController () <AVCapturePhotoCaptureDelegate,HXCustomNavigationControllerDelegate>
|
||||||
// ------------- 设备配置等 -------------
|
// ------------- 设备配置等 -------------
|
||||||
//捕获设备,通常是前置摄像头,后置摄像头,麦克风(音频输入)
|
//捕获设备,通常是前置摄像头,后置摄像头,麦克风(音频输入)
|
||||||
|
@ -32,6 +35,8 @@
|
||||||
|
|
||||||
// ------------- UI --------------
|
// ------------- UI --------------
|
||||||
///
|
///
|
||||||
|
@property (nonatomic , strong) CamreTypeView *viewtype;
|
||||||
|
///
|
||||||
@property (nonatomic , strong) UIButton *btok;
|
@property (nonatomic , strong) UIButton *btok;
|
||||||
@property (nonatomic , strong) UIButton *btnumber;
|
@property (nonatomic , strong) UIButton *btnumber;
|
||||||
///
|
///
|
||||||
|
@ -74,8 +79,23 @@
|
||||||
|
|
||||||
[self drawUI];
|
[self drawUI];
|
||||||
|
|
||||||
|
if(self.type==2)
|
||||||
|
{
|
||||||
|
if([[[NSUserDefaults standardUserDefaults] objectForKey:CamreTiShiPaiZhao] intValue] !=1)
|
||||||
|
{
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:CamreTiShiPaiZhao];
|
||||||
[CamreTiShiAlterView show];
|
[CamreTiShiAlterView show];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(self.type==1)
|
||||||
|
{
|
||||||
|
if([[[NSUserDefaults standardUserDefaults] objectForKey:CamreTiShiPiGai] intValue] !=1)
|
||||||
|
{
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:CamreTiShiPiGai];
|
||||||
|
[CamreTiShiAlterView show];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +151,8 @@
|
||||||
make.height.offset(30);
|
make.height.offset(30);
|
||||||
}];
|
}];
|
||||||
//
|
//
|
||||||
viewtype.arrItems = @[@"改写作文",@"拍题成文",@"拍照"];
|
viewtype.arrItems = @[@"改写作文",@"拍题成文",@"拍照续写"];
|
||||||
|
_viewtype = viewtype;
|
||||||
if(self.type==1)
|
if(self.type==1)
|
||||||
{
|
{
|
||||||
[viewtype setHidden:YES];
|
[viewtype setHidden:YES];
|
||||||
|
@ -226,9 +247,55 @@
|
||||||
{
|
{
|
||||||
[self.navigationController popViewControllerAnimated:YES];
|
[self.navigationController popViewControllerAnimated:YES];
|
||||||
}
|
}
|
||||||
|
#pragma mark - 示例
|
||||||
-(void)shiliAction
|
-(void)shiliAction
|
||||||
{
|
{
|
||||||
|
[LoadAlterView show];
|
||||||
|
if(self.type==2)
|
||||||
|
{
|
||||||
|
NSString *strname = [self.viewtype getSelectName];
|
||||||
|
NSString *strscene = @"pic_rewrite";
|
||||||
|
if([strname isEqualToString:@"拍题成文"])
|
||||||
|
{
|
||||||
|
strscene = @"pic_question";
|
||||||
|
}
|
||||||
|
else if([strname isEqualToString:@"拍照续写"])
|
||||||
|
{
|
||||||
|
strscene = @"pic_with_front";
|
||||||
|
}
|
||||||
|
[NetWorkManager requestExamplePicData:self.view role_id:@"" scene:strscene Callback:^(BOOL state, ExamplePicModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
CamreShiLiView *view = [[CamreShiLiView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT)];
|
||||||
|
view.strpzname = strname;
|
||||||
|
view.type = self.type;
|
||||||
|
view.arrdata = responseObject.data.items;
|
||||||
|
[self.view addSubview:view];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else if (self.type==1)
|
||||||
|
{///作文批改
|
||||||
|
[NetWorkManager requestExampleCorrectListData:self.view role_id:[UserInfoModel getRole_id] Callback:^(BOOL state, ExampleCorrectList *responseObject, NSString * _Nullable describle) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
CamreShiLiView *view = [[CamreShiLiView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT)];;
|
||||||
|
view.type = self.type;
|
||||||
|
view.arrdata = responseObject.data.items;
|
||||||
|
[self.view addSubview:view];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)bottomAction:(UIButton *)sender
|
-(void)bottomAction:(UIButton *)sender
|
||||||
|
@ -247,10 +314,28 @@
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
{///确定
|
{///确定
|
||||||
|
if(self.arrData.count==0)
|
||||||
|
{
|
||||||
|
[HXHud showMessage:@"请添加图片" afterDelayType:0];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
///1作文批改 2拍照写作
|
||||||
|
if(self.type==1)
|
||||||
|
{
|
||||||
StartKTXZPGViewController *vc = [StartKTXZPGViewController new];
|
StartKTXZPGViewController *vc = [StartKTXZPGViewController new];
|
||||||
vc.type = self.type-1;
|
vc.type = 1;
|
||||||
|
vc.arrXZImages = self.arrData;
|
||||||
[self.navigationController pushViewController:vc animated:YES];
|
[self.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else if(self.type==2)
|
||||||
|
{
|
||||||
|
NSArray *arrtt = @[@"改写作文",@"拍题成文",@"拍照续写"];
|
||||||
|
int temp = (int)[arrtt indexOfObject:[self.viewtype getSelectName]];
|
||||||
|
StartKTXZPGViewController *vc = [StartKTXZPGViewController new];
|
||||||
|
vc.type = temp+10;
|
||||||
|
vc.arrXZImages = self.arrData;
|
||||||
|
[self.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
//
|
||||||
|
// CamreShiLiView.h
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface CamreShiLiView : UIView
|
||||||
|
///1作文批改 2拍照写作
|
||||||
|
@property (nonatomic , assign) int type;
|
||||||
|
|
||||||
|
///拍照写作 类型
|
||||||
|
@property (nonatomic , strong) NSString *strpzname;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *arrdata;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,203 @@
|
||||||
|
//
|
||||||
|
// CamreShiLiView.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "CamreShiLiView.h"
|
||||||
|
#import "JhtBannerScrollView.h"
|
||||||
|
#import "StartZWPIViewCell.h"
|
||||||
|
|
||||||
|
#import "ExampleCorrectList.h"///作文批改
|
||||||
|
#import "ExamplePicModel.h"
|
||||||
|
|
||||||
|
#import "StartKTXZPGViewController.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define CamreShiLiViewCellHeight UISCREEN_HEIGHT-KMagrinTop-TabHeight-190
|
||||||
|
@interface CamreShiLiView ()<JhtBannerScrollViewDelegate, JhtBannerScrollViewDataSource>
|
||||||
|
@property (nonatomic, strong) JhtBannerScrollView *bannerView;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UILabel *lbname;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation CamreShiLiView
|
||||||
|
|
||||||
|
-(id)initWithFrame:(CGRect)frame
|
||||||
|
{
|
||||||
|
if(self = [super initWithFrame:frame])
|
||||||
|
{
|
||||||
|
[self setBackgroundColor:[UIColor blackColor]];
|
||||||
|
|
||||||
|
UIView *viewinfo = [[UIView alloc] init];
|
||||||
|
[viewinfo setBackgroundColor:RGBCOLOR(238, 238, 238)];
|
||||||
|
[self addSubview:viewinfo];
|
||||||
|
[viewinfo mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.top.width.equalTo(self);
|
||||||
|
make.bottom.equalTo(self).offset(-TabHeight-100);
|
||||||
|
}];
|
||||||
|
[self drawInfoView:viewinfo];
|
||||||
|
|
||||||
|
|
||||||
|
UILabel *lbname = [[UILabel alloc] init];
|
||||||
|
[lbname setText:@"作业批改"];
|
||||||
|
[lbname setTextColor:[UIColor whiteColor]];
|
||||||
|
[lbname setTextAlignment:NSTextAlignmentLeft];
|
||||||
|
[lbname setFont:[UIFont systemFontOfSize:14]];
|
||||||
|
[self addSubview:lbname];
|
||||||
|
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(viewinfo.mas_bottom).offset(20);
|
||||||
|
make.centerX.equalTo(self);
|
||||||
|
}];
|
||||||
|
_lbname = lbname;
|
||||||
|
|
||||||
|
UIButton *btok = [[UIButton alloc] init];
|
||||||
|
[btok setImage:[UIImage imageNamed:@"cam_shili_ok"] forState:UIControlStateNormal];
|
||||||
|
[self addSubview:btok];
|
||||||
|
[btok mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.centerX.equalTo(self);
|
||||||
|
make.top.equalTo(lbname.mas_bottom).offset(40);
|
||||||
|
make.width.height.offset(45);
|
||||||
|
}];
|
||||||
|
[btok addTarget:self action:@selector(okAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)drawInfoView:(UIView *)view
|
||||||
|
{
|
||||||
|
UIButton *btback = [[UIButton alloc] init];
|
||||||
|
[btback setImage:[UIImage imageNamed:@"cam_cancle"] forState:UIControlStateNormal];
|
||||||
|
[view addSubview:btback];
|
||||||
|
[btback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.offset(KMagrinTop);
|
||||||
|
make.height.offset(50);
|
||||||
|
make.left.offset(10);
|
||||||
|
make.width.offset(50);
|
||||||
|
}];
|
||||||
|
[btback addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
|
UILabel *lbtishi = [[UILabel alloc] init];
|
||||||
|
[lbtishi setText:@"拍照清晰、作文完整、批改更准确哟"];
|
||||||
|
[lbtishi setTextColor:[UIColor whiteColor]];
|
||||||
|
[lbtishi setTextAlignment:NSTextAlignmentCenter];
|
||||||
|
[lbtishi setFont:[UIFont systemFontOfSize:14]];
|
||||||
|
[view addSubview:lbtishi];
|
||||||
|
[lbtishi mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.centerX.equalTo(view);
|
||||||
|
make.top.equalTo(btback.mas_bottom).offset(10);
|
||||||
|
}];
|
||||||
|
|
||||||
|
JhtBannerScrollView *bannerView = [[JhtBannerScrollView alloc] initWithFrame:CGRectMake(0, KMagrinTop+50, UISCREEN_WIDTH, CamreShiLiViewCellHeight)];
|
||||||
|
bannerView.delegate = self;
|
||||||
|
bannerView.dataSource = self;
|
||||||
|
bannerView.minCoverViewAlpha = 0.0;
|
||||||
|
bannerView.leftRightMargin = UISCREEN_WIDTH*0.05;
|
||||||
|
bannerView.topBottomMargin = 20;
|
||||||
|
bannerView.orientation = BV_Orientation_Horizontal;
|
||||||
|
bannerView.isOpenAutoScroll = NO;
|
||||||
|
bannerView.isCarousel = NO;
|
||||||
|
[bannerView setBackgroundColor:[UIColor clearColor]];
|
||||||
|
[view addSubview:bannerView];
|
||||||
|
[bannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.right.equalTo(self);
|
||||||
|
make.top.offset(KMagrinTop+50);
|
||||||
|
make.height.offset(CamreShiLiViewCellHeight);
|
||||||
|
}];
|
||||||
|
[bannerView setClipsToBounds:NO];
|
||||||
|
_bannerView = bannerView;
|
||||||
|
|
||||||
|
}
|
||||||
|
-(void)backAction
|
||||||
|
{
|
||||||
|
[self removeFromSuperview];
|
||||||
|
}
|
||||||
|
-(void)setStrpzname:(NSString *)strpzname
|
||||||
|
{
|
||||||
|
_strpzname = strpzname;
|
||||||
|
self.lbname.text = strpzname;
|
||||||
|
}
|
||||||
|
-(void)setArrdata:(NSArray *)arrdata
|
||||||
|
{
|
||||||
|
_arrdata = arrdata;
|
||||||
|
[self.bannerView reloadData];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)okAction
|
||||||
|
{
|
||||||
|
///1作文批改 2拍照写作
|
||||||
|
if(self.type==1)
|
||||||
|
{
|
||||||
|
StartKTXZPGViewController *vc = [StartKTXZPGViewController new];
|
||||||
|
vc.type = 1;
|
||||||
|
vc.modelDetailZWPG = self.arrdata[self.bannerView.currentIndex];
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else if (self.type==2)
|
||||||
|
{
|
||||||
|
NSArray *arrtt = @[@"改写作文",@"拍题成文",@"拍照续写"];
|
||||||
|
int temp = (int)[arrtt indexOfObject:self.strpzname];
|
||||||
|
StartKTXZPGViewController *vc = [StartKTXZPGViewController new];
|
||||||
|
vc.type = temp+10;
|
||||||
|
vc.modelXZSL = self.arrdata[self.bannerView.currentIndex];
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma mark - JhtBannerScrollViewDataSource
|
||||||
|
/** 显示cardView 个数 */
|
||||||
|
- (NSInteger)numberOfCardViewInBannerView:(JhtBannerScrollView *)bannerView
|
||||||
|
{
|
||||||
|
return self.arrdata.count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 单个cardView */
|
||||||
|
- (UIView *)bannerView:(JhtBannerScrollView *)bannerView cardViewForBannerViewAtIndex:(NSInteger)index
|
||||||
|
{
|
||||||
|
StartZWPIViewCell *cardView = (StartZWPIViewCell *)[bannerView dequeueReusableView];
|
||||||
|
if (!cardView) {
|
||||||
|
cardView = [[StartZWPIViewCell alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH*0.8, CamreShiLiViewCellHeight)];
|
||||||
|
cardView.tag = index;
|
||||||
|
}
|
||||||
|
if(self.type==1)
|
||||||
|
{///作文批改
|
||||||
|
ExampleCorrectListDataItems *model = self.arrdata[index];
|
||||||
|
if(model.input_image.count>0)
|
||||||
|
{
|
||||||
|
[cardView.imgvback sd_setImageWithURL:[NSURL URLWithString:model.input_image.firstObject] placeholderImage:nil];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ExamplePicModelDataItems *model = self.arrdata[index];
|
||||||
|
if(model.image.count>0)
|
||||||
|
{
|
||||||
|
[cardView.imgvback sd_setImageWithURL:[NSURL URLWithString:model.image.firstObject] placeholderImage:nil];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return cardView;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 当前显示cardView Size */
|
||||||
|
- (CGSize)sizeForCurrentCardViewInBannerView:(JhtBannerScrollView *)bannerView
|
||||||
|
{
|
||||||
|
return CGSizeMake(UISCREEN_WIDTH*0.8, CamreShiLiViewCellHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 滚动到了某一个cardView */
|
||||||
|
- (void)bannerView:(JhtBannerScrollView *)bannerView didScrollToCardViewWithIndex:(NSInteger)index
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 点击了第几个cardView
|
||||||
|
* index: 点击bannerCardView index
|
||||||
|
*/
|
||||||
|
- (void)bannerView:(JhtBannerScrollView *)bannerView didSelectCardView:(UIView *)cardView withCardViewIndex:(NSInteger)index
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
@end
|
|
@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
@interface CamreTypeView : UIView
|
@interface CamreTypeView : UIView
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) NSArray *arrItems;
|
@property (nonatomic , strong) NSArray *arrItems;
|
||||||
|
-(NSString *)getSelectName;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -126,5 +126,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
-(NSString *)getSelectName
|
||||||
|
{
|
||||||
|
return self.arrItems[self.btselect.tag];
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue