123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- //
- // JXEveryDayVc.m
- // shiku_im
- //
- // Created by 123 on 2020/6/10.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXEveryDayVc.h"
- #import "JXApplyViewController.h"
- #import "JXApplyTableViewCell.h"
- #import "JXExamViewController.h"
- #import "JXSignViewController.h"
- #import "JXQuestionnVc.h"
- #import "JXShowDayFulLiVc.h"
- #import "JXBigReelVc.h"
- #import "JXTFuLiCell.h"
- #import "JXRelayVC.h"
- #import "JXActiveDetailVc.h"
- #import "UUMarqueeView.h"
- #import "JXActiveDetial2Vc.h"
- #import "JXGoldenManagerViewController.h"
- #import "JXJiuHelpMoneyVc.h"
- #import "JXRedPackageViewController.h"
- #import "JXProcuratorViewController.h"
- #import "JXNewPackRainVc.h"
- #import "JXBigReelVc.h"
- #import "JXGoldMangVc.h"
- #import "JXLuckRescueFundVc.h"
- #import "JXGoldMangerVc.h"
- @interface JXEveryDayVc ()
- @end
- @implementation JXEveryDayVc
- - (void)viewDidLoad {
- [super viewDidLoad];
- self.view.backgroundColor=[UIColor whiteColor];
-
-
- [self defineNavBar:_titleName andRinghtBtnImg:@""];
-
- _dataDict=[NSDictionary dictionary];
-
- UIScrollView *imageScrollView =[[UIScrollView alloc]init];
- if (@available(iOS 11.0, *)) {
- imageScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
- } else {
- // Fallback on earlier versions
- }
- imageScrollView.backgroundColor=kRGBColor(232, 230, 231);
- [self.view addSubview:imageScrollView];
- [imageScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(JX_SCREEN_TOP);
- make.left.mas_equalTo(0);
- make.right.mas_equalTo(0);
- make.bottom.mas_equalTo(-JX_SCREEN_BOTTOM);
- }];
-
-
- UIImageView *imageBackV=[[UIImageView alloc]initWithImage:[UIImage imageNamed:_strIMG]];
- imageBackV.userInteractionEnabled=YES;
- imageBackV.contentMode=UIViewContentModeScaleAspectFill;
- [imageScrollView addSubview:imageBackV];
- CGFloat imageYW = CGImageGetWidth(imageBackV.image.CGImage);
- // iamgeView的H = imageView的宽 / (原始图片的宽 / 原始图片的高)---根据宽高比得出imageView的宽
- CGFloat imageH = JX_SCREEN_WIDTH / (imageYW / CGImageGetHeight(imageBackV.image.CGImage));
- imageBackV.frame = CGRectMake(10, 0, JX_SCREEN_WIDTH-20, imageH);
-
-
-
- UIImageView *imageBackVBt=[[UIImageView alloc]initWithImage:[UIImage imageNamed:_imgStr]];
- imageBackVBt.userInteractionEnabled=YES;
- imageBackVBt.contentMode=UIViewContentModeScaleAspectFill;
- [imageScrollView addSubview:imageBackVBt];
- CGFloat imageYWBt = CGImageGetWidth(imageBackVBt.image.CGImage);
- // iamgeView的H = imageView的宽 / (原始图片的宽 / 原始图片的高)---根据宽高比得出imageView的宽
- CGFloat imageHBt = JX_SCREEN_WIDTH / (imageYWBt / CGImageGetHeight(imageBackVBt.image.CGImage));
- imageBackVBt.frame = CGRectMake(0,CGRectGetMaxY(imageBackV.frame)+20, JX_SCREEN_WIDTH, imageHBt);
-
-
- imageScrollView.contentSize=CGSizeMake(0, CGRectGetMaxY(imageBackVBt.frame)+44);
-
- // UIButton *lefImg= [[UIButton alloc]initWithFrame:CGRectMake(15,JX_SCREEN_HEIGHT-42-10, 140, 42)];
- // lefImg.layer.cornerRadius = 12;
- // lefImg.backgroundColor = [UIColor whiteColor];
- // [lefImg setTitleColor:kRGBColor(91, 19, 19) forState:UIControlStateNormal];
- // [lefImg setTitle:@"活动详情" forState:UIControlStateNormal];
- // [lefImg setBackgroundImage:[UIImage imageNamed:@"huodongxq"] forState:UIControlStateNormal];
- //
- // lefImg.tag=0;
- // [self.view addSubview:lefImg];
- // [lefImg addTarget:self action:@selector(lefIMGClick:) forControlEvents:UIControlEventTouchUpInside];
-
- UIView *rightView= [[UIView alloc]initWithFrame:CGRectMake(0, JX_SCREEN_HEIGHT-JX_SCREEN_TOP, JX_SCREEN_WIDTH, JX_SCREEN_TOP)];
- [self.view addSubview:rightView];
- // UIButton *rightImg= [[UIButton alloc]initWithFrame:CGRectMake(JX_SCREEN_WIDTH/2-60, 0 , 120, JX_SCREEN_BOTTOM)];
- UIButton *rightImg= [[UIButton alloc]initWithFrame:CGRectMake(0, 0 , JX_SCREEN_WIDTH, JX_SCREEN_TOP)];
- rightImg.tag=1;
- rightImg.layer.cornerRadius = 12;
- rightImg.backgroundColor = [UIColor whiteColor];
- rightImg.titleLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
- [rightImg setTitle:@"我要参与" forState:UIControlStateNormal];
- [rightImg setTitleColor:kRGBColor(91, 19, 19) forState:UIControlStateNormal];
- [rightImg setBackgroundImage:[UIImage imageNamed:@"huodongxq"] forState:UIControlStateNormal];
- [rightView addSubview:rightImg];
- [rightImg addTarget:self action:@selector(lefIMGClick:) forControlEvents:UIControlEventTouchUpInside];
-
-
- }
- -(void)lefIMGClick:(UIButton *)sender{ //吉利救援金
-
- if (sender.tag==0) {
-
-
- JXActiveDetail2Vc *vc=[JXActiveDetail2Vc new];
- vc.strIMG=_imgStr;
- [g_navigation pushViewController:vc animated:YES];
-
-
- }else{
-
- if ([_strIMG isEqualToString:@"meirrwu"]) {
-
- JXApplyViewController *vc=[JXApplyViewController new];
- [g_navigation pushViewController:vc animated:YES];
- }else if([_strIMG isEqualToString:@"jljgj-1"]){
- //JXGoldMangerVc JXGoldMangVc
- JXGoldMangerVc *vc=[JXGoldMangerVc new];
- [g_navigation pushViewController:vc animated:YES];
-
-
- }else if([_strIMG isEqualToString:@"jljyj"]){
-
-
- JXLuckRescueFundVc *vc=[JXLuckRescueFundVc new];
- [g_navigation pushViewController:vc animated:YES];
- }else if([_strIMG isEqualToString:@"qwhongbaoy"]){
- JXBigReelVc *vc=[JXBigReelVc new];
- vc.pushWheel=@"1";
- [g_navigation pushViewController:vc animated:YES];
-
- }else if([_strIMG isEqualToString:@"shenqdaili"]){
- // JXProcuratorViewController *vc=[JXProcuratorViewController new];
- // [g_navigation pushViewController:vc animated:YES];
-
- _deleageStr=11;
- [g_server getUser:g_server.myself.userId toView:self];
-
-
- }else if([_strIMG isEqualToString:@"huiyuansc"]){
-
- [g_server getUser:g_server.myself.userId toView:self];
- }
-
-
-
- }
- }
-
- //服务端返回数据
- -(void) didServerResultSucces:(JXConnection*)aDownload dict:(NSDictionary*)dict array:(NSArray*)array1{
-
- if( [aDownload.action isEqualToString:act_UserGet] ){
-
-
- _dataDict=dict[@"vipInfo"][@"current"];
-
- NSString *kefuID=@"";
- if (_deleageStr==11) {
- kefuID= _dataDict[@"proxyService"];
-
- if (kefuID.length==0||kefuID==nil) {
-
- [SVProgressHUD showWithStatus:@"暂无参与"];
- [SVProgressHUD dismissWithDelay:1.5];
- return;
- }
-
- JXChatViewC *vc = [[JXChatViewC alloc] init]; //10000656 10000
- JXUserObject *user = [[JXUserObject sharedInstance] getUserById:kefuID];
- vc.chatPerson = user;
- vc.customerPush=@"代理客服";
- [g_navigation pushViewController:vc animated:YES];
- }else{
-
- kefuID= _dataDict[@"loanService"];
-
- if (kefuID.length==0||kefuID==nil) {
-
- [SVProgressHUD showWithStatus:@"暂无参与"];
- [SVProgressHUD dismissWithDelay:1.5];
- return;
- }
- JXChatViewC *vc = [[JXChatViewC alloc] init]; //10000656 10000
- JXUserObject *user = [[JXUserObject sharedInstance] getUserById:kefuID];
- vc.chatPerson = user;
- vc.customerPush=@"无忧贷款";
- [g_navigation pushViewController:vc animated:YES];
- }
-
- }
- }
- -(int) didServerResultFailed:(JXConnection*)aDownload dict:(NSDictionary*)dict{
-
- if( [aDownload.action isEqualToString:act_UserGet] ){
-
-
- }
- return hide_error;
- }
- -(int) didServerConnectError:(JXConnection*)aDownload error:(NSError *)error{//error为空时,代表超时
- // [_wait hide]; return 0;
- if( [aDownload.action isEqualToString:act_UserGet] ){
-
- }
- }
- @end
|