콘텐츠 상세, 콘텐츠 구매
- pg 테스트 계정의 경우 캔이 아닌 원으로 표시되도록 하고 콘텐츠 구매시 바로 결제 후 구매 되도록 수정
This commit is contained in:
@@ -86,11 +86,11 @@ struct CanPgPaymentView: View {
|
||||
|
||||
Text("\(canResponse.price) 원")
|
||||
.font(.custom(Font.bold.rawValue, size: 15.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
.padding(.horizontal, 13.3)
|
||||
.padding(.vertical, 23.3)
|
||||
.background(Color(hex: "222222"))
|
||||
.background(Color.gray22)
|
||||
.cornerRadius(16.7)
|
||||
.padding(.horizontal, 13.3)
|
||||
.frame(width: screenSize().width)
|
||||
@@ -98,7 +98,7 @@ struct CanPgPaymentView: View {
|
||||
|
||||
Text("결제 수단 선택")
|
||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(width: screenSize().width - 26.7, alignment: .leading)
|
||||
.padding(.top, 26.7)
|
||||
|
||||
@@ -106,18 +106,19 @@ struct CanPgPaymentView: View {
|
||||
HStack(spacing: 13.3) {
|
||||
Text("카드")
|
||||
.font(.custom( viewModel.paymentMethod == .card ? Font.bold.rawValue : Font.medium.rawValue, size: 16.7))
|
||||
.foregroundColor(Color(hex: viewModel.paymentMethod == .card ? "9970ff" : "eeeeee"))
|
||||
.foregroundColor(viewModel.paymentMethod == .card ? Color.button : Color.grayee)
|
||||
.frame(width: (screenSize().width - 40) / 2)
|
||||
.padding(.vertical, 16.7)
|
||||
.background(
|
||||
Color(hex: viewModel.paymentMethod == .card ? "9970ff" : "232323")
|
||||
.opacity(viewModel.paymentMethod == .card ? 0.3 : 1)
|
||||
viewModel.paymentMethod == .card ?
|
||||
Color.button.opacity(0.3) :
|
||||
Color.gray23
|
||||
)
|
||||
.cornerRadius(10)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.stroke(lineWidth: 1)
|
||||
.foregroundColor(Color(hex: viewModel.paymentMethod == .card ? "9970ff" : "777777"))
|
||||
.foregroundColor(viewModel.paymentMethod == .card ? Color.button : Color.gray77)
|
||||
)
|
||||
.onTapGesture {
|
||||
if viewModel.paymentMethod != .card {
|
||||
@@ -128,18 +129,19 @@ struct CanPgPaymentView: View {
|
||||
|
||||
Text("계좌이체")
|
||||
.font(.custom( viewModel.paymentMethod == .bank ? Font.bold.rawValue : Font.medium.rawValue, size: 16.7))
|
||||
.foregroundColor(Color(hex: viewModel.paymentMethod == .bank ? "9970ff" : "eeeeee"))
|
||||
.foregroundColor(viewModel.paymentMethod == .bank ? Color.button : Color.grayee)
|
||||
.frame(width: (screenSize().width - 40) / 2)
|
||||
.padding(.vertical, 16.7)
|
||||
.background(
|
||||
Color(hex: viewModel.paymentMethod == .bank ? "9970ff" : "232323")
|
||||
.opacity(viewModel.paymentMethod == .bank ? 0.3 : 1)
|
||||
viewModel.paymentMethod == .bank ?
|
||||
Color.button.opacity(0.3) :
|
||||
Color.gray23
|
||||
)
|
||||
.cornerRadius(10)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.stroke(lineWidth: 1)
|
||||
.foregroundColor(Color(hex: viewModel.paymentMethod == .bank ? "9970ff" : "777777"))
|
||||
.foregroundColor(viewModel.paymentMethod == .bank ? Color.button : Color.gray77)
|
||||
)
|
||||
.onTapGesture {
|
||||
if viewModel.paymentMethod != .bank {
|
||||
@@ -153,18 +155,19 @@ struct CanPgPaymentView: View {
|
||||
HStack(spacing: 13.3) {
|
||||
Text("휴대폰 결제")
|
||||
.font(.custom( viewModel.paymentMethod == .phone ? Font.bold.rawValue : Font.medium.rawValue, size: 16.7))
|
||||
.foregroundColor(Color(hex: viewModel.paymentMethod == .phone ? "9970ff" : "eeeeee"))
|
||||
.foregroundColor(viewModel.paymentMethod == .phone ? Color.button : Color.grayee)
|
||||
.frame(width: (screenSize().width - 40) / 2)
|
||||
.padding(.vertical, 16.7)
|
||||
.background(
|
||||
Color(hex: viewModel.paymentMethod == .phone ? "9970ff" : "232323")
|
||||
.opacity(viewModel.paymentMethod == .phone ? 0.3 : 1)
|
||||
viewModel.paymentMethod == .phone ?
|
||||
Color.button.opacity(0.3) :
|
||||
Color.gray23
|
||||
)
|
||||
.cornerRadius(10)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.stroke(lineWidth: 1)
|
||||
.foregroundColor(Color(hex: viewModel.paymentMethod == .phone ? "9970ff" : "777777"))
|
||||
.foregroundColor(viewModel.paymentMethod == .phone ? Color.button : Color.gray77)
|
||||
)
|
||||
.onTapGesture {
|
||||
if viewModel.paymentMethod != .phone {
|
||||
@@ -184,7 +187,7 @@ struct CanPgPaymentView: View {
|
||||
|
||||
Text("구매조건 확인 및 결제 진행 동의")
|
||||
.font(.custom(Font.medium.rawValue, size: 14.7))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
.frame(width: screenSize().width - 53.4, alignment: .leading)
|
||||
.padding(.top, 16.7)
|
||||
@@ -196,11 +199,11 @@ struct CanPgPaymentView: View {
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
Text("- ")
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
|
||||
Text("충전된 캔의 유효기간은 충전 후 5년 입니다.")
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
.frame(width: screenSize().width - 53.4, alignment: .leading)
|
||||
@@ -209,11 +212,11 @@ struct CanPgPaymentView: View {
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
Text("- ")
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
|
||||
Text("결제 취소는 결제 후 7일 이내에만 할 수 있습니다.\n단, 캔의 일부를 사용하면 결제 취소를 할 수 없습니다.")
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
.frame(width: screenSize().width - 53.4, alignment: .leading)
|
||||
@@ -221,11 +224,11 @@ struct CanPgPaymentView: View {
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
Text("- ")
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
|
||||
Text("광고성 이벤트 등 회사가 무료로 지급한 포인트는 환불되지 않습니다.")
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
.frame(width: screenSize().width - 53.4, alignment: .leading)
|
||||
@@ -233,11 +236,11 @@ struct CanPgPaymentView: View {
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
Text("- ")
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
|
||||
Text("자세한 내용은 소다라이브 이용약관에서 확인할 수 있습니다.")
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
.frame(width: screenSize().width - 53.4, alignment: .leading)
|
||||
@@ -251,12 +254,12 @@ struct CanPgPaymentView: View {
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text("결제금액")
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Text("\(canResponse.price) 원")
|
||||
.font(.custom(Font.bold.rawValue, size: 23.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +270,7 @@ struct CanPgPaymentView: View {
|
||||
.foregroundColor(.white)
|
||||
.padding(.vertical, 16)
|
||||
.frame(minWidth: 200)
|
||||
.background(Color(hex: "9970ff"))
|
||||
.background(Color.button)
|
||||
.cornerRadius(10)
|
||||
.onTapGesture {
|
||||
if viewModel.paymentMethod == nil {
|
||||
@@ -290,12 +293,12 @@ struct CanPgPaymentView: View {
|
||||
.padding(.leading, 22)
|
||||
.padding(.trailing, 13.3)
|
||||
.padding(.vertical, 13.3)
|
||||
.background(Color(hex: "222222"))
|
||||
.background(Color.gray22)
|
||||
.cornerRadius(16.7, corners: [.topLeft, .topRight])
|
||||
|
||||
if proxy.safeAreaInsets.bottom > 0 {
|
||||
Rectangle()
|
||||
.foregroundColor(Color(hex: "222222"))
|
||||
.foregroundColor(Color.gray22)
|
||||
.frame(width: proxy.size.width, height: 15.3)
|
||||
}
|
||||
}
|
||||
@@ -308,7 +311,7 @@ struct CanPgPaymentView: View {
|
||||
.padding(.horizontal, 6.7)
|
||||
.frame(width: geo.size.width - 66.7, alignment: .center)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.background(Color(hex: "9970ff"))
|
||||
.background(Color.button)
|
||||
.foregroundColor(Color.white)
|
||||
.multilineTextAlignment(.leading)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
@@ -326,25 +329,6 @@ struct CanPgPaymentView: View {
|
||||
LoadingView()
|
||||
}
|
||||
}
|
||||
.popup(isPresented: $viewModel.isShowPopup, type: .toast, position: .top, autohideIn: 2) {
|
||||
GeometryReader { geo in
|
||||
HStack {
|
||||
Spacer()
|
||||
Text(viewModel.errorMessage)
|
||||
.padding(.vertical, 13.3)
|
||||
.padding(.horizontal, 6.7)
|
||||
.frame(width: geo.size.width - 66.7, alignment: .center)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.background(Color(hex: "9970ff"))
|
||||
.foregroundColor(Color.white)
|
||||
.multilineTextAlignment(.leading)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.cornerRadius(20)
|
||||
.padding(.top, 66.7)
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user