12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- //
- // AS_GoodsDetailsC.m
- // Asteria
- //
- // Created by 王猛 on 2023/5/6.
- //
- #import "AS_GoodsDetailsC.h"
- #import "GoodsDetailSrcView.h"
- #import "GoodsDetailsVM.h"
- @interface AS_GoodsDetailsC ()<TT_BaseScrollViewDelegate>
- @property (nonatomic, strong) GoodsDetailSrcView *scrV;
- @property (nonatomic, strong) GoodsInformationM *model;
- @end
- @implementation AS_GoodsDetailsC
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self reqNet_GoodsDetails_productGetProduct];
-
- }
- - (void)initSubviews{
- [super initSubviews];
- [self.view addSubview:self.scrV];
-
- }
- - (void)viewDidLayoutSubviews{
- IPhoneXHeigh
- [self.scrV mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.right.bottom.mas_equalTo(0);
- make.top.mas_equalTo(securitytop_Y);
- make.bottom.mas_equalTo(-65-securityBottom_H);
- }];
- }
- - (void)ucm_bindvmmodel{
- [self ucm_setupvm:[GoodsDetailsVM class]];
- }
- -(void)reqNet_GoodsDetails_productGetProduct{
- NSMutableDictionary * params = [[NSMutableDictionary alloc] init];
- // [params setObject:self.entity_id forKey:@"entity_id"];
- [params setObject:@"48187" forKey:@"entity_id"];
- [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- [self ucm_confignetworkforname:GoodsDetails_productGetProduct params:params vmClass:[GoodsDetailsVM class]];
- }
- - (void)ucm_vcResponseAllData:(UCMHttpRequestResponse *)allData Data:(NSMutableArray *)Data is_showmsg:(BOOL)is_showmsg is_list:(BOOL)is_list SucessORfail:(BOOL)SucessORfail has_more:(BOOL)has_more mark:(NSString *)mark extend_info:(NSDictionary *)extend_info{
- [MBProgressHUD hideHUDForView:self.view animated:YES];
- if(!SucessORfail){
- if([mark isEqualToString:GoodsDetails_productGetProduct]){
- [self.view makeToast:allData.ucm_responseMessage duration:2 position:CSToastPositionCenter title:@"" image:nil style:nil completion:^(BOOL didTap) {
- [self.navigationController popViewControllerAnimated:YES];
- }];
- }else{
- [self.view makeToast:allData.ucm_responseMessage duration:2 position:CSToastPositionCenter];
- }
- return;
- }
- if([mark isEqualToString:GoodsDetails_productGetProduct]){
- GoodsInformationM *model =[Data firstObject];
- self.title = model.title;
- // double totalPay = [model.price stringByReplacingOccurrencesOfString:model.price_unit withString:@""].doubleValue;
- self.model = model;
- [self.scrV tt_configData:model];
- }
- }
- - (GoodsDetailSrcView *)scrV {
- if (!_scrV) {
- _scrV = [[GoodsDetailSrcView alloc] init];
- _scrV.TTscrolldelegate = self;
- }
- return _scrV;
- }
- @end
|