Steven пре 6 месеци
родитељ
комит
244394c01e
17 измењених фајлова са 335 додато и 19 уклоњено
  1. 18 8
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. 9 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/AccompanyWebView/KSCloudWebManager.m
  3. 9 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/WebView/KSBaseWKWebViewController.m
  4. 6 0
      KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.h
  5. 16 0
      KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.m
  6. 29 2
      KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.xib
  7. 4 0
      KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSHudLoagingManager.h
  8. 13 1
      KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSHudLoagingManager.m
  9. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/MyIncomeViewController.m
  10. 10 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Feedback/Controller/FeedbackViewController.m
  11. 11 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.m
  12. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/View/KSDeleteFailedAlertView.h
  13. 69 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/View/KSDeleteFailedAlertView.m
  14. 111 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/View/KSDeleteFailedAlertView.xib
  15. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Widget/Controller/ToneTuningViewController.m
  16. 5 0
      KulexiuForTeacher/KulexiuForTeacher/ToolKit/KSToolLibrary.framework/Headers/KSUploadManager.h
  17. BIN
      KulexiuForTeacher/KulexiuForTeacher/ToolKit/KSToolLibrary.framework/KSToolLibrary

+ 18 - 8
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -383,7 +383,10 @@
 		BC161CE42AE0DD760071530A /* TenantGroupChooseNavView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC161CE32AE0DD760071530A /* TenantGroupChooseNavView.xib */; };
 		BC161CE72AE0FD590071530A /* TenantGroupSortView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC161CE62AE0FD590071530A /* TenantGroupSortView.m */; };
 		BC161CE92AE0FD630071530A /* TenantGroupSortView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC161CE82AE0FD630071530A /* TenantGroupSortView.xib */; };
-		BC1E28442C76DEB70063E0A1 /* CloudAccompanyLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC1E28432C76DEB60063E0A1 /* CloudAccompanyLibrary.framework */; };
+		BC1E284F2C77218A0063E0A1 /* KSDeleteFailedAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC1E284C2C7721890063E0A1 /* KSDeleteFailedAlertView.xib */; };
+		BC1E28502C77218A0063E0A1 /* KSDeleteFailedAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC1E284E2C77218A0063E0A1 /* KSDeleteFailedAlertView.m */; };
+		BC1E285A2C783B5A0063E0A1 /* KSToolLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC1E28592C783B5A0063E0A1 /* KSToolLibrary.framework */; };
+		BC1E285E2C783B940063E0A1 /* CloudAccompanyLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC1E285D2C783B940063E0A1 /* CloudAccompanyLibrary.framework */; };
 		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 */; };
@@ -886,7 +889,6 @@
 		BCB908FD2850C9CB00F5FF69 /* MusicChooseSearchView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB908FC2850C9CB00F5FF69 /* MusicChooseSearchView.xib */; };
 		BCB909042851E25D00F5FF69 /* KSShareChooseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB909032851E25D00F5FF69 /* KSShareChooseViewController.m */; };
 		BCB909072851E32C00F5FF69 /* ShareChooseMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB909062851E32C00F5FF69 /* ShareChooseMainView.m */; };
-		BCB950A42C6AF08400C62508 /* KSToolLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCB950A32C6AF08400C62508 /* KSToolLibrary.framework */; };
 		BCB9FA1C286D537E005D766B /* KSScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB9FA1B286D537E005D766B /* KSScanViewController.m */; };
 		BCB9FA1F286D539A005D766B /* ScanNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB9FA1E286D539A005D766B /* ScanNavView.m */; };
 		BCB9FA21286D53A1005D766B /* ScanNavView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB9FA20286D53A1005D766B /* ScanNavView.xib */; };
@@ -1792,7 +1794,11 @@
 		BC161CE52AE0FD590071530A /* TenantGroupSortView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TenantGroupSortView.h; sourceTree = "<group>"; };
 		BC161CE62AE0FD590071530A /* TenantGroupSortView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TenantGroupSortView.m; sourceTree = "<group>"; };
 		BC161CE82AE0FD630071530A /* TenantGroupSortView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TenantGroupSortView.xib; sourceTree = "<group>"; };
-		BC1E28432C76DEB60063E0A1 /* CloudAccompanyLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CloudAccompanyLibrary.framework; sourceTree = "<group>"; };
+		BC1E284C2C7721890063E0A1 /* KSDeleteFailedAlertView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSDeleteFailedAlertView.xib; sourceTree = "<group>"; };
+		BC1E284D2C7721890063E0A1 /* KSDeleteFailedAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSDeleteFailedAlertView.h; sourceTree = "<group>"; };
+		BC1E284E2C77218A0063E0A1 /* KSDeleteFailedAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSDeleteFailedAlertView.m; sourceTree = "<group>"; };
+		BC1E28592C783B5A0063E0A1 /* KSToolLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = KSToolLibrary.framework; sourceTree = "<group>"; };
+		BC1E285D2C783B940063E0A1 /* CloudAccompanyLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CloudAccompanyLibrary.framework; 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>"; };
@@ -2585,7 +2591,6 @@
 		BCB909032851E25D00F5FF69 /* KSShareChooseViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSShareChooseViewController.m; sourceTree = "<group>"; };
 		BCB909052851E32C00F5FF69 /* ShareChooseMainView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareChooseMainView.h; sourceTree = "<group>"; };
 		BCB909062851E32C00F5FF69 /* ShareChooseMainView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareChooseMainView.m; sourceTree = "<group>"; };
-		BCB950A32C6AF08400C62508 /* KSToolLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = KSToolLibrary.framework; sourceTree = "<group>"; };
 		BCB9FA1A286D537E005D766B /* KSScanViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSScanViewController.h; sourceTree = "<group>"; };
 		BCB9FA1B286D537E005D766B /* KSScanViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSScanViewController.m; sourceTree = "<group>"; };
 		BCB9FA1D286D539A005D766B /* ScanNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScanNavView.h; sourceTree = "<group>"; };
@@ -2954,11 +2959,10 @@
 				BCFEE1902AD15BF5000E888F /* SoundpipeAudioKit in Frameworks */,
 				BC8B6E612856ED0600866917 /* libWeiboSDK.a in Frameworks */,
 				BC8B6E532856ED0600866917 /* UMAPM.framework in Frameworks */,
-				BCB950A42C6AF08400C62508 /* KSToolLibrary.framework in Frameworks */,
 				2779333F27E314640010E277 /* CoreVideo.framework in Frameworks */,
 				BC8B6E572856ED0600866917 /* UMDevice.framework in Frameworks */,
-				BC1E28442C76DEB70063E0A1 /* CloudAccompanyLibrary.framework in Frameworks */,
 				BC3A55662BAA799B002E1616 /* KSTunerLibrary.framework in Frameworks */,
+				BC1E285E2C783B940063E0A1 /* CloudAccompanyLibrary.framework in Frameworks */,
 				2779334127E3146B0010E277 /* CoreMedia.framework in Frameworks */,
 				2779333D27E314550010E277 /* AVFoundation.framework in Frameworks */,
 				2779333B27E314450010E277 /* AudioToolbox.framework in Frameworks */,
@@ -2974,6 +2978,7 @@
 				BC8B6E5C2856ED0600866917 /* libSocialOfficialWeChat.a in Frameworks */,
 				BCFEE18A2AD15A27000E888F /* AudioKitEX in Frameworks */,
 				2779332B27E313EB0010E277 /* CoreTelephony.framework in Frameworks */,
+				BC1E285A2C783B5A0063E0A1 /* KSToolLibrary.framework in Frameworks */,
 				2779332927E313E40010E277 /* WebKit.framework in Frameworks */,
 				2779332727E313DC0010E277 /* MobileCoreServices.framework in Frameworks */,
 				2779332527E313D20010E277 /* AssetsLibrary.framework in Frameworks */,
@@ -5248,8 +5253,8 @@
 			isa = PBXGroup;
 			children = (
 				BC3A55612BAA798A002E1616 /* KSTunerLibrary.framework */,
-				BCB950A32C6AF08400C62508 /* KSToolLibrary.framework */,
-				BC1E28432C76DEB60063E0A1 /* CloudAccompanyLibrary.framework */,
+				BC1E28592C783B5A0063E0A1 /* KSToolLibrary.framework */,
+				BC1E285D2C783B940063E0A1 /* CloudAccompanyLibrary.framework */,
 				BC00A65B2BB58F1700231B74 /* LLPhotoBrowse.bundle */,
 				BC00A6592BB58F0000231B74 /* WMPlayer.bundle */,
 				BC24570E286C437D00D1F7C0 /* SoundFontFile */,
@@ -5613,6 +5618,9 @@
 				BC60E3BE287D447F00B05441 /* DeleteAccountBodyView.h */,
 				BC60E3BF287D447F00B05441 /* DeleteAccountBodyView.m */,
 				BC60E3C1287D448600B05441 /* DeleteAccountBodyView.xib */,
+				BC1E284D2C7721890063E0A1 /* KSDeleteFailedAlertView.h */,
+				BC1E284E2C77218A0063E0A1 /* KSDeleteFailedAlertView.m */,
+				BC1E284C2C7721890063E0A1 /* KSDeleteFailedAlertView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -7580,6 +7588,7 @@
 				275B170D27EB14AC0081FDEF /* KSChatListSearchView.xib in Resources */,
 				BC71D1332887ADDA0010F14B /* teacher_refresh.json in Resources */,
 				BC7CFFCA2817F2FF00CAEB21 /* CashRecordListCell.xib in Resources */,
+				BC1E284F2C77218A0063E0A1 /* KSDeleteFailedAlertView.xib in Resources */,
 				BCB9FA41286DA337005D766B /* GuideListView.xib in Resources */,
 				BC3ACDA12891261F00060E97 /* MyMusicNavView.xib in Resources */,
 				BC71D2062887FDD40010F14B /* img_23.png in Resources */,
@@ -8462,6 +8471,7 @@
 				BCD6D15F281950F2009A773E /* UserBankCard.m in Sources */,
 				BC56C95D2923412800AF301F /* CoursewareViewModel.m in Sources */,
 				BC1191ED280E55CB00A716F7 /* EvaluateDetailModel.m in Sources */,
+				BC1E28502C77218A0063E0A1 /* KSDeleteFailedAlertView.m in Sources */,
 				BC106B7F2A8F4586000759A9 /* TXLiveMessagePauseLive.m in Sources */,
 				BC60E3BD287D294C00B05441 /* AccountDeleteViewController.m in Sources */,
 				BC56C95829233F1700AF301F /* CoursewareBottomView.m in Sources */,

+ 9 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/AccompanyWebView/KSCloudWebManager.m

@@ -135,9 +135,17 @@
     }];
 }
 
+- (void)removeLoadHud {
+    [LOADING_MANAGER removeCustomLoading];
+}
+
 // 上传
 - (void)uploadFile:(NSString *)uploadFileUrl success:(void (^)(NSString * _Nonnull))success faliure:(void (^)(NSString * _Nonnull))faliure {
-    [LOADING_MANAGER showCustomLoading:@"上传中..."];
+    [LOADING_MANAGER showCancelCustomLoading:@"上传中..." cancel:^{
+        [UPLOAD_MANAGER cancelUploadCallback:^{
+            [self removeLoadHud];
+        }];
+    }];
     NSData *fileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:uploadFileUrl]];
     NSString *suffix = [NSString stringWithFormat:@".%@",[uploadFileUrl pathExtension]];
     [UPLOAD_MANAGER configWithfilePath:@"/user/"];

+ 9 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/WebView/KSBaseWKWebViewController.m

@@ -757,11 +757,19 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     }];
 }
 
