CommonMacros.h 1.82 KB
Newer Older
zhukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
//
//  CommonMacros.h
//  MiAiApp
//
//  Created by 徐阳 on 2017/5/31.
//  Copyright © 2017年 徐阳. All rights reserved.
//

//全局标记字符串,用于 通知 存储

#ifndef CommonMacros_h
#define CommonMacros_h

#pragma mark - ——————— 用户相关 ————————
//登录状态改变通知
#define KNotificationLoginStateChange @"loginStateChange"

//自动登录成功
#define KNotificationAutoLoginSuccess @"KNotificationAutoLoginSuccess"

//被踢下线
#define KNotificationOnKick @"KNotificationOnKick"

//刷新首页
#define KNotificationRefreshHomePage @"KNotificationRefreshHomePage"

//刷新个人中心
#define KNotificationRefreshMine @"KNotificationRefreshMine"

//极光推送appkey
#define kJpushAppKey @"c615f9281b94618927b47c83"


//用户信息缓存 名称
#define KUserCacheName @"KUserCacheName"

//用户model缓存
#define KUserModelCache @"KUserModelCache"

/*沙盒目录下缓存资源文件目录 */
#define kFileCacheDirectory [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES).firstObject stringByAppendingPathComponent:@"ZCMerchantFileDirectory"]
/*沙盒目录下缓存数据文件目录 */
#define kDataCacheDirectory [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES).firstObject stringByAppendingPathComponent:@"ZCMerchantDataDirectory"]
/*沙盒目录下缓存图片的名字,时间格式到毫秒后一位 */
#define kDocImageName @"yyyyMMddHHmmssSSSS"

#define kSTRING(value) [NSString valueToString:value]//任意类型转换成字符串
#define kLocalFilePath(filePath) [ZCTool getFullFilePathWithFileName:filePath]

#pragma mark - ——————— 网络状态相关 ————————

//网络状态变化
#define KNotificationNetWorkStateChange @"KNotificationNetWorkStateChange"

#endif /* CommonMacros_h */