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

修改项说明:优化抽奖机会提示,协调和卡劵提示的关系

parent 63f30440
......@@ -357,10 +357,10 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
#pragma mark - 卡劵领取成功
- (void)rebateApplySuccess
- (void)rebateApplySuccess:(NSString *)message
{
RebateSuccessTableViewController *success = [self.getStoryboardWithName instantiateViewControllerWithIdentifier:@"RebateSuccessTableViewController"];
success.titleArray = @[@"卡劵已发放到你的账户",@"查看账户",@"我知道了"];
success.titleArray = @[message,@"查看账户",@"我知道了"];
[success setClickEvent:^(NSIndexPath *indexPath) {
if (indexPath.row == 1) {
/// 我知道了
......@@ -520,16 +520,18 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
///支付成功
WS(weakSelf);
[settlement setPaySuccessReturnBlock:^{
/// 支付完成后若导购有抽奖机会需要提示导购
[weakSelf queryGuideLuckyDrawChanceisTrue:^{
[[NSNotificationCenter defaultCenter] postNotificationName:PROMPTDRAWINFORMATION object:@(1)];
}];
if (weakSelf.DelecteAndPayButtonBlock) {
weakSelf.DelecteAndPayButtonBlock(_cellindex,PAYSUCCESS);
}
[weakSelf SuccessMBProgressView:@"支付成功"];
weakSelf.isShowPayButton = NO;
weakSelf.isUserInteractionEnabled = NO;
weakSelf.isShowHeaderView = YES;
[weakSelf CreateTableviewHeaderView];
weakSelf.orderDetailsTableview.tableFooterView = nil;
__block BOOL isJDEcard;//促销中是否有京东E卡;
__block BOOL isGuideDraw;//促销中是否有导购抽奖机会
/// 刷新数据成功
[weakSelf getOrderDetailsData:^{
/// 先判断促销中有无E卡,有则认为发放成功
......@@ -537,13 +539,22 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
if ([object isKindOfClass:[PromotionalDeductionModel class]]) {
PromotionalDeductionModel *model = (PromotionalDeductionModel *)object;
if ([model.body isEqualToString:GUIDE] && [model.type isEqualToString:JDECardAction]) {
[weakSelf rebateApplySuccess];break;
isJDEcard = YES;break;
}
}
}
/// 查询导购抽奖机会
[weakSelf queryGuideLuckyDrawChanceisTrue:^{
isGuideDraw = YES;
}];
}];
if (weakSelf.DelecteAndPayButtonBlock) {
weakSelf.DelecteAndPayButtonBlock(_cellindex,PAYSUCCESS);
/// 弹出框
if (isJDEcard && isGuideDraw) {
[weakSelf rebateApplySuccess:@"京东E卡、抽奖机会已放到你的账户"];
}else if (isJDEcard && !isGuideDraw) {
[weakSelf rebateApplySuccess:@"京东E卡已放到你的账户"];
}else if (!isJDEcard && isGuideDraw) {
[weakSelf rebateApplySuccess:@"抽奖机会已放到你的账户"];
}
}];
}
......
......@@ -407,7 +407,6 @@
order.orderdetailList = (NSArray<TOOrderdetailEntity> *)goodidArr;
[self CreateMBProgressHUDLoding];
WS(weakSelf);
NSLog(@"%@",[order toDictionary]);
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(CREATEORDER) WithCallClass:weakSelf WithRequestType:0 WithParameter:order WithReturnValueBlock:^(id returnValue) {
[weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
......@@ -44,6 +44,18 @@
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
/**
* 禁止所有的打印,打包时使用
*/
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#define debugMethod() NSLog(@"%s", __func__)
#else
#define NSLog(...)
#define debugMethod()
#endif
/**
* AppDelegate代理
*/
......
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