Steven 1 年之前
父節點
當前提交
c98f1303a7
共有 15 個文件被更改,包括 144 次插入30 次删除
  1. 6 0
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  2. 21 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/placeholder_avatar.imageset/Contents.json
  3. 二進制
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/placeholder_avatar.imageset/placeholder_avatar@3x.png
  4. 21 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/tenant_defalut_avatar.imageset/Contents.json
  5. 二進制
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/tenant_defalut_avatar.imageset/tenant_defalut_avatar@2x.png
  6. 2 0
      KulexiuForStudent/KulexiuForStudent/Common/Define/UserKeyHeader.h
  7. 19 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Category/UIImageView+DisplayImage.h
  8. 27 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Category/UIImageView+DisplayImage.m
  9. 10 2
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/INSSettingBodyView.m
  10. 2 1
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/INSSettingBodyView.xib
  11. 10 2
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/InstitutionMineBodyView.m
  12. 7 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/UserSettingViewController.m
  13. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/DeleteAccountBodyView.xib
  14. 3 20
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/ModifyNameBodyView.xib
  15. 13 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.m

+ 6 - 0
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -366,6 +366,7 @@
 		BC0D1F71281015B000C5D9E5 /* VideoCourseCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0D1F6E281015AF00C5D9E5 /* VideoCourseCell.m */; };
 		BC0D1F72281015B000C5D9E5 /* VideoCourseCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC0D1F6F281015AF00C5D9E5 /* VideoCourseCell.xib */; };
 		BC0D1F752810165500C5D9E5 /* VideoCourseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0D1F742810165400C5D9E5 /* VideoCourseModel.m */; };
+		BC0D95112AC26E4000E54D3F /* UIImageView+DisplayImage.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0D95102AC26E4000E54D3F /* UIImageView+DisplayImage.m */; };
 		BC106BC52A9336F8000759A9 /* TXLiveRoomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC106BC42A9336F8000759A9 /* TXLiveRoomViewController.m */; };
 		BC106BFE2A933829000759A9 /* TXMicStatusSync.m in Sources */ = {isa = PBXBuildFile; fileRef = BC106BC62A93381C000759A9 /* TXMicStatusSync.m */; };
 		BC106BFF2A933829000759A9 /* TXLiveMessageCardMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BC106BC92A93381D000759A9 /* TXLiveMessageCardMessage.m */; };
@@ -1797,6 +1798,8 @@
 		BC0D1F70281015B000C5D9E5 /* VideoCourseCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoCourseCell.h; sourceTree = "<group>"; };
 		BC0D1F732810165400C5D9E5 /* VideoCourseModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoCourseModel.h; sourceTree = "<group>"; };
 		BC0D1F742810165400C5D9E5 /* VideoCourseModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoCourseModel.m; sourceTree = "<group>"; };
+		BC0D950F2AC26E4000E54D3F /* UIImageView+DisplayImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImageView+DisplayImage.h"; sourceTree = "<group>"; };
+		BC0D95102AC26E4000E54D3F /* UIImageView+DisplayImage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+DisplayImage.m"; sourceTree = "<group>"; };
 		BC106BC32A9336F8000759A9 /* TXLiveRoomViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TXLiveRoomViewController.h; sourceTree = "<group>"; };
 		BC106BC42A9336F8000759A9 /* TXLiveRoomViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TXLiveRoomViewController.m; sourceTree = "<group>"; };
 		BC106BC62A93381C000759A9 /* TXMicStatusSync.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TXMicStatusSync.m; sourceTree = "<group>"; };
@@ -3897,6 +3900,8 @@
 				277933B727E3249E0010E277 /* UIView+XIBView.m */,
 				277933CD27E3249E0010E277 /* UrlDecode.h */,
 				277933B927E3249E0010E277 /* UrlDecode.m */,
+				BC0D950F2AC26E4000E54D3F /* UIImageView+DisplayImage.h */,
+				BC0D95102AC26E4000E54D3F /* UIImageView+DisplayImage.m */,
 			);
 			path = Category;
 			sourceTree = "<group>";
@@ -7642,6 +7647,7 @@
 				BCC0F6542A8CD8F500C4EFA4 /* TXChatBottomView.m in Sources */,
 				BCB908F12850B08D00F5FF69 /* KSChatMusicShareCell.m in Sources */,
 				BC02381928685087005560CA /* LiveAnimationView.m in Sources */,
+				BC0D95112AC26E4000E54D3F /* UIImageView+DisplayImage.m in Sources */,
 				BCC0F6122A8CD89400C4EFA4 /* TXClassroomViewController.m in Sources */,
 				BC8A45AA283DC33400094BBB /* TrackChooseView.m in Sources */,
 				BCFEED4D28F7E4720078A2B7 /* SmallToolViewController.m in Sources */,

+ 21 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/placeholder_avatar.imageset/Contents.json

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

二進制
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/placeholder_avatar.imageset/placeholder_avatar@3x.png


+ 21 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/tenant_defalut_avatar.imageset/Contents.json

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

二進制
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/tenant_defalut_avatar.imageset/tenant_defalut_avatar@2x.png


+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Common/Define/UserKeyHeader.h

@@ -52,6 +52,8 @@
 #define USERDEFAULT_LOGO (@"user_default_avatal")
 #define USER_LOGO_RECTANGLE (@"user_avatarRectangle")
 
+#define CLIENT_USERDEFAULT_LOGO ([UserDefaultObjectForKey(TENANT_ID) integerValue] <= 0 ? @"user_default_avatal" : @"tenant_defalut_avatar")
+
 #define GROUP_DEFAULT_LOGO (@"group_default_avatal")
 #define CLIENT_GROUP_LOGO ([UserDefaultObjectForKey(TENANT_ID) integerValue] <= 0 ? @"group_default_avatal" : @"tenant_group_default_avatal")
 #define VIP_DEFAULT_LOGO (@"vip_chatList")

+ 19 - 0
KulexiuForStudent/KulexiuForStudent/Common/Tools/Category/UIImageView+DisplayImage.h

@@ -0,0 +1,19 @@
+//
+//  UIImageView+DisplayImage.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2023/9/26.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^KSCacheImageCallback)(UIImage * _Nonnull image);
+NS_ASSUME_NONNULL_BEGIN
+
+@interface UIImageView (DisplayImage)
+
+- (void)displayImageWithUrl:(NSURL *)imageUrl placeholder:(UIImage *)placeholderImage defaultImage:(UIImage *)defaultImage callback:(KSCacheImageCallback)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 27 - 0
KulexiuForStudent/KulexiuForStudent/Common/Tools/Category/UIImageView+DisplayImage.m

@@ -0,0 +1,27 @@
+//
+//  UIImageView+DisplayImage.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2023/9/26.
+//
+
+#import "UIImageView+DisplayImage.h"
+
+@implementation UIImageView (DisplayImage)
+
+- (void)displayImageWithUrl:(NSURL *)imageUrl placeholder:(UIImage *)placeholderImage defaultImage:(UIImage *)defaultImage callback:(KSCacheImageCallback)callback {
+    [self sd_setImageWithURL:imageUrl placeholderImage:placeholderImage completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
+        if (error) {
+            if (callback) {
+                callback(defaultImage);
+            }
+        }
+        else {
+            if (callback) {
+                callback(image);
+            }
+        }
+    }];
+}
+
+@end

+ 10 - 2
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/INSSettingBodyView.m

@@ -6,6 +6,7 @@
 //
 
 #import "INSSettingBodyView.h"
+#import "UIImageView+DisplayImage.h"
 
 @interface INSSettingBodyView ()
 
@@ -16,6 +17,8 @@
 
 @property (nonatomic, copy) SettingActionBlock callback;
 
+@property (nonatomic, strong) UIImage *preDisplayImage;
+
 @end
 
 @implementation INSSettingBodyView
@@ -27,10 +30,15 @@
 
 - (void)configUserWithUserInfo:(UserInfo *)info {
     if (![NSString isEmptyString:info.heardUrl]) {
-        [self.uesrAvatar sd_setImageWithURL:[NSURL URLWithString:[info.heardUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+        if (self.preDisplayImage == nil) {
+            self.preDisplayImage = [UIImage imageNamed:CLIENT_USERDEFAULT_LOGO];
+        }
+        [self.uesrAvatar displayImageWithUrl:[NSURL URLWithString:[info.heardUrl getUrlEndcodeString]] placeholder:self.preDisplayImage defaultImage:[UIImage imageNamed:CLIENT_USERDEFAULT_LOGO] callback:^(UIImage * _Nonnull image) {
+            self.preDisplayImage = image;
+        }];
     }
     else {
-        [self.uesrAvatar setImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+        [self.uesrAvatar setImage:[UIImage imageNamed:CLIENT_USERDEFAULT_LOGO]];
     }
     self.userName.text = [NSString returnNoNullStringWithString:info.username];
     self.phoneLabel.text = [NSString returnNoNullStringWithString:info.phone];

+ 2 - 1
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/INSSettingBodyView.xib

@@ -17,7 +17,7 @@
                 <view tag="1001" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dQM-9Y-aDu">
                     <rect key="frame" x="13" y="12" width="371" height="78"/>
                     <subviews>
-                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ufl-yX-uCz">
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="placeholder_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="ufl-yX-uCz">
                             <rect key="frame" x="12" y="14" width="50" height="50"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="50" id="AVn-dr-1pp"/>
@@ -541,6 +541,7 @@
     </objects>
     <resources>
         <image name="mine_next" width="8" height="15"/>
+        <image name="placeholder_avatar" width="68" height="68"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>

+ 10 - 2
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/InstitutionMineBodyView.m

@@ -6,6 +6,7 @@
 //
 
 #import "InstitutionMineBodyView.h"
+#import "UIImageView+DisplayImage.h"
 
 @interface InstitutionMineBodyView ()
 @property (weak, nonatomic) IBOutlet UIImageView *userAvatar;
@@ -19,6 +20,8 @@
 
 @property (nonatomic, copy) INSMineViewCallback callback;
 
+@property (nonatomic, strong) UIImage *preDisplayImage;
+
 
 @end
 
@@ -37,10 +40,15 @@
 
 - (void)configWithSource:(UserInfo *)sourceModel {
     if (![NSString isEmptyString:sourceModel.heardUrl]) {
-        [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[sourceModel.heardUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+        if (self.preDisplayImage == nil) {
+            self.preDisplayImage = [UIImage imageNamed:CLIENT_USERDEFAULT_LOGO];
+        }
+        [self.userAvatar displayImageWithUrl:[NSURL URLWithString:[sourceModel.heardUrl getUrlEndcodeString]] placeholder:self.preDisplayImage defaultImage:[UIImage imageNamed:CLIENT_USERDEFAULT_LOGO] callback:^(UIImage * _Nonnull image) {
+            self.preDisplayImage = image;
+        }];
     }
     else {
-        [self.userAvatar setImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+        [self.userAvatar setImage:[UIImage imageNamed:CLIENT_USERDEFAULT_LOGO]];
     }
     self.userName.text = [NSString returnNoNullStringWithString:sourceModel.username];
     

+ 7 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/UserSettingViewController.m

@@ -24,6 +24,7 @@
 #import "UserInfoManager.h"
 #import <RSKImageCropper/RSKImageCropper.h>
 #import "KSSmallChoosePicker.h"
+#import "UIImageView+DisplayImage.h"
 
 @interface UserSettingViewController ()<RSKImageCropViewControllerDelegate>
 
@@ -39,6 +40,8 @@
 
 @property (nonatomic, assign) NSInteger lastChooseIndex;
 
+@property (nonatomic, strong) UIImage *preDisplayImage;
+
 @end
 
 @implementation UserSettingViewController
@@ -83,7 +86,10 @@
 
 - (void)configMessage {
     if (![NSString isEmptyString:self.mineInfo.heardUrl]) {
-        [self.bodyView.userAvatal sd_setImageWithURL:[NSURL URLWithString:[self.mineInfo.heardUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+        [self.bodyView.userAvatal displayImageWithUrl:[NSURL URLWithString:[self.mineInfo.heardUrl getUrlEndcodeString]] placeholder:self.preDisplayImage defaultImage:[UIImage imageNamed:USERDEFAULT_LOGO] callback:^(UIImage * _Nonnull image) {
+            self.preDisplayImage = image;
+        }];
+        
     }
     else {
         [self.bodyView.userAvatal setImage:[UIImage imageNamed:USERDEFAULT_LOGO]];

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/DeleteAccountBodyView.xib

@@ -18,7 +18,7 @@
                     <rect key="frame" x="13" y="12" width="388" height="929"/>
                     <subviews>
                         <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" bouncesZoom="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DMY-bn-wxE">
-                            <rect key="frame" x="0.0" y="0.0" width="388" height="774"/>
+                            <rect key="frame" x="0.0" y="0.0" width="388" height="767"/>
                             <subviews>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TEx-cD-ZR6">
                                     <rect key="frame" x="0.0" y="0.0" width="388" height="525"/>
@@ -437,7 +437,7 @@
                             </connections>
                         </button>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mMv-gk-ABM">
-                            <rect key="frame" x="16" y="794" width="356" height="48"/>
+                            <rect key="frame" x="16" y="787" width="356" height="48"/>
                             <subviews>
                                 <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入短信验证码" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="byh-5B-J1p">
                                     <rect key="frame" x="12" y="0.0" width="240" height="48"/>
@@ -502,7 +502,7 @@
                         <constraint firstAttribute="trailing" secondItem="mMv-gk-ABM" secondAttribute="trailing" constant="16" id="MR7-ts-wGR"/>
                         <constraint firstItem="DMY-bn-wxE" firstAttribute="leading" secondItem="gTc-LK-g9D" secondAttribute="leading" id="V5r-o8-Nw4"/>
                         <constraint firstItem="Qi7-Np-SbU" firstAttribute="leading" secondItem="gTc-LK-g9D" secondAttribute="leading" constant="12" id="a8l-QS-a5p"/>
-                        <constraint firstItem="Qi7-Np-SbU" firstAttribute="top" secondItem="mMv-gk-ABM" secondAttribute="bottom" constant="23" id="iny-PA-ces"/>
+                        <constraint firstItem="Qi7-Np-SbU" firstAttribute="top" secondItem="mMv-gk-ABM" secondAttribute="bottom" constant="30" id="iny-PA-ces"/>
                         <constraint firstAttribute="bottom" secondItem="Qi7-Np-SbU" secondAttribute="bottom" constant="20" id="oUt-0s-bus"/>
                         <constraint firstItem="mMv-gk-ABM" firstAttribute="leading" secondItem="gTc-LK-g9D" secondAttribute="leading" constant="16" id="oXI-Yc-4s2"/>
                     </constraints>

+ 3 - 20
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/ModifyNameBodyView.xib

@@ -16,32 +16,18 @@
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2Nv-ef-xne">
                     <rect key="frame" x="13" y="20" width="388" height="56"/>
                     <subviews>
-                        <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入昵称" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="OMl-cn-8aR">
-                            <rect key="frame" x="14" y="0.0" width="324" height="56"/>
+                        <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入昵称" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="OMl-cn-8aR">
+                            <rect key="frame" x="14" y="0.0" width="360" height="56"/>
                             <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <fontDescription key="fontDescription" type="system" pointSize="18"/>
                             <textInputTraits key="textInputTraits"/>
                         </textField>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nwh-W6-YBV">
-                            <rect key="frame" x="348" y="8" width="40" height="40"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="40" id="8LK-BQ-Wtw"/>
-                                <constraint firstAttribute="height" constant="40" id="gKf-pk-YfV"/>
-                            </constraints>
-                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                            <state key="normal" image="modify_cancel"/>
-                            <connections>
-                                <action selector="clearAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="unc-PQ-L5I"/>
-                            </connections>
-                        </button>
                     </subviews>
                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="56" id="7R5-BM-RP3"/>
-                        <constraint firstItem="nwh-W6-YBV" firstAttribute="leading" secondItem="OMl-cn-8aR" secondAttribute="trailing" constant="10" id="Nir-ds-2sG"/>
-                        <constraint firstAttribute="trailing" secondItem="nwh-W6-YBV" secondAttribute="trailing" id="RUk-xL-fwg"/>
                         <constraint firstAttribute="bottom" secondItem="OMl-cn-8aR" secondAttribute="bottom" id="gQC-pB-6Mz"/>
-                        <constraint firstItem="nwh-W6-YBV" firstAttribute="centerY" secondItem="2Nv-ef-xne" secondAttribute="centerY" id="hFY-ej-9Ab"/>
+                        <constraint firstAttribute="trailing" secondItem="OMl-cn-8aR" secondAttribute="trailing" constant="14" id="kps-pn-V3V"/>
                         <constraint firstItem="OMl-cn-8aR" firstAttribute="top" secondItem="2Nv-ef-xne" secondAttribute="top" id="nNg-cL-rZs"/>
                         <constraint firstItem="OMl-cn-8aR" firstAttribute="leading" secondItem="2Nv-ef-xne" secondAttribute="leading" constant="14" id="tQ2-bG-4dt"/>
                     </constraints>
@@ -67,7 +53,4 @@
             <point key="canvasLocation" x="132" y="33"/>
         </view>
     </objects>
-    <resources>
-        <image name="modify_cancel" width="18" height="18"/>
-    </resources>
 </document>

+ 13 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.m

@@ -6,6 +6,7 @@
 //
 
 #import "MineBodyView.h"
+#import "UIImageView+DisplayImage.h"
 
 @interface MineBodyView ()
 
@@ -41,6 +42,8 @@
 
 @property (weak, nonatomic) IBOutlet UIImageView *viperImage;
 
+@property (nonatomic, strong) UIImage *preDisplayImage;
+
 @end
 
 @implementation MineBodyView
@@ -87,7 +90,16 @@
     self.userName.text = userName;
     self.userIdLabel.text = [NSString stringWithFormat:@"学号:%.0f",sourceModel.userId];
     self.memberCountLabel.text = [NSString stringWithFormat:@"会员有效期剩余%.0f天",sourceModel.membershipDays];
-    [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[sourceModel.heardUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    
+    if (![NSString isEmptyString:sourceModel.heardUrl]) {
+        [self.userAvatar displayImageWithUrl:[NSURL URLWithString:[sourceModel.heardUrl getUrlEndcodeString]] placeholder:self.preDisplayImage defaultImage:[UIImage imageNamed:USERDEFAULT_LOGO] callback:^(UIImage * _Nonnull image) {
+            self.preDisplayImage = image;
+        }];
+    }
+    else {
+        [self.userAvatar setImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    }
+    
     if ([NSString isEmptyString:sourceModel.subjectName]) {
         self.subjectLabel.text = @"";
         self.subjectView.hidden = YES;