Browse Source

老师端个人中心优惠券

Steven 2 years ago
parent
commit
c8d8001127
23 changed files with 201 additions and 85 deletions
  1. 2 2
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 67 19
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 1 1
      KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m
  5. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/tool_ticket.imageset/Contents.json
  6. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/tool_ticket.imageset/tool_ticket@2x.png
  7. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/tool_ticket.imageset/tool_ticket@3x.png
  8. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/AccompanyLoadingView.m
  9. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KeyChainTools.m
  10. 1 1
      KulexiuForTeacher/KulexiuForTeacher/KulexiuForTeacher.entitlements
  11. 25 30
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m
  12. 6 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatApply.h
  13. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatApply.m
  14. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatResponse.h
  15. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatResponse.m
  16. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/KSChatroomTextCell.m
  17. 15 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/SeatContentView.m
  18. 24 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/SeatListView/LiveMemberSeatCell.m
  19. 16 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Controller/MineViewController.m
  20. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageHeadView.xib
  21. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineActionView.h
  22. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineFunctionView.h
  23. 6 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineFunctionView.m

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -8038,7 +8038,7 @@
 					"$(PROJECT_DIR)/KulexiuForTeacher/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/SocialLibraries/QQ",
 					"$(PROJECT_DIR)/KulexiuForTeacher/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/UMSocialSDKPlugin",
 				);
-				MARKETING_VERSION = 1.3.3;
+				MARKETING_VERSION = 1.3.4;
 				PRODUCT_BUNDLE_IDENTIFIER = com.Colexiu.KulexiuForTeacher;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_EMIT_LOC_STRINGS = YES;
@@ -8100,7 +8100,7 @@
 					"$(PROJECT_DIR)/KulexiuForTeacher/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/SocialLibraries/QQ",
 					"$(PROJECT_DIR)/KulexiuForTeacher/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/UMSocialSDKPlugin",
 				);
-				MARKETING_VERSION = 1.3.3;
+				MARKETING_VERSION = 1.3.4;
 				PRODUCT_BUNDLE_IDENTIFIER = com.Colexiu.KulexiuForTeacher;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_EMIT_LOC_STRINGS = YES;

BIN
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 67 - 19
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -62,8 +62,8 @@
             filePath = "KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1683"
-            endingLineNumber = "1683"
+            startingLineNumber = "1678"
+            endingLineNumber = "1678"
             landmarkName = "-pauseLiveActionBack:"
             landmarkType = "7">
          </BreakpointContent>
@@ -94,8 +94,8 @@
             filePath = "KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1413"
-            endingLineNumber = "1413"
+            startingLineNumber = "1408"
+            endingLineNumber = "1408"
             landmarkName = "-sendMessage:displayMessage:callback:"
             landmarkType = "7">
          </BreakpointContent>
@@ -119,48 +119,96 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "36223C7F-0739-4CEA-9F63-F89D02C1CE38"
+            uuid = "56671723-69C7-4135-B645-5BF78E5FCCE3"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "741"
+            endingLineNumber = "741"
+            landmarkName = "-renderSeatView"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D730210B-8BDA-4804-AFA5-45F85F31834B"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Live/View/SeatContentView.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "108"
+            endingLineNumber = "108"
+            landmarkName = "-queryUserInfoWithUserId:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "709E79F0-19C9-4375-837F-CAE13043A89B"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Live/View/SeatListView/LiveSeatActionView.m"
+            filePath = "KulexiuForTeacher/Common/Tools/Custom/KeyChainTools.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "112"
-            endingLineNumber = "112"
-            landmarkName = "-setIsForbiddenApply:"
+            startingLineNumber = "40"
+            endingLineNumber = "40"
+            landmarkName = "+getUUID"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "4A43969F-0FC5-4174-9B84-1A37793F2609"
+            uuid = "AF1AC824-8B9B-4A40-87E7-F683CF4A76F0"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Live/View/SeatListView/LiveSeatActionView.m"
+            filePath = "KulexiuForTeacher/Common/Tools/Custom/KeyChainTools.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "30"
+            endingLineNumber = "30"
+            landmarkName = "+getUUID"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "2B6124D7-B34B-4117-9E4D-5F25E9D8E541"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Common/Tools/Custom/KeyChainTools.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "155"
-            endingLineNumber = "155"
-            landmarkName = "-pagerView:initListAtIndex:"
+            startingLineNumber = "140"
+            endingLineNumber = "140"
+            landmarkName = "+load:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "DE44E28C-811C-4342-B9D6-92D797B7E3DD"
+            uuid = "8DD68A09-3B2E-4A8A-B22E-23AF1FF8586E"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Live/View/SeatListView/LiveApplyControlView.m"
+            filePath = "KulexiuForTeacher/Common/Tools/Custom/KeyChainTools.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "68"
-            endingLineNumber = "68"
-            landmarkName = "-setIsForbiddenApply:"
+            startingLineNumber = "79"
+            endingLineNumber = "79"
+            landmarkName = "+save:data:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m

