|
@@ -65,7 +65,7 @@ static const NSInteger detal = 20;
|
|
|
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
|
if (strongSelf.delegate) {
|
|
if (strongSelf.delegate) {
|
|
|
[strongSelf.delegate onStopLoading];
|
|
[strongSelf.delegate onStopLoading];
|
|
|
- [strongSelf.delegate onFailed:@"Sorry, something is wrong"];
|
|
|
|
|
|
|
+ [strongSelf.delegate onFailed:@"Sorry, can not connect to the server, please try again later."];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -320,7 +320,8 @@ static const NSInteger detal = 20;
|
|
|
#pragma mark - Save Search
|
|
#pragma mark - Save Search
|
|
|
|
|
|
|
|
- (void)saveSearchParameters:(NSString *)name {
|
|
- (void)saveSearchParameters:(NSString *)name {
|
|
|
-
|
|
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ NSString* user = appDelegate.user;
|
|
|
NSString *module_name = [self.params objectForKey:@"module_name"];
|
|
NSString *module_name = [self.params objectForKey:@"module_name"];
|
|
|
|
|
|
|
|
NSMutableDictionary *params = [self.params mutableCopy];
|
|
NSMutableDictionary *params = [self.params mutableCopy];
|
|
@@ -335,7 +336,7 @@ static const NSInteger detal = 20;
|
|
|
}
|
|
}
|
|
|
dispatch_async(dispatch_get_global_queue(0, 0), ^{
|
|
dispatch_async(dispatch_get_global_queue(0, 0), ^{
|
|
|
|
|
|
|
|
- NSDictionary *json = [RANetwork saveSearchParameters:paramStr forModule:module_name withName:name];
|
|
|
|
|
|
|
+ NSDictionary *json = [RANetwork saveSearchParameters:paramStr forModule:module_name withName:name user:user];
|
|
|
int result = [[json objectForKey:@"result"] intValue];
|
|
int result = [[json objectForKey:@"result"] intValue];
|
|
|
if (result == RESULT_TRUE) {
|
|
if (result == RESULT_TRUE) {
|
|
|
|
|
|
|
@@ -349,7 +350,7 @@ static const NSInteger detal = 20;
|
|
|
} else {
|
|
} else {
|
|
|
NSString *err_msg = [json objectForKey:@"err_msg"];
|
|
NSString *err_msg = [json objectForKey:@"err_msg"];
|
|
|
if (err_msg.length == 0) {
|
|
if (err_msg.length == 0) {
|
|
|
- err_msg = @"Sorry, something is wrong.";
|
|
|
|
|
|
|
+ err_msg = @"Sorry, can not connect to the server, please try again later.";
|
|
|
}
|
|
}
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
|