1
0

2 کامیت‌ها 13fa992293 ... 1a5c841cba

نویسنده SHA1 پیام تاریخ
  Abel 1a5c841cba Merge branch 'master' of http://gogs.hnwmzp.cn/nzk1/Asteria-APP 1 سال پیش
  Abel 26024e0be4 评论,地址,积分跳转 1 سال پیش

+ 1 - 0
Asteria/ASUI/SimpleBase/ASBaseViewController.h

@@ -49,6 +49,7 @@ NS_ASSUME_NONNULL_BEGIN
 -(void)action_GoodsSizeC:(NSString *)entity_id;
 -(void)action_GoodsSizeC:(NSString *)entity_id;
 
 
 - (void)backAction;
 - (void)backAction;
+- (void)toOrderListVc;
 
 
 @end
 @end
 
 

+ 6 - 0
Asteria/ASUI/SimpleBase/ASBaseViewController.m

@@ -8,6 +8,7 @@
 #import "ASBaseViewController.h"
 #import "ASBaseViewController.h"
 #import "AppDelegate.h"
 #import "AppDelegate.h"
 #import "GoodsInformationM.h"
 #import "GoodsInformationM.h"
+#import "ASOrderListViewController.h"
 
 
 @interface ASBaseViewController ()
 @interface ASBaseViewController ()
 
 
@@ -153,6 +154,11 @@
     [tabVC presentViewController:uikitNavController animated:YES completion:nil];
     [tabVC presentViewController:uikitNavController animated:YES completion:nil];
 }
 }
 
 
+- (void)toOrderListVc {
+    ASOrderListViewController *orderC = [[ASOrderListViewController alloc]init];
+    [self.navigationController pushViewController:orderC animated:true];
+}
+
 - (void)toLoginVC {
 - (void)toLoginVC {
     UIViewController *loginC = [[CTMediator sharedInstance] Login_LoginC:@{}];
     UIViewController *loginC = [[CTMediator sharedInstance] Login_LoginC:@{}];
     
     

+ 18 - 1
Asteria/Fuction/Category/vm/KWHisAndHotWordsViewModel.m

@@ -31,10 +31,27 @@ static NSString *localSearchList = @"localSearchList";
     __weak typeof(self) weakSelf = self;
     __weak typeof(self) weakSelf = self;
     [ASNetTools.shared getWithPath:getLinkingKey param:@{@"q":key} success:^(id _Nonnull json) {
     [ASNetTools.shared getWithPath:getLinkingKey param:@{@"q":key} success:^(id _Nonnull json) {
         NSLog(@"------url:%@---json:%@------", getHotList, json);
         NSLog(@"------url:%@---json:%@------", getHotList, json);
-        
+        NSArray *arr = json;
+        NSMutableArray *result = [NSMutableArray array];
+        if ([arr isKindOfClass:[NSArray class]]) {
+            NSDictionary *dic = arr.firstObject;
+            if ([dic isKindOfClass:[NSDictionary class]] && [dic.allKeys containsObject:@"data"]) {
+                NSArray *tempPros = dic[@"data"];
+                if ([tempPros isKindOfClass:[NSArray class]]) {
+                    for (int i=0; i<tempPros.count; i++) {
+                        NSString *name = [NSString stringWithFormat:@"%@", tempPros[i][@"name"] ];
+                        if (name != nil) {
+                            [result addObject:name];
+                        }
+                    }
+                }
+            }
+        }
+        self.aboutKeys = result;
         success();
         success();
     } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
     } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
         NSLog(@"------url:%@---code:%@---msg:%@---", getHotList, code, msg);
         NSLog(@"------url:%@---code:%@---msg:%@---", getHotList, code, msg);
+        self.aboutKeys = @[];
         success();
         success();
     }];
     }];
 }
 }

+ 13 - 17
Asteria/Fuction/Goods/Revies/GoodsReviewsWriteC.m

