Prechádzať zdrojové kódy

增加专辑ID跳转逻辑,版本提交审核 1.8.2

Steven 2 mesiacov pred
rodič
commit
9a051d30b5

+ 8 - 8
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -8147,7 +8147,7 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = KulexiuForStudent/KulexiuForStudent.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1.8.0;
+				CURRENT_PROJECT_VERSION = 1.8.2;
 				DEVELOPMENT_TEAM = B2AP53HHTU;
 				ENABLE_BITCODE = NO;
 				ENABLE_MODULE_VERIFIER = YES;
@@ -8194,7 +8194,7 @@
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/SocialLibraries/QQ",
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/UMSocialSDKPlugin",
 				);
-				MARKETING_VERSION = 1.8.1;
+				MARKETING_VERSION = 1.8.2;
 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17";
 				OTHER_LDFLAGS = (
@@ -8321,7 +8321,7 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = KulexiuForStudent/KulexiuForStudent.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1.8.0;
+				CURRENT_PROJECT_VERSION = 1.8.2;
 				DEVELOPMENT_TEAM = B2AP53HHTU;
 				ENABLE_BITCODE = NO;
 				ENABLE_MODULE_VERIFIER = YES;
@@ -8368,7 +8368,7 @@
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/SocialLibraries/QQ",
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/UMSocialSDKPlugin",
 				);
-				MARKETING_VERSION = 1.8.1;
+				MARKETING_VERSION = 1.8.2;
 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17";
 				OTHER_LDFLAGS = (
@@ -8640,7 +8640,7 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = KulexiuForStudent/KulexiuForStudent.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1.8.0;
+				CURRENT_PROJECT_VERSION = 1.8.2;
 				DEVELOPMENT_TEAM = B2AP53HHTU;
 				ENABLE_BITCODE = NO;
 				ENABLE_MODULE_VERIFIER = YES;
@@ -8687,7 +8687,7 @@
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/SocialLibraries/QQ",
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/UMSocialSDKPlugin",
 				);
-				MARKETING_VERSION = 1.8.1;
+				MARKETING_VERSION = 1.8.2;
 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17";
 				OTHER_LDFLAGS = (
@@ -8918,7 +8918,7 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = KulexiuForStudent/KulexiuForStudent.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1.8.0;
+				CURRENT_PROJECT_VERSION = 1.8.2;
 				DEVELOPMENT_TEAM = B2AP53HHTU;
 				ENABLE_BITCODE = NO;
 				ENABLE_MODULE_VERIFIER = YES;
@@ -8965,7 +8965,7 @@
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/SocialLibraries/QQ",
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.4/UMSocialSDKPlugin",
 				);
-				MARKETING_VERSION = 1.8.1;
+				MARKETING_VERSION = 1.8.2;
 				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
 				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17";
 				OTHER_LDFLAGS = (

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

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

+ 4 - 1
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/Controller/InsititutionMineViewController.m

@@ -25,6 +25,8 @@
 
 @property (nonatomic, strong) UserInfo *mineInfo;
 
+@property (nonatomic, strong) NSString *tenantAlbumId;
+
 @end
 
 @implementation InsititutionMineViewController
@@ -139,6 +141,7 @@
             NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
             tenantAlbumName = [result ks_stringValueForKey:@"tenantAlbumName"];
             endTime = [result ks_stringValueForKey:@"endTime"];
+            self.tenantAlbumId = [result ks_stringValueForKey:@"tenantAlbumId"];
         }
         [self refreshAlbumInfo:tenantAlbumName endTime:endTime];
     } faliure:^(NSError * _Nonnull error) {
@@ -174,7 +177,7 @@
         case INSMINETYPE_TOOL:
         {
             KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-            ctrl.url = [NSString stringWithFormat:@"%@%@",TENANT_WEBHOST,@"/#/train-tool"];
+            ctrl.url = [NSString stringWithFormat:@"%@%@?albumId=%@",TENANT_WEBHOST,@"/#/train-tool", [NSString returnNoNullStringWithString:self.tenantAlbumId]];
             [self.navigationController pushViewController:ctrl animated:YES];
         }
             break;

+ 11 - 3
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/InstitutionMineBodyView.m

@@ -179,13 +179,21 @@
         descTitle = @"训练教程";
     }
     else {
+        NSDate *todayDate = [NSDate date];
+        NSString *todayString = nil;
+        NSString *deadLineString = nil; // 过期时间 天数
+        NSDate *endDayDate = nil; // 比较天数
         descTitle = [NSString isEmptyString:tenantAlbumName] ? @"训练教程" : tenantAlbumName;
         descImg = @"institution_mineTool_expired";
-        NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+        NSDateFormatter *formatter = [NSObject getDateformatter];
         [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
         NSDate *endDate = [formatter dateFromString:endTime];
         [formatter setDateFormat:@"yyyy-MM-dd"];
         
+        deadLineString = [formatter stringFromDate:endDate];
+        endDayDate = [formatter dateFromString:deadLineString];
+        todayString = [formatter stringFromDate:todayDate];
+        todayDate = [formatter dateFromString:todayString];
         
         // 如果没有过期
         if ([endDate timeIntervalSinceNow] > 0) {
@@ -193,7 +201,7 @@
             [descAttr appendAttributedString:[[NSAttributedString alloc] initWithString:[formatter stringFromDate:endDate] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular], NSForegroundColorAttributeName:HexRGB(0xFE2451)}]];
         }
         // 如果超过7天
-        else if ([[NSDate date] timeIntervalSinceDate:endDate] > 7 * 24 * 60 * 60) {
+        else if ([todayDate timeIntervalSinceDate:endDayDate] > 7 * 24 * 60 * 60) {
             descImg = @"institution_mineTool_open";
             descTitle = @"训练教程";
             descAttr = [[NSMutableAttributedString alloc] initWithString:@"您暂未开通训练教程" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular], NSForegroundColorAttributeName:HexRGBAlpha(0x000000, 0.5f)}];
@@ -202,7 +210,7 @@
             
             descAttr = [[NSMutableAttributedString alloc] initWithString:@"已过期 " attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular], NSForegroundColorAttributeName:HexRGBAlpha(0x000000, 0.5f)}];
             // 计算过期天数
-            NSInteger days = [endDate daysAgo];
+            NSInteger days = [endDayDate daysAfterDate:todayDate];
             NSString *exipreDay = [NSString stringWithFormat:@"%ld天",days];
             [descAttr appendAttributedString:[[NSAttributedString alloc] initWithString:exipreDay attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular], NSForegroundColorAttributeName:HexRGB(0xFE2451)}]];
         }