JXMybossVc.m 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. //
  2. // JXMybossVc.m
  3. // shiku_im
  4. //
  5. // Created by 123 on 2020/5/18.
  6. // Copyright © 2020 Reese. All rights reserved.
  7. //
  8. #import "JXMybossVc.h"
  9. @interface JXMybossVc ()
  10. @property (nonatomic,weak) UIButton *bossQQL;
  11. @property (nonatomic,weak) UIButton *myQQL;
  12. @end
  13. @implementation JXMybossVc
  14. - (void)viewWillAppear:(BOOL)animated{
  15. [super viewWillAppear:animated];
  16. [self.navigationController setNavigationBarHidden:NO];
  17. }
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. self.navigationItem.title=@"我的上级";
  21. self.view.backgroundColor=kRGBColor(246, 246, 246);
  22. //
  23. [self defineNavBar:@"我的上级" andRinghtBtnImg:@""];
  24. // UIImageView *bgIMG=[[UIImageView alloc]init];
  25. // bgIMG.userInteractionEnabled=YES;
  26. // bgIMG.image=[UIImage imageNamed:@"BG2111"];
  27. // [self.view addSubview:bgIMG];
  28. // [bgIMG mas_makeConstraints:^(MASConstraintMaker *make) {
  29. // make.top.mas_equalTo(JX_SCREEN_TOP);
  30. // make.right.left.mas_equalTo(20);
  31. // make.bottom.mas_equalTo(0);
  32. // }];
  33. UILabel *titleL=[[UILabel alloc]init];
  34. titleL.font=[UIFont systemFontOfSize:18 weight:UIFontWeightRegular];
  35. titleL.textColor=kRGBColor(106, 106, 106);
  36. titleL.text=@"尊敬的会员:";
  37. [self.view addSubview:titleL];
  38. [titleL mas_makeConstraints:^(MASConstraintMaker *make) {
  39. make.top.mas_equalTo(JX_SCREEN_TOP+10);
  40. make.left.mas_equalTo(20);
  41. }];
  42. UILabel *usertit=[[UILabel alloc]init];
  43. usertit.text=@" 平台有4点温馨提示,请您注意!\n\n 1、上级导师、管理员、群主都是属于吉利彩票平台的独家代理,他们是不会给您推荐其他平台的!\n\n 2、如果推荐其他平台,就是要骗取您的资金。请您向在线客服进行举报,我们将予以重奖。\n\n 3、【HTTPS://WWW.7520.COM】是吉利彩票的国际域名(备用域名7520.VIP),请您认准域名登录。\n\n 4、每次充值前请您到官方充值窗口或联系在线客服获取卡号。如果是您的上级发给您的充值卡号,请您一定要再三核对是否与本平台的官方卡号一致,谨防上当受骗。";
  44. usertit.numberOfLines=0;
  45. usertit.font=[UIFont systemFontOfSize:15 weight:UIFontWeightRegular];
  46. usertit.textColor=kRGBColor(106, 106, 106);
  47. [self.view addSubview:usertit];
  48. [usertit mas_makeConstraints:^(MASConstraintMaker *make) {
  49. make.top.mas_equalTo(titleL.mas_bottom).mas_offset(20);
  50. make.left.mas_equalTo(20);
  51. make.right.mas_equalTo(-20);
  52. }];
  53. UILabel *bossQQL=[[UILabel alloc]init];
  54. bossQQL.text=@"您的上级QQ";
  55. bossQQL.font=[UIFont systemFontOfSize:16 weight:UIFontWeightRegular];
  56. [self.view addSubview:bossQQL];
  57. [bossQQL mas_makeConstraints:^(MASConstraintMaker *make) {
  58. make.top.mas_equalTo(usertit.mas_bottom).mas_offset(30);
  59. make.left.mas_equalTo(20);
  60. }];
  61. UIButton *bossQQLValue=[[UIButton alloc]init];
  62. [bossQQLValue setTitle:@"" forState:UIControlStateNormal];
  63. //bossQQLValue.contentMode=UIViewContentModeScaleAspectFit;
  64. [bossQQLValue setImage:[UIImage imageNamed:@"qqValue"] forState:UIControlStateNormal];
  65. [bossQQLValue setTitleColor:kRGBColor(11, 11, 11) forState:UIControlStateNormal];
  66. [self.view addSubview:bossQQLValue];
  67. self.bossQQL=bossQQLValue;
  68. [bossQQLValue mas_makeConstraints:^(MASConstraintMaker *make) {
  69. make.centerY.mas_equalTo(bossQQL.mas_centerY).mas_offset(0);
  70. make.centerX.mas_equalTo(self.view.mas_centerX);
  71. //make.height.mas_equalTo(15);
  72. }];
  73. UIButton *addBtn=[[UIButton alloc]init];
  74. [addBtn setTitle:@" 复制 " forState:UIControlStateNormal];
  75. addBtn.titleLabel.font=[UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
  76. [addBtn setTitleColor:kRGBColor(206, 28, 28) forState:UIControlStateNormal];
  77. addBtn.backgroundColor=[UIColor whiteColor];
  78. [self.view addSubview:addBtn];
  79. [addBtn addTarget:self action:@selector(fuzhiBtnQQClick) forControlEvents:UIControlEventTouchUpInside];
  80. [addBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  81. make.top.mas_equalTo(usertit.mas_bottom).mas_offset(20);
  82. make.right.mas_equalTo(-20);
  83. make.height.mas_equalTo(36);
  84. }];
  85. UILabel *line_VIew=[[UILabel alloc]init];
  86. line_VIew.backgroundColor=kRGBColor(222, 222, 222);
  87. [self.view addSubview:line_VIew];
  88. [line_VIew mas_makeConstraints:^(MASConstraintMaker *make) {
  89. make.top.mas_equalTo(addBtn.mas_bottom).mas_offset(8);
  90. make.right.left.mas_equalTo(20);
  91. make.height.mas_equalTo(1);
  92. }];
  93. UILabel *myQQL=[[UILabel alloc]init];
  94. myQQL.text=@"您的上级微信";
  95. myQQL.font=[UIFont systemFontOfSize:16 weight:UIFontWeightRegular];
  96. [self.view addSubview:myQQL];
  97. [myQQL mas_makeConstraints:^(MASConstraintMaker *make) {
  98. make.top.mas_equalTo(line_VIew.mas_bottom).mas_offset(10);
  99. make.left.mas_equalTo(20);
  100. }];
  101. UIButton *wxBtnValue=[[UIButton alloc]init];
  102. [wxBtnValue setTitle:@"" forState:UIControlStateNormal];
  103. [wxBtnValue setImage:[UIImage imageNamed:@"wxValue"] forState:UIControlStateNormal];
  104. [wxBtnValue setTitleColor:kRGBColor(11, 11, 11) forState:UIControlStateNormal];
  105. [self.view addSubview:wxBtnValue];
  106. self.myQQL=wxBtnValue;
  107. [wxBtnValue mas_makeConstraints:^(MASConstraintMaker *make) {
  108. make.centerY.mas_equalTo(myQQL.mas_centerY).mas_offset(0);
  109. make.centerX.mas_equalTo(self.view.mas_centerX);
  110. make.height.mas_equalTo(15);
  111. }];
  112. UIButton *fuzhiBtn=[[UIButton alloc]init];
  113. [fuzhiBtn setTitle:@" 复制 " forState:UIControlStateNormal];
  114. fuzhiBtn.titleLabel.font=[UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
  115. [fuzhiBtn setTitleColor:kRGBColor(206, 28, 28) forState:UIControlStateNormal];
  116. fuzhiBtn.backgroundColor=[UIColor whiteColor];
  117. [self.view addSubview:fuzhiBtn];
  118. [fuzhiBtn addTarget:self action:@selector(fuzhiBtnWXClick) forControlEvents:UIControlEventTouchUpInside];
  119. [fuzhiBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  120. make.top.mas_equalTo(line_VIew.mas_bottom).mas_offset(0);
  121. make.right.mas_equalTo(-20);
  122. make.height.mas_equalTo(36);
  123. }];
  124. UILabel *vesionL=[[UILabel alloc]init];
  125. NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
  126. NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
  127. vesionL.text=[NSString stringWithFormat:@"即信版本号:%@", app_Version];
  128. vesionL.textAlignment=NSTextAlignmentCenter;
  129. vesionL.font=[UIFont systemFontOfSize:15 weight:UIFontWeightRegular];
  130. [self.view addSubview:vesionL];
  131. [vesionL mas_makeConstraints:^(MASConstraintMaker *make) {
  132. make.bottom.mas_equalTo(self.view.mas_bottom).mas_offset(-44);
  133. make.left.mas_equalTo(20);
  134. make.right.mas_equalTo(-20);
  135. }];
  136. long time = (long)[[NSDate date] timeIntervalSince1970];
  137. time = (time *1000 + g_server.timeDifference);
  138. NSString *salt = [NSString stringWithFormat:@"%ld", time];
  139. NSString *membershipAccount=[[NSUserDefaults standardUserDefaults] objectForKey:@"membershipAccount_ID"];
  140. [g_server get_act_GetshangXiaJi:membershipAccount salt:salt toView:self];
  141. }
  142. //复制qq
  143. - (void)fuzhiBtnQQClick{
  144. if (_strWXURL==nil) {
  145. return;
  146. }
  147. UIPasteboard *paseBoard=[UIPasteboard generalPasteboard];
  148. paseBoard.string=_strWXURL[@"qq"];
  149. UIAlertView *alertShow=[[UIAlertView alloc]initWithTitle:nil message:@"复制成功" delegate:nil cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil];
  150. [alertShow show];
  151. }
  152. //复制微信号
  153. - (void)fuzhiBtnWXClick{
  154. if (_strWXURL==nil) {
  155. return;
  156. }
  157. UIPasteboard *paseBoard=[UIPasteboard generalPasteboard];
  158. paseBoard.string=_strWXURL[@"wx"];
  159. UIAlertView *alertShow=[[UIAlertView alloc]initWithTitle:nil message:@"复制成功" delegate:nil cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil];
  160. [alertShow show];
  161. }
  162. //服务端返回数据
  163. -(void) didServerResultSucces:(JXConnection*)aDownload dict:(NSDictionary*)dict array:(NSArray*)array1{
  164. if([aDownload.action isEqualToString:act_GetshangXiaJi]){
  165. NSDictionary * currentDictionary = [dict objectForKey:@"superior"];
  166. _strWXURL=currentDictionary;
  167. if (currentDictionary==nil) {
  168. return;
  169. }
  170. //[self.bossQQL setImage:[UIImage imageNamed:@"qqValue"] forState:UIControlStateNormal];
  171. [self.bossQQL setTitle:[NSString stringWithFormat:@" %@ ",currentDictionary[@"qq"]] forState:UIControlStateNormal];
  172. //[self.myQQL setImage:[UIImage imageNamed:@"wxValue"] forState:UIControlStateNormal];
  173. [self.myQQL setTitle:[NSString stringWithFormat:@" %@ ",currentDictionary[@"wx"]] forState:UIControlStateNormal];
  174. }
  175. }
  176. - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
  177. }
  178. -(int) didServerResultFailed:(JXConnection*)aDownload dict:(NSDictionary*)dict{
  179. if( [aDownload.action isEqualToString:act_GetSerServeWxget] ){
  180. }
  181. return hide_error;
  182. }
  183. @end