Commit abf45f57 by houweibin

补充

parent 19613b2d
......@@ -14,6 +14,7 @@
#import "KWMBlogDetailVC.h"
#import "KWMNewProductVC.h"
#import "KWMBrandCaramelVC.h"
#import "KWMStringUtil.h"
static NSMutableDictionary *controllerCache = nil;
......@@ -47,11 +48,15 @@ static NSMutableDictionary *controllerCache = nil;
NSLog(@"trace tags %@",[tags componentsJoinedByString:@","]);
NSArray *brands = @[@"amelie-wang",@"babywalker",@"beau-loves",@"billieblush",@"billybandit",@"bonpoint",@"burberry",@"caramel",@"chloe",@"collegien",@"dolce-gabbana",@"emile-et-ida",@"fendi",@"gucci",@"hucklebones",@"il-gufo",@"indikidual",@"karl-lagerfeld-kids",@"kenzo",@"lanvin",@"little-marc-jacobs",@"loud-apparel",@"louis-louise",@"louise-misha",@"marie-chantal",@"marni",@"mini-melissa",@"mini-rodini",@"mischka-aoki",@"moncler",@"moschino",@"msgm",@"nailmatic",@"nana-huchy",@"noukies",@"oeuf",@"patachou",@"paul-smith",@"pepe",@"sons-daughters-eyewear",@"stella-mccartney-kids",@"story-loris",@"tartine-et-chocolat",@"the-animals-observatory",@"tiny-cottons",@"veja",@"young-versace",@"zadig-voltaire"];
NSDictionary *brandNames = @{@"amelie-wang":@"Amelie Wang",@"babywalker":@"Babywalker",@"beau-loves":@"Beau Loves",@"billieblush":@"Billieblush",@"billybandit":@"Billybandit",@"bonpoint":@"Bonpoint",@"burberry":@"Burberry",@"caramel":@"Caramel",@"chloe":@"Chloé",@"dolce-gabbana":@"Dolce & Gabbana",@"emile-et-ida":@"Emile et Ida",@"fendi":@"Fendi",@"givenchy":@"Givenchy",@"gucci":@"Gucci",@"hucklebones":@"Hucklebones",@"il-gufo":@"Il Gufo",@"indikidual":@"Indikidual",@"karl-lagerfeld-kids":@"Karl Lagerfeld Kids",@"kenzo":@"Kenzo",@"lanvin":@"Lanvin",@"little-marc-jacobs":@"Little Marc Jacobs",@"loud-apparel":@"Loud Apparel",@"louis-louise":@"Louis Louise",@"louise-misha":@"Louise Misha",@"marie-chantal":@"Marie-Chantal",@"marni":@"Marni",@"mini-melissa":@"Mini Melissa",@"mini-rodini":@"Mini Rodini",@"mischka-aoki":@"Mischka Aoki",@"moncler":@"Moncler",@"moschino":@"MOSCHINO",@"msgm":@"MSGM",@"nailmatic":@"Nailmatic",@"nana-huchy":@"Nana Huchy",@"noukies":@"Noukie's",@"oeuf":@"Oeuf",@"patachou":@"Patachou",@"paul-smith":@"Paul Smith",@"pepe":@"PèPè",@"sons-daughters-eyewear":@"Sons + Daughters Eyewear",@"stella-mccartney-kids":@"Stella McCartney Kids",@"story-loris":@"Story Loris",@"tartine-et-chocolat":@"Tartine et Chocolat",@"the-animals-observatory":@"The Animals Observatory",@"tiny-cottons":@"Tiny Cottons",@"tip-toey-joey":@"Tip Toey Joey",@"veja":@"Veja",@"young-versace":@"Young Versace",@"zadig-voltaire":@"Zadig & Voltaire"};
//将handle的转化放到这里,转化之前将没转化过的handle存为标题
NSString *title = handle;
handle = [[KWMStringUtil deleteOtherCharExceptLetterWithLine:handle] lowercaseString];
if ([brands containsObject:[handle lowercaseString]]) {
KWMBrandCaramelVC *brandCaramelVC = [KWMBrandCaramelVC getNewInstance];
brandCaramelVC.isSale = NO;
brandCaramelVC.handle = handle;
brandCaramelVC.brand = brandNames[[handle lowercaseString]];
//brandCaramelVC.brand = brandNames[[handle lowercaseString]];
brandCaramelVC.brand = title;
brandCaramelVC.title = brandCaramelVC.brand;
[self pushViewController:brandCaramelVC];
[controllerCache setObject:brandCaramelVC forKey:url];
......@@ -59,7 +64,8 @@ static NSMutableDictionary *controllerCache = nil;
KWMSelectedGoodsVC * selectedGoodsVC = (KWMSelectedGoodsVC *)[KWMBaseVC findControllerBy:[KWMSelectedGoodsVC kwmTag] fromStoryboard:@"New"];
selectedGoodsVC.handle = handle;
selectedGoodsVC.ctags = tags;
selectedGoodsVC.title = parameters[@"title"];
//selectedGoodsVC.title = parameters[@"title"];
selectedGoodsVC.title = title;
[self pushViewController:selectedGoodsVC];
[controllerCache setObject:selectedGoodsVC forKey:url];
}
......
......@@ -93,10 +93,10 @@
}
- (void)initHeaderView{
self.barandSelectView = [[KWMBarandSelectView alloc]init];
self.barandSelectView.count = [[KWMShoppingCart sharedInstance] count].integerValue;
self.barandSelectView.lbBrand.text = [_brand uppercaseString];
//self.barandSelectView.lbBrand.text = [_brand uppercaseString];
self.barandSelectView.lbBrand.text = _brand;
self.barandSelectView.delegate = self;
[self.view addSubview:_barandSelectView];
[self initCustomTitleBarConstarints:self.barandSelectView];
......
......@@ -191,7 +191,9 @@ static NSString *cellId = @"KWMBrandCell";
// brandCaramelVC.backColor = [UIColor sam_colorWithHex:colorStr];
//
// [self.navigationController pushViewController:brandCaramelVC animated:YES];
brand = [[KWMStringUtil deleteOtherCharExceptLetterWithLine:brand] lowercaseString];
// brand = [[KWMStringUtil deleteOtherCharExceptLetterWithLine:brand] lowercaseString];
[self openURLWithString:[NSString stringWithFormat:@"https://www.cemarose.cn/collections/%@",brand]];
}else{
//品牌搜索
......
......@@ -246,7 +246,9 @@ static NSString *identify = @"KWMSearchBrandsCell";
NSDictionary *dict = self.dataArray[indexPath.section];
brand = [dict[@"content"] objectAtIndex:indexPath.row];
}
NSString *str = [KWMStringUtil deleteOtherCharExceptLetterWithLine:brand];
//NSString *str = [KWMStringUtil deleteOtherCharExceptLetterWithLine:brand];
NSString *str = brand;
// NSLog(@"str: %@",str);
// //品牌介绍
// KWMBrandCaramelVC *brandCaramelVC = (KWMBrandCaramelVC *)[KWMBaseVC findControllerBy:[KWMBrandCaramelVC kwmTag] fromStoryboard:@"Brand"];
......
......@@ -411,8 +411,8 @@ static NSDateFormatter *monthDayFormatter;
return rect.size;
}
//删除出字母以外的字符补充为@"-"
static NSString *kEnglishNum = @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
//删除出字母以及“-”以外的字符补充为@"-"
static NSString *kEnglishNum = @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-";
+ (NSString *)deleteOtherCharExceptLetterWithLine:(NSString *)str{
NSString *changeStr = [str stringByReplacingOccurrencesOfString:@"é" withString:@"e"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment