Showing
1 changed file
with
15 additions
and
0 deletions
... | @@ -2239,6 +2239,21 @@ public class swiftApi { | ... | @@ -2239,6 +2239,21 @@ public class swiftApi { |
2239 | 2239 | ||
2240 | 2240 | ||
2241 | public func getCampaignList() -> Array<CampaignItemModel> { | 2241 | public func getCampaignList() -> Array<CampaignItemModel> { |
2242 | + | ||
2243 | + let filteredCampaigns = GlobalVariables.campaigns.filter { | ||
2244 | + let tempCampaign = $0 | ||
2245 | + let isCcmsOffer = (tempCampaign.ccms_offer != nil) && (tempCampaign.ccms_offer != "") && (tempCampaign.ccms_offer == "true") | ||
2246 | + | ||
2247 | + return (!isCcmsOffer) | ||
2248 | + } | ||
2249 | + | ||
2250 | + print("getCampaignList:{" + String(filteredCampaigns.count) + "} campaigns") | ||
2251 | + | ||
2252 | + return filteredCampaigns | ||
2253 | + } | ||
2254 | + | ||
2255 | + | ||
2256 | + public func getAllCampaignList() -> Array<CampaignItemModel> { | ||
2242 | return GlobalVariables.campaigns | 2257 | return GlobalVariables.campaigns |
2243 | } | 2258 | } |
2244 | 2259 | ... | ... |
-
Please register or login to post a comment