12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- //
- // XYAboutViewModel.m
- // Timi
- //
- // Created by 翟玉磊 on 2021/4/13.
- //
- #import "XYAboutViewModel.h"
- @implementation XYAboutViewModel
- - (instancetype)init
- {
- self = [super init];
- if (self) {
- if ([ZYLService currentService].environment == ZYLServiceEnvironmentTest || [ZYLService currentService].environment == ZYLServiceEnvironmentDevelop || [ZYLService currentService].environment == ZYLServiceEnvironmentTestGy) {
- self.developmentMode = YES;
- }
- }
- return self;
- }
- - (void)initValue {
-
- [self.dataSource removeAllObjects];
-
- if (!ApplicationDelegate.isVersionStatus) {
- EmptyCellModel *updateModel = [EmptyCellModel createModelWithIsShowTopLine:NO isShowBottomLine:NO cellHeight:44];
- updateModel.title = @"软件更新";
- [self.dataSource addObject:updateModel];
- }
-
- if (self.developmentMode) {
- EmptyCellModel *developmentModel = [EmptyCellModel createModelWithIsShowTopLine:YES isShowBottomLine:YES cellHeight:44];
- developmentModel.title = @"开发模式";
- [self.dataSource addObject:developmentModel];
- }
- }
- - (void)loadData:(SuccessHandler)success failure:(FailureHandler)failure {
-
- [self initValue];
- !success?:success(self.dataSource);
- }
- @end
|