Переглянути джерело

Merge branch 'institution' into develop

Steven 1 рік тому
батько
коміт
ae3bbc7cd9

+ 10 - 0
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -530,6 +530,8 @@
 		BC14A61E28A0B5CE0086395C /* MineActionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC14A61D28A0B5CE0086395C /* MineActionView.xib */; };
 		BC14A62428A212C50086395C /* HomeHotMusicView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC14A62328A212C50086395C /* HomeHotMusicView.m */; };
 		BC14A62628A212CC0086395C /* HomeHotMusicView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC14A62528A212CC0086395C /* HomeHotMusicView.xib */; };
+		BC14E46E2AB2A16A000C4983 /* HomeTenantPageView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC14E46D2AB2A16A000C4983 /* HomeTenantPageView.m */; };
+		BC14E4702AB2A1A2000C4983 /* HomeTenantPageView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC14E46F2AB2A1A2000C4983 /* HomeTenantPageView.xib */; };
 		BC221FA128C72B9500F99802 /* MyStyleVideoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC221F9D28C72B9500F99802 /* MyStyleVideoView.xib */; };
 		BC221FA228C72B9500F99802 /* MyStyleVideoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC221F9E28C72B9500F99802 /* MyStyleVideoCell.xib */; };
 		BC221FA328C72B9500F99802 /* MyStyleVideoView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC221F9F28C72B9500F99802 /* MyStyleVideoView.m */; };
@@ -2127,6 +2129,9 @@
 		BC14A62228A212C40086395C /* HomeHotMusicView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeHotMusicView.h; sourceTree = "<group>"; };
 		BC14A62328A212C50086395C /* HomeHotMusicView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeHotMusicView.m; sourceTree = "<group>"; };
 		BC14A62528A212CC0086395C /* HomeHotMusicView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeHotMusicView.xib; sourceTree = "<group>"; };
+		BC14E46C2AB2A16A000C4983 /* HomeTenantPageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeTenantPageView.h; sourceTree = "<group>"; };
+		BC14E46D2AB2A16A000C4983 /* HomeTenantPageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeTenantPageView.m; sourceTree = "<group>"; };
+		BC14E46F2AB2A1A2000C4983 /* HomeTenantPageView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeTenantPageView.xib; sourceTree = "<group>"; };
 		BC221F9B28C72B9500F99802 /* MyStyleVideoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyStyleVideoView.h; sourceTree = "<group>"; };
 		BC221F9C28C72B9500F99802 /* MyStyleVideoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyStyleVideoCell.h; sourceTree = "<group>"; };
 		BC221F9D28C72B9500F99802 /* MyStyleVideoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MyStyleVideoView.xib; sourceTree = "<group>"; };
@@ -4390,6 +4395,9 @@
 				BC5756AF28B60095002302D8 /* HomeAuthAlertView.h */,
 				BC5756B028B60095002302D8 /* HomeAuthAlertView.m */,
 				BC5756B228B600A3002302D8 /* HomeAuthAlertView.xib */,
+				BC14E46C2AB2A16A000C4983 /* HomeTenantPageView.h */,
+				BC14E46D2AB2A16A000C4983 /* HomeTenantPageView.m */,
+				BC14E46F2AB2A1A2000C4983 /* HomeTenantPageView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -7690,6 +7698,7 @@
 				BC71DF2A2A8A0432003F165E /* KSWhiteboardRefreshView.xib in Resources */,
 				27A2F62A27E6C996009E2380 /* KSImageAlert.xib in Resources */,
 				BC71DF192A89F470003F165E /* TXToolButtonView.xib in Resources */,
+				BC14E4702AB2A1A2000C4983 /* HomeTenantPageView.xib in Resources */,
 				BCE6A0AA27F852CD00C97704 /* MineFansGroupCell.xib in Resources */,
 				BCB399B327F94B5A00AFF376 /* LTSCalendarBottomView.xib in Resources */,
 				BCC5840728A9FA8100BAB4CF /* cloud_animation_12.png in Resources */,
@@ -8126,6 +8135,7 @@
 				277931C627E30FC20010E277 /* NSObject+KSImpChangeTool.m in Sources */,
 				BC5E4B2C291E5E26001BBCD2 /* WMGaugeViewStyleFlatThin.m in Sources */,
 				275E3DAD27F45BE90010EC30 /* KSChatroomMessageCenter.m in Sources */,
