Commit d104a4c0 by pierce

fixed bugs

parent 5b6fca5d
Showing with 462 additions and 454 deletions
......@@ -531,6 +531,7 @@ NSString * const FUSSocializedIsSafariLoginKey = @"FUSSocializedIsSafariLoginKey
[NSString isNull:authTokenSecret]) {
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:FUSLocalizationHelper.localString(@"授权失败")];
if (failure) failure([[NSError alloc] initWithDomain:NSOSStatusErrorDomain code:ERROR_CODE userInfo:nil]);
return ;
}
......@@ -556,6 +557,7 @@ NSString * const FUSSocializedIsSafariLoginKey = @"FUSSocializedIsSafariLoginKey
}
} failure:^(NSError *error) {
if (failure) failure(error);
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:FUSLocalizationHelper.localString(@"授权失败")];
}];
......
......@@ -275,23 +275,29 @@ static NSString *const FUSArbicLangArea = @"1001";
return [NSString stringWithFormat:@"%zd",self.languageType];
}
- (FUSLanguageType *)languageType {
- (FUSLanguageType)languageType {
if ([self.key isEqualToString:FUSI_LANGUAGE_CHINESE]) {
NSString *languageKey = self.key;
if ([languageKey isEqualToString:FUSI_LANGUAGE_SYSTEM]) {
languageKey = [[NSUserDefaults standardUserDefaults] objectForKey:LANGUAGE_CORE_KEY];
}
if ([languageKey isEqualToString:FUSI_LANGUAGE_CHINESE]) {
return FUSLanguageTypeChinese;
}else if ([self.key isEqualToString:FUSI_LANGUAGE_CHINESE_TRAD]){
}else if ([languageKey isEqualToString:FUSI_LANGUAGE_CHINESE_TRAD]){
return FUSLanguageTypeChinese;
}else if ([self.key isEqualToString:FUSI_LANGUAGE_ENGLISH]){
}else if ([languageKey isEqualToString:FUSI_LANGUAGE_ENGLISH]){
return FUSLanguageTypeEnglish;
}else if ([self.key isEqualToString:FUSI_LANGUAGE_THAI]){//泰国
}else if ([languageKey isEqualToString:FUSI_LANGUAGE_THAI]){//泰国
return FUSLanguageTypeThai;
}else if ([self.key isEqualToString:FUSI_LANGUAGE_JAPANESE]){//日本
}else if ([languageKey isEqualToString:FUSI_LANGUAGE_JAPANESE]){//日本
return FUSLanguageTypeJanpanese;
}else if ([self.key isEqualToString:FUSI_LANGUAGE_INDONESIAN]){//印尼
}else if ([languageKey isEqualToString:FUSI_LANGUAGE_INDONESIAN]){//印尼
return FUSLanguageTypeIndonesian;
} else if ([self.key isEqualToString:FUSI_LANGUAGE_ARBIC]){//阿拉伯
} else if ([languageKey isEqualToString:FUSI_LANGUAGE_ARBIC]){//阿拉伯
return FUSLanguageTypeArbic;
} else if ([self.key isEqualToString:FUSI_LANGUAGE_VIETNAMESE]){//越南语
} else if ([languageKey isEqualToString:FUSI_LANGUAGE_VIETNAMESE]){//越南语
return FUSLanguageTypeVietnamese;
} else{
return FUSLanguageTypeEnglish;
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fus_login_loginBtn_twitter_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "fus_login_loginBtn_twitter_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -52,6 +52,13 @@
}
_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"];
}
return _languageContent;
}
......
......@@ -73,15 +73,17 @@
}
[[YYWebImageManager sharedManager] requestImageWithURL:[NSURL URLWithString:downloadUrl] options:0 progress:nil transform:nil completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType cacheFrom, YYWebImageStage stage, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
UIImage *shareImage = image;
[FUSLoadingView fus_dismissProgressViewWithView:viewController.view];
if (!image) {
image = [UIImage imageNamed:@"FUSShareImage"];
if (!shareImage) {
shareImage = [UIImage imageNamed:@"FUSShareImage"];
}else {
image = image;
shareImage = shareImage;
}
[self shareWithViewController:viewController platform:platform urlString:urlString title:title content:content image:image imageOrUrl:imageOrUrl from:from roomId:roomId shareType:shareType success:success failure:failure];
[self shareWithViewController:viewController platform:platform urlString:urlString title:title content:content image:shareImage imageOrUrl:imageOrUrl from:from roomId:roomId shareType:shareType success:success failure:failure];
});
}];
}else if([imageOrUrl isKindOfClass:[UIImage class]]){
image = (UIImage *)imageOrUrl;
......
......@@ -24,19 +24,12 @@
//加载动画
CompatibleAnimationView *largeLotAnimView = [[CompatibleAnimationView alloc] initWithCompatibleAnimation:[CompatibleAnimation named:@"rightToBottom"]];
[self addSubview:largeLotAnimView];
if (@available(iOS 11.0, *)) {
// largeLotAnimView.frame = CGRectMake(0, - 50, UIView.fus_screenW, UIView.fus_screenH + UIView.fus_SafeBottom + UIView.fus_SafeTop + 50);
[largeLotAnimView.topAnchor constraintEqualToAnchor:self.topAnchor constant:-50].active = YES;
[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.trailingAnchor constraintEqualToAnchor:self.trailingAnchor].active = YES;
} else {
// largeLotAnimView.frame = CGRectMake(0, - 50, UIView.fus_screenW, UIView.fus_screenH + 50);
[largeLotAnimView.topAnchor constraintEqualToAnchor:self.topAnchor constant:-50].active = YES;
[largeLotAnimView.leadingAnchor constraintEqualToAnchor:self.leadingAnchor].active = YES;
[largeLotAnimView.bottomAnchor constraintEqualToAnchor:self.bottomAnchor].active = YES;
[largeLotAnimView.trailingAnchor constraintEqualToAnchor:self.trailingAnchor].active = YES;
}
largeLotAnimView.contentMode = UIViewContentModeScaleAspectFill;
CompatibleAnimationKeypath *largePath = [[CompatibleAnimationKeypath alloc] initWithKeys:@[@"预合成 1",@"右边图片.png"]]; // UI做图时的图片名
......
......@@ -42,7 +42,6 @@
// MARK: -- 直播间
#import "FUSLiveChatInputView.h"
#import "FUSTaskCenterListModel.h"
#import "FUSTaskCenterGetAwardView.h"
#import "FUSPhoneAuthViewController.h"
#import "FUSBoundAgentInfoView.h"
#import "FUSLiveHttpHelper.h"
......
......@@ -3,7 +3,7 @@
<device id="retina5_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
......@@ -112,7 +112,7 @@
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hcU-4M-876">
<rect key="frame" x="133" y="625" width="148" height="50"/>
<rect key="frame" x="84" y="625" width="246" height="50"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x3l-Oi-DQ4">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
......@@ -136,15 +136,30 @@
<action selector="onClickPhoneLogin:" destination="-1" eventType="touchUpInside" id="7pZ-vG-NpI"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ApI-nd-fZh">
<rect key="frame" x="196" y="0.0" width="50" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="2ep-6D-ZVm"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" backgroundImage="fus_login_loginBtn_twitter_icon"/>
<connections>
<action selector="onClickTwitterLogin:" destination="-1" eventType="touchUpInside" id="CNO-vM-lrs"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="ApI-nd-fZh" secondAttribute="trailing" id="3xk-1q-CoL"/>
<constraint firstItem="x3l-Oi-DQ4" firstAttribute="top" secondItem="hcU-4M-876" secondAttribute="top" id="4p6-d3-NAN"/>
<constraint firstAttribute="bottom" secondItem="x1a-J8-Ftd" secondAttribute="bottom" id="4ta-w2-jv6"/>
<constraint firstAttribute="bottom" secondItem="ApI-nd-fZh" secondAttribute="bottom" id="9aQ-Qf-z49"/>
<constraint firstItem="x1a-J8-Ftd" firstAttribute="centerX" secondItem="hcU-4M-876" secondAttribute="centerX" id="FDX-Nm-geX"/>
<constraint firstItem="x3l-Oi-DQ4" firstAttribute="leading" secondItem="hcU-4M-876" secondAttribute="leading" id="UK1-pT-KV6"/>
<constraint firstItem="ApI-nd-fZh" firstAttribute="top" secondItem="hcU-4M-876" secondAttribute="top" id="UKH-LU-BRh"/>
<constraint firstItem="ApI-nd-fZh" firstAttribute="leading" secondItem="x1a-J8-Ftd" secondAttribute="trailing" constant="48" id="WKs-JB-yix"/>
<constraint firstItem="x1a-J8-Ftd" firstAttribute="leading" secondItem="x3l-Oi-DQ4" secondAttribute="trailing" constant="48" id="hUS-SQ-xXM"/>
<constraint firstAttribute="height" constant="50" id="lTR-Nx-9Xp"/>
<constraint firstAttribute="trailing" secondItem="x1a-J8-Ftd" secondAttribute="trailing" id="mYf-fA-0Fm"/>
<constraint firstAttribute="bottom" secondItem="x3l-Oi-DQ4" secondAttribute="bottom" id="ow5-KW-l2O"/>
<constraint firstItem="x1a-J8-Ftd" firstAttribute="top" secondItem="hcU-4M-876" secondAttribute="top" id="owk-jJ-EZM"/>
</constraints>
......@@ -236,6 +251,7 @@
<image name="fus_login_loginBtn_google_icon" width="28.666666030883789" height="28.666666030883789"/>
<image name="fus_login_loginBtn_line_icon" width="45" height="45.666667938232422"/>
<image name="fus_login_loginBtn_phone_icon" width="44.666667938232422" height="44.666667938232422"/>
<image name="fus_login_loginBtn_twitter_icon" width="44.666667938232422" height="44.666667938232422"/>
<systemColor name="lightTextColor">
<color white="1" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
......
......@@ -60,7 +60,10 @@ class FUSChatInputTaskListTableViewCell: UITableViewCell {
coinTypeImageView.image = UIImage(named: "icon_taskCenter_battle_pink")
dewCountLabel.textColor = UIColor.init(hex: "#FE29FE")
addLabel.textColor = UIColor.init(hex: "#FE29FE")
case -1:
coinTypeImageView.setWebImageWithSubURLString(listmodel?.tagUrl ?? "")
dewCountLabel.textColor = UIColor(hexString: "#ebebeb")
addLabel.textColor = UIColor(hexString: "#ebebeb")
default:
break
}
......@@ -83,9 +86,11 @@ class FUSChatInputTaskListTableViewCell: UITableViewCell {
}
// 状态(-1:去完成、0:过程中、1:已完成、2:已领取)
//状态(-1:查看详细,0:未完成、1:过程中、2:已完成、3:已领取)
doingLabel.isHidden = true
finishedBtn?.isHidden = true
getBtn?.isHidden = true
getBtn?.isEnabled = true
switch listmodel?.state {
case 0:
getBtn?.setTitle(FUSLocalizationHelper.localString("去完成"), for: UIControl.State.normal)
......@@ -98,6 +103,8 @@ class FUSChatInputTaskListTableViewCell: UITableViewCell {
getBtn?.style = FUSButtonStyle.blue
getBtn?.isHidden = false
case 3:
if listmodel?.classify == 0 {
let time = FUSTimeLabelFormatHelper.fus_getTimeLabel(withSecond: Int(listmodel!.countDownTime) ?? 0)
finishedBtn?.setTitle(time, for: UIControl.State.normal)
......@@ -105,6 +112,16 @@ class FUSChatInputTaskListTableViewCell: UITableViewCell {
countTimer = Timer.init(timeInterval: 1, target: self, selector: #selector(startCountTimer) , userInfo: nil, repeats: true)
RunLoop.main.add(countTimer!, forMode: RunLoop.Mode.default)
}else {
getBtn?.setTitle(NSString.fus_localString("已领取"), for: UIControl.State.normal)
getBtn?.style = FUSButtonStyle.grayBorder
getBtn?.isHidden = false
getBtn?.isEnabled = false
}
case -1:
getBtn?.setTitle( NSString.fus_localString("查看详情"), for: UIControl.State.normal)
getBtn?.style = .blurGradientBorder
getBtn?.isHidden = false
default:
break
}
......
......@@ -474,6 +474,7 @@
_item13 = [FUSCustomSettingItem fus_itemWithTitle:FUSLocalizationHelper.localString(@"清理缓存") type:CustomSettingItemTypeShowText];
_item13.itemClick = ^(FUSCustomSettingItem *item){
FUSWKWebView *wkView = [[FUSWKWebView alloc] init];
[wkView clearWebCache];
......@@ -484,8 +485,10 @@
[FUSLoadingView fus_showProgressViewWithMessage:nil];
[[YYWebImageManager sharedManager].cache.memoryCache removeAllObjects];
[[YYWebImageManager sharedManager].cache.diskCache removeAllObjectsWithBlock:^{
dispatch_async(dispatch_get_main_queue(), ^{
[FUSLoadingView fus_dismissProgressView];
[weakSelf fus_updateSettingTable];
});
}];
[FUSFileHelper fus_deleteFileAtPath:[FUSFileHelper appCacheChatImagePath]];
......
......@@ -45,6 +45,15 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *url;
// 倒计时时间戳(秒)
@property (nonatomic, copy) NSString *countDownTime;
// 图标
@property (nonatomic, copy) NSString *tagUrl;
// 物品分类(1:道具、2:礼物、3:座驾、4:宝石、5:露水、6:萤火)
@property (nonatomic, assign) NSInteger classify;
// 数值
@property (nonatomic, copy) NSString *tagValue;
// 任务类型(0:奖励领取、1:新手、2:邀请、3:日常、4:主播)
@property (nonatomic, assign) NSInteger missionType;
@end
NS_ASSUME_NONNULL_END
......@@ -255,7 +255,7 @@ typedef NS_ENUM(NSInteger, FUSZoneHttpUploadImageType)
+(void)fus_requestTaskRewardReceiveGetListSuccess:(void(^)(FUSZoneTaskInfoMModel *dataModel))success failure:(void(^)(NSString *msg,int code))failure;
/// 奖励领取任务接口
+(void)fus_requestTaskRewardReceiveGetTid:(NSString *)tid sid:(NSString *)sid pid:(NSString *)pid success:(void(^)(void))success failure:(void(^)(NSString *msg,int code))failure;
+(void)fus_requestTaskRewardReceiveGetTid:(NSString *)tid sid:(NSString *)sid pid:(NSString *)pid success:(void(^)(NSDictionary *dataDict))success failure:(void(^)(NSString *msg,int code))failure;
/**
获取任务奖励
......
......@@ -660,11 +660,12 @@
for (NSDictionary *taskDic in tasksArray) {
NSMutableArray *taskListModelArray = [NSMutableArray array];
FUSZoneTaskInfoMModel *taskInfoModel = [FUSZoneTaskInfoMModel fus_modelWithDict:taskDic];
for (NSDictionary *taskListDic in taskDic[@"tasklist"]) {
FUSTaskCenterListModel *taskCenterListModel = [FUSTaskCenterListModel fus_modelWithDict:taskListDic];
taskCenterListModel.missionType = [taskInfoModel.type integerValue];
[taskListModelArray addObject:taskCenterListModel];
}
FUSZoneTaskInfoMModel *taskInfoModel = [FUSZoneTaskInfoMModel fus_modelWithDict:taskDic];
taskInfoModel.tasklist = [taskListModelArray copy];
[tasksModelArray addObject:taskInfoModel];
}
......@@ -728,12 +729,12 @@
}];
}
/// 奖励领取任务接口
+(void)fus_requestTaskRewardReceiveGetTid:(NSString *)tid sid:(NSString *)sid pid:(NSString *)pid success:(void(^)(void))success failure:(void(^)(NSString *msg,int code))failure{
+(void)fus_requestTaskRewardReceiveGetTid:(NSString *)tid sid:(NSString *)sid pid:(NSString *)pid success:(void(^)(NSDictionary *dataDict))success failure:(void(^)(NSString *msg,int code))failure{
NSDictionary *parms = @{@"tid":tid,
@"pid":pid,
@"sid":sid};
[FUSHttpHelper postRequestBinaryWithUrl:URL_TASK_REWARD_RECEIVE_GET params:parms success:^(NSDictionary * _Nullable dataDict, int code) {
success();
if (success) success(dataDict);
} failure:^(NSDictionary * _Nullable dataDict, int code) {
if (failure) {
failure(FAILURE_MESSAGE,code);
......
//
// FUSTaskCenterGetAwardView.h
// FusiLive
//
// Created by 方磊 on 2018/11/6.
// Copyright © 2024年 FuSiLive. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "FUSTaskCenterListModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface FUSTaskCenterGetAwardView : UIView
@property (nonatomic, strong) FUSTaskCenterListModel *listModel;
/**
显示绑定成功弹窗
*/
- (void)fus_show;
@property (nonatomic, copy) void (^bindSuccessPopViewDismissBlock)(void);
@end
NS_ASSUME_NONNULL_END
//
// FUSTaskCenterGetAwardView.m
// FusiLive
//
// Created by 方磊 on 2018/11/6.
// Copyright © 2024年 FuSiLive. All rights reserved.
//
#import "FUSTaskCenterGetAwardView.h"
@interface FUSTaskCenterGetAwardView ()
// 礼花图片
@property (strong, nonatomic) UIImageView *fireworkImageView;
// 背景
@property (weak, nonatomic) IBOutlet UIView *bgView;
//// 奖励
//@property (weak, nonatomic) IBOutlet UILabel *awardLabel;
// 任务名称
@property (weak, nonatomic) IBOutlet UILabel *taskContentLabel;
// 确定按钮
@property (weak, nonatomic) IBOutlet FUSStyleButton *sureBtn;
// 货币类型tubiao
//@property (weak, nonatomic) IBOutlet UIImageView *currencyImageView;
// 背景图片
@property (weak, nonatomic) IBOutlet UIImageView *bgImageView;
@property (weak, nonatomic) IBOutlet UILabel *completeTaskTitleLabel;
@property (weak, nonatomic) IBOutlet UIButton *awardBtn;
@end
@implementation FUSTaskCenterGetAwardView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
FUSTaskCenterGetAwardView *xibView = [FUSTaskCenterGetAwardView fus_taskCenterGetAwardView];
xibView.frame = frame;
self = xibView;
if (self) {
[self setupUI];
}
return self;
}
- (void)setupUI {
// self.bgImageView.image = [FUSLocalizationHelper fus_languageImage:@"taskCenter_get_award_bg"];
self.completeTaskTitleLabel.text = FUSLocalizationHelper.localString(@"恭喜任务达成");
// 确认按钮
[self.sureBtn setTitle:FUSLocalizationHelper.localString(@"确定") forState:(UIControlStateNormal)];
self.sureBtn.style = FUSButtonStyleBlueBorder;
_fireworkImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, -UIView.fus_screenH, UIView.fus_screenW, UIView.fus_screenH)];
_fireworkImageView.image = [UIImage imageNamed:@"icon_fireworks_animationImage"];
_fireworkImageView.contentMode = UIViewContentModeScaleAspectFit;
_awardBtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
[self addSubview:_fireworkImageView];
}
- (void)awakeFromNib {
[super awakeFromNib];
// _fireworkImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, -UIView.fus_screenH, UIView.fus_screenW, UIView.fus_screenH)];
// _fireworkImageView.image = [UIImage imageNamed:@"icon_fireworks_animationImage"];
// _fireworkImageView.contentMode = UIViewContentModeScaleAspectFit;
// [self addSubview:_fireworkImageView];
// [self sendSubviewToBack:_fireworkImageView];
}
#pragma mark - 自定义方法
/**
显示
@param view 所显示的父视图
*/
- (void)fus_show {
[[UIApplication sharedApplication].keyWindow addSubview:self];
[self bringSubviewToFront:_fireworkImageView];
_bgView.transform = CGAffineTransformMakeScale(0, 0);
self.alpha = 0.0;
[UIView animateWithDuration:1.0 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:0.6 options:(UIViewAnimationOptionCurveEaseInOut) animations:^{
_bgView.transform = CGAffineTransformIdentity;
self.alpha = 1.0;
} completion:nil];
[UIView animateWithDuration:3.5 delay:0.2 options:(UIViewAnimationOptionCurveLinear) animations:^{
_fireworkImageView.transform = CGAffineTransformMakeTranslation(0, UIView.fus_screenH * 2);
[UIView animateWithDuration:2 delay:1 options:UIViewAnimationOptionCurveLinear animations:^{
_fireworkImageView.alpha = 0;
} completion:nil];
} completion:nil];
}
/**
移除
*/
- (void)fus_remove {
if (self.bindSuccessPopViewDismissBlock) self.bindSuccessPopViewDismissBlock();
[UIView animateWithDuration:0.3 delay:0 options:(UIViewAnimationOptionCurveLinear) animations:^{
_bgView.transform = CGAffineTransformMakeScale(0.1, 0.1);
self.alpha = 0;
} completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
/**
绑定成功界面
*/
+ (instancetype)fus_taskCenterGetAwardView {
return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil] lastObject];
}
// 确定按钮点击
- (IBAction)sureBtnClick:(UIButton *)sender {
[self fus_remove];
}
// 赋值
- (void)setListModel:(FUSTaskCenterListModel *)listModel {
if (listModel.currency == 3) {
[self.awardBtn setImage:[UIImage imageNamed:@"icon_taskCenter_gem"] forState:UIControlStateNormal];
[self.awardBtn setTitleColor:[UIColor colorWithHex:@"#00F3D7"] forState:UIControlStateNormal];
// self.taskContentLabel.textColor = [UIColor colorWithHex:@"#00F3D7"];
} else if (listModel.currency == 4) {
[self.awardBtn setImage:[UIImage imageNamed:@"icon_taskCenter_firefly"] forState:UIControlStateNormal];
[self.awardBtn setTitleColor:[UIColor colorWithHex:@"#00F088"] forState:UIControlStateNormal];
// self.taskContentLabel.textColor = [UIColor colorWithHex:@"#00F088"];
} else if (listModel.currency == 5) {
[self.awardBtn setImage:[UIImage imageNamed:@"icon_taskCenter_small"] forState:UIControlStateNormal];
[self.awardBtn setTitleColor:[UIColor colorWithHex:@"#58C1FF"] forState:UIControlStateNormal];
// self.taskContentLabel.textColor = [UIColor colorWithHex:@"#58C1FF"];
} else if (listModel.currency == 6) {
[self.awardBtn setImage:[UIImage imageNamed:@"icon_taskCenter_battle_window_blue"] forState:UIControlStateNormal];
[self.awardBtn setTitleColor:[UIColor colorWithHex:@"#00A0E9"] forState:UIControlStateNormal];
// self.taskContentLabel.textColor = [UIColor colorWithHex:@"#00A0E9"];
}else if (listModel.currency == 7) {
[self.awardBtn setImage:[UIImage imageNamed:@"icon_taskCenter_battle_window_pink"] forState:UIControlStateNormal];
[self.awardBtn setTitleColor:[UIColor colorWithHex:@"#FE29FE"] forState:UIControlStateNormal];
// self.taskContentLabel.textColor = [UIColor colorWithHex:@"#FE29FE"];
}
[self.awardBtn setTitle:[NSString stringWithFormat:@"%ld",(long)listModel.award] forState:UIControlStateNormal];
self.taskContentLabel.text = listModel.taskContent;
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="FUSTaskCenterGetAwardView">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ha2-9c-i5a">
<rect key="frame" x="25" y="142" width="325" height="383"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="taskCenter_get_award_bg" translatesAutoresizingMaskIntoConstraints="NO" id="Wcs-oE-BqJ">
<rect key="frame" x="0.0" y="0.0" width="325" height="383"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Sju-zY-QDk">
<rect key="frame" x="57.5" y="210" width="210" height="78"/>
<constraints>
<constraint firstAttribute="width" constant="210" id="lYL-Z7-TFq"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Yss-gO-dy7" customClass="FUSStyleButton">
<rect key="frame" x="69" y="293" width="187" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="tAx-UY-K75"/>
<constraint firstAttribute="width" constant="187" id="u9A-Aj-TXg"/>
</constraints>
<state key="normal" title="确定">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="sureBtnClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="fBW-Yg-Lpn"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="恭喜任务达成" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SUJ-fT-fyr">
<rect key="frame" x="40" y="127.5" width="245" height="27.5"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="23"/>
<color key="textColor" red="1" green="0.96862745098039216" blue="0.47450980392156861" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="383" id="7gJ-NY-AUt"/>
<constraint firstItem="SUJ-fT-fyr" firstAttribute="centerX" secondItem="Wcs-oE-BqJ" secondAttribute="centerX" id="DhX-Qz-Nlm"/>
<constraint firstItem="Yss-gO-dy7" firstAttribute="top" secondItem="Sju-zY-QDk" secondAttribute="bottom" constant="5" id="IKx-Ul-mzh"/>
<constraint firstAttribute="bottom" secondItem="Wcs-oE-BqJ" secondAttribute="bottom" id="TMa-iT-01Y"/>
<constraint firstItem="SUJ-fT-fyr" firstAttribute="leading" secondItem="ha2-9c-i5a" secondAttribute="leading" constant="40" id="WIt-Xh-A8l"/>
<constraint firstItem="Wcs-oE-BqJ" firstAttribute="top" secondItem="ha2-9c-i5a" secondAttribute="top" id="gVM-8I-QEt"/>
<constraint firstItem="Wcs-oE-BqJ" firstAttribute="leading" secondItem="ha2-9c-i5a" secondAttribute="leading" id="iiC-D7-Xbi"/>
<constraint firstItem="Wcs-oE-BqJ" firstAttribute="top" secondItem="SUJ-fT-fyr" secondAttribute="bottom" constant="-155" id="j6N-l6-gQG"/>
<constraint firstItem="Sju-zY-QDk" firstAttribute="centerX" secondItem="ha2-9c-i5a" secondAttribute="centerX" id="klo-We-CJD"/>
<constraint firstAttribute="width" constant="325" id="kyY-dS-Fhg"/>
<constraint firstAttribute="bottom" secondItem="Yss-gO-dy7" secondAttribute="bottom" constant="50" id="qFG-S9-pOr"/>
<constraint firstAttribute="trailing" secondItem="Wcs-oE-BqJ" secondAttribute="trailing" id="wiB-ex-kir"/>
<constraint firstItem="Yss-gO-dy7" firstAttribute="centerX" secondItem="ha2-9c-i5a" secondAttribute="centerX" id="xhm-b2-g7h"/>
<constraint firstAttribute="trailing" secondItem="SUJ-fT-fyr" secondAttribute="trailing" constant="40" id="y2Z-UD-qdp"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gc3-Ji-gWJ">
<rect key="frame" x="170.5" y="325" width="34" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="BJ3-Ja-3V4"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<inset key="titleEdgeInsets" minX="0.0" minY="0.0" maxX="-6" maxY="0.0"/>
<state key="normal" title="1" image="icon_taskCenter_battle_window_blue"/>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="ha2-9c-i5a" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="5BU-Af-aD8"/>
<constraint firstItem="Sju-zY-QDk" firstAttribute="top" secondItem="Gc3-Ji-gWJ" secondAttribute="bottom" constant="10" id="7vV-Zs-qLq"/>
<constraint firstItem="ha2-9c-i5a" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="kLe-Ow-1RZ"/>
<constraint firstItem="Gc3-Ji-gWJ" firstAttribute="centerX" secondItem="Wcs-oE-BqJ" secondAttribute="centerX" id="mSc-mH-3pZ"/>
<constraint firstItem="Gc3-Ji-gWJ" firstAttribute="top" secondItem="SUJ-fT-fyr" secondAttribute="bottom" constant="28" id="nXr-lP-KbT"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<connections>
<outlet property="awardBtn" destination="Gc3-Ji-gWJ" id="ouo-yG-ZnG"/>
<outlet property="bgImageView" destination="Wcs-oE-BqJ" id="ocB-0b-a7c"/>
<outlet property="bgView" destination="ha2-9c-i5a" id="MNf-9t-ZtK"/>
<outlet property="completeTaskTitleLabel" destination="SUJ-fT-fyr" id="0Ge-Ry-0KW"/>
<outlet property="sureBtn" destination="Yss-gO-dy7" id="J0m-Gt-NOj"/>
<outlet property="taskContentLabel" destination="Sju-zY-QDk" id="zDr-pN-b2N"/>
</connections>
<point key="canvasLocation" x="136.95652173913044" y="231.36160714285714"/>
</view>
</objects>
<resources>
<image name="icon_taskCenter_battle_window_blue" width="27" height="22.5"/>
<image name="taskCenter_get_award_bg" width="323" height="383"/>
</resources>
</document>
......@@ -9,8 +9,7 @@
#import "FUSTaskCenterListTableViewCell.h"
@interface FUSTaskCenterListTableViewCell ()
// 任务图标
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
// 任务名称
@property (weak, nonatomic) IBOutlet UILabel *taskNameLabel;
// 奖励
......@@ -24,6 +23,7 @@
@property (weak, nonatomic) IBOutlet UILabel *detailLabel;
@property (weak, nonatomic) IBOutlet UILabel *addlabel;
@property (strong, nonatomic) IBOutlet UILabel *expTimeLabel;
@end
......@@ -40,23 +40,33 @@
// 重写setter方法赋值
- (void)setListModel:(FUSTaskCenterListModel *)listModel {
_taskCenterListModel = listModel;
[self.iconImageView setWebImageWithSubURLString:listModel.icon placeholder:nil];
self.taskNameLabel.text = listModel.taskName;
self.awardLabel.text = [NSString stringWithFormat:@"%ld",(long)listModel.award];
if (listModel.currency == 3) {
// 物品分类(1:道具、2:礼物、3:座驾、4:宝石、5:露水、6:萤火)
if (listModel.currency == 3 || listModel.classify == 4) {
self.currencyImageView.image = [UIImage imageNamed:@"icon_taskCenter_gem"];
self.awardLabel.textColor = [UIColor colorWithHex:@"#00F3D7"];
self.addlabel.textColor = [UIColor colorWithHex:@"#00F3D7"];
} else if (listModel.currency == 4) {
} else if (listModel.currency == 4 || listModel.classify == 6) {
self.currencyImageView.image = [UIImage imageNamed:@"icon_taskCenter_firefly"];
self.awardLabel.textColor = [UIColor colorWithHex:@"#00F088"];
self.addlabel.textColor = [UIColor colorWithHex:@"#00F088"];
} else if (listModel.currency == 5) {
} else if (listModel.currency == 5 || listModel.classify == 5) {
self.currencyImageView.image = [UIImage imageNamed:@"icon_taskCenter_small"];
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"];
}
if ([NSString isNullWithString:listModel.tagValue]) {
self.awardLabel.text = [NSString stringWithFormat:@"%ld",(long)listModel.award];
} else {
self.awardLabel.text = listModel.tagValue;
}
self.expTimeLabel.hidden = YES;
_detailLabel.text = listModel.taskDescription;
switch (listModel.state) {
case 0:
......@@ -92,6 +102,48 @@
default:
break;
}
if (listModel.countDownTime.integerValue > 0) {
self.expTimeLabel.attributedText = [self fus_timeAttrWithExpirTime:listModel.countDownTime.integerValue];
self.expTimeLabel.hidden = NO;
}
}
- (NSAttributedString *)fus_timeAttrWithExpirTime:(NSInteger)expirTime {
NSInteger min = expirTime / 60;
NSInteger hour = min / 60;
NSInteger day = hour / 24;
NSString *time = @"";
NSString *timeStr = @"";
UIColor *timeColor = [UIColor colorWithHex:@"#E94F4C"];
if (day > 0) {
time = [NSString stringWithFormat:@"%zd",day];
timeStr = [NSString stringWithFormat:@"%@%@",time,[NSString fus_localString:@"天"]];
} else if (hour > 0) {
time = [NSString stringWithFormat:@"%zd",hour];
timeStr = [NSString stringWithFormat:@"%@%@",time,[NSString fus_localString:@"小时"]];
} else {
time = [NSString stringWithFormat:@"%zd",min];
timeStr = [NSString stringWithFormat:@"%@%@",time,[NSString fus_localString:@"分钟"]];
}
timeStr = [NSString stringWithFormat:[NSString fus_localString:@"%@后过期"], timeStr];
NSMutableAttributedString *timeAttr = [[NSMutableAttributedString alloc] initWithString:timeStr attributes:@{NSFontAttributeName:[UIFont fus_themeMediumFont:8], NSForegroundColorAttributeName:[UIColor colorWithHex:@"#5E6772"]}];
NSRange range = [timeStr rangeOfString:time];
if (range.location != kCFNotFound) {
[timeAttr addAttribute:NSForegroundColorAttributeName value:timeColor range:range];
}
return timeAttr;
}
// 任务处理
......
......@@ -3,7 +3,7 @@
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -56,6 +56,7 @@
<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"/>
</constraints>
</imageView>
......@@ -74,9 +75,16 @@
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vuj-9P-CdU">
<rect key="frame" x="252.5" y="49.5" width="25.5" height="14"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="10"/>
<color key="textColor" red="0.36862745099999999" green="0.4039215686" blue="0.44705882349999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="oRB-IO-xec" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="18N-mi-4py"/>
<constraint firstItem="vuj-9P-CdU" firstAttribute="centerX" secondItem="VBv-Bq-UZB" secondAttribute="centerX" id="44f-Ty-4GL"/>
<constraint firstItem="EoZ-uN-sDh" firstAttribute="centerY" secondItem="OIs-kk-Wve" secondAttribute="centerY" id="Aeq-Zk-uba"/>
<constraint firstItem="jPO-cN-3hQ" firstAttribute="leading" secondItem="EoZ-uN-sDh" secondAttribute="trailing" id="Azo-Nv-WxT"/>
<constraint firstItem="VBv-Bq-UZB" firstAttribute="leading" secondItem="iwt-SR-z91" secondAttribute="trailing" constant="10" id="BgI-Yb-Ecc"/>
......@@ -84,6 +92,7 @@
<constraint firstItem="23y-Os-R55" firstAttribute="bottom" secondItem="H2p-sc-9uM" secondAttribute="bottom" id="DaC-yq-RVq"/>
<constraint firstItem="OIs-kk-Wve" firstAttribute="centerY" secondItem="oRB-IO-xec" secondAttribute="centerY" id="ITc-sE-Hm2"/>
<constraint firstItem="iwt-SR-z91" firstAttribute="top" secondItem="oRB-IO-xec" secondAttribute="bottom" constant="6.5" id="IUA-Ca-FMF"/>
<constraint firstItem="vuj-9P-CdU" firstAttribute="top" secondItem="VBv-Bq-UZB" secondAttribute="bottom" id="Ing-O9-ldj"/>
<constraint firstItem="iwt-SR-z91" firstAttribute="leading" secondItem="oRB-IO-xec" secondAttribute="leading" id="TWt-J1-Pgv"/>
<constraint firstItem="OIs-kk-Wve" firstAttribute="leading" secondItem="oRB-IO-xec" secondAttribute="trailing" constant="5" id="Y5y-4S-hMF"/>
<constraint firstItem="EoZ-uN-sDh" firstAttribute="leading" secondItem="OIs-kk-Wve" secondAttribute="trailing" id="iB3-Op-78U"/>
......@@ -102,6 +111,7 @@
<outlet property="awardLabel" destination="jPO-cN-3hQ" id="52F-lQ-Sil"/>
<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="operationBtn" destination="VBv-Bq-UZB" id="0RD-iD-3Hb"/>
<outlet property="taskNameLabel" destination="oRB-IO-xec" id="szN-TL-KfO"/>
</connections>
......
......@@ -37,6 +37,8 @@
@property (nonatomic, strong) NSTimer *countTimer;
@property (weak, nonatomic) IBOutlet UIImageView *userNewImageView;
@end
@implementation FUSTaskCenterProcessTableViewCell
......@@ -57,15 +59,17 @@
[self.taskImageView setWebImageWithSubURLString:listModel.icon placeholder:nil];
self.taskTitleLabel.text = listModel.taskName;
self.awardLabel.text = [NSString stringWithFormat:@"%ld",(long)listModel.award];
if (listModel.currency == 3) {
//classify: 物品分类(1:道具、2:礼物、3:座驾、4:宝石、5:露水、6:萤火)
if (listModel.currency == 3 || listModel.classify == 4) {
self.awardImageView.image = [UIImage imageNamed:@"icon_taskCenter_gem"];
self.awardLabel.textColor = [UIColor colorWithHex:@"#00F3D7"];
self.addLabel.textColor = [UIColor colorWithHex:@"#00F3D7"];
} else if (listModel.currency == 4) {
} else if (listModel.currency == 4 || listModel.classify == 6) {
self.awardImageView.image = [UIImage imageNamed:@"icon_taskCenter_firefly"];
self.awardLabel.textColor = [UIColor colorWithHex:@"#00F088"];
self.addLabel.textColor = [UIColor colorWithHex:@"#00F088"];
} else if (listModel.currency == 5) {
} else if (listModel.currency == 5 || listModel.classify == 5) {
self.awardImageView.image = [UIImage imageNamed:@"icon_taskCenter_small"];
self.awardLabel.textColor = [UIColor colorWithHex:@"#58C1FF"];
self.addLabel.textColor = [UIColor colorWithHex:@"#58C1FF"];
......@@ -79,16 +83,17 @@
self.awardImageView.image = [UIImage imageNamed:@"icon_taskCenter_battle_pink"];
self.awardLabel.textColor = [UIColor colorWithHex:@"#FE29FE"];
self.addLabel.textColor = [UIColor colorWithHex:@"#FE29FE"];
} else {
if (![NSString isNullWithString:listModel.tagUrl]) {
[self.awardImageView setWebImageWithSubURLString:listModel.tagUrl];
}
if (listModel.award == 0) {
self.addLabel.hidden = YES;
self.awardImageView.hidden = YES;
self.awardLabel.hidden = YES;
}else{
self.addLabel.hidden = NO;
self.awardImageView.hidden = NO;
self.awardLabel.hidden = NO;
if (![NSString isNullWithString:listModel.tagValue]) {
self.awardLabel.text = listModel.tagValue;
self.awardLabel.textColor = [UIColor colorWithHex:@"#ebebeb"];
self.addLabel.textColor = [UIColor colorWithHex:@"#ebebeb"];
}
}
_detailLabel.text = listModel.taskDescription;
......@@ -118,6 +123,7 @@
break;
case 3:
{
if (listModel.classify == 0) {
// v5.8 都不显示已领取
NSString *time = [FUSTimeLabelFormatHelper fus_getTimeLabelWithSecond:listModel.countDownTime.integerValue];
self.operationBtn.style = FUSButtonStyleBlueBorder;
......@@ -125,12 +131,27 @@
self.operationBtn.enabled = NO;
_countTimer = [NSTimer timerWithTimeInterval:1 target:[YYWeakProxy proxyWithTarget:self] selector:@selector(startCountTimer) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:_countTimer forMode:NSDefaultRunLoopMode];
} else {
self.operationBtn.style = FUSButtonStyleGrayBorder;
[self.operationBtn setTitle:[NSString fus_localString:@"已领取"] forState:UIControlStateNormal];
self.operationBtn.enabled = NO;
}
}
break;
case -1:
{
[self.operationBtn setTitle:[NSString fus_localString:@"查看详情"] forState:UIControlStateNormal];
[self.operationBtn sizeToFit];
self.operationBtn.style = FUSButtonStyleBlueBorder;
self.taskProcessLabel.text = @"";
self.operationBtn.enabled = YES;
}
default:
break;
}
_btnConstrant.constant = 70;
if (listModel.fulfill == 0) {
self.taskProcessViewWidthCons.constant = 0;
} else {
......@@ -144,23 +165,40 @@
self.taskProcessLabel.text = @"";
}
if (self.anchorType == 4) {
[self.operationBtn setTitle:FUSLocalizationHelper.localString(@"查看详情") forState:UIControlStateNormal];
// self.taskProcessLabel.text = [NSString stringWithFormat:@"%ld%@",(long)listModel.fulfill / 3600,FUSLocalizationHelper.localString(@"小时")];
self.taskProcessLabel.text = @"";
// self.addLabel.hidden = YES;
// self.awardImageView.hidden = YES;
// self.awardLabel.hidden = YES;
[self.operationBtn sizeToFit];
_btnConstrant.constant = (self.operationBtn.width + 30) < 85 ? 85 : (self.operationBtn.width + 30);
}
else {
// if (self.anchorType == 4) {
// [self.operationBtn setTitle:FUSLocalizationHelper.localString(@"查看详情") forState:UIControlStateNormal];
//// self.taskProcessLabel.text = [NSString stringWithFormat:@"%ld%@",(long)listModel.fulfill / 3600,FUSLocalizationHelper.localString(@"小时")];
// self.taskProcessLabel.text = @"";
//// self.addLabel.hidden = YES;
//// self.awardImageView.hidden = YES;
//// self.awardLabel.hidden = YES;
// [self.operationBtn sizeToFit];
// _btnConstrant.constant = (self.operationBtn.width + 30) < 85?70:(self.operationBtn.width + 30);
_btnConstrant.constant = 85;
// _btnConstrant.constant = (self.operationBtn.width + 30) < 85 ? 85 : (self.operationBtn.width + 30);
// }
// else {
//// [self.operationBtn sizeToFit];
//// _btnConstrant.constant = (self.operationBtn.width + 30) < 85?70:(self.operationBtn.width + 30);
// _btnConstrant.constant = 85;
// }
[self.userNewImageView setWebImageWithSubURLString:listModel.tagUrl];
if (listModel.tagUrl.length > 0 && listModel.tagValue.length == 0) {
[self isHiddeAwardAboutView:YES];
self.userNewImageView.hidden = NO;
}else {
[self isHiddeAwardAboutView:(listModel.award == 0 && listModel.tagValue.length == 0)];
self.userNewImageView.hidden = YES;
}
}
- (void)isHiddeAwardAboutView:(BOOL)isHidden {
self.addLabel.hidden = isHidden;
self.awardImageView.hidden = isHidden;
self.awardLabel.hidden = isHidden;
}
- (void)startCountTimer{
NSInteger count = _listModel.countDownTime.integerValue - 1;
NSString *time = [FUSTimeLabelFormatHelper fus_getTimeLabelWithSecond:count];
......
......@@ -3,7 +3,7 @@
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -80,6 +80,13 @@
<color key="textColor" red="0.50196078430000002" green="0.50196078430000002" blue="0.50196078430000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="LY8-LS-tb6">
<rect key="frame" x="83" y="17" width="37" height="13"/>
<constraints>
<constraint firstAttribute="width" constant="37" id="5Qw-fE-SAY"/>
<constraint firstAttribute="height" constant="13" id="FM4-5q-EW2"/>
</constraints>
</imageView>
<view alpha="0.10000000000000001" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qPl-w4-kgo">
<rect key="frame" x="20" y="70" width="290" height="1"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......@@ -95,7 +102,9 @@
<constraint firstItem="EyC-iH-DvF" firstAttribute="leading" secondItem="bfp-Ws-YBS" secondAttribute="trailing" constant="2.5" id="9QZ-C5-PnA"/>
<constraint firstItem="RbH-RC-F8l" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="RyB-oG-Lqu" secondAttribute="trailing" constant="10" id="Gj8-Rn-sGs"/>
<constraint firstItem="02L-RB-ltf" firstAttribute="centerY" secondItem="bfp-Ws-YBS" secondAttribute="centerY" id="ItL-Ds-I0a"/>
<constraint firstItem="LY8-LS-tb6" firstAttribute="centerY" secondItem="EyC-iH-DvF" secondAttribute="centerY" id="LXG-jW-f3L"/>
<constraint firstItem="8v6-UE-dIy" firstAttribute="top" secondItem="bfp-Ws-YBS" secondAttribute="bottom" constant="2" id="VJA-Te-U8A"/>
<constraint firstItem="LY8-LS-tb6" firstAttribute="leading" secondItem="02L-RB-ltf" secondAttribute="leading" id="c16-bJ-Sva"/>
<constraint firstItem="tf8-FL-2d5" firstAttribute="centerY" secondItem="02L-RB-ltf" secondAttribute="centerY" id="fAf-Xl-UeK"/>
<constraint firstItem="RyB-oG-Lqu" firstAttribute="leading" secondItem="tf8-FL-2d5" secondAttribute="trailing" id="fpZ-ba-PCb"/>
<constraint firstAttribute="trailing" secondItem="qPl-w4-kgo" secondAttribute="trailing" constant="10" id="jiC-dH-ow9"/>
......@@ -121,6 +130,7 @@
<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"/>
<outlet property="userNewImageView" destination="LY8-LS-tb6" id="vD2-jr-NKl"/>
</connections>
<point key="canvasLocation" x="137.59999999999999" y="154.27286356821591"/>
</tableViewCell>
......
......@@ -58,6 +58,16 @@
</array>
<key>UILaunchStoryboardName</key>
<string>Launch Screen.storyboard</string>
<key>FacebookAdvertiserIDCollectionEnabled</key>
<true/>
<key>FacebookAppID</key>
<string>382456482257502</string>
<key>FacebookAutoLogAppEventsEnabled</key>
<true/>
<key>FacebookClientToken</key>
<string>045478b9202f7c4913ab5366eaf15f8a</string>
<key>FacebookDisplayName</key>
<string>FuSiLive</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
......@@ -74,5 +84,64 @@
<false/>
<key>WKRunsIndependentlyOfCompanionApp</key>
<false/>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>wx841161213eec2b1e</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.947338508181-9sfdiut7e0jh50iaj3941omkmetfq0f4</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.547078700214-7076tus60ip8jt1eeno7iu56f9efb2kr</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>twitterkit-cEGECNgXN3ZN00r3Zb82vwh55</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb382456482257502</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>FusiLive</string>
</array>
</dict>
</array>
</dict>
</plist>
......@@ -8,18 +8,17 @@
"CFBundleDisplayName" = "FuSi Live";
//"UILaunchStoryboardName" = "LaunchScreen-English";
"NSCameraUsageDescription" = "يرغب FuSi Live بالوصول إلى الكاميرا الخاصة بك، ثم يمكنك أن تقم البث أو تصوير الفيديو";
"NSCameraUsageDescription" = "يرغب FuSi Show بالوصول إلى الكاميرا الخاصة بك، ثم يمكنك أن تقم البث أو تصوير الفيديو";
"NSContactsUsageDescription" = "يرغب FuSi Live بالوصول إلى اتصال جهات الاتصال، ثم يمكنك أن تدعو أصدقائك للانضام";
"NSContactsUsageDescription" = "يرغب FuSi Show بالوصول إلى اتصال جهات الاتصال، ثم يمكنك أن تدعو أصدقائك للانضام";
"NSMicrophoneUsageDescription" = "يرغب FuSi Live بالوصول إلى الميكروفون الخاص بك، ثم يمكنك الاستماع إلى صوت البث أو المكالمة";
"NSMicrophoneUsageDescription" = "يرغب FuSi Show بالوصول إلى الميكروفون الخاص بك، ثم يمكنك الاستماع إلى صوت البث أو المكالمة";
"NSLocationWhenInUseUsageDescription" = "يرغب FuSi Live بالوصول إلى الموقع أثناء تفعيل التطبيق للعثور على بث أو فيديو بالقرب منك";
"NSLocationWhenInUseUsageDescription" = "يرغب FuSi Show بالوصول إلى الموقع أثناء تفعيل التطبيق للعثور على بث أو فيديو بالقرب منك";
"NSLocationAlwaysUsageDescription" = "يرغب FuSi Live بالوصول إلى الموقع أثناء تفعيل التطبيق للعثور على بث أو فيديو بالقرب منك";
"NSLocationAlwaysUsageDescription" = "يرغب FuSi Show بالوصول إلى الموقع أثناء تفعيل التطبيق للعثور على بث أو فيديو بالقرب منك";
"NSPhotoLibraryUsageDescription" = "يرغب FuSi Live بالوصول إلى الألبوم الخاصة بك لتحميل الصور";
"NSPhotoLibraryUsageDescription" = "يرغب FuSi Show بالوصول إلى الألبوم الخاصة بك لتحميل الصور";
"NSPhotoLibraryAddUsageDescription" = "يرغب FuSi Live بالوصول إلى الألبوم الخاصة بك لحفظ الصور";
"NSPhotoLibraryAddUsageDescription" = "يرغب FuSi Show بالوصول إلى الألبوم الخاصة بك لحفظ الصور";
......@@ -8,8 +8,6 @@
"CFBundleDisplayName" = "FuSi Live";
//"UILaunchStoryboardName" = "LaunchScreen-English";
"NSCameraUsageDescription" = "FuSi Live would like to Access the Camera. You can start LIVE or create videos";
"NSContactsUsageDescription" = "FuSi Live would like to Access the Contacts, you can invite your friends come to join us";
......@@ -20,6 +18,6 @@
"NSLocationAlwaysUsageDescription" = "Allow “FuSi Live” to access your location while you are using the app? Turn on Location Services to find nearby LIVE or videos";
"NSPhotoLibraryUsageDescription" = "FuSi Live” would like to Access your Photos to upload photos";
"NSPhotoLibraryUsageDescription" = "FuSi Live” would like to Access your Photos to upload photos";
"NSPhotoLibraryAddUsageDescription" = "FuSi Live” would like to Access your Photos to save photos";
"NSPhotoLibraryAddUsageDescription" = "FuSi Live” would like to Access your Photos to save photos";
/*
InfoPlist.strings
FuSiLive
Created by Xiang Liu on 2018/10/9.
Copyright © 2018年 压寨团队. All rights reserved.
*/
"CFBundleDisplayName" = "FuSi Live";
"NSCameraUsageDescription" = "FuSi Live desea acceder a la cámara. Puede iniciar LIVE o crear vídeos";
"NSContactsUsageDescription" = "FuSi Live desea acceder a los contactos, puedes invitar a tus amigos a unirse a nosotros";
"NSMicrophoneUsageDescription" = "FuSi Live desea acceder al micrófono para capturar el sonido de sus vídeos en directo";
"NSLocationWhenInUseUsageDescription" = "¿Permitir que “FuSi Live” acceda a su ubicación mientras usa la aplicación? Active los servicios de ubicación para buscar videos o LIVE cercanos";
"NSLocationAlwaysUsageDescription" = "¿Permitir que “FuSi Live” acceda a su ubicación mientras usa la aplicación? Active los servicios de ubicación para buscar videos o LIVE cercanos";
"NSPhotoLibraryUsageDescription" = "FuSi Live desea acceder a sus fotos para cargarlas";
"NSPhotoLibraryAddUsageDescription" = "FuSi Live desea acceder a sus fotos para guardarlas";
/*
/*
InfoPlist.strings
FuSiLive
......@@ -6,9 +6,8 @@
Copyright © 2018年 压寨团队. All rights reserved.
*/
"CFBundleDisplayName" = "FuSi Live";
//"UILaunchStoryboardName" = "LaunchScreen-English";
"CFBundleDisplayName" = "FuSi Live";
"NSCameraUsageDescription" = "FuSi Live memerlukan Akses ke Kamera. Anda dapat memulai Siaran Langsung atau membuat video";
......
......@@ -8,8 +8,6 @@
"CFBundleDisplayName" = "FuSi Live";
//"UILaunchStoryboardName" = "LaunchScreen-English";
"NSCameraUsageDescription" = "「FuSi Live」がカメラへのアクセスを要求しています生放送を開始したりビデオを作成することができるようになります";
"NSContactsUsageDescription" = "「FuSi Live」が連絡先へのアクセスを要求しています。お友達を招待することもできます";
......
......@@ -8,8 +8,6 @@
"CFBundleDisplayName" = "FuSi Live";
//"UILaunchStoryboardName" = "LaunchScreen-English";
"NSCameraUsageDescription" = "FuSi Live ต้องการเข้าถึงกล้องถ่ายรูป คุณสามารถเริ่มต้น ไลฟ์ หรือสร้างวิดีโอ";
"NSContactsUsageDescription" = "FuSi Live ต้องการเข้าถึงผู้ติดต่อ คุณสามารถเชิญชวนเพื่อนของคุณให้เข้าร่วมกับเราได้";
......
......@@ -8,8 +8,6 @@
"CFBundleDisplayName" = "FuSi Live";
//"UILaunchStoryboardName" = "LaunchScreen-English";
"NSCameraUsageDescription" = "Để bắt đầu phát trực tiếp, bạn cần truy cập vào máy ảnh của mình";
"NSContactsUsageDescription" = "Nhận sổ địa chỉ của bạn và mời bạn bè tham gia";
......
......@@ -6,9 +6,7 @@
Copyright © 2018年 压寨团队. All rights reserved.
*/
"CFBundleDisplayName" = "螢火蟲直播";
//"UILaunchStoryboardName" = "LaunchScreen-Chinese";
"CFBundleDisplayName" = "福斯直播";
"NSCameraUsageDescription" = "開啟直播,需要訪問您的相機哦";
......@@ -23,3 +21,4 @@
"NSPhotoLibraryUsageDescriptionn" = "獲取圖片,需要訪問您的相冊";
"NSPhotoLibraryAddUsageDescription" = "存儲圖片,需要訪問您的相冊";
......@@ -6,9 +6,7 @@
Copyright © 2018年 压寨团队. All rights reserved.
*/
"CFBundleDisplayName" = "螢火蟲直播";
//"UILaunchStoryboardName" = "LaunchScreen-Chinese";
"CFBundleDisplayName" = "福斯直播";
"NSCameraUsageDescription" = "開啟直播,需要訪問您的相機哦";
......
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