123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- //
- // JXWellBeingVc.m
- // shiku_im
- //
- // Created by 123 on 2020/5/29.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXWellBeingVc.h"
- #import "JXWellBeingCell.h"
- #import "JXApplyViewController.h"
- #import "JXGoldenManagerViewController.h"
- #import "JXRedPackageViewController.h"
- #import "JXProcuratorViewController.h"
- #import "SGAnimation.h"
- #import "UUMarqueeView.h"
- #import "JXJiuHelpMoneyVc.h"
- #import "JXEveryDayVc.h"
- #import "JXGoldMangVc.h"
- @interface JXWellBeingVc ()<UITableViewDelegate,UITableViewDataSource,UUMarqueeViewDelegate>
- @property (nonatomic,strong) UIView *navigationView;
- @property (nonatomic,weak) UITableView *tableView;
- @property (nonatomic,strong) NSMutableArray *dataArr;
- @property (nonatomic,strong) UUMarqueeView *leftwardMarqueeView;
- @end
- @implementation JXWellBeingVc
- - (void)viewWillAppear:(BOOL)animated{
- [super viewWillAppear:animated];
- [self.navigationController setNavigationBarHidden:YES animated:NO];
-
- // if (_leftwardMarqueeView) {
- // [_leftwardMarqueeView start];
- // }
- }
-
- - (void)viewWillDisappear:(BOOL)animated{
- [super viewWillDisappear:animated];
- [self.navigationController setNavigationBarHidden:NO animated:NO];
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
- //self.view.backgroundColor=kRGBColor246;
- [self initNavigationView];
- [self setupHorseRaceLampView];
- [self initTalbelView];
-
-
- [g_server getUser:g_server.myself.userId toView:self];
- }
-
- - (void)setupHorseRaceLampView {
-
- UIView *HRLView = [[UIView alloc] init];
- HRLView.frame = CGRectMake(5,CGRectGetMaxY(self.navigationView.frame), self.view.frame.size.width-10, 32);
- [self.view addSubview:HRLView];
-
- UIButton *leftIMG = [[UIButton alloc] init];
- leftIMG.contentMode=UIViewContentModeScaleAspectFit;
- [leftIMG setImage:[UIImage imageNamed:@"horn_icon"] forState:UIControlStateNormal];
- [leftIMG setTitle:@" 最新公告: " forState:UIControlStateNormal];
- [leftIMG setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- leftIMG.titleLabel.font=[UIFont systemFontOfSize:13 weight:UIFontWeightRegular];
- leftIMG.frame = CGRectMake(5,6, 100, 20);
- [HRLView addSubview:leftIMG];
-
- _leftwardMarqueeView = [[UUMarqueeView alloc] initWithFrame:CGRectMake(110, 0, JX_SCREEN_WIDTH - 40.0f, 32) direction:UUMarqueeViewDirectionLeftward];
- _leftwardMarqueeView.delegate = self;
- _leftwardMarqueeView.timeIntervalPerScroll = 0.0f;
- _leftwardMarqueeView.direction=UUMarqueeViewDirectionLeftward;
- _leftwardMarqueeView.scrollSpeed = 60.0f;
- _leftwardMarqueeView.itemSpacing = 20.0f;
- [HRLView addSubview:_leftwardMarqueeView];
- [_leftwardMarqueeView reloadData];
-
-
- /*
- SGHorseRaceLampView *HRLView = [[SGHorseRaceLampView alloc] init];
- HRLView.frame = CGRectMake(5,CGRectGetMaxY(self.navigationView.frame), self.view.frame.size.width-10, 32);
- HRLView.titleColor=kRGBColor(187,35,32);
- HRLView.backgroundColor = [UIColor whiteColor];
- HRLView.layer.cornerRadius=12;
- HRLView.layer.masksToBounds=YES;
- HRLView.titleFont = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
- HRLView.title = @"最新公告: 会员jl***23 首存100000 获得彩金1800; 会员jl***23 首存100000 获得彩金1800";
- HRLView.imageNage = @"horn_icon";
- [self.view addSubview:HRLView];
-
- HRLView.selectedBlock = ^{
- NSLog(@"被点击了");
- };
- */
- }
- /**
- * 滚动字幕代理
- */
- - (NSUInteger)numberOfVisibleItemsForMarqueeView:(UUMarqueeView*)marqueeView {
- return 1;
- }
- - (NSUInteger)numberOfDataForMarqueeView:(UUMarqueeView*)marqueeView {
- return 1;
- }
- - (void)createItemView:(UIView*)itemView forMarqueeView:(UUMarqueeView*)marqueeView {
-
- // for upwardMultiMarqueeView
- //WithFrame:CGRectMake(15, 5.0f,(JX_SCREEN_WIDTH-30)/2 , 16.0f)
- UILabel *content = [[UILabel alloc] init];
- content.font = [UIFont systemFontOfSize:15 weight:UIFontWeightRegular];
- content.textColor=kRGBColor(187,35,32);
- content.tag = 1002;
- [itemView addSubview:content];
- content.frame=CGRectMake(0, 0,JX_SCREEN_WIDTH-60, 32);
-
- }
- - (void)updateItemView:(UIView*)itemView atIndex:(NSUInteger)index forMarqueeView:(UUMarqueeView*)marqueeView {
- UILabel *time = [itemView viewWithTag:1002];
- time.text = [NSString stringWithFormat:@"%@",@"会员jl***23 首存100000 获得彩金1800; 会员jl***23 首存100000 获得彩金1800 ..."];
- }
-
-
- /**导航栏*/
- -(void)initNavigationView
- {
- self.navigationView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT>=812?44:44)];
- self.navigationView.backgroundColor = [UIColor whiteColor];
- [self.view addSubview:self.navigationView];
- UILabel * titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 2, JX_SCREEN_WIDTH, 40)];
- titleLabel.text = @"优惠活动";
- titleLabel.textColor = [UIColor blackColor];
- titleLabel.font = [UIFont systemFontOfSize:18.0f];
- titleLabel.textAlignment = NSTextAlignmentCenter;
- [self.navigationView addSubview:titleLabel];
-
-
- }
- -(void)initTalbelView
- {
- NSArray *titles=@[@{@"icon":@"shen请daili",@"title":@"申请代理"},@{@"icon":@"wzguilai",@"title":@"王者归来"},@{@"icon":@"mei日renwu",@"title":@"每日任务"},@{@"icon":@"hysc",@"title":@"会员首存"},
- @{@"icon":@"jljgj",@"title":@"吉利金管家"},@{@"icon":@"qwhby",@"title":@"千万红包"}];
-
- _dataArr=[NSMutableArray array];
- [_dataArr addObjectsFromArray:titles];
-
- UITableView *tableView = [[UITableView alloc]init];
- tableView.delegate=self;
- tableView.dataSource=self;
- tableView.separatorStyle=UITableViewCellSeparatorStyleNone;
- [self.view addSubview:tableView];
- self.tableView=tableView;
- [tableView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(75);
- make.left.mas_equalTo(0);
- make.right.mas_equalTo(0);
- make.bottom.mas_equalTo(0);
- }];
- tableView.contentInset=UIEdgeInsetsMake(0, 0, 20, 0);
-
- }
- -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
- return 145;
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
-
- return _dataArr.count;
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
-
- JXWellBeingCell *cell=[JXWellBeingCell cellWithTableView:tableView];
- NSDictionary *iconName= _dataArr[indexPath.row];
-
- cell.strURL=iconName[@"icon"];
- return cell;
- }
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
-
- NSDictionary *iconName= _dataArr[indexPath.row];
- NSString *titleStr =iconName[@"title"];
-
-
- NSArray *titles=@[@{@"icon":@"shen请daili",@"title":@"申请代理"},@{@"icon":@"wzguilai",@"title":@"王者归来"},@{@"icon":@"mei日renwu",@"title":@"每日任务"},@{@"icon":@"hysc",@"title":@"会员首存"},
- @{@"icon":@"jljgj",@"title":@"吉利金管家"},@{@"icon":@"qwhby",@"title":@"千万红包"}];
-
-
- if ([titleStr isEqualToString:@"每日任务"] ) {
- JXEveryDayVc *vcXX=[JXEveryDayVc new];
- vcXX.strIMG=@"meirrwu";
- vcXX.titleName=@"每日任务";
- vcXX.imgStr=@"每日任务";
- [g_navigation pushViewController:vcXX animated:YES];
-
- }else if([titleStr isEqualToString:@"申请代理"]){
- JXEveryDayVc *vcXX=[JXEveryDayVc new];
- vcXX.strIMG=@"shenqdaili";
- vcXX.titleName=@"申请代理";
- vcXX.imgStr=@"最强代理";
- [g_navigation pushViewController:vcXX animated:YES];
-
- }else if([titleStr isEqualToString:@"千万红包"]){
-
- JXEveryDayVc *vcXX=[JXEveryDayVc new];
- vcXX.strIMG=@"huiyuansc";
- vcXX.imgStr=@"首存彩金";
- vcXX.titleName=@"无忧贷款";
- [g_navigation pushViewController:vcXX animated:YES];
- }else if([titleStr isEqualToString:@"吉利金管家"]){
- JXEveryDayVc *vcXX=[JXEveryDayVc new];
- vcXX.titleName=@"吉利金管家";
- vcXX.strIMG=@"jljgj-1";
- //vcXX.imgStr=@"金管家";
- vcXX.imgStr=@"金管家";
- [g_navigation pushViewController:vcXX animated:YES];
-
- }else if([titleStr isEqualToString:@"王者归来"]){
-
- JXEveryDayVc *vcXX=[JXEveryDayVc new];
- vcXX.strIMG=@"jljyj";
- vcXX.imgStr=@"转运金";
- vcXX.titleName=@"转运金";
- [g_navigation pushViewController:vcXX animated:YES];
-
- }else if([titleStr isEqualToString:@"会员首存"]){
- JXEveryDayVc *vcXX=[JXEveryDayVc new];
- vcXX.strIMG=@"qwhongbaoy";
- vcXX.titleName=@"免费抽大奖";
- vcXX.imgStr=@"存款抽奖";
- [g_navigation pushViewController:vcXX animated:YES];
-
- }
- }
-
- //服务端返回数据
- -(void) didServerResultSucces:(JXConnection*)aDownload dict:(NSDictionary*)dict array:(NSArray*)array1{
- //[_wait hide];
- // _videoDict=dict;
- if( [aDownload.action isEqualToString:act_UserGet] ){
-
-
-
-
-
- }
- }
- @end
|