浏览代码

琴房课达人认证

Steven 2 年之前
父节点
当前提交
844348433c

二进制
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 79 - 0
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -959,5 +959,84 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "61AA3787-16AE-4E8C-B899-77A2ECC1A215"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "132"
+            endingLineNumber = "132"
+            landmarkName = "-getGroupMessageNotiferStatus"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "61AA3787-16AE-4E8C-B899-77A2ECC1A215 - 737900fefcb90464"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__58-[GroupSettingViewController getGroupMessageNotiferStatus]_block_invoke"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "132"
+                  endingLineNumber = "132"
+                  offsetFromSymbolStart = "36">
+               </Location>
+               <Location
+                  uuid = "61AA3787-16AE-4E8C-B899-77A2ECC1A215 - c162aa6c1e7534f9"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__58-[GroupSettingViewController getGroupMessageNotiferStatus]_block_invoke_2"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "132"
+                  endingLineNumber = "132"
+                  offsetFromSymbolStart = "32">
+               </Location>
+               <Location
+                  uuid = "61AA3787-16AE-4E8C-B899-77A2ECC1A215 - e46668f71d054b32"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__58-[GroupSettingViewController getGroupMessageNotiferStatus]_block_invoke.143"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "132"
+                  endingLineNumber = "132"
+                  offsetFromSymbolStart = "32">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "276A2758-356E-4520-8B01-40EAB4848862"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Home/View/HomeHeadView.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "83"
+            endingLineNumber = "83"
+            landmarkName = "-configMessage:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m

@@ -1014,7 +1014,7 @@
 + (void)sysImComplaintRequest:(NSString *)post type:(NSString *)type fileUrl:(NSString *)fileUrl memo:(NSString *)memo targetId:(NSString *)targetId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodJSON];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/sysImComplaint/add"];
-    targetId = [self returnNoContainGroupId:targetId];
+//    targetId = [self returnNoContainGroupId:targetId];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:type forKey:@"type"];
     [parm setValue:fileUrl forKey:@"url"];

+ 3 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m

@@ -254,15 +254,15 @@
 
 
 - (void)messageSetting {
-    BOOL isBlock = self.bodyView.isOn;
-    [[RCIMClient sharedRCIMClient] setConversationNotificationStatus:ConversationType_GROUP targetId:self.groupId isBlocked:isBlock success:^(RCConversationNotificationStatus nStatus) {
+    
+    RCPushNotificationLevel level = self.bodyView.isOn ? RCPushNotificationLevelBlocked : RCPushNotificationLevelDefault;
+    [[RCChannelClient sharedChannelManager] setConversationNotificationLevel:ConversationType_GROUP targetId:self.groupId level:level success:^{
         dispatch_main_async_safe(^{
             MJWeakSelf;
             [self KSShowMsg:@"设置成功" promptCompletion:^{
                 [weakSelf.navigationController popViewControllerAnimated:YES];
             }];
         });
-        
     } error:^(RCErrorCode status) {
         dispatch_main_async_safe(^{
             MJWeakSelf;
@@ -271,7 +271,6 @@
             }];
         });
     }];
-    
 }
 
 - (NSMutableArray *)sourceArray {

+ 4 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupSettingBodyView.m

@@ -100,7 +100,10 @@ typedef void(^ChooseMemberCallback)(NSString *targetId);
 @end
 
 @implementation GroupSettingBodyView
-
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    self.isOn = NO;
+}
 + (instancetype)shareInstance  {
     GroupSettingBodyView *view = [[[NSBundle mainBundle] loadNibNamed:@"GroupSettingBodyView" owner:nil options:nil] firstObject];
     return view;

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupSettingBodyView.xib

@@ -219,7 +219,7 @@
                                 <constraint firstAttribute="width" constant="47" id="30N-IR-OuO"/>
                                 <constraint firstAttribute="height" constant="40" id="ZIc-CE-ru7"/>
                             </constraints>
-                            <state key="normal" image="switch_on"/>
+                            <state key="normal" image="switch_off"/>
                             <connections>
                                 <action selector="notiferAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Lrb-Uv-0t3"/>
                             </connections>
@@ -458,7 +458,7 @@
     <resources>
         <image name="chat_group_Logo" width="44" height="44"/>
         <image name="mine_next" width="6" height="11"/>
-        <image name="switch_on" width="47" height="24"/>
+        <image name="switch_off" width="47" height="24"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/Controller/NewClassRoomViewController.m

@@ -1164,9 +1164,9 @@
         CGRect frame = [self getWBoardFrame];
         _wBoardCtrl = [[KSWhiteboardControl alloc] initWithDelegate:self viewFrame:frame];
         NSString *roomId = [ClassroomService sharedService].currentRoom.roomId;
-        if ([roomId containsString:@"S"] || [roomId containsString:@"I"]) {
-            roomId = [roomId substringFromIndex:1];
-        }
+//        if ([roomId containsString:@"S"] || [roomId containsString:@"I"]) {
+//            roomId = [roomId substringFromIndex:1];
+//        }
         _wBoardCtrl.roomId = roomId;
         _wBoardCtrl.isRatationImage = self.isRorationImage;
         _wBoardCtrl.subjectId = self.subjectId;

+ 10 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.m

@@ -71,6 +71,10 @@
             MyVideoCourseBodyView *videoCourseView = (MyVideoCourseBodyView *)view;
             videoCourseView.teaherStatus = self.teacherInfo.entryStatus;
         }
