휴대폰 결제 추가

This commit is contained in:
Yu Sung 2023-10-27 02:20:08 +09:00
parent 902b772267
commit 6583e07f45
2 changed files with 28 additions and 0 deletions

View File

@ -147,6 +147,33 @@ struct CanPgPaymentView: View {
.frame(width: screenSize().width - 26.7)
.padding(.top, 16.7)
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"))
.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)
)
.cornerRadius(10)
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(lineWidth: 1)
.foregroundColor(Color(hex: viewModel.paymentMethod == .phone ? "9970ff" : "777777"))
)
.onTapGesture {
if viewModel.paymentMethod != .phone {
viewModel.paymentMethod = .phone
}
}
Spacer()
}
.frame(width: screenSize().width - 26.7)
.padding(.top, 16.7)
HStack(spacing: 6.7) {
Image(viewModel.isTermsAgree ? "btn_select_checked" : "btn_select_normal")
.resizable()

View File

@ -13,6 +13,7 @@ import Bootpay
enum PaymentMethod: String {
case card = "디지털카드"
case bank = "디지털계좌이체"
case phone = "휴대폰"
}
final class CanPgPaymentViewModel: ObservableObject {