콘텐츠 상세, 콘텐츠 구매

- pg 테스트 계정의 경우 캔이 아닌 원으로 표시되도록 하고 콘텐츠 구매시 바로 결제 후 구매 되도록 수정
This commit is contained in:
Yu Sung
2024-05-21 00:11:06 +09:00
parent fd2230dbe1
commit 568d7f2284
13 changed files with 637 additions and 99 deletions

View File

@@ -38,7 +38,7 @@ struct ContentDetailView: View {
Text("콘텐츠 상세")
.font(.custom(Font.bold.rawValue, size: 18.3))
.foregroundColor(Color(hex: "eeeeee"))
.foregroundColor(Color.grayee)
}
Spacer()
@@ -99,7 +99,7 @@ struct ContentDetailView: View {
.foregroundColor(.white)
.frame(maxWidth: .infinity)
.frame(height: 48.7)
.background(Color(hex: "525252"))
.background(Color.gray52)
.cornerRadius(5.3)
.padding(.top, 18.3)
.padding(.horizontal, 13.3)
@@ -113,7 +113,7 @@ struct ContentDetailView: View {
.foregroundColor(.white)
.frame(maxWidth: .infinity)
.frame(height: 48.7)
.background(Color(hex: "525252"))
.background(Color.gray52)
.cornerRadius(5.3)
.padding(.top, 18.3)
.padding(.horizontal, 13.3)
@@ -162,7 +162,7 @@ struct ContentDetailView: View {
.padding(.horizontal, 13.3)
Rectangle()
.foregroundColor(Color(hex: "232323"))
.foregroundColor(Color.gray23)
.frame(height: 6.7)
.padding(.top, 24)
@@ -207,7 +207,7 @@ struct ContentDetailView: View {
if proxy.safeAreaInsets.bottom > 0 {
Rectangle()
.foregroundColor(Color(hex: "222222"))
.foregroundColor(Color.gray22)
.frame(width: proxy.size.width, height: 15.3)
}
}
@@ -226,7 +226,20 @@ struct ContentDetailView: View {
orderType: orderType,
isOnlyRental: audioContent.isOnlyRental,
onClickConfirm: {
viewModel.order(orderType: orderType)
if UserDefaults.int(forKey: .userId) == 17958 {
AppState.shared
.setAppStep(
step: .tempCanPayment(
title: audioContent.title,
can: orderType == .RENTAL ? Int(ceil(Double(audioContent.price) * 0.6)) : audioContent.price,
onSuccess: {
viewModel.order(orderType: orderType)
}
)
)
} else {
viewModel.order(orderType: orderType)
}
}
)
}
@@ -272,7 +285,7 @@ struct ContentDetailView: View {
if proxy.safeAreaInsets.bottom > 0 {
Rectangle()
.foregroundColor(Color(hex: "222222"))
.foregroundColor(Color.gray22)
.frame(width: proxy.size.width, height: 15.3)
}
}