Steven 9 달 전
부모
커밋
e519563b18

+ 2 - 2
KulexiuForStudent/KulexiuForStudent.xcodeproj/xcshareddata/xcschemes/KulexiuForStudent.xcscheme

@@ -51,7 +51,7 @@
       </Testables>
    </TestAction>
    <LaunchAction
-      buildConfiguration = "DEV"
+      buildConfiguration = "TEST"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"
@@ -92,7 +92,7 @@
       buildConfiguration = "Debug">
    </AnalyzeAction>
    <ArchiveAction
-      buildConfiguration = "Release"
+      buildConfiguration = "TEST"
       revealArchiveInOrganizer = "YES">
    </ArchiveAction>
 </Scheme>

+ 26 - 28
KulexiuForStudent/KulexiuForStudent/Common/Tools/UMShare/KSUMShareManager.m

@@ -23,7 +23,7 @@
 
 @property (nonatomic, strong) UIImage *shareImage;
 
-@property (nonatomic, strong) UIViewController *displayCtrl;
+@property (nonatomic, weak) UIViewController *displayCtrl;
 
 @property (nonatomic, assign) KSSHARETYPE shareType;
 
@@ -80,24 +80,24 @@
 }
 
 - (void)openShareView {
-    MJWeakSelf;
+
     [UMSocialUIManager setShareMenuViewDelegate:self];
     [UMSocialUIManager showShareMenuViewInWindowWithPlatformSelectionBlock:^(UMSocialPlatformType platformType, NSDictionary *userInfo) {
         if (platformType == UMSocialPlatformType_UserDefine_Begin+1) { // 分享到群组
-            if (weakSelf.shareType == KSSHARETYPE_IMAGE) {
+            if (self.shareType == KSSHARETYPE_IMAGE) {
                 KSImageShareViewController *shareGroupCtrl = [[KSImageShareViewController alloc] init];
                 shareGroupCtrl.shareImage = self.shareImage;
                 [shareGroupCtrl shareGroupCallback:^(BOOL isSuccess, NSString *descMsg) {
-                    if (weakSelf.callback) {
-                        weakSelf.callback(isSuccess,descMsg);
+                    if (self.callback) {
+                        self.callback(isSuccess,descMsg);
                         [LOADING_MANAGER MBShowAUTOHidingInWindow:descMsg];
                     }
                 }];
-                [weakSelf.displayCtrl.navigationController pushViewController:shareGroupCtrl animated:YES];
+                [self.displayCtrl.navigationController pushViewController:shareGroupCtrl animated:YES];
             }
             else {
-                if (weakSelf.callback) {
-                    weakSelf.callback(NO,@"仅支持图片分享到群组");
+                if (self.callback) {
+                    self.callback(NO,@"仅支持图片分享到群组");
                     [LOADING_MANAGER MBShowAUTOHidingInWindow:@"仅支持图片分享到群组"];
                 }
             }
@@ -105,28 +105,28 @@
         }
         else if (platformType == UMSocialPlatformType_UserDefine_Begin+2) { // 图片保存到相册
             UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
-            pasteboard.string = weakSelf.saveLinkUrl;
+            pasteboard.string = self.saveLinkUrl;
             [LOADING_MANAGER MBShowAUTOHidingInWindow:@"复制成功"];
         }
         else {
             //创建分享消息对象
             UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject];
             NSString *shareTitle = @"";
-            if (![NSString isEmptyString:weakSelf.shareTitle]) {
-                shareTitle = weakSelf.shareTitle;
+            if (![NSString isEmptyString:self.shareTitle]) {
+                shareTitle = self.shareTitle;
             }
             NSString *descMessage = @"";
-            if (weakSelf.shareMessage) {
+            if (self.shareMessage) {
                 descMessage = self.shareMessage;
             }
             // 创建分享对象
-            if (weakSelf.shareType == KSSHARETYPE_IMAGE) {
+            if (self.shareType == KSSHARETYPE_IMAGE) {
                 UMShareImageObject *shareObj = [UMShareImageObject shareObjectWithTitle:shareTitle descr:descMessage thumImage:[UIImage imageNamed:@"shareImage"]];
                 shareObj.shareImage = self.shareImage;
                 //分享消息对象设置分享内容对象
                 messageObject.shareObject = shareObj;
             }
-            else if (weakSelf.shareType == KSSHARETYPE_VODEO) {
+            else if (self.shareType == KSSHARETYPE_VODEO) {
                 UMShareWebpageObject *shareObj = [UMShareWebpageObject shareObjectWithTitle:shareTitle descr:descMessage thumImage:[UIImage imageNamed:@"shareImage"]];
                 //            NSString *shareUrl = [self.shareUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
                 shareObj.webpageUrl = self.shareUrl;
@@ -137,8 +137,8 @@
             [[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject currentViewController:nil completion:^(id data, NSError *error) {
                 if (error) {
                     NSLog(@"************分享失败 %@*********",error);
-                    if (weakSelf.callback) {
-                        weakSelf.callback(NO, @"分享失败");
+                    if (self.callback) {
+                        self.callback(NO, @"分享失败");
                         [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享失败"];
                     }
                 }else{
@@ -146,8 +146,8 @@
                         UMSocialShareResponse *resp = data;
                         //分享结果消息
                         NSLog(@"************分享成功 %@*********",resp.message);
-                        if (weakSelf.callback) {
-                            weakSelf.callback(YES,@"分享成功");
+                        if (self.callback) {
+                            self.callback(YES,@"分享成功");
                             [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享成功"];
                         }
                     }else{
@@ -232,13 +232,12 @@
         //分享消息对象设置分享内容对象
         messageObject.shareObject = shareObj;
     }
-    MJWeakSelf;
     //调用分享接口
     [[UMSocialManager defaultManager] shareToPlatform:UMSocialPlatformType_WechatSession messageObject:messageObject currentViewController:nil completion:^(id data, NSError *error) {
         if (error) {
             NSLog(@"************分享失败 %@*********",error);
-            if (weakSelf.callback) {
-                weakSelf.callback(NO, @"分享失败");
+            if (self.callback) {
+                self.callback(NO, @"分享失败");
                 [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享失败"];
             }
         }else{
@@ -246,8 +245,8 @@
                 UMSocialShareResponse *resp = data;
                 //分享结果消息
                 NSLog(@"************分享成功 %@*********",resp.message);
-                if (weakSelf.callback) {
-                    weakSelf.callback(YES,@"分享成功");
+                if (self.callback) {
+                    self.callback(YES,@"分享成功");
                     [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享成功"];
                 }
             }else{
@@ -292,12 +291,11 @@
         messageObject.shareObject = shareObj;
     }
     //调用分享接口
-    MJWeakSelf;
     [[UMSocialManager defaultManager] shareToPlatform:UMSocialPlatformType_WechatTimeLine messageObject:messageObject currentViewController:nil completion:^(id data, NSError *error) {
         if (error) {
             NSLog(@"************分享失败 %@*********",error);
-            if (weakSelf.callback) {
-                weakSelf.callback(NO, @"分享失败");
+            if (self.callback) {
+                self.callback(NO, @"分享失败");
                 [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享失败"];
             }
         }else{
@@ -305,8 +303,8 @@
                 UMSocialShareResponse *resp = data;
                 //分享结果消息
                 NSLog(@"************分享成功 %@*********",resp.message);
-                if (weakSelf.callback) {
-                    weakSelf.callback(YES,@"分享成功");
+                if (self.callback) {
+                    self.callback(YES,@"分享成功");
                     [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享成功"];
                 }
             }else{

+ 1 - 2
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.xib

@@ -346,7 +346,7 @@
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="member_bg" translatesAutoresizingMaskIntoConstraints="NO" id="1bH-7t-qOO">
                             <rect key="frame" x="0.0" y="0.0" width="372" height="82"/>
                         </imageView>
-                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" image="mineCenter_tagSvip" translatesAutoresizingMaskIntoConstraints="NO" id="5z5-qL-E8k">
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="5z5-qL-E8k">
                             <rect key="frame" x="17" y="14" width="18" height="18"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="18" id="9WR-bC-D8Z"/>
@@ -1053,7 +1053,6 @@
         <image name="activity_award" width="42" height="42"/>
         <image name="member_bg" width="176.5" height="82"/>
         <image name="member_center" width="74" height="26"/>
-        <image name="mineCenter_tagSvip" width="18" height="18"/>
         <image name="mine_course" width="33" height="33"/>
         <image name="mine_goodsOrder" width="42" height="42"/>
         <image name="mine_homework" width="33" height="33"/>