Use YKTNetwork for network requests, continuously publish task network POST requests, and continuously publish multiple tasks, resulting in latency

Source: Internet
Author: User
This is an event for clicking the Release Task button. create inherits YKTBaseNetwork, similar to the event where the model owner takes me {code...}. create inherits YKTBaseNetwork, similar to the event when the model owner takes me

-(Void) addTaskClickAndFaBu {// reclaim the keyboard [self. taskConTextView resignFirstResponder]; [self getCurentNetwork]; NSString * t_taskContent = [NSString stringWithFormat: @ "% @", [resutlDict valueForKey: @ "neirong"]; NSString * t_time_id = @ ""; // d (1 today ends 2 tomorrow ends 3 this week ends 4) NSString * timeID = [NSString stringWithFormat: @ "% @", [resutlDict valueForKey: @ "jiezhiriqi"]; if ([timeID is1_tostring: @ "today's deadline"]) {t_time_id = @ "1";} e Lse if ([timeID is_id ToString: @ "tomorrow's end"]) {t_time_id = @ "2";} else if ([timeID isEqualToString: @ "this week's end"]) {t_time_id = @ "3";} else if ([timeID ISID ToString: @ ""]) {t_time_id = @ "4 ";} else {t_time_id = @ "1";} NSString * remind_time = [NSString stringWithFormat: @ "% @", [resutlDict valueForKey: @ "tishishijian"]; NSString * projectid = [NSString stringWithFormat: @ "% @", [resutlDict valueForKey: @ "xiangmu ID "]; if ([projectid is1_tostring: @" (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_taskCont Ent = t_taskContent; create. t_time_id = t_time_id; if (! [Remind_time isEqualToString: @ ""]) {// reminder time create. remind_time = remind_time;} // project group id if (! [T_projectId is1_tostring: @ ""]) {create. t_projectId = t_projectId;} // agile process panel id if (! [XiangmuboardID isEqualToString: @ ""]) {create. t_panel_id = xiangmuboardID;} // task-related member id (multiple members are separated by commas) if (! [Member isEqualToString: @ ""]) {create. member = member;} // dispatch_queue_t aQueue = dispatch_get_global_queue (queue, 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: @ "publishing failed"];} else {if (self. taskcontent) {// return to the chat interface [self. navigationController popViewControllerAnimated: YES];} else {// jump to the details page 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: @ "publish failed"]; [HUDView hide] ;}} failure: ^ (YTKBaseRequest * request) {// [HUDView showWithOnlyText: @ "publish failed"]; [HUDView hide];}];

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.