Showing
1 changed file
with
10 additions
and
1 deletions
... | @@ -13,9 +13,10 @@ import SwiftEventBus | ... | @@ -13,9 +13,10 @@ import SwiftEventBus |
13 | @IBOutlet weak var mainView: UIView! | 13 | @IBOutlet weak var mainView: UIView! |
14 | @IBOutlet weak var tableView: UITableView! | 14 | @IBOutlet weak var tableView: UITableView! |
15 | 15 | ||
16 | - public var campaigns:Array<swiftApi.CampaignItemModel> = swiftApi().mergeGFYCCMSLoyaltyCampaigns(campaigns: swiftApi().getCCMSLoyaltyCampaigns()) | 16 | + public var campaigns:Array<swiftApi.CampaignItemModel> = [] |
17 | public var seasonalList:Array<swiftApi.LoyaltyGiftsForYouPackage> = swiftApi().getSeasonalList() | 17 | public var seasonalList:Array<swiftApi.LoyaltyGiftsForYouPackage> = swiftApi().getSeasonalList() |
18 | public var ccmsList:Array<swiftApi.LoyaltyContextualOfferModel> = swiftApi().getCCMSLoyaltyCampaigns() | 18 | public var ccmsList:Array<swiftApi.LoyaltyContextualOfferModel> = swiftApi().getCCMSLoyaltyCampaigns() |
19 | + public var loyaltyList:Array<swiftApi.CampaignItemModel> = swiftApi().mergeGFYCCMSLoyaltyCampaigns(campaigns: swiftApi().getCCMSLoyaltyCampaigns()) | ||
19 | 20 | ||
20 | 21 | ||
21 | public override func viewDidLoad() { | 22 | public override func viewDidLoad() { |
... | @@ -45,6 +46,10 @@ import SwiftEventBus | ... | @@ -45,6 +46,10 @@ import SwiftEventBus |
45 | } | 46 | } |
46 | } | 47 | } |
47 | 48 | ||
49 | + if (loyaltyList.count > 0) { | ||
50 | + campaigns = campaigns + loyaltyList | ||
51 | + } | ||
52 | + | ||
48 | setBackButton() | 53 | setBackButton() |
49 | setNavigationTitle("GIFTS for YOU", "bold") | 54 | setNavigationTitle("GIFTS for YOU", "bold") |
50 | 55 | ||
... | @@ -113,6 +118,10 @@ import SwiftEventBus | ... | @@ -113,6 +118,10 @@ import SwiftEventBus |
113 | } | 118 | } |
114 | } | 119 | } |
115 | 120 | ||
121 | + if (self.loyaltyList.count > 0) { | ||
122 | + self.campaigns = self.campaigns + self.loyaltyList | ||
123 | + } | ||
124 | + | ||
116 | self.tableView.reloadData() | 125 | self.tableView.reloadData() |
117 | } | 126 | } |
118 | 127 | ... | ... |
-
Please register or login to post a comment