|
@@ -79,11 +79,17 @@
|
|
[KSNetworkingManager helpCenterContentListRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
|
|
[KSNetworkingManager helpCenterContentListRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
|
|
if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
|
|
if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
|
|
NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
|
|
NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
|
|
- for (NSDictionary *parm in sourceArray) {
|
|
|
|
|
|
+ if (sourceArray.count) {
|
|
|
|
+ NSDictionary *parm = [sourceArray firstObject];
|
|
NoticeSourceModel *bannerModel = [[NoticeSourceModel alloc] initWithDictionary:parm];
|
|
NoticeSourceModel *bannerModel = [[NoticeSourceModel alloc] initWithDictionary:parm];
|
|
[self.bannerArray addObject:bannerModel];
|
|
[self.bannerArray addObject:bannerModel];
|
|
[self.titleArray addObject:bannerModel.title];
|
|
[self.titleArray addObject:bannerModel.title];
|
|
}
|
|
}
|
|
|
|
+ else {
|
|
|
|
+ self.bannerArray = [NSMutableArray array];
|
|
|
|
+ self.titleArray = [NSMutableArray array];
|
|
|
|
+ }
|
|
|
|
+
|
|
[self refreshBanner];
|
|
[self refreshBanner];
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -300,7 +306,7 @@
|
|
if (!_noticeScrollView) {
|
|
if (!_noticeScrollView) {
|
|
_noticeScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:[UIImage new]];
|
|
_noticeScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:[UIImage new]];
|
|
_noticeScrollView.onlyDisplayText = YES;
|
|
_noticeScrollView.onlyDisplayText = YES;
|
|
- _noticeScrollView.autoScroll = YES;
|
|
|
|
|
|
+ _noticeScrollView.autoScroll = NO;
|
|
_noticeScrollView.scrollDirection = UICollectionViewScrollDirectionVertical;
|
|
_noticeScrollView.scrollDirection = UICollectionViewScrollDirectionVertical;
|
|
_noticeScrollView.titleLabelTextColor = HexRGB(0x1a1a1a);
|
|
_noticeScrollView.titleLabelTextColor = HexRGB(0x1a1a1a);
|
|
_noticeScrollView.titleLabelBackgroundColor = [UIColor whiteColor];
|
|
_noticeScrollView.titleLabelBackgroundColor = [UIColor whiteColor];
|