您好,欢迎访问一九零五行业门户网

使用YKTNetwork做网络请求,连续发布任务网络POST请求,连续发布多条任务,出现延迟现象

这是一个发布任务按钮点击事件,create继承yktbasenetwork,类似于模型 大神带我
- (void)addtaskclickandfabu{ //收回键盘 [self.taskcontextview resignfirstresponder]; [self getcurentnetwork]; nsstring *t_taskcontent=[nsstring stringwithformat:@%@,[resutldict valueforkey:@neirong]]; nsstring *t_time_id=@;//d(1今天截止2明天截止3本周截止4持续推进) nsstring *timeid=[nsstring stringwithformat:@%@,[resutldict valueforkey:@jiezhiriqi]]; if ([timeid isequaltostring:@今天截止]) { t_time_id=@1; } else if ([timeid isequaltostring:@明天截止]) { t_time_id=@2; } else if ([timeid isequaltostring:@本周截止]) { t_time_id=@3; } else if ([timeid isequaltostring:@持续推进]) { t_time_id=@4; } else{ t_time_id = @1; } nsstring *remind_time=[nsstring stringwithformat:@%@,[resutldict valueforkey:@tishishijian]]; nsstring *projectid = [nsstring stringwithformat:@%@,[resutldict valueforkey:@xiangmuid]]; if ([projectid isequaltostring:@(null)]) { t_projectid =@; }else { t_projectid=[nsstring stringwithformat:@%@,projectid]; } nsstring *xiangmuboardid = [nsstring stringwithformat:@%@,[resutldict valueforkey:@xiangmuboardid]]; nsstring *member=[nsstring stringwithformat:@%@,[resutldict valueforkey:@tongshiid]]; createnewtaskapi *create = [createnewtaskapi new]; create.t_taskcontent = t_taskcontent; create.t_time_id = t_time_id; if (![remind_time isequaltostring:@]) { //提醒时间 create.remind_time = remind_time; } //项目小组id if (![t_projectid isequaltostring:@]) { create.t_projectid = t_projectid; } //敏捷流程面板id if (![xiangmuboardid isequaltostring:@]) { create.t_panel_id=xiangmuboardid; } // 任务相关成员id(多个成员用逗号隔开) if (![member isequaltostring:@]) { create.member=member; }// dispatch_queue_t aqueue = dispatch_get_global_queue(dispatch_queue_priority_default, 0);//// dispatch_async(aqueue, ^{// // // // });// // [create startwithcompletionblockwithsuccess:^(ytkbaserequest *request) { nslog(@++++++++++++++%@,request.responsejsonobject); if(request.responsejsonobject){ taskmodel *model=[taskmodel mj_objectwithkeyvalues:request.responsejsonobject]; nslog(@%@,model.status); if (model.status) { // [hudview showwithonlytext:@发布失败]; } else{ if (self.taskcontent) { //返回聊天界面 [self.navigationcontroller popviewcontrolleranimated:yes]; } else{ // 跳转到详情界面 wtaskdetailviewcontroller * taskdetailviewcontroller = [[wtaskdetailviewcontroller alloc] init]; taskdetailviewcontroller.hidesbottombarwhenpushed = yes; taskdetailviewcontroller.task = model; taskdetailviewcontroller.orderby=self.orderby; taskdetailviewcontroller.isfromlistorcreate = 2; [self.navigationcontroller pushviewcontroller:taskdetailviewcontroller animated:yes]; } } } else{ // [hudview showwithonlytext:@发布失败]; [hudview hide]; } } failure:^(ytkbaserequest *request) { // [hudview showwithonlytext:@发布失败]; [hudview hide]; }];
其它类似信息

推荐信息