|
|
@@ -1708,10 +1708,10 @@
|
|
|
[self.sideMenuItems addObject:map.copy];
|
|
|
}
|
|
|
if (appDelegate.user && appDelegate.user_type == USER_ROLE_CUSTOMER) {
|
|
|
- if ([Singleton sharedInstance].order_list_lock) {
|
|
|
- [map setValue:@"Order List unLock" forKey:@"title"];
|
|
|
+ if ([Singleton sharedInstance].global_lock) {
|
|
|
+ [map setValue:@"unLock" forKey:@"title"];
|
|
|
} else {
|
|
|
- [map setValue:@"Order List Lock" forKey:@"title"];
|
|
|
+ [map setValue:@"Lock" forKey:@"title"];
|
|
|
}
|
|
|
|
|
|
[self.sideMenuItems addObject:map.copy];
|
|
|
@@ -2192,7 +2192,7 @@
|
|
|
UIApplication * app = [UIApplication sharedApplication];
|
|
|
AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
|
|
|
|
- if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
|
|
|
+ if (appDelegate.user_type == USER_ROLE_CUSTOMER && [Singleton sharedInstance].global_lock) {
|
|
|
|
|
|
JKLockController *lockVC = [[JKLockController alloc] init];
|
|
|
[lockVC setPasswordKey:[NSString stringWithFormat:@"%@_password",appDelegate.user]];
|
|
|
@@ -2226,7 +2226,7 @@
|
|
|
UIApplication * app = [UIApplication sharedApplication];
|
|
|
AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
|
|
|
|
- if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
|
|
|
+ if (appDelegate.user_type == USER_ROLE_CUSTOMER && [Singleton sharedInstance].global_lock) {
|
|
|
|
|
|
JKLockController *lockVC = [[JKLockController alloc] init];
|
|
|
[lockVC setPasswordKey:[NSString stringWithFormat:@"%@_password",appDelegate.user]];
|
|
|
@@ -2315,30 +2315,45 @@
|
|
|
UIApplication * app = [UIApplication sharedApplication];
|
|
|
AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
|
|
|
|
- JKLockController *lockVC = [[JKLockController alloc] init];
|
|
|
- [lockVC setPasswordKey:[NSString stringWithFormat:@"%@_password",appDelegate.user]];
|
|
|
- __weak typeof(self) weakself = self;
|
|
|
- lockVC.authoReturn = ^(BOOL failure) {
|
|
|
+ if ([Singleton sharedInstance].global_lock) {
|
|
|
|
|
|
- if (weakself) {
|
|
|
- __strong typeof(weakself) strongself = weakself;
|
|
|
-
|
|
|
- PriceSettingViewController *priceSettingVC =[ [UIStoryboard storyboardWithName:@"CUL" bundle:nil] instantiateViewControllerWithIdentifier:@"PriceSettingViewController"];
|
|
|
-
|
|
|
- UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:priceSettingVC] ;
|
|
|
+ JKLockController *lockVC = [[JKLockController alloc] init];
|
|
|
+ [lockVC setPasswordKey:[NSString stringWithFormat:@"%@_password",appDelegate.user]];
|
|
|
+ __weak typeof(self) weakself = self;
|
|
|
+ lockVC.authoReturn = ^(BOOL failure) {
|
|
|
|
|
|
- navi.navigationBar.translucent = NO;
|
|
|
- navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
|
|
|
- [strongself presentViewController:navi animated:YES completion:^{
|
|
|
+ if (weakself) {
|
|
|
+ __strong typeof(weakself) strongself = weakself;
|
|
|
|
|
|
- }];
|
|
|
+ PriceSettingViewController *priceSettingVC =[ [UIStoryboard storyboardWithName:@"CUL" bundle:nil] instantiateViewControllerWithIdentifier:@"PriceSettingViewController"];
|
|
|
+
|
|
|
+ UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:priceSettingVC] ;
|
|
|
+
|
|
|
+ navi.navigationBar.translucent = NO;
|
|
|
+ navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
|
|
|
+ [strongself presentViewController:navi animated:YES completion:^{
|
|
|
+
|
|
|
+ }];
|
|
|
+
|
|
|
+ }
|
|
|
+ };
|
|
|
+ [self.navigationController pushViewController:lockVC animated:YES];
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ PriceSettingViewController *priceSettingVC =[ [UIStoryboard storyboardWithName:@"CUL" bundle:nil] instantiateViewControllerWithIdentifier:@"PriceSettingViewController"];
|
|
|
+
|
|
|
+ UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:priceSettingVC] ;
|
|
|
+
|
|
|
+ navi.navigationBar.translucent = NO;
|
|
|
+ navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
|
|
|
+ [self presentViewController:navi animated:YES completion:^{
|
|
|
|
|
|
- }
|
|
|
- };
|
|
|
- [self.navigationController pushViewController:lockVC animated:YES];
|
|
|
+ }];
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- } else if ([title isEqualToString:@"Order List Lock"] || [title isEqualToString:@"Order List unLock"]) {
|
|
|
+ } else if ([title isEqualToString:@"Lock"] || [title isEqualToString:@"unLock"]) {
|
|
|
|
|
|
UIApplication * app = [UIApplication sharedApplication];
|
|
|
AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
|
@@ -2351,7 +2366,7 @@
|
|
|
if (weakself) {
|
|
|
__strong typeof(weakself) strongself = weakself;
|
|
|
|
|
|
- [Singleton sharedInstance].order_list_lock = ![Singleton sharedInstance].order_list_lock;
|
|
|
+ [Singleton sharedInstance].global_lock = ![Singleton sharedInstance].global_lock;
|
|
|
[strongself initMenuItems];
|
|
|
[strongself hideMenu];
|
|
|
}
|