Showing
2 changed files
with
13 additions
and
2 deletions
No preview for this file type
... | @@ -209,7 +209,7 @@ extension CouponBarcodeView { | ... | @@ -209,7 +209,7 @@ extension CouponBarcodeView { |
209 | } | 209 | } |
210 | .frame(maxWidth: .infinity) | 210 | .frame(maxWidth: .infinity) |
211 | 211 | ||
212 | - if (CharacterSet.decimalDigits.isSuperset(of: CharacterSet(charactersIn: "1234567891234"))) { | 212 | + if (CharacterSet.decimalDigits.isSuperset(of: CharacterSet(charactersIn: coupon["coupon"] as? String ?? ""))) { |
213 | VStack(alignment: .center) { | 213 | VStack(alignment: .center) { |
214 | VStack {} | 214 | VStack {} |
215 | .frame(height: 1) | 215 | .frame(height: 1) |
... | @@ -373,6 +373,18 @@ extension CouponBarcodeView { | ... | @@ -373,6 +373,18 @@ extension CouponBarcodeView { |
373 | } | 373 | } |
374 | .frame(width:self.uiscreen.width) | 374 | .frame(width:self.uiscreen.width) |
375 | .frame(maxHeight: .infinity) | 375 | .frame(maxHeight: .infinity) |
376 | + .onAppear { | ||
377 | + // If you want to setup data with model | ||
378 | + // couponset = CouponSetItemModel(dictionary: coupon) | ||
379 | + | ||
380 | + print("==================") | ||
381 | + print(coupon["coupon"] as? String ?? "") | ||
382 | + print("==================") | ||
383 | + | ||
384 | + print("========constructBarcode()==========") | ||
385 | + print(constructBarcode() ?? "") | ||
386 | + print("========constructBarcode()==========") | ||
387 | + } | ||
376 | } | 388 | } |
377 | } | 389 | } |
378 | 390 | ||
... | @@ -431,7 +443,6 @@ struct CouponBarcodeView: View { | ... | @@ -431,7 +443,6 @@ struct CouponBarcodeView: View { |
431 | // .onAppear { | 443 | // .onAppear { |
432 | // // If you want to setup data with model | 444 | // // If you want to setup data with model |
433 | // couponset = CouponSetItemModel(dictionary: coupon) | 445 | // couponset = CouponSetItemModel(dictionary: coupon) |
434 | -// | ||
435 | // } | 446 | // } |
436 | } | 447 | } |
437 | } | 448 | } | ... | ... |
-
Please register or login to post a comment