Steven 2 lat temu
rodzic
commit
9a09d70cc7
27 zmienionych plików z 264 dodań i 46 usunięć
  1. BIN
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  2. 18 2
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_nomal.imageset/Contents.json
  4. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_nomal.imageset/mine_nomal@2x.png
  5. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_nomal.imageset/mine_nomal@3x.png
  6. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_setting.imageset/mine_setting@2x.png
  7. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_setting.imageset/mine_setting@3x.png
  8. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_vip.imageset/Contents.json
  9. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_vip.imageset/mine_vip@2x.png
  10. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_vip.imageset/mine_vip@3x.png
  11. 42 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m
  12. 9 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h
  13. 18 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m
  14. 38 28
      KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m
  15. 3 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/Model/TalentTeacherModel.h
  16. 8 3
      KulexiuForStudent/KulexiuForStudent/Module/Home/Model/TalentTeacherModel.m
  17. 23 1
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentCell.m
  18. 7 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentCell.xib
  19. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/DragWindow/KSDragWindow.m
  20. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfoManager.h
  21. 2 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyPhoneChangeController.m
  22. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyViewController.m
  23. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/SettingViewController.m
  24. 3 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/UserSettingViewController.m
  25. 2 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.m
  26. 14 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.m
  27. 26 9
      KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.xib

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


+ 18 - 2
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -302,8 +302,8 @@
             filePath = "KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "240"
-            endingLineNumber = "240"
+            startingLineNumber = "266"
+            endingLineNumber = "266"
             landmarkName = "-setUserAgent"
             landmarkType = "7">
          </BreakpointContent>
@@ -500,5 +500,21 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "68418954-D0BC-432D-A65E-7D1287DBEACF"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "100"
+            endingLineNumber = "100"
+            landmarkName = "-configWithSource:callback:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_nomal.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_nomal.imageset/mine_nomal@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_nomal.imageset/mine_nomal@3x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_setting.imageset/mine_setting@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_setting.imageset/mine_setting@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_vip.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_vip.imageset/mine_vip@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Mine/mine_vip.imageset/mine_vip@3x.png


+ 42 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m

@@ -76,8 +76,30 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(operationDealCallbackMessage:) name:DEALCALLBACKNOTICIFATION object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(backLoginView) name:@"liveroomBackRefresh" object:nil];
     self.isFirstLoad = YES;
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(captureViewTips:) name:UIScreenCapturedDidChangeNotification object:nil];
 }
 
+
+- (void)captureViewTips:(NSNotification *)notification {
+    if ([UIScreen mainScreen].isCaptured) {
+        [self didCapturedView];
+    }
+}
+
+- (void)didCapturedView {
+    
+    NSMutableDictionary *sendParm = [NSMutableDictionary dictionary];
+    [sendParm setValue:@"setVideoPlayer" forKey:@"api"];
+    NSMutableDictionary *content = [NSMutableDictionary dictionary];
+    [content setValue:@"pause" forKey:@"status"];
+    [sendParm setValue:content forKey:@"content"];
+    [self postMessage:sendParm];
+    
+    [self MBPShow:@"为了保证数据安全,请不要录屏"];
+}
+
+
+
 - (void)operationDealCallbackMessage:(NSNotification *)notification {
     NSString *status = [notification object];
     NSMutableDictionary *sendParm = [NSMutableDictionary dictionary];
@@ -128,6 +150,10 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         [self sendResumeMessage];
     }
     self.isFirstLoad = NO;
+    
+    if ([UIScreen mainScreen].isCaptured) {
+        [self didCapturedView];
+    }
 }
 
 - (void)sendResumeMessage {
@@ -537,6 +563,21 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         [sendParm setValue:content forKey:@"content"];
         [self postMessage:sendParm];
     }
+    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"getDeviceStatus"]) {
+        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
+        NSString *type = [valueDic stringValueForKey:@"type"];
+        if ([type isEqualToString:@"video"]) {
+            NSString *status = [UIScreen mainScreen].isCaptured ? @"1" : @"0";
+            NSMutableDictionary *sendParm = [NSMutableDictionary dictionary];
+            [sendParm setValue:@"getDeviceStatus" forKey:@"api"];
+            NSMutableDictionary *content = [NSMutableDictionary dictionary];
+            [content setValue:[valueDic stringValueForKey:@"type"] forKey:@"type"];
+            [content setValue:[valueDic stringValueForKey:@"uuid"] forKey:@"uuid"];
+            [content setValue:status forKey:@"status"];
+            [sendParm setValue:content forKey:@"content"];
+            [self postMessage:sendParm];
+        }
+    }
 }
 
 - (void)chooseFileWithType:(NSString *)typeStr maxNumber:(NSInteger)maxCount bucket:(NSString *)bucket {
@@ -704,6 +745,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 
 // 返回登录页面
 - (void)backLoginView {
+    USER_MANAGER.hasShowFlash = NO;
     [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
     [RCConnectionManager shareManager].isNeedJoin = NO;
     [RCConnectionManager shareManager].isNeedShowMessage = NO;

+ 9 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h

@@ -832,6 +832,15 @@ NS_ASSUME_NONNULL_BEGIN
 + (void)getWhiteBoardRoomMessage:(NSString *)post url:(NSString *)url parm:(NSDictionary *)parm success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 
+// /api-student/teacher/starOrUnStar
+
+/// 关注/取消关注
+/// @param get get
+/// @param userId 老师ID
+/// @param starStatus 状态 0 取消关注 1 关注
+/// @param success 成功
+/// @param faliure 失败
++ (void)starOrUnStarRequest:(NSString *)get userId:(NSString *)userId starStatus:(NSString *)starStatus success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 @end
 

+ 18 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -12,6 +12,7 @@
 #import <RongIMKit/RongIMKit.h>
 #import "JPUSHService.h"
 #import "RCConnectionManager.h"
+#import "UserInfoManager.h"
 
 @implementation KSNetworkingManager
 
@@ -162,6 +163,7 @@
 }
 
 + (void)logoutAction {
+    USER_MANAGER.hasShowFlash = NO;
     [self clearRequestHeader];
     // 取消推送别名
     [JPUSHService deleteAlias:nil seq:0];
@@ -1623,4 +1625,20 @@
     [self configRequestMethodJSON];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
+
+// /api-student/teacher/starOrUnStar
+
+/// 关注/取消关注
+/// @param get get
+/// @param userId 老师ID
+/// @param starStatus 状态 0 取消关注 1 关注
+/// @param success 成功
+/// @param faliure 失败
++ (void)starOrUnStarRequest:(NSString *)get userId:(NSString *)userId starStatus:(NSString *)starStatus success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/teacher/starOrUnStar"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:userId forKey:@"userId"];
+    [parm setValue:starStatus forKey:@"starStatus"];
+    [self request:get andWithUrl:url and:parm success:success faliure:faliure];
+}
 @end

+ 38 - 28
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m

@@ -459,15 +459,6 @@
             if (flashArray.count) {
                 self.flashModel = [[HomeMessageModel alloc] initWithDictionary:[flashArray firstObject]];
             }
-            
-//            // information
-//            NSArray *information = [result arrayValueForKey:@"information"];
-//            NSMutableArray *informationInfoArray = [NSMutableArray array];
-//            for (NSDictionary *parm in information) {
-//                HomeMessageModel *model = [[HomeMessageModel alloc] initWithDictionary:parm];
-//                [informationInfoArray addObject:model];
-//            }
-//            self.informationArray = [NSMutableArray arrayWithArray:informationInfoArray];
         }
         else {
             [self MBPShow:MESSAGEKEY];
@@ -650,6 +641,7 @@
     }];
 }
 
+
 - (void)requestInformationList {
     dispatch_group_enter(self.requestGroup);
     [KSNetworkingManager informationListRequest:KS_POST page:1 rows:10 version:[USER_MANAGER getCurrentVersion] success:^(NSDictionary * _Nonnull dic) {
@@ -719,19 +711,8 @@
 - (void)showNewsWithSource:(HomeMessageModel *)sourceModel {
     // 登录之后才弹窗
     if ([self checkIsLoginToLoginView:NO]) {
-        NSString *useId = UserDefault(UIDKey);
-        NSMutableArray *newArray = UserDefault(useId);
-        if (newArray.count) {
-            if ([newArray containsObject:sourceModel.coverImage]) {
-                return;
-            }
-            else {
-                [self displayAlert:sourceModel];
-            }
-        }
-        else {
-            [self displayAlert:sourceModel];
-        }
+        
+        [self displayAlert:sourceModel];
     }
 }
 
@@ -740,11 +721,11 @@
     if (appDelegate.isShowMemoAlert) {
         return;
     }
-    NSString *useId = UserDefault(UIDKey);
-    UserDefaultRemoveObjectForKey(useId);
-    NSMutableArray *sourceArray = [NSMutableArray arrayWithArray:UserDefault(useId)];
-    [sourceArray addObject:sourceModel.coverImage];
-    UserDefaultSetObjectForKey(sourceArray, useId);
+    if (USER_MANAGER.hasShowFlash) {
+        return;
+    }
+    
+    
     KSNewsAlert *newAlert = [KSNewsAlert shareInstance];
     MJWeakSelf;
     [newAlert evaluateWithMessage:sourceModel.coverImage linkUrl:sourceModel.linkUrl callbackAction:^(BOOL isSure, NSString * _Nonnull linkUrl) {
@@ -760,6 +741,8 @@
     }];
     [newAlert showAlert];
     appDelegate.isShowFlashAlert = YES;
+    USER_MANAGER.hasShowFlash = YES; // 已展示过flash
+
 }
 
 - (void)refreshPageView {
@@ -960,6 +943,18 @@
 
 
 - (void)refreshMusicView {
+    
+    if (self.musicArray.count) {
+        self.musicViewHeight = [HomeHotMusicView getViewHeight];
+        self.hotMusicView.hidden = NO;
+    }
+    else {
+        self.musicViewHeight = CGFLOAT_MIN;
+        self.hotMusicView.hidden = YES;
+    }
+    [self.hotMusicView mas_updateConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(self.musicViewHeight);
+    }];
     [self.musicCollectionView reloadData];
 }
 
@@ -1190,7 +1185,22 @@
 }
 
 - (void)followTalentTeacher:(NSString *)teacherId {
-    
+    [self showhud];
+    [KSNetworkingManager starOrUnStarRequest:KS_GET userId:teacherId starStatus:@"1" success:^(NSDictionary * _Nonnull dic) {
+        [self removehub];
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            MJWeakSelf;
+            
+            [self KSShowMsg:@"关注成功" promptCompletion:^{
+                [weakSelf requestData];
+            }];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        [self removehub];
+    }];
 }
 
 - (void)displaySongDetail:(NSString *)songId {

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/Model/TalentTeacherModel.h

@@ -48,6 +48,9 @@
 @property (nonatomic, assign) double userId;
 @property (nonatomic, strong) NSString *membershipStartTime;
 
+@property (nonatomic, assign) NSInteger watch;
+
+
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;
 - (NSDictionary *)dictionaryRepresentation;

+ 8 - 3
KulexiuForStudent/KulexiuForStudent/Module/Home/Model/TalentTeacherModel.m

@@ -44,6 +44,7 @@ NSString *const kTalentTeacherModelMemo = @"memo";
 NSString *const kTalentTeacherModelLiveDate = @"liveDate";
 NSString *const kTalentTeacherModelUserId = @"userId";
 NSString *const kTalentTeacherModelMembershipStartTime = @"membershipStartTime";
+NSString *const kTalentTeacherModelWatch = @"watch";
 
 
 @interface TalentTeacherModel ()
@@ -90,7 +91,7 @@ NSString *const kTalentTeacherModelMembershipStartTime = @"membershipStartTime";
 @synthesize liveDate = _liveDate;
 @synthesize userId = _userId;
 @synthesize membershipStartTime = _membershipStartTime;
-
+@synthesize watch = _watch;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -140,7 +141,7 @@ NSString *const kTalentTeacherModelMembershipStartTime = @"membershipStartTime";
             self.liveDate = [self objectOrNilForKey:kTalentTeacherModelLiveDate fromDictionary:dict];
             self.userId = [[self objectOrNilForKey:kTalentTeacherModelUserId fromDictionary:dict] doubleValue];
             self.membershipStartTime = [self objectOrNilForKey:kTalentTeacherModelMembershipStartTime fromDictionary:dict];
-
+            self.watch = [[self objectOrNilForKey:kTalentTeacherModelWatch fromDictionary:dict] integerValue];
     }
     
     return self;
@@ -186,7 +187,8 @@ NSString *const kTalentTeacherModelMembershipStartTime = @"membershipStartTime";
     [mutableDict setValue:self.liveDate forKey:kTalentTeacherModelLiveDate];
     [mutableDict setValue:[NSNumber numberWithDouble:self.userId] forKey:kTalentTeacherModelUserId];
     [mutableDict setValue:self.membershipStartTime forKey:kTalentTeacherModelMembershipStartTime];
-
+    [mutableDict setValue:[NSNumber numberWithInt:self.watch] forKey:kTalentTeacherModelWatch];
+    
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -249,6 +251,7 @@ NSString *const kTalentTeacherModelMembershipStartTime = @"membershipStartTime";
     self.liveDate = [aDecoder decodeObjectForKey:kTalentTeacherModelLiveDate];
     self.userId = [aDecoder decodeDoubleForKey:kTalentTeacherModelUserId];
     self.membershipStartTime = [aDecoder decodeObjectForKey:kTalentTeacherModelMembershipStartTime];
+    self.watch = [aDecoder decodeIntegerForKey:kTalentTeacherModelWatch];
     return self;
 }
 
@@ -291,6 +294,7 @@ NSString *const kTalentTeacherModelMembershipStartTime = @"membershipStartTime";
     [aCoder encodeObject:_liveDate forKey:kTalentTeacherModelLiveDate];
     [aCoder encodeDouble:_userId forKey:kTalentTeacherModelUserId];
     [aCoder encodeObject:_membershipStartTime forKey:kTalentTeacherModelMembershipStartTime];
+    [aCoder encodeInteger:_watch forKey:kTalentTeacherModelWatch];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -335,6 +339,7 @@ NSString *const kTalentTeacherModelMembershipStartTime = @"membershipStartTime";
         copy.liveDate = [self.liveDate copyWithZone:zone];
         copy.userId = self.userId;
         copy.membershipStartTime = [self.membershipStartTime copyWithZone:zone];
+        copy.watch = self.watch;
     }
     
     return copy;

+ 23 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentCell.m

@@ -29,6 +29,7 @@
 
 @property (nonatomic, strong) TalentTeacherModel *sourceModel;
 
+@property (weak, nonatomic) IBOutlet UIButton *followButton;
 
 @end
 
@@ -95,16 +96,36 @@
         self.graduateSchool.text = [NSString returnNoNullStringWithString:sourceModel.graduateSchool];
     }
     
+    if (sourceModel.watch == 1) {
+        [self setButtonFollowed];
+        
+    }
+    else {
+        
+        self.followButton.userInteractionEnabled = YES;
+        self.followButton.backgroundColor = THEMECOLOR;
+        [self.followButton setTitle:@"关注" forState:UIControlStateNormal];
+        [self.followButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+        self.followButton.layer.borderColor = THEMECOLOR.CGColor;
+    }
 }
 
 
+- (void)setButtonFollowed {
+    self.followButton.userInteractionEnabled = NO;
+    self.followButton.backgroundColor = [UIColor whiteColor];
+    [self.followButton setTitle:@"已关注" forState:UIControlStateNormal];
+    [self.followButton setTitleColor:HexRGB(0x999999) forState:UIControlStateNormal];
+    self.followButton.layer.borderColor = HexRGB(0xf0f0f0).CGColor;
+}
+
 - (IBAction)followAction:(id)sender {
+    [self setButtonFollowed];
     if (self.callback) {
         self.callback([NSString stringWithFormat:@"%.0f",self.sourceModel.userId]);
     }
 }
 
-
 - (LOTAnimationView *)animationView {
     if (!_animationView) {
         _animationView = [LOTAnimationView animationNamed:@"talentAnimation.json"];
@@ -112,4 +133,5 @@
     }
     return _animationView;
 }
+
 @end

+ 7 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentCell.xib

@@ -119,6 +119,12 @@
                                     <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                                         <real key="value" value="12"/>
                                     </userDefinedRuntimeAttribute>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                        <real key="value" value="1"/>
+                                    </userDefinedRuntimeAttribute>
+                                    <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                        <color key="value" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
+                                    </userDefinedRuntimeAttribute>
                                 </userDefinedRuntimeAttributes>
                                 <connections>
                                     <action selector="followAction:" destination="gTV-IL-0wX" eventType="touchUpInside" id="92T-as-pTh"/>
@@ -161,6 +167,7 @@
             <size key="customSize" width="168" height="183"/>
             <connections>
                 <outlet property="animationBgView" destination="Dhx-ki-5CL" id="iPZ-w4-Zrw"/>
+                <outlet property="followButton" destination="5fX-oe-QBC" id="VKh-Ke-r8o"/>
                 <outlet property="graduateSchool" destination="S4c-t1-3Yg" id="wYB-Bo-d7v"/>
                 <outlet property="liveColorView" destination="CQV-RL-RU6" id="SUB-wz-3UT"/>
                 <outlet property="liveView" destination="0eq-MB-HnX" id="G0f-AD-yCi"/>

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Live/View/DragWindow/KSDragWindow.m

@@ -23,7 +23,7 @@
 - (instancetype)initWithFrame:(CGRect)frame {
     if (self = [super initWithFrame:frame]) {
         self.backgroundColor  = [UIColor clearColor];
-        self.windowLevel = UIWindowLevelAlert;
+        self.windowLevel = UIWindowLevelAlert + 2;
         [self makeKeyAndVisible];
         [self addSubview:self.containerView];
         self.containerView.frame = CGRectMake(0, 0, frame.size.width, frame.size.height);

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/Model/UserInfoManager.h

@@ -19,6 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface UserInfoManager : NSObject
 
+@property (nonatomic, assign) BOOL hasShowFlash;
+
 @property (nonatomic, strong) UserInfo *userInfo;
 
 @property (nonatomic, assign) BOOL hasAuth;

+ 2 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyPhoneChangeController.m

@@ -14,6 +14,7 @@
 #import "JPUSHService.h"
 #import "RCConnectionManager.h"
 #import "NSString+phone.h"
+#import "UserInfoManager.h"
 
 @interface ModifyPhoneChangeController ()
 {
@@ -85,7 +86,7 @@
 }
 
 - (void)successChangeBack {
-    
+    USER_MANAGER.hasShowFlash = NO;
     [RCConnectionManager shareManager].isNeedJoin = NO;
     [RCConnectionManager shareManager].isNeedShowMessage = NO;
     [[RCIM sharedRCIM] logout];

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/ModifyViewController.m

@@ -13,6 +13,7 @@
 #import "CustomNavViewController.h"
 #import "JPUSHService.h"
 #import "RCConnectionManager.h"
+#import "UserInfoManager.h"
 
 @interface ModifyViewController ()
 {
@@ -79,6 +80,7 @@
 
 // 重新登录
 - (void)toLoginView {
+    USER_MANAGER.hasShowFlash = NO;
     [RCConnectionManager shareManager].isNeedJoin = NO;
     [RCConnectionManager shareManager].isNeedShowMessage = NO;
     [[RCIM sharedRCIM] logout];

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/SettingViewController.m

@@ -18,6 +18,7 @@
 #import "JPUSHService.h"
 #import "UserInfoManager.h"
 #import "AccountDeleteViewController.h"
+#import "UserInfoManager.h"
 
 @interface SettingViewController ()
 
@@ -132,6 +133,7 @@
 }
 
 - (void)clearSource {
+    USER_MANAGER.hasShowFlash = NO;
     [RCConnectionManager shareManager].isNeedJoin = NO;
     [RCConnectionManager shareManager].isNeedShowMessage = NO;
     [[RCIM sharedRCIM] logout];

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/UserSettingViewController.m

@@ -23,6 +23,7 @@
 #import "InstrumentChooseViewController.h"
 #import "StudentInfoModel.h"
 #import "KSFullDatePicker.h"
+#import "UserInfoManager.h"
 
 @interface UserSettingViewController ()
 
@@ -325,6 +326,8 @@
 }
 
 - (void)clearSource {
+    
+    USER_MANAGER.hasShowFlash = NO;
     [RCConnectionManager shareManager].isNeedJoin = NO;
     [RCConnectionManager shareManager].isNeedShowMessage = NO;
     [[RCIM sharedRCIM] logout];

+ 2 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.m

@@ -15,6 +15,7 @@
 #import "RCConnectionManager.h"
 #import "NSString+phone.h"
 #import "KSPublicAlertView.h"
+#import "UserInfoManager.h"
 
 @interface AccountDeleteViewController ()
 {
@@ -90,7 +91,7 @@
 }
 
 - (void)successDeleteBack {
-    
+    USER_MANAGER.hasShowFlash = NO;
     [RCConnectionManager shareManager].isNeedJoin = NO;
     [RCConnectionManager shareManager].isNeedShowMessage = NO;
     [[RCIM sharedRCIM] logout];

+ 14 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.m

@@ -37,6 +37,8 @@
 
 @property (nonatomic, copy) MineViewCallback callback;
 
+@property (weak, nonatomic) IBOutlet UIImageView *viperImage;
+
 @end
 
 @implementation MineBodyView
@@ -58,6 +60,18 @@
 }
 
 - (void)configWithSource:(StudentInfoModel *)sourceModel {
+    NSString *viperImage = @"";
+    if (sourceModel.membershipDays > 0) {
+        self.userAvatar.layer.borderColor = HexRGB(0xFFE0B9).CGColor;
+        viperImage = @"mine_vip";
+    }
+    else {
+        self.userAvatar.layer.borderColor = HexRGB(0xffffff).CGColor;
+        viperImage = @"mine_nomal";
+    }
+    
+    [self.viperImage setImage:[UIImage imageNamed:viperImage]];
+    
     self.finishCourseLabel.text = [NSString stringWithFormat:@"%.0f",sourceModel.finshClassHours];
     self.residueCourseLabel.text = [NSString stringWithFormat:@"%.0f",sourceModel.unfinshClassHours];
     self.followTeacherLabel.text = [NSString stringWithFormat:@"%.0f",sourceModel.starTeacherNum];

+ 26 - 9
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.xib

@@ -227,13 +227,6 @@
                                 </userDefinedRuntimeAttribute>
                             </userDefinedRuntimeAttributes>
                         </view>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QuV-vC-ohV">
-                            <rect key="frame" x="334" y="14" width="52" height="52"/>
-                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                            <connections>
-                                <action selector="modifyUser:" destination="iN0-l3-epB" eventType="touchUpInside" id="Lba-uL-3dV"/>
-                            </connections>
-                        </button>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NZg-rk-TQZ">
                             <rect key="frame" x="99" y="50" width="44" height="20"/>
                             <subviews>
@@ -268,8 +261,28 @@
                                 <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                                     <real key="value" value="26"/>
                                 </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                    <real key="value" value="2"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                    <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                </userDefinedRuntimeAttribute>
                             </userDefinedRuntimeAttributes>
                         </imageView>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="0Am-MA-eFO">
+                            <rect key="frame" x="343" y="58.5" width="34" height="15"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="15" id="jbJ-ZB-M7W"/>
+                                <constraint firstAttribute="width" constant="34" id="o2b-DA-Y3j"/>
+                            </constraints>
+                        </imageView>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QuV-vC-ohV">
+                            <rect key="frame" x="334" y="14" width="52" height="52"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <connections>
+                                <action selector="modifyUser:" destination="iN0-l3-epB" eventType="touchUpInside" id="Lba-uL-3dV"/>
+                            </connections>
+                        </button>
                     </subviews>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <gestureRecognizers/>
@@ -279,6 +292,8 @@
                         <constraint firstItem="QuV-vC-ohV" firstAttribute="top" secondItem="0Xj-Pq-GsW" secondAttribute="top" id="Cx3-Ob-Pvf"/>
                         <constraint firstItem="QuV-vC-ohV" firstAttribute="trailing" secondItem="0Xj-Pq-GsW" secondAttribute="trailing" id="Jty-Vm-XW6"/>
                         <constraint firstItem="Kmw-KD-cZO" firstAttribute="top" secondItem="4LF-Bt-r8c" secondAttribute="top" constant="14" id="N5R-0g-Gha"/>
+                        <constraint firstItem="0Am-MA-eFO" firstAttribute="centerX" secondItem="0Xj-Pq-GsW" secondAttribute="centerX" id="PGa-cU-aS8"/>
+                        <constraint firstItem="0Am-MA-eFO" firstAttribute="centerY" secondItem="0Xj-Pq-GsW" secondAttribute="bottom" id="QOh-vQ-CGU"/>
                         <constraint firstItem="XdJ-kZ-3mN" firstAttribute="top" secondItem="Kmw-KD-cZO" secondAttribute="bottom" constant="8" id="RvD-w9-U4v"/>
                         <constraint firstItem="XdJ-kZ-3mN" firstAttribute="leading" secondItem="Kmw-KD-cZO" secondAttribute="leading" id="YeN-cd-OHl"/>
                         <constraint firstItem="0Xj-Pq-GsW" firstAttribute="centerY" secondItem="4LF-Bt-r8c" secondAttribute="centerY" id="Yw6-be-zX3"/>
@@ -650,11 +665,11 @@
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="优惠券" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UK6-sa-jH9">
-                                    <rect key="frame" x="31.5" y="49" width="34" height="16"/>
+                                    <rect key="frame" x="30" y="49" width="37" height="16"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="16" id="WfD-9Y-oXn"/>
                                     </constraints>
-                                    <fontDescription key="fontDescription" type="system" pointSize="11"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                     <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                 </label>
@@ -864,6 +879,7 @@
                 <outlet property="userAvatar" destination="0Xj-Pq-GsW" id="HFE-tF-Mjw"/>
                 <outlet property="userIdLabel" destination="yim-3c-rJe" id="SSw-wm-kIL"/>
                 <outlet property="userName" destination="Kmw-KD-cZO" id="gtt-8o-BML"/>
+                <outlet property="viperImage" destination="0Am-MA-eFO" id="Cn8-2P-TiR"/>
             </connections>
             <point key="canvasLocation" x="131.8840579710145" y="204.24107142857142"/>
         </view>
@@ -948,6 +964,7 @@
         <image name="mine_judgeRecord" width="33" height="33"/>
         <image name="mine_music" width="33" height="33"/>
         <image name="mine_next" width="8" height="15"/>
+        <image name="mine_nomal" width="34" height="15"/>
         <image name="mine_ticket" width="42" height="42"/>
         <image name="mine_trainRecord" width="42" height="42"/>
         <image name="mine_uid" width="11" height="11"/>