小说绘上架版本
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// TFColorConfig.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFColorConfig_h
|
||||
#define TFColorConfig_h
|
||||
|
||||
/*
|
||||
颜色获取方法
|
||||
*/
|
||||
#define kColorRGBA(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
|
||||
|
||||
#define kColorRGB(r,g,b) kColorRGBA(r,g,b,1)
|
||||
|
||||
// 随机色
|
||||
#define kRandomColor kColorRGBA(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256), 1)
|
||||
|
||||
#define kColorXRGB(rgbValue) [UIColor \
|
||||
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
|
||||
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
|
||||
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1] //十六进制颜色(不带透明度)
|
||||
|
||||
/*
|
||||
色调值 命名方式 k+颜色+Color
|
||||
*/
|
||||
|
||||
// 主色调
|
||||
#define kMainColorMagicAlpha(x) kColorRGBA(255, 153, 102, x)
|
||||
|
||||
#define kMainColor kMainColorAlpha(1)
|
||||
|
||||
#define kMainColorAlpha(x) ([TFUtilsHelper isInSafetyPeriod] ? kMainColorMagicAlpha(x) : kColorRGBA(255, 153, 102, x))
|
||||
|
||||
// 颜色管理
|
||||
#define kBlackColor kColorRGBA(57, 56, 60, 1)
|
||||
|
||||
#define kWhiteColor kColorRGBA(255, 255, 255, 1)
|
||||
|
||||
#define kRedColor kColorRGBA(231, 85, 79, 1)
|
||||
|
||||
#define kGrayLineColor kColorRGBA(240, 238, 245, 1)
|
||||
|
||||
#define kGrayViewColor kColorRGBA(249, 249, 249, 1)
|
||||
|
||||
#define kGrayDeepViewColor kColorRGBA(241, 242, 241, 1)
|
||||
|
||||
#define kGrayTextColor kColorRGBA(176, 176, 176, 1)
|
||||
|
||||
#define kGrayTextLightColor kColorRGBA(153, 153, 153, 1)
|
||||
|
||||
#define KGrayTextMiddleColor kColorRGBA(102, 102, 102, 1)
|
||||
|
||||
#define kGrayTextDeepColor kColorRGBA(77, 77, 75, 1)
|
||||
|
||||
#define kBlackTransparentColor kColorRGBA(0, 0, 0, 0.5)
|
||||
|
||||
#define kBlackTransparentAlphaColor(x) kColorRGBA(0, 0, 0, x)
|
||||
|
||||
|
||||
#define HoldImage [UIImage imageNamed:@"public_hold_image"]
|
||||
|
||||
#define HoldUserAvatar [UIImage imageNamed:@"hold_user_avatar_boy"]
|
||||
|
||||
#endif /* TFColorConfig_h */
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// TFDefineConfig.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFDefineConfig_h
|
||||
#define TFDefineConfig_h
|
||||
|
||||
// 将属性转换为字符串(PS:不要在属性的get方法里调用自身)
|
||||
#define KEY_PATH(objc, property) ((void)objc.property, @(#property))
|
||||
|
||||
// 随机整数
|
||||
#define kRandom_Integer(from, to) ((NSInteger)(from + (arc4random() % (to - from + 1))))
|
||||
|
||||
// 随机小数
|
||||
#define kRandom_Float(from, to) ({\
|
||||
float result = 0.0;\
|
||||
NSInteger precision = 100;\
|
||||
CGFloat subtraction = to - from;\
|
||||
subtraction = ABS(subtraction);\
|
||||
subtraction *= precision;\
|
||||
CGFloat randomNumber = arc4random() % ((int)subtraction + 1);\
|
||||
randomNumber /= precision;\
|
||||
result = MIN(from, to) + randomNumber;\
|
||||
})
|
||||
|
||||
// NSInteger转NSString
|
||||
#define NSStringFromInteger(x) [NSString stringWithFormat:@"%zd", x]
|
||||
|
||||
// 判断对象是否为空
|
||||
#define kObjectIsEmpty(object) !( \
|
||||
([object respondsToSelector:@selector(length)] && [(NSData *)object length] > 0) || \
|
||||
([object respondsToSelector:@selector(count)] && [(NSArray *)object count] > 0) || \
|
||||
([object respondsToSelector:@selector(floatValue)] && [(id)object floatValue] != 0.0))
|
||||
|
||||
#endif /* TFDefineConfig_h */
|
||||
@@ -0,0 +1,198 @@
|
||||
//
|
||||
// TFFrameConfig.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFFrameConfig_h
|
||||
#define TFFrameConfig_h
|
||||
|
||||
// 屏幕宽高
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
|
||||
|
||||
#define SCREEN_WIDTH ([[UIScreen mainScreen] respondsToSelector:@selector(nativeBounds)]?[UIScreen mainScreen].nativeBounds.size.width/[UIScreen mainScreen].nativeScale:[UIScreen mainScreen].bounds.size.width)
|
||||
|
||||
#define SCREEN_HEIGHT ([[UIScreen mainScreen] respondsToSelector:@selector(nativeBounds)]?[UIScreen mainScreen].nativeBounds.size.height/[UIScreen mainScreen].nativeScale:[UIScreen mainScreen].bounds.size.height)
|
||||
|
||||
#else
|
||||
|
||||
#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
|
||||
#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
|
||||
|
||||
#endif
|
||||
|
||||
// iPhone X 适配 Nav 和 Tabber 高度和偏移数
|
||||
#define PUB_NAVBAR_HEIGHT (is_iPhoneX ? 88.0f : 64.0f)
|
||||
|
||||
#define PUB_NAVBAR_OFFSET (is_iPhoneX ? 24.0f : 0.0f)
|
||||
|
||||
#define PUB_TABBAR_HEIGHT (50.0f + PUB_TABBAR_OFFSET)
|
||||
|
||||
#define PUB_TABBAR_OFFSET ({\
|
||||
CGFloat temp = 0.0;\
|
||||
if (@available(iOS 11.0, *)) {\
|
||||
temp = [kRCodeSync(@([[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom)) floatValue];\
|
||||
} else {\
|
||||
temp = 0.0;\
|
||||
}\
|
||||
temp;\
|
||||
})
|
||||
|
||||
// 状态栏高度
|
||||
#define kStatusBarHeight (([[UIApplication sharedApplication] isStatusBarHidden]) ? (is_iPhoneX ? 44.0 : 20.0) : [[UIApplication sharedApplication] statusBarFrame].size.height)
|
||||
|
||||
// 固定单位
|
||||
#define kMargin 20.0f
|
||||
|
||||
#define kMoreHalfMargin 15.0f
|
||||
|
||||
#define kHalfMargin 10.0f
|
||||
|
||||
#define kQuarterMargin 5.0f
|
||||
|
||||
#define kCellLineHeight (is_iPhone6?0.5f:0.4f)
|
||||
|
||||
#define kLabelHeight 30.0f
|
||||
|
||||
#define KCellHeight 40.0f
|
||||
|
||||
#define kiPhone6W 375.0
|
||||
#define kiPhone6H 667.0
|
||||
#define kScaleX SCREEN_WIDTH / kiPhone6W
|
||||
#define kScaleY SCREEN_HEIGHT / kiPhone6H
|
||||
|
||||
// 比例高度
|
||||
#define kGeometricHeight(viewWidth, width, height) (((viewWidth) * (height)) / (width))
|
||||
|
||||
// 比例宽度
|
||||
#define kGeometricWidth(viewHeight, width, height) (((viewHeight) * (width)) / (height))
|
||||
|
||||
// 比例X坐标
|
||||
#define kLineX(x) x*kScaleX
|
||||
|
||||
// 比例Y坐标
|
||||
#define kLineY(y) y*kScaleY
|
||||
|
||||
// 小尺寸书籍宽度
|
||||
#define BOOK_WIDTH_SMALL (BOOK_WIDTH - 20)
|
||||
|
||||
// 小尺寸书籍高度
|
||||
#define BOOK_HEIGHT_SMALL (kGeometricHeight(BOOK_WIDTH_SMALL, 3, 4))
|
||||
|
||||
// 书籍宽度
|
||||
#define BOOK_WIDTH ((SCREEN_WIDTH - 4 * kHalfMargin) / 3)
|
||||
|
||||
// 书籍高度
|
||||
#define BOOK_HEIGHT kGeometricHeight(BOOK_WIDTH, 3, 4)
|
||||
|
||||
// 标题高度
|
||||
#define BOOK_CELL_TITLE_HEIGHT 40
|
||||
|
||||
/*
|
||||
Font
|
||||
*/
|
||||
// 字体适配
|
||||
#define kFont(value) [UIFont systemFontOfSize:value * kScaleX]
|
||||
|
||||
// 粗字体适配
|
||||
#define kBoldFont(value) [UIFont boldSystemFontOfSize:value * kScaleX]
|
||||
|
||||
#define kMainFont [UIFont systemFontOfSize:kFontSize14]
|
||||
|
||||
#define kBoldMainFont kBoldFont14
|
||||
|
||||
// 字号偏移量
|
||||
|
||||
#define kFontOffset (is_iPhoneX_Max?2.0f:1.0f)
|
||||
|
||||
#define kFont5 [UIFont systemFontOfSize:kFontSize5]
|
||||
#define kFont6 [UIFont systemFontOfSize:kFontSize6]
|
||||
#define kFont7 [UIFont systemFontOfSize:kFontSize7]
|
||||
#define kFont8 [UIFont systemFontOfSize:kFontSize8]
|
||||
#define kFont9 [UIFont systemFontOfSize:kFontSize9]
|
||||
#define kFont10 [UIFont systemFontOfSize:kFontSize10]
|
||||
#define kFont11 [UIFont systemFontOfSize:kFontSize11]
|
||||
#define kFont12 [UIFont systemFontOfSize:kFontSize12]
|
||||
#define kFont13 [UIFont systemFontOfSize:kFontSize13]
|
||||
#define kFont14 [UIFont systemFontOfSize:kFontSize14]
|
||||
#define kFont15 [UIFont systemFontOfSize:kFontSize15]
|
||||
#define kFont16 [UIFont systemFontOfSize:kFontSize16]
|
||||
#define kFont17 [UIFont systemFontOfSize:kFontSize17]
|
||||
#define kFont18 [UIFont systemFontOfSize:kFontSize18]
|
||||
#define kFont19 [UIFont systemFontOfSize:kFontSize19]
|
||||
#define kFont20 [UIFont systemFontOfSize:kFontSize20]
|
||||
#define kFont21 [UIFont systemFontOfSize:kFontSize21]
|
||||
#define kFont22 [UIFont systemFontOfSize:kFontSize22]
|
||||
#define kFont23 [UIFont systemFontOfSize:kFontSize23]
|
||||
#define kFont24 [UIFont systemFontOfSize:kFontSize24]
|
||||
#define kFont25 [UIFont systemFontOfSize:kFontSize25]
|
||||
#define kFont26 [UIFont systemFontOfSize:kFontSize26]
|
||||
#define kFont27 [UIFont systemFontOfSize:kFontSize27]
|
||||
#define kFont28 [UIFont systemFontOfSize:kFontSize28]
|
||||
#define kFont29 [UIFont systemFontOfSize:kFontSize29]
|
||||
#define kFont30 [UIFont systemFontOfSize:kFontSize30]
|
||||
|
||||
#define kBoldFont5 [UIFont boldSystemFontOfSize:kFontSize5]
|
||||
#define kBoldFont6 [UIFont boldSystemFontOfSize:kFontSize6]
|
||||
#define kBoldFont7 [UIFont boldSystemFontOfSize:kFontSize7]
|
||||
#define kBoldFont8 [UIFont boldSystemFontOfSize:kFontSize8]
|
||||
#define kBoldFont9 [UIFont boldSystemFontOfSize:kFontSize9]
|
||||
#define kBoldFont10 [UIFont boldSystemFontOfSize:kFontSize10]
|
||||
#define kBoldFont11 [UIFont boldSystemFontOfSize:kFontSize11]
|
||||
#define kBoldFont12 [UIFont boldSystemFontOfSize:kFontSize12]
|
||||
#define kBoldFont13 [UIFont boldSystemFontOfSize:kFontSize13]
|
||||
#define kBoldFont14 [UIFont boldSystemFontOfSize:kFontSize14]
|
||||
#define kBoldFont15 [UIFont boldSystemFontOfSize:kFontSize15]
|
||||
#define kBoldFont16 [UIFont boldSystemFontOfSize:kFontSize16]
|
||||
#define kBoldFont17 [UIFont boldSystemFontOfSize:kFontSize17]
|
||||
#define kBoldFont18 [UIFont boldSystemFontOfSize:kFontSize18]
|
||||
#define kBoldFont19 [UIFont boldSystemFontOfSize:kFontSize19]
|
||||
#define kBoldFont20 [UIFont boldSystemFontOfSize:kFontSize20]
|
||||
#define kBoldFont21 [UIFont boldSystemFontOfSize:kFontSize21]
|
||||
#define kBoldFont22 [UIFont boldSystemFontOfSize:kFontSize22]
|
||||
#define kBoldFont23 [UIFont boldSystemFontOfSize:kFontSize23]
|
||||
#define kBoldFont24 [UIFont boldSystemFontOfSize:kFontSize24]
|
||||
#define kBoldFont25 [UIFont boldSystemFontOfSize:kFontSize25]
|
||||
#define kBoldFont26 [UIFont boldSystemFontOfSize:kFontSize26]
|
||||
#define kBoldFont27 [UIFont boldSystemFontOfSize:kFontSize27]
|
||||
#define kBoldFont28 [UIFont boldSystemFontOfSize:kFontSize28]
|
||||
#define kBoldFont29 [UIFont boldSystemFontOfSize:kFontSize29]
|
||||
#define kBoldFont30 [UIFont boldSystemFontOfSize:kFontSize30]
|
||||
|
||||
#define kFontSize5 5.0f + kFontOffset
|
||||
#define kFontSize6 6.0f + kFontOffset
|
||||
#define kFontSize7 7.0f + kFontOffset
|
||||
#define kFontSize8 8.0f + kFontOffset
|
||||
#define kFontSize9 9.0f + kFontOffset
|
||||
#define kFontSize10 10.0f + kFontOffset
|
||||
#define kFontSize11 11.0f + kFontOffset
|
||||
#define kFontSize12 12.0f + kFontOffset
|
||||
#define kFontSize13 13.0f + kFontOffset
|
||||
#define kFontSize14 14.0f + kFontOffset
|
||||
#define kFontSize15 15.0f + kFontOffset
|
||||
#define kFontSize16 16.0f + kFontOffset
|
||||
#define kFontSize17 17.0f + kFontOffset
|
||||
#define kFontSize18 18.0f + kFontOffset
|
||||
#define kFontSize19 19.0f + kFontOffset
|
||||
#define kFontSize20 20.0f + kFontOffset
|
||||
#define kFontSize21 21.0f + kFontOffset
|
||||
#define kFontSize22 22.0f + kFontOffset
|
||||
#define kFontSize23 23.0f + kFontOffset
|
||||
#define kFontSize24 24.0f + kFontOffset
|
||||
#define kFontSize25 25.0f + kFontOffset
|
||||
#define kFontSize26 26.0f + kFontOffset
|
||||
#define kFontSize27 27.0f + kFontOffset
|
||||
#define kFontSize28 28.0f + kFontOffset
|
||||
#define kFontSize29 29.0f + kFontOffset
|
||||
#define kFontSize30 30.0f + kFontOffset
|
||||
|
||||
|
||||
// ANIMATION_DURATION
|
||||
|
||||
#define kAnimatedDuration 0.4f
|
||||
|
||||
#define kAnimatedDurationFast 0.2f
|
||||
|
||||
#endif /* TFFrameConfig_h */
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// TFImportConfig.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFImportConfig_h
|
||||
#define TFImportConfig_h
|
||||
|
||||
//工具类
|
||||
#import "TFUtilsHelper.h"
|
||||
#import "TFViewHelper.h"
|
||||
#import "TFColorHelper.h"
|
||||
#import "TFNetworkTools.h"
|
||||
#import "TFUserInfoManager.h"
|
||||
#import "TFSystemInfoManager.h"
|
||||
#import "TFPromptManager.h"
|
||||
#import "TFNetworkManager.h"
|
||||
#import "TFLanguageManager.h"
|
||||
|
||||
// controller
|
||||
#import "TFBasicViewController.h"
|
||||
#import "TFNavigationController.h"
|
||||
#import "TFNovelDetailViewController.h"
|
||||
#import "TFComicDetailViewController.h"
|
||||
#import "TFAudioDetailViewController.h"
|
||||
#import "TFLoginOptionsViewController.h"
|
||||
#import "TFBookStoreMoreViewController.h"
|
||||
|
||||
// view
|
||||
#import "TFBasicTableViewCell.h"
|
||||
|
||||
// category
|
||||
#import "UIView+BorderLine.h"
|
||||
#import "NSObject+LSDefaults.h"
|
||||
#import "UIViewController+Present.h"
|
||||
#import "UIImageView+CornerRadius.h"
|
||||
|
||||
#pragma mark Category
|
||||
|
||||
#import "UIView+TFExtension.h"
|
||||
#import "TFButton+TFExtension.h"
|
||||
|
||||
// Model
|
||||
#import "TFBannerModel.h"
|
||||
#import "TFBookRackModel.h"
|
||||
#import "TFBookStoreModel.h"
|
||||
#import "TFTagModel.h"
|
||||
#import "TFProductionModel.h"
|
||||
#import "TFProductionChapterModel.h"
|
||||
#import "TFProductionListModel.h"
|
||||
#import "TFCheckSettingModel.h"
|
||||
#import "TFCommentsModel.h"
|
||||
|
||||
|
||||
// 三方库
|
||||
#import "YYKit.h"
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
#import "TFButton.h"
|
||||
#import "TFProductionCoverView.h"
|
||||
#import "TFAlertView.h"
|
||||
#import "TFEmptyViewHeader.h"
|
||||
#import "TFRefreshFooter.h"
|
||||
#import "TFRefreshHeader.h"
|
||||
#import <Masonry.h>
|
||||
#import <SGPagingView/SGPagingView.h>
|
||||
#import "UIScrollView+TFRefresh.h"
|
||||
|
||||
#endif /* TFImportConfig_h */
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// TFMemoryConfig.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFMemoryConfig_h
|
||||
#define TFMemoryConfig_h
|
||||
|
||||
#define TF_READER_FONT @"xtfei_reader_font"
|
||||
|
||||
#define TF_READER_BACKVIEW @"xtfei_reader_backgroundView"
|
||||
|
||||
#define TF_READER_LINESPACING @"xtfei_reader_linespacing"
|
||||
|
||||
#define TF_READER_TRANSITION_STYLE @"xtfei_reader_transition_style"
|
||||
|
||||
#define TF_READER_NIGHT_MODE @"xtfei_reader_night_mode"
|
||||
|
||||
#define TF_READER_CHAPTER_INDEX @"xtfei_reader_chapter_index"
|
||||
|
||||
#define TF_READER_READ_SPEED @"xtfei_reader_read_speed"
|
||||
|
||||
#define TF_READER_PAGER_INDEX @"xtfei_reader_pager_index"
|
||||
|
||||
#define TF_TABBAR_SELECT_MEMORY @"xtfei_tabbar_select_memory"
|
||||
|
||||
#define TF_GUIDE_SHOW @"xtfei_guide_num"
|
||||
|
||||
#define TF_START_PAGE @"xtfei_start_page"
|
||||
|
||||
#define TF_SITE_STATE @"xtfei_site_state"
|
||||
|
||||
#define TF_Ai_Switch @"xtfei_ai_switch"
|
||||
|
||||
// 阅读器开始免广告的时间戳
|
||||
#define TF_Reader_Ad_Start_Timestamp @"TF_Reader_Ad_Start_Timestamp"
|
||||
|
||||
// 阅读器广告当前时间戳
|
||||
#define TF_Reader_Ad_Timestamp @"TF_Reader_Ad_Timestamp"
|
||||
|
||||
#define TF_DELETE_PHOTO @"xtfei_delete_photo"
|
||||
|
||||
// 兴趣选择页面
|
||||
#define TF_Insterest_Switch @"xtfei_Insterest_Switch"
|
||||
|
||||
// 点击翻页
|
||||
#define Enable_Click_Page @"enable_click_change_page_wx81818181881"
|
||||
|
||||
// 夜间模式
|
||||
#define Enable_Click_Night @"enable_click_change_day_or_night_wx81818818181"
|
||||
|
||||
// 开启吐槽
|
||||
#define Enable_Barrage @"Enable_Barrage_wx81818181881"
|
||||
|
||||
#endif /* TFMemoryConfig_h */
|
||||
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// TFNotificationConfig.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFNotificationConfig_h
|
||||
#define TFNotificationConfig_h
|
||||
|
||||
// 登录成功
|
||||
#define Notification_Login_Success @"login_success_notification"
|
||||
|
||||
// 退出登录
|
||||
#define Notification_Logout @"logout_notification"
|
||||
|
||||
#define NSNotification_Rack_JumpToMallCenter @"rack_jump_to_mall_center_notification"
|
||||
|
||||
#define NSNotification_Reader_Back @"reader_back_notification"
|
||||
|
||||
#define NSNotification_Reader_Push @"reader_push_notification"
|
||||
|
||||
#define NSNotification_Hidden_ToolNav @"hidden_tool_nav_notification"
|
||||
|
||||
#define NSNotification_Hidden_Bottom_ToolNav @"hidden_bottom_tool_nav_notification"
|
||||
|
||||
#define NSNotification_Retry_Chapter @"retry_chapter_notification"
|
||||
|
||||
#define NSNOtification_Book_Mark @"NSNOtification_Book_Mark"
|
||||
|
||||
#define NSNotification_EmptyView_Changed @"empty_view_changed_notification"
|
||||
|
||||
#define k_Chapter_RequstFail @"no_word_request"
|
||||
|
||||
#define Notification_beginDragging @"BeginDragging_notification"
|
||||
|
||||
#define NSNotification_WeChat_OnResp @"wechat_onResp_notification"
|
||||
|
||||
#define Notification_Reload_BookDetail @"reload_bookDetail_notification"
|
||||
|
||||
#define Notification_Avatar_Changed @"avatar_changed_notification"
|
||||
|
||||
#define Notification_NickName_Changed @"nickname_changed_notification"
|
||||
|
||||
#define Notification_Hidden_Tabbar @"hidden_tabbar_notification"
|
||||
|
||||
#define Notification_Show_Tabbar @"show_tabbar_notification"
|
||||
|
||||
#define Notification_Show_PayView @"show_pay_view_notification"
|
||||
|
||||
#define Notification_Review_State @"in_review_state_notification"
|
||||
|
||||
#define Notification_Insterest_Change @"insterest_state_change_notification"
|
||||
|
||||
#define Notification_Change_Tabbar_Index @"change_tabbar_index_notification"
|
||||
|
||||
#define Notification_Recharge_Success @"recharge_success_notification"
|
||||
|
||||
#define Notification_Show_Assistive @"show_assistive_touch_view_notification"
|
||||
|
||||
#define Notification_Push_UserInfo @"push_to_userInfo_notification"
|
||||
|
||||
#define Notification_Push_To_Book_Detail_Animation @"push_to_book_detail_animation_notification"
|
||||
|
||||
#define Notification_Push_To_Download @"push_to_download_notification"
|
||||
|
||||
#define Notification_Reload_Download_State @"reload_download_state_notification"
|
||||
|
||||
#define Notification_Channel_Change @"channel_change_notification"
|
||||
|
||||
#define Notification_Production_Pay_Success @"comic_pay_success_notification"
|
||||
|
||||
#define Notification_Reload_Rack_Production @"reload_book_rack_notification"
|
||||
|
||||
#define Notification_Reload_Mall_Hot_Word @"reload_mall_hot_word_notification"
|
||||
|
||||
#define Notification_Check_Setting_Update @"check_setting_upload_notification"
|
||||
|
||||
#define Notification_Change_Audio_Chapter @"xtfei_change_audio_chapter"
|
||||
|
||||
#define Notification_Change_AiBook_Chapter @"xtfei_change_aibook_chapter"
|
||||
|
||||
#define Notification_Audio_Check_Recommend @"xtfei_audio_check_recommend"
|
||||
|
||||
#define Notification_Restore_Network @"Notification_Restore_Network"
|
||||
|
||||
#define Notification_Can_Leave_Top @"xtfei_can_leave_top_notification"
|
||||
|
||||
#define Notification_Audio_Can_Leave_Top @"xtfei_audio_can_leave_top_notification"
|
||||
|
||||
#define Notification_Directory_Move @"xtfei_directiory_move_notification"
|
||||
|
||||
#define Notification_Switch_Chapter @"xtfei_switch_chapter_notification"
|
||||
|
||||
#define Notification_Pop_Comic_Reader @"xtfei_pop_comi_reader_notification"
|
||||
|
||||
#define Notification_Push_To_Comments @"xtfei_push_to_comments_notification"
|
||||
|
||||
#define Notification_Push_To_Directory @"xtfei_push_to_directory_notification"
|
||||
|
||||
#define Notification_Reader_Scroll_To_Top @"xtfei_reader_view_scroll_to_top_notification"
|
||||
|
||||
#define Notification_Push_To_Comic_Download @"xtfei_push_to_comic_download_notification"
|
||||
|
||||
#define Notification_Change_Barrage @"Notification_Change_Barrage"
|
||||
|
||||
#define NSNotification_Updata_Read_Record @"xtfei_updata_read_record_notification"
|
||||
|
||||
#define NSNotification_Auto_Buy_Audio_Chapter @"xtfei_auto_buy_audio_chapter_notification"
|
||||
|
||||
// 阅读器广告隐藏状态
|
||||
#define Notification_Reader_Ad_Hidden @"Notification_Reader_Ad_Hidden"
|
||||
|
||||
// 广告页面全屏翻页
|
||||
#define Notification_Reader_Ad_TurnThePage @"Notification_Reader_Ad_TurnThePage"
|
||||
|
||||
// 清空播放机缓存信息
|
||||
#define Notification_Reset_Player_Inof @"xtfei_reset_player_info_notification"
|
||||
|
||||
// 分享成功
|
||||
#define Notification_Share_Success @"Notification_Share_Success"
|
||||
|
||||
// 开启关闭弹幕功能
|
||||
#define Notification_Switch_Barrage @"xtfei_switch_barrage_notification"
|
||||
|
||||
// 小说发现页面限时免费结束
|
||||
#define Notification_EndOfTimeLimit @"Notification_EndOfTimeLimit"
|
||||
|
||||
// 更新目录锁按钮
|
||||
#define Notification_ChangeLock @"Notification_ChangeLock"
|
||||
|
||||
// 切换APP语言
|
||||
#define Notification_Switch_Language @"Notification_Switch_Language"
|
||||
|
||||
#endif /* TFNotificationConfig_h */
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// TFPrefixHeader.pch
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFPrefixHeader_pch
|
||||
#define TFPrefixHeader_pch
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
#import "TFSettingConfig.h"
|
||||
#import "TFSwitchConfig.h"
|
||||
#import "TFServerConfig.h"
|
||||
#import "TFColorConfig.h"
|
||||
#import "TFNotificationConfig.h"
|
||||
#import "TFFrameConfig.h"
|
||||
#import "TFImportConfig.h"
|
||||
#import "TFSystemConfig.h"
|
||||
#import "TFMemoryConfig.h"
|
||||
#import "TFDefineConfig.h"
|
||||
|
||||
|
||||
/*** 日志 ***/
|
||||
#ifdef DEBUG
|
||||
#define TFLog(...) NSLog(__VA_ARGS__)
|
||||
#else
|
||||
#define TFLog(...)
|
||||
#endif
|
||||
|
||||
#define TFLogFunc TFLog(@"%s", __func__);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* TFPrefixHeader_pch */
|
||||
@@ -0,0 +1,503 @@
|
||||
//
|
||||
// TFServerConfig.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFServerConfig_h
|
||||
#define TFServerConfig_h
|
||||
|
||||
/** 网络请求默认超时时间 */
|
||||
#define kOvertime 30.0f
|
||||
|
||||
// 书城首页
|
||||
#define Book_Mall_Center @"/book/store" // 频道 1-女频 2-男频
|
||||
|
||||
// 书籍详情
|
||||
#define Book_Mall_Detail @"/book/info"
|
||||
|
||||
// 阅读器末尾推荐
|
||||
#define Book_Endof_Recommend @"/book/end-of-recommend"
|
||||
|
||||
// 查看更多
|
||||
#define Book_Recommend_More @"/book/recommend"
|
||||
|
||||
// 获取章节
|
||||
#define Book_Chapter_Text @"/chapter/text"
|
||||
|
||||
// 下载多章节
|
||||
#define Book_Download_Multiple_Chapters @"/chapter/down-url"
|
||||
|
||||
// 小说分类
|
||||
#define Book_Category_List @"/book/category-index"
|
||||
|
||||
// 小说包月
|
||||
#define Book_Member_Store @"/book/baoyue-index"
|
||||
|
||||
// 小说榜单
|
||||
#define Book_Rank_List @"/rank/index" // 频道 1-男频 2-女频
|
||||
|
||||
// 小说榜单列表
|
||||
#define Book_Rank_Detail_List @"/rank/book-list"
|
||||
|
||||
// 小说完本
|
||||
#define Book_Finish @"/book/finish"
|
||||
|
||||
// 限免
|
||||
#define Book_Free_Time @"/book/free-time"
|
||||
|
||||
// 免费
|
||||
#define Book_Free @"/book/free"
|
||||
|
||||
// 发现首页
|
||||
#define Book_Discover @"/book/new-featured"
|
||||
|
||||
// 目录
|
||||
#define Book_Catalog @"/chapter/catalog"
|
||||
|
||||
// 新目录
|
||||
#define Book_New_Catalog @"/chapter/new-catalog"
|
||||
|
||||
// 评论列表
|
||||
#define Book_Comment_List @"/comment/list"
|
||||
|
||||
// 发送评论
|
||||
#define Book_Comment_Post @"/comment/post"
|
||||
|
||||
// 添加书籍
|
||||
#define Book_Add_Collect @"/user/collect-add"
|
||||
|
||||
// 删除书籍
|
||||
#define Book_Delete_Collect @"/user/collect-del"
|
||||
|
||||
// 小说书架
|
||||
#define Book_Rack @"/user/book-collect"
|
||||
|
||||
// 批量购买章节预览页
|
||||
#define Book_Buy_Index @"/chapter/buy-index"
|
||||
|
||||
// 购买小说章节
|
||||
#define Book_Buy_Chapter @"/chapter/buy"
|
||||
|
||||
// 章节下载预览
|
||||
#define Book_Chapter_Download_Option @"/chapter/down-option"
|
||||
|
||||
// 我的评论
|
||||
#define Book_Comments_List @"/user/comments"
|
||||
|
||||
// 删除小说阅读记录
|
||||
#define Book_Readlog_Delete @"/user/del-read-log"
|
||||
|
||||
// 换一换
|
||||
#define Book_Refresh @"/book/refresh"
|
||||
|
||||
// 猜你喜欢换一换
|
||||
#define Book_Guess_Like @"/book/guess-like"
|
||||
|
||||
// 搜索首页
|
||||
#define Book_Search @"/book/search-index"
|
||||
|
||||
// 搜索内容
|
||||
#define Book_Search_List @"/book/search"
|
||||
|
||||
// 阅读记录
|
||||
#define Book_Read_Log_List @"/user/read-log"
|
||||
|
||||
// 增加阅读记录
|
||||
#define Book_Add_Read_log @"/user/add-read-log"
|
||||
|
||||
// 打赏礼物给作品
|
||||
#define Book_Reward_Gift_Send @"/reward/gift-send"
|
||||
|
||||
// 投月票
|
||||
#define Book_Reward_Ticket_Vote @"/reward/ticket-vote"
|
||||
|
||||
// 阅读器月票封面
|
||||
#define Book_Gift_Montyly_Pass @"/reward/ticket-option"
|
||||
|
||||
// 月票记录
|
||||
#define Book_Reward_Ticket_Log @"/reward/ticket-log"
|
||||
|
||||
// 打赏记录
|
||||
#define Book_Reward_Gift_Log @"/reward/gift-log"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
漫画相关接口
|
||||
*/
|
||||
|
||||
// 漫画查看更多
|
||||
#define Comic_Recommend_More @"/comic/recommend"
|
||||
|
||||
// 漫画分类标签
|
||||
#define Comic_Category_List @"/comic/list"
|
||||
|
||||
// 漫画包月
|
||||
#define Comic_Member_Store @"/comic/baoyue-list"
|
||||
|
||||
// 漫画榜单首页
|
||||
#define Comic_Rank_List @"/rank/comic-index"
|
||||
|
||||
// 漫画榜单作品列表
|
||||
#define Comic_Rank_Detail_List @"/rank/comic-list"
|
||||
|
||||
// 漫画书架
|
||||
#define Comic_Rack @"/fav/index"
|
||||
|
||||
// 漫画书城首页
|
||||
#define Comic_Mall @"/comic/home-stock"
|
||||
|
||||
// 换一换
|
||||
#define Comic_Refresh @"/comic/refresh"
|
||||
|
||||
// 漫画评论列表
|
||||
#define Comic_Comment_List @"/comic/comment-list"
|
||||
|
||||
// 漫画详情
|
||||
#define Comic_Detail @"/comic/info"
|
||||
|
||||
// 漫画详情目录
|
||||
#define Comic_Catalog @"/comic/catalog"
|
||||
|
||||
// 漫画章节
|
||||
#define Comic_Chapter @"/comic/chapter"
|
||||
|
||||
// 漫画弹幕
|
||||
#define Comic_Barrage @"/comic/barrage"
|
||||
|
||||
// 发送吐槽
|
||||
#define Comic_Send_Barrage @"/comic/tucao"
|
||||
|
||||
// 发送评论
|
||||
#define Comic_Comment_Post @"/comic/post"
|
||||
|
||||
// 下载列表
|
||||
#define Comic_DownloadOption @"/comic/down-option"
|
||||
|
||||
// 下载漫画
|
||||
#define Comic_Download @"/comic/down"
|
||||
|
||||
// 发现
|
||||
#define Comic_Discover @"/comic/featured"
|
||||
|
||||
// 书架
|
||||
#define Comic_Rack @"/fav/index"
|
||||
|
||||
// 添加收藏
|
||||
#define Comic_Collect_Add @"/fav/add"
|
||||
|
||||
// 删除收藏
|
||||
#define Comic_Collect_Delete @"/fav/del"
|
||||
|
||||
// 漫画完本
|
||||
#define Comic_Finish @"/comic/finish"
|
||||
|
||||
// 漫画限免
|
||||
#define Comic_Free_Time @"/comic/free-time"
|
||||
|
||||
// 漫画免费
|
||||
#define Comic_Free @"/comic/free"
|
||||
|
||||
// 我的评论
|
||||
#define Comic_Comments_List @"/user/comic-comments"
|
||||
|
||||
// 评论详情
|
||||
#define Comment_Detail @"/user/comment-info"
|
||||
|
||||
// 漫画搜索
|
||||
#define Comic_Search @"/comic/search-index"
|
||||
|
||||
// 漫画搜索内容
|
||||
#define Comic_Search_List @"/comic/search"
|
||||
|
||||
// 购买漫画章节
|
||||
#define Comic_Buy_Chapter @"/comic-chapter/buy"
|
||||
|
||||
// 漫画章节购买预览页
|
||||
#define Comic_Buy_Index @"/comic-chapter/buy-index"
|
||||
|
||||
// 章节下载
|
||||
#define Chapter_Download @"/chapter/down"
|
||||
|
||||
// 漫画阅读记录
|
||||
#define Comic_Read_Log_List @"/user/comic-read-log"
|
||||
|
||||
// 漫画添加阅读记录
|
||||
#define Comic_Add_Read_Log @"/user/add-comic-read-log"
|
||||
|
||||
// 删除漫画阅读记录
|
||||
#define Comic_Readlog_Delete @"/user/del-comic-read-log"
|
||||
|
||||
|
||||
/*
|
||||
有声相关接口
|
||||
*/
|
||||
|
||||
// AI 详情页
|
||||
#define Ai_Audio_Detail @"/book/detail"
|
||||
|
||||
// 有声详情页
|
||||
#define Audio_Info @"/audio/info"
|
||||
|
||||
// 有声书城首页
|
||||
#define Audio_Mall @"/audio/index"
|
||||
|
||||
// 有声目录
|
||||
#define Audio_Catalog @"/audio/catalog"
|
||||
|
||||
// 有声详情页推荐
|
||||
#define Audio_Info_Recommend @"/audio/info-recommend"
|
||||
|
||||
// 有声播放页
|
||||
#define Audio_Chapter_Info @"/audio-chapter/info"
|
||||
|
||||
// 有声下载
|
||||
#define Audio_Chapter_Download @"/audio-chapter/down"
|
||||
|
||||
// 有声播放页详情
|
||||
#define Audio_Chapter_Detail @"/audio-chapter/detail"
|
||||
|
||||
// 有声评论列表
|
||||
#define Audio_Comment_List @"/audio-chapter/comment-list"
|
||||
|
||||
// 我的评论列表
|
||||
#define Audio_Comments_List @"/user/audio-comment"
|
||||
|
||||
// 有声免费列表
|
||||
#define Audio_Free @"/audio/free"
|
||||
|
||||
// 有声完结
|
||||
#define Audio_Finish @"/audio/finished"
|
||||
|
||||
// 有声分类
|
||||
#define Audio_Category_Index @"/audio/category-index"
|
||||
|
||||
// 有声包月
|
||||
#define Audio_Member_Store @"/audio/baoyue-list"
|
||||
|
||||
// 有声榜单首页
|
||||
#define Audio_Rank_List @"/audio/top-index"
|
||||
|
||||
// 有声详情页
|
||||
#define Audio_Rank_Detail_List @"/audio/top-list"
|
||||
|
||||
// 有声添加收藏
|
||||
#define Audio_Collection_Add @"/audio-fav/add"
|
||||
|
||||
// 有声取消收藏
|
||||
#define Audio_Collection_Delete @"/audio-fav/del"
|
||||
|
||||
// 有声发现页
|
||||
#define Audio_Discover @"/audio/new-featured"
|
||||
|
||||
// 添加有声记录
|
||||
#define Audio_Add_Read_Log @"/audio/add-read-log"
|
||||
|
||||
// 有声阅读记录
|
||||
#define Audio_Read_Log_List @"/user/audio-read-log"
|
||||
|
||||
// 有声删除评论记录
|
||||
#define Audio_Readlog_Delete @"/user/audio-del-read-log"
|
||||
|
||||
// 有声发送评论
|
||||
#define Audio_Comment_Post @"/audio-chapter/comment-post"
|
||||
|
||||
// 有声书架
|
||||
#define Audio_Rack @"/audio-fav/user-fav"
|
||||
|
||||
// 有声搜索首页
|
||||
#define Audio_Search @"/audio/search-index"
|
||||
|
||||
// 有声搜索结果
|
||||
#define Audio_Search_List @"/audio/search"
|
||||
|
||||
// 有声购买预览
|
||||
#define Audio_Buy_Index @"/audio-chapter/buy-option"
|
||||
|
||||
// 有声章节购买
|
||||
#define Audio_Buy_Chapter @"/audio-chapter/buy"
|
||||
|
||||
// 有声首页换一换
|
||||
#define Audio_Refresh @"/audio/refresh"
|
||||
|
||||
// 有声查看更多
|
||||
#define Audio_Recommend_More @"/audio/recommend"
|
||||
|
||||
/*
|
||||
公共相关接口
|
||||
*/
|
||||
|
||||
// 个人中心
|
||||
#define User_Center @"/user/index"
|
||||
|
||||
// 首次启动书架增加推荐作品
|
||||
#define Shelf_Recommend @"/novel/shelf-recommend"
|
||||
|
||||
// 会员包月
|
||||
#define Member_Monthly @"/user/vip-center"
|
||||
|
||||
// 提交反馈
|
||||
#define Sub_Feed_Back @"/answer/post-feedback"
|
||||
|
||||
// 阅读器礼物列表
|
||||
#define Gift_List @"/reward/gift-option"
|
||||
|
||||
// 金币充值
|
||||
#define Pay_Center @"/pay/center"
|
||||
|
||||
// 开通包月
|
||||
#define Member_Center @"/pay/baoyue-center"
|
||||
|
||||
// 阅读器广告
|
||||
#define Advert_Info @"/advert/info"
|
||||
|
||||
// 广告点击统计
|
||||
#define AdVert_Click @"/advert/click"
|
||||
|
||||
// 会员服务协议
|
||||
#define Membership_Service @"/site/membership-service"
|
||||
|
||||
// 软件服务协议
|
||||
#define Notify_Note @"/site/notify"
|
||||
|
||||
// 隐私政策
|
||||
#define Privacy_Policy @"/site/privacy-policy"
|
||||
|
||||
// 用户服务协议
|
||||
#define User_Agreement @"/site/user-agreement"
|
||||
|
||||
// 注销协议
|
||||
#define Log_Off @"/site/logoff-protocol"
|
||||
|
||||
// 注销账号
|
||||
#define Cancel_Account @"/user/cancel-account"
|
||||
|
||||
// 推送提醒状态
|
||||
#define User_Push_State @"/user/push-state"
|
||||
|
||||
// 用户修改推送提醒状态Ai_Audio_Detail
|
||||
#define User_Update_Push_State @"/user/update-push-state"
|
||||
|
||||
// 帮助反馈
|
||||
#define Answer_List @"/answer/list"
|
||||
|
||||
// 上传图片
|
||||
#define Upload_Image @"/upload/image"
|
||||
|
||||
// 删除图片
|
||||
#define Delete_Upload_Image @"/upload/delete-image"
|
||||
|
||||
// 用户反馈列表
|
||||
#define Feed_Back_List @"/answer/feedback-list"
|
||||
|
||||
// 发送验证码
|
||||
#define Send_Verification_Code @"/message/send"
|
||||
|
||||
// 发送邮箱验证码
|
||||
#define Send_Email_Verification_Code @"/message/send-email"
|
||||
|
||||
// 手机号登录
|
||||
#define Mobile_Login @"/user/mobile-login"
|
||||
|
||||
// 邮箱登录
|
||||
#define Email_Login @"/user/email-login"
|
||||
|
||||
// 账号密码登录
|
||||
#define Account_Login @"/user/account-login"
|
||||
|
||||
// 游客登录
|
||||
#define Tourists_Login @"/user/device-login"
|
||||
|
||||
// 微信登录
|
||||
#define WeChat_Login @"/user/app-login-wechat"
|
||||
|
||||
// QQ登录
|
||||
#define QQ_Login @"/user/qq-login"
|
||||
|
||||
// 绑定微信
|
||||
#define WeChat_Binding @"/user/app-bind-wechat"
|
||||
|
||||
// 绑定QQ
|
||||
#define QQ_Binding @"/user/bind-qq"
|
||||
|
||||
// 绑定手机号
|
||||
#define Phone_Binding @"/user/bind-mobile"
|
||||
|
||||
// 分享跳转
|
||||
#define Site_Share @"/site/share"
|
||||
|
||||
// 分享App请求
|
||||
#define App_Share @"/user/app-share"
|
||||
|
||||
// 分享书籍章节
|
||||
#define App_Chapter_Share @"/novel/share-novel"
|
||||
|
||||
// 关于我们
|
||||
#define About_Soft @"/service/about"
|
||||
|
||||
// 分享回调
|
||||
#define Share_Back @"/user/share-reward"
|
||||
|
||||
// 签到
|
||||
#define Sign_Click @"/user/sign"
|
||||
|
||||
// 任务中心
|
||||
#define Task_Center @"/task/center"
|
||||
|
||||
// 消费充值记录
|
||||
#define Consumption_Records @"/pay/gold-detail"
|
||||
|
||||
// 个人资料
|
||||
#define User_Data @"/user/data"
|
||||
|
||||
// 上传头像
|
||||
#define Set_Avatar @"/user/set-avatar"
|
||||
|
||||
// 上传性别
|
||||
#define Set_Gender @"/user/set-gender"
|
||||
|
||||
// 修改昵称
|
||||
#define Set_NickName @"/user/set-nickname"
|
||||
|
||||
// 推荐
|
||||
#define Start_Recommend @"/user/start-recommend"
|
||||
|
||||
// 保存推荐
|
||||
#define Save_Recommed @"/user/save-recommend"
|
||||
|
||||
// 完成任务两本书
|
||||
#define Task_Read @"/user/task-read"
|
||||
|
||||
// 自动订阅下一章
|
||||
#define Auto_Sub_Chapter @"/user/auto-sub"
|
||||
|
||||
// 苹果支付验证
|
||||
#define Apple_Pay_Back @"/pay/applepay"
|
||||
|
||||
// 拉取系统配置
|
||||
#define Check_Setting @"/service/check-setting"
|
||||
|
||||
// 上传设备号
|
||||
#define Upload_Device_Info @"/user/sync-device"
|
||||
|
||||
// 切换语言
|
||||
#define Switch_Language @"/user/set-lang"
|
||||
|
||||
|
||||
|
||||
// Facebook登录
|
||||
#define Facebook_Login @"/user/facebook-login"
|
||||
|
||||
// Facebook绑定
|
||||
#define Facebook_Bind @"/user/facebook-bind"
|
||||
|
||||
// Google登录
|
||||
#define Google_Login @"/user/google-login"
|
||||
|
||||
// Google绑定
|
||||
#define Google_Bind @"/user/google-bind"
|
||||
|
||||
#endif /* TFServerConfig_h */
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// TFSettingConfig.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFSettingConfig_h
|
||||
#define TFSettingConfig_h
|
||||
|
||||
// APP默认语言(en:英语;zh-Hans:简体中文;zh-Hant:繁体中文;th:泰语)
|
||||
#define TF_Default_Language @"en"
|
||||
|
||||
// 主货币名称
|
||||
#define Main_Unit_Name TFLocalizedString(@"书币")
|
||||
|
||||
// 子货币名称
|
||||
#define Sub_Unit_Name TFLocalizedString(@"书券")
|
||||
|
||||
// apple ID
|
||||
#define Apple_ID @"1543830673"
|
||||
|
||||
// api服务器地址
|
||||
#define APIURL [NSString stringWithFormat:@"http://%@", api_host]
|
||||
|
||||
// api域名
|
||||
#define api_host @"api.kanshu116116.com"//@"192.168.10.111"
|
||||
|
||||
// api秘钥
|
||||
#define app_key @"0c44876680d7a4e2"
|
||||
|
||||
// api签名
|
||||
#define secret_key @"7de8a70d15d8fd198b8b53b53d58e110"
|
||||
|
||||
// 提交审核时间
|
||||
#define Submission_Date @"2020-12-28 21:26:34"
|
||||
|
||||
/**
|
||||
友盟
|
||||
*/
|
||||
#define UM_App_Key @""
|
||||
|
||||
// 穿山甲
|
||||
#define BUA_App_Key @""
|
||||
|
||||
// 启动页默认Key
|
||||
#define BUA_Splash_Key @""
|
||||
|
||||
// 激励视频默认Key
|
||||
#define BUA_Incentive_Video_Key @""
|
||||
|
||||
// 讯飞语音
|
||||
#define IFLY_App_ID @"5fddc7e5"
|
||||
|
||||
// 进入后台后返回App前台重新展示广告间隔时间(分钟)
|
||||
#define TF_Launch_Interval 2.0f
|
||||
|
||||
// 好评页跳转地址
|
||||
#define TF_EvaluationAddress [NSString stringWithFormat:@"https://itunes.apple.com/cn/app/id%@?mt=8", Apple_ID]
|
||||
|
||||
/**
|
||||
微信
|
||||
*/
|
||||
#define TF_WeChat_APPID @"wx0193612ff6250f4c"
|
||||
|
||||
#define TF_WeChat_Secret @"f5d221c5da4c7c15fd5a319dbf7073e4"
|
||||
|
||||
/**
|
||||
QQ
|
||||
*/
|
||||
#define Tencent_APPID @"101918139"
|
||||
|
||||
#define Tencent_APPKey @"a2db16ec7a1141db1d2e95c17d9c07ce"
|
||||
|
||||
|
||||
#endif /* TFSettingConfig_h */
|
||||
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// TFSwitchConfig.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFSwitchConfig_h
|
||||
#define TFSwitchConfig_h
|
||||
|
||||
// 启用漫画模块
|
||||
#define TF_Enable_Comic 1
|
||||
|
||||
// 启用小说模块
|
||||
#define TF_Enable_Book 1
|
||||
|
||||
// 启用有声模块
|
||||
#define TF_Enable_Audio 1
|
||||
|
||||
// 启用Ai听书模块
|
||||
#define TF_Enable_Ai 1
|
||||
|
||||
// 启用礼物模块
|
||||
#define TF_Enable_Gift 1
|
||||
|
||||
// 启动广告图
|
||||
#define TF_Launch_Advertising 1
|
||||
|
||||
#define TF_Enable_Magic 1
|
||||
|
||||
// 是否开始选项卡标签
|
||||
#define TF_Enable_PageControl 1
|
||||
|
||||
// 是否需要超级会员
|
||||
#define TF_Super_Member_Mode 1
|
||||
|
||||
// 免费模块开关
|
||||
#define TF_Free_Mode 1
|
||||
|
||||
// 是否需要货币充值
|
||||
#define TF_Recharge_Mode 1
|
||||
|
||||
// 是否使用推送功能
|
||||
#define TF_Enable_Push 1
|
||||
|
||||
|
||||
/*
|
||||
发现模块
|
||||
*/
|
||||
|
||||
// 兴趣模块
|
||||
#define TF_Insterest_View 1
|
||||
|
||||
// 3D Touch
|
||||
#define TF_ShortcutTouch 1
|
||||
|
||||
// 应用内好评
|
||||
#define TF_AppStore_Score 1
|
||||
|
||||
// 是否需要游客
|
||||
#define TF_Tourists_Login_Mode 1
|
||||
|
||||
// Apple登录
|
||||
#define TF_Apple_Login_Mode (1 || TF_QQ_Login_Mode || TF_WeChat_Login_Mode)
|
||||
|
||||
// 下载模块
|
||||
#define TF_Download_Mode 1
|
||||
|
||||
// 微信登录
|
||||
#define TF_WeChat_Login_Mode 0
|
||||
|
||||
// 微信分享
|
||||
#define TF_WeChat_Share_Mode 0
|
||||
|
||||
// QQ登录
|
||||
#define TF_QQ_Login_Mode 1
|
||||
|
||||
// QQ分享
|
||||
#define TF_QQ_Share_Mode 1
|
||||
|
||||
/*
|
||||
个人中心模块
|
||||
*/
|
||||
|
||||
// 流水记录
|
||||
#define TF_Records_Mode 1
|
||||
|
||||
// 签到功能
|
||||
#define TF_Sign_Mode 1
|
||||
|
||||
// 福利任务
|
||||
#define TF_Task_Mode 1
|
||||
|
||||
// 评论功能
|
||||
#define TF_Comments_Mode 1
|
||||
|
||||
// 联系客服
|
||||
#define TF_Aboutus_Mode 1
|
||||
|
||||
// 历史记录
|
||||
#define TF_History_Mode 1
|
||||
|
||||
// 意见反馈
|
||||
#define TF_Feedback_Mode 1
|
||||
|
||||
// 设置
|
||||
#define TF_Settings_Mode 1
|
||||
|
||||
|
||||
#endif /* TFSwitchConfig_h */
|
||||
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// TFSystemConfig.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/21.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TFSystemConfig_h
|
||||
#define TFSystemConfig_h
|
||||
|
||||
#define WS(weakSelf) __weak __typeof(&*self)weakSelf = self;
|
||||
|
||||
#define SS(strongSelf)__strong __typeof(weakSelf)strongSelf = weakSelf;
|
||||
|
||||
// AppDelegate
|
||||
#define KAppDelegate ((AppDelegate*)kRCodeSync([UIApplication sharedApplication].delegate))
|
||||
|
||||
// App版本
|
||||
#define App_Ver [NSString stringWithString:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]]
|
||||
|
||||
// App名称
|
||||
#define App_Name TFLocalizedString(@"小说绘")
|
||||
|
||||
// 系统信息文件名称
|
||||
#define System_Info_Path @"systemInfo"
|
||||
|
||||
// 用户信息文件名称
|
||||
#define User_Info_Path @"userInfo"
|
||||
|
||||
// 常用宏定义
|
||||
#define kNotification [NSNotificationCenter defaultCenter]
|
||||
|
||||
//系统版本
|
||||
#define is_ios7 [[[UIDevice currentDevice]systemVersion] floatValue] >= 7
|
||||
#define is_ios8 [[[UIDevice currentDevice]systemVersion] floatValue] >= 8
|
||||
#define is_ios9 [[[UIDevice currentDevice] systemVersion] floatValue] >= 9
|
||||
#define is_ios10 [[[UIDevice currentDevice] systemVersion] floatValue] >= 10
|
||||
#define is_ios11 [[[UIDevice currentDevice] systemVersion] floatValue] >= 11
|
||||
#define is_ios13 [[[UIDevice currentDevice] systemVersion] floatValue] >= 13
|
||||
|
||||
//手机型号
|
||||
#define is_iPad ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
|
||||
#define is_iPhone4 ([UIScreen mainScreen].bounds.size.height == 480)
|
||||
#define is_iPhone5 ([UIScreen mainScreen].bounds.size.height == 568)
|
||||
#define is_iPhone6 ([UIScreen mainScreen].bounds.size.height == 667)
|
||||
#define is_iPhone6P ([UIScreen mainScreen].bounds.size.height == 1104)
|
||||
#define is_iPhoneX ((([[UIScreen mainScreen] bounds].size.width == 375.0 && \
|
||||
[[UIScreen mainScreen] bounds].size.height == 812.0) || \
|
||||
([[UIScreen mainScreen] bounds].size.width == 414.0 && \
|
||||
[[UIScreen mainScreen] bounds].size.height == 896.0)) ? YES : NO)
|
||||
#define is_iPhoneX_Max ((([[UIScreen mainScreen] bounds].size.width == 414.0 && \
|
||||
[[UIScreen mainScreen] bounds].size.height == 896.0)) ? YES : NO)
|
||||
|
||||
//主窗口
|
||||
#define kMainWindow (is_ios13?[[[UIApplication sharedApplication] windows] objectAtIndex:0]:[[UIApplication sharedApplication] keyWindow])
|
||||
|
||||
// 比对ErrorNo
|
||||
#define Compare_Json_isEqualTo(A,B) (A == B)
|
||||
|
||||
#if __LP64__
|
||||
#define MZNSI @"ld"
|
||||
#define MZNSU @"lu"
|
||||
#else
|
||||
#define MZNSI @"d"
|
||||
#define MZNSU @"u"
|
||||
#endif //__LP64__
|
||||
|
||||
#define interface_singleton \
|
||||
+ (instancetype)sharedManager;
|
||||
|
||||
|
||||
// @implementation
|
||||
#define implementation_singleton(className) \
|
||||
static className *_instance_##className;\
|
||||
+ (instancetype)allocWithZone:(struct _NSZone *)zone{\
|
||||
static dispatch_once_t once_token_##className;\
|
||||
dispatch_once(&once_token_##className, ^{\
|
||||
_instance_##className = [super allocWithZone:zone];\
|
||||
});\
|
||||
return _instance_##className;\
|
||||
}\
|
||||
+ (instancetype)sharedManager{\
|
||||
static dispatch_once_t once_token_##className;\
|
||||
dispatch_once(&once_token_##className, ^{\
|
||||
_instance_##className = [[self alloc] init];\
|
||||
});\
|
||||
return _instance_##className;\
|
||||
}\
|
||||
- (id)copyWithZone:(NSZone *)zone{\
|
||||
return _instance_##className;\
|
||||
}
|
||||
|
||||
// ???: 在主线程中执行一段代码并返回对象(返回和接收值都是id类型)
|
||||
#define kRCodeSync(x) ({\
|
||||
id __block temp;\
|
||||
if ([NSThread isMainThread]) {\
|
||||
temp = x;\
|
||||
} else {\
|
||||
dispatch_semaphore_t signal = dispatch_semaphore_create(0);\
|
||||
dispatch_async(dispatch_get_main_queue(), ^{\
|
||||
temp = x;\
|
||||
dispatch_semaphore_signal(signal);\
|
||||
});\
|
||||
dispatch_semaphore_wait(signal, DISPATCH_TIME_FOREVER);\
|
||||
}\
|
||||
temp;\
|
||||
})
|
||||
|
||||
// ???: 在主线程中执行一段代码
|
||||
#define kCodeSync(x) ({\
|
||||
if ([NSThread isMainThread]) {\
|
||||
x;\
|
||||
} else {\
|
||||
dispatch_semaphore_t signal = dispatch_semaphore_create(0);\
|
||||
dispatch_async(dispatch_get_main_queue(), ^{\
|
||||
x;\
|
||||
dispatch_semaphore_signal(signal);\
|
||||
});\
|
||||
dispatch_semaphore_wait(signal, DISPATCH_TIME_FOREVER);\
|
||||
}\
|
||||
})
|
||||
|
||||
#endif /* TFSystemConfig_h */
|
||||
Reference in New Issue
Block a user