MOLiveMemberListView.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. //
  2. // MOLiveMemberListView.m
  3. // MiMoLive
  4. //
  5. // Created by SuperC on 2023/11/19.
  6. //
  7. //一页的size
  8. #define kPageSize 15
  9. #import "MOLiveMemberListView.h"
  10. #import "MORankListView.h"
  11. #import "MOLiveVipListView.h"
  12. #import "MORoomContriView.h"
  13. @interface MOLiveMemberListView ()
  14. @property (weak, nonatomic) IBOutlet UIView *bgView;
  15. @property (weak, nonatomic) IBOutlet UIButton *inviteBtn;
  16. @property (nonatomic, strong) MOMemberTableView *audienceTableView;
  17. /** 图层调整 -> 现在为管理员 */
  18. @property (nonatomic, strong) MOMemberTableView *vipTableView;
  19. @property (nonatomic, strong) MORoomContriView *contributionView;
  20. @property (nonatomic, strong) MOLiveVipListView *vipListView;
  21. @property (weak, nonatomic) IBOutlet UIStackView *btnBgStack;
  22. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *stackRight;
  23. @property (nonatomic, assign) NSInteger stackRightNum;
  24. @property (weak, nonatomic) IBOutlet UIStackView *numStack;
  25. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *numStackRight;
  26. @property (weak, nonatomic) IBOutlet UIButton *audienceBtn;
  27. @property (weak, nonatomic) IBOutlet UIButton *contributionBtn;
  28. @property (weak, nonatomic) IBOutlet UIButton *vipBtn;
  29. @property (weak, nonatomic) IBOutlet UILabel *audienceNumLab;
  30. @property (weak, nonatomic) IBOutlet UILabel *contributionNumLab;
  31. @property (weak, nonatomic) IBOutlet UILabel *vipNumLab;
  32. @property (nonatomic, assign) double vipMembers;
  33. @property (nonatomic, assign) double memberMembers;
  34. @property (nonatomic, assign) double manageMembers;
  35. @property (nonatomic, assign) double vipMember2;
  36. /** 下标 */
  37. @property (nonatomic, copy) NSString *audienceNext;
  38. /** 下标 */
  39. @property (nonatomic, copy) NSString *vipNext;
  40. @property (nonatomic, strong) UIImageView *lineView;
  41. /** 当前选中的列表 */
  42. @property (nonatomic, assign) NSInteger selectIndex;
  43. @end
  44. @implementation MOLiveMemberListView
  45. + (instancetype)moLiveMemberListView{
  46. return [[[NSBundle mainBundle] loadNibNamed:@"MOLiveMemberListView" owner:self options:nil] firstObject];
  47. }
  48. - (void)awakeFromNib{
  49. [super awakeFromNib];
  50. self.bgView.layer.cornerRadius = 16.0;
  51. self.bgView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
  52. self.bgView.layer.masksToBounds = YES;
  53. self.inviteBtn.layer.cornerRadius = 25.0 / 2.0;
  54. self.inviteBtn.layer.masksToBounds = YES;
  55. // NSArray *colorArr = @[[MOTools colorWithHexString:@"#FF62EE" alpha:1.0],[MOTools colorWithHexString:@"#9923FF" alpha:1.0]];
  56. // UIImage *image = [MOTools createGradientRectImageWithBounds:CGRectMake(0, 0, 70.0, 25.0) Colors:colorArr GradientType:0];
  57. // [self.inviteBtn setBackgroundImage:image forState:UIControlStateNormal];
  58. [self.inviteBtn setBackgroundColor:kBaseBtnBgColor];
  59. [self.inviteBtn setFont:[MOTextTools getTheFontWithSize:14.0 AndFontName:kNormalContentFontStr]];
  60. [self.audienceBtn setFont:[MOTextTools poppinsBoldFont:16.0]];
  61. [self.contributionBtn setFont:[MOTextTools poppinsMediumFont:16.0]];
  62. [self.vipBtn setFont:[MOTextTools poppinsMediumFont:16.0]];
  63. self.audienceNumLab.font = [MOTextTools poppinsMediumFont:11.0];
  64. self.contributionNumLab.font = [MOTextTools poppinsMediumFont:11.0];
  65. self.vipNumLab.font = [MOTextTools poppinsMediumFont:11.0];
  66. [self.audienceBtn setTitleColor:kBaseTextColor_1 forState:UIControlStateSelected];
  67. [self.audienceBtn setTitleColor:kBaseTextColor_3 forState:UIControlStateNormal];
  68. self.audienceBtn.tag = 90;
  69. [self.contributionBtn setTitleColor:kBaseTextColor_1 forState:UIControlStateSelected];
  70. [self.contributionBtn setTitleColor:kBaseTextColor_3 forState:UIControlStateNormal];
  71. self.contributionBtn.tag = 92;
  72. [self.vipBtn setTitleColor:kBaseTextColor_1 forState:UIControlStateSelected];
  73. [self.vipBtn setTitleColor:kBaseTextColor_3 forState:UIControlStateNormal];
  74. self.vipBtn.tag = 91;
  75. [self.audienceNumLab setTextColor:kBaseTextColor_1];
  76. [self.contributionNumLab setTextColor:kBaseTextColor_3];
  77. [self.vipNumLab setTextColor:kBaseTextColor_3];
  78. self.stackRightNum = 0.0;
  79. CGFloat baseWidth = (SCREENWIDTH - self.stackRightNum) / 4.0;
  80. [self.bgView addSubview:self.lineView];
  81. [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
  82. make.centerX.equalTo(self.btnBgStack.mas_centerX).offset(baseWidth * -1.0);
  83. make.width.equalTo(@40.0);
  84. make.height.equalTo(@2.0);
  85. make.top.equalTo(self.bgView).offset(48.0);
  86. }];
  87. UIView *lineTwoView = [[UIView alloc] init];
  88. lineTwoView.backgroundColor = [MOTools colorWithHexString:@"#DADCE6" alpha:0.6];
  89. [self.bgView addSubview:lineTwoView];
  90. [lineTwoView mas_makeConstraints:^(MASConstraintMaker *make) {
  91. make.top.equalTo(self.bgView).offset(50.0);
  92. make.left.right.equalTo(self.bgView);
  93. make.height.equalTo(@0.5);
  94. }];
  95. [self.bgView addSubview:self.audienceTableView];
  96. [self.audienceTableView mas_makeConstraints:^(MASConstraintMaker *make) {
  97. make.left.right.bottom.equalTo(self.bgView);
  98. make.top.equalTo(lineTwoView.mas_bottom).offset(7.0);
  99. }];
  100. [self.bgView addSubview:self.vipTableView];
  101. [self.vipTableView mas_makeConstraints:^(MASConstraintMaker *make) {
  102. make.left.right.bottom.equalTo(self.bgView);
  103. make.top.equalTo(lineTwoView.mas_bottom).offset(7.0);
  104. }];
  105. self.vipTableView.hidden = YES;
  106. [self.bgView addSubview:self.contributionView];
  107. [self.contributionView mas_makeConstraints:^(MASConstraintMaker *make) {
  108. make.left.right.bottom.equalTo(self.bgView);
  109. make.top.equalTo(lineTwoView.mas_bottom);
  110. }];
  111. self.contributionView.hidden = YES;
  112. [self setTableViewBlock];
  113. self.audienceBtn.selected = YES;
  114. self.audienceNext = @"";
  115. self.vipNext = @"";
  116. }
  117. //MARK: cell点击事件
  118. - (void)setTableViewBlock{
  119. WEAKSELF
  120. self.audienceTableView.cellClickBlock = ^(MOUserBase * _Nonnull cellModel) {
  121. [weakSelf theCellClickWith:cellModel];
  122. };
  123. self.audienceTableView.inviteBlock = ^{
  124. [weakSelf theInviteBtnClick];
  125. };
  126. self.audienceTableView.headBtnClickBlock = ^{
  127. [weakSelf showVipListView];
  128. };
  129. self.vipTableView.cellClickBlock = ^(MOUserBase * _Nonnull cellModel) {
  130. [weakSelf theCellClickWith:cellModel];
  131. };
  132. self.vipTableView.inviteBlock = ^{
  133. [weakSelf theInviteBtnClick];
  134. };
  135. self.contributionView.headBtnClickBlock = ^(MOUserBase * _Nonnull userBase) {
  136. weakSelf.contriHeadClickBlock ? weakSelf.contriHeadClickBlock(userBase) : nil;
  137. [weakSelf dismissListView];
  138. };
  139. }
  140. - (void)showVipListView{
  141. WEAKSELF
  142. [self addSubview:self.vipListView];
  143. [self.vipListView mas_makeConstraints:^(MASConstraintMaker *make) {
  144. make.left.equalTo(self).offset(0);
  145. make.width.equalTo(@(SCREENWIDTH));
  146. make.height.equalTo(@502.0);
  147. make.bottom.equalTo(self);
  148. }];
  149. self.vipListView.roomId = self.roomId;
  150. [self.vipListView showLiveVipListView];
  151. [self.vipListView getFirstHttpData];
  152. self.vipListView.cellClickBlock = ^(MOUserBase * _Nonnull cellModel) {
  153. [weakSelf theCellClickWith:cellModel];
  154. };
  155. }
  156. - (void)theCellClickWith:(MOUserBase *)model{
  157. self.cellClickBlock ? self.cellClickBlock(model) : nil;
  158. [self dismissListView];
  159. }
  160. - (void)theInviteBtnClick{
  161. self.inviteBlock ? self.inviteBlock() : nil;
  162. }
  163. - (void)setIsCreatLive:(BOOL)isCreatLive{
  164. _isCreatLive = isCreatLive;
  165. if(!isCreatLive){
  166. self.inviteBtn.hidden = YES;
  167. self.stackRight.constant = 0.0;
  168. self.stackRightNum = 0.0;
  169. }
  170. self.selectIndex = 0;
  171. }
  172. - (void)getAllHttpData{
  173. //观众
  174. NSDictionary *audiencePage = @{@"size":@(kPageSize),@"next":self.audienceNext};
  175. NSDictionary *audienceDict = @{@"page":audiencePage,
  176. @"roomId":self.roomId};
  177. [self getAudienceHttpDataWith:audienceDict];
  178. NSDictionary *vipPage = @{@"size":@(kPageSize),@"next":self.vipNext};
  179. NSDictionary *vipDict = @{@"page":vipPage,
  180. @"roomId":self.roomId};
  181. [self getVipHttpDataWith:vipDict];
  182. // //管理员
  183. // NSDictionary *manageDict = @{@"id":self.roomId};
  184. // [self getManagerHttpDataWith:manageDict];
  185. //贡献榜
  186. self.contributionView.roomId = self.roomId;
  187. }
  188. //获取在线观众
  189. - (void)getAudienceHttpDataWith:(NSDictionary *)dict{
  190. WEAKSELF
  191. [kHttpManager toGetJoinMembersAboutLiveWithParams:dict andBlock:^(id _Nonnull data, NSError * _Nonnull error) {
  192. __strong typeof(weakSelf) self = weakSelf;
  193. [self.audienceTableView.mj_footer endRefreshing];
  194. if(kCode_Success){
  195. // MOLogV(@"%@",[[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:data options:0 error:nil] encoding:NSUTF8StringEncoding]);
  196. MOLiveMemberData *baseModel = [MOLiveMemberData modelObjectWithDictionary:data[@"data"]];
  197. if(baseModel.next == nil || baseModel.next.length == 0){
  198. if(self.audienceNext == nil || self.audienceNext.length == 0){
  199. //第一页
  200. self.audienceTableView.dataArr = [baseModel.userBase mutableCopy];
  201. self.memberMembers = baseModel.memberMembers;
  202. self.vipMembers = baseModel.vipMembers;
  203. self.vipMember2 = baseModel.vipMember2;
  204. self.manageMembers = baseModel.manageMembers;
  205. [self updataUIWithProperty];
  206. }
  207. else{
  208. //最后一页
  209. [self.audienceTableView toAddUserListDataWith:baseModel.userBase];
  210. }
  211. self.audienceNext = @"";
  212. [self.audienceTableView.mj_footer endRefreshingWithNoMoreData];
  213. }
  214. else{
  215. if(self.audienceNext == nil || self.audienceNext.length == 0){
  216. self.memberMembers = baseModel.memberMembers;
  217. self.vipMembers = baseModel.vipMembers;
  218. self.vipMember2 = baseModel.vipMember2;
  219. self.manageMembers = baseModel.manageMembers;
  220. [self updataUIWithProperty];
  221. }
  222. self.audienceNext = baseModel.next;
  223. [self.audienceTableView toAddUserListDataWith:baseModel.userBase];
  224. }
  225. self.audienceTableView.theVipNum = self.vipMembers;
  226. [self.audienceTableView reloadData];
  227. self.audienceTableView.mj_footer.hidden = (self.audienceTableView.dataArr.count > 0) ? NO : YES;
  228. }
  229. else{
  230. kShowNetError(data)
  231. }
  232. }];
  233. }
  234. - (void)updataUIWithProperty{
  235. // MORtmJosnEntity *jsonEntity = (MORtmJosnEntity *)self.roomStatusEntity.data;
  236. // self.audienceNumLab.text = [NSString stringWithFormat:@"%.f",jsonEntity.v];
  237. // self.vipNumLab.text = [NSString stringWithFormat:@"%.f",jsonEntity.m];
  238. self.audienceNumLab.text = [NSString stringWithFormat:@"%.f",self.memberMembers];
  239. self.vipNumLab.text = [NSString stringWithFormat:@"%.f",self.vipMember2];
  240. }
  241. - (void)getVipHttpDataWith:(NSDictionary *)dict{
  242. WEAKSELF
  243. [kHttpManager toGetJoinManagesAboutLiveWithParams:dict andBlock:^(id _Nonnull data, NSError * _Nonnull error) {
  244. __strong typeof(weakSelf) self = weakSelf;
  245. [self.vipTableView.mj_footer endRefreshing];
  246. if(kCode_Success){
  247. MOLogV(@"%@",[[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:data options:0 error:nil] encoding:NSUTF8StringEncoding]);
  248. MOLiveMemberData *baseModel = [MOLiveMemberData modelObjectWithDictionary:data[@"data"]];
  249. if(baseModel.next == nil || baseModel.next.length == 0){
  250. if(self.vipNext == nil || self.vipNext.length == 0){
  251. //第一页
  252. self.vipTableView.dataArr = [baseModel.userBase mutableCopy];
  253. }
  254. else{
  255. //最后一页
  256. //最后一页
  257. [self.vipTableView toAddUserListDataWith:baseModel.userBase];
  258. }
  259. self.vipNext = @"";
  260. [self.vipTableView.mj_footer endRefreshingWithNoMoreData];
  261. }
  262. else{
  263. self.vipNext = baseModel.next;
  264. [self.vipTableView toAddUserListDataWith:baseModel.userBase];
  265. }
  266. [self.vipTableView reloadData];
  267. self.vipTableView.mj_footer.hidden = (self.audienceTableView.dataArr.count > 0) ? NO : YES;
  268. }
  269. else{
  270. kShowNetError(data)
  271. }
  272. }];
  273. }
  274. - (void)getManagerHttpDataWith:(NSDictionary *)dict{
  275. WEAKSELF
  276. [kHttpManager toGetJoinManagesAboutLiveWithParams:dict andBlock:^(id _Nonnull data, NSError * _Nonnull error) {
  277. __strong typeof(weakSelf) self = weakSelf;
  278. if(kCode_Success){
  279. MOLogV(@"%@",[[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:data options:0 error:nil] encoding:NSUTF8StringEncoding]);
  280. MOLiveMemberData *baseModel = [MOLiveMemberData modelObjectWithDictionary:data[@"data"]];
  281. self.vipTableView.dataArr = [baseModel.userBase mutableCopy];
  282. [self.vipTableView reloadData];
  283. }
  284. else{
  285. kShowNetError(data)
  286. }
  287. }];
  288. }
  289. - (IBAction)changeListClick:(UIButton *)sender {
  290. if(self.vipListView.isShow){
  291. [self.vipListView dismissLiveVipListView];
  292. }
  293. if(sender == self.audienceBtn){
  294. //观众列表
  295. self.selectIndex = 0;
  296. }
  297. else if (sender == self.vipBtn){
  298. //贡献榜列表
  299. self.selectIndex = 1;
  300. }
  301. else{
  302. //VIP 列表
  303. self.selectIndex = 2;
  304. }
  305. }
  306. - (void)setSelectIndex:(NSInteger)selectIndex{
  307. UIButton *oldBtn = [self viewWithTag:(_selectIndex + 90)];
  308. oldBtn.selected = NO;
  309. [oldBtn setFont:[MOTextTools poppinsMediumFont:16.0]];
  310. UIButton *newBtn = [self viewWithTag:(selectIndex + 90)];
  311. newBtn.selected = YES;
  312. [newBtn setFont:[MOTextTools poppinsBoldFont:16.0]];
  313. _selectIndex = selectIndex;
  314. CGFloat baseWidth = (SCREENWIDTH - self.stackRightNum) / 4.0;
  315. if(selectIndex == 0){
  316. [self.lineView mas_updateConstraints:^(MASConstraintMaker *make) {
  317. make.centerX.equalTo(self.btnBgStack.mas_centerX).offset(baseWidth * -1.0);
  318. }];
  319. self.audienceTableView.hidden = NO;
  320. self.contributionView.hidden = YES;
  321. self.vipTableView.hidden = YES;
  322. [self.audienceNumLab setTextColor:kBaseTextColor_1];
  323. [self.contributionNumLab setTextColor:kBaseTextColor_3];
  324. [self.vipNumLab setTextColor:kBaseTextColor_3];
  325. }
  326. else if (selectIndex == 1){
  327. [self.lineView mas_updateConstraints:^(MASConstraintMaker *make) {
  328. make.centerX.equalTo(self.btnBgStack.mas_centerX).offset(baseWidth * 1.0);
  329. }];
  330. self.audienceTableView.hidden = YES;
  331. self.contributionView.hidden = YES;
  332. self.vipTableView.hidden = NO;
  333. [self.audienceNumLab setTextColor:kBaseTextColor_3];
  334. [self.contributionNumLab setTextColor:kBaseTextColor_3];
  335. [self.vipNumLab setTextColor:kBaseTextColor_1];
  336. }
  337. else{
  338. [self.lineView mas_updateConstraints:^(MASConstraintMaker *make) {
  339. make.centerX.equalTo(self.btnBgStack.mas_centerX).offset(baseWidth * 2.0);
  340. }];
  341. self.audienceTableView.hidden = YES;
  342. self.contributionView.hidden = NO;
  343. self.vipTableView.hidden = YES;
  344. [self.audienceNumLab setTextColor:kBaseTextColor_3];
  345. [self.contributionNumLab setTextColor:kBaseTextColor_3];
  346. [self.vipNumLab setTextColor:kBaseTextColor_3];
  347. }
  348. [UIView animateWithDuration:0.3 animations:^
  349. {
  350. [self layoutIfNeeded];
  351. }];
  352. }
  353. - (IBAction)dismissBtnClick:(id)sender {
  354. //隐藏
  355. [self dismissListView];
  356. }
  357. - (IBAction)inviteBtnClick:(id)sender {
  358. //邀请
  359. self.inviteBlock ? self.inviteBlock() : nil;
  360. [self dismissListView];
  361. }
  362. - (void)showListView{
  363. self.frame = CGRectMake(0, 0, SCREENWIDTH, SCREENHEIGHT);
  364. CGRect actionViewRect = self.bgView.frame;
  365. actionViewRect.origin.y = SCREENHEIGHT;
  366. self.bgView.frame = actionViewRect;
  367. WEAKSELF
  368. [UIView animateWithDuration:0.3 animations:^{
  369. CGRect actionViewRect = weakSelf.bgView.frame;
  370. actionViewRect.origin.y = SCREENHEIGHT - 560;
  371. weakSelf.bgView.frame = actionViewRect;
  372. }];
  373. //不能滑动
  374. SendNotification(@"MOShowLivePagesVCCannotScroll")
  375. }
  376. - (void)dismissListView{
  377. //完成下移动画
  378. WEAKSELF
  379. [UIView animateWithDuration:0.3 animations:^
  380. {
  381. CGRect actionSheetViewRect = weakSelf.bgView.frame;
  382. actionSheetViewRect.origin.y = SCREENHEIGHT;
  383. weakSelf.bgView.frame = actionSheetViewRect;
  384. } completion:^(BOOL finished)
  385. {
  386. [self removeFromSuperview];
  387. }];
  388. //可以滑动
  389. SendNotification(@"MOShowLivePagesVCCanScroll")
  390. }
  391. #pragma mark - Lazy
  392. - (MOMemberTableView *)audienceTableView{
  393. if(!_audienceTableView){
  394. _audienceTableView = [[MOMemberTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
  395. _audienceTableView.backgroundColor = [UIColor clearColor];
  396. _audienceTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  397. _audienceTableView.separatorInset = UIEdgeInsetsZero;
  398. _audienceTableView.rowHeight = 76.0;
  399. _audienceTableView.listType = MOMemberListTypeAudience;
  400. WEAKSELF
  401. _audienceTableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
  402. if(weakSelf.audienceNext.length == 0){
  403. return;
  404. }
  405. NSDictionary *audiencePage = @{@"size":@(kPageSize),@"next":weakSelf.audienceNext};
  406. NSDictionary *audienceDict = @{@"page":audiencePage,
  407. @"roomId":weakSelf.roomId};
  408. [weakSelf getAudienceHttpDataWith:audienceDict];
  409. }];
  410. _audienceTableView.mj_footer.hidden = YES;
  411. }
  412. return _audienceTableView;
  413. }
  414. - (MOMemberTableView *)vipTableView{
  415. if(!_vipTableView){
  416. _vipTableView = [[MOMemberTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
  417. _vipTableView.backgroundColor = [UIColor clearColor];
  418. _vipTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  419. _vipTableView.separatorInset = UIEdgeInsetsZero;
  420. _vipTableView.rowHeight = 76.0;
  421. //UI逻辑改动, 现在这里是管理员列表
  422. _vipTableView.listType = MOMemberListTypeAdmin;
  423. WEAKSELF
  424. _vipTableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
  425. if(weakSelf.audienceNext.length == 0){
  426. return;
  427. }
  428. NSDictionary *audiencePage = @{@"size":@(kPageSize),@"next":weakSelf.vipNext};
  429. NSDictionary *audienceDict = @{@"page":audiencePage,
  430. @"roomId":weakSelf.roomId};
  431. [weakSelf getAudienceHttpDataWith:audienceDict];
  432. }];
  433. _vipTableView.mj_footer.hidden = YES;
  434. }
  435. return _vipTableView;
  436. }
  437. - (MORoomContriView *)contributionView{
  438. if(!_contributionView){
  439. _contributionView = [[MORoomContriView alloc] init];
  440. }
  441. return _contributionView;
  442. }
  443. - (UIImageView *)lineView{
  444. if (_lineView == nil){
  445. _lineView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 40.0, 2.0)];
  446. NSArray *colorArr = @[[MOTools colorWithHexString:@"#4363FF" alpha:1.0],[MOTools colorWithHexString:@"#4363FF" alpha:1.0]];
  447. UIImage *image = [MOTools createGradientRectImageWithBounds:CGRectMake(0, 0, 40.0, 2.0) Colors:colorArr GradientType:0];
  448. [_lineView setImage:image];
  449. _lineView.layer.cornerRadius = 2.0 / 2.0;
  450. _lineView.layer.masksToBounds = YES;
  451. }
  452. return _lineView;
  453. }
  454. - (MOLiveVipListView *)vipListView{
  455. if(!_vipListView){
  456. _vipListView = [MOLiveVipListView moLiveVipListView];
  457. }
  458. return _vipListView;
  459. }
  460. @end