|
@@ -860,7 +860,7 @@
|
|
|
|
|
|
|
|
NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
|
|
NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
|
|
|
[defaults removeObjectForKey:@"Forcedownload"];
|
|
[defaults removeObjectForKey:@"Forcedownload"];
|
|
|
- [defaults setValue:@"true" forKey:@"Forcedownload"];
|
|
|
|
|
|
|
+ [defaults setBool:true forKey:@"Forcedownload"];
|
|
|
[defaults synchronize];
|
|
[defaults synchronize];
|
|
|
|
|
|
|
|
[self download_offline:ver useInternalAddress:buseinternaladdress];
|
|
[self download_offline:ver useInternalAddress:buseinternaladdress];
|
|
@@ -995,56 +995,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
|
|
|
|
|
+ bool forcedownload = [defaults boolForKey:@"Forcedownload"];
|
|
|
|
|
|
|
|
- NSArray* arr_order=[OLDataProvider enumOfflineOrder];
|
|
|
|
|
- if(arr_order.count>0)
|
|
|
|
|
|
|
+ if(forcedownload)
|
|
|
|
|
+ [self download_offline:ver useInternalAddress:buseinternaladdress];
|
|
|
|
|
+ else
|
|
|
{
|
|
{
|
|
|
|
|
+ NSArray* arr_order=nil;
|
|
|
|
|
+ arr_order=[OLDataProvider enumOfflineOrder];
|
|
|
|
|
|
|
|
|
|
+ if(arr_order.count>0)
|
|
|
{
|
|
{
|
|
|
- SelectUploadOrderViewController * vc =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SelectUploadOrderViewController"];
|
|
|
|
|
- vc.returnValue = ^(NSArray* SelectedOrder){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ SelectUploadOrderViewController * vc =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SelectUploadOrderViewController"];
|
|
|
|
|
+ vc.returnValue = ^(NSArray* SelectedOrder){
|
|
|
|
|
+
|
|
|
|
|
+ [self upload_offline:ver useInternalAddress:buseinternaladdress orderid:SelectedOrder];
|
|
|
|
|
+ SyncControlPanelViewController * syncVC =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SyncControlPanelViewController"];
|
|
|
|
|
+ syncVC.action_string=@"Download";
|
|
|
|
|
+ UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:syncVC] ;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
|
|
|
|
|
+
|
|
|
|
|
+ navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
|
|
|
|
|
+ [parent presentViewController:navi animated:YES completion:^{
|
|
|
|
|
+
|
|
|
|
|
+ // navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
|
|
|
|
|
+
|
|
|
|
|
+ NSLog(@"about present.........");
|
|
|
|
|
+
|
|
|
|
|
+ // self.btop = false;
|
|
|
|
|
+ // <#code#>
|
|
|
|
|
+ }];
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
- [self upload_offline:ver useInternalAddress:buseinternaladdress orderid:SelectedOrder];
|
|
|
|
|
- SyncControlPanelViewController * syncVC =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SyncControlPanelViewController"];
|
|
|
|
|
- syncVC.action_string=@"Download";
|
|
|
|
|
- UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:syncVC] ;
|
|
|
|
|
|
|
+ UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:vc] ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- // [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
|
|
|
|
|
|
|
|
|
|
navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
|
|
navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
|
|
|
[parent presentViewController:navi animated:YES completion:^{
|
|
[parent presentViewController:navi animated:YES completion:^{
|
|
|
|
|
|
|
|
- // navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
|
|
|
|
|
|
|
|
|
|
- NSLog(@"about present.........");
|
|
|
|
|
-
|
|
|
|
|
- // self.btop = false;
|
|
|
|
|
- // <#code#>
|
|
|
|
|
}];
|
|
}];
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:vc] ;
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
- navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
|
|
|
|
|
- [parent presentViewController:navi animated:YES completion:^{
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- }];
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ else
|
|
|
|
|
+ [self upload_offline:ver useInternalAddress:buseinternaladdress orderid:nil];
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- [self upload_offline:ver useInternalAddress:buseinternaladdress orderid:nil];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -2372,8 +2382,8 @@
|
|
|
|
|
|
|
|
// AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
// AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
// NSString* customer_email= [appDelegate.customerInfo valueForKey:@"customer_email"];
|
|
// NSString* customer_email= [appDelegate.customerInfo valueForKey:@"customer_email"];
|
|
|
- //
|
|
|
|
|
- //
|
|
|
|
|
|
|
+ //
|
|
|
|
|
+ //
|
|
|
// NSMutableArray* send_to = [[NSMutableArray alloc]init];
|
|
// NSMutableArray* send_to = [[NSMutableArray alloc]init];
|
|
|
// if(customer_email.length>0)
|
|
// if(customer_email.length>0)
|
|
|
// {
|
|
// {
|