Commit 7ba20fed by houweibin

详情页404 toast问题

parent 2664fe89
......@@ -271,6 +271,8 @@
}
self.product = product;
self.productId = product.identifier;
self.colorMeterfield = nil;
self.adminProduct = nil;
[self.scrollView setContentOffset:CGPointMake(0, 0) animated:YES];
[self initView];
[self clearSelect];
......@@ -356,11 +358,17 @@
[weakSelf showError:error];
}else if(product){
weakSelf.product = product;
weakSelf.productId = product.identifier;
[weakSelf initMidViewHight];
weakSelf.midDetailView.product = product;
[weakSelf.detailView1 setData:product];
[self requestBrandProducts:1];
[self requestCategoryProducts:1];
if(self.handle){
[self requestAdminProduct];
[self requestColorMetafield];
}
}
};
if (self.handle) {
......@@ -429,6 +437,9 @@
#pragma mark -- API KWMApimanager
-(void)requestAdminProduct{
NSNumber *productId = self.product?self.product.identifier:self.productId;
if(!productId){
return;
}
__weak KWMNewProductVC *weakSelf = self;
void(^failure)(NSURLSessionDataTask *,NSError *) = ^(NSURLSessionDataTask *task,NSError *error){
};
......@@ -444,9 +455,12 @@
-(void)requestColorMetafield{
NSNumber *productId = self.product?self.product.identifier:self.productId;
if(!productId){
return;
}
__weak KWMNewProductVC *weakSelf = self;
void(^failure)(NSURLSessionDataTask *,NSError *) = ^(NSURLSessionDataTask *task,NSError *error){
[weakSelf showError:error];
// [weakSelf showError:error];
};
void(^success)(NSURLSessionDataTask *,KWMMetafieldResult *) = ^(NSURLSessionDataTask *task,KWMMetafieldResult *result){
if(!result.metafields){
......
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