|
@@ -135,41 +135,41 @@
|
|
|
return [self handleJsonData:json];
|
|
return [self handleJsonData:json];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-+ (int)requestRetrievePassword : (NSString*)user email:(NSString*)email
|
|
|
|
|
|
|
++ (NSDictionary *)requestRetrievePassword : (NSString*)user email:(NSString*)email
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
- if(![NetworkUtils IsNetworkAvailable])
|
|
|
|
|
- return RESULT_NET_NOTAVAILABLE;
|
|
|
|
|
|
|
+// if(![NetworkUtils IsNetworkAvailable])
|
|
|
|
|
+// return RESULT_NET_NOTAVAILABLE;
|
|
|
NSMutableDictionary * params = [[NSMutableDictionary alloc] init];
|
|
NSMutableDictionary * params = [[NSMutableDictionary alloc] init];
|
|
|
- [params setValue:user forKey:@"user"];
|
|
|
|
|
|
|
+ [params setValue:user forKey:@"name"];
|
|
|
[params setValue:email forKey:@"email"];
|
|
[params setValue:email forKey:@"email"];
|
|
|
[params setValue:@"Retrieve Password" forKey:@"module_name"];
|
|
[params setValue:@"Retrieve Password" forKey:@"module_name"];
|
|
|
[params setValue:@"handset_search" forKey:@"action"];
|
|
[params setValue:@"handset_search" forKey:@"action"];
|
|
|
|
|
|
|
|
- NSData* json=[self get_json:URL_HOST parameters:params file:nil];
|
|
|
|
|
- if (json==nil)
|
|
|
|
|
- {
|
|
|
|
|
- DebugLog(@"json is wrong");
|
|
|
|
|
- return RESULT_NET_ERROR;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- NSError *error=nil;
|
|
|
|
|
- NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
|
|
|
|
|
- if(jsobj)
|
|
|
|
|
- {
|
|
|
|
|
- int result = [[jsobj valueForKey:@"result"] intValue];
|
|
|
|
|
- if(result!=AP_USER_AUTH)
|
|
|
|
|
- {
|
|
|
|
|
- DebugLog(@"USER NOT AUTHORIZED CODE=%d ",result);
|
|
|
|
|
- return RESULT_FALSE;
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- return RESULT_TRUE;
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- return RESULT_NET_ERROR;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ NSData* json=[self get_json:URL_RETRIVE_PASSWORD parameters:params file:nil];
|
|
|
|
|
+// if (json==nil)
|
|
|
|
|
+// {
|
|
|
|
|
+// DebugLog(@"json is wrong");
|
|
|
|
|
+// return RESULT_NET_ERROR;
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// NSError *error=nil;
|
|
|
|
|
+// NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
|
|
|
|
|
+// if(jsobj)
|
|
|
|
|
+// {
|
|
|
|
|
+// int result = [[jsobj valueForKey:@"result"] intValue];
|
|
|
|
|
+// if(result!=AP_USER_AUTH)
|
|
|
|
|
+// {
|
|
|
|
|
+// DebugLog(@"USER NOT AUTHORIZED CODE=%d ",result);
|
|
|
|
|
+// return RESULT_FALSE;
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// return RESULT_TRUE;
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// return RESULT_NET_ERROR;
|
|
|
|
|
|
|
|
|
|
+ return [self handleJsonData:json];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ (NSDictionary *)requestOrderList {
|
|
+ (NSDictionary *)requestOrderList {
|