+				BC14E46E2AB2A16A000C4983 /* HomeTenantPageView.m in Sources */,
 				BC5E4B2D291E5E26001BBCD2 /* WMGaugeViewStyle3D.m in Sources */,
 				BC106BAD2A8F45AA000759A9 /* TXLiveRoomHeadView.m in Sources */,
 				BCA353CE2858A86200377661 /* MusicRoomCourseCell.m in Sources */,

+ 16 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeTenantPageView.h

@@ -0,0 +1,16 @@
+//
+//  HomeTenantPageView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/9/14.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface HomeTenantPageView : UIView
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 20 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeTenantPageView.m

@@ -0,0 +1,20 @@
+//
+//  HomeTenantPageView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/9/14.
+//
+
+#import "HomeTenantPageView.h"
+
+@implementation HomeTenantPageView
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 36 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeTenantPageView.xib

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" 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="21701"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="HomeTenantPageView">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="104"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RTL-60-UfD">
+                    <rect key="frame" x="12" y="14.666666666666664" width="369" height="75"/>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="75" id="whZ-Nh-qFr"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstAttribute="trailing" secondItem="RTL-60-UfD" secondAttribute="trailing" constant="12" id="2eE-sP-5Zb"/>
+                <constraint firstItem="RTL-60-UfD" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="12" id="OSE-Pg-mPh"/>
+                <constraint firstItem="RTL-60-UfD" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="ahz-xr-sWa"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="81.679389312977094" y="-10.563380281690142"/>
+        </view>
+    </objects>
+</document>

+ 20 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/TXLiveModule/Controller/TXLiveRoomViewController.m

@@ -262,6 +262,9 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
                 self.preVideoView = nil;
                 [self.trtcCloud stopPublishing];
                 [self.trtcCloud exitRoom];
+                if (self.callback) {
+                    self.callback();
+                }
                 [self.navigationController dismissViewControllerAnimated:YES completion:nil];
             }
         }
@@ -1127,16 +1130,18 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     }];
 }
 
-- (void)closeRoomNotiferService {
+- (void)closeRoomNotiferServiceCallback:(void(^)(BOOL success))callback {
     [LiveModuleService roomDestroyRequest:KS_GET roomUid:self.roomId success:^(NSDictionary * _Nonnull dic) {
         if ([dic ks_integerValueForKey:@"errCode"] == 0) {
             NSLog(@"success");
+            callback(YES);
         }
         else {
             NSLog(@"----- error %@", [dic ks_stringValueForKey:@"errMsg"]);
+            callback(NO);
         }
     } faliure:^(NSError * _Nonnull error) {
-        
+        callback(NO);
     }];
 }
 
@@ -1337,6 +1342,9 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     // 退出房间
     NSString *tipsMsg = [NSString isEmptyString:msg.reason] ? @"当前课程已调整,请退出直播间" : msg.reason;
     self.closeAlert = [LiveRoomConfirmAlert liveroomAlertWithTitle:tipsMsg sureTitle:@"确定" inView:self.view confirm:^{
+        if (weakSelf.callback) {
+            weakSelf.callback();
+        }
         [weakSelf.navigationController dismissViewControllerAnimated:YES completion:nil];
     }];
 }
@@ -1699,13 +1707,20 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
 - (void)distoryRoomAction {
     MJWeakSelf;
     [self distoryRoomCallback:^(BOOL success) {
-        [weakSelf closeRoomNotiferService];
+        [weakSelf closeRoomService];
+    }];
+}
+
+- (void)closeRoomService {
+    MJWeakSelf;
+    [self closeRoomNotiferServiceCallback:^(BOOL success) {
         [weakSelf quitChatRoom];
+        if (weakSelf.callback) {
+            weakSelf.callback();
+        }
         [weakSelf.navigationController dismissViewControllerAnimated:YES completion:nil];
     }];
-    
 }
-
 - (void)pauseLiveActionBack:(BOOL)backPreView {
     self.needPublishStream = NO;
     [self resetSeatContainer];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/TXLiveModule/Service/LiveModuleService.m

@@ -98,7 +98,7 @@
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:@"iOS" forKey:@"os"];
     [parm setValue:@"3" forKey:@"status"];
-    [parm setValue:UserDefault(UIDKey) forKey:@"userid"];
+    [parm setValue:UserDefault(IM_USERID) forKey:@"userid"];
     [KSNetworkingManager LiveRoomRequest:post url:url parms:@[parm] success:success faliure:faliure];
 }