|
@@ -61,7 +61,7 @@
|
|
|
}
|
|
}
|
|
|
jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
|
|
jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
|
|
|
result = [[jsobj valueForKey:@"result"] intValue];
|
|
result = [[jsobj valueForKey:@"result"] intValue];
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
if(result!=AP_USER_AUTH)
|
|
if(result!=AP_USER_AUTH)
|
|
|
{
|
|
{
|
|
@@ -516,7 +516,7 @@
|
|
|
|
|
|
|
|
+(void)post_without_return : (NSString*) url parameters:(NSMutableDictionary *) params //delegate:(id < NSURLConnectionDelegate >)delegate
|
|
+(void)post_without_return : (NSString*) url parameters:(NSMutableDictionary *) params //delegate:(id < NSURLConnectionDelegate >)delegate
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
ApexMobileAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
|
|
ApexMobileAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
|
|
|
//分界线的标识符
|
|
//分界线的标识符
|
|
|
NSString *TWITTERFON_FORM_BOUNDARY = @"AaB03x";
|
|
NSString *TWITTERFON_FORM_BOUNDARY = @"AaB03x";
|
|
@@ -650,10 +650,13 @@
|
|
|
[params setValue:@"handset_search" forKey:@"action"];
|
|
[params setValue:@"handset_search" forKey:@"action"];
|
|
|
[params setValue:appDelegate.sessionid forKey:@"sessionid"];
|
|
[params setValue:appDelegate.sessionid forKey:@"sessionid"];
|
|
|
[params setValue:appDelegate.duid forKey:@"uuid"];
|
|
[params setValue:appDelegate.duid forKey:@"uuid"];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
[params setValue:[NSString stringWithFormat:@"%d",offset] forKey:@"offset"];
|
|
[params setValue:[NSString stringWithFormat:@"%d",offset] forKey:@"offset"];
|
|
|
[params setValue:[NSString stringWithFormat:@"%d",limit] forKey:@"limit"];
|
|
[params setValue:[NSString stringWithFormat:@"%d",limit] forKey:@"limit"];
|
|
|
-// [params setValue:@"20" forKey:@"limit"];
|
|
|
|
|
-
|
|
|
|
|
|
|
+ // [params setValue:@"20" forKey:@"limit"];
|
|
|
|
|
+
|
|
|
NSData* json=[ApexMobileNetwork get_json:URL_PUSH parameters:params];
|
|
NSData* json=[ApexMobileNetwork get_json:URL_PUSH parameters:params];
|
|
|
if (json==nil)
|
|
if (json==nil)
|
|
|
{
|
|
{
|
|
@@ -696,11 +699,11 @@
|
|
|
[params setValue:@"Pull Message" forKey:@"module_name"];
|
|
[params setValue:@"Pull Message" forKey:@"module_name"];
|
|
|
[params setValue:@"read_all" forKey:@"action_type"];
|
|
[params setValue:@"read_all" forKey:@"action_type"];
|
|
|
[params setValue:@"handset_search" forKey:@"action"];
|
|
[params setValue:@"handset_search" forKey:@"action"];
|
|
|
-// [params setValue:appDelegate.sessionid forKey:@"sessionid"];
|
|
|
|
|
|
|
+ // [params setValue:appDelegate.sessionid forKey:@"sessionid"];
|
|
|
[params setValue:appDelegate.duid forKey:@"uuid"];
|
|
[params setValue:appDelegate.duid forKey:@"uuid"];
|
|
|
[params setValue:before forKey:@"id"];
|
|
[params setValue:before forKey:@"id"];
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
NSData* json=[ApexMobileNetwork get_json:URL_PUSH parameters:params];
|
|
NSData* json=[ApexMobileNetwork get_json:URL_PUSH parameters:params];
|
|
|
if (json==nil)
|
|
if (json==nil)
|
|
|
{
|
|
{
|
|
@@ -736,7 +739,7 @@
|
|
|
|
|
|
|
|
ApexMobileAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
|
|
ApexMobileAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
|
|
|
|
|
|
|
|
-// NSString* sess
|
|
|
|
|
|
|
+ // NSString* sess
|
|
|
|
|
|
|
|
NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
|
|
NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
|
|
|
[params setValue:@"Pull Message" forKey:@"module_name"];
|
|
[params setValue:@"Pull Message" forKey:@"module_name"];
|
|
@@ -772,7 +775,7 @@
|
|
|
if(result!= AP_MESSAGE_NEW)
|
|
if(result!= AP_MESSAGE_NEW)
|
|
|
return nil;
|
|
return nil;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return json;
|
|
return json;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -836,7 +839,7 @@
|
|
|
if([area isEqualToString:@"null"])
|
|
if([area isEqualToString:@"null"])
|
|
|
area=@"";
|
|
area=@"";
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if([company isEqual:[NSNull null]])
|
|
if([company isEqual:[NSNull null]])
|
|
|
company=@"";
|
|
company=@"";
|
|
|
if(company==nil)
|
|
if(company==nil)
|
|
@@ -904,10 +907,10 @@
|
|
|
sqlite3_bind_text(stmt, 2, [company UTF8String], -1, NULL);
|
|
sqlite3_bind_text(stmt, 2, [company UTF8String], -1, NULL);
|
|
|
sqlite3_bind_text(stmt, 3, [city UTF8String], -1, NULL);
|
|
sqlite3_bind_text(stmt, 3, [city UTF8String], -1, NULL);
|
|
|
sqlite3_bind_text(stmt, 4, [longitude UTF8String], -1, NULL);
|
|
sqlite3_bind_text(stmt, 4, [longitude UTF8String], -1, NULL);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
sqlite3_bind_text(stmt, 5, [latitude UTF8String], -1, NULL);
|
|
sqlite3_bind_text(stmt, 5, [latitude UTF8String], -1, NULL);
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
sqlite3_bind_text(stmt, 6, [address UTF8String], -1, NULL);
|
|
sqlite3_bind_text(stmt, 6, [address UTF8String], -1, NULL);
|
|
|
sqlite3_bind_text(stmt, 7, [telephone UTF8String], -1, NULL);
|
|
sqlite3_bind_text(stmt, 7, [telephone UTF8String], -1, NULL);
|
|
@@ -916,7 +919,7 @@
|
|
|
sqlite3_bind_text(stmt, 10, [email UTF8String], -1, NULL);
|
|
sqlite3_bind_text(stmt, 10, [email UTF8String], -1, NULL);
|
|
|
if (sqlite3_step(stmt) != SQLITE_DONE)
|
|
if (sqlite3_step(stmt) != SQLITE_DONE)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
fprintf(stderr, "Error: insert search failed, error infomation: %s\nsql:%s\n", sqlite3_errmsg(db),sqlite3_sql(stmt));
|
|
fprintf(stderr, "Error: insert search failed, error infomation: %s\nsql:%s\n", sqlite3_errmsg(db),sqlite3_sql(stmt));
|
|
|
}
|
|
}
|
|
|
sqlite3_reset(stmt);
|
|
sqlite3_reset(stmt);
|
|
@@ -1143,6 +1146,11 @@
|
|
|
[params setValue:user forKey:@"user"];
|
|
[params setValue:user forKey:@"user"];
|
|
|
[params setValue:password forKey:@"password"];
|
|
[params setValue:password forKey:@"password"];
|
|
|
[params setValue:[NSString stringWithFormat:@"%ld",ver] forKey:@"auth_ver"];
|
|
[params setValue:[NSString stringWithFormat:@"%ld",ver] forKey:@"auth_ver"];
|
|
|
|
|
+#ifdef TEST
|
|
|
|
|
+ [params setValue:@"true" forKey:@"is_debug"];
|
|
|
|
|
+#else
|
|
|
|
|
+ [params setValue:@"false" forKey:@"is_debug"];
|
|
|
|
|
+#endif
|
|
|
NSData* json=[ApexMobileNetwork get_json:URL_UPDATE_AUTH parameters:params];
|
|
NSData* json=[ApexMobileNetwork get_json:URL_UPDATE_AUTH parameters:params];
|
|
|
if(json==nil)
|
|
if(json==nil)
|
|
|
return RESULT_NET_ERROR;
|
|
return RESULT_NET_ERROR;
|