Commit 63f30440 authored by 曹云霄's avatar 曹云霄

修改项说明:

parent c896772f
......@@ -328,24 +328,23 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
}
/// 默认弹出支付框
if (weakSelf.isShowPayButton && [weakSelf.orderDetails.order.orderState isEqualToString:NOTPAY]) {
if (weakSelf.luckyDrawAndJDECardArray.count) {
for (id object in weakSelf.luckyDrawAndJDECardArray) {
if ([object isKindOfClass:[LuckyDrawModel class]] && !resultModel) {
[weakSelf queryConsumerLuckyDrawChance:object];
}else {
[weakSelf payButtonClickAction];
}
/// 区分导购抽奖和消费者抽奖
if ([object isKindOfClass:[LuckyDrawModel class]]) {
LuckyDrawModel *model = object;
if ([model.body isEqualToString:CONSUMER]) {
break;
}
/// 找出客户抽奖
for (int i=0;i<weakSelf.luckyDrawAndJDECardArray.count;i++) {
id object = weakSelf.luckyDrawAndJDECardArray[i];
if ([object isKindOfClass:[LuckyDrawModel class]] && !resultModel) {
LuckyDrawModel *model = (LuckyDrawModel *)object;
if ([model.body isEqualToString:CONSUMER]) {
[weakSelf queryConsumerLuckyDrawChance:model];
break;
}
}
}else {
/// 无促销的情况
/// 有促销无抽奖情况
if (i == weakSelf.luckyDrawAndJDECardArray.count-1) {
[weakSelf payButtonClickAction];
}
}
/// 无促销情况
if (!weakSelf.luckyDrawAndJDECardArray.count) {
[weakSelf payButtonClickAction];
}
}
......@@ -469,26 +468,24 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
- (void)queryConsumerLuckyDrawChance:(LuckyDrawModel *)model
{
WS(weakSelf);
if ([model.body isEqualToString:CONSUMER]) {
UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:nil message:@"恭喜您获得一次大转盘抽奖机会!" preferredStyle:UIAlertControllerStyleAlert];
[alertControl addAction:[UIAlertAction actionWithTitle:@"马上参与" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[weakSelf showLuckyDrawControl:model.lottery.uuid andOrderNumber:weakSelf.orderCode luckyDrawFinish:^(NSDictionary *dict) {
id json = [NSJSONSerialization JSONObjectWithData:[dict[@"body"] dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:nil];
if (json) {
if ([json isKindOfClass:[NSDictionary class]]) {
weakSelf.customerDrawModel = [[LuckDrawResultModel alloc]initWithDictionary:json error:nil];
if ([BaseViewController isBlankString:weakSelf.customerDrawModel.awardId]) {
[weakSelf SHOWPrompttext:@"未中奖"];
}else {
[weakSelf SHOWPrompttext:[NSString stringWithFormat:@"恭喜你获得了 %@",weakSelf.customerDrawModel.descriptionString]];
}
UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:nil message:@"恭喜您获得一次大转盘抽奖机会!" preferredStyle:UIAlertControllerStyleAlert];
[alertControl addAction:[UIAlertAction actionWithTitle:@"马上参与" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[weakSelf showLuckyDrawControl:model.lottery.uuid andOrderNumber:weakSelf.orderCode luckyDrawFinish:^(NSDictionary *dict) {
id json = [NSJSONSerialization JSONObjectWithData:[dict[@"body"] dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:nil];
if (json) {
if ([json isKindOfClass:[NSDictionary class]]) {
weakSelf.customerDrawModel = [[LuckDrawResultModel alloc]initWithDictionary:json error:nil];
if ([BaseViewController isBlankString:weakSelf.customerDrawModel.awardId]) {
[weakSelf SHOWPrompttext:@"未中奖"];
}else {
[weakSelf SHOWPrompttext:[NSString stringWithFormat:@"恭喜你获得了 %@",weakSelf.customerDrawModel.descriptionString]];
}
}
return;
}];
}]];
[self presentViewController:alertControl animated:YES completion:nil];
}
}
return;
}];
}]];
[self presentViewController:alertControl animated:YES completion:nil];
}
#pragma mark - 查询导购抽奖机会
......
......@@ -48,7 +48,7 @@ static NetworkRequestClassManager *manager = nil;
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.responseSerializer = [AFJSONResponseSerializer serializer];
manager.requestSerializer = [AFJSONRequestSerializer serializer];
manager.requestSerializer.timeoutInterval = 10.0f;
manager.requestSerializer.timeoutInterval = 60.0f;
[manager.requestSerializer setValue:@"application/json;charset=utf-8" forHTTPHeaderField: @"Content-Type"];
return manager;
}
......
......@@ -118,7 +118,7 @@
/**
* 服务器开发地址
*/
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
/**
......@@ -129,7 +129,7 @@
///**
// * 服务器正式地址
// */
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg.opple.com/opple-web/app%@",URL]
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg.opple.com/opple-web/app%@",URL]
/**
* 搜索框输入通知
......
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