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() { |
... | @@ -44,6 +45,10 @@ import SwiftEventBus | ... | @@ -44,6 +45,10 @@ import SwiftEventBus |
44 | } | 45 | } |
45 | } | 46 | } |
46 | } | 47 | } |
48 | + | ||
49 | + if (loyaltyList.count > 0) { | ||
50 | + campaigns = campaigns + loyaltyList | ||
51 | + } | ||
47 | 52 | ||
48 | setBackButton() | 53 | setBackButton() |
49 | setNavigationTitle("GIFTS for YOU", "bold") | 54 | setNavigationTitle("GIFTS for YOU", "bold") |
... | @@ -112,6 +117,10 @@ import SwiftEventBus | ... | @@ -112,6 +117,10 @@ import SwiftEventBus |
112 | } | 117 | } |
113 | } | 118 | } |
114 | } | 119 | } |
120 | + | ||
121 | + if (self.loyaltyList.count > 0) { | ||
122 | + self.campaigns = self.campaigns + self.loyaltyList | ||
123 | + } | ||
115 | 124 | ||
116 | self.tableView.reloadData() | 125 | self.tableView.reloadData() |
117 | } | 126 | } | ... | ... |
-
Please register or login to post a comment