|
@@ -16,9 +16,9 @@
|
|
#import "GoodsDetailsBottomV.h"
|
|
#import "GoodsDetailsBottomV.h"
|
|
|
|
|
|
#import "GoodsInformationM.h"
|
|
#import "GoodsInformationM.h"
|
|
|
|
+#import "GoodsReviewsListM.h"
|
|
|
|
|
|
|
|
|
|
-#import "WKM_goodsBanner.h"
|
|
|
|
|
|
|
|
@interface ASGoodsDetailsViewController ()<RY_baseVMprotocol>
|
|
@interface ASGoodsDetailsViewController ()<RY_baseVMprotocol>
|
|
|
|
|
|
@@ -28,16 +28,18 @@
|
|
|
|
|
|
@property (nonatomic, strong) GoodsInformationM *model;
|
|
@property (nonatomic, strong) GoodsInformationM *model;
|
|
|
|
|
|
-@property (nonatomic, strong) WKM_goodsBanner *goodsBanner;
|
|
|
|
|
|
+//评论数据
|
|
|
|
+@property (nonatomic, strong) NSArray *reviewDataArray;;
|
|
|
|
|
|
@property (nonatomic, strong) UIView *footView;
|
|
@property (nonatomic, strong) UIView *footView;
|
|
|
|
|
|
@property (nonatomic, strong) GoodsDetailsBottomV *bottomV;
|
|
@property (nonatomic, strong) GoodsDetailsBottomV *bottomV;
|
|
//尺寸数据
|
|
//尺寸数据
|
|
@property (nonatomic, strong) NSDictionary *sizeParam;
|
|
@property (nonatomic, strong) NSDictionary *sizeParam;
|
|
|
|
+
|
|
|
|
+
|
|
//底部按钮点击类型
|
|
//底部按钮点击类型
|
|
@property (nonatomic, assign) NSInteger bottomClickType;
|
|
@property (nonatomic, assign) NSInteger bottomClickType;
|
|
-
|
|
|
|
//底部按钮点击类型
|
|
//底部按钮点击类型
|
|
@property (nonatomic, assign) BOOL isReview;
|
|
@property (nonatomic, assign) BOOL isReview;
|
|
|
|
|
|
@@ -49,6 +51,8 @@
|
|
[super viewDidLoad];
|
|
[super viewDidLoad];
|
|
|
|
|
|
[self reqNet_GoodsDetails_productGetProduct];
|
|
[self reqNet_GoodsDetails_productGetProduct];
|
|
|
|
+ [self reqNet_Goods_productGetProductsReview];
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
- (void)initSubviews {
|
|
- (void)initSubviews {
|
|
@@ -96,7 +100,7 @@
|
|
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
|
|
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
|
|
[self.VM ry_formDataRequestPostApi:Size_rewriteCartAddProducts param:params];
|
|
[self.VM ry_formDataRequestPostApi:Size_rewriteCartAddProducts param:params];
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+//商品详情信息
|
|
-(void)reqNet_GoodsDetails_productGetProduct{
|
|
-(void)reqNet_GoodsDetails_productGetProduct{
|
|
NSMutableDictionary * params = [[NSMutableDictionary alloc] init];
|
|
NSMutableDictionary * params = [[NSMutableDictionary alloc] init];
|
|
// [params setObject:@"55475" forKey:@"productId"];
|
|
// [params setObject:@"55475" forKey:@"productId"];
|
|
@@ -105,6 +109,16 @@
|
|
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
|
|
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
|
|
[self.VM ry_requestGetApi:Goods_productGetProductsById param:params];
|
|
[self.VM ry_requestGetApi:Goods_productGetProductsById param:params];
|
|
}
|
|
}
|
|
|
|
+//商品评论
|
|
|
|
+-(void)reqNet_Goods_productGetProductsReview{
|
|
|
|
+ NSMutableDictionary *params = [[NSMutableDictionary alloc]init];
|
|
|
|
+ [params setObject:self.entity_id forKey:@"pid"];
|
|
|
|
+// [params setObject:@0 forKey:@"img"];
|
|
|
|
+ [params setObject:@"Newest" forKey:@"sortreview"];
|
|
|
|
+ [params setObject:@(self.TableV.Page) forKey:@"p"];
|
|
|
|
+ [params setObject:@3 forKey:@"limit"];
|
|
|
|
+ [self.VM ry_requestGetApi:Goods_productGetProductsReview param:params];
|
|
|
|
+}
|
|
-(void)ry_respnsData:(nullable id)data
|
|
-(void)ry_respnsData:(nullable id)data
|
|
parseAry:(nullable NSMutableArray *)arry
|
|
parseAry:(nullable NSMutableArray *)arry
|
|
sucess:(BOOL)sucessOrFail
|
|
sucess:(BOOL)sucessOrFail
|
|
@@ -117,6 +131,7 @@
|
|
self.model = model;
|
|
self.model = model;
|
|
self.title = model.name;
|
|
self.title = model.name;
|
|
|
|
|
|
|
|
+ [self loadWebString];
|
|
[self updateGoodsDetailsData];
|
|
[self updateGoodsDetailsData];
|
|
} else if([mark isEqualToString:Size_rewriteCartAddProducts]) {
|
|
} else if([mark isEqualToString:Size_rewriteCartAddProducts]) {
|
|
|
|
|
|
@@ -126,6 +141,15 @@
|
|
[[Current_normalTool topViewController].navigationController pushViewController:vc animated:YES];
|
|
[[Current_normalTool topViewController].navigationController pushViewController:vc animated:YES];
|
|
}
|
|
}
|
|
}];
|
|
}];
|
|
|
|
+ } else if ([mark isEqualToString:Goods_productGetProductsReview]) {
|
|
|
|
+
|
|
|
|
+// [self.TableV configDataNew:arry has_more:arry.count==10 ? YES : NO];
|
|
|
|
+
|
|
|
|
+ self.reviewDataArray = arry;
|
|
|
|
+
|
|
|
|
+ if (self.model) {
|
|
|
|
+ [self updateGoodsDetailsData];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -154,25 +178,21 @@
|
|
NSDictionary *reviewHead = @{@"type":@"reviewHead", @"data":self.model};
|
|
NSDictionary *reviewHead = @{@"type":@"reviewHead", @"data":self.model};
|
|
[self.TableV.infodata addObject:reviewHead];
|
|
[self.TableV.infodata addObject:reviewHead];
|
|
|
|
|
|
|
|
+ //评论数据
|
|
|
|
+ [self.TableV.infodata addObjectsFromArray:self.reviewDataArray];
|
|
|
|
|
|
self.TableV.tableFooterView = nil;
|
|
self.TableV.tableFooterView = nil;
|
|
|
|
|
|
} else {
|
|
} else {
|
|
- [self loadWebString];
|
|
|
|
|
|
+ self.TableV.tableFooterView = _footView;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
[self.TableV reloadData];
|
|
[self.TableV reloadData];
|
|
}
|
|
}
|
|
|
|
|
|
- (void)loadWebString {
|
|
- (void)loadWebString {
|
|
_footView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 0.001)];
|
|
_footView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 0.001)];
|
|
-
|
|
|
|
- self.TableV.tableFooterView = _footView;
|
|
|
|
-
|
|
|
|
|
|
+
|
|
ASGoodsIntrouduceWebView *webInfoView = [[ASGoodsIntrouduceWebView alloc] initWithFrame:CGRectZero];
|
|
ASGoodsIntrouduceWebView *webInfoView = [[ASGoodsIntrouduceWebView alloc] initWithFrame:CGRectZero];
|
|
[_footView addSubview:webInfoView];
|
|
[_footView addSubview:webInfoView];
|
|
[webInfoView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[webInfoView mas_makeConstraints:^(MASConstraintMaker *make) {
|