@@ -328,7 +328,7 @@
     RCKitConfigCenter.message.disableMessageAlertSound = YES;
     
     // 设置断线重连时是否踢出重连设备
-    //    [[RCIMClient sharedRCIMClient] setReconnectKickEnable:YES];
+        [[RCIMClient sharedRCIMClient] setReconnectKickEnable:YES];
     
     // 左右上角按钮颜色
     RCKitConfigCenter.ui.globalNavigationBarTintColor = HexRGB(0x000000);

+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/tool_ticket.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "tool_ticket@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "tool_ticket@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/tool_ticket.imageset/tool_ticket@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/tool_ticket.imageset/tool_ticket@3x.png


+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/AccompanyLoadingView.m

@@ -40,6 +40,7 @@
 }
 
 - (void)showLoading {
+    self.layer.opacity = 1.0f;
     if (self.animationView.isAnimationPlaying) {
         return;
     }

+ 3 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KeyChainTools.m

@@ -9,7 +9,7 @@
 #import "KeyChainTools.h"
 #import <Security/Security.h>
 
-NSString *const KEY_ASSESSGROUP = @"2K89M44X82.Colexiu";
+NSString *const KEY_ASSESSGROUP = @"B2AP53HHTU.Colexiu";
 
 @implementation KeyChainTools
 
@@ -75,7 +75,8 @@ NSString *const KEY_ASSESSGROUP = @"2K89M44X82.Colexiu";
     [keychainQuery setObject:[NSKeyedArchiver archivedDataWithRootObject:data] forKey:(__bridge id)kSecValueData];
     //Add item to keychain with the search dictionary
     
-    SecItemAdd((__bridge CFDictionaryRef)keychainQuery, NULL);
+    OSStatus status = SecItemAdd((__bridge CFDictionaryRef)keychainQuery, NULL);
+    NSLog(@"---%d", status);
 }
 
  

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/KulexiuForTeacher.entitlements

@@ -22,7 +22,7 @@
 	</array>
 	<key>keychain-access-groups</key>
 	<array>
-		<string>$(AppIdentifierPrefix)com.Colexiu.Kulexiu</string>
+		<string>$(AppIdentifierPrefix)Colexiu</string>
 	</array>
 </dict>
 </plist>

+ 25 - 30
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m

@@ -32,6 +32,7 @@
 #import "KSChatLiveMessage.h"
 
 #import "LiveSeatActionView.h"
+
 typedef NS_ENUM(NSInteger, LIVEPAGE) {
     LIVEPAGE_PREVIEW,
     LIVEPAGE_LIVE,
@@ -59,14 +60,14 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
 
 #pragma mark ------- 直播房间信息
 /*!
- 身份状态 主讲人/观众
+ 身份状态 老师/观众
  */
 @property (nonatomic, assign) RCRTCLiveRoleType liveRoleType;
-/// 主讲人id
+/// 老师id
 @property (nonatomic, strong) NSString *createrId;
-/// 主讲人名称
+/// 老师名称
 @property (nonatomic, strong) NSString *createrName;
-/// 主讲人头像
+/// 老师头像
 @property (nonatomic, strong) NSString *createrAvatal;
 
 // 是否禁止连麦
@@ -88,7 +89,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
 
 @property (nonatomic, assign) BOOL isImConnected;
 
-@property (nonatomic, assign) BOOL hasSendWelcomeMessage;
+@property (nonatomic, assign) BOOL hasJoinRoomSuccess;
 
 @property (nonatomic, strong) KSLiveStreamVideo *localVideo;
 
@@ -260,7 +261,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
             break;
         case PREVIEWLIVEACTION_SWITCH: // 切换
         {
-            [[RCRTCEngine sharedInstance].defaultVideoStream switchCamera];
+            [self switchCamera];
         }
             break;
         case PREVIEWLIVEACTION_BEAUTY: // 美颜
@@ -600,15 +601,8 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     [[RCIMClient sharedRCIMClient] joinChatRoom:self.roomId messageCount:-1 success:^{
         dispatch_async(dispatch_get_main_queue(), ^{
             [self addConstMessage];
+            self.hasJoinRoomSuccess = YES;
         });
-        KSLiveChatroomWelcome *joinChatroomMessage = [[KSLiveChatroomWelcome alloc] init];
-        [joinChatroomMessage setMsgId:[RCIM sharedRCIM].currentUserInfo.userId];
-        MJWeakSelf;
-        [self sendMessage:joinChatroomMessage displayMessage:NO callback:^(BOOL success) {
-            weakSelf.hasSendWelcomeMessage = YES;
-        }];
-        // 加入成功发送消息
-        
     } error:^(RCErrorCode status) {
         if (status == RC_CHATROOM_NOT_EXIST || status == KICKED_FROM_CHATROOM || status == RC_PARAMETER_INVALID_CHATROOM) {
             dispatch_async(dispatch_get_main_queue(), ^{
@@ -636,7 +630,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     
     dispatch_main_async_safe(^{
         // IM 连接成功回调
-        if (self.hasSendWelcomeMessage) { // 如果已经发送了进入消息
+        if (self.hasJoinRoomSuccess) { // 如果已经发送了进入消息
             // 查询是否直播间开启
             [KSNetworkingManager speakerCheckRoomInfoRequest:KS_GET roomUid:self.roomId success:^(NSDictionary * _Nonnull dic) {
                 if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
@@ -644,7 +638,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
                     MJWeakSelf;
                     [self notiferJoinSuccessToServiceCallback:^{
                         [weakSelf MBPShow:@"IM连接成功"];
-                        [weakSelf sendWelcomeMessage];
+                        [weakSelf joinChatRoomAndLiveRoom];
                     }];
                 }
                 else {
@@ -661,19 +655,27 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     });
 }
 
-- (void)sendWelcomeMessage {
-    MJWeakSelf;
+- (void)joinChatRoomAndLiveRoom {
+    
     [[RCIMClient sharedRCIMClient] joinExistChatRoom:self.roomId messageCount:-1 success:^{
-        KSLiveChatroomWelcome *joinChatroomMessage = [[KSLiveChatroomWelcome alloc] init];
-        [joinChatroomMessage setMsgId:[RCIM sharedRCIM].currentUserInfo.userId];
-        [self sendMessage:joinChatroomMessage displayMessage:NO callback:^(BOOL success) {
-            [weakSelf joinRTCRoom];
+        MJWeakSelf;
+        [self leaveRTCRoomCallback:^(BOOL success) {
+            dispatch_main_async_safe(^{
+                [weakSelf joinRTCRoom];
+            });
         }];
+        
     } error:^(RCErrorCode status) {
         NSLog(@"error code %zd" ,status);
     }];
 }
 
+- (void)leaveRTCRoomCallback:(void(^)(BOOL success))callback {
+    [[RCRTCEngine sharedInstance] leaveRoom:^(BOOL isSuccess, RCRTCCode code) {
+        callback(isSuccess);
+    }];
+}
+
 - (void)joinRTCRoom {
     [self setRoleType];
 }
@@ -703,8 +705,8 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
 }
  
 - (void)connectionService {
-    [self setRoleType];
     [self joinChatRoom];
+    [self setRoleType];
 }
 
 - (void)countLikeMessageCount {
@@ -773,8 +775,6 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
         for (LiveSeatMember *member in seatApplyArray) {
             if ([member.userId isEqualToString:userId]) {
                 containUser = YES;
-//                NSLog(@"---- continue --");
-//                continue;
             }
         }
         if (containUser == NO) {
@@ -1001,7 +1001,6 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
             if (code == RCRTCCodeSignalServerNotConnect || code == RCRTCCodeParameterError || code == RCRTCCodeNotInRTCRoom || code == RCRTCCodeRTCTokenIsNull || code == RCRTCCodeHttpTimeoutError || code == RCRTCCodeHttpError || code == RCRTCCodeVoIPNotAvailable) {
                 NSLog(@"%@",[NSString stringWithFormat:@"加入失败 code %ld",code]);
                 [strongSelf MBPShow:@"加入直播间失败"];
-                //                [strongSelf.navigationController dismissViewControllerAnimated:YES completion:nil];
             }
             else {
                 [strongSelf notiferJoinSuccessToServiceCallback:^{
@@ -1055,10 +1054,6 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
         if (code == RCRTCCodeSuccess) {
             weakSelf.needPublishStream = NO;
             [weakSelf renderSeatView];
-
-        }
-        else {
-            [weakSelf MBPShow:@"视频流发布失败"];
         }
     }];
 }

+ 6 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatApply.h

@@ -10,22 +10,22 @@
 NS_ASSUME_NONNULL_BEGIN
 
 typedef NS_ENUM(NSInteger, SEATHANDLE) {
-    SEATHANDLE_INVITE = 1,     // 主讲人邀请连麦
-    SEATHANDLE_DISINVITE = 2,  // 主讲人取消邀请
+    SEATHANDLE_INVITE = 1,     // 老师邀请连麦
+    SEATHANDLE_DISINVITE = 2,  // 老师取消邀请
     SEATHANDLE_APPLY = 3,      // 观众申请连麦
     SEATHANDLE_CANCELAPPLY = 4,// 观众取消申请
-    SEATHANDLE_KICKSEAT = 5,   // 主讲人将连麦人抱下麦
+    SEATHANDLE_KICKSEAT = 5,   // 老师将连麦人抱下麦
 };
 
 /// 连麦邀请或申请操作
 @interface KSLiveChatroomSeatApply : RCMessageContent
 /**
- 操作类型 1 主讲人邀请 2 主讲人取消邀请 3 观众申请 4 观众取消申请
+ 操作类型 1 老师邀请 2 老师取消邀请 3 观众申请 4 观众取消申请
  */
 @property (nonatomic, assign) SEATHANDLE type;
-// 主讲人名称
+// 老师名称
 @property (nonatomic, strong) NSString *teacherName;
-// 主讲人id
+// 老师id
 @property (nonatomic, strong) NSString *teacherId;
 // 观众名称
 @property (nonatomic, strong) NSString *audienceName;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatApply.m

@@ -11,7 +11,7 @@
 
 - (NSData *)encode {
     NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
-    // 主讲人
+    // 老师
     if (![NSString isEmptyString:self.teacherName]) {
         [mutableDict setObject:self.teacherName forKey:@"teacherName"];
     } else {

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatResponse.h

@@ -10,8 +10,8 @@
 NS_ASSUME_NONNULL_BEGIN
 
 typedef NS_ENUM(NSInteger, SEATRESPONSE) {
-    SEATRESPONSE_TEACHERAPPROVE = 1,       // 主讲人同意连麦
-    SEATRESPONSE_TEACHERREJECT = 2,        // 主讲人拒绝连麦
+    SEATRESPONSE_TEACHERAPPROVE = 1,       // 老师同意连麦
+    SEATRESPONSE_TEACHERREJECT = 2,        // 老师拒绝连麦
     SEATRESPONSE_AUDIENCEAPPROVE = 3,      // 观众同意连麦
     SEATRESPONSE_AUDIENCEREJECT = 4,       // 观众拒绝连麦
 };
@@ -20,12 +20,12 @@ typedef NS_ENUM(NSInteger, SEATRESPONSE) {
 @interface KSLiveChatroomSeatResponse : RCMessageContent
 
 /**
- 操作类型 1 主讲人同意 2 主讲人拒绝 3 观众同意 4 观众拒绝
+ 操作类型 1 老师同意 2 老师拒绝 3 观众同意 4 观众拒绝
  */
 @property (nonatomic, assign) SEATRESPONSE type;
-// 主讲人名称
+// 老师名称
 @property (nonatomic, strong) NSString *teacherName;
-// 主讲人id
+// 老师id
 @property (nonatomic, strong) NSString *teacherId;
 // 观众名称
 @property (nonatomic, strong) NSString *audienceName;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomSeatResponse.m

@@ -11,7 +11,7 @@
 
 - (NSData *)encode {
     NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
-    // 主讲人
+    // 老师
     if (self.teacherName) {
         [mutableDict setObject:self.teacherName forKey:@"teacherName"];
     } else {

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/KSChatroomTextCell.m

@@ -155,7 +155,7 @@
         KSLiveChatroomLike *likeMessage = (KSLiveChatroomLike *)model.content;
         RCUserInfo *userInfo = model.userInfo;
         NSString *userName = [userInfo.name stringByAppendingString:@""];
-        NSString *localizedMessage = [NSString stringWithFormat:@"给主讲人点了%d个赞",likeMessage.counts];
+        NSString *localizedMessage = [NSString stringWithFormat:@"给老师点了%d个赞",likeMessage.counts];
         NSString *str =[NSString stringWithFormat:@"%@",userName];
         NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
         

+ 15 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/SeatContentView.m

@@ -101,13 +101,22 @@
     [KSNetworkingManager imUserFriendQueryDetail:KS_POST userId:userId success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            self.nameLabel.text = [result stringValueForKey:@"friendNickname"];
+            if (self) {
+                self.nameLabel.text = [result stringValueForKey:@"friendNickname"];
+            }
+            else {
+                NSLog(@"-delloc------");
+            }
         }
         else {
-            self.nameLabel.text = @"连麦用户";
+            if (self) {
+                self.nameLabel.text = @"连麦用户";
+            }
         }
     } faliure:^(NSError * _Nonnull error) {
-        self.nameLabel.text = @"连麦用户";
+        if (self) {
+            self.nameLabel.text = @"连麦用户";
+        }
     }];
 }
 
@@ -128,8 +137,9 @@
     CGFloat space = 10;
     CGFloat width = 54;
     CGFloat height = 70;
-    for (NSInteger index = 0; index < self.seatMemberArray.count; index++) {
-        NSString *userId = self.seatMemberArray[index];
+    NSMutableArray *seatArray = [self.seatMemberArray mutableCopy];
+    for (NSInteger index = 0; index < seatArray.count; index++) {
+        NSString *userId = seatArray[index];
         CGRect frame = CGRectMake(space + index * (width + space), space, width, height);
         SeatMemberView *memberView = [[SeatMemberView alloc] initViewWithFrame:frame useId:userId];
         [self addSubview:memberView];

+ 24 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/SeatListView/LiveMemberSeatCell.m

@@ -55,13 +55,14 @@
         [KSNetworkingManager imUserFriendQueryDetail:KS_POST userId:member.userId success:^(NSDictionary * _Nonnull dic) {
             if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
                 NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-                self.userName.text = [result stringValueForKey:@"friendNickname"];
-                [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[[result stringValueForKey:@"friendAvatar"] getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
-                member.name = [result stringValueForKey:@"friendNickname"];
-                member.avatar = [result stringValueForKey:@"friendAvatar"];
+                if (self) {
+                    [self configUserMessage:result];
+                }
             }
             else {
-                self.userName.text = @"连麦用户";
+                if (self) {
+                    [self configUserMessage:nil];
+                }
             }
             
         } faliure:^(NSError * _Nonnull error) {
@@ -70,6 +71,24 @@
     }
 }
 
+- (void)configUserMessage:(NSDictionary *)result {
+    if (self) {
+        if (result) {
+            self.userName.text = [result stringValueForKey:@"friendNickname"];
+            [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[[result stringValueForKey:@"friendAvatar"] getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+            self.member.name = [result stringValueForKey:@"friendNickname"];
+            self.member.avatar = [result stringValueForKey:@"friendAvatar"];
+        }
+        else {
+            if (self) {
+                self.userName.text = @"连麦用户";
+            }
+        }
+    }
+}
+
+
+
 - (IBAction)sureAction:(id)sender {
     if (self.callback) {
         SEATOPERATION action = self.isApply ? SEATOPERATION_APPROVE : SEATOPERATION_DOWNSEAT;

+ 16 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Controller/MineViewController.m

@@ -109,6 +109,14 @@
     [self.headView mas_updateConstraints:^(MASConstraintMaker *make) {
         make.height.mas_equalTo(height);
     }];
+    self.normalFunctionView.isMember = isMember;
+    [self.normalFunctionView configView];
+    CGFloat functionHeight = [self.normalFunctionView getViewHeight];
+    [self.normalFunctionView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(self.headView.mas_bottom).offset(12);
+        make.left.right.mas_equalTo(self.view);
+        make.height.mas_equalTo(functionHeight);
+    }];
     self.teachToolView.isMember = isMember;
     [self.teachToolView configView];
     CGFloat toolViewHeight = [self.teachToolView getViewHeight];
@@ -421,6 +429,13 @@
             [self showDescAlert];
         }
             break;
+        case MINEVIEWTYPE_TICKET:
+        {
+            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+            webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/coupons"];
+            [self.navigationController pushViewController:webCtrl animated:YES];
+        }
+            break;
         default:
             break;
     }
@@ -518,7 +533,7 @@
 - (MineFunctionView *)normalFunctionView {
     if (!_normalFunctionView) {
         _normalFunctionView = [MineFunctionView shareInstance];
-        [_normalFunctionView configView];
+//        [_normalFunctionView configView];
         MJWeakSelf;
         [_normalFunctionView functionViewAction:^(MINEVIEWTYPE type) {
             [weakSelf operationAction:type];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageHeadView.xib

@@ -22,8 +22,8 @@
                         <rect key="frame" x="0.0" y="0.0" width="414" height="216"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
-                    <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.40000000000000002" colorSpace="custom" customColorSpace="calibratedRGB"/>
-                    <blurEffect style="light"/>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <blurEffect style="dark"/>
                 </visualEffectView>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="emY-nQ-Sbn">
                     <rect key="frame" x="0.0" y="0.0" width="414" height="88"/>

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineActionView.h

@@ -34,6 +34,7 @@ typedef NS_ENUM(NSInteger, MINEVIEWTYPE) {
     MINEVIEWTYPE_HOMEWORK,
     MINEVIEWTYPE_EVALUATE,
     MINEVIEWTYPE_SHOWDESC, // 显示弹窗
+    MINEVIEWTYPE_TICKET,
 };
 
 #define FUNCTIONVIEW_WIDTH (80)

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineFunctionView.h

@@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface MineFunctionView : UIView
 
+@property (nonatomic, assign) BOOL isMember;
 
 + (instancetype)shareInstance;
 

+ 6 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineFunctionView.m

@@ -33,6 +33,9 @@
     [self.containerView removeAllSubViews];
     CGFloat space = (KPortraitWidth - 28 - 4 * FUNCTIONVIEW_WIDTH) / 5.0f;
     for (NSInteger index = 0; index < self.imageArray.count; index++) {
+        if (self.isMember == NO && index == 6) {
+            return;
+        }
         MineActionView *functionButton = [MineActionView shareInstance];
         NSNumber *tagValue = self.tagArray[index];
         MINEVIEWTYPE type = [tagValue intValue];
@@ -62,21 +65,21 @@
 
 - (NSMutableArray *)imageArray {
     if (!_imageArray) {
-        _imageArray = [NSMutableArray arrayWithArray:@[@"tool_minePage",@"tool_mineIncome",@"tool_mineStyle",@"tool_goodsOrder",@"tool_myMusic",@"tool_myCourse"]];
+        _imageArray = [NSMutableArray arrayWithArray:@[@"tool_minePage",@"tool_mineIncome",@"tool_mineStyle",@"tool_goodsOrder",@"tool_myMusic",@"tool_myCourse",@"tool_ticket"]];
     }
     return _imageArray;
 }
 
 - (NSMutableArray *)titleArray {
     if (!_titleArray) {
-        _titleArray = [NSMutableArray arrayWithArray:@[@"我的主页",@"我的收入",@"个人风采",@"我的订单",@"我的乐谱",@"我的课程"]];
+        _titleArray = [NSMutableArray arrayWithArray:@[@"我的主页",@"我的收入",@"个人风采",@"我的订单",@"我的乐谱",@"我的课程",@"我的优惠券"]];
     }
     return _titleArray;
 }
 
 - (NSMutableArray *)tagArray {
     if (!_tagArray) {
-        _tagArray = [NSMutableArray arrayWithArray:@[@(MINEVIEWTYPE_HOMEPAGE),@(MINEVIEWTYPE_INCOME),@(MINEVIEWTYPE_MIEN),@(MINEVIEWTYPE_ORDER),@(MINEVIEWTYPE_MUSIC),@(MINEVIEWTYPE_FINISHCOURSE)]];
+        _tagArray = [NSMutableArray arrayWithArray:@[@(MINEVIEWTYPE_HOMEPAGE),@(MINEVIEWTYPE_INCOME),@(MINEVIEWTYPE_MIEN),@(MINEVIEWTYPE_ORDER),@(MINEVIEWTYPE_MUSIC),@(MINEVIEWTYPE_FINISHCOURSE),@(MINEVIEWTYPE_TICKET)]];
     }
     return _tagArray;
 }