|
|
@@ -483,19 +483,66 @@ static NSString *cellID = @"cellID";
|
|
|
|
|
|
-(void)addAction:(UIButton *)sender
|
|
|
{
|
|
|
- NSArray *menuItems = @[
|
|
|
- [KxMenuItem menuItem:@"项目商机"
|
|
|
- image:nil
|
|
|
- target:self
|
|
|
- action:@selector(addProjectNiche)],
|
|
|
- [KxMenuItem menuItem:@"OEM商机"
|
|
|
- image:nil
|
|
|
- target:self
|
|
|
- action:@selector(addOEMNiche)],
|
|
|
- ];
|
|
|
- [KxMenu showMenuInView:self.view
|
|
|
- fromRect:CGRectMake(SCREEN_WIDTH - 50,-30,30,30)
|
|
|
- menuItems:menuItems];
|
|
|
+ NSString *url = FORMAT(@"%@ma/setting/config.action",g_id);
|
|
|
+ NSDictionary *dic = @{
|
|
|
+ @"caller":@"sys",
|
|
|
+ @"code":@"isNewBusinessChance"
|
|
|
+ };
|
|
|
+ UASNetworkManager *manager = [UASNetworkManager shareManager];
|
|
|
+ manager.responseSerializer = [AFJSONResponseSerializer serializer];
|
|
|
+ [manager request:url method:GET parameters:dic progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {
|
|
|
+ SLog(@"数据:%@",responseObject);
|
|
|
+
|
|
|
+ if (responseObject) {
|
|
|
+ NSArray *menuItems = @[
|
|
|
+ [KxMenuItem menuItem:@"项目商机"
|
|
|
+ image:nil
|
|
|
+ target:self
|
|
|
+ action:@selector(addProjectNiche)],
|
|
|
+ [KxMenuItem menuItem:@"OEM商机"
|
|
|
+ image:nil
|
|
|
+ target:self
|
|
|
+ action:@selector(addOEMNiche)],
|
|
|
+ ];
|
|
|
+ [KxMenu showMenuInView:self.view
|
|
|
+ fromRect:CGRectMake(SCREEN_WIDTH - 50,-30,30,30)
|
|
|
+ menuItems:menuItems];
|
|
|
+
|
|
|
+ }else{
|
|
|
+ NSArray *menuItems = @[
|
|
|
+ [KxMenuItem menuItem:@"公司商机"
|
|
|
+ image:nil
|
|
|
+ target:self
|
|
|
+ action:@selector(addCustomNiche)],
|
|
|
+ ];
|
|
|
+ [KxMenu showMenuInView:self.view
|
|
|
+ fromRect:CGRectMake(SCREEN_WIDTH - 50,-30,30,30)
|
|
|
+ menuItems:menuItems];
|
|
|
+ }
|
|
|
+
|
|
|
+ } failure:^(NSURLSessionDataTask *task, NSError *error) {
|
|
|
+ ErrorInfomation;
|
|
|
+
|
|
|
+ SLog(@"%@",error);
|
|
|
+
|
|
|
+ NSArray *menuItems = @[
|
|
|
+ [KxMenuItem menuItem:@"公司商机"
|
|
|
+ image:nil
|
|
|
+ target:self
|
|
|
+ action:@selector(addCustomNiche)],
|
|
|
+ ];
|
|
|
+ [KxMenu showMenuInView:self.view
|
|
|
+ fromRect:CGRectMake(SCREEN_WIDTH - 50,-30,30,30)
|
|
|
+ menuItems:menuItems];
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
+-(void)addCustomNiche
|
|
|
+{
|
|
|
+ CreatNicheVC *vc = [CreatNicheVC new];
|
|
|
+ vc.title = @"公司商机";
|
|
|
+ vc.caller = @"BusinessChance";
|
|
|
+ [self.navigationController pushViewController:vc animated:YES];
|
|
|
}
|
|
|
|
|
|
-(void)addProjectNiche
|