张国栋 hai 1 mes
pai
achega
727c8ad10a

+ 1 - 1
AICityProperty/AICity.xcodeproj/xcshareddata/xcschemes/AICity.xcscheme

@@ -53,7 +53,7 @@
       </Testables>
    </TestAction>
    <LaunchAction
-      buildConfiguration = "Debug"
+      buildConfiguration = "Release"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"

BIN=BIN
AICityProperty/AICity.xcworkspace/xcuserdata/zhangguodong.xcuserdatad/UserInterfaceState.xcuserstate


+ 32 - 2
AICityProperty/AICity.xcworkspace/xcuserdata/zhangguodong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -30,10 +30,40 @@
             filePath = "AICity/JuXing/ViewControllers/JXShortDramaViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "638"
-            endingLineNumber = "638"
+            startingLineNumber = "667"
+            endingLineNumber = "667"
             landmarkName = "-shortDramaCellDidTapDetail:"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "C920EC78-1762-4F26-87AD-8C6CFFC287A0 - ebb9d4cca3fa53d2"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[JXShortDramaViewController shortDramaCellDidTapDetail:]"
+                  moduleName = "AICity"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/zhangguodong/playVideo_ios/AICityProperty/AICity/JuXing/ViewControllers/JXShortDramaViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "668"
+                  endingLineNumber = "668">
+               </Location>
+               <Location
+                  uuid = "C920EC78-1762-4F26-87AD-8C6CFFC287A0 - ebb9d4cca3fa53b3"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[JXShortDramaViewController shortDramaCellDidTapDetail:]"
+                  moduleName = "AICity"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/zhangguodong/playVideo_ios/AICityProperty/AICity/JuXing/ViewControllers/JXShortDramaViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "667"
+                  endingLineNumber = "667">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
    </Breakpoints>

+ 20 - 14
AICityProperty/AICity/JuXing/ViewControllers/JXDetailViewController.m

@@ -63,7 +63,7 @@
     
     // 隐藏导航栏返回按钮
     self.navigationItem.hidesBackButton = YES;
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeProgress:) name:@"videoProgressChanged" object:nil];
+//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeProgress:) name:@"videoProgressChanged" object:nil];
     [self setupUI];
     [self loadData];
 }
@@ -326,20 +326,26 @@
         NSLog(@"[JXShortDrama] 🗨️ commentVC present 完成!");
     }];
 }
-- (void)changeProgress:(NSNotification *)niti{
-    if (!self.isHuadong){
-        NSDictionary *user = niti.userInfo;
-        JXEpisode *episode = self.episodes[self.currentEpisodeIndex];
-
-        if ([user[@"fileId"] isEqualToString:episode.fileId] ) {
-            float progress = [user[@"progress"] floatValue];
-            self.videoSlider.value = progress;
-            NSLog(@"进度--%f",progress);
-        }
-        
-    }
-    
+- (void)superPlayerDidUpdateProgress:(NSTimeInterval)currentTime duration:(NSTimeInterval)duration {
+    // 播放进度更新(可用于显示进度条)
+    // NSLog(@"[JXShortDramaCell] 播放进度: %.1f / %.1f", currentTime, duration);
+    float progress = currentTime/duration;
+    self.videoSlider.value = progress;
 }
+//- (void)changeProgress:(NSNotification *)niti{
+//    if (!self.isHuadong){
+//        NSDictionary *user = niti.userInfo;
+//        JXEpisode *episode = self.episodes[self.currentEpisodeIndex];
+//
+//        if ([user[@"fileId"] isEqualToString:episode.fileId] ) {
+//            float progress = [user[@"progress"] floatValue];
+//            self.videoSlider.value = progress;
+//            NSLog(@"进度--%f",progress);
+//        }
+//        
+//    }
+//    
+//}
 
 - (void)collectionViewControllerDidSelectEpisode:(NSString *)episodeId {
     NSLog(@"[JXShortDrama] 选择播放剧集: %@", episodeId);

+ 31 - 2
AICityProperty/AICity/JuXing/ViewControllers/JXShortDramaViewController.m

@@ -15,7 +15,8 @@
 #import "JXEpisodeInfo.h"
 #import "GuestHelper.h"
 #import "JXDetailViewController.h" // Added for detail view
-
+#import "SearchCommonBarView.h"
+#import "JXSearchViewController.h"
 // 复用标识符
 static NSString * const kDramaCellIdentifier = @"JXShortDramaCell";
 
@@ -37,6 +38,7 @@ static NSString * const kDramaCellIdentifier = @"JXShortDramaCell";
 @property (nonatomic, assign) BOOL hasMoreData;
 @property (nonatomic, assign) BOOL hasUserVisited;  // 用户是否已访问过
 @property (nonatomic, assign) BOOL isFirstLoad;     // 是否首次加载
+@property (nonatomic, strong) SearchCommonBarView *searchBar;
 
 @end
 
@@ -106,6 +108,8 @@ static NSString * const kDramaCellIdentifier = @"JXShortDramaCell";
 #pragma mark - UI设置
 
 - (void)setupUI {
+    
+    
     // 创建FlowLayout(垂直分页)
     self.flowLayout = [[UICollectionViewFlowLayout alloc] init];
     self.flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
@@ -135,8 +139,33 @@ static NSString * const kDramaCellIdentifier = @"JXShortDramaCell";
                             action:@selector(handleRefresh)
                   forControlEvents:UIControlEventValueChanged];
     [self.collectionView addSubview:self.refreshControl];
+    
+    
+    self.searchBar = [[SearchCommonBarView alloc] init];
+//    self.searchBar.bgView.backgroundColor = [UIColor clearColor];
+//    self.searchBar.searchBgView.backgroundColor = [UIColor clearColor];
+    self.searchBar.backgroundColor = [UIColor clearColor];
+    __weak typeof(self) weakSelf = self;
+    self.searchBar.searchAction = ^(NSString * _Nonnull text) {
+        [weakSelf performSearchWithKeyword:text];
+    };
+    [self.view addSubview:self.searchBar];
+    [self.view bringSubviewToFront:self.searchBar];
+    [self.searchBar mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop);
+        make.left.right.equalTo(self.view);
+        make.height.mas_equalTo(44);
+    }];
+    
+}
+- (void)performSearchWithKeyword:(NSString *)keyword {
+    if (keyword.length == 0) {
+        return;
+    }
+    
+    JXSearchViewController *vc = [[JXSearchViewController alloc] initWithKeyword:keyword];
+    [self.navigationController pushViewController:vc animated:YES];
 }
-
 #pragma mark - 数据加载
 
 - (void)loadInitialData {

+ 9 - 2
AICityProperty/AICity/views/SearchCommonBarView.m

@@ -50,7 +50,7 @@
     
     
     self.textField = [UITextField new];
-    NSMutableAttributedString *attributedPlaceholder = [[NSMutableAttributedString alloc] initWithString:@"扫黑行动"];
+    NSMutableAttributedString *attributedPlaceholder = [[NSMutableAttributedString alloc] initWithString:@"搜索"];
     [attributedPlaceholder addAttribute:NSForegroundColorAttributeName value:rgba(255, 255, 255, 0.4) range:NSMakeRange(0, attributedPlaceholder.length)];
     [attributedPlaceholder addAttribute:NSFontAttributeName value:[UIFont italicSystemFontOfSize:14.0] range:NSMakeRange(0, attributedPlaceholder.length)];
     self.textField.attributedPlaceholder = attributedPlaceholder;
@@ -59,7 +59,7 @@
     self.textField.font = [UIFont systemFontOfSize:14];
     self.textField.delegate = self;
     [self.textField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
-
+    self.textField.returnKeyType = UIReturnKeySearch;
     [self.searchBgView addSubview:self.textField];
     [self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
         make.centerY.equalTo(self.searchBgView);
@@ -91,4 +91,11 @@
         self.searchAction(self.textField.text);
     }
 }
+- (BOOL)textFieldShouldReturn:(UITextField *)textField{
+    if (textField.text.length != 0) {
+        self.searchAction(self.textField.text);
+    }
+    [textField resignFirstResponder];
+    return YES;
+}
 @end