//
//  NSString+Image.m
//  Gengmei
//
//  Created by Mikasa on 2019/7/4.
//  Copyright © 2019 更美互动信息科技有限公司. All rights reserved.
//

#import "NSString+Image.h"
#import "UIScreen+GM.h"

@implementation NSString (Image)

/**
 * 适用于单栏展示图片
 @return 适用于单栏展示图片
 */
- (NSString *)singleColumn {
    
    return [self stringByAppendingFormat:@"%@%@",kGMSeparator,[UIScreen isThreeScale]?IMAGE_URL_FORMAT_1242x2688:IMAGE_URL_FORMAT_828x1792];
}

/**
 * 适用于双栏展示图片
 @return 双栏展示图片地址
 */
- (NSString *)doubleColumn {
    
    return [self stringByAppendingFormat:@"%@%@",kGMSeparator,[UIScreen isThreeScale]?IMAGE_URL_FORMAT_414x896:IMAGE_URL_FORMAT_279x597];
}

/**
 * 适用于三栏展示图片
 @return 三栏展示图片地址
 */
- (NSString *)threeColumn {
    
    return [self stringByAppendingFormat:@"%@%@",kGMSeparator,[UIScreen isThreeScale]?IMAGE_URL_FORMAT_414x896:IMAGE_URL_FORMAT_279x597];
}

/**
 * 适用于四栏展示图片
 @return 四栏展示图片地址
 */
- (NSString *)fourColumn {
    
    return [self stringByAppendingFormat:@"%@%@",kGMSeparator,[UIScreen isThreeScale]?IMAGE_URL_FORMAT_310x672:IMAGE_URL_FORMAT_207x448];
}

/**
 * thumbnail
 @return thumbnail图片地址
 */
- (NSString *)thumbnail {
    
    return [self stringByAppendingFormat:@"%@%@",kGMSeparator,[UIScreen isThreeScale]?IMAGE_URL_FORMAT_300x300_75:IMAGE_URL_FORMAT_200x200_75];
}

@end
