Use Yktnetwork to make network requests, continuously publish the task network post requests, continuously publish multiple tasks, there is a delay phenomenon

Source: Internet
Author: User
This is a Release task button click event, create Inherits Yktbasenetwork, similar to model big God take Me

-(void) addtaskclickandfabu{//retract keyboard [Self.taskcontextview resignfirstresponder];            [Self getcurentnetwork];    NSString *t_taskcontent=[nsstring stringwithformat:@ "%@", [resutldict valueforkey:@ "Neirong"]]; NSString *t_time_id=@ "",//d (1 today as of 2 tomorrow until 3 this week until 4 continues to advance) NSString *timeid=[nsstring stringwithformat:@ "%@", [resutldict    valueforkey:@ "Jiezhiriqi"];    if ([Timeid isequaltostring:@ "Today closes"]) {t_time_id=@ "1";    } else if ([Timeid isequaltostring:@ "Tomorrow Expires"]) {t_time_id=@ "2";    } else if ([Timeid isequaltostring:@ "This week expires"]) {t_time_id=@ "3";    } else if ([Timeid isequaltostring:@ "continuous Propulsion"]) {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:@ ""]) {//reminder time create.remind_time = Remind_time; }//Project team ID if (![    T_projectid isequaltostring:@ ""]) {create.t_projectid = T_projectid; }//Agile process panel ID if (![    Xiangmuboardid isequaltostring:@ ""]) {create.t_panel_id=xiangmuboardid; }//task-related Member ID (multiple members separated by commas) if (![    member isequaltostring:@ ""]) {create.member=member; }//dispatch_queue_t aqueue = dispatch_get_global_queue (dispatch_queue_priority_default, 0);////Dispatch_async (AQue Ue, ^{///////});///[Create startwithcompletionblockwithsuccess:^ (Ytkbaserequest *r              Equest) {NSLog (@ "++++++++++++++%@", request.responsejsonobject); if (request.responsejsonobject) {Taskmodel *model=[taskmodel mj_objectWithKeyValues:request.response            Jsonobject];            NSLog (@ "%@", model.status);            if (model.status) {//[Hudview showwithonlytext:@ "Publish failed"];                    } else{if (self.taskcontent) {//Return to chat interface                [Self.navigationcontroller Popviewcontrolleranimated:yes]; } else{//Jump to Details interface Wtaskdetailviewcontroller * Taskdet                                        Ailviewcontroller = [[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];     }];
  • Related Article

    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.