Commit bbac9510 authored by 曹云霄's avatar 曹云霄

修改项说明:

parent 7ba8658e
......@@ -214,6 +214,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
[weakSelf.promotionInformationArray removeAllObjects];
[weakSelf.guidePromotionArray removeAllObjects];
[weakSelf.customerPromotionArray removeAllObjects];
NSArray *promotionalArray = returnValue[@"data"][@"actions"];
for (NSDictionary *dict in promotionalArray) {
NSString *type = dict[@"type"];
......@@ -262,6 +264,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
[weakSelf.promotionInformationArray removeAllObjects];
[weakSelf.guidePromotionArray removeAllObjects];
[weakSelf.customerPromotionArray removeAllObjects];
NSArray *promotion = returnValue[@"data"];
for (NSDictionary *dict in promotion) {
TOOrderPromotionEntity *oldPromotion = [[TOOrderPromotionEntity alloc]initWithDictionary:dict error:nil];
......@@ -295,13 +299,13 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
model.total = [oldPromotion.jdecardDenomation integerValue];
model.body = GUIDE;
model.type = JDECardAction;
[weakSelf.promotionInformationArray addObject:model];
[weakSelf.guidePromotionArray addObject:model];
} else if (![BaseViewController isBlankString:[oldPromotion.redPackageCount stringValue]]) {
// 导购抽奖数
PromotionLuckyDrawModel *model = [[PromotionLuckyDrawModel alloc]init];
model.body = GUIDE;
[weakSelf.promotionInformationArray addObject:model];
[weakSelf.guidePromotionArray addObject:model];
} else if (![BaseViewController isBlankString:[oldPromotion.discountRate stringValue]]) {
// 抽奖折扣
PromotionLuckyDrawModel *model = [[PromotionLuckyDrawModel alloc]init];
......@@ -706,7 +710,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
- (void)queryGuideLuckyDrawChanceisTrue:(void(^)())finish
{
// 查询是否有导购抽奖机会
for (id object in self.promotionInformationArray) {
for (id object in self.guidePromotionArray) {
if ([object isKindOfClass:[PromotionLuckyDrawModel class]]) {
PromotionLuckyDrawModel *model = (PromotionLuckyDrawModel *)object;
if ([model.body isEqualToString:GUIDE]) {
......@@ -750,7 +754,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
/// 刷新数据成功
[weakSelf getOrderDetailsData:^{
// 先判断促销中有无京东E卡,有则认为发放成功
for (id object in weakSelf.promotionInformationArray) {
for (id object in weakSelf.guidePromotionArray) {
if ([object isKindOfClass:[PromotionJDECardModel class]]) {
PromotionJDECardModel *model = (PromotionJDECardModel *)object;
if ([model.body isEqualToString:GUIDE] && [model.type isEqualToString:JDECardAction]) {
......
......@@ -29,7 +29,7 @@
}else if ([promotionModel isMemberOfClass:[PromotionalDeductionModel class]]) {
//抵扣
PromotionalDeductionModel *deductionModel = (PromotionalDeductionModel *)promotionModel;
self.promotionalTitleLabel.text = [NSString stringWithFormat:@"抵扣: %@",deductionModel.descriptionString];
self.promotionalTitleLabel.text = [NSString stringWithFormat:@"抵扣金额: %ld元",deductionModel.total];
}else if ([promotionModel isMemberOfClass:[PromotionLuckyDrawModel class]]) {
//抽奖
self.promotionalTitleLabel.text = [NSString stringWithFormat:@"转盘抽奖: %@",self.model.descriptionString];
......
......@@ -414,8 +414,8 @@
}
}
order.jdCardDenomation = totalNumber;
// 查询是否有客户抽奖
for (id object in self.guidePromotionArray) {
// 查询是否有消费者抽奖
for (id object in self.consumerPromotionalArray) {
if ([object isKindOfClass:[PromotionLuckyDrawModel class]]) {
PromotionLuckyDrawModel *model = (PromotionLuckyDrawModel *)object;
if ([model.body isEqualToString:CONSUMER]) {
......
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