YMHomePageViewModel.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. //
  2. // YMHomePageViewModel.m
  3. // MSYOUPAI
  4. //
  5. // Created by YoMi on 2024/2/4.
  6. // Copyright © 2024 MS. All rights reserved.
  7. //
  8. #import "YMHomePageViewModel.h"
  9. #import "YMAdvertModel.h"
  10. #import "YMAdolescentModelViewModel.h"
  11. @interface YMHomePageViewModel ()
  12. /// 首页BannerVM
  13. @property (nonatomic, strong, readwrite) YMHomePageBannerViewModel *bannerVM;
  14. /// 首页ViewModel列表
  15. @property (nonatomic, strong, readwrite) NSArray <YMHomePageListViewModel *>*homePageVMListDataArray;
  16. ///// 推荐VM
  17. //@property (nonatomic, strong,readwrite) YMHomePageListViewModel *recommendVM;
  18. /////男神VM
  19. //@property (nonatomic, strong,readwrite) YMHomePageListViewModel *maleGoldVM;
  20. ///// 在线VM
  21. //@property (nonatomic, strong,readwrite) YMHomePageListViewModel *onlineVM;
  22. ///// 同城
  23. //@property (nonatomic, strong,readwrite) YMHomePageListViewModel *sameCityVM;
  24. ///// 推荐for男性(登录男号)
  25. //@property (nonatomic, strong,readwrite) YMHomePageListViewModel *recommendForMaleVM;
  26. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeIndexVM;
  27. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeSkillAnchorsVM;
  28. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeRecommendAnchorsVM;
  29. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeRecommendVM;
  30. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeWCWVM;
  31. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeOnlineListVM;
  32. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeOnlineVM;
  33. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeGetDesignatedVM;
  34. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeGetSameCityUserVM;
  35. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeActiveAnchorsVM;
  36. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeNewAnchorsVM;
  37. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeCityAnchorsVM;
  38. @property (nonatomic, strong,readwrite) YMHomePageListViewModel *homeBannerVM;
  39. @end
  40. @implementation YMHomePageViewModel
  41. - (void)ym_initialize{
  42. [super ym_initialize];
  43. if(self.isFemaleGender){
  44. self.homePageVMListDataArray = @[
  45. self.homeWCWVM,
  46. self.homeGetDesignatedVM,
  47. self.homeOnlineVM,
  48. self.homeRecommendVM,
  49. ];
  50. } else {
  51. self.homePageVMListDataArray = @[
  52. self.homeWCWVM,
  53. self.homeGetDesignatedVM,
  54. self.homeOnlineVM,
  55. ];
  56. }
  57. }
  58. - (void)judgementsIsOpenAdolescentModel{
  59. [self getAdolescentModelStatusData];
  60. // //先判断是否设置了青少年模式
  61. // kAppDelegate.kadolescentStatus = [LCSaveData getYoungMode];
  62. // if(kAppDelegate.kadolescentStatus == 1){
  63. // [self closeAdolescentModelPopup];
  64. // }else{
  65. // ///在判断是否提醒过
  66. // ///检查更新 根据时间戳 设定12小时/一天之内调用一次
  67. // NSString* updateTime = [LCSaveData getYoungNoticeTime];
  68. // NSDate * newData = [NSDate date];
  69. // NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  70. // [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
  71. // if (!updateTime) {
  72. // NSString* dataString = [dateFormatter stringFromDate:newData];
  73. // [LCSaveData saveYoungNoticeTime:dataString];
  74. // ///弹出设置青少年模式弹窗
  75. // ///要不要检查一下status 防止卸载后重装
  76. // [self getAdolescentModelStatusData];
  77. //
  78. // }else{
  79. // //获取与当前的时间差
  80. // NSDate *timeDate = [dateFormatter dateFromString:updateTime];
  81. // NSTimeInterval timeInterval = [timeDate timeIntervalSinceNow];
  82. // timeInterval = -timeInterval;
  83. // //超过30天
  84. // if (timeInterval > 60 * 60 * 24) {
  85. // NSString* dataString = [dateFormatter stringFromDate:newData];
  86. // [LCSaveData saveYoungNoticeTime:dataString];
  87. // //弹出青少年模式弹窗
  88. // [self openAdolescentModelPopup];
  89. // }
  90. // }
  91. // }
  92. }
  93. - (void)getAdolescentModelStatusData {
  94. [LCHttpHelper requestWithURLString:GetAdolescentStatus parameters:@{} needToken:YES type:HttpRequestTypePost success:^(id responseObject) {
  95. NSDictionary* dict = (NSDictionary*)responseObject;
  96. NSInteger code = [[dict objectForKey:@"code"] integerValue];
  97. if (code == 0) {
  98. NSDictionary *data = [dict dictionaryValueForKey:@"data" defaultValue:@{}];
  99. NSInteger adoleStatus = [data integerValueForKey:@"is_set_adolescent" defaultValue:0];
  100. [LCSaveData saveYoungMode:adoleStatus];
  101. if(adoleStatus == 1){
  102. [self closeAdolescentModelPopup];
  103. }else{
  104. ///在判断是否提醒过
  105. ///检查更新 根据时间戳 设定12小时/一天之内调用一次
  106. NSString* updateTime = [LCSaveData getYoungNoticeTime];
  107. NSDate * newData = [NSDate date];
  108. NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  109. [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
  110. if (!updateTime) {
  111. NSString* dataString = [dateFormatter stringFromDate:newData];
  112. [LCSaveData saveYoungNoticeTime:dataString];
  113. ///弹出设置青少年模式弹窗
  114. ///要不要检查一下status 防止卸载后重装
  115. }else{
  116. //获取与当前的时间差
  117. NSDate *timeDate = [dateFormatter dateFromString:updateTime];
  118. NSTimeInterval timeInterval = [timeDate timeIntervalSinceNow];
  119. timeInterval = -timeInterval;
  120. //超过30天
  121. if (timeInterval > 60 * 60 * 24) {
  122. NSString* dataString = [dateFormatter stringFromDate:newData];
  123. [LCSaveData saveYoungNoticeTime:dataString];
  124. //弹出青少年模式弹窗
  125. [self openAdolescentModelPopup];
  126. }
  127. }
  128. }
  129. }else{
  130. [ZCHUDHelper showTitle:[dict stringValueForKey:@"message" defaultValue:@""]];
  131. }
  132. } failure:^(NSError *error) {
  133. [ZCHUDHelper showTitle:error.localizedDescription];
  134. }];
  135. }
  136. - (void)zhidingData{
  137. [LCHttpHelper requestWithURLString:HomeZhiDing parameters:@{} needToken:YES type:HttpRequestTypePost success:^(id responseObject) {
  138. NSDictionary* dict = (NSDictionary*)responseObject;
  139. NSInteger code = [[dict objectForKey:@"code"] integerValue];
  140. if (code == 0) {
  141. NSDictionary *dataDic = [dict dictionaryValueForKey:@"data" defaultValue:@{}];
  142. NSString *str = [dataDic objectForKey:@"msg"];
  143. [ZCHUDHelper showTitle:[NSString stringWithFormat:@"置顶成功,%@",str]];
  144. if(self.refreshHomeListData){
  145. self.refreshHomeListData();
  146. }
  147. }
  148. } failure:^(NSError *error) {
  149. }];
  150. }
  151. - (void)getAdvertData{
  152. [LCHttpHelper requestWithURLString:GetAdvert parameters:@{
  153. @"source_id":@"2"
  154. } needToken:YES type:HttpRequestTypePost success:^(id responseObject) {
  155. NSDictionary* dict = (NSDictionary*)responseObject;
  156. NSInteger code = [[dict objectForKey:@"code"] integerValue];
  157. if (code == 0) {
  158. NSDictionary *data = [dict dictionaryValueForKey:@"data" defaultValue:@{}];
  159. YMAdvertModel *model = [YMAdvertModel yy_modelWithJSON:[data dictionaryValueForKey:@"advert" defaultValue:@{}]];
  160. NSInteger link_type = [dict[@"data"][@"advert"][@"link_type"] integerValue];
  161. NSString *link_url = dict[@"data"][@"advert"][@"link_url"];
  162. NSInteger window_type = [dict[@"data"][@"advert"][@"window_type"] integerValue];
  163. if (model.status == 1 && model.image.length>5) {
  164. if (window_type == 2) {
  165. // YOUPAIHRWebWindow *window = [[YOUPAIHRWebWindow alloc] init];
  166. // window.isTouchDismiss = YES;
  167. // window.youpaipurl = dict[@"data"][@"advert"][@"window_link"];
  168. // window.youpaipwidth = [dict[@"data"][@"advert"][@"width"] floatValue];
  169. // window.youpaipheight = [dict[@"data"][@"advert"][@"height"] floatValue];
  170. // window.youpaipgravity = dict[@"data"][@"advert"][@"gravity"];
  171. // [self TFPresentVC:window completion:^{}];
  172. }else{
  173. // YOUPAIZYAdvertWindow *VC= [[YOUPAIZYAdvertWindow alloc]init];
  174. // VC.youpaipdelegate = self;
  175. // VC.vWidth = KScreenWidth -30;
  176. // VC.vHeight = KScreenWidth-30;
  177. // VC.youpaipimageurl = image;
  178. // VC.youpaiplink_type = link_type;
  179. // VC.youpaiplink_url = link_url;
  180. // VC.isTouchDismiss = YES;
  181. // [self TFPresentVC:VC completion:^{}];
  182. }
  183. }
  184. }
  185. } failure:^(NSError *error) {
  186. }];
  187. }
  188. /// 获取等级图标数据
  189. - (void)getLevelIconData{
  190. [LCHttpHelper requestWithURLString:LevelInfo parameters:@{} needToken:YES type:HttpRequestTypePost success:^(id responseObject) {
  191. NSDictionary* dict = (NSDictionary*)responseObject;
  192. NSInteger code = [[dict objectForKey:@"code"] integerValue];
  193. if (code == 0) {
  194. NSDictionary *data = [dict dictionaryValueForKey:@"data" defaultValue:@{}];
  195. [LCSaveData saveLevelInfo:data];
  196. }
  197. } failure:^(NSError *error) {
  198. }];
  199. }
  200. /// 获取徽章和贵族图标数据
  201. - (void)getBadgesAndNobilityIconData{
  202. [LCHttpHelper requestWithURLString:AllBadge parameters:@{} needToken:YES type:HttpRequestTypePost success:^(id responseObject) {
  203. NSDictionary* dict = (NSDictionary*)responseObject;
  204. NSInteger code = [[dict objectForKey:@"code"] integerValue];
  205. if (code == 0) {
  206. NSDictionary *data = [dict dictionaryValueForKey:@"data" defaultValue:@{}];
  207. NSDictionary* badge = [data dictionaryValueForKey:@"badge" defaultValue:@{}];
  208. NSDictionary* noble = [data dictionaryValueForKey:@"noble" defaultValue:@{}];
  209. [LCSaveData saveBadgeInfo:badge];
  210. [LCSaveData saveNobleInfo:noble];
  211. }
  212. } failure:^(NSError *error) {
  213. }];
  214. }
  215. - (void)gotoSearchUser{
  216. YMSearchUserViewModel *searchUserVM = [[YMSearchUserViewModel alloc]initWithParams:@{}];
  217. [YMRouter openURL:stringFormat(@"%@%@",YM_ROUTER_URL_PREFIX,YM_ROUTER_SEARCH_USER) withUserInfo:@{
  218. RouterViewModel:searchUserVM
  219. } completion:nil];
  220. }
  221. - (void)openAdolescentModelPopup{
  222. YMOpenAdolescentModelPopupView *customView = [[YMOpenAdolescentModelPopupView alloc]init];
  223. YMPopupView *popupView = [YMPopupView initWithCustomView:customView parentView:nil popStyle:YMPopupStyleFade dismissStyle:YMDismissStyleFade];
  224. popupView.priority = 998;
  225. popupView.cornerRadius = adapt(10);
  226. popupView.rectCorners = UIRectCornerAllCorners;
  227. popupView.positionStyle = YMPositionStyleCenter;
  228. popupView.isHideBg = NO;
  229. popupView.bgAlpha = 0.3;
  230. @weakify(popupView)
  231. customView.noMoreRemindersButtonBlock = ^{
  232. @strongify(popupView)
  233. [popupView dismissWithStyle:YMDismissStyleFade duration:2.0];
  234. };
  235. customView.gotoAdolescentModelButtonBlock = ^{
  236. @strongify(popupView)
  237. [popupView dismissWithStyle:YMDismissStyleFade duration:2.0];
  238. YMAdolescentModelViewModel *adolescentModelVM = [[YMAdolescentModelViewModel alloc]initWithParams:@{
  239. ParamsCategoryType:@(YMAdolescentModelTypeSettingPassword)
  240. }];
  241. [YMRouter openURL:stringFormat(@"%@%@", YM_ROUTER_URL_PREFIX, YM_ROUTER_ADOLESCENT_MODEL) withUserInfo:@{
  242. RouterViewModel:adolescentModelVM
  243. } completion:nil];
  244. };
  245. [popupView pop];
  246. }
  247. - (void)closeAdolescentModelPopup{
  248. YMCloseAdolescentModelPopupView *customView = [[YMCloseAdolescentModelPopupView alloc]init];
  249. YMPopupView *popupView = [YMPopupView initWithCustomView:customView parentView:nil popStyle:YMPopupStyleFade dismissStyle:YMDismissStyleFade];
  250. popupView.priority = 998;
  251. popupView.cornerRadius = adapt(10);
  252. popupView.rectCorners = UIRectCornerAllCorners;
  253. popupView.positionStyle = YMPositionStyleCenter;
  254. popupView.isHideBg = NO;
  255. popupView.bgAlpha = 0.3;
  256. @weakify(popupView)
  257. customView.openOrCloseAdolescentModelButtonBlock = ^{
  258. @strongify(popupView)
  259. [popupView dismissWithStyle:YMDismissStyleFade duration:2.0];
  260. YMAdolescentModelViewModel *adolescentModelVM = [[YMAdolescentModelViewModel alloc]initWithParams:@{
  261. ParamsCategoryType:@(YMAdolescentModelTypeClosePassword)
  262. }];
  263. [YMRouter openURL:stringFormat(@"%@%@", YM_ROUTER_URL_PREFIX, YM_ROUTER_ADOLESCENT_MODEL) withUserInfo:@{
  264. RouterViewModel:adolescentModelVM
  265. } completion:nil];
  266. };
  267. customView.forgotPasswordBlock = ^{
  268. @strongify(popupView)
  269. [popupView dismissWithStyle:YMDismissStyleFade duration:2.0];
  270. };
  271. [popupView pop];
  272. }
  273. - (YMHomePageBannerViewModel *)bannerVM{
  274. if (!_bannerVM) {
  275. _bannerVM = [[YMHomePageBannerViewModel alloc]initWithParams:@{}];
  276. }
  277. return _bannerVM;
  278. }
  279. //- (YMHomePageListViewModel *)recommendVM{
  280. // if (!_recommendVM) {
  281. // _recommendVM = [[YMHomePageListViewModel alloc]initWithParams:@{
  282. // ParamsCategoryType:@(YMHomePageCategoryTypeRecommend)
  283. // }];
  284. // }
  285. // return _recommendVM;
  286. //}
  287. //
  288. //- (YMHomePageListViewModel *)maleGoldVM{
  289. // if (!_maleGoldVM) {
  290. // _maleGoldVM = [[YMHomePageListViewModel alloc]initWithParams:@{
  291. // ParamsCategoryType:@(YMHomePageCategoryTypeMaleGold)
  292. // }];
  293. // }
  294. // return _maleGoldVM;
  295. //}
  296. //
  297. //- (YMHomePageListViewModel *)onlineVM{
  298. // if (!_onlineVM) {
  299. // _onlineVM = [[YMHomePageListViewModel alloc]initWithParams:@{
  300. // ParamsCategoryType:@(YMHomePageCategoryTypeOnline)
  301. // }];
  302. // }
  303. // return _onlineVM;
  304. //}
  305. //
  306. //- (YMHomePageListViewModel *)sameCityVM{
  307. // if (!_sameCityVM) {
  308. // _sameCityVM = [[YMHomePageListViewModel alloc]initWithParams:@{
  309. // ParamsCategoryType:@(YMHomePageCategoryTypeSameCity)
  310. // }];
  311. // }
  312. // return _sameCityVM;
  313. //}
  314. //
  315. //- (YMHomePageListViewModel *)recommendForMaleVM{
  316. // if (!_recommendForMaleVM) {
  317. // _recommendForMaleVM = [[YMHomePageListViewModel alloc]initWithParams:@{
  318. // ParamsCategoryType:@(YMHomePageCategoryTypeRecommendForMale)
  319. // }];
  320. // }
  321. // return _recommendForMaleVM;
  322. //}
  323. - (YMHomePageListViewModel *)homeIndexVM {
  324. if (!_homeIndexVM) {
  325. _homeIndexVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeIndex)}];
  326. _homeIndexVM.tabTitle = @"";
  327. _homeIndexVM.tabURLStr = HomeIndex;
  328. }
  329. return _homeIndexVM;
  330. }
  331. - (YMHomePageListViewModel *)homeSkillAnchorsVM {
  332. if (!_homeSkillAnchorsVM) {
  333. _homeSkillAnchorsVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeSkillAnchors)}];
  334. _homeSkillAnchorsVM.tabTitle = @"";
  335. _homeSkillAnchorsVM.tabURLStr = HomeSkillAnchors;
  336. }
  337. return _homeSkillAnchorsVM;
  338. }
  339. - (YMHomePageListViewModel *)homeRecommendAnchorsVM {
  340. if (!_homeRecommendAnchorsVM) {
  341. _homeRecommendAnchorsVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeRecommendAnchors)}];
  342. _homeRecommendAnchorsVM.tabTitle = @"";
  343. _homeRecommendAnchorsVM.tabURLStr = HomeRecommendAnchors;
  344. }
  345. return _homeRecommendAnchorsVM;
  346. }
  347. - (YMHomePageListViewModel *)homeRecommendVM {
  348. if (!_homeRecommendVM) {
  349. _homeRecommendVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeRecommend)}];
  350. _homeRecommendVM.tabTitle = @"";
  351. _homeRecommendVM.tabURLStr = HomeRecommend;
  352. }
  353. return _homeRecommendVM;
  354. }
  355. - (YMHomePageListViewModel *)homeWCWVM {
  356. if (!_homeWCWVM) {
  357. _homeWCWVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeWCW)}];
  358. _homeWCWVM.tabTitle = @"";
  359. _homeWCWVM.tabURLStr = HomeWCW;
  360. }
  361. return _homeWCWVM;
  362. }
  363. - (YMHomePageListViewModel *)homeOnlineListVM {
  364. if (!_homeOnlineListVM) {
  365. _homeOnlineListVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeOnlineList)}];
  366. _homeOnlineListVM.tabTitle = @"";
  367. _homeOnlineListVM.tabURLStr = HomeOnlineList;
  368. }
  369. return _homeOnlineListVM;
  370. }
  371. - (YMHomePageListViewModel *)homeOnlineVM {
  372. if (!_homeOnlineVM) {
  373. _homeOnlineVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeOnline)}];
  374. _homeOnlineVM.tabTitle = @"";
  375. _homeOnlineVM.tabURLStr = HomeOnline;
  376. }
  377. return _homeOnlineVM;
  378. }
  379. - (YMHomePageListViewModel *)homeGetDesignatedVM {
  380. if (!_homeGetDesignatedVM) {
  381. _homeGetDesignatedVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeGetDesignated)}];
  382. _homeGetDesignatedVM.tabTitle = @"";
  383. _homeGetDesignatedVM.tabURLStr = HomeGetDesignated;
  384. }
  385. return _homeGetDesignatedVM;
  386. }
  387. - (YMHomePageListViewModel *)homeGetSameCityUserVM {
  388. if (!_homeGetSameCityUserVM) {
  389. _homeGetSameCityUserVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeGetSameCityUser)}];
  390. _homeGetSameCityUserVM.tabTitle = @"";
  391. _homeGetSameCityUserVM.tabURLStr = HomeGetSameCityUser;
  392. }
  393. return _homeGetSameCityUserVM;
  394. }
  395. - (YMHomePageListViewModel *)homeActiveAnchorsVM {
  396. if (!_homeActiveAnchorsVM) {
  397. _homeActiveAnchorsVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeActiveAnchors)}];
  398. _homeActiveAnchorsVM.tabTitle = @"";
  399. _homeActiveAnchorsVM.tabURLStr = HomeActiveAnchors;
  400. }
  401. return _homeActiveAnchorsVM;
  402. }
  403. - (YMHomePageListViewModel *)homeNewAnchorsVM {
  404. if (!_homeNewAnchorsVM) {
  405. _homeNewAnchorsVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeNewAnchors)}];
  406. _homeNewAnchorsVM.tabTitle = @"";
  407. _homeNewAnchorsVM.tabURLStr = HomeNewAnchors;
  408. }
  409. return _homeNewAnchorsVM;
  410. }
  411. - (YMHomePageListViewModel *)homeCityAnchorsVM {
  412. if (!_homeCityAnchorsVM) {
  413. _homeCityAnchorsVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeCityAnchors)}];
  414. _homeCityAnchorsVM.tabTitle = @"";
  415. _homeCityAnchorsVM.tabURLStr = HomeCityAnchors;
  416. }
  417. return _homeCityAnchorsVM;
  418. }
  419. - (YMHomePageListViewModel *)homeBannerVM {
  420. if (!_homeBannerVM) {
  421. _homeBannerVM = [[YMHomePageListViewModel alloc] initWithParams:@{ParamsCategoryType: @(YMHomePageCategoryTypeHomeBanner)}];
  422. _homeBannerVM.tabTitle = @"";
  423. _homeBannerVM.tabURLStr = HomeBanner;
  424. }
  425. return _homeBannerVM;
  426. }
  427. @end