구매목록 - 구매한 콘텐츠 총 개수 표시
This commit is contained in:
parent
0079f248ee
commit
68675ebfe8
|
@ -33,6 +33,24 @@ struct OrderListAllView: View {
|
||||||
.frame(height: 50)
|
.frame(height: 50)
|
||||||
.background(Color.black)
|
.background(Color.black)
|
||||||
|
|
||||||
|
HStack(spacing: 0) {
|
||||||
|
Text("총 ")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
|
||||||
|
Text("\(viewModel.totalCount)")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "dd4500"))
|
||||||
|
|
||||||
|
Text(" 개")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||||
|
.foregroundColor(Color(hex: "eeeeee"))
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
|
.padding(.top, 13.3)
|
||||||
|
|
||||||
ScrollViewReader { reader in
|
ScrollViewReader { reader in
|
||||||
ScrollView(.vertical, showsIndicators: false) {
|
ScrollView(.vertical, showsIndicators: false) {
|
||||||
LazyVStack(spacing: 10.7) {
|
LazyVStack(spacing: 10.7) {
|
||||||
|
|
|
@ -18,6 +18,7 @@ final class OrderListAllViewModel: ObservableObject {
|
||||||
@Published var isLoading = false
|
@Published var isLoading = false
|
||||||
|
|
||||||
@Published var orderList = [GetAudioContentOrderListItem]()
|
@Published var orderList = [GetAudioContentOrderListItem]()
|
||||||
|
@Published var totalCount = 0
|
||||||
@Published var scrollToTop = false
|
@Published var scrollToTop = false
|
||||||
|
|
||||||
var page = 1
|
var page = 1
|
||||||
|
@ -49,6 +50,8 @@ final class OrderListAllViewModel: ObservableObject {
|
||||||
self.scrollToTop.toggle()
|
self.scrollToTop.toggle()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.totalCount = data.totalCount
|
||||||
|
|
||||||
if !data.items.isEmpty {
|
if !data.items.isEmpty {
|
||||||
page += 1
|
page += 1
|
||||||
self.orderList.append(contentsOf: data.items)
|
self.orderList.append(contentsOf: data.items)
|
||||||
|
|
Loading…
Reference in New Issue