Commit c8928867 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

DrawOrder

parent 8c5e4cba
...@@ -72,27 +72,6 @@ ...@@ -72,27 +72,6 @@
[super layoutSubviews]; [super layoutSubviews];
} }
- (void)refreshDataSource{
[[CGNetworkTools shared] getWithAction:getOrderInfo parameters:@{} success:^(id _Nonnull response) {
NSDictionary * orderDic = [[response objectForKey:@"result"] objectForKey:@"data"];
GYOrderInfoModel * model = [[GYOrderInfoModel alloc] init];
[model setValuesForKeysWithDictionary:orderDic];
model.orderDetailModels = [NSMutableArray new];
for (NSDictionary * dic in model.farmOrderDataList){
GYOrderDetailsModel * detailsModel = [[GYOrderDetailsModel alloc] init];
[detailsModel setValuesForKeysWithDictionary:dic];
[model.orderDetailModels addObject:detailsModel];
}
self.model = model;
} failure:^(NSError * _Nonnull error) {
}];
}
- (IBAction)cancelBtn:(UIButton *)sender{ - (IBAction)cancelBtn:(UIButton *)sender{
[self dismiss]; [self dismiss];
} }
......
...@@ -131,6 +131,9 @@ NSDictionary* appLaunchOpts; ...@@ -131,6 +131,9 @@ NSDictionary* appLaunchOpts;
[[[self ufw] appController].window addSubview:order]; [[[self ufw] appController].window addSubview:order];
[order show:nil]; [order show:nil];
Data * data = [[Data alloc] init];
[data WirteDic:[NSString stringWithFormat:@"%ld", (long)model.status] Key:@"OrderStatus"];
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
}]; }];
...@@ -333,6 +336,12 @@ NSDictionary* appLaunchOpts; ...@@ -333,6 +336,12 @@ NSDictionary* appLaunchOpts;
NSData *data = [NSJSONSerialization dataWithJSONObject:[[response objectForKey:@"result"] objectForKey:@"data"] options:NSJSONWritingFragmentsAllowed error:nil]; NSData *data = [NSJSONSerialization dataWithJSONObject:[[response objectForKey:@"result"] objectForKey:@"data"] options:NSJSONWritingFragmentsAllowed error:nil];
NSString * jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSString * jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
[[self ufw] sendMessageToGOWithName: "GameManager" functionName: "onOrderListSuccess" message: [jsonStr UTF8String]]; [[self ufw] sendMessageToGOWithName: "GameManager" functionName: "onOrderListSuccess" message: [jsonStr UTF8String]];
GYOrderInfoModel * model = [[GYOrderInfoModel alloc] init];
[model setValuesForKeysWithDictionary:[[response objectForKey:@"result"] objectForKey:@"data"]];
Data * dataPlist = [[Data alloc] init];
[dataPlist WirteDic:[NSString stringWithFormat:@"%ld", (long)model.status] Key:@"OrderStatus"];
} }
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
...@@ -341,6 +350,12 @@ NSDictionary* appLaunchOpts; ...@@ -341,6 +350,12 @@ NSDictionary* appLaunchOpts;
// 订单领取 // 订单领取
- (void)ios_getOrderReceive { - (void)ios_getOrderReceive {
Data * dataPlist = [[Data alloc] init];
if (![[[dataPlist Read] objectForKey:@"OrderStatus"] isEqualToString:@"1"]) {
return;
}
[[CGNetworkTools shared] postWithAction:DrawOrder parameters:@{} success:^(id _Nonnull response) { [[CGNetworkTools shared] postWithAction:DrawOrder parameters:@{} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] integerValue] == 200) { if ([[response objectForKey:@"status"] integerValue] == 200) {
NSData *data = [NSJSONSerialization dataWithJSONObject:[[response objectForKey:@"result"] objectForKey:@"data"] options:NSJSONWritingFragmentsAllowed error:nil]; NSData *data = [NSJSONSerialization dataWithJSONObject:[[response objectForKey:@"result"] objectForKey:@"data"] options:NSJSONWritingFragmentsAllowed error:nil];
......
...@@ -14,14 +14,14 @@ ...@@ -14,14 +14,14 @@
#ifndef GYPrefixHeader_pch #ifndef GYPrefixHeader_pch
#define GYPrefixHeader_pch #define GYPrefixHeader_pch
#define ServerReport @"http://reporttest.zhangxinhulian.com" //#define ServerReport @"http://reporttest.zhangxinhulian.com"
#define ServerHost @"https://feedapitest.zhangxinhulian.com" // 服务端接口地址 //#define ServerHost @"https://feedapitest.zhangxinhulian.com" // 服务端接口地址
#define ServerAds @"https://bs.zhangxinhulian.com/v3/ads"
//#define ServerReport @"http://report.zhangxinhulian.com"
//#define ServerHost @"https://feedapi.zhangxinhulian.com" // 服务端接口地址
//#define ServerAds @"https://bs.zhangxinhulian.com/v3/ads" //#define ServerAds @"https://bs.zhangxinhulian.com/v3/ads"
#define ServerReport @"http://feedapi.clouddistribute.net"
#define ServerHost @"https://feedapi.clouddistribute.net" // 服务端接口地址
#define ServerAds @"https://bs.zhangxinhulian.com/v3/ads"
#define saltA @"HXHJ4KDL1QPFHGA0" // md5盐值 #define saltA @"HXHJ4KDL1QPFHGA0" // md5盐值
#define saltB @"ZJQJQ66AH9COTXSU" #define saltB @"ZJQJQ66AH9COTXSU"
......
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