123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377 |
- //
- // RQConstant.h
- // RQCommon
- //
- // Created by 张嵘 on 2018/11/13.
- // Copyright © 2018 张嵘. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import <UIKit/UIKit.h>
- /// Block
- typedef void (^VoidBlock)(void);
- typedef BOOL (^BoolBlock)(void);
- typedef int (^IntBlock) (void);
- typedef NSInteger (^IntegerBlock) (void);
- typedef id (^IDBlock) (void);
- typedef void (^VoidBlock_int)(int);
- typedef BOOL (^BoolBlock_int)(int);
- typedef int (^IntBlock_int) (int);
- typedef NSInteger (^IntegerBlock_int) (int);
- typedef id (^IDBlock_int) (int);
- typedef void (^VoidBlock_integer)(NSInteger);
- typedef BOOL (^BoolBlock_integer)(NSInteger);
- typedef int (^IntBlock_integer) (NSInteger);
- typedef NSInteger (^NSIntegerBlock_integer) (NSInteger);
- typedef id (^IDBlock_integer) (NSInteger);
- typedef void (^VoidBlock_string)(NSString *);
- typedef BOOL (^BoolBlock_string)(NSString *);
- typedef int (^IntBlock_string) (NSString *);
- typedef NSInteger (^IntegerBlock_string) (NSString *);
- typedef id (^IDBlock_string) (NSString *);
- typedef void (^VoidBlock_id)(id);
- typedef BOOL (^BoolBlock_id)(id);
- typedef int (^IntBlock_id) (id);
- typedef NSInteger (^IntegerBlock_id) (id);
- typedef id (^IDBlock_id) (id);
- typedef void (^VoidBlock_Bool)(BOOL);
- #pragma mark - 应用相关的
- /// 切换根控制器的通知 新特性
- FOUNDATION_EXTERN NSString * const RQSwitchRootViewControllerNotification;
- /// 切换根控制器的通知 UserInfo key
- FOUNDATION_EXTERN NSString * const RQSwitchRootViewControllerUserInfoKey;
- /// 插件Switch按钮值改变
- FOUNDATION_EXTERN NSString * const RQPlugSwitchValueDidChangedNotification;
- /// 切换首页的通知
- FOUNDATION_EXTERN NSString * const RQSwitchHomePageViewControllerNotification;
- /// 切换首页的通知 UserInfo key
- FOUNDATION_EXTERN NSString * const RQSwitchHomePageViewControllerUserInfoKey;
- /// 切换个人页的通知
- FOUNDATION_EXTERN NSString * const RQSwitchProfilePageViewControllerNotification;
- /// 切换个人页的通知 UserInfo key
- FOUNDATION_EXTERN NSString * const RQSwitchProfilePageViewControllerUserInfoKey;
- /// Loding通用标题
- FOUNDATION_EXTERN NSString * const RQLodingCommonTitleString;
- /// 全局分割线高度 .5
- FOUNDATION_EXTERN CGFloat const RQGlobalBottomLineHeight;
- /// 个性签名的最大字数为30
- FOUNDATION_EXTERN NSUInteger const RQFeatureSignatureMaxWords;
- /// 用户昵称的最大字数为20
- FOUNDATION_EXTERN NSUInteger const RQNicknameMaxWords;
- /// 简书首页地址
- FOUNDATION_EXTERN NSString * const RQMyBlogHomepageUrl ;
- /// 国家区号
- FOUNDATION_EXTERN NSString * const RQMobileLoginZoneCodeKey ;
- /// 手机号码
- FOUNDATION_EXTERN NSString * const RQMobileLoginPhoneKey ;
- /// 密码
- FOUNDATION_EXTERN NSString * const RQMobileLoginPasswordKey;
- /// 验证码
- FOUNDATION_EXTERN NSString * const RQCaptchaKey ;
- /// 验证码时间
- FOUNDATION_EXTERN NSUInteger const RQCaptchaFetchMaxWords;
- /// 温州人脸比对次数
- FOUNDATION_EXTERN NSUInteger const RQWenZhouFaceNum;
- /// 莆田人脸比对次数
- FOUNDATION_EXTERN NSUInteger const RQPuTianFaceNum;
- /// 微信支付状态
- typedef NS_ENUM(NSInteger, RQWeChatPayStatus) {
- /// 默认
- RQWeChatPayStatusDefault = 0,
- /// 支付成功
- RQWeChatPayStatusSuccess = 1,
- /// 支付失败
- RQWeChatPayStatusFailed = 2,
- };
- /// 朋友圈
- /// 类型
- typedef NS_ENUM(NSUInteger, RQMomentContentType) {
- RQMomentContentTypeAttitude = 0, /// 点赞
- RQMomentContentTypeComment , /// 评论
- };
- typedef NS_ENUM(NSUInteger, RQDefaultAvatarType) {
- RQDefaultAvatarTypeSmall = 0, /// 小图 34x34
- RQDefaultAvatarTypeDefualt, /// 默认 50x50
- RQDefaultAvatarTypeBig, /// 大图 85x85
- };
- /// 占位头像
- static inline UIImage *RQDefaultAvatar(RQDefaultAvatarType type)
- {
- switch (type) {
- case RQDefaultAvatarTypeSmall:
- return [UIImage imageNamed:@"wx_avatar_default_small"];
- break;
- case RQDefaultAvatarTypeBig:
- return [UIImage imageNamed:@"wx_avatar_default_big"];
- break;
- default:
- return [UIImage imageNamed:@"wx_avatar_default"];
- break;
- }
- }
- /// 配图的占位图片
- static inline UIImage *RQPicturePlaceholder()
- {
- return [UIImage imageNamed:@"wx_timeline_image_placeholder"];
- }
- /// 全局细下滑线颜色 以及分割线颜色
- #define WXGlobalBottomLineColor [UIColor colorFromHexString:@"#D9D8D9"]
- /// 全局黑色字体
- #define WXGlobalBlackTextColor [UIColor colorFromHexString:@"#000000"]
- /// 全局灰色背景
- #define WXGlobalGrayBackgroundColor [UIColor colorFromHexString:@"#EFEFF4"]
- /// 全局分割线高度
- FOUNDATION_EXTERN CGFloat const WXGlobalBottomLineHeight;
- /// 常量定义区
- /// 头像宽高 15
- FOUNDATION_EXTERN CGFloat const RQMomentProfileViewAvatarViewWH;
- /// 消息tips宽高 40
- FOUNDATION_EXTERN CGFloat const RQMomentProfileViewTipsViewHeight ;
- /// 消息tips宽高 181
- FOUNDATION_EXTERN CGFloat const RQMomentProfileViewTipsViewWidth ;
- /// 消息tipsView内部的头像宽高 30
- FOUNDATION_EXTERN CGFloat const RQMomentProfileViewTipsViewAvatarWH ;
- /// 消息tipsView内部的头像距离tipsView边距 5
- FOUNDATION_EXTERN CGFloat const RQMomentProfileViewTipsViewInnerInset ;
- /// 消息tipsView内部的右箭头距离tipsView边距 11
- FOUNDATION_EXTERN CGFloat const RQMomentProfileViewTipsViewRightInset ;
- /// 消息tipsView内部的右箭头宽高 15
- FOUNDATION_EXTERN CGFloat const RQMomentProfileViewTipsViewRightArrowWH ;
- //// 朋友圈说说
- /// 说说内容距离顶部的间距 16
- FOUNDATION_EXTERN CGFloat const RQMomentContentTopInset;
- /// 说说内容距离左右屏幕的间距 20
- FOUNDATION_EXTERN CGFloat const RQMomentContentLeftOrRightInset;
- /// 内容(控件)之间的的间距 10
- FOUNDATION_EXTERN CGFloat const RQMomentContentInnerMargin;
- /// 用户头像的大小 44x44
- FOUNDATION_EXTERN CGFloat const RQMomentAvatarWH;
- /// 向上箭头W
- FOUNDATION_EXTERN CGFloat const RQMomentUpArrowViewWidth ;
- /// 向上箭头H
- FOUNDATION_EXTERN CGFloat const RQMomentUpArrowViewHeight ;
- /// 全文、收起W
- FOUNDATION_EXTERN CGFloat const RQMomentExpandButtonWidth ;
- /// 全文、收起H
- FOUNDATION_EXTERN CGFloat const RQMomentExpandButtonHeight ;
- /// pictureView中图片之间的的间距 6
- FOUNDATION_EXTERN CGFloat const RQMomentPhotosViewItemInnerMargin;
- /// pictureView中图片的大小 86x86 (屏幕尺寸>320)
- FOUNDATION_EXTERN CGFloat const RQMomentPhotosViewItemWH1;
- /// pictureView中图片的大小 70x70 (屏幕尺寸<=320)
- FOUNDATION_EXTERN CGFloat const RQMomentPhotosViewItemWH2;
- /// 分享内容高度
- FOUNDATION_EXTERN CGFloat const RQMomentShareInfoViewHeight;
- /// videoView高度
- FOUNDATION_EXTERN CGFloat const RQMomentVideoViewHeight ;
- /// videoView宽度
- FOUNDATION_EXTERN CGFloat const RQMomentVideoViewWidth ;
- /// 正文内容的显示最大行数(PS:如果超过最大值,那么正文内容就单行显示,可以点击正文内容查看全部内容)
- FOUNDATION_EXTERN NSUInteger const RQMomentContentTextMaxCriticalRow ;
- /// 正文内容显示(全文/收起)的临界行
- FOUNDATION_EXTERN NSUInteger const RQMomentContentTextExpandCriticalRow ;
- /// pictureView最多显示的图片数
- FOUNDATION_EXTERN NSUInteger const RQMomentPhotosMaxCount ;
- /// pictureView显示图片的最大列数
- #define RQMomentMaxCols(__photosCount) ((__photosCount==4)?2:3)
- /// 昵称字体大小
- #define RQMomentScreenNameFont RQMediumFont(16.0f)
- /// 正文字体大小
- #define RQMomentContentFont RQRegularFont_15
- /// 地址+时间+来源的字体大小
- #define RQMomentCreatedAtFont RQRegularFont_12
- ///(全文/收起)字体大小
- #define RQMomentExpandTextFont RQRegularFont_16
- /// 评论正文字体大小
- #define RQMomentCommentContentFont RQRegularFont_14
- /// 评论的昵称的字体大小
- #define RQMomentCommentScreenNameFont RQMediumFont(14.0f)
- /// 昵称字体颜色
- #define RQMomentScreenNameTextColor [UIColor colorFromHexString:@"#5B6A92"]
- /// 正文(链接、电话)的颜色
- #define RQMomentContentUrlTextColor [UIColor colorFromHexString:@"#4380D1"]
- /// 正文字体颜色
- #define RQMomentCOLOR_TEXT WXGlobalBlackTextColor
- /// 时间颜色
- #define RQMomentCreatedAtTextColor [UIColor colorFromHexString:@"#737373"]
- /// 点击文字高亮的颜色
- #define RQMomentTextHighlightBackgroundColor [UIColor colorFromHexString:@"#C7C7C7"]
- /// 单张图片的最大高度(等比例)180 (ps:别问我为什么,我量出来的)
- FOUNDATION_EXTERN CGFloat const RQMomentPhotosViewSingleItemMaxHeight;
- /// 更多按钮宽高 (实际:25x25)
- FOUNDATION_EXTERN CGFloat const RQMomentOperationMoreBtnWH ;
- /// footerViewHeight
- FOUNDATION_EXTERN CGFloat const RQMomentFooterViewHeight ;
- //// 评论和点赞view 常量
- /// 评论内容距离顶部的间距 5
- FOUNDATION_EXTERN CGFloat const RQMomentCommentViewContentTopOrBottomInset;
- /// 评论内容距离评论View左右屏幕的间距 9
- FOUNDATION_EXTERN CGFloat const RQMomentCommentViewContentLeftOrRightInset;
- /// 点赞内容距离顶部的间距 7
- FOUNDATION_EXTERN CGFloat const RQMomentCommentViewAttitudesTopOrBottomInset;
- /// 评论or点赞 view的背景色
- #define RQMomentCommentViewBackgroundColor [UIColor colorFromHexString:@"#F3F3F5"]
- /// 评论or点赞 view的选中的背景色
- #define RQMomentCommentViewSelectedBackgroundColor [UIColor colorFromHexString:@"#CED2DE"]
- /// 更多操作View的Size 181x39
- /// 更多操作View的Size 181x39
- FOUNDATION_EXTERN CGFloat const RQMomentOperationMoreViewWidth ;
- FOUNDATION_EXTERN CGFloat const RQMomentOperationMoreViewHeight ;
- /// 动画时间 .25f
- FOUNDATION_EXTERN NSTimeInterval const RQMommentAnimatedDuration;
- /**
- YYTextHighlight *highlight = [YYTextHighlight new];
- highlight.userInfo = @{kWBLinkHrefName : href};
- */
- //// 这里是点击文本链接(or其他)跳转,通过该key从userInfo中取出对应的数据
- /// 点击链接
- FOUNDATION_EXTERN NSString * const RQMomentLinkUrlKey ;
- /// 电话号码key
- FOUNDATION_EXTERN NSString * const RQMomentPhoneNumberKey ;
- /// 点击位置
- FOUNDATION_EXTERN NSString * const RQMomentLocationNameKey;
- /// 点击用户昵称
- FOUNDATION_EXTERN NSString * const RQMomentUserInfoKey;
- /// 评论View
- /** 弹出评论框View最小高度 */
- FOUNDATION_EXTERN CGFloat const RQMomentCommentToolViewMinHeight;
- /** 弹出评论框View最大高度 */
- FOUNDATION_EXTERN CGFloat const RQMomentCommentToolViewMaxHeight ;
- /** 弹出评论框View的除了编辑框的高度 */
- FOUNDATION_EXTERN CGFloat const RQMomentCommentToolViewWithNoTextViewHeight;
- //// ---------------- inline ----------------
- /// 图片的宽度 (九宫格)
- static inline CGFloat RQMomentPhotosViewItemWidth(){
- CGFloat itemW = ([UIScreen mainScreen].bounds.size.width<=320)? RQMomentPhotosViewItemWH2:RQMomentPhotosViewItemWH1;
- return itemW;
- }
- /// 单张图片的最大宽度(方形or等比例)
- static inline CGFloat RQMomentPhotosViewSingleItemMaxWidth(){
- CGFloat itemW = RQMomentPhotosViewItemWidth();
- return RQMomentPhotosViewItemInnerMargin + itemW*2;
- }
- /// 计算正文的limitWidth或者评论View的宽度
- static inline CGFloat RQMomentCommentViewWidth() {
- return ([UIScreen mainScreen].bounds.size.width - RQMomentContentLeftOrRightInset*2 -RQMomentAvatarWH - RQMomentContentInnerMargin);
- }
- static inline NSArray *RQCarTypeArray() {
- return @[@"A1-大型客车",
- @"A2-牵引车",
- @"A3-城市公交车",
- @"B1-中型客车",
- @"B2-大型货车",
- @"C1-小型汽车",
- @"C2-小型自动挡汽车",
- @"C3-低速载货汽车",
- @"C4-三轮汽车",
- @"C5-残疾人专用小型自动挡载客汽车",
- @"D-普通三轮摩托车",
- @"E-普通二轮摩托车",
- @"F-轻便摩托车",
- @"M-轮式自行机械车",
- @"N-无轨电车",
- @"P-有轨电车"];
- }
- /// 首页轮播图key
- FOUNDATION_EXTERN NSString * const RQSignUpCycleImagesKey;
- /// 首页轮播图Modelkey
- FOUNDATION_EXTERN NSString * const RQSignUpCycleModelsKey;
- /// 计时轮播图Modelkey
- FOUNDATION_EXTERN NSString * const RQTimingCycleModelsKey;
- /// 启动广告图key
- FOUNDATION_EXTERN NSString * const RQStudentWelcomeImageModelKey;
- /// 隐私政策地址
- FOUNDATION_EXTERN NSString * const RQPrivacyPolicyUrl;
- /// 公司名称
- FOUNDATION_EXTERN NSString * const RQCompanyName;
|