parent
d060b8620a
commit
6c0ea9595c
|
@ -134,7 +134,7 @@ enum AppStep {
|
|||
|
||||
case blockList
|
||||
|
||||
case myBox
|
||||
case myBox(currentTab: ContentBoxViewModel.CurrentTab)
|
||||
|
||||
case auditionDetail(auditionId: Int)
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ struct ContentBoxView: View {
|
|||
|
||||
@State private var selectedPlaylistId = 0
|
||||
|
||||
let initCurrentTab: ContentBoxViewModel.CurrentTab
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
NavigationView {
|
||||
|
@ -71,6 +73,9 @@ struct ContentBoxView: View {
|
|||
OrderListAllInnerView()
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
viewModel.currentTab = initCurrentTab
|
||||
}
|
||||
}
|
||||
|
||||
if isShowCreatePlaylist {
|
||||
|
@ -92,5 +97,5 @@ struct ContentBoxView: View {
|
|||
}
|
||||
|
||||
#Preview {
|
||||
ContentBoxView()
|
||||
ContentBoxView(initCurrentTab: .orderlist)
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ struct ContentMainView: View {
|
|||
|
||||
Image("ic_content_keep")
|
||||
.onTapGesture {
|
||||
AppState.shared.setAppStep(step: .myBox)
|
||||
AppState.shared.setAppStep(step: .myBox(currentTab: .orderlist))
|
||||
}
|
||||
}
|
||||
.padding(.bottom, 26.7)
|
||||
|
|
|
@ -200,8 +200,8 @@ struct ContentView: View {
|
|||
case .blockList:
|
||||
BlockMemberListView()
|
||||
|
||||
case .myBox:
|
||||
ContentBoxView()
|
||||
case .myBox(let currentTab):
|
||||
ContentBoxView(initCurrentTab: currentTab)
|
||||
|
||||
case .auditionDetail(let auditionId):
|
||||
AuditionDetailView(auditionId: auditionId)
|
||||
|
|
|
@ -71,11 +71,7 @@ struct CanCardView_Previews: PreviewProvider {
|
|||
websiteUrl: "",
|
||||
blogUrl: "",
|
||||
liveReservationCount: 0,
|
||||
isAuth: false,
|
||||
orderList: GetAudioContentOrderListResponse(
|
||||
totalCount: 0,
|
||||
items: []
|
||||
)
|
||||
isAuth: false
|
||||
),
|
||||
refresh: {}
|
||||
)
|
||||
|
|
|
@ -95,11 +95,7 @@ struct MyInfoCardView_Previews: PreviewProvider {
|
|||
websiteUrl: "",
|
||||
blogUrl: "",
|
||||
liveReservationCount: 0,
|
||||
isAuth: false,
|
||||
orderList: GetAudioContentOrderListResponse(
|
||||
totalCount: 0,
|
||||
items: []
|
||||
)
|
||||
isAuth: false
|
||||
),
|
||||
refresh: {}
|
||||
)
|
||||
|
|
|
@ -18,6 +18,5 @@ struct MyPageResponse: Decodable {
|
|||
let blogUrl: String?
|
||||
let liveReservationCount: Int
|
||||
let isAuth: Bool
|
||||
let orderList: GetAudioContentOrderListResponse
|
||||
}
|
||||
|
||||
|
|
|
@ -81,16 +81,17 @@ struct MyPageView: View {
|
|||
}
|
||||
}
|
||||
|
||||
HStack(spacing: 8) {
|
||||
HStack(spacing: 10.7) {
|
||||
Text("팔로잉 리스트")
|
||||
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||
.foregroundColor(Color.button)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 13.3)
|
||||
.font(.custom(Font.bold.rawValue, size: 15.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
.background(Color.bg)
|
||||
.cornerRadius(6.7)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 6.7)
|
||||
.stroke(Color.button, lineWidth: 1)
|
||||
.stroke(Color.button, lineWidth: 1.3)
|
||||
)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
|
@ -98,14 +99,15 @@ struct MyPageView: View {
|
|||
}
|
||||
|
||||
Text("차단 리스트")
|
||||
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||
.foregroundColor(Color.button)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 13.3)
|
||||
.font(.custom(Font.bold.rawValue, size: 15.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
.background(Color.bg)
|
||||
.cornerRadius(6.7)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 6.7)
|
||||
.stroke(Color.button, lineWidth: 1)
|
||||
.stroke(Color.button, lineWidth: 1.3)
|
||||
)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
|
@ -132,13 +134,50 @@ struct MyPageView: View {
|
|||
}
|
||||
}
|
||||
|
||||
ReservationStatusView(data: data)
|
||||
.padding(.top, 33.3)
|
||||
|
||||
if data.orderList.totalCount > 0 {
|
||||
OrderListView(items: data.orderList.items)
|
||||
.padding(.top, 40)
|
||||
VStack(alignment: .leading, spacing: 13.3) {
|
||||
Text("내 보관함")
|
||||
.font(.custom(Font.bold.rawValue, size: 18.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
HStack(spacing: 10.7) {
|
||||
Text("구매목록")
|
||||
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||
.foregroundColor(Color.button)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 13.3)
|
||||
.background(Color.bg)
|
||||
.cornerRadius(6.7)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 6.7)
|
||||
.stroke(Color.button, lineWidth: 1.3)
|
||||
)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
AppState.shared.setAppStep(step: .myBox(currentTab: .orderlist))
|
||||
}
|
||||
|
||||
Text("재생목록")
|
||||
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||
.foregroundColor(Color.button)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 13.3)
|
||||
.background(Color.bg)
|
||||
.cornerRadius(6.7)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 6.7)
|
||||
.stroke(Color.button, lineWidth: 1.3)
|
||||
)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
AppState.shared.setAppStep(step: .myBox(currentTab: .playlist))
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.top, 33)
|
||||
.padding(.horizontal, 13.3)
|
||||
|
||||
ReservationStatusView(data: data)
|
||||
.padding(.top, 40)
|
||||
|
||||
ServiceCenterButtonView()
|
||||
.padding(.top, 40)
|
||||
|
|
|
@ -61,11 +61,7 @@ struct ReservationStatusView_Previews: PreviewProvider {
|
|||
websiteUrl: "",
|
||||
blogUrl: "",
|
||||
liveReservationCount: 0,
|
||||
isAuth: false,
|
||||
orderList: GetAudioContentOrderListResponse(
|
||||
totalCount: 0,
|
||||
items: []
|
||||
)
|
||||
isAuth: false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue