“wangdongchao” 1 rok temu
rodzic
commit
a9668f522d

+ 7 - 3
Asteria/Fuction/Goods/VC/AS_GoodsSizeC.m

@@ -214,6 +214,12 @@
     self.VM = [[ASGoodsDetailsVM alloc]initDelegate:self];
 }
 -(void)reqNet_Size_rewriteCartAddProducts:(NSInteger)type{
+    
+    if (!ASUserInfoManager.shared.isLogin) {
+        [Fuction_Tool pop_toLoginVC];
+        return;
+    }
+    
     NSMutableDictionary *optionDic = [NSMutableDictionary dictionary];
     for (OptionsModel *optionM in self.xxx_optionAry) {
         OptionsValuesM *valuesM = optionM.values[optionM.optionSelectTag];
@@ -235,9 +241,7 @@
     if(sucessOrFail){
         [self.view makeToast:@"Success" duration:2 position:CSToastPositionCenter title:nil image:nil style:nil completion:^(BOOL didTap) {
             if(self.xxx_isCart){
-                [self dismissViewControllerAnimated:YES completion:^{
-                    
-                }];
+                [self dismissViewControllerAnimated:YES completion:nil];
             }else{
 //                [self handle_closeVC];
 //                K_WEAK_SELF;

+ 7 - 0
Asteria/Fuction/UserCenter/VipCenter/ASVipCenterViewController.m

@@ -62,6 +62,13 @@
     self.control.numberOfPages = arr.count > 0 ? arr.count : 0;
     NSInteger curPage = curVipM.level.integerValue-1;
     self.control.currentPage = curPage >= 0 ? curPage : 0;
+    
+    K_WEAK_SELF;
+    dispatch_async (dispatch_get_main_queue (), ^{
+        K_STRONG_SELF;
+        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:curPage inSection:0];
+        [self.collectV scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionNone animated:NO];
+    });
 }
 
 - (void)configSubVs {