+        else if ([view isKindOfClass:[MyMusicRoomBodyView class]]) {
+            MyMusicRoomBodyView *musicCourse = (MyMusicRoomBodyView *)view;
+            musicCourse.teaherStatus = self.teacherInfo.entryStatus;
+        }
     }
 }
 
@@ -234,6 +238,12 @@
         if (self.subjectList) {
             listView.subjectList = [self.subjectList mutableCopy];
         }
+        if (self.teacherInfo) {
+            listView.teaherStatus = self.teacherInfo.entryStatus;
+        }
+        else {
+            listView.teaherStatus = @"PASS";
+        }
         [listView beginFirstRefresh];
         return listView;
     }

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyMusicRoomBodyView.h

@@ -13,6 +13,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface MyMusicRoomBodyView : KSJXBodyView
 
+@property (nonatomic, strong) NSString *teaherStatus;
+
 @property (nonatomic, strong) NSMutableArray *subjectList;
 
 @end

+ 102 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyMusicRoomBodyView.m

@@ -14,6 +14,8 @@
 #import "MusicRoomViewController.h"
 #import "KSChoosePicker.h"
 #import "MusicRoomListModel.h"
+#import "AuthDisplayView.h"
+#import "KSBaseWKWebViewController.h"
 
 @interface MyMusicRoomBodyView ()<UITableViewDelegate,UITableViewDataSource>
 
@@ -46,6 +48,10 @@
 
 @property (nonatomic, strong) NSMutableArray *subjectMessageArray;
 
+@property (nonatomic, strong) AuthDisplayView *authView;
+
+@property (nonatomic, assign) BOOL teacherAuthPass;  // 是否通过老师审核
+
 @end
 
 @implementation MyMusicRoomBodyView
@@ -187,6 +193,12 @@
         [self.sortView.firstButton setTitle:[self.dateFormatter stringFromDate:currentDate] forState:UIControlStateNormal];
         [self addSubview:self.sortView];
     }
+    if (self.teacherAuthPass == NO) {
+        [self showAuthView];
+    }
+    else {
+        [self hideAuthView];
+    }
 }
 
 - (void)sortWithType:(SORT_TYPE)type {
@@ -446,6 +458,96 @@
     _subjectList = subjectList;
     self.thirdChooseIndex = 0;
 }
