|
|
@@ -226,6 +226,33 @@
|
|
|
barcode = @"";
|
|
|
}
|
|
|
self.barcodeLabel.text = [NSString stringWithFormat:@"%@:%@",self.barcodeTitle,barcode];
|
|
|
+
|
|
|
+ // 从服务器取Manufacture
|
|
|
+ if (barcode.length > 0) {
|
|
|
+ UIAlertView *alert = [RAUtils waiting_alert:@"Loading model's manufactures" title:@"Waiting"];
|
|
|
+ dispatch_async(dispatch_get_global_queue(0, 0), ^{
|
|
|
+ NSDictionary *modelManufacturs = [RAINetwork getModelManufacture:barcode];
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
+ [alert dismissWithClickedButtonIndex:0 animated:YES];
|
|
|
+ int result = [[modelManufacturs objectForKey:@"result"] intValue];
|
|
|
+ if (result == 2) {
|
|
|
+ NSArray *manufacturs = [modelManufacturs objectForKey:@"manufacturer"];
|
|
|
+ if (manufacturs.count > 0) {
|
|
|
+ self.manufacturerList = manufacturs;
|
|
|
+ NSString *manufacter = nil;
|
|
|
+ if (manufacturs.count == 1) {
|
|
|
+ manufacter = [manufacturs objectAtIndex:0];
|
|
|
+ } else {
|
|
|
+ manufacter = nil;
|
|
|
+ }
|
|
|
+ self.manufacturer = manufacter;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- (void)setPhotoCount:(NSUInteger)photoCount {
|