+- (void)removeLoadHud {
+    [LOADING_MANAGER removeCustomLoading];
+}
+
 - (void)videCropImage:(UIImage *)cover content:(NSDictionary *)content {
     NSData *imgData = [UIImage turnsImaegDataByImage:cover];
     NSString *fileName = @"videoCoverImage";
     
-    [LOADING_MANAGER showCustomLoading:@"上传中..."];
+    [LOADING_MANAGER showCancelCustomLoading:@"上传中..." cancel:^{
+        [UPLOAD_MANAGER cancelUploadCallback:^{
+            [self removeLoadHud];
+        }];
+    }];
     [UPLOAD_MANAGER configWithfilePath:@"/user/"];
     [UPLOAD_MANAGER uploadFile:imgData fileName:fileName fileSuffix:[UIImage typeForImageData:imgData] progress:^(int64_t bytesWritten, int64_t totalBytes) {
         // 显示进度

+ 6 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.h

@@ -7,10 +7,14 @@
 
 #import <UIKit/UIKit.h>
 
+typedef void(^KSCustomLoadingCancel)(void);
+
 NS_ASSUME_NONNULL_BEGIN
 
 @interface KSCustomLoadingView : UIView
 
+@property (nonatomic, assign) BOOL showCancelButton;
+
 + (instancetype)shareInstance;
 
 @property (nonatomic, strong) NSString *displayText;
@@ -19,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)hideLoadingView;
 
+- (void)cancelActionCallback:(KSCustomLoadingCancel)cancel;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 16 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.m

@@ -10,12 +10,16 @@
 
 @interface KSCustomLoadingView ()
 
+@property (weak, nonatomic) IBOutlet UIButton *cancelButton;
+
 @property (weak, nonatomic) IBOutlet UIView *containerView;
 
 @property (weak, nonatomic) IBOutlet UILabel *text;
 
 @property (nonatomic, strong) LOTAnimationView *animationView;
 
+@property (nonatomic, copy) KSCustomLoadingCancel cancelBlock;
+
 @end
 
 @implementation KSCustomLoadingView
@@ -45,6 +49,18 @@
     [self removeFromSuperview];
 }
 
+- (void)cancelActionCallback:(KSCustomLoadingCancel)cancel {
+    if (cancel) {
+        self.cancelBlock = cancel;
+    }
+}
+
+- (IBAction)cancelAction:(id)sender {
+    if (self.cancelBlock) {
+        self.cancelBlock();
+    }
+}
+
 - (LOTAnimationView *)animationView {
     if (!_animationView) {
         _animationView = [LOTAnimationView animationNamed:@"teacher_refresh"];

+ 29 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" 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="22131"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -48,16 +48,43 @@
                         </userDefinedRuntimeAttribute>
                     </userDefinedRuntimeAttributes>
                 </view>
+                <button hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="04h-R9-rTU">
+                    <rect key="frame" x="154.66666666666666" y="492" width="84" height="30"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="84" id="ajy-Xd-BOZ"/>
+                        <constraint firstAttribute="height" constant="30" id="czm-RI-pPn"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                    <state key="normal" title="取消上传"/>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                            <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                            <real key="value" value="1"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="15"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                    <connections>
+                        <action selector="cancelAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="AGB-OH-MCM"/>
+                    </connections>
+                </button>
             </subviews>
             <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="calibratedRGB"/>
             <constraints>
                 <constraint firstItem="Ftd-2r-orp" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="TgS-11-bcY"/>
+                <constraint firstItem="04h-R9-rTU" firstAttribute="top" secondItem="Ftd-2r-orp" secondAttribute="bottom" constant="16" id="WTj-pr-z5H"/>
                 <constraint firstItem="Ftd-2r-orp" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="al5-ls-aaQ"/>
+                <constraint firstItem="04h-R9-rTU" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="zeq-V7-kuJ"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
+                <outlet property="cancelButton" destination="04h-R9-rTU" id="94K-my-s9H"/>
                 <outlet property="containerView" destination="2VA-sp-63Q" id="NBh-da-mnS"/>
                 <outlet property="text" destination="jQZ-bq-s4l" id="Dnm-NR-TwV"/>
             </connections>

+ 4 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSHudLoagingManager.h

@@ -10,6 +10,8 @@
 #import "KSCustomLoadingView.h"
 #import "KSProgressLoadingView.h"
 
+typedef void(^KSLoadingCancel)(void);
+
 #define LOADING_MANAGER ([KSHudLoagingManager shareInstance])
 
 NS_ASSUME_NONNULL_BEGIN
@@ -26,6 +28,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)showCustomLoading:(NSString *)text;
 
+- (void)showCancelCustomLoading:(NSString *)text cancel:(KSLoadingCancel)cancel;
+
 - (void)removeCustomLoading;
 
 - (void)showHUD;

+ 13 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSHudLoagingManager.m

@@ -28,12 +28,24 @@
 }
 
 - (void)showCustomLoading:(NSString *)text {
-    self.loadingView.displayText = text;
     dispatch_main_async_safe(^{
+        self.loadingView.showCancelButton = NO;
+        self.loadingView.displayText = text;
         [self.loadingView showLoadingView];
     });
 }
 
+- (void)showCancelCustomLoading:(NSString *)text cancel:(KSLoadingCancel)cancel {
+    dispatch_main_async_safe(^{
+        self.loadingView.showCancelButton = YES;
+        self.loadingView.displayText = text;
+        [self.loadingView showLoadingView];
+        [self.loadingView cancelActionCallback:^{
+            cancel();
+        }];
+    });
+}
+
 - (void)removeCustomLoading {
     [self.loadingView hideLoadingView];
 }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/MyIncomeViewController.m

@@ -264,7 +264,7 @@
                     NSDictionary *parm = self.sortArray[chooseIndex];
                     weakSelf.bizType = [parm ks_stringValueForKey:@"bizType"];
                 }
-                self.headView.secondArrowUp = NO;
+                weakSelf.headView.secondArrowUp = NO;
                 [weakSelf refreshAndRequestData];
             } cancel:^{
                 self.headView.secondArrowUp = NO;

+ 10 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Feedback/Controller/FeedbackViewController.m

@@ -98,7 +98,7 @@
     MJWeakSelf;
     self.picker = [[KSChoosePicker alloc] initWithTitle:@"" sourceData:self.typeNameArray lastChooseIndex:self.chooseIndex sureButtonColor:THEMECOLOR chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
         weakSelf.chooseIndex = chooseIndex;
-        weakSelf.feedbackType = self.typeArray[chooseIndex];
+        weakSelf.feedbackType = weakSelf.typeArray[chooseIndex];
         [weakSelf.bodyView configFeedbackType:returnValue];
     } cancel:^{
         
@@ -139,7 +139,10 @@
     } faliure:^(NSError * _Nonnull error) {
         
     }];
-    
+}
+
+- (void)removeLoadHud {
+    [LOADING_MANAGER removeCustomLoading];
 }
 
 - (void)submitWithPhone:(NSString *)phone suggestion:(NSString *)suggession {
@@ -148,7 +151,11 @@
         [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请选择反馈类型"];
         return;
     }
-    [LOADING_MANAGER showCustomLoading:@"加载中..."];
+    [LOADING_MANAGER showCancelCustomLoading:@"加载中..." cancel:^{
+        [UPLOAD_MANAGER cancelUploadCallback:^{
+            [self removeLoadHud];
+        }];
+    }];
     if (self.imageArray.count) {
         NSMutableArray *imageDataArray = [NSMutableArray array];
         for (UIImage *image in self.imageArray) {

+ 11 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.m

@@ -14,6 +14,7 @@
 #import "JPUSHService.h"
 
 #import "KSNewConfirmAlertView.h"
+#import "KSDeleteFailedAlertView.h"
 
 @interface AccountDeleteViewController ()
 {
@@ -24,6 +25,7 @@
 
 @property (nonatomic, strong) KSNewConfirmAlertView *alertView;
 
+@property (nonatomic, strong) KSDeleteFailedAlertView *failAlert;
 
 @end
 
@@ -81,6 +83,9 @@
                 [self successDeleteBack];
             }];
         }
+        else if ([dic ks_integerValueForKey:@"code"] == 5201) {
+            [self showFailAlert:@[]];
+        }
         else {
             [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
@@ -89,6 +94,12 @@
     }];
 }
 
+- (void)showFailAlert:(NSArray *)messageList {
+    self.failAlert = [KSDeleteFailedAlertView shareIntance];
+    [self.failAlert configWithSource:messageList];
+    [self.failAlert showAlert];
+}
+
 - (void)successDeleteBack {
     // 退出登录
     [APPLOGIN_MANAGER logoutActionWithMsg:@""];

+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/View/KSDeleteFailedAlertView.h

@@ -0,0 +1,22 @@
+//
+//  KSDeleteFailedAlertView.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2024/8/22.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSDeleteFailedAlertView : UIView
+
++ (instancetype)shareIntance;
+
+- (void)configWithSource:(NSArray *)messageList;
+
+- (void)showAlert;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 69 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/View/KSDeleteFailedAlertView.m

@@ -0,0 +1,69 @@
+//
+//  KSDeleteFailedAlertView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2024/8/22.
+//
+
+#import "KSDeleteFailedAlertView.h"
+
+@interface KSDeleteFailedAlertView ()
+
+@property (weak, nonatomic) IBOutlet UIView *containerView;
+
+@property (weak, nonatomic) IBOutlet UILabel *descLabel;
+
+@end
+
+@implementation KSDeleteFailedAlertView
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+}
+
++ (instancetype)shareIntance {
+    KSDeleteFailedAlertView *view = [[[NSBundle mainBundle] loadNibNamed:@"KSDeleteFailedAlertView" owner:nil options:nil] firstObject];
+    return view;
+    
+}
+
+- (void)configWithSource:(NSArray *)messageList {
+    NSMutableArray *array = [NSMutableArray array];
+    if (messageList.count == 1) {
+        [array addObject:[messageList lastObject]];
+    }
+    else {
+        for (NSInteger index = 0; index < messageList.count; index++) {
+            NSString *desc = messageList[index];
+            NSString *formatString = [NSString stringWithFormat:@"%zd、%@",(index+1),desc];
+            [array addObject:formatString];
+        }
+    }
+    NSString *newString = [NSString returnNoNullStringWithString:[array componentsJoinedByString:@"\n"]];
+    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+    [paragraphStyle setLineSpacing:6];//调整行间距
+    NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:newString attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:14.0f],NSForegroundColorAttributeName:HexRGB(0x666666)}];
+    self.descLabel.attributedText = attr;
+}
+
+- (void)showAlert {
+    [[NSObject getKeyWindow] addSubview:self];
+}
+
+- (void)removeAlert {
+    [self removeFromSuperview];
+}
+
+- (IBAction)hideAlert:(id)sender {
+    [self removeAlert];
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 111 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/View/KSDeleteFailedAlertView.xib

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" 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="22684"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <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="KSDeleteFailedAlertView">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="A1m-G5-f05">
+                    <rect key="frame" x="44" y="279.66666666666669" width="305" height="293.00000000000006"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="注销失败" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PVB-qM-x6a">
+                            <rect key="frame" x="115.66666666666666" y="20" width="73.666666666666657" height="25"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="25" id="5Ls-7e-acn"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="该账户需要处理以下事项后再进行注销:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8w7-2y-inS">
+                            <rect key="frame" x="20" y="65" width="265" height="24"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="24" id="YDH-Mj-MAN"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
+                            <color key="textColor" red="0.95686274509803915" green="0.27058823529411763" blue="0.25490196078431371" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tua-23-XnI">
+                            <rect key="frame" x="20" y="91" width="269" height="117"/>
+                            <string key="text">1、账户存在未支付、未确认收货、售后处理中的订单
+2、账户为机构群群主、需要转移群主或解散群聊
+3、存在进行中的直播课、陪练课、琴房课,未下架的视频课
+4、收入未结算/推广计划未入账</string>
+                            <fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="14"/>
+                            <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yzR-DS-KGK">
+                            <rect key="frame" x="20" y="232.99999999999994" width="265" height="40"/>
+                            <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="a7o-Kz-WXl"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="我知道了"/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="20"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="hideAlert:" destination="iN0-l3-epB" eventType="touchUpInside" id="g9v-BP-Ro6"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="yzR-DS-KGK" secondAttribute="bottom" constant="20" id="6Q3-Fm-JeX"/>
+                        <constraint firstItem="yzR-DS-KGK" firstAttribute="top" secondItem="Tua-23-XnI" secondAttribute="bottom" constant="25" id="Aax-Nx-aK2"/>
+                        <constraint firstItem="8w7-2y-inS" firstAttribute="leading" secondItem="A1m-G5-f05" secondAttribute="leading" constant="20" id="IQa-n3-U97"/>
+                        <constraint firstAttribute="trailing" secondItem="8w7-2y-inS" secondAttribute="trailing" constant="20" id="MlC-Wt-oh8"/>
+                        <constraint firstItem="yzR-DS-KGK" firstAttribute="leading" secondItem="A1m-G5-f05" secondAttribute="leading" constant="20" id="PEA-Sm-aRY"/>
+                        <constraint firstItem="PVB-qM-x6a" firstAttribute="centerX" secondItem="A1m-G5-f05" secondAttribute="centerX" id="RXl-ic-FKV"/>
+                        <constraint firstAttribute="trailing" secondItem="Tua-23-XnI" secondAttribute="trailing" constant="16" id="cKx-or-yGl"/>
+                        <constraint firstItem="Tua-23-XnI" firstAttribute="leading" secondItem="A1m-G5-f05" secondAttribute="leading" constant="20" id="cT0-KC-a7J"/>
+                        <constraint firstItem="PVB-qM-x6a" firstAttribute="top" secondItem="A1m-G5-f05" secondAttribute="top" constant="20" id="dwl-Vf-6pz"/>
+                        <constraint firstItem="Tua-23-XnI" firstAttribute="top" secondItem="8w7-2y-inS" secondAttribute="bottom" constant="2" id="hbF-8k-g9I"/>
+                        <constraint firstItem="8w7-2y-inS" firstAttribute="top" secondItem="PVB-qM-x6a" secondAttribute="bottom" constant="20" id="oai-CY-oS5"/>
+                        <constraint firstAttribute="trailing" secondItem="yzR-DS-KGK" secondAttribute="trailing" constant="20" id="v7L-gE-0Va"/>
+                        <constraint firstAttribute="width" constant="305" id="vZ4-Vt-GoE"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="12"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
+            <gestureRecognizers/>
+            <constraints>
+                <constraint firstItem="A1m-G5-f05" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="3s4-xg-Jf0"/>
+                <constraint firstItem="A1m-G5-f05" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="JEk-Hf-P73"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="containerView" destination="A1m-G5-f05" id="ghD-gs-9dw"/>
+                <outlet property="descLabel" destination="Tua-23-XnI" id="TaP-9q-3WF"/>
+            </connections>
+            <point key="canvasLocation" x="26.717557251908396" y="19.718309859154932"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Widget/Controller/ToneTuningViewController.m

@@ -480,10 +480,10 @@
         self.instrumentPicker = [[KSChoosePicker alloc] initWithTitle:@"" sourceData:self.instrumentArray lastChooseIndex:self.lastChooseIndex sureButtonColor:THEMECOLOR chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
             weakSelf.lastChooseIndex = chooseIndex;
             weakSelf.settingView.instrumentLabel.text = returnValue;
-            NSInteger pitchRate = [self.picthRateArray[chooseIndex] integerValue];
+            NSInteger pitchRate = [weakSelf.picthRateArray[chooseIndex] integerValue];
             weakSelf.A4Frequence = frequence;
             weakSelf.settingView.toneChangeRate = pitchRate;
-            weakSelf.settingView.transferPicthDesc = self.picthDescArray[chooseIndex];
+            weakSelf.settingView.transferPicthDesc = weakSelf.picthDescArray[chooseIndex];
         } cancel:^{
             
         }];

+ 5 - 0
KulexiuForTeacher/KulexiuForTeacher/ToolKit/KSToolLibrary.framework/Headers/KSUploadManager.h

@@ -11,6 +11,8 @@ typedef void(^KSUploadSuccess)(NSMutableArray * _Nonnull fileUrlArray);
 typedef void(^KSUploadFailer)(NSError * _Nullable error, NSString * _Nullable descMessaeg);
 typedef void(^KSUploadProgress)(int64_t bytesWritten,int64_t totalBytes);
 
+typedef void(^KSUploadCancel)(void);
+
 #define UPLOAD_MANAGER ([KSUploadManager shareInstance])
 
 @protocol KSUploadManagerDelegate <NSObject>
@@ -41,6 +43,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)uploadFile:(NSData *)fileData fileName:(NSString *)fileName fileSuffix:(NSString *)fileSuffix progress:(KSUploadProgress)uploadProgress successCallback:(KSUploadSuccess)success faliure:(KSUploadFailer)faliure;
 
+// 取消上传
+- (void)cancelUploadCallback:(KSUploadCancel)cancal;
+
 @end
 
 NS_ASSUME_NONNULL_END

BIN
KulexiuForTeacher/KulexiuForTeacher/ToolKit/KSToolLibrary.framework/KSToolLibrary