From 76c20c2658c23126fcb17561e9a70b6616e99a68 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Mon, 27 May 2024 22:18:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8B=AC=EC=82=AC=EC=9A=A9=20=EA=B3=84?= =?UTF-8?q?=EC=A0=95=EC=9D=B4=20=EC=95=84=EB=8B=8C=20=EA=B3=B3=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EA=B0=80=EA=B2=A9=20*=20110=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C=EB=90=98=EB=8A=94=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Content/Detail/ContentDetailView.swift | 2 +- .../Detail/ContentOrderDialogView.swift | 24 ++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/SodaLive/Sources/Content/Detail/ContentDetailView.swift b/SodaLive/Sources/Content/Detail/ContentDetailView.swift index 0249e40..649ba07 100644 --- a/SodaLive/Sources/Content/Detail/ContentDetailView.swift +++ b/SodaLive/Sources/Content/Detail/ContentDetailView.swift @@ -233,7 +233,7 @@ struct ContentDetailView: View { orderType: orderType, contentId: audioContent.contentId, title: audioContent.title, - can: orderType == .RENTAL ? Int(ceil(Double(audioContent.price) * 0.6)) : audioContent.price + can: !audioContent.isOnlyRental && orderType == .RENTAL ? Int(ceil(Double(audioContent.price) * 0.6)) : audioContent.price ) ) } else { diff --git a/SodaLive/Sources/Content/Detail/ContentOrderDialogView.swift b/SodaLive/Sources/Content/Detail/ContentOrderDialogView.swift index 91c1527..503f0a6 100644 --- a/SodaLive/Sources/Content/Detail/ContentOrderDialogView.swift +++ b/SodaLive/Sources/Content/Detail/ContentOrderDialogView.swift @@ -46,9 +46,15 @@ struct ContentOrderDialogView: View { .frame(width: 16.7, height: 16.7) } - Text(isOnlyRental ? "\(price * 110)" : "\(Int(ceil(Double(price) * 0.6)) * 110)") - .font(.custom(Font.bold.rawValue, size: 13.3)) - .foregroundColor(Color.grayee) + if UserDefaults.int(forKey: .userId) == 17958 { + Text(isOnlyRental ? "\(price * 110)" : "\(Int(ceil(Double(price) * 0.6)) * 110)") + .font(.custom(Font.bold.rawValue, size: 13.3)) + .foregroundColor(Color.grayee) + } else { + Text(isOnlyRental ? "\(price)" : "\(Int(ceil(Double(price) * 0.6)))") + .font(.custom(Font.bold.rawValue, size: 13.3)) + .foregroundColor(Color.grayee) + } if UserDefaults.int(forKey: .userId) == 17958 { Text("원") @@ -87,9 +93,15 @@ struct ContentOrderDialogView: View { .frame(width: 16.7, height: 16.7) } - Text("\(price * 110)") - .font(.custom(Font.bold.rawValue, size: 13.3)) - .foregroundColor(Color.grayee) + if UserDefaults.int(forKey: .userId) == 17958 { + Text("\(price * 110)") + .font(.custom(Font.bold.rawValue, size: 13.3)) + .foregroundColor(Color.grayee) + } else { + Text("\(price)") + .font(.custom(Font.bold.rawValue, size: 13.3)) + .foregroundColor(Color.grayee) + } if UserDefaults.int(forKey: .userId) == 17958 { Text("원")