123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- //
- // JXPaiHangBangTopView.m
- // shiku_im
- //
- // Created by 123 on 2020/5/23.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXPaiHangBangTopView.h"
- @interface JXPaiHangBangTopView()
- @property (weak, nonatomic) IBOutlet UILabel *userNameL;
- @property (weak, nonatomic) IBOutlet UILabel *yinliL;
- @property (weak, nonatomic) IBOutlet UILabel *userName1;
- @property (weak, nonatomic) IBOutlet UILabel *userName2;
- @property (weak, nonatomic) IBOutlet UILabel *totalL;
- @property (weak, nonatomic) IBOutlet UILabel *daML;
- @property (weak, nonatomic) IBOutlet UIImageView *oneIMG;
- @property (weak, nonatomic) IBOutlet UIImageView *chongIMG;
- @property (weak, nonatomic) IBOutlet UIImageView *damaIMG;
- @end
- @implementation JXPaiHangBangTopView
- -(void)awakeFromNib{
- self.backgroundColor = kRGBColor(181, 27, 35);
-
- _damaIMG.layer.cornerRadius=35;
- _damaIMG.layer.masksToBounds=YES;
- _oneIMG.layer.cornerRadius=35;
- _oneIMG.layer.masksToBounds=YES;
- _chongIMG.layer.cornerRadius=35;
- _chongIMG.layer.masksToBounds=YES;
-
- [g_server delHeadImage:g_server.myself.userId];
- [g_server getHeadImageSmall:g_server.myself.userId userName:g_server.myself.userNickname imageView:_oneIMG];
- [g_server getHeadImageSmall:g_server.myself.userId userName:g_server.myself.userNickname imageView:_chongIMG];
- [g_server getHeadImageSmall:g_server.myself.userId userName:g_server.myself.userNickname imageView:_damaIMG];
-
- long time = (long)[[NSDate date] timeIntervalSince1970];
- time = (time *1000 + g_server.timeDifference);
- NSString *salt = [NSString stringWithFormat:@"%ld", time];
-
- [SVProgressHUD show];
- [g_server getMyPaihangBang:salt andType:@"4" andToView:self];
-
- [super awakeFromNib];
- }
- +(instancetype)XIBJXPaiHangBangTopView{
-
-
- return [[NSBundle mainBundle]loadNibNamed:@"JXPaiHangBangTopView" owner:self options:nil].firstObject;
-
- }
- - (IBAction)yiinLIAndChongzhiAndDaMaBtn:(UIButton *)sender {
-
- if (_jxpaiHangBangTopViewBlockBtn) {
- _jxpaiHangBangTopViewBlockBtn(sender);
- }
-
- }
- #pragma mark --- 请求成功
- -(void) didServerResultSucces:(JXConnection*)aDownload dict:(NSDictionary*)dict array:(NSArray*)array1{
- [SVProgressHUD dismiss];
-
- if([aDownload.action isEqualToString:act_usertopPHBall])
- {
-
- [array1 enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-
- if ([obj[@"type"] intValue]==1) {
- self.yinliL.text=[NSString stringWithFormat:@"盈利奖金%@",obj[@"money"]];
- self.userNameL.text=[NSString stringWithFormat:@"%@",obj[@"membershipAccount"]];
- }else if([obj[@"type"] intValue]==2){
- self.userName1.text=[NSString stringWithFormat:@"%@",obj[@"membershipAccount"]];
- self.totalL.text=[NSString stringWithFormat:@"充值榜%@",obj[@"money"]];
- }else if([obj[@"type"] intValue]==3){
- self.userName2.text=[NSString stringWithFormat:@"%@",obj[@"membershipAccount"]];
- self.daML.text=[NSString stringWithFormat:@"打码榜%@",obj[@"money"]];
- }
- }];
-
-
- }
- }
- -(int) didServerResultFailed:(JXConnection*)aDownload dict:(NSDictionary*)dict{
- [SVProgressHUD dismiss];
- NSString * errorCode = [NSString stringWithFormat:@"%@",[dict objectForKey:@"resultMsg"]];
- if([errorCode isEqualToString:@"权限验证失败"])
- {
- if ([aDownload.action isEqualToString:act_GetBalanceRedTimes])
- {
-
-
- }
- }
- }
- @end
|