openlockPPP 1 gadu atpakaļ
vecāks
revīzija
9db8a3ff8d

+ 2 - 2
jiaPei.xcodeproj/project.pbxproj

@@ -11810,7 +11810,7 @@
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				"CODE_SIGN_RESOURCE_RULES_PATH[sdk=*]" = "";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2192024042502;
+				CURRENT_PROJECT_VERSION = 2192024042801;
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEVELOPMENT_TEAM = K7T6CU5SW5;
 				ENABLE_BITCODE = NO;
@@ -11893,7 +11893,7 @@
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2192024042502;
+				CURRENT_PROJECT_VERSION = 2192024042801;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEVELOPMENT_TEAM = K7T6CU5SW5;
 				ENABLE_BITCODE = NO;

BIN
jiaPei.xcworkspace/xcuserdata/mimasigeling.xcuserdatad/UserInterfaceState.xcuserstate


+ 15 - 2
jiaPei/Modules/OtherModules/ExerciseModule/Controller/RQExerciseSettingViewController.m

@@ -30,7 +30,7 @@
 - (void)viewDidLayoutSubviews {
     [super viewDidLayoutSubviews];
     self.exerciseSettingHeaderView.frame = CGRectMake(0, 0, RQ_SCREEN_WIDTH, 44.f);
-    self.tableView.frame = CGRectMake(0, 44, RQ_SCREEN_WIDTH, 44 * 3);
+    self.tableView.frame = CGRectMake(0, 44, RQ_SCREEN_WIDTH, 44 * 4);
 }
 
 - (void)viewDidAppear:(BOOL)animated {
@@ -55,6 +55,19 @@
    
 }
 
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    if(indexPath.row==2){
+        //删除
+        if(self.viewModel.homeSubPageType == RQHomeSubPageType_SequentialPractice){
+            [NYTools delExerciseListUserKey:RQ_USER_MANAGER.currentUser.outId carType:RQ_YDTQuestion_Module.carType subject:RQ_YDTQuestion_Module.subject exerciseType:RQ_Exercise_Module.currentExerciseType];
+            [self dismissViewControllerAnimated:YES completion:^{
+                //跳出当前页
+                [RQControllerHelper.currentViewController.navigationController popViewControllerAnimated:YES];
+            }];
+        }
+    }
+}
+
 - (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath withObject:(id)object {
     switch (indexPath.row) {
         case 1 : {
@@ -75,7 +88,7 @@
 }
 
 - (PanModalHeight)longFormHeight {
-    return PanModalHeightMake(PanModalHeightTypeMaxTopInset, RQ_SCREEN_HEIGHT - RQ_APPLICATION_NAV_BAR_HEIGHT - RQ_APPLICATION_SAFEAREA_BOTTOM_HEIGHT - (44 * 4));
+    return PanModalHeightMake(PanModalHeightTypeMaxTopInset, RQ_SCREEN_HEIGHT - RQ_APPLICATION_NAV_BAR_HEIGHT - RQ_APPLICATION_SAFEAREA_BOTTOM_HEIGHT - (44 * 5));
 }
 
 - (CGFloat)cornerRadius {

+ 1 - 0
jiaPei/Modules/OtherModules/ExerciseModule/Controller/RQExerciseViewController.m

@@ -159,6 +159,7 @@
 - (void)setAction {
     RQ_Exercise_Module.isShow_CatalogueView = YES;
     RQExerciseSettingViewModel *exerciseSettingViewModel = [[RQExerciseSettingViewModel alloc] initWithServices:self.viewModel.services params:nil];
+    exerciseSettingViewModel.homeSubPageType = self.viewModel.homeSubPageType;
     RQExerciseSettingViewController *exerciseSettingViewController = [[RQExerciseSettingViewController alloc] initWithViewModel:exerciseSettingViewModel];
     [self presentPanModal:exerciseSettingViewController];
     

+ 2 - 1
jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExerciseSubPage/做题设置/RQExerciseSettingViewModel.h

@@ -10,7 +10,8 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface RQExerciseSettingViewModel : RQCommonViewModel
-
+/// homeSubPageType
+@property (nonatomic, assign) RQHomeSubPageType homeSubPageType;
 @end
 
 NS_ASSUME_NONNULL_END

+ 5 - 2
jiaPei/Modules/OtherModules/ExerciseModule/ViewModel/ExerciseSubPage/做题设置/RQExerciseSettingViewModel.m

@@ -29,6 +29,7 @@
 
 #pragma mark - PrivateMethod
 - (void)rq_configureData {
+    @weakify(self)
     /// 第零组
     RQCommonGroupViewModel *group0 = [RQCommonGroupViewModel groupViewModel];
     /// 用户信息
@@ -61,8 +62,10 @@
 
     RQExerciseSettingItemViewModel *item2 = [[RQExerciseSettingItemViewModel alloc] init];
     item2.title = @"字体大小";
-
-    group0.itemViewModels = @[item0, item2];
+    
+    RQExerciseSettingItemViewModel *item3 = [[RQExerciseSettingItemViewModel alloc] init];
+    item3.title = @"删除做题记录";
+    group0.itemViewModels = @[item0, item2,item3];
     self.dataSource = @[group0];
 }
 @end

+ 8 - 0
jiaPei/NewTheory/View/NYClassRoomPeiCell.m

@@ -170,6 +170,7 @@
 
 //过程照片
 - (IBAction)submit_clickdo:(UIButton *)sender {
+    
     self.submit_btn.userInteractionEnabled = NO;
     //定位功能
     __weak typeof(self) weakSelf = self;
@@ -350,6 +351,13 @@
             [MBProgressHUD rq_hideHUD];
             if (success) {
                 _myLocation = location.coordinate;
+                //判断遇见有签退-照片 - 直接签退
+                NSPredicate *predicate = [NSPredicate predicateWithFormat:@"event=%d",18];
+                NSArray *filterdArray = [self.photosArray filteredArrayUsingPredicate:predicate];
+                if(filterdArray.count>0){
+                    [weakSelf QRCodeScanningdo];//扫码签退
+                    return;
+                }
                 //签退-距离提示
                 [weakSelf photoCoursedo:@"18"];
             }

+ 4 - 6
jiaPei/NewTheory/View/NYClassRoomPeiCell.xib

@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_12" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -12,10 +11,10 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="NYClassRoomPeiCell">
-            <rect key="frame" x="0.0" y="0.0" width="320" height="666"/>
+            <rect key="frame" x="0.0" y="0.0" width="320" height="716"/>
             <autoresizingMask key="autoresizingMask"/>
             <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
-                <rect key="frame" x="0.0" y="0.0" width="320" height="666"/>
+                <rect key="frame" x="0.0" y="0.0" width="320" height="716"/>
                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                 <subviews>
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lNa-sV-KWt">
@@ -318,7 +317,7 @@
                         </userDefinedRuntimeAttributes>
                     </view>
                     <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7KQ-fQ-6fM">
-                        <rect key="frame" x="16" y="32" width="288" height="634"/>
+                        <rect key="frame" x="16" y="32" width="288" height="684"/>
                         <subviews>
                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="考场空数据占位图" translatesAutoresizingMaskIntoConstraints="NO" id="hXY-IN-lJ3">
                                 <rect key="frame" x="24" y="141" width="240" height="128"/>
@@ -363,7 +362,6 @@
                     </view>
                 </subviews>
             </view>
-            <viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
             <constraints>
                 <constraint firstItem="5AK-y0-nrp" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="16" id="1Kz-pI-qdB"/>
                 <constraint firstItem="5AK-y0-nrp" firstAttribute="top" secondItem="lNa-sV-KWt" secondAttribute="bottom" constant="16" id="3Qp-RW-Ya6"/>

+ 1 - 1
jiaPei/NewTheory/ViewModel/NYClassRoomPeiViewModel.m

@@ -11,7 +11,7 @@
 @implementation NYClassRoomPeiViewModel
 - (instancetype)init {
     if (self = [super init]) {
-        self.itemSize = CGSizeMake(RQ_SCREEN_WIDTH, RQ_FIT_HORIZONTAL(666.f));
+        self.itemSize = CGSizeMake(RQ_SCREEN_WIDTH, RQ_FIT_HORIZONTAL(716.f));
     }
     return self;
 }

+ 2 - 0
jiaPei/OLD/Util/Tools/NYTools.h

@@ -22,6 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
 +(void)saveExerciseModel:(RQExerciseModel*)exercise userKey:(NSString*)userKey carType:(RQHomePageCarType)carType subject:(RQHomePageSubjectType)subject exerciseType:(NSUInteger)exerciseType;
 //读取-题目对错
 +(NSArray*)readExerciseListUserKey:(NSString*)userKey carType:(RQHomePageCarType)carType subject:(RQHomePageSubjectType)subject exerciseType:(NSUInteger)exerciseType;
+//删除-题目对错记录
++(void)delExerciseListUserKey:(NSString*)userKey carType:(RQHomePageCarType)carType subject:(RQHomePageSubjectType)subject exerciseType:(NSUInteger)exerciseType;
 //删除-题目
 +(void)delateUserKey:(NSString*)userKey;
 //保存课堂ID

+ 11 - 0
jiaPei/OLD/Util/Tools/NYTools.m

@@ -55,6 +55,17 @@
         return @[];
     }
 }
++(void)delExerciseListUserKey:(NSString*)userKey carType:(RQHomePageCarType)carType subject:(RQHomePageSubjectType)subject exerciseType:(NSUInteger)exerciseType{
+    NSString *NYCocheName = [NSString stringWithFormat:@"NYExercise_%@",userKey];
+    YYCache  *yyCache = [YYCache cacheWithName:NYCocheName];
+    NSString *NYCocheNameKey = [NSString stringWithFormat:@"NYExerciseKey_%zd_%zd_%zd",carType,subject,exerciseType];
+    [yyCache removeObjectForKey:NYCocheNameKey];
+//    NSMutableArray *value = [NSMutableArray arrayWithArray:@[]];
+//    //根据key写入缓存value
+//    [yyCache setObject:value forKey:NYCocheNameKey withBlock:^{
+//      NSLog(@"setObject sucess");
+//    }];
+}
 //删除-题目
 +(void)delateUserKey:(NSString*)userKey {
     NSString *NYCocheName = [NSString stringWithFormat:@"NYExercise_%@",userKey];