// 接口数据
NSString *stamp2 = [self getNowTimeTimestamp];
NSDictionary *para2 = @{@"pageNum":@0,@"userId":idString,@"signature":[Utils PHBMD5:stamp2],@"timestamp":stamp2};
[DealWithData getDataWith:getVideoUrl withParameters:para2 complement:^(id data) {
_dataArr = [data objectForKey:@"result"];
// NSLog(@"-------------------------%@",_dataArr);
// 回到主线程刷新网格
dispatch_async(dispatch_get_main_queue(), ^{
[_mainCollectionView reloadData];
});
}];
-
(NSString *)getNowTimeTimestamp{
NSDate *datenow = [NSDate date];//现在时间,你可以输出来看下是什么格式
NSString timeSp = [NSString stringWithFormat:@"%ld", (long)[datenow timeIntervalSince1970]1000];
NSLog(@"-=======-%@",timeSp);return timeSp;
}
网友评论