1. 程式人生 > >關於iOS資料解析小數丟失精度的問題AFNetworking

關於iOS資料解析小數丟失精度的問題AFNetworking

<span style="color:#008000;">//正常請求
 </span><strong>  NSURLSessionDataTask*task = [manager POST:httpStr parameters:secureDic progress:nilsuccess:^(NSURLSessionDataTask* _Nonnull task, id  _Nullable responseObject) {
        //請求回來列印responseObject
       if(!isRedirect) {
           [selfsaveCookies];
           requestBlock(responseObject,nil);
       }
      
    } failure:^(NSURLSessionDataTask* _Nullable task, NSError* _Nonnull error) {
        if(![DataRequest haveInternet]) {
             
            NSDictionary*mesDic = @{@"mes":DataRequestNoInternetMessage};
            NSDictionary*notWorkDic = @{@"message":mesDic};
            requestBlock(notWorkDic,nil);
             
        }else
            requestBlock(dic,nil);
    }];</strong>