@@ -221,26 +221,22 @@ RY_baseVMprotocol>
 -(void)reqNet_upload:(UIImage *)img{
 -(void)reqNet_upload:(UIImage *)img{
     NSData *imageData = UIImageJPEGRepresentation(img, 0.6);
     NSData *imageData = UIImageJPEGRepresentation(img, 0.6);
     NSString *dataStr = [imageData base64EncodedStringWithOptions:0];
     NSString *dataStr = [imageData base64EncodedStringWithOptions:0];
+    //前面必须加上data:image/png;base64,
+    NSString *base64String = [NSString stringWithFormat:@"data:image/png;base64,%@",dataStr];
     NSMutableDictionary *params = [NSMutableDictionary dictionary];
     NSMutableDictionary *params = [NSMutableDictionary dictionary];
-    [params setObject:dataStr forKey:@"image_video[]"];
+    [params setObject:base64String forKey:@"image_video[]"];
     [MBProgressHUD showHUDAddedTo:self.view animated:YES];
     [MBProgressHUD showHUDAddedTo:self.view animated:YES];
-    NSString *reqUrl = RequestAllUrl(Reivews_rewriteProductAddImg);
-    [PPNetworkHelper uploadImagesWithURL:reqUrl parameters:@{} name:@"image_video[]" images:@[img] fileNames:nil imageScale:0.6 imageType:nil progress:^(NSProgress *progress) {
-        
-    } success:^(id responseObject) {
-        [MBProgressHUD hideHUDForView:self.view animated:YES];
-        if(RequestSuccess){
-            [self.view makeToast:@"Sucess" duration:2 position:CSToastPositionCenter];
-            NSDictionary *dataDic = responseObject[@"data"];
-            [self.xxx_imgUrlAry addObject:dataDic[@"image_video"]];
-        }else{
-            [self.view makeToast:RequestMsg duration:2 position:CSToastPositionCenter];
-        }
-        
-    } failure:^(NSError *error) {
-        [MBProgressHUD hideHUDForView:self.view animated:YES];
-        [self.view makeToast:ReqNetWorkFaild duration:2 position:CSToastPositionCenter];
+    __weak typeof(self) weakSelf = self;
+    [ASNetTools.shared formData_postWithPath:Reivews_rewriteProductAddImg param:params success:^(id _Nonnull json) {
+        [MBProgressHUD hideHUDForView:weakSelf.view animated:YES];
+        [weakSelf.xxx_imgUrlAry addObject:json[@"image_video"]];
+    } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+        [MBProgressHUD hideHUDForView:weakSelf.view animated:YES];
+        [weakSelf.view makeToast:msg];
     }];
     }];
+    
+    
+
 }
 }
 
 
 -(void)handle_postCommentEvent:(UIButton *)btn{
 -(void)handle_postCommentEvent:(UIButton *)btn{

+ 1 - 1
Asteria/Fuction/Goods/VM/ASGoodsDetailsVM.h

@@ -15,7 +15,7 @@
 ///评论点赞
 ///评论点赞
 #define Reviews_rewriteProductAddReviewzan BaseRequestrUrl(@"rewrite/product/addReviewzan")
 #define Reviews_rewriteProductAddReviewzan BaseRequestrUrl(@"rewrite/product/addReviewzan")
 ///添加评论图片
 ///添加评论图片
-#define Reivews_rewriteProductAddImg  BaseRequestrUrl(@"rewrite/product/addImg")
+#define Reivews_rewriteProductAddImg  BaseRequestrUrl(@"rewrite/product/addImgBase64")
 ///添加评论
 ///添加评论
 #define Reviews_rewriteProductAddReview BaseRequestrUrl(@"rewrite/product/addReview")
 #define Reviews_rewriteProductAddReview BaseRequestrUrl(@"rewrite/product/addReview")
 
 

+ 6 - 3
Asteria/Fuction/Home/ASProductListViewController.m

@@ -192,8 +192,7 @@
     }
     }
     
     
     ASProductBaseModel *m = self.vm.productList[indexPath.row-tempOff];
     ASProductBaseModel *m = self.vm.productList[indexPath.row-tempOff];
-    UIViewController *viewController = [[CTMediator sharedInstance] Goods_GoodsDetailsC:@{@"entity_id":m.Id}];
-    [self.navigationController pushViewController:viewController animated:YES];
+    [self goto_WKM_GoodsDetailsC:m.Id];
 }
 }
 
 
 // MARK: - UICollectionViewDataSource
 // MARK: - UICollectionViewDataSource
@@ -219,7 +218,7 @@
         default: {
         default: {
             if (indexPath.row == 0 && self.vm.cateModel.image.length > 0) {
             if (indexPath.row == 0 && self.vm.cateModel.image.length > 0) {
                 ASProductListImageCell *c = [collectionView dequeueReusableCellWithReuseIdentifier:@"ASProductListImageCell" forIndexPath:indexPath];
                 ASProductListImageCell *c = [collectionView dequeueReusableCellWithReuseIdentifier:@"ASProductListImageCell" forIndexPath:indexPath];
-                [c setImgStr:[NSString stringWithFormat:@"https://%@%@%@",HostPath, CategoryImgPath, self.vm.cateModel.image]];
+                [c setImgStr:[NSString stringWithFormat:@"https://%@%@",HostPath, self.vm.cateModel.image]];
                 return c;
                 return c;
                 
                 
             }
             }
@@ -233,6 +232,10 @@
             ASProductBaseModel *m = self.vm.productList[indexPath.row-tempOff];
             ASProductBaseModel *m = self.vm.productList[indexPath.row-tempOff];
             cell.model = m;
             cell.model = m;
             cell.contView.addCartBt.hidden = false;
             cell.contView.addCartBt.hidden = false;
+            __weak typeof(self) weakSelf = self;
+            cell.contView.addCartBlock = ^(ASProductBaseModel * _Nonnull model) {
+                [weakSelf action_GoodsSizeC: model.Id];
+            };
             return cell;
             return cell;
         }
         }
     }
     }

+ 1 - 1
Asteria/Fuction/Home/Views/ASHomeActiveView.m

@@ -90,7 +90,7 @@
         }
         }
     }
     }
     if (self.topKeyModels.count > 0 && self.rollingV.arrNum < self.topKeyModels.count) {
     if (self.topKeyModels.count > 0 && self.rollingV.arrNum < self.topKeyModels.count) {
-        if (self.tapBlock) {
+        if (self.tapTopBlock) {
             KWSearchHotKeyModel * m = self.topKeyModels[self.rollingV.arrNum];
             KWSearchHotKeyModel * m = self.topKeyModels[self.rollingV.arrNum];
             self.tapTopBlock(m);
             self.tapTopBlock(m);
         }
         }

+ 1 - 2
Asteria/Fuction/UserCenter/Points/ASPointsHomeViewController.m

@@ -130,8 +130,7 @@
         }
         }
             break;
             break;
         case 0: {
         case 0: {
-            // TODO: 去订单列表
-            
+            [self toOrderListVc];
         }
         }
             break;
             break;
                     
                     

+ 5 - 5
Asteria/Tabber/AS_TabBarViewController.m

@@ -55,11 +55,11 @@
 }
 }
 
 
 - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item {
 - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item {
-    if (self.tabBar.items.count > 2) {
-        UITabBarItem *temp = self.tabBar.items[2];
-        temp.qmui_badgeInteger =  arc4random()%100;
-        
-    }
+//    if (self.tabBar.items.count > 2) {
+//        UITabBarItem *temp = self.tabBar.items[2];
+//        temp.qmui_badgeInteger =  arc4random()%100;
+//        
+//    }
 }
 }
 
 
 - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController {
 - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController {