Skip to content

Commit

Permalink
更新接口及 GKVideoScrollView
Browse files Browse the repository at this point in the history
  • Loading branch information
QuintGao committed Aug 9, 2023
1 parent feb348d commit 476feec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
8 changes: 5 additions & 3 deletions GKDYVideo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -595,7 +595,7 @@
79CC628B2157377400101773 /* Sources */,
79CC628C2157377400101773 /* Frameworks */,
79CC628D2157377400101773 /* Resources */,
C2DE7B103C85505A457E70DD /* [CP] Embed Pods Frameworks */,
414B1670F0E8F0395EA482FF /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -653,7 +653,7 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
C2DE7B103C85505A457E70DD /* [CP] Embed Pods Frameworks */ = {
414B1670F0E8F0395EA482FF /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down Expand Up @@ -904,6 +904,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.test.dyvideo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -931,6 +932,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.test.dyvideo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
9 changes: 5 additions & 4 deletions GKDYVideo/Classes/Home/Controller/GKDYPlayerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ - (void)dealloc {

- (void)initUI {
self.view.backgroundColor = [UIColor blackColor];

[self.view addSubview:self.manager.scrollView];

[self.manager.scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
Expand Down Expand Up @@ -82,12 +82,13 @@ - (void)requestData:(nullable void (^)(void))completion {
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];

// 好看视频 num=5,每次请求5条
NSString *url = [NSString stringWithFormat:@"https://haokan.baidu.com/web/video/feed?tab=%@&act=pcFeed&pd=pc&num=%d", self.tab, 5];
// NSString *url = [NSString stringWithFormat:@"https://haokan.baidu.com/haokan/ui-web/video/feed?tab=%@&act=pcFeed&pd=pc&num=%d", self.tab, 5];
NSString *url = [NSString stringWithFormat:@"https://haokan.baidu.com/haokan/ui-web/video/rec?tab=%@&act=pcFeed&pd=pc&num=%d", self.tab, 5];

@weakify(self);
[manager GET:url parameters:nil headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
@strongify(self);
if ([responseObject[@"errno"] integerValue] == 0) {
if ([responseObject[@"status"] integerValue] == 0) {
NSArray *videos = responseObject[@"data"][@"response"][@"videos"];

if (self.page == 1) {
Expand Down Expand Up @@ -153,7 +154,7 @@ - (void)cellDidClickComment:(GKDYVideoModel *)model {
GKDYCommentView *commentView = [GKDYCommentView new];
commentView.backgroundColor = UIColor.whiteColor;
commentView.frame = CGRectMake(0, 0, SCREEN_WIDTH, ADAPTATIONRATIO * 980.0f);

GKSlidePopupView *popupView = [GKSlidePopupView popupViewWithFrame:UIScreen.mainScreen.bounds contentView:commentView];
[popupView showFrom:UIApplication.sharedApplication.keyWindow completion:^{
[commentView requestData];
Expand Down
6 changes: 0 additions & 6 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,4 @@ post_install do |installer|
end
end
end

installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end

0 comments on commit 476feec

Please sign in to comment.