//
//  Tools.h
//  Open
//
//  Created by 雷俊博 on 2019/6/30.
//  Copyright © 2019 黄江涛 . All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SSKeychain.h"

NS_ASSUME_NONNULL_BEGIN

@interface Tools : NSObject
//打开链接
+(void)openWebUrl:(UIViewController *)controller:(NSString *)openUrl;

//打开URi
+(void)openUri:(NSString *)openUri;

//是否安装支付宝
+(BOOL)isInstallAlipay;
//打开微信小程序
+ (void)smallProgram:(NSString *)wxId:(NSString *)wxPath;
//版本号
+(NSString*)getVersionCode;
//动态菜单url
+(NSString*)getMenuRequestUrl;
//验证字符串是否为空
+(BOOL)isBlankString:(NSString *)aStr;

+ (NSString *)ValidblankString:(NSString *)string;
/**
 判断传入的字符串是否是规则的手机号
 
 @param mobileNumString 传入的字符串
 @return 返回判断值
 */
+ (BOOL)isMobileNumber:(NSString *)mobileNumString;

+ (void)showMessage:(NSString *)message;

+ (BOOL)isChinese:(NSString*)text;//判断是否是纯汉字

+ (NSInteger)genderOfIDNumber:(NSString *)IDNumber;

+ (UIImage *)convertViewToImage:(UIView *)view;

//转换成固定格式的时间字符串
+ (NSString *)timeFromTimestr:(NSString *)timestr;

//获取当前时间时间戳
+(NSString*)getCurrentTimes;

+ (UIViewController *)jsd_findVisibleViewController;
//验证字符串是否为空
+(BOOL)isBlankString:(NSString *)aStr;

//大写转小写
+(NSString *)stringToLower:(NSString *)str;
//小写转大写
+(NSString *)stringToUpper:(NSString *)str;

//base64解密
+ (NSDictionary *)dencode:(NSString *)base64String;
//Json字符串转字典
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
//判断是否是银行卡号
+ (BOOL) IsBankCard:(NSString *)cardNumber;
+ (NSString *)getDeviceUUID;
+ (NSString *)getDeviceOaid;
+ (long ) getAllSpace;
+ (long ) getCanUseSpace;
+ (BOOL)dx_isNullOrNilWithObject:(id)object;
+(NSString *)getGBString:(long)space;
//判断字母和数字组合
+(BOOL)detectionIsPasswordQualified:(NSString *)patternStr;

//毫秒级时间戳
+(NSString *)getNowTimeTimestamp;

+(long)getNowTimeTimesLong;

// 判断是否是同一天
+ (BOOL)isSameDay:(NSDate*)date1 date2:(NSDate*)date2;

//获取阳历日期
+ (NSString *)getInternationDate;

//获取阴历日期
+ (NSString *)getLunarDate;
@end

NS_ASSUME_NONNULL_END