+
+- (void)setTeaherStatus:(NSString *)teaherStatus {
+    _teaherStatus = teaherStatus;
+    if ([teaherStatus isEqualToString:@"UNPAALY"]) { // 未申请
+        self.teacherAuthPass = NO;
+    }
+    else if ([teaherStatus isEqualToString:@"DOING"]) { // 审核中
+        self.teacherAuthPass = NO;
+    }
+    else if ([teaherStatus isEqualToString:@"UNPASS"]) {  // 不通过
+        self.teacherAuthPass = NO;
+    }
+    else  {
+        self.teacherAuthPass = YES;
+    }
+    
+    if (self.teacherAuthPass == NO) {
+        [self showAuthView];
+    }
+    else {
+        [self hideAuthView];
+    }
+}
+
+- (void)configAuthDisplay {
+    [self.authView configDisplayMessage:[self getAuthDisplayMessage]];
+    if ([self.teaherStatus isEqualToString:@"DOING"]) {
+        self.authView.sureButton.userInteractionEnabled = NO;
+        self.authView.sureButton.hidden = YES;
+    }
+    else {
+        self.authView.sureButton.userInteractionEnabled = YES;
+        self.authView.sureButton.hidden = NO;
+    }
+}
+
+- (void)showAuthView {
+    [self configAuthDisplay];
+    if ([self.subviews containsObject:self.authView]) {
+        [self bringSubviewToFront:self.authView];
+    }
+    else {
+        [self addSubview:self.authView];
+        [self.authView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.top.bottom.right.mas_equalTo(self);
+        }];
+    }
+}
+
+- (void)hideAuthView {
+    if ([self.subviews containsObject:self.authView]) {
+        [self.authView removeFromSuperview];
+        self.authView = nil;
+    }
+}
+
+- (AuthDisplayView *)authView {
+    if (!_authView) {
+        _authView = [AuthDisplayView shareInstance];
+        [_authView.imageView setImage:[UIImage imageNamed:[self getAuthDisplayImage]]];
+        [_authView configDisplayMessage:[self getAuthDisplayMessage]];
+        MJWeakSelf;
+        [_authView sureCallback:^{
+            [weakSelf authAction];
+        }];
+    }
+    return _authView;
+}
+
+- (NSString *)getAuthDisplayImage {
+    return @"authTeacher_accompany";
+}
+
+- (NSString *)getAuthDisplayMessage {
+    
+    if ([self.teaherStatus isEqualToString:@"DOING"]) { // 审核中
+        return @"您已提交认证申请,请耐心等待审核结果~";
+    }
+    else {
+        return @"您还没有完成达人认证,认证后才可设置琴房课哦~";
+    }
+    
+}
+
+- (void)authAction {
+    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+    webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];
+    [self.naviController pushViewController:webCtrl animated:YES];
+}
+
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.m

@@ -51,6 +51,7 @@
 }
 
 - (void)configMessage:(TeacherInfo *)infoMessage {
+    self.starView.allowMark = NO;
     if ([infoMessage.entryStatus isEqualToString:@"PASS"]) { // 审核通过
         self.hasAuthTeacher = YES;
         self.authView.hidden = YES;
@@ -58,7 +59,6 @@
         [self displayCount:infoMessage.fansNum inView:self.fansCount];
         [self displayCount:infoMessage.expTime inView:self.finishCourse];
         [self displayCount:infoMessage.unExpTime inView:self.unfinishCourse];
-        self.starView.allowMark = NO;
         self.tipsButton.hidden = YES;
     }
     else {
@@ -80,6 +80,7 @@
         }
     }
     if (infoMessage.starGrade > 0) {
+        self.starbgView.hidden = NO;
         self.starView.rate = infoMessage.starGrade / 5.0f;
         self.emptyView.hidden = YES;
     }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/View/DeleteAccountBodyView.xib

@@ -26,7 +26,7 @@
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5vd-tZ-CWT">
                     <rect key="frame" x="14" y="94" width="386" height="144.5"/>
                     <subviews>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="注销后,您在相关产品/服务留存的信息将被清空无法找回,具体包括:" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c7e-F8-dgF">
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="注销后,您在相关产品/服务留存的信息将被清空无法找回,具体包括:" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c7e-F8-dgF">
                             <rect key="frame" x="12" y="15" width="362" height="33.5"/>
                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                             <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Sections/Classroom/View/Chat/MessageManager/MessageCell/MessageCell.m

@@ -168,6 +168,7 @@
     if (!_headerImage) {
         _headerImage = [[UIImageView alloc] init];
         _headerImage.layer.masksToBounds = YES;
+        _headerImage.contentMode = UIViewContentModeScaleAspectFill;
         _headerImage.layer.cornerRadius = 6;
     }
     return _headerImage;