120 lines
2.7 KiB
Objective-C
120 lines
2.7 KiB
Objective-C
//
|
|
// TFCheckSettingModel.m
|
|
// TFReader
|
|
//
|
|
// Created by 谢腾飞 on 2020/12/11.
|
|
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
|
//
|
|
|
|
#import "TFCheckSettingModel.h"
|
|
|
|
@implementation TFCheckSettingModel
|
|
|
|
+ (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
|
|
return @{
|
|
@"ad_status_setting" : [AdStatusSetting class],
|
|
@"system_setting" : [SystemSetting class],
|
|
@"version_update" : [VersionUpdate class],
|
|
@"start_page" : [StartPage class],
|
|
@"protocol_list" : TFProtocolListModel.class
|
|
};
|
|
}
|
|
|
|
+ (NSDictionary *)modelCustomPropertyMapper {
|
|
return @{
|
|
@"wechatTokenURL" : @"wechat_api_url"
|
|
};
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
@implementation AdStatusSetting
|
|
|
|
+ (NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
|
{
|
|
return @{
|
|
@"ad_page_num" : @"book_read_gap"
|
|
};
|
|
}
|
|
|
|
- (BOOL)chapter_read_bottom
|
|
{
|
|
if ([TFNetworkManager networkingStatus]) {
|
|
return _chapter_read_bottom;
|
|
} else {
|
|
return NO;
|
|
}
|
|
}
|
|
|
|
- (BOOL)chapter_read_end
|
|
{
|
|
if ([TFNetworkManager networkingStatus]) {
|
|
return _chapter_read_end;
|
|
} else {
|
|
return NO;
|
|
}
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation SystemSetting
|
|
|
|
@end
|
|
|
|
@implementation VersionUpdate
|
|
|
|
@end
|
|
|
|
@implementation StartPage
|
|
|
|
@end
|
|
|
|
@implementation TFProtocolListModel
|
|
|
|
- (NSString *)user {
|
|
if (_user) {
|
|
if ([_user containsString:@"?"]) {
|
|
return [_user stringByAppendingFormat:@"&language=%@", TFLanguageManager.serverLocalized];
|
|
} else {
|
|
return [_user stringByAppendingFormat:@"?language=%@", TFLanguageManager.serverLocalized];
|
|
}
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
- (NSString *)logoff {
|
|
if (_logoff) {
|
|
if ([_privacy containsString:@"?"]) {
|
|
return [_logoff stringByAppendingFormat:@"&language=%@", TFLanguageManager.serverLocalized];
|
|
} else {
|
|
return [_logoff stringByAppendingFormat:@"?language=%@", TFLanguageManager.serverLocalized];
|
|
}
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
- (NSString *)privacy {
|
|
if (_privacy) {
|
|
if ([_privacy containsString:@"?"]) {
|
|
return [_privacy stringByAppendingFormat:@"&language=%@", TFLanguageManager.serverLocalized];
|
|
} else {
|
|
return [_privacy stringByAppendingFormat:@"?language=%@", TFLanguageManager.serverLocalized];
|
|
}
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
- (NSString *)notify {
|
|
if (_notify) {
|
|
if ([_notify containsString:@"?"]) {
|
|
return [_notify stringByAppendingFormat:@"&language=%@", TFLanguageManager.serverLocalized];
|
|
} else {
|
|
return [_notify stringByAppendingFormat:@"?language=%@", TFLanguageManager.serverLocalized];
|
|
}
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
@end
|