Commit 34e77856 authored by 曹云霄's avatar 曹云霄

修复临时抽查逻辑判断

parent abf8a10d
......@@ -326,7 +326,7 @@
}
for (NSInteger i = 0; i < self.viewModel.arrCellData.count; i++) {
PatrolExamCellViewModel *vm = self.viewModel.arrCellData[i];
if (1) {
if (photoType(vm.question.photoType) != PHOTO_TYPE_NO) {
if ([questionArray containsObject:vm.question.uuid]) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0];
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:(UITableViewScrollPositionMiddle) animated:YES];
......
......@@ -89,7 +89,12 @@ static UILabel *stringLabel = nil;
//获取问题题目
for (ZJPatrolDetail_questions *questions in detail.questions) {
//如果等于临时
if (detail.temp) {
if ([questions.photoType isEqualToString:@"no"]) {
questions.photoType = @"all";
}
}
if ([questions.category isEqualToString:category]) {
//问题题目
......
......@@ -152,7 +152,6 @@
//极光别名
NSSet *setTags = [NSSet setWithArray:@[ @"" ]];
[APService setTags:setTags alias:userUtil.f_user_uuid callbackSelector:nil object:nil];
[weakSelf getAppOption];
};
void (^fail)(id) = ^(NSError *data) {
......@@ -163,39 +162,6 @@
[httpCtrl doLoginWithUserName:nsUserName password:nsPassword registerCode:nsRegisterCode success:succ failure:fail];
}
/**
获取App配置项
*/
- (void)getAppOption
{
NSString *string = @"{\"accessKey\":\"LTAIiRWdyPrLTinG\",\"secretKey\":\"nWBZDNaGf6CWL8FhQt0eJB8Y0xpUOd\",\"endPoint\":\"oss-cn-shanghai.aliyuncs.com\",\"bucketName\":\"total-gomore\", \"region\":\"oss-cn-shanghai\",\"imgEndpoint\":\"total-gomore.img-cn-shanghai.aliyuncs.com\", \"width\":\"200\", \"height\":\"200\"}";
AccountConfigModel_uploadType *uploadType = [[AccountConfigModel_uploadType alloc] initWithString:string error:nil];
if ([uploadType.ossType isEqualToString:@"COS"]) {
uploadType.type = @"COS";
}else {
uploadType.type = @"OSS";
}
AccountConfigModel *configModel = [AccountConfigModel new];
configModel.uploadType = uploadType;
kUser.configModel = configModel;
// [RequestManager request_OptionSuccess:^(id returnValue) {
// if ([[self class] verifyData:returnValue]) {
// if (![[BaseViewModel formatData:returnValue] isKindOfClass:[NSNull class]]) {
// AccountConfigModel *configModel = [[AccountConfigModel alloc] initWithDictionary:returnValue error:nil];
// [configModel analysisConfigModel];
// kUser.configModel = configModel;
// }
// return;
// }
// [IBTLoadingView showTextOnly:[BaseViewModel messageData:returnValue]];
// } failure:^(id errorValue) {
// [IBTLoadingView showTextOnly:errorValue];
// }];
}
#pragma mark - TextObserver
- (void)inputTextEditChanged:(NSNotification *)obj
{
......
......@@ -126,7 +126,7 @@
case PHOTO_TYPE_ALL:
{
DBCameraViewController *cameraController = [DBCameraViewController initWithDelegate:self];
[cameraController setForceQuadCrop:YES];
[cameraController setUseCameraSegue:NO];
DBCameraContainerViewController *container = [[DBCameraContainerViewController alloc] initWithDelegate:self];
[container setCameraViewController:cameraController];
[container setFullScreenMode];
......
......@@ -19,6 +19,24 @@
@implementation UploadManager
/**
获取App配置项
*/
+ (void)getAppOption {
NSString *string = @"{\"accessKey\":\"LTAIiRWdyPrLTinG\",\"secretKey\":\"nWBZDNaGf6CWL8FhQt0eJB8Y0xpUOd\",\"endPoint\":\"oss-cn-shanghai.aliyuncs.com\",\"bucketName\":\"total-gomore\", \"region\":\"oss-cn-shanghai\",\"imgEndpoint\":\"total-gomore.img-cn-shanghai.aliyuncs.com\", \"width\":\"200\", \"height\":\"200\"}";
AccountConfigModel_uploadType *uploadType = [[AccountConfigModel_uploadType alloc] initWithString:string error:nil];
if ([uploadType.ossType isEqualToString:@"COS"]) {
uploadType.type = @"COS";
}else {
uploadType.type = @"OSS";
}
AccountConfigModel *configModel = [AccountConfigModel new];
configModel.uploadType = uploadType;
kUser.configModel = configModel;
}
/**
上传附件
......@@ -28,6 +46,7 @@
*/
+ (void)uploadObjectArray:(NSArray<PostAttachmentModel *>*)array completed:(void (^)(UploadResponse *success))completed failed:(void(^)(NSString *error))failed
{
[[self class] getAppOption];
//判断上传所需配置项是否为空
if ([ToolsManager empty:kUser.configModel.uploadType.accessKey] || [ToolsManager empty:kUser.configModel.uploadType.secretKey] || [ToolsManager empty:kUser.configModel.uploadType.endPoint] || [ToolsManager empty:kUser.configModel.uploadType.bucketName]) {
ShowAlertView(@"提示", @"上传配置项获取失败,暂时无法上传附件", @[@"我知道了"], UIAlertControllerStyleAlert, ^(NSInteger index) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment