Browse Source

接口更换

Steven 11 months ago
parent
commit
4b178dfc2f
16 changed files with 151 additions and 77 deletions
  1. 1 1
      KulexiuForStudent/KulexiuForStudent.xcodeproj/xcshareddata/xcschemes/KulexiuForStudent.xcscheme
  2. 5 5
      KulexiuForStudent/KulexiuForStudent/AppDelegate.m
  3. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Institution/Home/album_lock.imageset/Contents.json
  4. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Institution/Home/album_lock.imageset/album_lock@2x.png
  5. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Institution/Home/album_lock.imageset/album_lock@3x.png
  6. 2 11
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h
  7. 6 20
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m
  8. 49 15
      KulexiuForStudent/KulexiuForStudent/Common/Base/LoginManger/KSLoginManager.m
  9. 17 17
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/Controller/TenantDarkViewController.m
  10. 2 2
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/InstitutionNomalNavView.xib
  11. 5 1
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantSwitchAlbum/AlbumSwitchCell.m
  12. 29 1
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantSwitchAlbum/AlbumSwitchCell.xib
  13. 5 0
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantSwitchAlbum/AlbumSwitchView.m
  14. 2 1
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/Controller/INSSettingViewController.m
  15. 2 2
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/INSSettingBodyView.xib
  16. 4 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBottomView.m

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

@@ -92,7 +92,7 @@
       buildConfiguration = "Debug">
    </AnalyzeAction>
    <ArchiveAction
-      buildConfiguration = "Release"
+      buildConfiguration = "TEST"
       revealArchiveInOrganizer = "YES">
    </ArchiveAction>
 </Scheme>

+ 5 - 5
KulexiuForStudent/KulexiuForStudent/AppDelegate.m

@@ -714,12 +714,12 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 
 - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
     NSString* webpageStr =  userActivity.webpageURL.absoluteString;
-        if ([webpageStr containsString:@"wx97408cd22c879ff7"] && [webpageStr containsString:@"pay"]) {
-            BOOL isok =  [WXApi handleOpenUniversalLink:userActivity delegate:self];
-            if (isok) {
-                return YES;
-            }
+    if ([webpageStr containsString:@"wx97408cd22c879ff7"] && [webpageStr containsString:@"pay"]) {
+        BOOL isok =  [WXApi handleOpenUniversalLink:userActivity delegate:self];
+        if (isok) {
+            return YES;
         }
+    }
     if (![[UMSocialManager defaultManager] handleUniversalLink:userActivity options:nil]) {
         // 其他SDK的回调
         

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Institution/Home/album_lock.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Institution/Home/album_lock.imageset/album_lock@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Institution/Home/album_lock.imageset/album_lock@3x.png


+ 2 - 11
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h

@@ -884,16 +884,7 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)tenantActivationCodeRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
-// 查询机构专辑
-// api-student/student/userTenantAlbumRecord/detail
-
-/// 查询机构专辑
-/// @param post post
-/// @param success 成功
-/// @param faliure 失败
-+ (void)userTenantAlbumRecordRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
-
-// tenantGroupAlbum/buyAlbumInfo
+// /tenantGroupAlbum/albumList
 
 /// 查询学生可购买专辑信息
 /// @param get get
@@ -906,7 +897,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 /// 查询专辑详情
 /// @param get get
-/// @param tenantAlbumId 专辑id'
+/// @param tenantAlbumId 专辑id
 /// @param success 成功
 /// @param faliure 失败
 + (void)userBuyAlbumInfoDetailRequest:(NSString *)get tenantAlbumId:(NSString *)tenantAlbumId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;

+ 6 - 20
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -100,7 +100,7 @@
     NSLog(@"----url ------%@",myUrl);
 #pragma mark  ----- 签名
 //    parm = [NSString signToMD5:parm];
-//    NSLog(@"%@",[parm mj_JSONString]);
+    NSLog(@"%@",[parm mj_JSONString]);
     // post
     if ([post isEqualToString:KS_POST]) {
         [[VoNetworking sharedManager] postWithUrl:myUrl refreshRequest:YES cache:NO params:parm progressBlock:^(int64_t bytesRead, int64_t totalBytes) {
@@ -110,7 +110,7 @@
         } successBlock:^(id response) {
             
             dic = [NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves error:nil];
-            
+            NSLog(@"-------resonse -- %@", dic);
             if ([dic ks_integerValueForKey:@"code"] == 403) { // token验证失败
                 [self logOutWithType:YES];
                 [dic setValue:@"请重新登录" forKey:@"msg"];
@@ -147,7 +147,7 @@
         } successBlock:^(id response) {
             
             dic = [NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves error:nil];
-            
+            NSLog(@"-------resonse -- %@", dic);
             if ([dic ks_integerValueForKey:@"code"] == 403) { // token验证失败
                 [self logOutWithType:YES];
                 [dic setValue:@"请重新登录" forKey:@"msg"];
@@ -1745,37 +1745,23 @@
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
-// 查询机构专辑
-// api-student/student/userTenantAlbumRecord/detail
-
-/// 查询机构专辑
-/// @param post post
-/// @param success 成功
-/// @param faliure 失败
-+ (void)userTenantAlbumRecordRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
-    [self configRequestMethodJSON];
-
-    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/userTenantAlbumRecord/detail"];
-    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
-    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
-}
 
+// tenantGroupAlbum/albumList
 /// 查询学生可购买专辑信息
 /// @param get get
 /// @param success 成功
 /// @param faliure 失败
 + (void)userTenantAlbumListRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
-    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/tenantGroupAlbum/buyAlbumInfo"];
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/tenantGroupAlbum/albumList"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [self request:get andWithUrl:url and:parm success:success faliure:faliure];
 }
 
 // /api-student/tenantGroupAlbum/buyAlbumInfoDetail
 
-
 /// 查询专辑详情
 /// @param get get
-/// @param tenantAlbumId 专辑id'
+/// @param tenantAlbumId 专辑id
 /// @param success 成功
 /// @param faliure 失败
 + (void)userBuyAlbumInfoDetailRequest:(NSString *)get tenantAlbumId:(NSString *)tenantAlbumId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {

+ 49 - 15
KulexiuForStudent/KulexiuForStudent/Common/Base/LoginManger/KSLoginManager.m

@@ -49,6 +49,7 @@
     [USER_MANAGER sendUMEvent:@"klx_logout"];
     [USER_MANAGER stopCountUMEvent];
 }
+
 - (void)logoutAction {
     [[NSNotificationCenter defaultCenter] postNotificationName:@"refreshLiveClickStatus" object:nil];
     [self clearUMCount];
@@ -72,26 +73,59 @@
     // 返回登录页面
     UIViewController *vc = [UIApplication sharedApplication].keyWindow.rootViewController;
     if ([vc isKindOfClass:[UITabBarController class]]) {
-        UITabBarController *tab = (UITabBarController *)[UIApplication sharedApplication].keyWindow.rootViewController;
+        UITabBarController *tab = (UITabBarController *)vc;
         CustomNavViewController *ctrl = (CustomNavViewController *)tab.selectedViewController;
-        [ctrl popToRootViewControllerAnimated:NO];
+        if (ctrl.presentedViewController) {
+            UIViewController *presentCtrl = ctrl.presentedViewController;
+            [presentCtrl dismissViewControllerAnimated:YES completion:^{
+                LoginViewController *logonVC = [[LoginViewController alloc] init];
+                CustomNavViewController *navCtrl = [[CustomNavViewController alloc] initWithRootViewController:logonVC];
+                [AppDelegate shareAppDelegate].window.rootViewController = navCtrl;
+                
+                // 切换到横屏
+                AppDelegate* delegate = [AppDelegate shareAppDelegate];
+                if (delegate.allowAutoRotate) {
+                    delegate.allowAutoRotate = NO;
+                    if (IS_IPAD) {
+                        logonVC.zh_statusBarHidden = NO;
+                    }
+                    [UIDevice switchNewOrientation:UIInterfaceOrientationPortrait inController:logonVC];
+                }
+                [delegate refreshThemeColorAndConfig];
+            }];
+        }
+        else {
+            [ctrl popToRootViewControllerAnimated:NO];
+            LoginViewController *logonVC = [[LoginViewController alloc] init];
+            CustomNavViewController *navCtrl = [[CustomNavViewController alloc] initWithRootViewController:logonVC];
+            [AppDelegate shareAppDelegate].window.rootViewController = navCtrl;
 
-        LoginViewController *logonVC = [[LoginViewController alloc] init];
-        CustomNavViewController *navCtrl = [[CustomNavViewController alloc] initWithRootViewController:logonVC];
-        navCtrl.modalPresentationStyle = UIModalPresentationFullScreen;
-        [tab.selectedViewController presentViewController:navCtrl animated:YES completion:nil];
-        
-        // 切换到横屏
-        AppDelegate* delegate = [AppDelegate shareAppDelegate];
-        [delegate refreshThemeColorAndConfig];
-        if (delegate.allowAutoRotate) {
-            delegate.allowAutoRotate = NO;
-            [UIDevice switchNewOrientation:UIInterfaceOrientationPortrait inController:logonVC];
+            // 切换到横屏
+            AppDelegate* delegate = [AppDelegate shareAppDelegate];
+            if (delegate.allowAutoRotate) {
+                delegate.allowAutoRotate = NO;
+                if (IS_IPAD) {
+                    logonVC.zh_statusBarHidden = NO;
+                }
+                [UIDevice switchNewOrientation:UIInterfaceOrientationPortrait inController:logonVC];
+            }
+            [delegate refreshThemeColorAndConfig];
         }
+        
     }
     else if ([vc isKindOfClass:NSClassFromString(@"CustomNavViewController")]) {
-        CustomNavViewController *ctrl = (CustomNavViewController *)vc;
-        [ctrl popToRootViewControllerAnimated:YES];
+        // dismiss
+        if (vc.presentedViewController) {
+            UIViewController *presentCtrl = vc.presentedViewController;
+            [presentCtrl dismissViewControllerAnimated:YES completion:^{
+                CustomNavViewController *ctrl = (CustomNavViewController *)vc;
+                [ctrl popToRootViewControllerAnimated:YES];
+            }];
+        }
+        else {
+            CustomNavViewController *ctrl = (CustomNavViewController *)vc;
+            [ctrl popToRootViewControllerAnimated:YES];
+        }
     }
 }
 

+ 17 - 17
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/Controller/TenantDarkViewController.m

@@ -46,8 +46,6 @@
 
 @property (nonatomic, assign) BOOL isFirstLoad;
 
-@property (nonatomic, assign) BOOL tenantAlbumStatus; // 当前专辑状态 是否可用
-
 @property (nonatomic, strong) NSMutableArray *sourceArray; // 分类数据
 
 @property (nonatomic, assign) NSInteger albumCount; // 专辑数量
@@ -56,6 +54,8 @@
 
 @property (nonatomic, strong) NSMutableArray *albumListArray; // 专辑数据
 
+@property (nonatomic, strong) GroupAlbumModel *albumModel; // 小组专辑信息
+
 @end
 
 @implementation TenantDarkViewController
@@ -241,14 +241,22 @@
 }
 
 - (void)refreshWithModel:(GroupAlbumModel *)displayModel {
-    
+    self.albumModel = displayModel;
     self.chooseAlbumId = displayModel.internalBaseClassIdentifier;
     UserDefaultSet(self.chooseAlbumId, TENANT_ALBUMID);
     
-    self.tenantAlbumStatus = displayModel.status;
     [self.navView configAlbumName:displayModel.name];
     NSMutableArray *sourceArray = [NSMutableArray array];
     NSMutableArray *aniArray = [NSMutableArray array];
+    
+    // COURSEWARE
+    if (displayModel.coursewareCounts > 0) {
+        TenantAlbumModel *model = [[TenantAlbumModel alloc] init];
+        model.subjectType = @"COURSEWARE";
+        [sourceArray addObject:model];
+        [aniArray addObject:@"cloudCourse_Ani.json"];
+    }
+    
     // 声部
     if (displayModel.subjectCounts > 0) {
         TenantAlbumModel *model = [[TenantAlbumModel alloc] init];
@@ -273,14 +281,6 @@
         [aniArray addObject:@"mutiMusic_Ani.json"];
     }
     
-    // COURSEWARE
-    if (displayModel.coursewareCounts > 0) {
-        TenantAlbumModel *model = [[TenantAlbumModel alloc] init];
-        model.subjectType = @"COURSEWARE";
-        [sourceArray addObject:model];
-        [aniArray addObject:@"cloudCourse_Ani.json"];
-    }
-    
     self.sourceArray = [NSMutableArray arrayWithArray:sourceArray];
     self.animationNameArray = [NSMutableArray arrayWithArray:aniArray];
     [self.pagerView reloadData];
@@ -349,7 +349,7 @@
 }
 
 - (__kindof UICollectionViewCell *)pagerView:(TYCyclePagerView *)pagerView cellForItemAtIndex:(NSInteger)index {
-    BOOL isLock = self.tenantAlbumStatus == YES ? NO : YES;
+    BOOL isLock = self.albumModel.status == YES ? NO : YES;
     TenantHomeSubjectListCell *cell = [pagerView dequeueReusableCellWithReuseIdentifier:@"TenantHomeSubjectListCell" forIndex:index];
     [cell configWithJsonSting:self.animationNameArray[index] isLock:isLock];
     if (pagerView.curIndex == index) {
@@ -376,13 +376,13 @@
 
 - (void)pagerView:(TYCyclePagerView *)pageView didSelectedItemCell:(__kindof UICollectionViewCell *)cell atIndex:(NSInteger)index {
 
-    BOOL isLock = self.tenantAlbumStatus == YES ? NO : YES;
+    BOOL isLock = self.albumModel.status == YES ? NO : YES;
     if (isLock) {
         TenantAlbumModel *model = self.sourceArray[index];
         NSString *subjectType = model.subjectType;
         
         KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-        ctrl.url = [NSString stringWithFormat:@"%@%@?subjectType=%@&albumId=%@",TENANT_WEBHOST,@"/#/train-tool",subjectType,self.chooseAlbumId];
+        ctrl.url = [NSString stringWithFormat:@"%@%@?subjectType=%@&albumId=%@",TENANT_WEBHOST,@"/#/train-tool",subjectType,self.albumModel.internalBaseClassIdentifier];
         [self.navigationController pushViewController:ctrl animated:YES];
     }
     else { // 跳转到对应页面
@@ -390,12 +390,12 @@
         NSString *subjectType = model.subjectType;
         if ([subjectType isEqualToString:@"COURSEWARE"]) { // 云教程
             KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
-            webCtrl.url = [NSString stringWithFormat:@"%@/#/lessonCourseware?albumId=%@", TENANT_WEBHOST, self.chooseAlbumId];
+            webCtrl.url = [NSString stringWithFormat:@"%@/#/lessonCourseware?albumId=%@", TENANT_WEBHOST, self.albumModel.internalBaseClassIdentifier];
             [self.navigationController pushViewController:webCtrl animated:YES];
         }
         else {
             KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
-            webCtrl.url = [NSString stringWithFormat:@"%@/#/train-list?subjectType=%@&albumId=%@", TENANT_WEBHOST,subjectType, self.chooseAlbumId];
+            webCtrl.url = [NSString stringWithFormat:@"%@/#/train-list?subjectType=%@&albumId=%@", TENANT_WEBHOST,subjectType, self.albumModel.internalBaseClassIdentifier];
             [self.navigationController pushViewController:webCtrl animated:YES];
         }
         

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/InstitutionNomalNavView.xib

@@ -47,7 +47,7 @@
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" text="宫崎骏合集" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MfF-8w-8uL">
                                             <rect key="frame" x="8" y="4.3333333333333348" width="66.333333333333329" height="15.666666666666664"/>
                                             <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="13"/>
-                                            <color key="textColor" red="1" green="0.37647058823529411" blue="0.55686274509803924" alpha="1" colorSpace="calibratedRGB"/>
+                                            <color key="textColor" red="0.95294117647058818" green="0.27058823529411763" blue="0.48627450980392156" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                         </label>
                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bw9-rt-S6A">
@@ -79,7 +79,7 @@
                                             <real key="value" value="1"/>
                                         </userDefinedRuntimeAttribute>
                                         <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
-                                            <color key="value" red="1" green="0.37647058823529411" blue="0.55686274509803924" alpha="1" colorSpace="calibratedRGB"/>
+                                            <color key="value" red="0.97254901960784312" green="0.37647058823529411" blue="0.55686274509803924" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         </userDefinedRuntimeAttribute>
                                     </userDefinedRuntimeAttributes>
                                 </view>

+ 5 - 1
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantSwitchAlbum/AlbumSwitchCell.m

@@ -19,6 +19,8 @@
 
 @property (weak, nonatomic) IBOutlet UIImageView *chooseImage;
 
+@property (weak, nonatomic) IBOutlet UIView *lockView;
+
 @end
 
 @implementation AlbumSwitchCell
@@ -33,7 +35,7 @@
 - (void)resetDefaultStatus {
     self.selectedBgView.hidden = YES;
     self.chooseImage.hidden = YES;
-    self.expiredTime.textColor = HexRGBAlpha(0xFFFFFF, 0.7f);
+    self.expiredTime.textColor = HexRGBAlpha(0xFFFFFF, 0.5f);
 }
 
 - (void)configWithSource:(GroupAlbumModel *)model {
@@ -51,8 +53,10 @@
     
     if (model.status == NO) {
         self.expiredTime.text = @"暂未开通";
+        self.lockView.hidden = NO;
     }
     else {
+        self.lockView.hidden = YES;
         NSDateFormatter *formatter = [NSObject getDateformatter];
         [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
         NSDate *expireTime = [formatter dateFromString:model.expireTime];

+ 29 - 1
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantSwitchAlbum/AlbumSwitchCell.xib

@@ -47,6 +47,28 @@
                             </userDefinedRuntimeAttribute>
                         </userDefinedRuntimeAttributes>
                     </imageView>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XWA-vY-hQN">
+                        <rect key="frame" x="20" y="16" width="48" height="48"/>
+                        <subviews>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="album_lock" translatesAutoresizingMaskIntoConstraints="NO" id="0tw-Cy-uXk">
+                                <rect key="frame" x="15" y="15" width="18" height="18"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="18" id="IIj-RH-FgI"/>
+                                    <constraint firstAttribute="height" constant="18" id="aKu-nb-sAc"/>
+                                </constraints>
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="0tw-Cy-uXk" firstAttribute="centerY" secondItem="XWA-vY-hQN" secondAttribute="centerY" id="VvB-hB-YUf"/>
+                            <constraint firstItem="0tw-Cy-uXk" firstAttribute="centerX" secondItem="XWA-vY-hQN" secondAttribute="centerX" id="p6N-aM-6u9"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="8"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </view>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="宫崎骏合集 | 一起感受宫崎骏的夏…" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J7B-Ce-Ny3">
                         <rect key="frame" x="78" y="19" width="184" height="21"/>
                         <constraints>
@@ -62,7 +84,7 @@
                             <constraint firstAttribute="height" constant="17" id="NWZ-sI-9fl"/>
                         </constraints>
                         <fontDescription key="fontDescription" type="system" pointSize="12"/>
-                        <color key="textColor" red="1" green="1" blue="1" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="sRGB"/>
+                        <color key="textColor" red="1" green="1" blue="1" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
                     <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="albumChoosed_img" translatesAutoresizingMaskIntoConstraints="NO" id="OJc-yx-QBL">
@@ -77,13 +99,17 @@
                     <constraint firstItem="J7B-Ce-Ny3" firstAttribute="leading" secondItem="NfZ-Wk-dKR" secondAttribute="trailing" constant="10" id="4D2-64-uY7"/>
                     <constraint firstItem="NfZ-Wk-dKR" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="6dy-qP-5rG"/>
                     <constraint firstItem="kwL-hK-x7q" firstAttribute="leading" secondItem="J7B-Ce-Ny3" secondAttribute="leading" id="8nO-PP-MZF"/>
+                    <constraint firstItem="XWA-vY-hQN" firstAttribute="bottom" secondItem="NfZ-Wk-dKR" secondAttribute="bottom" id="9Hl-gW-fVU"/>
+                    <constraint firstItem="XWA-vY-hQN" firstAttribute="top" secondItem="NfZ-Wk-dKR" secondAttribute="top" id="A2z-Ds-Elb"/>
                     <constraint firstItem="J7B-Ce-Ny3" firstAttribute="top" secondItem="NfZ-Wk-dKR" secondAttribute="top" constant="3" id="AGK-30-mCn"/>
                     <constraint firstItem="OJc-yx-QBL" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="LvZ-Ny-WIO"/>
                     <constraint firstItem="OJc-yx-QBL" firstAttribute="leading" secondItem="J7B-Ce-Ny3" secondAttribute="trailing" constant="20" id="XbO-B7-lKj"/>
                     <constraint firstItem="JsI-4t-iX8" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="cXd-93-82w"/>
+                    <constraint firstItem="XWA-vY-hQN" firstAttribute="trailing" secondItem="NfZ-Wk-dKR" secondAttribute="trailing" id="eU8-sa-PMc"/>
                     <constraint firstItem="kwL-hK-x7q" firstAttribute="top" secondItem="J7B-Ce-Ny3" secondAttribute="bottom" constant="4" id="gW3-Ae-qHX"/>
                     <constraint firstItem="NfZ-Wk-dKR" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="mkv-uU-Zws"/>
                     <constraint firstAttribute="trailing" secondItem="OJc-yx-QBL" secondAttribute="trailing" constant="20" id="qPA-2L-hZD"/>
+                    <constraint firstItem="XWA-vY-hQN" firstAttribute="leading" secondItem="NfZ-Wk-dKR" secondAttribute="leading" id="vvw-uB-JK8"/>
                     <constraint firstAttribute="trailing" secondItem="JsI-4t-iX8" secondAttribute="trailing" constant="10" id="wCs-qO-plL"/>
                     <constraint firstItem="JsI-4t-iX8" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="wTv-7v-RQu"/>
                 </constraints>
@@ -95,6 +121,7 @@
                 <outlet property="albumName" destination="J7B-Ce-Ny3" id="3OK-wp-K40"/>
                 <outlet property="chooseImage" destination="OJc-yx-QBL" id="nFL-4g-vRo"/>
                 <outlet property="expiredTime" destination="kwL-hK-x7q" id="HBk-kw-Udp"/>
+                <outlet property="lockView" destination="XWA-vY-hQN" id="Pti-5D-nvN"/>
                 <outlet property="selectedBgView" destination="JsI-4t-iX8" id="JeY-h1-ZN3"/>
             </connections>
             <point key="canvasLocation" x="4.5801526717557248" y="67.605633802816911"/>
@@ -102,6 +129,7 @@
     </objects>
     <resources>
         <image name="albumChoosed_img" width="18" height="18"/>
+        <image name="album_lock" width="18" height="18"/>
         <image name="album_placeholder" width="147" height="147"/>
     </resources>
 </document>

+ 5 - 0
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantSwitchAlbum/AlbumSwitchView.m

@@ -75,6 +75,10 @@
 }
 
 - (void)showAnimation {
+    
+    NSInteger index = self.lastChooseIndex-1000;
+    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:0];
+    [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
     self.backViewTop.constant = 0;
     [UIView animateWithDuration:0.3f animations:^{
         [self layoutIfNeeded];
@@ -176,6 +180,7 @@
     }
     return _sourceArray;
 }
+
 - (UITableView *)tableView {
     if (!_tableView) {
         _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];

+ 2 - 1
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/Controller/INSSettingViewController.m

@@ -57,6 +57,7 @@
         [self refreshView:userInfo];
     }];
 }
+
 - (void)configUI {
     [self.scrollView addSubview:self.bodyView];
     CGFloat bodyHeight = [self.bodyView getViewHeight];
@@ -69,7 +70,7 @@
     CGFloat bottomHeight = [SettingBottomView getViewHeight];
     [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self.view);
-        make.top.mas_equalTo(self.bodyView.mas_bottom).offset(58);
+        make.top.mas_equalTo(self.bodyView.mas_bottom).offset(20);
         make.height.mas_equalTo(bottomHeight);
         make.bottom.mas_equalTo(self.scrollView.mas_bottom);
     }];

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

@@ -11,7 +11,7 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="INSSettingBodyView">
-            <rect key="frame" x="0.0" y="0.0" width="397" height="678"/>
+            <rect key="frame" x="0.0" y="0.0" width="397" height="636"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view tag="1001" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dQM-9Y-aDu">
@@ -593,7 +593,7 @@
                 <outlet property="userName" destination="EkB-dg-4QO" id="fy8-vu-492"/>
                 <outlet property="userSex" destination="qTs-K4-6hd" id="BAY-4e-wwE"/>
             </connections>
-            <point key="canvasLocation" x="171.75572519083968" y="-27.464788732394368"/>
+            <point key="canvasLocation" x="183.96946564885496" y="-40.845070422535215"/>
         </view>
         <tapGestureRecognizer id="0qY-N6-54b">
             <connections>

+ 4 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBottomView.m

@@ -19,7 +19,10 @@
 
 - (void)awakeFromNib {
     [super awakeFromNib];
-    [self.sureButton setBackgroundColor:CLIENT_THEMECOLOR];
+    if ([UserDefaultObjectForKey(TENANT_ID) integerValue] > 0) { // 机构
+        CAGradientLayer *colorLayer = [UIView createGradientLayerFromColor:HexRGB(0xFF204B) startPoint:CGPointMake(1, 0.5) endColor:HexRGB(0xFE5B71) endPoint:CGPointMake(0, 0.5) bounds:CGRectMake(0, 0, KPortraitWidth - 25 *2, 44)];
+        [self.sureButton.layer addSublayer:colorLayer];
+    }
 
 }