修正替代过期方法的逻辑

This commit is contained in:
eggmanQQQ
2024-07-22 14:13:29 +08:00
parent c312f471cb
commit eeec862e2e
5 changed files with 23 additions and 17 deletions

View File

@@ -12,7 +12,7 @@
1427212629A7566100C7C423 /* ZegoAudioRoom.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1427212329A7563A00C7C423 /* ZegoAudioRoom.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1427212C29A757EC00C7C423 /* MomentsListInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1427212A29A757EC00C7C423 /* MomentsListInfoModel.m */; };
1427212F29A7599500C7C423 /* XPMonentsAttentionPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1427212D29A7599500C7C423 /* XPMonentsAttentionPresenter.m */; };
1427213429A75A2600C7C423 /* XPMonentsLatestPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1427213329A75A2600C7C423 /* XPMonentsLatestPresenter.m */; };
1427213429A75A2600C7C423 /* XPMomentsLatestPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1427213329A75A2600C7C423 /* XPMomentsLatestPresenter.m */; };
1427218729A75F6F00C7C423 /* MyHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 1427213729A75F6F00C7C423 /* MyHTTPConnection.m */; };
1427218829A75F6F00C7C423 /* HTTPErrorResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1427214029A75F6F00C7C423 /* HTTPErrorResponse.m */; };
1427218929A75F6F00C7C423 /* HTTPDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1427214129A75F6F00C7C423 /* HTTPDataResponse.m */; };
@@ -1586,8 +1586,8 @@
1427212E29A7599500C7C423 /* XPMonentsAttentionPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMonentsAttentionPresenter.h; sourceTree = "<group>"; };
1427213029A759D200C7C423 /* XPMonentsAttentionProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMonentsAttentionProtocol.h; sourceTree = "<group>"; };
1427213129A75A1700C7C423 /* XPMonentsLatestProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMonentsLatestProtocol.h; sourceTree = "<group>"; };
1427213229A75A2600C7C423 /* XPMonentsLatestPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMonentsLatestPresenter.h; sourceTree = "<group>"; };
1427213329A75A2600C7C423 /* XPMonentsLatestPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMonentsLatestPresenter.m; sourceTree = "<group>"; };
1427213229A75A2600C7C423 /* XPMomentsLatestPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMomentsLatestPresenter.h; sourceTree = "<group>"; };
1427213329A75A2600C7C423 /* XPMomentsLatestPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMomentsLatestPresenter.m; sourceTree = "<group>"; };
1427213729A75F6F00C7C423 /* MyHTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyHTTPConnection.m; sourceTree = "<group>"; };
1427213929A75F6F00C7C423 /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPConnection.h; sourceTree = "<group>"; };
1427213A29A75F6F00C7C423 /* HTTPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPLogging.h; sourceTree = "<group>"; };
@@ -7764,8 +7764,8 @@
E81DCCC7282B636D0039E5C5 /* Presenter */ = {
isa = PBXGroup;
children = (
1427213229A75A2600C7C423 /* XPMonentsLatestPresenter.h */,
1427213329A75A2600C7C423 /* XPMonentsLatestPresenter.m */,
1427213229A75A2600C7C423 /* XPMomentsLatestPresenter.h */,
1427213329A75A2600C7C423 /* XPMomentsLatestPresenter.m */,
1427212E29A7599500C7C423 /* XPMonentsAttentionPresenter.h */,
1427212D29A7599500C7C423 /* XPMonentsAttentionPresenter.m */,
E8950187282CFFB1007E459A /* XPMomentsLayoutConfig.h */,
@@ -11975,7 +11975,7 @@
E8F6135C291E26BD00E12650 /* NSMutableDictionary+Saft.m in Sources */,
237852AA2C0D98BF00E360AC /* MsRoomMessagChatHallHeadView.m in Sources */,
239D0F992BFB43BC002977CE /* MSRoomOnLineAvatarView.m in Sources */,
1427213429A75A2600C7C423 /* XPMonentsLatestPresenter.m in Sources */,
1427213429A75A2600C7C423 /* XPMomentsLatestPresenter.m in Sources */,
E83ABEFD280EB5E200322EE4 /* ContentOpenLiveInfoModel.m in Sources */,
E85E7BAF2A4EC99300B6D00A /* XPMineChooseGiveDiamondVC.m in Sources */,
E8EEB8F426FC2050007C6EBA /* SDBrowserImageView.m in Sources */,

View File

@@ -1,7 +1,6 @@
{
"images" : [
{
"filename" : "common_avatar.png",
"idiom" : "universal",
"scale" : "1x"
},
@@ -10,6 +9,7 @@
"scale" : "2x"
},
{
"filename" : "common_avatar.png",
"idiom" : "universal",
"scale" : "3x"
}

View File

@@ -101,12 +101,18 @@ NSString * const kImageTypeMonentsPhoto = @"imageMogr2/auto-orient/thumbnail/400
if (radius > 0) {
[urlString appendString:[NSString stringWithFormat:@"|roundPic/radius/%f", radius]];
}
return CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
(CFStringRef)urlString,
NULL,
(CFStringRef)@"|",
kCFStringEncodingUTF8));
return percentEscapeString(urlString);
}
NSString *percentEscapeString(NSString *string) {
//
NSMutableCharacterSet *allowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy];
// , %
[allowedCharacterSet removeCharactersInString:@"|"];
return [string stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet];
}
@end

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface XPMonentsLatestPresenter : BaseMvpPresenter
@interface XPMomentsLatestPresenter : BaseMvpPresenter
/// 获取朋友圈动态推荐列表
/// @param dynamicId 当前的页数

View File

@@ -5,12 +5,12 @@
// Created by YUMI on 2022/5/18.
//
#import "XPMonentsLatestPresenter.h"
#import "XPMomentsLatestPresenter.h"
#import "Api+Moments.h"
#import "MomentsListInfoModel.h"
#import "XPMonentsLatestProtocol.h"
#import "AccountInfoStorage.h"
@implementation XPMonentsLatestPresenter
@implementation XPMomentsLatestPresenter
///
/// @param dynamicId
@@ -23,7 +23,7 @@
NSString * pageSizeStr = [NSString stringWithFormat:@"%ld", pageSize];
[Api momentsLatestList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
MomentsListInfoModel *listInfo = [MomentsListInfoModel modelWithDictionary:data.data];
[[self getView] getMonentsLatestListSuccess:listInfo state:state];
[[self getView] getMomentsLatestListSuccess:listInfo state:state];
} fail:^(NSInteger code, NSString * _Nullable msg) {
[[self getView] getMonentsLatestListFail:msg state:state];
} showLoading:NO] dynamicId:dynamicId pageSize:pageSizeStr types:@"0,2"];