// // JXGoldMangerVc.m // shiku_im // // Created by os on 2020/6/26. // Copyright © 2020 Reese. All rights reserved. // #import "JXGoldMangerVc.h" #import "JXRelayVC.h" #import "JXGoldShareView.h" #import "JXALLShowView.h" @interface JXGoldMangerVc () @property (nonatomic,copy) NSString *nameStr; @property (weak, nonatomic) UILabel *levelL; @property (weak, nonatomic) UILabel *keLinL; @property (weak, nonatomic) UILabel *lijL; @property (weak, nonatomic) UILabel *weekFL; @property (weak, nonatomic) UILabel *monthFL; //下一级 @property (weak, nonatomic) UILabel *moneyL; @property (weak, nonatomic) UILabel *nextJijiL; @property (weak, nonatomic) UILabel *weekFL2; @property (weak, nonatomic) UILabel *monthFL2; @property (weak, nonatomic) UIButton *nowLIngBtn; @property (strong, nonatomic) UIView *whiteBackView; @property (strong, nonatomic) UIView *scrollView; @property (strong, nonatomic) UIImageView * topIMGLine; @end @implementation JXGoldMangerVc - (void)viewDidLoad { [super viewDidLoad]; _vipDict=[NSDictionary dictionary]; _scrollView=[[UIView alloc]init]; _scrollView.backgroundColor=[UIColor whiteColor]; [self.view addSubview:_scrollView]; [_scrollView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(JX_SCREEN_TOP); make.bottom.mas_equalTo(0); }]; [self createHeadUI]; [self createUI]; [self prepareFor]; UIButton * nowLIngBtn = [[UIButton alloc]init]; [nowLIngBtn setBackgroundImage:[UIImage imageNamed:@"jgj立即领取"] forState:UIControlStateNormal]; [self.view addSubview:nowLIngBtn]; [nowLIngBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.bottom.mas_equalTo(0); }]; [nowLIngBtn addTarget:self action:@selector(nowLIngBtnclick) forControlEvents:UIControlEventTouchUpInside]; if (JX_SCREEN_WIDTH>=414){ return; } UISwipeGestureRecognizer *recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(foundSwipe:)]; //设置识别滑动方向 recognizer.direction =UISwipeGestureRecognizerDirectionUp; //Swipe手势识别器关联到View [_scrollView addGestureRecognizer:recognizer]; UISwipeGestureRecognizer *recognizer2 = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(foundSwipe2:)]; recognizer2.direction =UISwipeGestureRecognizerDirectionDown; [_scrollView addGestureRecognizer:recognizer2]; } - (void)foundSwipe2:(UISwipeGestureRecognizer *)sender { //设置识别滑动方向 sender.direction =UISwipeGestureRecognizerDirectionDown; //Swipe手势识别器关联到View [self.view addGestureRecognizer:sender]; CGRect bounds=self.view.bounds; bounds.origin.y=0; _scrollView.bounds=bounds; } - (void)foundSwipe:(UISwipeGestureRecognizer *)sender { CGRect bounds=_scrollView.bounds; bounds.origin.y=110; _scrollView.bounds=bounds; } - (void)createHeadUI{ UIImageView * banner1 = [[UIImageView alloc]init]; banner1.image = [UIImage imageNamed:@"title-bg"]; [_scrollView addSubview:banner1]; [banner1 mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(0); }]; UILabel * userName = [[UILabel alloc]init]; userName.text = @"小飞飞"; [banner1 addSubview:userName]; userName.text=g_server.myself.userNickname; [userName mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(20); ; make.bottom.mas_equalTo(-20); }]; UIImageView * headIMG = [[UIImageView alloc]init]; headIMG.image = [UIImage imageNamed:@"组11"]; [banner1 addSubview:headIMG]; [headIMG mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(userName.mas_centerX); make.bottom.mas_equalTo(userName.mas_top).mas_offset(-11); make.width.mas_equalTo(50); make.height.mas_equalTo(50); }]; headIMG.layer.cornerRadius=25; headIMG.layer.masksToBounds=YES; [g_server getHeadImageSmall:g_server.myself.userId userName:g_server.myself.userNickname imageView:headIMG]; userName.text=g_myself.userNickname; UIImageView * topIMGLine = [[UIImageView alloc]init]; topIMGLine.image = [UIImage imageNamed:@"jgjHui"]; [_scrollView addSubview:topIMGLine]; self.topIMGLine=topIMGLine; [topIMGLine mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(banner1.mas_bottom); make.right.left.mas_equalTo(0); }]; UILabel * leftLevelTitle = [[UILabel alloc]init]; leftLevelTitle.text = @"目前等级"; leftLevelTitle.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; leftLevelTitle.textColor=kRGBColor(36, 36, 36); leftLevelTitle.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine addSubview:leftLevelTitle]; [leftLevelTitle mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(20); ; make.top.mas_equalTo(15); }]; UILabel * rightLevelTitle = [[UILabel alloc]init]; rightLevelTitle.text = @"0级"; rightLevelTitle.textColor=kRGBColor(36, 36, 36); rightLevelTitle.font=[UIFont systemFontOfSize:16 weight:UIFontWeightMedium]; [topIMGLine addSubview:rightLevelTitle]; self.levelL=rightLevelTitle; [rightLevelTitle mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-20); ; make.top.mas_equalTo(15); }]; UIView * line_View = [[UILabel alloc]init]; line_View.backgroundColor = [UIColor redColor]; [topIMGLine addSubview:line_View]; [line_View mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(20); ; make.right.mas_equalTo(-20); make.height.mas_equalTo(0.5); make.top.mas_equalTo(leftLevelTitle.mas_bottom).mas_offset(15); }]; UILabel * rightLevelVaue = [[UILabel alloc]init]; rightLevelVaue.text = @"本次领取"; rightLevelVaue.textColor=kRGBColor(36, 36, 36); rightLevelVaue.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine addSubview:rightLevelVaue]; [rightLevelVaue mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.mas_equalTo(topIMGLine.mas_centerY).mas_offset(20); make.left.mas_equalTo(20); }]; UILabel * keLinL = [[UILabel alloc]init]; keLinL.text = @"0"; keLinL.textColor=kRGBColor(36, 36, 36); keLinL.font=[UIFont systemFontOfSize:16 weight:UIFontWeightMedium]; [topIMGLine addSubview:keLinL]; self.keLinL=keLinL; [keLinL mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.mas_equalTo(rightLevelVaue.mas_centerY).mas_offset(0); make.left.mas_equalTo(rightLevelVaue.mas_right).mas_offset(15); }]; //晋级礼金 UILabel * jinjiMoney = [[UILabel alloc]init]; jinjiMoney.text = @"晋级礼金"; jinjiMoney.textColor=kRGBColor(77, 77, 77); jinjiMoney.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine addSubview:jinjiMoney]; [jinjiMoney mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(topIMGLine.mas_centerX).mas_offset(20); make.top.mas_equalTo(line_View.mas_bottom).mas_offset(12); }]; UILabel * weekMoney = [[UILabel alloc]init]; weekMoney.text = @"周俸禄"; weekMoney.textColor=kRGBColor(77, 77, 77); weekMoney.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine addSubview:weekMoney]; [weekMoney mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(topIMGLine.mas_centerX).mas_offset(20); make.top.mas_equalTo(jinjiMoney.mas_bottom).mas_offset(12); }]; UILabel * monthMoney = [[UILabel alloc]init]; monthMoney.text = @"月俸禄"; monthMoney.textColor=kRGBColor(77, 77, 77); monthMoney.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine addSubview:monthMoney]; [monthMoney mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(topIMGLine.mas_centerX).mas_offset(20); make.top.mas_equalTo(weekMoney.mas_bottom).mas_offset(12); }]; //值 UILabel * jinjiMoneyValue = [[UILabel alloc]init]; jinjiMoneyValue.text = @"0"; jinjiMoneyValue.textColor=kRGBColor(77, 77, 77); jinjiMoneyValue.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine addSubview:jinjiMoneyValue]; self.lijL=jinjiMoneyValue; [jinjiMoneyValue mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-20); make.top.mas_equalTo(line_View.mas_bottom).mas_offset(12); }]; UILabel * weekMoneyValue = [[UILabel alloc]init]; weekMoneyValue.text = @"0"; weekMoneyValue.textColor=kRGBColor(77, 77, 77); weekMoneyValue.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine addSubview:weekMoneyValue]; self.weekFL=weekMoneyValue; [weekMoneyValue mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-20); make.top.mas_equalTo(jinjiMoneyValue.mas_bottom).mas_offset(12); }]; UILabel * monthFL = [[UILabel alloc]init]; monthFL.text = @"0"; monthFL.textColor=kRGBColor(77, 77, 77); monthFL.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine addSubview:monthFL]; self.monthFL=monthFL; [monthFL mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-20); make.top.mas_equalTo(weekMoneyValue.mas_bottom).mas_offset(12); }]; } - (void)createUI{ UIImageView * topIMGLine2 = [[UIImageView alloc]init]; topIMGLine2.image = [UIImage imageNamed:@"矩形27拷贝"]; [_scrollView addSubview:topIMGLine2]; [topIMGLine2 mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(_topIMGLine.mas_bottom).mas_offset(15); make.right.left.mas_equalTo(0); }]; UILabel * leftLevelTitle2 = [[UILabel alloc]init]; leftLevelTitle2.text = @"升级至下一级所需大码量"; leftLevelTitle2.textColor=kRGBColor(36, 36, 36); //leftLevelTitle2.textColor=kRGBColor(222, 29, 19); leftLevelTitle2.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine2 addSubview:leftLevelTitle2]; [leftLevelTitle2 mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(20); ; make.top.mas_equalTo(20); }]; UILabel * rightLevelTitle2 = [[UILabel alloc]init]; rightLevelTitle2.text = @"0"; [topIMGLine2 addSubview:rightLevelTitle2]; self.moneyL=rightLevelTitle2; [rightLevelTitle2 mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-20); ; make.top.mas_equalTo(20); }]; UIView * line_View2 = [[UILabel alloc]init]; line_View2.backgroundColor = [UIColor redColor]; [topIMGLine2 addSubview:line_View2]; [line_View2 mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(20); ; make.right.mas_equalTo(-20); make.height.mas_equalTo(0.5); make.top.mas_equalTo(leftLevelTitle2.mas_bottom).mas_offset(15); }]; UILabel * rightLevelVaue2 = [[UILabel alloc]init]; rightLevelVaue2.text = @"晋级礼金"; rightLevelVaue2.textColor=kRGBColor(77, 77, 77); rightLevelVaue2.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine2 addSubview:rightLevelVaue2]; [rightLevelVaue2 mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.mas_equalTo(topIMGLine2.mas_centerY).mas_offset(20); make.left.mas_equalTo(20); }]; UILabel * nextJijiL = [[UILabel alloc]init]; nextJijiL.text = @"0"; nextJijiL.textColor=kRGBColor(36, 36, 36); //nextJijiL.textColor=kRGBColor(222, 29, 19); nextJijiL.font=[UIFont systemFontOfSize:16 weight:UIFontWeightMedium]; [topIMGLine2 addSubview:nextJijiL]; self.nextJijiL=nextJijiL; [nextJijiL mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.mas_equalTo(rightLevelVaue2.mas_centerY).mas_offset(0); make.left.mas_equalTo(rightLevelVaue2.mas_right).mas_offset(15); }]; UILabel * weekFL2 = [[UILabel alloc]init]; weekFL2.text = @"周俸禄"; weekFL2.textColor=kRGBColor(77, 77, 77); weekFL2.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine2 addSubview:weekFL2]; [weekFL2 mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(topIMGLine2.mas_centerX).mas_offset(20); make.top.mas_equalTo(line_View2.mas_bottom).mas_offset(12); }]; UILabel * monthFL2 = [[UILabel alloc]init]; monthFL2.text = @"月俸禄"; monthFL2.textColor=kRGBColor(77, 77, 77); monthFL2.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine2 addSubview:monthFL2]; [monthFL2 mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(topIMGLine2.mas_centerX).mas_offset(20); make.top.mas_equalTo(weekFL2.mas_bottom).mas_offset(12); }]; //zhi UILabel * weekFL2Value = [[UILabel alloc]init]; weekFL2Value.text = @"0"; weekFL2Value.textColor=kRGBColor(77, 77, 77); weekFL2Value.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine2 addSubview:weekFL2Value]; self.weekFL2=weekFL2Value; [weekFL2Value mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-20); make.top.mas_equalTo(line_View2.mas_bottom).mas_offset(12); }]; UILabel * monthMoneyValue = [[UILabel alloc]init]; monthMoneyValue.text = @"0"; monthMoneyValue.textColor=kRGBColor(77, 77, 77); monthMoneyValue.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; [topIMGLine2 addSubview:monthMoneyValue]; self.monthFL2=monthMoneyValue; [monthMoneyValue mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-20); make.top.mas_equalTo(weekFL2Value.mas_bottom).mas_offset(12); }]; } - (void)prepareFor{ [self defineNavBar:@"吉利金管家" andRinghtBtnImg:@""]; } - (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; long time = (long)[[NSDate date] timeIntervalSince1970]; time = (time *1000 + g_server.timeDifference); // NSString *salt = [NSString stringWithFormat:@"%ld", time]; [SVProgressHUD show]; [g_server getUserVipInformation:@"" andToView:self]; // [g_server Useract_act_VipConfigGoldMag:salt andToView:self]; [g_notify addObserver:self selector:@selector(goldNoti) name:@"goldShare" object:nil]; [g_notify addObserver:self selector:@selector(tongyong) name:@"tongyong" object:nil]; } //通用弹框 [g_server getUserVipact_GainUserGoldMang:salt andToView:self]; - (void)tongyong{ _nameStr=@"ssss"; long time = (long)[[NSDate date] timeIntervalSince1970]; time = (time *1000 + g_server.timeDifference); NSString *salt = [NSString stringWithFormat:@"%ld", time]; [g_server Useract_act_VipConfigGoldMag:salt andToView:self]; // [g_server act_UsergoldMangerHistory:salt andToView:self]; } -(void)goldNoti{ JXMessageObject *msg=[[JXMessageObject alloc] init]; msg.type = [NSNumber numberWithInt:kWCMessageTypeText]; // msg.toUserId = _user.userId; msg.fromUserId = MY_USER_ID; msg.fromUserName = g_server.myself.userNickname; msg.content = [NSString stringWithFormat:@"我刚刚在金管家领取%d元 周礼金,点击查看我的礼金",[_vipDict[@"totalMoney"] intValue]]; msg.timeSend = [NSDate date]; JXRelayVC * relay = [[JXRelayVC alloc] init]; NSMutableArray *array = [NSMutableArray arrayWithObject:msg]; relay.relayMsgArray = array; relay.isUrl = NO; relay.yunMoney=@"20"; relay.yunGetMoney=self.weekFL.text; relay.pushType = @"messageContent"; [g_navigation pushViewController:relay animated:YES]; } /**立即领取*/ - (void)nowLIngBtnclick { if ([_vipDict[@"state"] intValue]==2) { [JXGoldShareView showView]; return; }else{ JXALLShowView *show=[[JXALLShowView alloc]init]; show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.2]; show.frame=[UIScreen mainScreen].bounds; int currentState = [_vipDict[@"state"] intValue]; if (currentState>=0) { //有一个流程正在进行 if (currentState == 0) { //审核中 show.nameStr=@"您已经成功提交奖励申请,请耐心等待。\n如有疑问请咨询在线客服!";//_vipDict[@"notice"]; } else if (currentState == 1) { //审核驳回提示 show.nameStr=@"很遗憾,您本周奖励领取失败,请联系在线客服咨询!!"; } else if (currentState == 2) { show.nameStr=[NSString stringWithFormat:@"我刚刚在金管家领取 %d 元 周礼金,点击查看我的礼金",[_vipDict[@"totalMoney"] intValue]]; } else if (currentState == 5) { show.nameStr=[NSString stringWithFormat:@"您已经成功领取,请登录您的账户查看余额,如果长时间未到账,请联系在线客服!"]; }else { //领取成功 show.nameStr= @"恭喜您已经成功领取,请前往账户中心查看余额。\n如果长时间未到账,请联系在线客服!"; } } else { if (currentState == -1) { //新的流程开始 NSString *mydate=[self getCurrentTimeAndWeekDay]; if ([mydate intValue]==[_vipDict[@"configWeek"] intValue]) { //可领取 long time = (long)[[NSDate date] timeIntervalSince1970]; time = (time *1000 + g_server.timeDifference); NSString *salt = [NSString stringWithFormat:@"%ld", time]; [g_server vipGainCoin:salt andToView:self]; // [g_server getUserVipact_GainUserGoldMang:salt andToView:self] [JXGoldShareView showView]; } else { int dataValue=[mydate intValue]; NSString *week=@""; switch (dataValue) { case 1: { week = @"周日"; break; } case 2: { week = @"周一"; break; } case 3: { week = @"周二"; break; } case 4: { week = @"周三"; break; } case 5: { week = @"周四"; break; } case 6: { week = @"周五"; break; }case 7: { week = @"周六"; break; } default: break; } show.nameStr= [NSString stringWithFormat:@"本活动奖励仅限每周%@ 中午12点开放领取!",week]; //不可领取 } } else if (currentState == -2) { //金额为0,不可领取 show.nameStr=@"可领金额为0,暂不支持领取!"; } } [[UIApplication sharedApplication].keyWindow addSubview:show]; } } //获取当前时间日期星期 - (NSString *)getCurrentTimeAndWeekDay { NSArray * arrWeek=[NSArray arrayWithObjects:@"星期日",@"星期一",@"星期二",@"星期三",@"星期四",@"星期五",@"星期六", nil]; NSDate *date = [NSDate date]; /* NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; */ //ios 8.0 之后 不想看见警告用下面这个 NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; NSDateComponents *comps = [[NSDateComponents alloc] init]; /* NSInteger unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSWeekdayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; */ //ios 8.0 之后 不想看见警告用下面这个 NSInteger unitFlags = NSCalendarUnitYear |NSCalendarUnitMonth | NSCalendarUnitDay |NSCalendarUnitWeekday | NSCalendarUnitHour |NSCalendarUnitMinute |NSCalendarUnitSecond; comps = [calendar components:unitFlags fromDate:date]; NSInteger week = [comps weekday]; NSInteger year=[comps year]; NSInteger month = [comps month]; NSInteger day = [comps day]; return [NSString stringWithFormat:@"%ld",(long)week]; } -(void) didServerResultSucces:(JXConnection*)aDownload dict:(NSDictionary*)dict array:(NSArray*)array1{ [SVProgressHUD dismiss]; NSLog(@"金管家 :  %@",dict); if([aDownload.action isEqualToString:act_GetUserVipInformation]) { _vipDict=dict; NSDictionary * currentDictionary = [dict objectForKey:@"current"]; self.levelL.text=[NSString stringWithFormat:@"%@级",currentDictionary[@"level"]]; self.keLinL.text=[NSString stringWithFormat:@"%@",dict[@"totalMoney"]]; self.lijL.text=[NSString stringWithFormat:@"%@",dict[@"upgradeCoinSum"]]; NSString *weeekStr= [NSString stringWithFormat:@"%@",dict[@"weekMoney"]]; self.weekFL.text=weeekStr; self.monthFL.text=[NSString stringWithFormat:@"%@",dict[@"monthMoney"]]; NSDictionary * nextDictionary = [dict objectForKey:@"next"]; int nexMoney=[nextDictionary[@"money"] intValue]; int totalRecharge= [dict[@"totalRecharge"] intValue]; self.moneyL.text=[NSString stringWithFormat:@"%d",nexMoney-totalRecharge]; self.nextJijiL.text=[NSString stringWithFormat:@"%@",nextDictionary[@"upgradeCoin"]]; self.weekFL2.text=[NSString stringWithFormat:@"%@",nextDictionary[@"weekRedPackageCoin"]]; self.monthFL2.text=[NSString stringWithFormat:@"%@",nextDictionary[@"monthRedPackageCoin"]]; int currentState = [_vipDict[@"state"] intValue]; return; if (currentState >= 0) { JXALLShowView *show=[[JXALLShowView alloc]init]; show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.2]; show.frame=[UIScreen mainScreen].bounds; //有一个流程正在进行 if (currentState == 0) { //审核中 show.nameStr=@"您已经成功提交奖励申请,请耐心等待。\n如有疑问请咨询在线客服!";//_vipDict[@"notice"]; } else if (currentState == 1) { //审核驳回提示 show.nameStr=@"很遗憾,您本周奖励领取失败,请联系在线客服咨询!!"; } else if (currentState == 2) { //待分享 [JXGoldShareView showView]; // String content = "我刚刚在金管家领取" + vipInfoBean.getData().getTotalMoney() + "元 周礼金,点击查看我的礼金" + AppConstant.JINGUANJIA_TAG; } else if (currentState == 5) { //待派送 show.nameStr=@"您已经成功提交奖励申请,请耐心等待。\n如有疑问请咨询在线客服!"; } else { //领取成功 show.nameStr=@"恭喜您已经成功领取,请前往账户中心查看余额。\n如果长时间未到账,请联系在线客服!"; } [[UIApplication sharedApplication].keyWindow addSubview:show]; } return; // if (_nameStr.length>0) { NSArray *statustr=currentDictionary[@"upgradeAward"]; NSString *statusValue=@""; if ([[statustr lastObject] intValue]==-1) {// 未申请 statusValue=@" 很遗憾,您本周奖励领取失败,请联系在线客服咨询!"; } if ([[statustr lastObject] intValue]==0) { //审核中 statusValue=@" 本活动奖励仅限每周三中午12点开放领取!"; } if ([[statustr lastObject] intValue]==1) {//审核驳回 statusValue=@" 您已经成功提交奖励申请,请耐心等待。如有疑问请咨询在线客服!"; } if ([[statustr lastObject] intValue]==2) {//待分享 statusValue=@"您已经成功领取,请登录您的账户查看余额,如果长时间未到账,请联系在线客服!"; }if ([[statustr lastObject] intValue]==3) {//派送成功 statusValue=@" 恭喜您审核通过了,请点击下方按钮“分享”,即可成功领取"; }if ([[statustr lastObject] intValue]==4) {//派送驳回 statusValue=@" 恭喜您审核通过了,请点击下方按钮“分享”,即可成功领取"; }if ([[statustr lastObject] intValue]==5) {//待派送 statusValue=@" 恭喜您审核通过了,请点击下方按钮“分享”,即可成功领取"; } // } } else if([aDownload.action isEqualToString:act_GainUserCoin]) { long time = (long)[[NSDate date] timeIntervalSince1970]; time = (time *1000 + g_server.timeDifference); NSString *salt = [NSString stringWithFormat:@"%ld", time]; [g_server getUserVipInformation:salt andToView:self]; } } -(int) didServerResultFailed:(JXConnection*)aDownload dict:(NSDictionary*)dict{ [SVProgressHUD dismiss]; NSString * errorCode = [NSString stringWithFormat:@"%@",[dict objectForKey:@"resultMsg"]]; if([errorCode isEqualToString:@"权限验证失败"]) { } else { } // [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"%@",[dict objectForKey:@"resultMsg"]]]; return hide_error; } @end