动态修改
@@ -37,7 +37,6 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
[UMConfigure initWithAppkey:@"6434c6dfd64e686139618269" channel:@"yumi_appstore"];
|
||||
}
|
||||
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
|
||||
[FIRApp configure];
|
||||
return YES;
|
||||
}
|
||||
|
22
YuMi/Assets.xcassets/Monents/mine_dynamic.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_dynamic@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_dynamic@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/Monents/mine_dynamic.imageset/mine_dynamic@2x.png
vendored
Normal file
After Width: | Height: | Size: 995 B |
BIN
YuMi/Assets.xcassets/Monents/mine_dynamic.imageset/mine_dynamic@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 896 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 787 B After Width: | Height: | Size: 958 B |
22
YuMi/Assets.xcassets/Monents/monents_on_line_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "monents_on_line_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "monents_on_line_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/Monents/monents_on_line_bg.imageset/monents_on_line_bg@2x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
YuMi/Assets.xcassets/Monents/monents_on_line_bg.imageset/monents_on_line_bg@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.8 KiB |
22
YuMi/Assets.xcassets/Monents/monents_on_line_note.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "monents_on_line_note@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "monents_on_line_note@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/Monents/monents_on_line_note.imageset/monents_on_line_note@2x.png
vendored
Normal file
After Width: | Height: | Size: 384 B |
BIN
YuMi/Assets.xcassets/Monents/monents_on_line_note.imageset/monents_on_line_note@3x.png
vendored
Normal file
After Width: | Height: | Size: 548 B |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 6.1 KiB |
@@ -32,34 +32,24 @@
|
||||
- (instancetype)init{
|
||||
self = [super init];
|
||||
if(self){
|
||||
[FBSDKProfile enableUpdatesOnAccessTokenChange:YES];
|
||||
|
||||
@weakify(self);
|
||||
[[NSNotificationCenter defaultCenter] addObserverForName:FBSDKProfileDidChangeNotification
|
||||
object:nil
|
||||
queue:[NSOperationQueue mainQueue]
|
||||
usingBlock:
|
||||
^(NSNotification *notification) {
|
||||
|
||||
@strongify(self);
|
||||
if ([FBSDKProfile currentProfile]) {
|
||||
|
||||
|
||||
//获取当前用户名
|
||||
[FBSDKProfile loadCurrentProfileWithCompletion:
|
||||
^(FBSDKProfile *profile, NSError *error) {
|
||||
if (profile) {
|
||||
ThirdUserInfo * userInfo = [[ThirdUserInfo alloc] init];
|
||||
NSString * openid = profile.userID;
|
||||
NSString * access_token = profile.userID;
|
||||
NSString * unionid = profile.userID;
|
||||
userInfo.openid = openid;
|
||||
userInfo.access_token = access_token;
|
||||
userInfo.unionid = unionid;
|
||||
userInfo.userName = profile.name;
|
||||
userInfo.avatarUrl = profile.imageURL.absoluteString;
|
||||
[AccountInfoStorage instance].thirdUserInfo = userInfo;
|
||||
[AccountInfoStorage instance].thirdUserInfo.userName = profile.name;
|
||||
[AccountInfoStorage instance].thirdUserInfo.avatarUrl = profile.imageURL.absoluteString;
|
||||
[self loginWithThirdPartWithType:ThirdLoginType_FB];
|
||||
}
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
}];
|
||||
@@ -171,6 +161,8 @@
|
||||
|
||||
}
|
||||
-(void)thirdLoginByFBWithPresentingViewController:(UIViewController *)presentingViewController {
|
||||
[FBSDKProfile enableUpdatesOnAccessTokenChange:YES];
|
||||
[FBSDKAccessToken setCurrentAccessToken:nil];
|
||||
FBSDKLoginManager *manager = [[FBSDKLoginManager alloc] init];
|
||||
[manager logOut];
|
||||
[manager logInWithPermissions:@[@"public_profile"]
|
||||
@@ -181,7 +173,11 @@
|
||||
} else if (result.isCancelled) {
|
||||
[[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter0")];
|
||||
} else {
|
||||
NSLog(@"Logged in");
|
||||
ThirdUserInfo * userInfo = [[ThirdUserInfo alloc] init];
|
||||
userInfo.openid = result.token.userID;
|
||||
userInfo.access_token = result.token.tokenString;
|
||||
userInfo.unionid = result.token.userID;
|
||||
[AccountInfoStorage instance].thirdUserInfo = userInfo;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
@@ -190,7 +190,6 @@
|
||||
/// 公会个播收入列表
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户的uid
|
||||
/// @param hallId 公会的id
|
||||
/// @param startTime 开始时间
|
||||
/// @param endTime 结束时间
|
||||
+ (void)getHallSingleRoomIncomeRecord:(HttpRequestHelperCompletion)completion uid:(NSString *)uid clanId:(NSString *)clanId startTime:(NSString *)startTime endTime:(NSString *)endTime {
|
||||
|
@@ -167,6 +167,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param completion 完成
|
||||
/// @param uid uid
|
||||
+ (void)monentsUnReadCount:(HttpRequestHelperCompletion)completion uid:(NSString *)uid;
|
||||
/// 屏蔽
|
||||
/// @param completion 完成
|
||||
/// @param type type为0 => 屏蔽动态, objId 为 动态id, type为1 => 屏蔽房间, objId 为 用户uid
|
||||
+ (void)requesstShielding:(HttpRequestHelperCompletion)completion type:(NSString *)type objId:(NSString *)objId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -273,5 +273,10 @@
|
||||
NSString * fang = [NSString stringFromBase64String:@"aW50ZXJhY3RpdmUvdW5yZWFkQ291bnQ="];///interactive/unreadCount
|
||||
[self makeRequest:fang method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, nil];
|
||||
}
|
||||
|
||||
/// 屏蔽
|
||||
/// @param completion 完成
|
||||
/// @param type type为0 => 屏蔽动态, objId 为 动态id, type为1 => 屏蔽房间, objId 为 用户uid
|
||||
+ (void)requesstShielding:(HttpRequestHelperCompletion)completion type:(NSString *)type objId:(NSString *)objId{
|
||||
[self makeRequest:[NSString stringWithFormat:@"%@%@%@",@"user/",@"black/",@"add"] method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, type,objId, nil];
|
||||
}
|
||||
@end
|
||||
|
@@ -1,12 +1,12 @@
|
||||
//
|
||||
// MonentsInfoModel.h
|
||||
// YUMI
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/11.
|
||||
// Created by 冯硕 on 2022/5/11.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "YUMINNNN.h"
|
||||
|
||||
#import "UserVipInfoVo.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef NS_ENUM(NSInteger, MonentsContentType) {
|
||||
@@ -47,8 +47,10 @@ typedef NS_ENUM(NSInteger, MonentsContentType) {
|
||||
@property (nonatomic,strong) NSString *experLevelPic;
|
||||
///魅力等级
|
||||
@property (nonatomic,strong) NSString *charmLevelPic;
|
||||
///是否置顶
|
||||
///广场是否置顶
|
||||
@property (nonatomic,assign) BOOL squareTop;
|
||||
///话题是否置顶
|
||||
@property (nonatomic,assign) BOOL topicTop;
|
||||
///贵族信息
|
||||
@property (nonatomic, strong) UserVipInfoVo *userVipInfoVO;
|
||||
///发布的内容
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// MonentsInfoModel.m
|
||||
// YUMI
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/11.
|
||||
// Created by 冯硕 on 2022/5/11.
|
||||
//
|
||||
|
||||
#import "MonentsInfoModel.h"
|
||||
|
@@ -43,6 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param dynamicId 动态的id
|
||||
/// @param content 评论的内容
|
||||
- (void)commontMonents:(NSString *)dynamicId content:(NSString *)content;
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -94,6 +94,11 @@
|
||||
[[self getView] replyMonentsSuccess];
|
||||
}] uid:uid dynamicId:dynamicId content:content commentId:commonId];
|
||||
}
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId{
|
||||
[Api requesstShielding:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] requesstShieldingSuccess:objId];
|
||||
}] type:type objId:objId];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -28,7 +28,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param dynamicId 动态id
|
||||
/// @param worldId 话题id
|
||||
- (void)deleteMonents:(NSString *)dynamicId worldId:(NSString *)worldId;
|
||||
|
||||
///屏蔽动态
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -52,5 +52,9 @@
|
||||
} uid:uid dynamicId:dynamicId worldId:worldId];
|
||||
}
|
||||
|
||||
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId{
|
||||
[Api requesstShielding:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] requesstShieldingSuccess:objId];
|
||||
}] type:type objId:objId];
|
||||
}
|
||||
@end
|
||||
|
@@ -28,6 +28,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param dynamicId 动态id
|
||||
/// @param worldId 话题id
|
||||
- (void)deleteMonents:(NSString *)dynamicId worldId:(NSString *)worldId;
|
||||
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -51,5 +51,9 @@
|
||||
[[self getView] deleteMonentsSuccess:dynamicId];
|
||||
} uid:uid dynamicId:dynamicId worldId:worldId];
|
||||
}
|
||||
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId{
|
||||
[Api requesstShielding:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] requesstShieldingSuccess:objId];
|
||||
}] type:type objId:objId];
|
||||
}
|
||||
@end
|
||||
|
@@ -32,6 +32,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param dynamicId 动态id
|
||||
/// @param worldId 话题id
|
||||
- (void)deleteMonents:(NSString *)dynamicId worldId:(NSString *)worldId;
|
||||
///屏蔽
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -65,5 +65,9 @@
|
||||
[[self getView] deleteMonentsSuccess:dynamicId];
|
||||
} uid:uid dynamicId:dynamicId worldId:worldId];
|
||||
}
|
||||
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId{
|
||||
[Api requesstShielding:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] requesstShieldingSuccess:objId];
|
||||
}] type:type objId:objId];
|
||||
}
|
||||
@end
|
||||
|
@@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param dynamicId 动态id
|
||||
/// @param worldId 话题id
|
||||
- (void)deleteMonents:(NSString *)dynamicId worldId:(NSString *)worldId;
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -44,5 +44,9 @@
|
||||
[[self getView] deleteMonentsSuccess:dynamicId];
|
||||
} uid:uid dynamicId:dynamicId worldId:worldId];
|
||||
}
|
||||
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId{
|
||||
[Api requesstShielding:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] requesstShieldingSuccess:objId];
|
||||
}] type:type objId:objId];
|
||||
}
|
||||
@end
|
||||
|
@@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param dynamicId 动态id
|
||||
/// @param worldId 话题id
|
||||
- (void)deleteMonents:(NSString *)dynamicId worldId:(NSString *)worldId;
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -44,4 +44,9 @@
|
||||
[[self getView] deleteMonentsSuccess:dynamicId];
|
||||
} uid:uid dynamicId:dynamicId worldId:worldId];
|
||||
}
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId{
|
||||
[Api requesstShielding:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] requesstShieldingSuccess:objId];
|
||||
}] type:type objId:objId];
|
||||
}
|
||||
@end
|
||||
|
@@ -20,6 +20,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
///删除话题成功
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo;
|
||||
///屏蔽
|
||||
- (void)requesstShieldingSuccess:(NSString *)monentsInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -28,6 +28,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)commonMonentsSuccess;
|
||||
///回复某人评论成功
|
||||
- (void)replyMonentsSuccess;
|
||||
///屏蔽
|
||||
- (void)requesstShieldingSuccess:(NSString *)monentsInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -19,6 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)likeMonentsSuccess:(NSString *)dynamicId status:(BOOL)status;
|
||||
///删除话题成功
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo;
|
||||
///屏蔽
|
||||
- (void)requesstShieldingSuccess:(NSString *)monentsInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -22,7 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
///删除话题成功
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo;
|
||||
|
||||
///屏蔽
|
||||
- (void)requesstShieldingSuccess:(NSString *)monentsInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -19,6 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
///删除话题成功
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo;
|
||||
///屏蔽
|
||||
- (void)requesstShieldingSuccess:(NSString *)monentsInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -20,6 +20,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
///删除话题成功
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo;
|
||||
///屏蔽
|
||||
- (void)requesstShieldingSuccess:(NSString *)monentsInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -30,6 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong) MonentsInfoModel *mineMonentsInfo;
|
||||
@property (nonatomic,strong) MonentsInfoModel *monentsInfo;
|
||||
@property (nonatomic,assign) BOOL isFillet;
|
||||
@property (nonatomic,assign) BOOL isTopic;///是否是话题页
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPMonentsTableViewCellDelegate> delegate;
|
||||
|
||||
|
@@ -10,7 +10,6 @@
|
||||
#import <Masonry/Masonry.h>
|
||||
|
||||
///Tool
|
||||
|
||||
#import "NetImageView.h"
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
#import "SDPhotoBrowser.h"
|
||||
@@ -83,8 +82,8 @@
|
||||
|
||||
- (void)initDynamicSubViewConstraints {
|
||||
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(15);
|
||||
make.right.mas_equalTo(-15);
|
||||
make.leading.mas_equalTo(15);
|
||||
make.trailing.mas_equalTo(-15);
|
||||
make.top.bottom.equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
@@ -95,8 +94,8 @@
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.backView).offset(12);
|
||||
make.right.mas_equalTo(self.backView).offset(-12);
|
||||
make.leading.mas_equalTo(self.backView).offset(12);
|
||||
make.trailing.mas_equalTo(self.backView).offset(-12);
|
||||
make.top.mas_equalTo(13);
|
||||
}];
|
||||
|
||||
@@ -107,14 +106,14 @@
|
||||
make.width.mas_equalTo(KScreenWidth-30);
|
||||
}];
|
||||
[self.toolBarView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.backView);
|
||||
make.leading.trailing.mas_equalTo(self.backView);
|
||||
make.top.mas_equalTo(self.stackView.mas_bottom).mas_offset(10);
|
||||
make.height.mas_equalTo(18);
|
||||
}];
|
||||
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(kGetScaleWidth(1));
|
||||
make.left.right.equalTo(self.toolBarView).inset(12);
|
||||
make.leading.trailing.equalTo(self.toolBarView).inset(12);
|
||||
make.bottom.equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
@@ -139,7 +138,7 @@
|
||||
}];
|
||||
|
||||
[self.userInfoView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.backView);
|
||||
make.leading.trailing.top.mas_equalTo(self.backView);
|
||||
make.height.mas_equalTo(kMONENTS_USER_INFO_HEIGHT);
|
||||
}];
|
||||
|
||||
@@ -148,8 +147,8 @@
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.backView).offset(kMONENTS_CONTENT_LEFT_PADDING);
|
||||
make.right.mas_equalTo(self.backView).offset(-kMONENTS_CONTENT_RIGHT_PADDING);
|
||||
make.leading.mas_equalTo(self.backView).offset(kMONENTS_CONTENT_LEFT_PADDING);
|
||||
make.trailing.mas_equalTo(self.backView).offset(-kMONENTS_CONTENT_RIGHT_PADDING);
|
||||
make.top.mas_equalTo(self.userInfoView.mas_bottom).offset(kMONENTS_CONTENT_SPACAE_HEIGHT);
|
||||
}];
|
||||
|
||||
@@ -158,7 +157,7 @@
|
||||
}];
|
||||
|
||||
[self.toolBarView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.backView);
|
||||
make.leading.trailing.mas_equalTo(self.backView);
|
||||
make.top.mas_equalTo(self.stackView.mas_bottom);
|
||||
make.height.mas_equalTo(kMONENTS_TOOL_BAR_HEIGHT);
|
||||
}];
|
||||
@@ -305,6 +304,7 @@
|
||||
_monentsInfo = monentsInfo;
|
||||
if (_monentsInfo) {
|
||||
self.userInfoView.monentsInfo = _monentsInfo;
|
||||
self.textView.isTopic = _isTopic;
|
||||
self.textView.monentsInfo = _monentsInfo;
|
||||
self.photoView.dynamicResList = _monentsInfo.dynamicResList;
|
||||
self.topicView.monentsInfo = _monentsInfo;
|
||||
@@ -326,7 +326,7 @@
|
||||
|
||||
self.topicView.hidden = monentsInfo.worldId <= 0;
|
||||
|
||||
if(_monentsInfo.squareTop && _monentsInfo.content.length == 0){
|
||||
if(_monentsInfo.topicTop && _monentsInfo.content.length == 0){
|
||||
[self.textView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(contentHeight + 20);
|
||||
}];
|
||||
|
@@ -1,24 +1,23 @@
|
||||
//
|
||||
// YMMonentsTopicCollectionViewCell.m
|
||||
// YUMI
|
||||
// XPMonentsTopicCollectionViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/18.
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsTopicCollectionViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
|
||||
#import "UIImage+Utils.h"
|
||||
#import "NetImageView.h"
|
||||
///Model
|
||||
#import "MonentsTopicModel.h"
|
||||
|
||||
@interface XPMonentsTopicCollectionViewCell ()
|
||||
|
||||
///背景
|
||||
@property (nonatomic,strong) NetImageView *topicImageView;
|
||||
//@property (nonatomic,strong) UIImageView *topicImageView;
|
||||
///显示话题前面的#
|
||||
@property (nonatomic,strong) UIImageView *iconImageView;
|
||||
///显示话题
|
||||
@@ -38,53 +37,68 @@
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.contentView addSubview:self.topicImageView];
|
||||
[self.topicImageView addSubview:self.iconImageView];
|
||||
[self.topicImageView addSubview:self.topicLabel];
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.contentView.backgroundColor = [UIColor clearColor];
|
||||
[self.contentView addSubview:self.iconImageView];
|
||||
[self.contentView addSubview:self.topicLabel];
|
||||
// [self.contentView addSubview:self.topicImageView];
|
||||
// [self.topicImageView addSubview:self.iconImageView];
|
||||
// [self.topicImageView addSubview:self.topicLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.topicImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.topicImageView);
|
||||
make.height.mas_equalTo(30);
|
||||
make.centerY.equalTo(self.contentView);
|
||||
make.left.mas_equalTo(14);
|
||||
make.width.height.mas_equalTo(10);
|
||||
}];
|
||||
|
||||
[self.topicLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.topicImageView).inset(2);
|
||||
make.bottom.mas_equalTo(self.topicImageView.mas_bottom).offset(-6);
|
||||
make.centerY.right.equalTo(self.contentView);
|
||||
make.left.equalTo(self.iconImageView.mas_right).mas_offset(5);
|
||||
make.right.mas_equalTo(-5.5);
|
||||
}];
|
||||
|
||||
// [self.topicImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(self.contentView);
|
||||
// }];
|
||||
//
|
||||
// [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.mas_equalTo(self.topicImageView).offset(7);
|
||||
// make.size.mas_equalTo(CGSizeMake(16, 16));
|
||||
// make.centerY.mas_equalTo(self.topicImageView);
|
||||
// }];
|
||||
//
|
||||
// [self.topicLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.mas_equalTo(self.iconImageView.mas_right).offset(2);
|
||||
// make.centerY.mas_equalTo(self.topicImageView);
|
||||
// }];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setTopicInfo:(MonentsTopicModel *)topicInfo {
|
||||
_topicInfo = topicInfo;
|
||||
if (_topicInfo) {
|
||||
self.topicLabel.text = [NSString stringWithFormat:@"#%@", _topicInfo.name];
|
||||
self.topicImageView.imageUrl = _topicInfo.icon;
|
||||
self.topicLabel.text = _topicInfo.name;
|
||||
}
|
||||
}
|
||||
|
||||
- (NetImageView *)topicImageView {
|
||||
if (!_topicImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_topicImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_topicImageView.layer.masksToBounds = YES;
|
||||
_topicImageView.layer.cornerRadius = 12;
|
||||
_topicImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _topicImageView;
|
||||
}
|
||||
//
|
||||
//- (UIImageView *)topicImageView {
|
||||
// if (!_topicImageView) {
|
||||
// _topicImageView = [[UIImageView alloc] init];
|
||||
// _topicImageView.userInteractionEnabled = YES;
|
||||
// _topicImageView.image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFFFCDD), UIColorFromRGB(0xDFF9FF), UIColorFromRGB(0xF4E5FF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)];
|
||||
// _topicImageView.layer.masksToBounds = YES;
|
||||
// _topicImageView.layer.cornerRadius = 13;
|
||||
// }
|
||||
// return _topicImageView;
|
||||
//}
|
||||
|
||||
- (UIImageView *)iconImageView {
|
||||
if (!_iconImageView) {
|
||||
_iconImageView = [[UIImageView alloc] init];
|
||||
_iconImageView.userInteractionEnabled = YES;
|
||||
_iconImageView.image = [UIImage imageNamed:@"home_room_list_shadow_bg"];
|
||||
_iconImageView.image = [UIImage imageNamed:@"monents_info_topic_icon"];
|
||||
}
|
||||
return _iconImageView;
|
||||
}
|
||||
@@ -92,9 +106,8 @@
|
||||
- (UILabel *)topicLabel {
|
||||
if (!_topicLabel) {
|
||||
_topicLabel = [[UILabel alloc] init];
|
||||
_topicLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightBold];
|
||||
_topicLabel.textColor = [UIColor whiteColor];
|
||||
_topicLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_topicLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightRegular];
|
||||
_topicLabel.textColor = UIColorFromRGB(0x1F1A4E);
|
||||
}
|
||||
return _topicLabel;
|
||||
}
|
||||
|
@@ -1,15 +1,15 @@
|
||||
//
|
||||
// YMMoentsTopicView.m
|
||||
// YUMI
|
||||
// XPMoentsTopicView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/12.
|
||||
// Created by 冯硕 on 2022/5/12.
|
||||
//
|
||||
|
||||
#import "XPMoentsTopicView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
|
||||
#import "UIImage+Utils.h"
|
||||
#import "NSString+Utils.h"
|
||||
///Model
|
||||
@@ -24,8 +24,7 @@
|
||||
@property (nonatomic,strong) UIImageView *iconImageView;
|
||||
///显示话题
|
||||
@property (nonatomic,strong) UILabel *topicLabel;
|
||||
///显示时间
|
||||
@property (nonatomic,strong) UILabel *timeLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMoentsTopicView
|
||||
@@ -42,15 +41,13 @@
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.stackView];
|
||||
[self.stackView addArrangedSubview:self.topicImageView];
|
||||
[self.stackView addArrangedSubview:self.timeLabel];
|
||||
|
||||
[self.topicImageView addSubview:self.iconImageView];
|
||||
[self.topicImageView addSubview:self.topicLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
make.left.top.bottom.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self.topicImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -58,8 +55,8 @@
|
||||
}];
|
||||
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.topicImageView).offset(9);
|
||||
make.size.mas_equalTo(CGSizeMake(20, 20));
|
||||
make.left.mas_equalTo(self.topicImageView);
|
||||
make.size.mas_equalTo(CGSizeMake(10, 10));
|
||||
make.centerY.mas_equalTo(self.topicImageView);
|
||||
}];
|
||||
|
||||
@@ -73,12 +70,8 @@
|
||||
_monentsInfo = monentsInfo;
|
||||
if (_monentsInfo) {
|
||||
if (_monentsInfo.worldId > 0) {
|
||||
self.topicImageView.hidden = NO;
|
||||
self.topicLabel.text = _monentsInfo.worldName;
|
||||
} else {
|
||||
self.topicImageView.hidden = YES;
|
||||
}
|
||||
self.timeLabel.text = [NSString stringWithTimeStamp:_monentsInfo.publishTime];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +90,7 @@
|
||||
if (!_topicImageView) {
|
||||
_topicImageView = [[UIImageView alloc] init];
|
||||
_topicImageView.userInteractionEnabled = YES;
|
||||
_topicImageView.image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFFFCDD), UIColorFromRGB(0xDFF9FF), UIColorFromRGB(0xF4E5FF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)];
|
||||
// _topicImageView.image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFFFCDD), UIColorFromRGB(0xDFF9FF), UIColorFromRGB(0xF4E5FF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)];
|
||||
_topicImageView.layer.masksToBounds = YES;
|
||||
_topicImageView.layer.cornerRadius = 8;
|
||||
}
|
||||
@@ -116,19 +109,12 @@
|
||||
- (UILabel *)topicLabel {
|
||||
if (!_topicLabel) {
|
||||
_topicLabel = [[UILabel alloc] init];
|
||||
_topicLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightBold];
|
||||
_topicLabel.font = [UIFont systemFontOfSize:11 weight:UIFontWeightRegular];
|
||||
_topicLabel.textColor = [DJDKMIMOMColor mainTextColor];
|
||||
}
|
||||
return _topicLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)timeLabel {
|
||||
if (!_timeLabel) {
|
||||
_timeLabel = [[UILabel alloc] init];
|
||||
_timeLabel.font = [UIFont systemFontOfSize:10];
|
||||
_timeLabel.textColor = [DJDKMIMOMColor textThirdColor];
|
||||
}
|
||||
return _timeLabel;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// YMMonentsContentView.h
|
||||
// YUMI
|
||||
// XPMonentsContentView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/13.
|
||||
// Created by 冯硕 on 2022/5/13.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@@ -18,13 +18,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@end
|
||||
|
||||
@interface XPMonentsContentView : UIView
|
||||
///
|
||||
@property (nonatomic,assign) BOOL isTopic;
|
||||
@property (nonatomic,strong) MonentsInfoModel *monentsInfo;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPMonentsContentViewDelegate> delegate;
|
||||
|
||||
/// 是否是审核UI
|
||||
@property (nonatomic,assign) BOOL isSimple;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// YMMonentsContentView.m
|
||||
// YUMI
|
||||
// XPMonentsContentView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/13.
|
||||
// Created by 冯硕 on 2022/5/13.
|
||||
//
|
||||
|
||||
#import "XPMonentsContentView.h"
|
||||
@@ -10,7 +10,7 @@
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <YYText/YYText.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
#import "UIButton+EnlargeTouchArea.h"
|
||||
///Model
|
||||
@@ -22,6 +22,8 @@
|
||||
@property (nonatomic,strong) UILabel *contentLabel;
|
||||
///折叠的按钮
|
||||
@property (nonatomic,strong) UIButton *foldButton;
|
||||
///显示时间
|
||||
@property (nonatomic,strong) UILabel *timeLabel;
|
||||
@end
|
||||
|
||||
|
||||
@@ -38,16 +40,21 @@
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
|
||||
[self addSubview:self.stackView];
|
||||
[self.stackView addArrangedSubview:self.contentLabel];
|
||||
[self.stackView addArrangedSubview:self.foldButton];
|
||||
[self.stackView addArrangedSubview:self.timeLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
[self.foldButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(kMONENTS_FOLD_HEIGHT);
|
||||
}];
|
||||
@@ -55,12 +62,24 @@
|
||||
|
||||
- (NSAttributedString *)createMonentsContentAttribute {
|
||||
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] init];
|
||||
if (self.monentsInfo.squareTop ) {//动态/广场
|
||||
BOOL isTop = NO;
|
||||
if(self.isTopic && self.monentsInfo.topicTop){
|
||||
isTop = YES;
|
||||
}else{
|
||||
if (self.monentsInfo.squareTop ) {
|
||||
isTop = YES;
|
||||
}
|
||||
}
|
||||
if (isTop) {//动态/广场
|
||||
NSTextAttachment * attachment = [[NSTextAttachment alloc] init];
|
||||
attachment.bounds = CGRectMake(0, 0, 25 * 1.3, 10 * 1.3);
|
||||
attachment.image = [UIImage imageNamed:@"monents_info_top"];
|
||||
UIImage *iconImage = [UIImage imageNamed:@"monents_info_top"];;
|
||||
attachment.bounds = CGRectMake(0, roundf(self.contentLabel.font.capHeight - iconImage.size.height)/2.f, iconImage.size.width, iconImage.size.height);
|
||||
|
||||
attachment.image =iconImage;
|
||||
NSAttributedString * starAttribute = [NSMutableAttributedString attributedStringWithAttachment:(NSTextAttachment *)attachment];
|
||||
[attributedString insertAttributedString:starAttribute atIndex:0];
|
||||
//将图片插入到合适的位置
|
||||
// [attributedString appendAttributedString:[self creatStrAttrByStr:YMLocalizedString(@"XPMonentsContentView0") attributed:@{NSFontAttributeName : [UIFont systemFontOfSize:15], NSForegroundColorAttributeName: UIColorFromRGB(0xE84C46)}]];
|
||||
}
|
||||
[attributedString appendAttributedString:[self creatStrAttrByStr:self.monentsInfo.content attributed:@{NSFontAttributeName : [UIFont systemFontOfSize:15]}]];
|
||||
attributedString.yy_lineSpacing = 5;
|
||||
@@ -88,20 +107,15 @@
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
|
||||
- (void)setIsSimple:(BOOL)isSimple {
|
||||
_isSimple = isSimple;
|
||||
self.contentLabel.preferredMaxLayoutWidth = isSimple ? kSIMPLE_MONENTS_CONTENT_MAX_WIDTH : kMONENTS_CONTENT_MAX_WIDTH;
|
||||
}
|
||||
|
||||
- (void)setMonentsInfo:(MonentsInfoModel *)monentsInfo {
|
||||
_monentsInfo = monentsInfo;
|
||||
if (_monentsInfo) {
|
||||
self.timeLabel.text = [NSString stringWithTimeStamp:_monentsInfo.publishTime];
|
||||
self.contentLabel.attributedText = [self createMonentsContentAttribute];
|
||||
self.foldButton.selected = !_monentsInfo.isFold;
|
||||
if (monentsInfo.numberOfText <= 0) {
|
||||
YYTextContainer *container = [YYTextContainer new];
|
||||
container.size = CGSizeMake(self.isSimple ? kSIMPLE_MONENTS_CONTENT_MAX_WIDTH : kMONENTS_CONTENT_MAX_WIDTH, CGFLOAT_MAX);
|
||||
container.size = CGSizeMake(kMONENTS_CONTENT_MAX_WIDTH, CGFLOAT_MAX);
|
||||
container.maximumNumberOfRows = 0;
|
||||
YYTextLayout * layout = [YYTextLayout layoutWithContainer:container text:self.contentLabel.attributedText];
|
||||
if (layout.rowCount > 6) {
|
||||
@@ -137,7 +151,7 @@
|
||||
_stackView.axis = UILayoutConstraintAxisVertical;
|
||||
_stackView.distribution = UIStackViewDistributionFill;
|
||||
_stackView.alignment = UIStackViewAlignmentLeading;
|
||||
_stackView.spacing = 0;
|
||||
_stackView.spacing = 5;
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
@@ -145,8 +159,8 @@
|
||||
- (UIButton *)foldButton {
|
||||
if (_foldButton == nil) {
|
||||
_foldButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_foldButton setTitle:YMLocalizedString(@"XPMonentsContentView0") forState:UIControlStateNormal];
|
||||
[_foldButton setTitle:YMLocalizedString(@"XPMonentsContentView1") forState:UIControlStateSelected];
|
||||
[_foldButton setTitle:YMLocalizedString(@"XPMonentsContentView1") forState:UIControlStateNormal];
|
||||
[_foldButton setTitle:YMLocalizedString(@"XPMonentsContentView2") forState:UIControlStateSelected];
|
||||
[_foldButton setTitleColor:UIColorFromRGB(0x34A7FF) forState:UIControlStateNormal];
|
||||
[_foldButton setTitleColor:UIColorFromRGB(0x34A7FF) forState:UIControlStateSelected];
|
||||
_foldButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
@@ -161,13 +175,20 @@
|
||||
if (!_contentLabel) {
|
||||
_contentLabel = [[UILabel alloc] init];
|
||||
_contentLabel.numberOfLines = 0;
|
||||
_contentLabel.font = [UIFont systemFontOfSize:15];
|
||||
_contentLabel.textColor = UIColorRGBAlpha(0x333333, 1);
|
||||
_contentLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
|
||||
_contentLabel.textColor = UIColorRGBAlpha(0x1F1A4E, 1);
|
||||
_contentLabel.preferredMaxLayoutWidth = kMONENTS_CONTENT_MAX_WIDTH;
|
||||
_contentLabel.lineBreakMode = NSLineBreakByWordWrapping;
|
||||
|
||||
}
|
||||
return _contentLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)timeLabel {
|
||||
if (!_timeLabel) {
|
||||
_timeLabel = [[UILabel alloc] init];
|
||||
_timeLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular];
|
||||
_timeLabel.textColor = [DJDKMIMOMColor textThirdColor];
|
||||
}
|
||||
return _timeLabel;
|
||||
}
|
||||
@end
|
||||
|
@@ -1,18 +1,16 @@
|
||||
//
|
||||
// YMMonentsPhotoView.m
|
||||
// YUMI
|
||||
// XPMonentsPhotoView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/12.
|
||||
// Created by 冯硕 on 2022/5/12.
|
||||
//
|
||||
|
||||
#import "XPMonentsPhotoView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "NetImageView.h"
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
#import "NSArray+Safe.h"
|
||||
///Model
|
||||
#import "MonentsInfoModel.h"
|
||||
|
||||
@@ -144,6 +142,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)setDynamicResList:(NSArray<MonentsPicInfoModel *> *)dynamicResList {
|
||||
_dynamicResList = dynamicResList;
|
||||
[self hiddenAllImageView];
|
||||
@@ -193,6 +193,7 @@
|
||||
NSInteger page = i % 3;
|
||||
NSInteger line = i / 3;
|
||||
NetImageView * imageView = [self.subViewArray safeObjectAtIndex1:i];
|
||||
if(imageView == nil)return;
|
||||
[imageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(itemWidth, itemWidth));
|
||||
make.left.mas_equalTo(page * (itemWidth + kMONENTS_PIC_SPACE));
|
||||
|
@@ -1,26 +1,32 @@
|
||||
//
|
||||
// YMMonentsRecommendHeaderView.m
|
||||
// YUMI
|
||||
// XPMonentsRecommendHeaderView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/18.
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsRecommendHeaderView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "NSArray+Safe.h"
|
||||
|
||||
///Model
|
||||
#import "MonentsTopicModel.h"
|
||||
///View
|
||||
#import "XPMonentsTopicCollectionViewCell.h"
|
||||
|
||||
@interface XPMonentsRecommendHeaderView ()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
||||
///背景图
|
||||
@property (nonatomic,strong) UIImageView *bgView;
|
||||
|
||||
///titile背景
|
||||
@property (nonatomic,strong) UIImageView *titleBgView;
|
||||
|
||||
///显示标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///显示箭头
|
||||
@property (nonatomic,strong) UIButton *arrowButton;
|
||||
//@property (nonatomic,strong) UIButton *arrowButton;
|
||||
///列表背景
|
||||
@property (nonatomic,strong) UIView *collectionBgView;
|
||||
///列表
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
|
||||
@@ -40,28 +46,49 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [DJDKMIMOMColor appCellBackgroundColor];
|
||||
[self addSubview:self.titleLabel];
|
||||
[self addSubview:self.arrowButton];
|
||||
[self addSubview:self.collectionView];
|
||||
[self addSubview:self.bgView];
|
||||
[self.bgView addSubview:self.collectionBgView];
|
||||
[self.collectionBgView addSubview:self.collectionView];
|
||||
[self.bgView addSubview:self.titleBgView];
|
||||
[self.titleBgView addSubview:self.titleLabel];
|
||||
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self).offset(15);
|
||||
make.top.mas_equalTo(self).offset(15);
|
||||
}];
|
||||
|
||||
[self.arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(11, 20));
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
make.right.mas_equalTo(self).offset(-15);
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(16);
|
||||
make.right.mas_offset(-15);
|
||||
make.left.mas_offset(15);
|
||||
make.bottom.mas_equalTo(-20);
|
||||
}];
|
||||
|
||||
// [self.collectionBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(10);
|
||||
// make.left.mas_equalTo(10);
|
||||
// make.right.mas_equalTo(-10);
|
||||
// make.bottom.mas_equalTo(-10);
|
||||
// }];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(10);
|
||||
make.height.mas_equalTo(77);
|
||||
make.top.mas_equalTo(15);
|
||||
make.left.right.equalTo(self.collectionBgView);
|
||||
make.height.mas_equalTo(69);
|
||||
}];
|
||||
[self.titleBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.left.equalTo(self.bgView);
|
||||
make.width.mas_equalTo(74);
|
||||
make.height.mas_equalTo(21);
|
||||
}];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.equalTo(self.titleBgView);
|
||||
}];
|
||||
|
||||
// [self.arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.size.mas_equalTo(CGSizeMake(11, 20));
|
||||
// make.centerY.mas_equalTo(self.titleLabel);
|
||||
// make.right.mas_equalTo(self).offset(-15);
|
||||
// }];
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource
|
||||
@@ -69,13 +96,17 @@
|
||||
return self.topicList.count;
|
||||
}
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return CGSizeMake(125, 77);
|
||||
}
|
||||
//- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
// MonentsTopicModel * topicModel = [self.topicList safeObjectWithIndex:indexPath.row];
|
||||
// CGFloat itemWidth = [topicModel.name boundingRectWithSize:CGSizeMake(100, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingTruncatesLastVisibleLine attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightBold]} context:nil].size.width;
|
||||
// return CGSizeMake(itemWidth +34, 26);
|
||||
//}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPMonentsTopicCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMonentsTopicCollectionViewCell class]) forIndexPath:indexPath];
|
||||
|
||||
cell.topicInfo = [self.topicList safeObjectAtIndex1:indexPath.row];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
@@ -83,6 +114,7 @@
|
||||
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
|
||||
if (self.topicList.count > 0) {
|
||||
MonentsTopicModel * topicInfo = [self.topicList safeObjectAtIndex1:indexPath.row];
|
||||
if(topicInfo == nil)return;
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMonentsRecommendHeaderView:didSelectItem:)]) {
|
||||
[self.delegate xPMonentsRecommendHeaderView:self didSelectItem:topicInfo];
|
||||
}
|
||||
@@ -105,39 +137,80 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
||||
_titleLabel.textColor = [DJDKMIMOMColor mainTextColor];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_titleLabel.textColor = UIColorFromRGB(0x0D344D);
|
||||
_titleLabel.text = YMLocalizedString(@"XPMonentsRecommendHeaderView0");
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)arrowButton {
|
||||
if (!_arrowButton) {
|
||||
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateNormal];
|
||||
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateSelected];
|
||||
[_arrowButton addTarget:self action:@selector(arrowButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _arrowButton;
|
||||
}
|
||||
//- (UIButton *)arrowButton {
|
||||
// if (!_arrowButton) {
|
||||
// _arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
// [_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateNormal];
|
||||
// [_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateSelected];
|
||||
// [_arrowButton addTarget:self action:@selector(arrowButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
// }
|
||||
// return _arrowButton;
|
||||
//}
|
||||
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 0);
|
||||
layout.sectionInset = UIEdgeInsetsMake(0,0, 0, 0);
|
||||
layout.itemSize = CGSizeMake((KScreenWidth - 50)/2, 18);
|
||||
layout.minimumLineSpacing = 0;
|
||||
layout.minimumInteritemSpacing = 0;
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
layout.minimumLineSpacing = 8;
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
_collectionView.pagingEnabled = YES;
|
||||
_collectionView.showsHorizontalScrollIndicator = NO;
|
||||
[_collectionView registerClass:[XPMonentsTopicCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPMonentsTopicCollectionViewCell class])];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
- (UIView *)collectionBgView{
|
||||
if (!_collectionBgView){
|
||||
|
||||
UIView *view = [[UIView alloc] init];
|
||||
view.frame = CGRectMake(10,10,KScreenWidth - 50,89);
|
||||
view.layer.borderWidth = 0.5;
|
||||
view.layer.borderColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0].CGColor;
|
||||
|
||||
view.layer.backgroundColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:0.6300].CGColor;
|
||||
|
||||
// blur
|
||||
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
|
||||
UIVisualEffectView *visualView = [[UIVisualEffectView alloc]initWithEffect:blurEffect];
|
||||
visualView.frame = CGRectMake(10,10,KScreenWidth - 50,89);
|
||||
view.layer.cornerRadius = 8;
|
||||
_collectionBgView = view;
|
||||
_collectionView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _collectionBgView;
|
||||
}
|
||||
- (UIImageView *)bgView{
|
||||
if (!_bgView){
|
||||
_bgView = [UIImageView new];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x9FF4F2),UIColorFromRGB(0x96D6FF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - 30, 109)];
|
||||
_bgView.image = image;
|
||||
[_bgView setCornerWithLeftTopCorner:10 rightTopCorner:10 bottomLeftCorner:10 bottomRightCorner:10 size:CGSizeMake(KScreenWidth - 30, 109)];
|
||||
_bgView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _bgView;
|
||||
}
|
||||
-(UIImageView *)titleBgView{
|
||||
if (!_titleBgView){
|
||||
_titleBgView = [UIImageView new];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x83E8E7),UIColorFromRGB(0x86D4F6)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(74, 21)];
|
||||
_titleBgView.image = image;
|
||||
[_titleBgView setCornerWithLeftTopCorner:10 rightTopCorner:0 bottomLeftCorner:0 bottomRightCorner:10 size:CGSizeMake(74, 21)];
|
||||
_titleBgView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _titleBgView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// YMMonentsUserInfoView.h
|
||||
// YUMI
|
||||
// XPMonentsUserInfoView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/12.
|
||||
// Created by 冯硕 on 2022/5/12.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@@ -17,6 +17,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
///点击了跟随进房
|
||||
- (void)xPMonentsUserInfoView:(XPMonentsUserInfoView *)view didClickEnterRoom:(MonentsInfoModel *)monents;
|
||||
|
||||
///删除
|
||||
- (void)xPMonentsTooBarView:(XPMonentsUserInfoView *)view didClickDelete:(MonentsInfoModel *)monentsInfo;
|
||||
|
||||
@end
|
||||
@interface XPMonentsUserInfoView : UIView
|
||||
///动态信息
|
||||
|
@@ -1,21 +1,24 @@
|
||||
//
|
||||
// YMMonentsUserInfoView.m
|
||||
// YUMI
|
||||
// XPMonentsUserInfoView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/12.
|
||||
// Created by 冯硕 on 2022/5/12.
|
||||
//
|
||||
|
||||
#import "XPMonentsUserInfoView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
|
||||
#import "NetImageView.h"
|
||||
#import "SpriteSheetImageManager.h"
|
||||
#import "YUMIMacroUitls.h"
|
||||
#import "TTPopup.h"
|
||||
#import "XPWebViewController.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "UIButton+EnlargeTouchArea.h"
|
||||
///Model
|
||||
#import "MonentsInfoModel.h"
|
||||
#import "NSArray+Safe.h"
|
||||
|
||||
@interface XPMonentsUserInfoView ()
|
||||
///
|
||||
@@ -58,6 +61,7 @@
|
||||
@property (nonatomic,strong) NetImageView *thirdTagImageView;
|
||||
///直播中
|
||||
@property (nonatomic,strong) UIButton *onlineButton;
|
||||
|
||||
@end
|
||||
@implementation XPMonentsUserInfoView
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
@@ -95,10 +99,13 @@
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
|
||||
|
||||
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(40, 40));
|
||||
make.size.mas_equalTo(CGSizeMake(50, 50));
|
||||
make.left.mas_equalTo(self).offset(15);
|
||||
make.top.mas_equalTo(self).offset(15);
|
||||
make.centerY.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self.headWearImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -168,8 +175,8 @@
|
||||
|
||||
[self.onlineButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(55, 18));
|
||||
make.right.mas_equalTo(self.tagStackView);
|
||||
make.top.mas_equalTo(self.tagStackView.mas_bottom).offset(4);
|
||||
make.right.mas_equalTo(-15);
|
||||
make.top.equalTo(self.tagStackView.mas_bottom).mas_offset(8);
|
||||
}];
|
||||
|
||||
[self.firstTagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -198,6 +205,24 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)reportButtonAction:(UIButton *)sender {
|
||||
TTActionSheetConfig *action;
|
||||
if (self.monentsInfo.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
action = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMonentsUserInfoView0") clickAction:^{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMonentsTooBarView:didClickDelete:)]) {
|
||||
[self.delegate xPMonentsTooBarView:self didClickDelete:self.monentsInfo];
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
action = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMonentsUserInfoView1") clickAction:^{
|
||||
NSString * url= [NSString stringWithFormat:@"%@?reportUid=%@&source=%@", URLWithType(kReportRoomURL),self.monentsInfo.uid, @"WORLDDYNAMIC"];
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = url;
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
|
||||
}];
|
||||
}
|
||||
[TTPopup actionSheetWithItems:@[action]];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setMonentsInfo:(MonentsInfoModel *)monentsInfo {
|
||||
_monentsInfo = monentsInfo;
|
||||
@@ -254,10 +279,12 @@
|
||||
NSString * imageUrl = [_monentsInfo.labelList safeObjectAtIndex1:i];
|
||||
if (i < self.tagStackView.subviews.count) {
|
||||
NetImageView * image = [self.tagStackView.subviews safeObjectAtIndex1:i];
|
||||
if(image != nil){
|
||||
image.hidden = NO;
|
||||
image.imageUrl = imageUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
self.onlineButton.hidden = _monentsInfo.inRoomUid.length <= 0;
|
||||
}
|
||||
}
|
||||
@@ -286,7 +313,7 @@
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_avatarImageView.userInteractionEnabled = YES;
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 20;
|
||||
_avatarImageView.layer.cornerRadius = 25;
|
||||
_avatarImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapAvatarGuest)];
|
||||
[_avatarImageView addGestureRecognizer:tap];
|
||||
@@ -449,19 +476,21 @@
|
||||
- (UIButton *)onlineButton {
|
||||
if (!_onlineButton) {
|
||||
_onlineButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_onlineButton setTitle:YMLocalizedString(@"XPMonentsUserInfoView0") forState:UIControlStateNormal];
|
||||
[_onlineButton setImage:[UIImage imageNamed:@"home_search_user_online"] forState:UIControlStateNormal];
|
||||
[_onlineButton setTitleColor:[DJDKMIMOMColor appEmphasizeColor] forState:UIControlStateNormal];
|
||||
[_onlineButton setTitle:YMLocalizedString(@"XPMonentsUserInfoView2") forState:UIControlStateNormal];
|
||||
[_onlineButton setImage:[UIImage imageNamed:@"monents_on_line_note"] forState:UIControlStateNormal];
|
||||
[_onlineButton setTitleColor:[DJDKMIMOMColor appMainColor] forState:UIControlStateNormal];
|
||||
_onlineButton.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 3);
|
||||
_onlineButton.backgroundColor = [UIColor clearColor];
|
||||
_onlineButton.titleLabel.font = [UIFont systemFontOfSize:10];
|
||||
_onlineButton.layer.masksToBounds = YES;
|
||||
_onlineButton.layer.cornerRadius = 18/2;
|
||||
_onlineButton.layer.borderColor = [DJDKMIMOMColor appEmphasizeColor].CGColor;
|
||||
_onlineButton.layer.borderWidth = 1;
|
||||
[_onlineButton setBackgroundImage:[UIImage imageNamed:@"monents_on_line_bg"] forState:UIControlStateNormal];
|
||||
[_onlineButton addTarget:self action:@selector(onlineButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _onlineButton;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// YMMonentsAttentionViewController.m
|
||||
// YUMI
|
||||
// XPMonentsAttentionViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/18.
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsAttentionViewController.h"
|
||||
@@ -10,12 +10,9 @@
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "YUMIMacroUitls.h"
|
||||
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
#import "TTPopup.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "ClientConfig.h"
|
||||
///Model
|
||||
#import "MonentsListInfoModel.h"
|
||||
///P
|
||||
@@ -25,8 +22,7 @@
|
||||
#import "XPMonentsTableViewCell.h"
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
#import "XPMonentsDetailViewController.h"
|
||||
#import "XPMomentsSimpleDetailViewController.h"
|
||||
|
||||
UIKIT_EXTERN NSString *kRequestRicket;
|
||||
@interface XPMonentsAttentionViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsAttentionProtocol, XPMonentsTableViewCellDelegate, XPMonentsDetailViewControllerDelegate>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
@@ -41,7 +37,9 @@
|
||||
@end
|
||||
|
||||
@implementation XPMonentsAttentionViewController
|
||||
|
||||
-(void)dealloc{
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
}
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
@@ -60,7 +58,16 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.tableView];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(requestRicketSuccess:) name:kRequestRicket object:nil];
|
||||
}
|
||||
-(void)requestRicketSuccess:(NSNotification *)not{
|
||||
if([not.object isKindOfClass:[NSDictionary class]])return;
|
||||
BOOL is = [not.object boolValue];
|
||||
if(is == YES){
|
||||
[self headerRefresh];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -87,11 +94,15 @@
|
||||
|
||||
#pragma mark - 刷新的fangfa
|
||||
- (void)headerRefresh {
|
||||
if([AccountInfoStorage instance].isRequestRicket == YES){
|
||||
return;
|
||||
}
|
||||
self.page = 1;
|
||||
[self.presenter getMonentsAttentionListPageSize:20 dynamicId:@"" state:0];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
if([AccountInfoStorage instance].isRequestRicket == YES)return;
|
||||
if (self.hasNoMoreData) {
|
||||
[self showErrorToast:YMLocalizedString(@"XPMonentsAttentionViewController0")];
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
@@ -110,8 +121,13 @@
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
[XPMonentsLayoutConfig layoutMonentsModel:monentInfo];
|
||||
if(monentInfo.squareTop && monentInfo.content.length == 0){
|
||||
return monentInfo.rowHeight + 20 ;
|
||||
}else{
|
||||
return monentInfo.rowHeight;
|
||||
}
|
||||
|
||||
}
|
||||
return KScreenHeight - kNavigationHeight - 49 - kSafeAreaBottomHeight;
|
||||
}
|
||||
|
||||
@@ -130,22 +146,20 @@
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
if ([ClientConfig shareConfig].canOpen) {
|
||||
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
detailVC.monentsInfo = monentsInfo;
|
||||
detailVC.delegate = self;
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}else{
|
||||
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
|
||||
detailVC.monentsInfo = monentsInfo;
|
||||
detailVC.delegate = self;
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsDetailViewControllerDelegate
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicShielding:(MonentsInfoModel *)monentsInfo{
|
||||
[self showLoading];
|
||||
[self.presenter requesstShieldingWtihType:@"0" objId:monentsInfo.dynamicId];
|
||||
}
|
||||
|
||||
- (void)xPMonentsDetailViewController:(XPMonentsDetailViewController *)view deleteMonents:(NSString *)dynamicId {
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
@@ -166,7 +180,7 @@
|
||||
}
|
||||
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicDelete:(MonentsInfoModel *)monentsInfo {
|
||||
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsTopicLatestViewController1") confirmHandler:^{
|
||||
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsAttentionViewController1") confirmHandler:^{
|
||||
[self.presenter deleteMonents:monentsInfo.dynamicId worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
} cancelHandler:^{
|
||||
|
||||
@@ -237,7 +251,21 @@
|
||||
}];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
-(void)requesstShieldingSuccess:(NSString *)monentsInfo{
|
||||
[self hideHUD];
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsMineViewController2")];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.dynamicId.integerValue == monentsInfo.integerValue) {
|
||||
deleteInfo = obj;
|
||||
}
|
||||
}];
|
||||
|
||||
if (deleteInfo) {
|
||||
[self.datasource removeObject:deleteInfo];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo {
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsAttentionViewController2")];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
@@ -260,7 +288,6 @@
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.contentInset = UIEdgeInsetsMake(0, 0, 100, 0);
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
if (@available(iOS 11.0, *)) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// YMMonentsDetailViewController.m
|
||||
// YUMI
|
||||
// XPMonentsDetailViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/6/22.
|
||||
// Created by 冯硕 on 2022/6/22.
|
||||
//
|
||||
|
||||
#import "XPMonentsDetailViewController.h"
|
||||
@@ -11,12 +11,9 @@
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "QEmotionHelper.h"
|
||||
#import "QKeyboardManager.h"
|
||||
#import "TTPopup.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "ClientConfig.h"
|
||||
///Model
|
||||
#import "MonentsInfoModel.h"
|
||||
#import "MonentsCommentModel.h"
|
||||
@@ -29,7 +26,6 @@
|
||||
#import "QKeyboardManager.h"
|
||||
#import "QEmotionBoardView.h"
|
||||
#import "XPMineUserInfoViewController.h"
|
||||
#import "XPMineSimpleUserInfoViewController.h"
|
||||
///P
|
||||
#import "XPMonentDetailPresenter.h"
|
||||
#import "XPMonentsDetailProtocol.h"
|
||||
@@ -50,7 +46,9 @@
|
||||
@end
|
||||
|
||||
@implementation XPMonentsDetailViewController
|
||||
|
||||
-(void)dealloc{
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
}
|
||||
- (__kindof id)createPresenter {
|
||||
return [[XPMonentDetailPresenter alloc] init];
|
||||
}
|
||||
@@ -60,8 +58,57 @@
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(refreshDynamicData:) name:@"kRefreshDynamicData" object:nil];
|
||||
|
||||
}
|
||||
-(void)refreshDynamicData:(NSNotification *)not{
|
||||
NSDictionary *refreshData = not.object;
|
||||
int type = [refreshData[@"type"] intValue];
|
||||
///type,0=点赞,1=删除,2=屏蔽,3=评论
|
||||
switch (type) {
|
||||
case 0:
|
||||
{
|
||||
|
||||
BOOL status = [refreshData[@"status"] boolValue];
|
||||
NSInteger count = self.monentsInfo.likeCount.integerValue;
|
||||
NSString *dynamicId = refreshData[@"dynamicId"];
|
||||
if([self.monentsInfo.dynamicId isEqualToString:dynamicId]){
|
||||
self.monentsInfo.isLike = status;
|
||||
if (status) {
|
||||
count += 1;
|
||||
} else {
|
||||
count -= 1;
|
||||
}
|
||||
self.monentsInfo.likeCount = [NSString stringWithFormat:@"%ld", count];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
NSString *dynamicId = refreshData[@"dynamicId"];
|
||||
if([self.monentsInfo.dynamicId isEqualToString:dynamicId]){
|
||||
self.monentsInfo.commentCount = [NSString stringWithFormat:@"%ld",self.monentsInfo.commentCount.integerValue + 1];
|
||||
|
||||
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma mark - 下拉刷新
|
||||
- (void)initHeaderAndFooterRrfresh {
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)];
|
||||
@@ -139,12 +186,12 @@
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.leading.trailing.top.mas_equalTo(self.view);
|
||||
make.bottom.mas_equalTo(self.inputBarView.mas_top);
|
||||
}];
|
||||
|
||||
[self.commentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.sectionView).offset(15);
|
||||
make.leading.mas_equalTo(self.sectionView).offset(15);
|
||||
make.centerY.mas_equalTo(self.sectionView);
|
||||
}];
|
||||
}
|
||||
@@ -164,7 +211,12 @@
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.section == 0) {
|
||||
[XPMonentsLayoutConfig layoutMonentsModel:self.monentsInfo];
|
||||
|
||||
if(self.monentsInfo.squareTop && self.monentsInfo.content.length == 0){
|
||||
return self.monentsInfo.rowHeight + 20 ;
|
||||
}else{
|
||||
return self.monentsInfo.rowHeight;
|
||||
}
|
||||
} else if(indexPath.section == 1) {
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsCommentModel * commentInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
@@ -184,7 +236,7 @@
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
self.commentLabel.text = [NSString stringWithFormat:@"%@(%@)",YMLocalizedString(@"XPMonentsDetailViewController2"),self.monentsInfo.commentCount];
|
||||
self.commentLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPMonentsDetailViewController2"), self.monentsInfo.commentCount];
|
||||
return self.sectionView;
|
||||
}
|
||||
|
||||
@@ -221,7 +273,7 @@
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsCommentModel* monent = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
self.commentId = monent.commentId;
|
||||
self.inputBarView.inputTextView.placeholder = [NSString stringWithFormat:@"%@: %@", YMLocalizedString(@"XPMonentsDetailViewController3"),monent.nick];
|
||||
self.inputBarView.inputTextView.placeholder = [NSString stringWithFormat:YMLocalizedString(@"XPMonentsDetailViewController3"), monent.nick];
|
||||
[self.inputBarView textViewBecomeFirstResponder];
|
||||
}
|
||||
}
|
||||
@@ -232,6 +284,10 @@
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsCommentTableViewCellDelegate
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicShielding:(MonentsInfoModel *)monentsInfo{
|
||||
[self showLoading];
|
||||
[self.presenter requesstShieldingWtihType:@"0" objId:monentsInfo.dynamicId];
|
||||
}
|
||||
- (void)xPMonentsCommentTableViewCell:(XPMonentsCommentTableViewCell *)view didClickMoreReply:(MonentsCommentModel *)commentInfo {
|
||||
[self.presenter getMonentsCommentReplyList:self.monentsInfo.dynamicId commentId:commentInfo.commentId timestamp:commentInfo.replyInfo.nextTimestamp];
|
||||
}
|
||||
@@ -239,20 +295,14 @@
|
||||
- (void)xPMonentsCommentTableViewCell:(XPMonentsCommentTableViewCell *)view didClickCommon:(MonentsReplyModel *)commentInfo {
|
||||
if (commentInfo) {
|
||||
self.commentId = commentInfo.replyId;
|
||||
self.inputBarView.inputTextView.placeholder = [NSString stringWithFormat:@"%@: %@",YMLocalizedString(@"XPMonentsDetailViewController3"), commentInfo.nick];
|
||||
self.inputBarView.inputTextView.placeholder = [NSString stringWithFormat:YMLocalizedString(@"XPMonentsDetailViewController4"), commentInfo.nick];
|
||||
[self.inputBarView textViewBecomeFirstResponder];
|
||||
}
|
||||
}
|
||||
- (void)xPMonentsCommentTableViewCell:(XPMonentsCommentTableViewCell *)view didClickAvatar:(NSString *)commentInfo {
|
||||
if ([ClientConfig shareConfig].canOpen) {
|
||||
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
|
||||
userInfoVC.uid = commentInfo.integerValue;
|
||||
[self.navigationController pushViewController:userInfoVC animated:YES];
|
||||
}else{
|
||||
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
|
||||
userInfoVC.uid = commentInfo.integerValue;
|
||||
[self.navigationController pushViewController:userInfoVC animated:YES];
|
||||
}
|
||||
}
|
||||
#pragma mark - XPMonentsTableViewCellDelegate
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClickLike:(MonentsInfoModel *)monentsInfo {
|
||||
@@ -410,32 +460,38 @@
|
||||
|
||||
- (void)likeMonentsSuccess:(NSString *)dynamicId status:(BOOL)status {
|
||||
if ([self.monentsInfo.dynamicId isEqualToString:dynamicId]) {
|
||||
NSInteger count = self.monentsInfo.likeCount.integerValue;
|
||||
self.monentsInfo.isLike = status;
|
||||
if (status) {
|
||||
count += 1;
|
||||
} else {
|
||||
count -= 1;
|
||||
}
|
||||
self.monentsInfo.likeCount = [NSString stringWithFormat:@"%ld", count];
|
||||
[self.tableView reloadData];
|
||||
|
||||
|
||||
///type,0=点赞,1=删除,2=屏蔽,3=评论
|
||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kRefreshDynamicData" object:@{@"dynamicId":dynamicId,@"type":@"0",@"status":@(status)}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)replyMonentsSuccess {
|
||||
[self.presenter getMonentsCommentList:self.monentsInfo.dynamicId timestamp:@"" status:0];
|
||||
///type,0=点赞,1=删除,2=屏蔽,3=评论
|
||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kRefreshDynamicData" object:@{@"dynamicId":self.monentsInfo.dynamicId,@"type":@"3"}];
|
||||
}
|
||||
|
||||
- (void)commonMonentsSuccess {
|
||||
[self.presenter getMonentsCommentList:self.monentsInfo.dynamicId timestamp:@"" status:0];
|
||||
///type,0=点赞,1=删除,2=屏蔽,3=评论
|
||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kRefreshDynamicData" object:@{@"dynamicId":self.monentsInfo.dynamicId,@"type":@"3"}];
|
||||
}
|
||||
-(void)requesstShieldingSuccess:(NSString *)monentsInfo{
|
||||
[self hideHUD];
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsMineViewController2")];
|
||||
///type,0=点赞,1=删除,2=屏蔽,3=评论
|
||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kRefreshDynamicData" object:@{@"dynamicId":monentsInfo,@"type":@"2"}];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
|
||||
}
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo {
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsDetailViewController8")];
|
||||
///type,0=点赞,1=删除,2=屏蔽,3=评论
|
||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kRefreshDynamicData" object:@{@"dynamicId":monentsInfo,@"type":@"1"}];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMonentsDetailViewController:deleteMonents:)]) {
|
||||
[self.delegate xPMonentsDetailViewController:self deleteMonents:self.monentsInfo.dynamicId];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// YMMonentsLatestViewController.m
|
||||
// YUMI
|
||||
// XPMonentsLatestViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/18.
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsLatestViewController.h"
|
||||
@@ -10,12 +10,8 @@
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "YUMIMacroUitls.h"
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
#import "TTPopup.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "ClientConfig.h"
|
||||
///Model
|
||||
#import "MonentsListInfoModel.h"
|
||||
///P
|
||||
@@ -25,8 +21,7 @@
|
||||
#import "XPMonentsTableViewCell.h"
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
#import "XPMonentsDetailViewController.h"
|
||||
#import "XPMomentsSimpleDetailViewController.h"
|
||||
|
||||
UIKIT_EXTERN NSString *kRequestRicket;
|
||||
@interface XPMonentsLatestViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsLatestProtocol, XPMonentsTableViewCellDelegate,XPMonentsDetailViewControllerDelegate>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
@@ -43,9 +38,8 @@
|
||||
@implementation XPMonentsLatestViewController
|
||||
|
||||
-(void)dealloc{
|
||||
NSLog(@"你阿宁");
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
@@ -70,6 +64,14 @@
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(requestRicketSuccess:) name:kRequestRicket object:nil];
|
||||
}
|
||||
-(void)requestRicketSuccess:(NSNotification *)not{
|
||||
if([not.object isKindOfClass:[NSDictionary class]])return;
|
||||
BOOL is = [not.object boolValue];
|
||||
if(is == YES){
|
||||
[self headerRefresh];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - 下拉刷新
|
||||
@@ -91,11 +93,15 @@
|
||||
|
||||
#pragma mark - 刷新的fangfa
|
||||
- (void)headerRefresh {
|
||||
if([AccountInfoStorage instance].isRequestRicket == YES){
|
||||
return;
|
||||
}
|
||||
self.page = 1;
|
||||
[self.presenter getMonentsLatestListPageSize:20 dynamicId:@"" state:0];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
if([AccountInfoStorage instance].isRequestRicket == YES)return;
|
||||
if (self.hasNoMoreData) {
|
||||
[self showErrorToast:YMLocalizedString(@"XPMonentsLatestViewController0")];
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
@@ -114,8 +120,13 @@
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
[XPMonentsLayoutConfig layoutMonentsModel:monentInfo];
|
||||
if(monentInfo.squareTop && monentInfo.content.length == 0){
|
||||
return monentInfo.rowHeight + 20 ;
|
||||
}else{
|
||||
return monentInfo.rowHeight;
|
||||
}
|
||||
|
||||
}
|
||||
return KScreenHeight - kNavigationHeight - 49 - kSafeAreaBottomHeight;
|
||||
}
|
||||
|
||||
@@ -134,19 +145,11 @@
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
|
||||
if ([ClientConfig shareConfig].canOpen) {
|
||||
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
detailVC.monentsInfo = monentsInfo;
|
||||
detailVC.delegate = self;
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}else{
|
||||
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
|
||||
detailVC.monentsInfo = monentsInfo;
|
||||
detailVC.delegate = self;
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma mark - XPMonentsDetailViewControllerDelegate
|
||||
@@ -165,6 +168,10 @@
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsTableViewCellDelegate
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicShielding:(MonentsInfoModel *)monentsInfo{
|
||||
[self showLoading];
|
||||
[self.presenter requesstShieldingWtihType:@"0" objId:monentsInfo.dynamicId];
|
||||
}
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClickLike:(MonentsInfoModel *)monentsInfo {
|
||||
[self.presenter likeMonent:monentsInfo.dynamicId status:!monentsInfo.isLike likedUid:monentsInfo.uid worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
}
|
||||
@@ -244,7 +251,21 @@
|
||||
}];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
-(void)requesstShieldingSuccess:(NSString *)monentsInfo{
|
||||
[self hideHUD];
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsMineViewController2")];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.dynamicId.integerValue == monentsInfo.integerValue) {
|
||||
deleteInfo = obj;
|
||||
}
|
||||
}];
|
||||
|
||||
if (deleteInfo) {
|
||||
[self.datasource removeObject:deleteInfo];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo {
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsLatestViewController2")];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
@@ -266,7 +287,6 @@
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.contentInset = UIEdgeInsetsMake(0, 0, 100, 0);
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// YMMonentsRecommendViewController.m
|
||||
// YUMI
|
||||
// XPMonentsRecommendViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/11.
|
||||
// Created by 冯硕 on 2022/5/11.
|
||||
//
|
||||
|
||||
#import "XPMonentsRecommendViewController.h"
|
||||
@@ -10,12 +10,10 @@
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "YUMIMacroUitls.h"
|
||||
|
||||
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
#import "TTPopup.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "ClientConfig.h"
|
||||
///Model
|
||||
#import "MonentsInfoModel.h"
|
||||
#import "MonentsTopicModel.h"
|
||||
@@ -27,11 +25,11 @@
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
#import "XPMonentsRecommendHeaderView.h"
|
||||
#import "XPMonentsDetailViewController.h"
|
||||
#import "XPMomentsSimpleDetailViewController.h"
|
||||
#import "XPMonentTopicContainerViewController.h"
|
||||
#import "XPMoentsTopicListViewController.h"
|
||||
|
||||
@interface XPMonentsRecommendViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsRecommendProtocol, XPMonentsTableViewCellDelegate,XPMonentsRecommendHeaderViewDelegate, XPMonentsDetailViewControllerDelegate>
|
||||
UIKIT_EXTERN NSString *kRequestRicket;
|
||||
@interface XPMonentsRecommendViewController ()<UIGestureRecognizerDelegate,UITableViewDelegate, UITableViewDataSource,XPMonentsRecommendProtocol, XPMonentsTableViewCellDelegate,XPMonentsRecommendHeaderViewDelegate, XPMonentsDetailViewControllerDelegate>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@@ -45,7 +43,9 @@
|
||||
@end
|
||||
|
||||
@implementation XPMonentsRecommendViewController
|
||||
|
||||
-(void)dealloc{
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
}
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
@@ -64,6 +64,7 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.tableView];
|
||||
self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 100, 0);
|
||||
self.tableView.tableHeaderView = self.headerView;
|
||||
}
|
||||
|
||||
@@ -71,6 +72,17 @@
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(requestRicketSuccess:) name:kRequestRicket object:nil];
|
||||
|
||||
}
|
||||
-(void)requestRicketSuccess:(NSNotification *)not{
|
||||
if([not.object isKindOfClass:[NSDictionary class]])return;
|
||||
BOOL is = [not.object boolValue];
|
||||
if(is == YES){
|
||||
[self headerRefresh];
|
||||
}else{
|
||||
[XNDJTDDLoadingTool hideOnlyView:self.tabBarController.view];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - 下拉刷新
|
||||
@@ -92,12 +104,17 @@
|
||||
|
||||
#pragma mark - 刷新的fangfa
|
||||
- (void)headerRefresh {
|
||||
[XNDJTDDLoadingTool showOnlyView:self.tabBarController.view];
|
||||
if([AccountInfoStorage instance].isRequestRicket == YES){
|
||||
return;
|
||||
}
|
||||
self.page = 1;
|
||||
[self.presenter getMonentsRecommendList:self.page pageSize:20 state:0];
|
||||
[self.presenter getMonentsTopicList:self.page pageSize:20];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
if([AccountInfoStorage instance].isRequestRicket == YES)return;
|
||||
if (self.hasNoMoreData) {
|
||||
[self showErrorToast:YMLocalizedString(@"XPMonentsRecommendViewController0")];
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
@@ -116,8 +133,14 @@
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
[XPMonentsLayoutConfig layoutMonentsModel:monentInfo];
|
||||
|
||||
if(monentInfo.squareTop && monentInfo.content.length == 0){
|
||||
return monentInfo.rowHeight + 20 ;
|
||||
}else{
|
||||
return monentInfo.rowHeight;
|
||||
}
|
||||
|
||||
}
|
||||
return KScreenHeight - kNavigationHeight - 49 - kSafeAreaBottomHeight;
|
||||
}
|
||||
|
||||
@@ -136,20 +159,11 @@
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
|
||||
if ([ClientConfig shareConfig].canOpen) {
|
||||
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
detailVC.monentsInfo = monentsInfo;
|
||||
detailVC.delegate = self;
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}else{
|
||||
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
|
||||
detailVC.monentsInfo = monentsInfo;
|
||||
detailVC.delegate = self;
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma mark - XPMonentsDetailViewControllerDelegate
|
||||
@@ -168,12 +182,17 @@
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsTableViewCellDelegate
|
||||
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicShielding:(MonentsInfoModel *)monentsInfo{
|
||||
[self showLoading];
|
||||
[self.presenter requesstShieldingWtihType:@"0" objId:monentsInfo.dynamicId];
|
||||
}
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClickLike:(MonentsInfoModel *)monentsInfo {
|
||||
[self.presenter likeMonent:monentsInfo.dynamicId status:!monentsInfo.isLike likedUid:monentsInfo.uid worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
}
|
||||
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicDelete:(MonentsInfoModel *)monentsInfo {
|
||||
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsTopicLatestViewController1") confirmHandler:^{
|
||||
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsRecommendViewController1") confirmHandler:^{
|
||||
[self.presenter deleteMonents:monentsInfo.dynamicId worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
} cancelHandler:^{
|
||||
|
||||
@@ -231,10 +250,12 @@
|
||||
}
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
[XNDJTDDLoadingTool hideOnlyView:self.tabBarController.view];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)getMonentsRecommendListFail:(NSString *)msg state:(int)state {
|
||||
[XNDJTDDLoadingTool hideOnlyView:self.tabBarController.view];
|
||||
if (state == 0) {
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
} else {
|
||||
@@ -259,7 +280,20 @@
|
||||
}];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
-(void)requesstShieldingSuccess:(NSString *)monentsInfo{
|
||||
[self hideHUD];
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsMineViewController2")];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.dynamicId.integerValue == monentsInfo.integerValue) {
|
||||
deleteInfo = obj;
|
||||
}
|
||||
}];
|
||||
if (deleteInfo) {
|
||||
[self.datasource removeObject:deleteInfo];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo {
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsRecommendViewController2")];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
@@ -280,7 +314,6 @@
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.contentInset = UIEdgeInsetsMake(0, 0, 100, 0);
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
@@ -303,7 +336,7 @@
|
||||
|
||||
- (XPMonentsRecommendHeaderView *)headerView {
|
||||
if (!_headerView) {
|
||||
_headerView = [[XPMonentsRecommendHeaderView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 110)];
|
||||
_headerView = [[XPMonentsRecommendHeaderView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 145)];
|
||||
_headerView.delegate = self;
|
||||
}
|
||||
return _headerView;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// YMMonentsTopicLatestViewController.m
|
||||
// YUMI
|
||||
// XPMonentsTopicLatestViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/8/18.
|
||||
// Created by 冯硕 on 2022/8/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsTopicLatestViewController.h"
|
||||
@@ -10,12 +10,9 @@
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "YUMIMacroUitls.h"
|
||||
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
#import "TTPopup.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "ClientConfig.h"
|
||||
///Model
|
||||
#import "MonentsListInfoModel.h"
|
||||
///P
|
||||
@@ -25,9 +22,8 @@
|
||||
#import "XPMonentsTableViewCell.h"
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
#import "XPMonentsDetailViewController.h"
|
||||
#import "XPMomentsSimpleDetailViewController.h"
|
||||
|
||||
@interface XPMonentsTopicLatestViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsTopicLatestProtocol, XPMonentsTableViewCellDelegate, XPMonentsDetailViewControllerDelegate>
|
||||
@interface XPMonentsTopicLatestViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsTopicLatestProtocol, XPMonentsTableViewCellDelegate>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@@ -39,7 +35,9 @@
|
||||
@end
|
||||
|
||||
@implementation XPMonentsTopicLatestViewController
|
||||
|
||||
-(void)dealloc{
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
}
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
@@ -53,8 +51,87 @@
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(refreshDynamicData:) name:@"kRefreshDynamicData" object:nil];
|
||||
|
||||
}
|
||||
-(void)refreshDynamicData:(NSNotification *)not{
|
||||
NSDictionary *refreshData = not.object;
|
||||
int type = [refreshData[@"type"] intValue];
|
||||
///type,0=点赞,1=删除,2=屏蔽,3=评论
|
||||
switch (type) {
|
||||
case 0:
|
||||
{
|
||||
|
||||
NSString *dynamicId = refreshData[@"dynamicId"];
|
||||
BOOL status = [refreshData[@"status"] boolValue];
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if ([obj.dynamicId isEqualToString:dynamicId]) {
|
||||
if (status) {
|
||||
obj.isLike = YES;
|
||||
obj.likeCount = [NSString stringWithFormat:@"%ld",obj.likeCount.integerValue + 1];
|
||||
} else {
|
||||
obj.likeCount = [NSString stringWithFormat:@"%ld",(obj.likeCount.integerValue - 1 >= 0) ? (obj.likeCount.integerValue - 1) : 0];
|
||||
obj.isLike = NO;
|
||||
}
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
|
||||
[self.tableView reloadData];
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
|
||||
NSString *dynamicId = refreshData[@"dynamicId"];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.dynamicId.integerValue == dynamicId.integerValue) {
|
||||
deleteInfo = obj;
|
||||
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
|
||||
if (deleteInfo) {
|
||||
[self.datasource removeObject:deleteInfo];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
NSString *dynamicId = refreshData[@"dynamicId"];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.dynamicId.integerValue == dynamicId.integerValue) {
|
||||
deleteInfo = obj;
|
||||
*stop = YES;
|
||||
|
||||
}
|
||||
}];
|
||||
|
||||
if (deleteInfo) {
|
||||
[self.datasource removeObject:deleteInfo];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
NSString *dynamicId = refreshData[@"dynamicId"];
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if ([obj.dynamicId isEqualToString:dynamicId]) {
|
||||
obj.commentCount = [NSString stringWithFormat:@"%ld",obj.commentCount.integerValue + 1];
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
|
||||
[self.tableView reloadData];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.tableView];
|
||||
@@ -106,8 +183,12 @@
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
[XPMonentsLayoutConfig layoutMonentsModel:monentInfo];
|
||||
if(monentInfo.squareTop && monentInfo.content.length == 0){
|
||||
return monentInfo.rowHeight + 20 ;
|
||||
}else{
|
||||
return monentInfo.rowHeight;
|
||||
}
|
||||
}
|
||||
return KScreenHeight - kNavigationHeight - 49 - kSafeAreaBottomHeight;
|
||||
}
|
||||
|
||||
@@ -126,23 +207,17 @@
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
|
||||
if ([ClientConfig shareConfig].canOpen) {
|
||||
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
detailVC.monentsInfo = monentsInfo;
|
||||
detailVC.delegate = self;
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}else{
|
||||
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
detailVC.monentsInfo = monentsInfo;
|
||||
detailVC.delegate = self;
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma mark - XPMonentsTableViewCellDelegate
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicShielding:(MonentsInfoModel *)monentsInfo{
|
||||
[self showLoading];
|
||||
[self.presenter requesstShieldingWtihType:@"0" objId:monentsInfo.dynamicId];
|
||||
}
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClickLike:(MonentsInfoModel *)monentsInfo {
|
||||
[self.presenter likeMonent:monentsInfo.dynamicId status:!monentsInfo.isLike likedUid:monentsInfo.uid worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
}
|
||||
@@ -186,20 +261,7 @@
|
||||
self.scrollCallback(scrollView);
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsDetailViewControllerDelegate
|
||||
- (void)xPMonentsDetailViewController:(XPMonentsDetailViewController *)view deleteMonents:(NSString *)dynamicId {
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.dynamicId.integerValue == dynamicId.integerValue) {
|
||||
deleteInfo = obj;
|
||||
}
|
||||
}];
|
||||
|
||||
if (deleteInfo) {
|
||||
[self.datasource removeObject:deleteInfo];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsTopicLatestProtocol
|
||||
- (void)getMonentsTopicLatestListSuccess:(MonentsListInfoModel *)listInfo state:(int)state{
|
||||
@@ -234,32 +296,21 @@
|
||||
}
|
||||
|
||||
- (void)likeMonentsSuccess:(NSString *)dynamicId status:(BOOL)status {
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if ([obj.dynamicId isEqualToString:dynamicId]) {
|
||||
if (status) {
|
||||
obj.isLike += 1;
|
||||
} else {
|
||||
obj.isLike -= 1;
|
||||
}
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
///type,0=点赞,1=删除,2=屏蔽,3=评论
|
||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kRefreshDynamicData" object:@{@"dynamicId":dynamicId,@"type":@"0",@"status":@(status)}];
|
||||
}
|
||||
- (void)requesstShieldingSuccess:(NSString *)monentsInfo{
|
||||
[self hideHUD];
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsMineViewController2")];
|
||||
///type,0=点赞,1=删除,2=屏蔽,3=评论
|
||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kRefreshDynamicData" object:@{@"dynamicId":monentsInfo,@"type":@"2"}];
|
||||
}
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo {
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsTopicLatestViewController2")];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.dynamicId.integerValue == monentsInfo.integerValue) {
|
||||
deleteInfo = obj;
|
||||
}
|
||||
}];
|
||||
///type,0=点赞,1=删除,2=屏蔽,3=评论
|
||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kRefreshDynamicData" object:@{@"dynamicId":monentsInfo,@"type":@"1"}];
|
||||
|
||||
if (deleteInfo) {
|
||||
[self.datasource removeObject:deleteInfo];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// YMMonentsTopicRecommondViewController.m
|
||||
// YUMI
|
||||
// XPMonentsTopicRecommondViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/8/18.
|
||||
// Created by 冯硕 on 2022/8/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsTopicRecommondViewController.h"
|
||||
@@ -10,12 +10,9 @@
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "YUMIMacroUitls.h"
|
||||
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
#import "TTPopup.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "ClientConfig.h"
|
||||
///Model
|
||||
#import "MonentsListInfoModel.h"
|
||||
///P
|
||||
@@ -25,7 +22,6 @@
|
||||
#import "XPMonentsTableViewCell.h"
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
#import "XPMonentsDetailViewController.h"
|
||||
#import "XPMomentsSimpleDetailViewController.h"
|
||||
|
||||
@interface XPMonentsTopicRecommondViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsTopicRecommendProtocol, XPMonentsTableViewCellDelegate, XPMonentsDetailViewControllerDelegate>
|
||||
///列表
|
||||
@@ -106,8 +102,12 @@
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsInfoModel * monentInfo= [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
[XPMonentsLayoutConfig layoutMonentsModel:monentInfo];
|
||||
if(monentInfo.squareTop && monentInfo.content.length == 0){
|
||||
return monentInfo.rowHeight + 20 ;
|
||||
}else{
|
||||
return monentInfo.rowHeight;
|
||||
}
|
||||
}
|
||||
return KScreenHeight - kNavigationHeight - 49 - kSafeAreaBottomHeight;
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
cell.delegate = self;
|
||||
cell.isTopic = YES;
|
||||
cell.monentsInfo = monentsInfo;
|
||||
return cell;
|
||||
}
|
||||
@@ -126,24 +127,16 @@
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
|
||||
if ([ClientConfig shareConfig].canOpen) {
|
||||
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
detailVC.monentsInfo = monentsInfo;
|
||||
detailVC.delegate = self;
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}else{
|
||||
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
detailVC.monentsInfo = monentsInfo;
|
||||
detailVC.delegate = self;
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsDetailViewControllerDelegate
|
||||
|
||||
- (void)xPMonentsDetailViewController:(XPMonentsDetailViewController *)view deleteMonents:(NSString *)dynamicId {
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
@@ -159,12 +152,16 @@
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsTableViewCellDelegate
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicShielding:(MonentsInfoModel *)monentsInfo{
|
||||
[self showLoading];
|
||||
[self.presenter requesstShieldingWtihType:@"0" objId:monentsInfo.dynamicId];
|
||||
}
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClickLike:(MonentsInfoModel *)monentsInfo {
|
||||
[self.presenter likeMonent:monentsInfo.dynamicId status:!monentsInfo.isLike likedUid:monentsInfo.uid worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
}
|
||||
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicDelete:(MonentsInfoModel *)monentsInfo {
|
||||
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsTopicLatestViewController1") confirmHandler:^{
|
||||
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsTopicRecommondViewController1") confirmHandler:^{
|
||||
[self.presenter deleteMonents:monentsInfo.dynamicId worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
} cancelHandler:^{
|
||||
|
||||
@@ -247,7 +244,21 @@
|
||||
}];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
-(void)requesstShieldingSuccess:(NSString *)monentsInfo{
|
||||
[self hideHUD];
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsMineViewController2")];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.dynamicId.integerValue == monentsInfo.integerValue) {
|
||||
deleteInfo = obj;
|
||||
}
|
||||
}];
|
||||
|
||||
if (deleteInfo) {
|
||||
[self.datasource removeObject:deleteInfo];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
- (void)deleteMonentsSuccess:(NSString *)monentsInfo {
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMonentsTopicRecommondViewController2")];
|
||||
__block MonentsInfoModel * deleteInfo;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// YMMonentsViewController.m
|
||||
// YUMI
|
||||
// XPMonentsViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by YUMI on 2022/5/11.
|
||||
// Created by 冯硕 on 2022/5/11.
|
||||
//
|
||||
|
||||
#import "XPMonentsViewController.h"
|
||||
@@ -11,9 +11,7 @@
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "YUMIMacroUitls.h"
|
||||
|
||||
///Tool
|
||||
#import "AttachMentModel.h"
|
||||
#import "MonentsUnReadModel.h"
|
||||
@@ -24,7 +22,8 @@
|
||||
#import "XPMonentsInteractiveViewController.h"
|
||||
#import "XPMonentsPublishViewController.h"
|
||||
|
||||
@interface XPMonentsViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
|
||||
|
||||
@interface XPMonentsViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate,NIMSystemNotificationManagerDelegate>
|
||||
///标题
|
||||
@property (nonatomic,strong) NSArray<NSString *> *titles;
|
||||
///导航栏
|
||||
@@ -36,6 +35,7 @@
|
||||
///滑块
|
||||
@property (nonatomic,strong) JXCategoryTitleView *titleView;
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
|
||||
|
||||
///发布的按钮
|
||||
@property (nonatomic,strong) UIButton *publishButton;
|
||||
///关注
|
||||
@@ -47,7 +47,6 @@
|
||||
@end
|
||||
|
||||
@implementation XPMonentsViewController
|
||||
@synthesize parentMode = _parentMode;
|
||||
|
||||
- (void)dealloc {
|
||||
[[NIMSDK sharedSDK].systemNotificationManager removeDelegate:self];
|
||||
@@ -73,6 +72,7 @@
|
||||
[self.navView addSubview:self.titleView];
|
||||
[self.navView addSubview:self.messageButton];
|
||||
[self.navView addSubview:self.dotView];
|
||||
self.dotView.hidden = self.tabBarItem.badgeValue == 0;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -83,8 +83,8 @@
|
||||
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.navView);
|
||||
make.height.mas_equalTo(20);
|
||||
make.top.mas_equalTo(self.navView).offset(kSafeAreaTopHeight + 40);
|
||||
make.height.mas_equalTo(45);
|
||||
make.top.mas_equalTo(self.navView).offset(kSafeAreaTopHeight + 20);
|
||||
}];
|
||||
|
||||
[self.messageButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -106,8 +106,8 @@
|
||||
|
||||
[self.publishButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(45, 45));
|
||||
make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight - 60);
|
||||
make.right.mas_equalTo(self.view).offset(-25);
|
||||
make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight - 30);
|
||||
make.right.mas_equalTo(self.view).offset(-15);
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
return self.titles.count;
|
||||
}
|
||||
|
||||
|
||||
// 根据下标 index 返回对应遵守并实现 `JXCategoryListContentViewDelegate` 协议的列表实例
|
||||
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
|
||||
UIViewController<JXCategoryListContentViewDelegate> * list = (UIViewController<JXCategoryListContentViewDelegate> *)[self.listContainerView.validListDict objectForKey:[NSNumber numberWithInteger:index]];
|
||||
@@ -191,19 +192,24 @@
|
||||
_titleView.delegate = self;
|
||||
_titleView.titleColor = [DJDKMIMOMColor secondTextColor];
|
||||
_titleView.titleSelectedColor = [DJDKMIMOMColor mainTextColor];
|
||||
_titleView.titleFont = [UIFont systemFontOfSize:15 weight:UIFontWeightSemibold];
|
||||
_titleView.titleSelectedFont = [UIFont systemFontOfSize:20 weight:UIFontWeightHeavy];
|
||||
_titleView.titleFont = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_titleView.titleSelectedFont = [UIFont systemFontOfSize:22 weight:UIFontWeightHeavy];
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.averageCellSpacingEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
_titleView.cellSpacing = 20;
|
||||
_titleView.cellSpacing = 26;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.listContainer = self.listContainerView;
|
||||
_titleView.defaultSelectedIndex = 1;
|
||||
CGFloat itemWidth = [YMLocalizedString(@"XPMonentsViewController0") boundingRectWithSize:CGSizeMake(100, CGFLOAT_MAX) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:20 weight:UIFontWeightHeavy]} context:nil].size.width;
|
||||
_titleView.cellWidth = itemWidth;
|
||||
_titleView.contentEdgeInsetLeft = (KScreenWidth - itemWidth * self.titles.count - 20 * (self.titles.count - 1))/ 2;
|
||||
_titleView.contentEdgeInsetLeft = 15;
|
||||
|
||||
JXCategoryIndicatorImageView *lineView = [[JXCategoryIndicatorImageView alloc] init];
|
||||
lineView.indicatorImageViewSize = CGSizeMake(45, 10);
|
||||
lineView.verticalMargin = 7;
|
||||
lineView.indicatorImageView.image = [UIImage imageNamed:@"mine_dynamic"];
|
||||
_titleView.indicators = @[lineView];
|
||||
|
||||
}
|
||||
return _titleView;
|
||||
}
|
||||
@@ -276,4 +282,5 @@
|
||||
return _recommendVC;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@@ -40,4 +40,5 @@
|
||||
#import <MJExtension/MJExtension.h>
|
||||
#import "StatisticsServiceHelper.h"
|
||||
#import "YUMIConstant.h"
|
||||
#import "YUMINNNN.h"
|
||||
#endif /* PrefixHeader_pch */
|
||||
|
@@ -89,11 +89,12 @@
|
||||
"PLTimeUtil3" = "yyyy年MM月";
|
||||
"PLTimeUtil4" = "MM月dd日";
|
||||
|
||||
"NSString_Utils0" = "%@万";
|
||||
"NSString_Utils1" = "MM月dd日";
|
||||
"NSString_Utils2" = "YYYY年MM月dd日";
|
||||
"NSString_Utils3" = "刚刚";
|
||||
"NSString_Utils4" = "%ld分钟前";
|
||||
///NSString+Utils.m
|
||||
"NSString_Utils0" = "MM月dd日";
|
||||
"NSString_Utils1" = "YYYY年MM月dd日";
|
||||
"NSString_Utils2" = "刚刚";
|
||||
"NSString_Utils3" = "%ld分钟前";
|
||||
"NSString_Utils4" = "%@万";
|
||||
|
||||
"QEmotionBoardView0" = "发送";
|
||||
|
||||
@@ -2007,8 +2008,10 @@
|
||||
"XPMonentsAttentionViewController1" = "删除后不可恢复\n确定删除该动态吗";
|
||||
"XPMonentsAttentionViewController2" = "删除成功";
|
||||
|
||||
"XPMonentsMineViewController0" = "删除后不可恢复\n确定删除该动态吗";
|
||||
///XPMonentsMineViewController.m
|
||||
"XPMonentsMineViewController0" = "删除后不可恢复\n确定删除该动态吗?";
|
||||
"XPMonentsMineViewController1" = "删除成功";
|
||||
"XPMonentsMineViewController2" = "屏蔽成功";
|
||||
|
||||
"XPMonentsViewController0" = "推荐";
|
||||
"XPMonentsViewController1" = "关注";
|
||||
@@ -2017,25 +2020,31 @@
|
||||
|
||||
"XPMonentsRecommendHeaderView0" = "推荐话题";
|
||||
|
||||
"XPMonentsContentView0" = "展开";
|
||||
"XPMonentsContentView1" = "收起";
|
||||
///XPMonentsContentView.m
|
||||
"XPMonentsContentView0" = "置顶 ";
|
||||
"XPMonentsContentView1" = "展开";
|
||||
"XPMonentsContentView2" = "收起";
|
||||
|
||||
"XPMoentsTopicListView0" = "没有更多数据了";
|
||||
|
||||
"XPMonentsPublishTopicView0" = "添加话题";
|
||||
"XPMonentsPublishTopicView1" = "重新选择";
|
||||
|
||||
"XPMonentsUserInfoView0" = "直播中";
|
||||
///XPMonentsUserInfoView.m
|
||||
"XPMonentsUserInfoView0" = "删除";
|
||||
"XPMonentsUserInfoView1" = "举报";
|
||||
"XPMonentsUserInfoView2" = "直播中";
|
||||
|
||||
///XPMonentsTooBarView.m
|
||||
"XPMonentsTooBarView0" = "删除";
|
||||
"XPMonentsTooBarView1" = "举报";
|
||||
"XPMonentsTooBarView2" = "您的请求我们已经收到,我们将儘快处理";
|
||||
"XPMonentsTooBarView3" = "好友";
|
||||
"XPMonentsTooBarView4" = "朋友圈";
|
||||
"XPMonentsTooBarView5" = "微信好友";
|
||||
"XPMonentsTooBarView6" = "QQ好友";
|
||||
"XPMonentsTooBarView7" = "QQ空间";
|
||||
"XPMonentsTooBarView8" = "%@发佈了一条动态";
|
||||
"XPMonentsTooBarView1" = "举报动态或用户";
|
||||
"XPMonentsTooBarView2" = "好友";
|
||||
"XPMonentsTooBarView3" = "朋友圈";
|
||||
"XPMonentsTooBarView4" = "微信好友";
|
||||
"XPMonentsTooBarView5" = "QQ好友";
|
||||
"XPMonentsTooBarView6" = "QQ空间";
|
||||
"XPMonentsTooBarView7" = "%@发布了一条动态";
|
||||
"XPMonentsTooBarView8" = "屏蔽动态";
|
||||
|
||||
"XPMonentPublishSuccessView0" = "审核中";
|
||||
"XPMonentPublishSuccessView1" = "咻,收到小可爱的动态了呢~\n审核通过后小秘书会帮你发送并通知你哦";
|
||||
@@ -2212,7 +2221,7 @@
|
||||
"LoginVerifCodeViewController4" = "重新获取";
|
||||
|
||||
"XPLoginViewController11" = "同意隐私政策和用户协议后,才可以注册登录哦~";
|
||||
"XPMonentsMineViewController2" = "删除后不可恢複\n确定删除该动态吗?";
|
||||
|
||||
|
||||
|
||||
"PKLoginViewController1" = "同意隐私政策和用户协议后,才可以注册登录哦~";
|
||||
|
@@ -89,11 +89,12 @@
|
||||
"PLTimeUtil3" = "yyyy年MM月";
|
||||
"PLTimeUtil4" = "MM月dd日";
|
||||
|
||||
"NSString_Utils0" = "%@萬";
|
||||
"NSString_Utils1" = "MM月dd日";
|
||||
"NSString_Utils2" = "YYYY年MM月dd日";
|
||||
"NSString_Utils3" = "剛剛";
|
||||
"NSString_Utils4" = "%ld分鐘前";
|
||||
///NSString+Utils.m
|
||||
"NSString_Utils0" = "MM月dd日";
|
||||
"NSString_Utils1" = "YYYY年MM月dd日";
|
||||
"NSString_Utils2" = "剛剛";
|
||||
"NSString_Utils3" = "%ld分鐘前";
|
||||
"NSString_Utils4" = "%@萬";
|
||||
|
||||
"QEmotionBoardView0" = "發送";
|
||||
|
||||
@@ -2014,8 +2015,10 @@
|
||||
"XPMonentsAttentionViewController1" = "刪除後不可恢復\n確定刪除該動態嗎";
|
||||
"XPMonentsAttentionViewController2" = "刪除成功";
|
||||
|
||||
"XPMonentsMineViewController0" = "刪除後不可恢復\n確定刪除該動態嗎";
|
||||
///XPMonentsMineViewController.m
|
||||
"XPMonentsMineViewController0" = "刪除後不可恢復\n確定刪除該動態嗎?";
|
||||
"XPMonentsMineViewController1" = "刪除成功";
|
||||
"XPMonentsMineViewController2" = "屏蔽成功";
|
||||
|
||||
"XPMonentsViewController0" = "推薦";
|
||||
"XPMonentsViewController1" = "關註";
|
||||
@@ -2024,25 +2027,31 @@
|
||||
|
||||
"XPMonentsRecommendHeaderView0" = "推薦話題";
|
||||
|
||||
"XPMonentsContentView0" = "展開";
|
||||
"XPMonentsContentView1" = "收起";
|
||||
///XPMonentsContentView.m
|
||||
"XPMonentsContentView0" = "置頂 ";
|
||||
"XPMonentsContentView1" = "展開";
|
||||
"XPMonentsContentView2" = "收起";
|
||||
|
||||
"XPMoentsTopicListView0" = "沒有更多數據了";
|
||||
|
||||
"XPMonentsPublishTopicView0" = "添加話題";
|
||||
"XPMonentsPublishTopicView1" = "重新選擇";
|
||||
|
||||
"XPMonentsUserInfoView0" = "直播中";
|
||||
///XPMonentsUserInfoView.m
|
||||
"XPMonentsUserInfoView0" = "刪除";
|
||||
"XPMonentsUserInfoView1" = "舉報";
|
||||
"XPMonentsUserInfoView2" = "直播中";
|
||||
|
||||
///XPMonentsTooBarView.m
|
||||
"XPMonentsTooBarView0" = "刪除";
|
||||
"XPMonentsTooBarView1" = "舉報";
|
||||
"XPMonentsTooBarView2" = "您的請求我們已經收到,我們將儘快處理";
|
||||
"XPMonentsTooBarView3" = "好友";
|
||||
"XPMonentsTooBarView4" = "朋友圈";
|
||||
"XPMonentsTooBarView5" = "微信好友";
|
||||
"XPMonentsTooBarView6" = "QQ好友";
|
||||
"XPMonentsTooBarView7" = "QQ空間";
|
||||
"XPMonentsTooBarView8" = "%@發佈了一條動態";
|
||||
"XPMonentsTooBarView1" = "舉報動態或用戶";
|
||||
"XPMonentsTooBarView2" = "好友";
|
||||
"XPMonentsTooBarView3" = "朋友圈";
|
||||
"XPMonentsTooBarView4" = "微信好友";
|
||||
"XPMonentsTooBarView5" = "QQ好友";
|
||||
"XPMonentsTooBarView6" = "QQ空間";
|
||||
"XPMonentsTooBarView7" = "%@發佈了一條動態";
|
||||
"XPMonentsTooBarView8" = "屏蔽動態";
|
||||
|
||||
"XPMonentPublishSuccessView0" = "審核中";
|
||||
"XPMonentPublishSuccessView1" = "咻,收到小可愛的動態了呢~\n審核通過後小秘書會幫你發送並通知你哦";
|
||||
@@ -2218,7 +2227,7 @@
|
||||
"LoginVerifCodeViewController4" = "重新獲取";
|
||||
|
||||
"XPLoginViewController11" = "同意隱私政策和用戶協議後,才可以註冊登錄哦~";
|
||||
"XPMonentsMineViewController2" = "刪除後不可恢複\n確定刪除該動態嗎?";
|
||||
|
||||
|
||||
|
||||
"PKLoginViewController1" = "同意隱私政策和用戶協議後,才可以註冊登錄哦~";
|
||||
|