Commit 477ce416 by ludi

Merge branch 'feature/UI修改版本' of http://git.yabolive.net:88/pidan/FuSiLive into feature/UI修改版本

parents 7c42d59c 8c41982c
Showing with 429 additions and 69 deletions
......@@ -63,4 +63,6 @@
/// @param formatDict 字符串格式字典
+ (NSString *)fus_stringWithDictFormat:(NSString *)format formatDict:(NSDictionary<NSString *, NSString *> *)formatDict;
- (NSString *)fus_adaptFusiString;
@end
......@@ -135,4 +135,43 @@
return format;
}
- (NSString *)fus_adaptFusiString {
NSString *result = self;
if ([result containsString:@"螢火蟲直播"]) {
result = [result stringByReplacingOccurrencesOfString:@"螢火蟲直播" withString:@"福絲直播"];
}
if ([result containsString:@"螢火蟲"]) {
result = [result stringByReplacingOccurrencesOfString:@"螢火蟲" withString:@"福絲"];
}
if ([result containsString:@"firefly live"]) {
result = [result stringByReplacingOccurrencesOfString:@"firefly live" withString:@"fusi live"];
}
if ([result containsString:@"firefly"]) {
result = [result stringByReplacingOccurrencesOfString:@"firefly" withString:@"fusi"];
}
if ([result containsString:@"Firefly Live"]) {
result = [result stringByReplacingOccurrencesOfString:@"Firefly Live" withString:@"Fusi Live"];
}
if ([result containsString:@"Firefly"]) {
result = [result stringByReplacingOccurrencesOfString:@"Firefly" withString:@"Fusi"];
}
if ([result containsString:@"FIREFLY LIVE"]) {
result = [result stringByReplacingOccurrencesOfString:@"FIREFLY LIVE" withString:@"FUSI LIVE"];
}
if ([result containsString:@"FIREFLY"]) {
result = [result stringByReplacingOccurrencesOfString:@"FIREFLY" withString:@"FUSI"];
}
return result;
}
@end
......@@ -160,7 +160,11 @@
if (code == 1) {
if (success) success(dataDict, code);
}else{
if (failure) failure(dataDict, code);
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:dataDict];
if (![NSString isNullWithString:dict[@"msg"]]) {
dict[@"msg"] = [(NSString *)dict[@"msg"] fus_adaptFusiString];
}
if (failure) failure([dict copy], code);
}
} failure:^(NSURLSessionDataTask *operation, NSError *error) {
......@@ -250,7 +254,11 @@
if (code == 1) {
if (success) success(dataDict, code);
}else{
if (failure) failure(dataDict, code);
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:dataDict];
if (![NSString isNullWithString:dict[@"msg"]]) {
dict[@"msg"] = [(NSString *)dict[@"msg"] fus_adaptFusiString];
}
if (failure) failure([dict copy], code);
}
} failure:^(NSURLSessionDataTask *operation, NSError *error) {
......@@ -361,7 +369,12 @@
if (code == 1) {
if (success) success(dataDict, code);
}else{
if (failure) failure(dataDict, code);
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:dataDict];
if (![NSString isNullWithString:dict[@"msg"]]) {
dict[@"msg"] = [(NSString *)dict[@"msg"] fus_adaptFusiString];
}
if (failure) failure([dict copy], code);
}
} failure:^(NSURLSessionDataTask *operation, NSError *error) {
......@@ -499,7 +512,12 @@
if (code == 1) {
if (success) success(dataDict, code);
}else{
if (failure) failure(dataDict, code);
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:dataDict];
if (![NSString isNullWithString:dict[@"msg"]]) {
dict[@"msg"] = [(NSString *)dict[@"msg"] fus_adaptFusiString];
}
if (failure) failure([dict copy], code);
}
} failure:^(NSURLSessionDataTask *operation, NSError *error) {
if (retryTimes > 0) {
......@@ -1358,6 +1376,7 @@ NSString *decimalNumberWithDouble(double conversionValue){
if ([jsonStr hasPrefix:@"\""]){
jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@"\\\""withString:@"\""];
jsonStr = [jsonStr substringWithRange:NSMakeRange(1, [jsonStr length] - 2)];
if ([NSDictionary isNull:[jsonStr converToDictionary]]) {
NSString *temp = [[ObfuseTableBase64 inst] decode:jsonStr];
if (temp) {
......@@ -1387,6 +1406,7 @@ NSString *decimalNumberWithDouble(double conversionValue){
jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@"\r"withString:@""];
jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@"\n"withString:@""];
jsonStr = [jsonStr stringByReplacingOccurrencesOfString:@"\t"withString:@""];
jsonStr = [jsonStr fus_adaptFusiString];
// 将JSON字符串转换为字典
NSData *jsonData = [jsonStr dataUsingEncoding:NSUTF8StringEncoding];
......@@ -1453,6 +1473,8 @@ NSString *decimalNumberWithDouble(double conversionValue){
}
}
jsonStr = [jsonStr fus_adaptFusiString];
// 将JSON字符串转换为字典
NSData *jsonData = [jsonStr dataUsingEncoding:NSUTF8StringEncoding];
if ([NSData isNull:jsonData])
......
......@@ -117,38 +117,6 @@ static dispatch_queue_t get_status_queue() {
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// NSString *document = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingString:@"/ATest"];
// [FUSFileHelper createDirectoryAtPath:document];
//
// for (NSInteger i = 1; i <= 99;i++) {
// NSString *filePath = [document stringByAppendingPathComponent:[NSString stringWithFormat:@"fus_time_level_%zd.png",i]];
//
// if (![FUSFileHelper fus_isExistFileAtPath:filePath]) {
// CGFloat width = 20;
//
// /// 生成等级图片。保存在本地,然后再将路径加入HTML里面
// UILabel *timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, width, 14)];
// timeLabel.text = @(i).stringValue;
// timeLabel.backgroundColor = [UIColor colorWithWhite:1 alpha:0.32];
// timeLabel.textColor = [UIColor whiteColor];
// timeLabel.font = [UIFont fus_themeFont:9];
// timeLabel.layer.cornerRadius = 7;
// timeLabel.textAlignment = NSTextAlignmentCenter;
// timeLabel.layer.masksToBounds = YES;
//
// UIGraphicsBeginImageContextWithOptions(timeLabel.bounds.size, NO, [UIScreen mainScreen].scale);
// [timeLabel drawViewHierarchyInRect:timeLabel.bounds afterScreenUpdates:YES];
// UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();
// UIGraphicsEndImageContext();
//
// if (screenImage) {
// NSData *imageData = UIImagePNGRepresentation(screenImage);
// [FUSFileHelper fus_writeDataToFile:imageData filePath:filePath];
// }
// }
// }
[FUSConfig fus_setUpFusiLiveConfigs];
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
......
......@@ -96,7 +96,7 @@
}
}
_languageContent = [FUSFormatContentHelper fus_replaceFusiLevelImg:_languageContent];
_languageContent = [FUSFormatContentHelper fus_replaceFusiLevelImg:_languageContent whiteBg:YES];
return _languageContent;
}
......
......@@ -51,14 +51,8 @@
}
}
_languageContent = [FUSFormatContentHelper fus_replaceFusiLevelImg:_languageContent];
/// 在主包里面,是黑底白字的。但是在首页是白底黑字的,所以强制吧首页广播的白色改成黑色:added by pidan
if ([_languageContent containsString:@"FFFFFF"]) {
_languageContent = [_languageContent stringByReplacingOccurrencesOfString:@"FFFFFF" withString:@"000000"];
}
if ([_languageContent containsString:@"ffffff"]) {
_languageContent = [_languageContent stringByReplacingOccurrencesOfString:@"ffffff" withString:@"000000"];
}
_languageContent = [FUSFormatContentHelper fus_replaceFusiLevelImg:_languageContent whiteBg:YES];
return _languageContent;
}
......@@ -76,7 +70,7 @@
dispatch_async(dispatch_get_global_queue(0, 0), ^{
self.attr = [NSMutableAttributedString fus_attributeStringWithHTMLString:self.languageContent baseColor:@"222222" font:[UIFont fus_themeFont:13] needRTLTransfer:FUSRTL.isRTL imgHeight:33 imgWidth:33];
self.attr = [NSMutableAttributedString fus_attributeStringWithHTMLString:self.languageContent baseColor:@"222222" font:[UIFont fus_themeFont:13] needRTLTransfer:FUSRTL.isRTL imgHeight:15 imgWidth:0];
dispatch_async(dispatch_get_main_queue(), ^{
if (completed) {
......
......@@ -27,7 +27,7 @@
[largeLotAnimView.topAnchor constraintEqualToAnchor:self.topAnchor].active = YES;
[largeLotAnimView.leadingAnchor constraintEqualToAnchor:self.leadingAnchor].active = YES;
[largeLotAnimView.bottomAnchor constraintEqualToAnchor:self.bottomAnchor constant:-(UIView.fus_SafeBottom + UIView.fus_SafeTop)].active = YES;
[largeLotAnimView.bottomAnchor constraintEqualToAnchor:self.bottomAnchor].active = YES;
[largeLotAnimView.trailingAnchor constraintEqualToAnchor:self.trailingAnchor].active = YES;
largeLotAnimView.contentMode = UIViewContentModeScaleAspectFill;
......@@ -73,7 +73,7 @@
[largeLotAnimView.topAnchor constraintEqualToAnchor:self.topAnchor].active = YES;
[largeLotAnimView.leadingAnchor constraintEqualToAnchor:self.leadingAnchor].active = YES;
[largeLotAnimView.bottomAnchor constraintEqualToAnchor:self.bottomAnchor].active = YES;
[largeLotAnimView.bottomAnchor constraintEqualToAnchor:self.bottomAnchor].active = YES;
[largeLotAnimView.trailingAnchor constraintEqualToAnchor:self.trailingAnchor].active = YES;
CompatibleAnimationKeypath *largePath = [[CompatibleAnimationKeypath alloc] initWithKeys:@[@"右边图片.png"]];
......
......@@ -262,9 +262,9 @@
- (void)setupUI
{
if (_from == FUSFromInvitShare) {
self.btnArr = @[@(FacebookPlatform), @(TwitterPlatform), @(WechatFriendPlatform), @(WechatCirclePaltform), @(LineSharePlatform), @(WhatsAppPlatform), @(CopyLink),@(BarcodePhotoPlatform)];
self.btnArr = @[@(FacebookPlatform), @(TwitterPlatform), /*@(WechatFriendPlatform), @(WechatCirclePaltform),*/ @(LineSharePlatform), @(WhatsAppPlatform), @(CopyLink),@(BarcodePhotoPlatform)];
} else {
self.btnArr = @[@(FacebookPlatform), @(TwitterPlatform), @(WechatFriendPlatform), @(WechatCirclePaltform), @(LineSharePlatform), @(WhatsAppPlatform), @(CopyLink)];
self.btnArr = @[@(FacebookPlatform), @(TwitterPlatform), /*@(WechatFriendPlatform), @(WechatCirclePaltform),*/ @(LineSharePlatform), @(WhatsAppPlatform), @(CopyLink)];
}
if (_from == FUSFromInvitShare) {
......
......@@ -73,6 +73,7 @@
case CID_OFFICIAL_MESSAGE: // 官方推送消息
{
NSMutableArray *officialModelArray = [NSMutableArray arrayWithArray:self.classifyMessageDict[OFFICIAL_MESSAGE]];
[messageModel.jsondata fus_adaptFusiString];
[officialModelArray addObject:messageModel];
[self.classifyMessageDict setObject:officialModelArray forKey:OFFICIAL_MESSAGE];
_msgCount++;
......
......@@ -60,7 +60,7 @@
self.time = time;
self.extend1 = extend1;
self.extend2 = extend2;
self.jsondata = jsondata;
self.jsondata = [jsondata fus_adaptFusiString];
}
return self;
}
......
......@@ -336,6 +336,7 @@
- (NSMutableAttributedString *)handleGiftDescription:(FUSChatGiftDataModel *)chatGiftDataModel {
if (chatGiftDataModel.giftdesc) {
chatGiftDataModel.giftdesc = [chatGiftDataModel.giftdesc fus_adaptFusiString];
NSString *firstStr = [chatGiftDataModel.giftdesc stringByReplacingOccurrencesOfString:@"{giftname}" withString:@""];
NSString *bonds = [NSString stringWithFormat:@"%ld",chatGiftDataModel.giveprice.integerValue];
NSString *secondStr = [firstStr stringByReplacingOccurrencesOfString:@"{bonds}" withString:bonds];
......
......@@ -480,6 +480,9 @@ if (@available(iOS 11.0, *)) {height = 290 + UIView.fus_SafeBottom;}\
- (NSMutableAttributedString *)handleGiftDescription:(FUSChatConversationGiftDataModel *)chatGiftDataModel {
if (![FUSChatConversationGiftDataModel fus_isNullWithModel:chatGiftDataModel] && chatGiftDataModel.giftdesc) {
chatGiftDataModel.giftdesc = [chatGiftDataModel.giftdesc fus_adaptFusiString];
NSString *firstStr = [chatGiftDataModel.giftdesc stringByReplacingOccurrencesOfString:@"{giftname}" withString:@""];
NSString *bonds = [NSString stringWithFormat:@"%ld",chatGiftDataModel.giveprice.integerValue];
NSString *secondStr = [firstStr stringByReplacingOccurrencesOfString:@"{bonds}" withString:bonds];
......
......@@ -33,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN
+ (NSString *)fus_replaceFusiLevelImg:(NSString *)content;
+ (NSString *)fus_replaceFusiLevelImg:(NSString *)content whiteBg:(BOOL)whiteBg;
@end
NS_ASSUME_NONNULL_END
......@@ -338,11 +338,25 @@
}
+ (NSString *)fus_replaceFusiLevelImg:(NSString *)content {
return [self fus_replaceFusiLevelImg:content whiteBg:NO];
}
+ (NSString *)fus_replaceFusiLevelImg:(NSString *)content whiteBg:(BOOL)whiteBg {
if ([NSString isNull:content]) {
return content;
}
if (whiteBg) {
/// 在主包里面,是黑底白字的。但是在首页是白底黑字的,所以强制吧首页广播的白色改成黑色:added by pidan
if ([content containsString:@"FFFFFF"]) {
content = [content stringByReplacingOccurrencesOfString:@"FFFFFF" withString:@"000000"];
}
if ([content containsString:@"ffffff"]) {
content = [content stringByReplacingOccurrencesOfString:@"ffffff" withString:@"000000"];
}
}
//fusi_img:图片
//fusi_font:文字颜色
//fusi_del:删除标签
......@@ -415,6 +429,9 @@
continue;
} else {
NSString *path = [NSString stringWithFormat:@"<img src=https://big.bgp.ourpow.com/comm/userlevel/fusi/TimeLevels/fus_time_level_%zd.png />",level];
if (whiteBg) {
path = [NSString stringWithFormat:@"<img src=https://big.bgp.ourpow.com/comm/userlevel/fusi/TimeLevels/fus_time_gray_level_%zd.png />",level];
}
content = [content stringByReplacingCharactersInRange:result.range withString:path];
}
}
......@@ -439,4 +456,66 @@
return content;
}
+ (void)fus_createLevelImgs {
// NSString *document = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingString:@"/ATest"];
// [FUSFileHelper createDirectoryAtPath:document];
//
// for (NSInteger i = 1; i <= 99;i++) {
// NSString *filePath = [document stringByAppendingPathComponent:[NSString stringWithFormat:@"fus_time_level_%zd.png",i]];
//
// if (![FUSFileHelper fus_isExistFileAtPath:filePath]) {
// CGFloat width = 20;
//
// /// 生成等级图片。保存在本地,然后再将路径加入HTML里面
// UILabel *timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, width, 14)];
// timeLabel.text = @(i).stringValue;
// timeLabel.backgroundColor = [UIColor colorWithWhite:1 alpha:0.32];
// timeLabel.textColor = [UIColor whiteColor];
// timeLabel.font = [UIFont fus_themeFont:9];
// timeLabel.layer.cornerRadius = 7;
// timeLabel.textAlignment = NSTextAlignmentCenter;
// timeLabel.layer.masksToBounds = YES;
//
// UIGraphicsBeginImageContextWithOptions(timeLabel.bounds.size, NO, [UIScreen mainScreen].scale);
// [timeLabel drawViewHierarchyInRect:timeLabel.bounds afterScreenUpdates:YES];
// UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();
// UIGraphicsEndImageContext();
//
// if (screenImage) {
// NSData *imageData = UIImagePNGRepresentation(screenImage);
// [FUSFileHelper fus_writeDataToFile:imageData filePath:filePath];
// }
// }
// }
//
//
// for (NSInteger i = 1; i <= 99;i++) {
// NSString *filePath = [document stringByAppendingPathComponent:[NSString stringWithFormat:@"fus_time_gray_level_%zd.png",i]];
//
// if (![FUSFileHelper fus_isExistFileAtPath:filePath]) {
// CGFloat width = 20;
//
// /// 生成等级图片。保存在本地,然后再将路径加入HTML里面
// UILabel *timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, width, 14)];
// timeLabel.text = @(i).stringValue;
// timeLabel.backgroundColor = [UIColor colorWithHex:@"#D6D6D7"];
// timeLabel.textColor = [UIColor whiteColor];
// timeLabel.font = [UIFont fus_themeFont:9];
// timeLabel.layer.cornerRadius = 7;
// timeLabel.textAlignment = NSTextAlignmentCenter;
// timeLabel.layer.masksToBounds = YES;
//
// UIGraphicsBeginImageContextWithOptions(timeLabel.bounds.size, NO, [UIScreen mainScreen].scale);
// [timeLabel drawViewHierarchyInRect:timeLabel.bounds afterScreenUpdates:YES];
// UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();
// UIGraphicsEndImageContext();
//
// if (screenImage) {
// NSData *imageData = UIImagePNGRepresentation(screenImage);
// [FUSFileHelper fus_writeDataToFile:imageData filePath:filePath];
// }
// }
// }
}
@end
......@@ -19,6 +19,7 @@ class FUSChatInputTaskListTableViewCell: UITableViewCell {
@IBOutlet weak var coinTypeImageView: UIImageView!
@IBOutlet weak var progressLabel: UILabel!
@IBOutlet weak var addLabel: UILabel!
@IBOutlet var imageWidthConstraint: NSLayoutConstraint!
var countTimer:Timer? = nil
......@@ -37,7 +38,7 @@ class FUSChatInputTaskListTableViewCell: UITableViewCell {
countTimer?.invalidate()
countTimer = nil
self.imageWidthConstraint.constant = 15
// 奖励类型(3:宝石、4:萤火、5:露水)
switch listmodel?.currency {
case 3:
......@@ -61,7 +62,16 @@ class FUSChatInputTaskListTableViewCell: UITableViewCell {
dewCountLabel.textColor = UIColor.init(hex: "#FE29FE")
addLabel.textColor = UIColor.init(hex: "#FE29FE")
case -1:
coinTypeImageView.setWebImageWithSubURLString(listmodel?.tagUrl ?? "")
coinTypeImageView.setWebImageWithSubURLString(listmodel?.tagUrl ?? "", placeholder: .fus_defaultIcon()) { [weak self] image, url, type, stage, error in
if let image = image {
if image.size.height > 0 {
let width = 15.0 / image.size.height * image.size.width
self?.imageWidthConstraint.constant = width
} else {
self?.imageWidthConstraint.constant = 15.0
}
}
}
dewCountLabel.textColor = UIColor(hexString: "#ebebeb")
addLabel.textColor = UIColor(hexString: "#ebebeb")
default:
......
......@@ -102,6 +102,7 @@
<outlet property="coinTypeImageView" destination="J0e-Ka-oVQ" id="Gqw-6h-4Ul"/>
<outlet property="dewCountLabel" destination="LQE-a7-IeJ" id="0hv-jg-Mib"/>
<outlet property="doingLabel" destination="cWX-TH-Co4" id="DNQ-2D-dLe"/>
<outlet property="imageWidthConstraint" destination="OTB-Zv-7hx" id="ge1-er-Nhz"/>
<outlet property="profileLabel" destination="Xbt-PK-IJ9" id="WYF-CG-Fuo"/>
<outlet property="progressLabel" destination="MyF-Ln-teR" id="g8m-Pr-8u6"/>
<outlet property="taskNameLabel" destination="pPg-Rs-l3u" id="hgf-2X-QA2"/>
......
......@@ -272,8 +272,8 @@ class FUSLiveChatInputTaskListView: UIView, UITableViewDelegate, UITableViewData
fus_getTaskAward(model!.tid, sender: sender)
}
} else {
if (model?.missionType == 0
|| model?.missionType == 4) {
if (model?.type == 0
|| model?.type == 4) {
if let model = model {
fus_getTaskRewardReceive(model: model)
}
......
......@@ -113,7 +113,7 @@
{
self.bgViewHeightConstraint.constant = 130 + UIView.fus_SafeBottom;
self.btnArr = @[@(FriendChatShare),@(FacebookPlatform), @(TwitterPlatform), @(WechatFriendPlatform), @(WechatCirclePaltform), @(LineSharePlatform), @(WhatsAppPlatform), @(CopyLink)];
self.btnArr = @[@(FriendChatShare),@(FacebookPlatform), @(TwitterPlatform), /*@(WechatFriendPlatform), @(WechatCirclePaltform),*/ @(LineSharePlatform), @(WhatsAppPlatform), @(CopyLink)];
[self initShareBtn];
......
......@@ -11,7 +11,7 @@
typedef void(^shareHandler)(SocialSharePlatform type);
#define SHARE_ARRAY @[@(FacebookPlatform), @(TwitterPlatform), @(WechatFriendPlatform), @(WechatCirclePaltform), @(CopyLink), /*@(FUSRoomShareTypeWeibo)*/]
#define SHARE_ARRAY @[@(FacebookPlatform), @(TwitterPlatform), /*@(WechatFriendPlatform), @(WechatCirclePaltform),*/ @(CopyLink), /*@(FUSRoomShareTypeWeibo)*/]
#define SHARE_VIEW_HEIGHT 140
......
......@@ -10,5 +10,12 @@
@implementation FUSZhaiXinModel
- (NSString *)content {
if ([self.type isEqualToString:@"OfficialMessage"]) {
_content = [_content fus_adaptFusiString];
}
return _content;
}
@end
......@@ -10,4 +10,14 @@
@implementation FUSOfficialMessageModel
- (NSString *)content {
_content = [_content fus_adaptFusiString];
return _content;
}
- (NSString *)title {
_title = [_title fus_adaptFusiString];
return _title;
}
@end
......@@ -421,20 +421,20 @@ static NSString *const reuseIdentifyCell = @"cell";
FUSDewAwardAnimationView *dewAnimView = [[FUSDewAwardAnimationView alloc] initWithFrame:UIView.fus_screenFrame];
[dewAnimView addDewAwardWithAmount:[NSString stringWithFormat:@"%ld",listModel.award] textColor:[UIColor fus_diamondBlue]];
[self.view addSubview:dewAnimView];
[UIApplication.sharedApplication.keyWindow addSubview:dewAnimView];
} else if (listModel.currency == 4
|| listModel.classify == 6) {
FUSDewAwardAnimationView *dewAnimView = [[FUSDewAwardAnimationView alloc] initWithFrame:UIView.fus_screenFrame];
[dewAnimView addDewAwardWithAmount:[NSString stringWithFormat:@"%ld",listModel.award] textColor:[UIColor fus_fireGreen]];
[self.view addSubview:dewAnimView];
[UIApplication.sharedApplication.keyWindow addSubview:dewAnimView];
} else if (listModel.currency == 5
|| listModel.classify == 5) {
FUSDewAwardAnimationView *dewAnimView = [[FUSDewAwardAnimationView alloc] initWithFrame:UIView.fus_screenFrame];
[dewAnimView addDewAwardWithAmount:[NSString stringWithFormat:@"%ld",listModel.award] textColor:[UIColor fus_dewBlue]];
[self.view addSubview:dewAnimView];
[UIApplication.sharedApplication.keyWindow addSubview:dewAnimView];
} else {
FUSSingleDailyCheckInView *awardView = [FUSSingleDailyCheckInView fus_dailyCheckInView];
......@@ -444,7 +444,7 @@ static NSString *const reuseIdentifyCell = @"cell";
desc:listModel.getTips
award:@(listModel.award).description
animated:NO];
[[UIApplication sharedApplication].delegate.window.rootViewController.view addSubview:awardView];
[UIApplication.sharedApplication.keyWindow addSubview:awardView];
}
}
......
......@@ -663,6 +663,10 @@
FUSZoneTaskInfoMModel *taskInfoModel = [FUSZoneTaskInfoMModel fus_modelWithDict:taskDic];
for (NSDictionary *taskListDic in taskDic[@"tasklist"]) {
FUSTaskCenterListModel *taskCenterListModel = [FUSTaskCenterListModel fus_modelWithDict:taskListDic];
/// Fusi 强制新星認定 和 新星通関两个任务不显示
if (taskCenterListModel.pid == 60002 || taskCenterListModel.pid == 60004) {
continue;
}
taskCenterListModel.missionType = [taskInfoModel.type integerValue];
[taskListModelArray addObject:taskCenterListModel];
}
......
//
// FUSGotBackpackItemAnimView.h
// PersonalPage
//
// Created by pierce on 2023/7/20.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, FUSGotBackpackItemAnimType) {
FUSGotBackpackItemAnimType1 = 1,
FUSGotBackpackItemAnimType2 = 2,
FUSGotBackpackItemAnimType3 = 3,
};
typedef NS_ENUM(NSUInteger, FUSGotBackpackItemGoodsType) {
FUSGotBackpackItemGoodsTypeNone = 0,
FUSGotBackpackItemGoodsTypeProps = 1,
FUSGotBackpackItemGoodsTypeGift = 2,
FUSGotBackpackItemAnimMotor = 3,
};
NS_ASSUME_NONNULL_BEGIN
@interface FUSGotBackpackItemAnimView : UIView
+ (void)ff_showWithType:(FUSGotBackpackItemAnimType)type
icon:(NSString *)iconUrl
name:(NSString *)name
goodsType:(FUSGotBackpackItemGoodsType)goodsType
isMotorHasWear:(BOOL)isMotorHasWear;
@end
NS_ASSUME_NONNULL_END
......@@ -19,6 +19,7 @@
// 记录model
@property (nonatomic, strong) FUSTaskCenterListModel *taskCenterListModel;
@property (weak, nonatomic) IBOutlet UIImageView *currencyImageView;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *imageWidthConstraint;
@property (weak, nonatomic) IBOutlet UILabel *detailLabel;
......@@ -41,6 +42,7 @@
- (void)setListModel:(FUSTaskCenterListModel *)listModel {
_taskCenterListModel = listModel;
self.taskNameLabel.text = listModel.taskName;
self.imageWidthConstraint.constant = 16;
// 物品分类(1:道具、2:礼物、3:座驾、4:宝石、5:露水、6:萤火)
if (listModel.currency == 3 || listModel.classify == 4) {
self.currencyImageView.image = [UIImage imageNamed:@"icon_taskCenter_gem"];
......@@ -55,9 +57,16 @@
self.awardLabel.textColor = [UIColor colorWithHex:@"#58C1FF"];
self.addlabel.textColor = [UIColor colorWithHex:@"#58C1FF"];
} else if (listModel.currency == -1) {
[self.currencyImageView setWebImageWithSubURLString:listModel.tagUrl];
self.awardLabel.textColor = [UIColor colorWithHex:@"#ebebeb"];
self.addlabel.textColor = [UIColor colorWithHex:@"#ebebeb"];
__weak typeof(self) weakSelf = self;
[self.currencyImageView setWebImageWithSubURLString:listModel.tagUrl placeholder:nil completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) {
if (image && image.size.height > 0) {
weakSelf.imageWidthConstraint.constant = 16 / image.size.height * image.size.width;
} else {
weakSelf.imageWidthConstraint.constant = 16;
}
}];
self.awardLabel.textColor = [UIColor fus_textColorLight];
self.addlabel.textColor = [UIColor fus_textColorLight];
}
if ([NSString isNullWithString:listModel.tagValue]) {
......
......@@ -56,8 +56,8 @@
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_taskCenter_small" translatesAutoresizingMaskIntoConstraints="NO" id="EoZ-uN-sDh">
<rect key="frame" x="105" y="17.5" width="16" height="16"/>
<constraints>
<constraint firstAttribute="width" secondItem="EoZ-uN-sDh" secondAttribute="height" multiplier="1:1" id="LQx-XS-980"/>
<constraint firstAttribute="width" constant="16" id="R4K-BJ-QMZ"/>
<constraint firstAttribute="height" constant="16" id="jWL-dM-Jxs"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iwt-SR-z91">
......@@ -112,6 +112,7 @@
<outlet property="currencyImageView" destination="EoZ-uN-sDh" id="2DX-5k-cQV"/>
<outlet property="detailLabel" destination="iwt-SR-z91" id="kdA-bg-PZD"/>
<outlet property="expTimeLabel" destination="vuj-9P-CdU" id="LUp-Pj-033"/>
<outlet property="imageWidthConstraint" destination="R4K-BJ-QMZ" id="K4Z-8f-lu3"/>
<outlet property="operationBtn" destination="VBv-Bq-UZB" id="0RD-iD-3Hb"/>
<outlet property="taskNameLabel" destination="oRB-IO-xec" id="szN-TL-KfO"/>
</connections>
......
......@@ -22,6 +22,8 @@
@property (weak, nonatomic) IBOutlet UILabel *taskProcessLabel;
// 任务奖励图标
@property (weak, nonatomic) IBOutlet UIImageView *awardImageView;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *imageWidthConstraint;
// 任务奖励label
@property (weak, nonatomic) IBOutlet UILabel *awardLabel;
// 任务进度view的宽度
......@@ -59,7 +61,7 @@
[self.taskImageView setWebImageWithSubURLString:listModel.icon placeholder:nil];
self.taskTitleLabel.text = listModel.taskName;
self.awardLabel.text = [NSString stringWithFormat:@"%ld",(long)listModel.award];
self.imageWidthConstraint.constant = 16;
//classify: 物品分类(1:道具、2:礼物、3:座驾、4:宝石、5:露水、6:萤火)
if (listModel.currency == 3 || listModel.classify == 4) {
self.awardImageView.image = [UIImage imageNamed:@"icon_taskCenter_gem"];
......@@ -86,13 +88,20 @@
} else {
if (![NSString isNullWithString:listModel.tagUrl]) {
[self.awardImageView setWebImageWithSubURLString:listModel.tagUrl];
__weak typeof(self) weakSelf = self;
[self.awardImageView setWebImageWithSubURLString:listModel.tagUrl placeholder:nil completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) {
if (image && image.size.height > 0) {
weakSelf.imageWidthConstraint.constant = 16 / image.size.height * image.size.width;
} else {
weakSelf.imageWidthConstraint.constant = 16;
}
}];
}
if (![NSString isNullWithString:listModel.tagValue]) {
self.awardLabel.text = listModel.tagValue;
self.awardLabel.textColor = [UIColor colorWithHex:@"#ebebeb"];
self.addLabel.textColor = [UIColor colorWithHex:@"#ebebeb"];
self.awardLabel.textColor = [UIColor fus_textColorLight];
self.addLabel.textColor = [UIColor fus_textColorLight];
}
}
......
......@@ -127,6 +127,7 @@
<outlet property="awardLabel" destination="RyB-oG-Lqu" id="zeT-gP-uQR"/>
<outlet property="btnConstrant" destination="ZlU-VB-AeZ" id="MWo-Ga-fxv"/>
<outlet property="detailLabel" destination="8v6-UE-dIy" id="tNE-Re-0Zj"/>
<outlet property="imageWidthConstraint" destination="ogJ-Ij-RNm" id="Ybs-7c-I53"/>
<outlet property="operationBtn" destination="RbH-RC-F8l" id="wtc-x8-Amr"/>
<outlet property="taskProcessLabel" destination="EyC-iH-DvF" id="s5u-4V-YfW"/>
<outlet property="taskTitleLabel" destination="bfp-Ws-YBS" id="lUa-EV-zX5"/>
......
......@@ -2108,3 +2108,84 @@
"往期" = "往期";
"首次免费" = "首次免費";
"截图" = "截圖";
"记录已清空" = "記錄已清空";
"领取成功" = "領取成功";
"小窗播放" = "小窗播放";
"内容未保存是否保存?" = "內容未保存是否保存?";
"签名" = "簽名";
"性别" = "性別";
"确认清除全部观看记录吗?" = "确认清除全部观看记录吗?";
"编辑资料" = "編輯資料";
"已有语音签名,是否去录制新的语音签名?" = "已有語音簽名,是否去錄製新的語音簽名?";
"观看记录" = "观看记录";
"生日只能修改一次" = "生日只能修改一次";
"性别只能修改一次" = "性別只能修改一次";
"已在认证中,无法提交新的认证" = "已在認證中,無法提交新的認證";
"切换到听筒模式" = "切換到聽筒模式";
"身高" = "身高";
"昵称" = "暱稱";
"地区" = "地區";
"保密" = "保密";
"脸部特效" = "臉部特效";
"未录制" = "未錄製";
"请输入你的职业" = "請輸入你的職業";
"性别只能修改一次,您已经修改过" = "性别只能修改一次,您已經修改過";
"生日未设置" = "生日未設置";
"兑换" = "兌換";
"新星养成" = "新星養成";
"使用该头像,需要重新认证?" = "使用該頭像,需要重新認證?";
"学历" = "學歷";
"任务" = "任務";
"生日" = "生日";
"切换到扬声器模式" = "切換到揚聲器模式";
"职业" = "職業";
"体重" = "體重";
"审核中" = "審核中";
"修改昵称需要10宝石" = "修改暱稱需要10寶石";
"每日任务" = "每日任務";
"生日只能修改一次,您已经修改过" = "生日只能修改一次,您已經修改過";
"聊天" = "聊天";
"您的宝石不足,无法更改昵称" = "您的寶石不足,無法更改暱稱";
"连麦用户获得的礼物收入,主播分成%@,用户分成%@" = "連麥用戶獲得的禮物收入,主播分成%@,用戶分成%@";
......@@ -2108,3 +2108,84 @@
"往期" = "往期";
"首次免费" = "首次免費";
"截图" = "截圖";
"记录已清空" = "記錄已清空";
"领取成功" = "領取成功";
"小窗播放" = "小窗播放";
"内容未保存是否保存?" = "內容未保存是否保存?";
"签名" = "簽名";
"性别" = "性別";
"确认清除全部观看记录吗?" = "确认清除全部观看记录吗?";
"编辑资料" = "編輯資料";
"已有语音签名,是否去录制新的语音签名?" = "已有語音簽名,是否去錄製新的語音簽名?";
"观看记录" = "观看记录";
"生日只能修改一次" = "生日只能修改一次";
"性别只能修改一次" = "性別只能修改一次";
"已在认证中,无法提交新的认证" = "已在認證中,無法提交新的認證";
"切换到听筒模式" = "切換到聽筒模式";
"身高" = "身高";
"昵称" = "暱稱";
"地区" = "地區";
"保密" = "保密";
"脸部特效" = "臉部特效";
"未录制" = "未錄製";
"请输入你的职业" = "請輸入你的職業";
"性别只能修改一次,您已经修改过" = "性别只能修改一次,您已經修改過";
"生日未设置" = "生日未設置";
"兑换" = "兌換";
"新星养成" = "新星養成";
"使用该头像,需要重新认证?" = "使用該頭像,需要重新認證?";
"学历" = "學歷";
"任务" = "任務";
"生日" = "生日";
"切换到扬声器模式" = "切換到揚聲器模式";
"职业" = "職業";
"体重" = "體重";
"审核中" = "審核中";
"修改昵称需要10宝石" = "修改暱稱需要10寶石";
"每日任务" = "每日任務";
"生日只能修改一次,您已经修改过" = "生日只能修改一次,您已經修改過";
"聊天" = "聊天";
"您的宝石不足,无法更改昵称" = "您的寶石不足,無法更改暱稱";
"连麦用户获得的礼物收入,主播分成%@,用户分成%@" = "連麥用戶獲得的禮物收入,主播分成%@,用戶分成%@";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment