Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2024-10-18 17:20:27 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d742a22c359d2316142021d92c427b84a6b3f93a
d742a22c
1 parent
77dcf0b3
fix smCouponsets data
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
4 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/CouponBarcodeViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
d742a22
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/CouponBarcodeViewController.swift
View file @
d742a22
...
...
@@ -78,6 +78,8 @@ import AVFoundation
public
var
isMarket
:
Bool
?
=
false
public
var
isSMCoupon
:
Bool
?
=
false
let
smCouponsetsList
=
swiftApi
()
.
getCouponSetsDealsList
()
public
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -120,7 +122,19 @@ import AVFoundation
// NEW COUPON KEYS (from couponset): inner_text, merchant_uuid
// MISSING KEYS (from couponset): img_preview, name, short_description, terms
let
couponSetData
:
swiftApi
.
CouponSetItemModel
?
=
coupon
?
.
couponset_data
// let couponSetData: swiftApi.CouponSetItemModel? = coupon?.couponset_data
var
couponSetData
:
swiftApi
.
CouponSetItemModel
?
if
(
isMarket
==
true
)
{
for
item
in
smCouponsetsList
{
if
(
item
.
uuid
==
coupon
?
.
couponset_uuid
)
{
couponSetData
=
item
break
;
}
}
}
else
{
couponSetData
=
coupon
?
.
couponset_data
}
if
(
isMarket
==
true
)
{
couponImage
.
load
(
link
:
coupon
?
.
image
??
""
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
...
...
@@ -185,7 +199,8 @@ import AVFoundation
if
(
isMarket
==
true
)
{
couponImage
.
contentMode
=
.
scaleAspectFit
nameLabel
.
text
=
coupon
?
.
name
??
""
// nameLabel.text = coupon?.name ?? ""
nameLabel
.
text
=
couponSetData
?
.
name
??
""
// discriptionLabel.text = coupon?.short_description ?? ""
// let htmlName = coupon?.inner_text ?? ""
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
View file @
d742a22
...
...
@@ -3588,7 +3588,11 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
[
data
setValue
:
active
forKey
:
@"active"
];
[
data
setValue
:
@"retrieve_multilingual"
forKey
:
@"action"
];
[
data
setValue
:
visible
forKey
:
@"visible"
];
if
(
visible
==
nil
)
{
[
data
setValue
:[
NSNull
null
]
forKey
:
@"visible"
];
}
else
{
[
data
setValue
:
visible
forKey
:
@"visible"
];
}
[
data
setValue
:
LANG
forKey
:
@"language"
];
if
(
uuids
&&
[
uuids
count
]
>
0
)
{
[
data
setValue
:
uuids
forKey
:
@"uuids"
];
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
d742a22
...
...
@@ -660,7 +660,7 @@ public class swiftApi {
var
couponSets
:
[
AnyHashable
:
Any
]?
var
couponSetsArray
:
Array
<
CouponSetItemModel
>
=
[]
instanceOfMyApi
.
getCouponsetsDealsAsync
(
true
,
andVisible
:
true
,
andUuids
:
nil
,
couponSetsCallback
,
failureBlock
:
couponSetsFailureCallback
)
instanceOfMyApi
.
getCouponsetsDealsAsync
(
true
,
andVisible
:
nil
,
andUuids
:
nil
,
couponSetsCallback
,
failureBlock
:
couponSetsFailureCallback
)
func
couponSetsCallback
(
_
couponSetsData
:
[
AnyHashable
:
Any
]?)
->
Void
{
...
...
Please
register
or
login
to post a comment