1.UI修改
2.修复bug
This commit is contained in:
@@ -332,39 +332,46 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
- (void)bindCodeSuccess{
|
||||
[self completeUserInfo];
|
||||
}
|
||||
|
||||
///
|
||||
///缓存礼物特效
|
||||
-(void)requestGiftList{
|
||||
[self dealWithDefaultSvga];
|
||||
[self dealWithGiftList];
|
||||
///所有礼物接口,缓存礼物,保存时间,一天只请求一次
|
||||
// NSString *time = [NSDate getNowTimeTimestamp];
|
||||
// NSString *curTime = [NSDate timestampSwitchTime:[time integerValue] andFormatter:@"yyyy-MM-dd"];
|
||||
// NSDictionary *timeDic = [[NSUserDefaults standardUserDefaults]valueForKey:@"kRequestGiftList"];
|
||||
// if(timeDic == nil){
|
||||
// NSMutableDictionary *curDic = [[NSMutableDictionary alloc]initWithDictionary:timeDic];
|
||||
// [curDic setValue:@(YES) forKey:curTime];
|
||||
// [[NSUserDefaults standardUserDefaults]setValue:curDic forKey:@"kRequestGiftList"];
|
||||
// [[NSUserDefaults standardUserDefaults]synchronize];
|
||||
// }else{
|
||||
// if(timeDic[curTime]!= nil)return;
|
||||
// NSMutableDictionary *curDic = [[NSMutableDictionary alloc]initWithDictionary:timeDic];
|
||||
// [curDic removeAllObjects];
|
||||
// [curDic setValue:@(YES) forKey:curTime];
|
||||
// [[NSUserDefaults standardUserDefaults]setValue:curDic forKey:@"kRequestGiftList"];
|
||||
// [[NSUserDefaults standardUserDefaults]synchronize];
|
||||
// }
|
||||
[Api requestCacheGiftDynamicEffectList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
NSArray *list = data.data;
|
||||
NSSet *setList = [[NSSet alloc]initWithArray:list];
|
||||
for (NSString *url in setList) {
|
||||
NSString *encodingUrl = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
|
||||
[self cacheGiftDynamicEffectList:encodingUrl];
|
||||
|
||||
@kWeakify(self);
|
||||
[[AFNetworkReachabilityManager sharedManager] startMonitoring];
|
||||
[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
|
||||
@kStrongify(self);
|
||||
switch (status) {
|
||||
case AFNetworkReachabilityStatusUnknown:
|
||||
break;
|
||||
case AFNetworkReachabilityStatusNotReachable:
|
||||
|
||||
break;
|
||||
case AFNetworkReachabilityStatusReachableViaWWAN:
|
||||
case AFNetworkReachabilityStatusReachableViaWiFi:
|
||||
{
|
||||
if(self.isFirstReachability == NO){
|
||||
[self dealWithDefaultSvga];
|
||||
[self dealWithGiftList];
|
||||
[Api requestCacheGiftDynamicEffectList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
self.isFirstReachability = YES;
|
||||
NSArray *list = data.data;
|
||||
NSSet *setList = [[NSSet alloc]initWithArray:list];///去重,防止有重复的
|
||||
for (NSString *url in setList) {
|
||||
NSString *encodingUrl = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
|
||||
[self cacheGiftDynamicEffectList:encodingUrl];
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)dealWithDefaultSvga{
|
||||
|
Reference in New Issue
Block a user