콘텐츠 상세
- 소장만, 대여만 가능시 구매하기 버튼 배경색 변경 - 소장만, 대여만 가능시 구매하기 버튼을 터치하면 바로 구매확인 다이얼로그 표시
This commit is contained in:
@@ -12,9 +12,15 @@ struct ContentOrderConfirmDialogView: View {
|
||||
|
||||
@Binding var isShowing: Bool
|
||||
|
||||
let audioContent: GetAudioContentDetailResponse
|
||||
let title: String
|
||||
let price: Int
|
||||
let duration: String
|
||||
let themeStr: String
|
||||
let coverImageUrl: String
|
||||
let creatorNickname: String
|
||||
let creatorProfileImageUrl: String
|
||||
|
||||
let orderType: OrderType
|
||||
let isOnlyRental: Bool
|
||||
let onClickConfirm: () -> Void
|
||||
|
||||
var body: some View {
|
||||
@@ -31,7 +37,7 @@ struct ContentOrderConfirmDialogView: View {
|
||||
|
||||
HStack(spacing: 11) {
|
||||
ZStack(alignment: .topLeading) {
|
||||
KFImage(URL(string: audioContent.coverImageUrl))
|
||||
KFImage(URL(string: coverImageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(
|
||||
size: CGSize(
|
||||
@@ -46,20 +52,20 @@ struct ContentOrderConfirmDialogView: View {
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(audioContent.themeStr)
|
||||
Text(themeStr)
|
||||
.font(.custom(Font.medium.rawValue, size: 8))
|
||||
.foregroundColor(Color(hex: "3bac6a"))
|
||||
.padding(2.3)
|
||||
.background(Color(hex: "28312b"))
|
||||
.cornerRadius(2)
|
||||
|
||||
Text(audioContent.title)
|
||||
Text(title)
|
||||
.font(.custom(Font.bold.rawValue, size: 11.3))
|
||||
.foregroundColor(Color.grayd2)
|
||||
.padding(.top, 2)
|
||||
|
||||
HStack(spacing: 4.3) {
|
||||
KFImage(URL(string: audioContent.creator.profileImageUrl))
|
||||
KFImage(URL(string: creatorProfileImageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(
|
||||
size: CGSize(
|
||||
@@ -71,13 +77,13 @@ struct ContentOrderConfirmDialogView: View {
|
||||
.frame(width: 13.3, height: 13.3)
|
||||
.clipShape(Circle())
|
||||
|
||||
Text(audioContent.creator.nickname)
|
||||
Text(creatorNickname)
|
||||
.font(.custom(Font.medium.rawValue, size: 10))
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
.padding(.top, 6.7)
|
||||
|
||||
Text(audioContent.duration)
|
||||
Text(duration)
|
||||
.font(.custom(Font.medium.rawValue, size: 11))
|
||||
.foregroundColor(Color.gray77)
|
||||
.padding(.top, 6.7)
|
||||
@@ -114,25 +120,13 @@ struct ContentOrderConfirmDialogView: View {
|
||||
.resizable()
|
||||
.frame(width: 16.7, height: 16.7)
|
||||
|
||||
if orderType == .RENTAL {
|
||||
Text("\(isOnlyRental ? audioContent.price : Int(ceil(Double(audioContent.price) * 0.7)))")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
} else {
|
||||
Text("\(audioContent.price)")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
Text("\(price)")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
} else {
|
||||
if orderType == .RENTAL {
|
||||
Text("\(isOnlyRental ? audioContent.price * 110 : Int(ceil(Double(audioContent.price) * 0.7)) * 110)원")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
} else {
|
||||
Text("\(audioContent.price * 110)원")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
Text("\(price * 110)원")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
Reference in New Issue
Block a user