Showing
1 changed file
with
16 additions
and
0 deletions
... | @@ -59,6 +59,22 @@ import SwiftEventBus | ... | @@ -59,6 +59,22 @@ import SwiftEventBus |
59 | let couponEvent = swiftApi.CouponEventModel() | 59 | let couponEvent = swiftApi.CouponEventModel() |
60 | SwiftEventBus.post("coupon_retrieved", sender: couponEvent) | 60 | SwiftEventBus.post("coupon_retrieved", sender: couponEvent) |
61 | 61 | ||
62 | + swiftApi().getCouponsAsync(getCouponsCallback) | ||
63 | + | ||
64 | + func getCouponsCallback (_ couponsData: Array<swiftApi.CouponItemModel>?) -> Void { | ||
65 | + if (couponsData != nil) { | ||
66 | + | ||
67 | + DispatchQueue.main.async { | ||
68 | + print("========= getCouponsRequest SUCCESSSS CampaignVC =========") | ||
69 | + | ||
70 | + print("========= getCouponsRequest count CampaignVC =========") | ||
71 | + print(swiftApi().getCouponList().count) | ||
72 | + } | ||
73 | + } else { | ||
74 | + print("========= getCouponsRequest ERROR CampaignVC =========") | ||
75 | + } | ||
76 | + } | ||
77 | + | ||
62 | } else if (eventArray[1] == "couponShared") { | 78 | } else if (eventArray[1] == "couponShared") { |
63 | 79 | ||
64 | } | 80 | } | ... | ... |
-
Please register or login to post a comment