Commit 3646de87 by lee

Merge branch 'master' of git.oschina.net:kollway-kollway/newcemarose

parents 049ef3b3 5c4f2d3e
...@@ -134,15 +134,32 @@ ...@@ -134,15 +134,32 @@
-(void)initBottomViewHidden{ -(void)initBottomViewHidden{
if(self.product){ if(self.product){
NSDictionary *customerDict = [[NSUserDefaults standardUserDefaults] objectForKey:@"customer"];
BUYCustomer *customer = [[BUYCustomer alloc] initWithModelManager:self.client.modelManager JSONDictionary:customerDict];
BOOL isBusiness = customer && customer.tags &&
([self isContainString:customer.tags substring:@"BusinessGold"]
|| [self isContainString:customer.tags substring:@"BusinessPlatinum"]
|| [self isContainString:customer.tags substring:@"BusinessDiamond"]
|| [self isContainString:customer.tags substring:@"BusinessSuper"]);
NSString *productVendor = self.product.vendor ?:@""; NSString *productVendor = self.product.vendor ?:@"";
productVendor = [productVendor lowercaseString]; productVendor = [productVendor lowercaseString];
NSString *targetVendor = @"moncler"; NSString *targetVendor = @"moncler";
BOOL isShowContactUs = [productVendor isEqualToString:targetVendor]; BOOL isMoncler = [productVendor isEqualToString:targetVendor];
BOOL isShowContactUs = isMoncler && !isBusiness;
self.vBottomBar.hidden = isShowContactUs; self.vBottomBar.hidden = isShowContactUs;
self.btnContactUs.hidden = !isShowContactUs; self.btnContactUs.hidden = !isShowContactUs;
} }
} }
-(BOOL)isContainString:(NSString *)str substring:(NSString *)substring{
if([str rangeOfString:substring].location !=NSNotFound){
return true;
}else{
return false;
}
}
- (void)initShopCartCount{ - (void)initShopCartCount{
......
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