콘텐츠 리스트 - 가격, 시간 추가
This commit is contained in:
		| @@ -19,11 +19,54 @@ struct ContentNewAllItemView: View { | ||||
|             ContentDetailView(contentId: item.contentId) | ||||
|         } label: { | ||||
|             VStack(alignment: .leading, spacing: 8) { | ||||
|                 KFImage(URL(string: item.coverImageUrl)) | ||||
|                     .resizable() | ||||
|                     .scaledToFill() | ||||
|                     .frame(width: width, height: width, alignment: .top) | ||||
|                     .cornerRadius(2.7) | ||||
|                 ZStack(alignment: .bottom) { | ||||
|                     KFImage(URL(string: item.coverImageUrl)) | ||||
|                         .resizable() | ||||
|                         .scaledToFill() | ||||
|                         .frame(width: width, height: width, alignment: .top) | ||||
|                         .cornerRadius(2.7) | ||||
|                      | ||||
|                     VStack(spacing: 0) { | ||||
|                         Spacer() | ||||
|                          | ||||
|                         HStack(spacing: 0) { | ||||
|                             HStack(spacing: 2) { | ||||
|                                 if item.price > 0 { | ||||
|                                     Image("ic_card_can_gray") | ||||
|                                      | ||||
|                                     Text("\(item.price)") | ||||
|                                         .font(.custom(Font.medium.rawValue, size: 8.3)) | ||||
|                                         .foregroundColor(Color.white) | ||||
|                                 } else { | ||||
|                                     Text("무료") | ||||
|                                         .font(.custom(Font.medium.rawValue, size: 8.3)) | ||||
|                                         .foregroundColor(Color.white) | ||||
|                                 } | ||||
|                             } | ||||
|                             .padding(3) | ||||
|                             .background(Color(hex: "333333").opacity(0.7)) | ||||
|                             .cornerRadius(10) | ||||
|                             .padding(.leading, 2.7) | ||||
|                             .padding(.bottom, 2.7) | ||||
|                              | ||||
|                             Spacer() | ||||
|                              | ||||
|                             HStack(spacing: 2) { | ||||
|                                 Image("ic_card_time_small_gray") | ||||
|                                  | ||||
|                                 Text(item.duration) | ||||
|                                     .font(.custom(Font.medium.rawValue, size: 8.3)) | ||||
|                                     .foregroundColor(Color.white) | ||||
|                             } | ||||
|                             .padding(3) | ||||
|                             .background(Color(hex: "333333").opacity(0.7)) | ||||
|                             .cornerRadius(10) | ||||
|                             .padding(.trailing, 2.7) | ||||
|                             .padding(.bottom, 2.7) | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 .frame(width: width, height: width) | ||||
|                  | ||||
|                 Text(item.title) | ||||
|                     .font(.custom(Font.medium.rawValue, size: 13.3)) | ||||
|   | ||||
| @@ -59,7 +59,9 @@ struct ContentMainItemView_Previews: PreviewProvider { | ||||
|                 title: "ㅓ처랴햐햫햐햐", | ||||
|                 creatorId: 8, | ||||
|                 creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png", | ||||
|                 creatorNickname: "유저2" | ||||
|                 creatorNickname: "유저2", | ||||
|                 price: 10, | ||||
|                 duration: "00:00:30" | ||||
|             ) | ||||
|         ) | ||||
|     } | ||||
|   | ||||
| @@ -48,6 +48,8 @@ struct GetAudioContentMainItem: Decodable { | ||||
|     let creatorId: Int | ||||
|     let creatorProfileImageUrl: String | ||||
|     let creatorNickname: String | ||||
|     let price: Int | ||||
|     let duration: String | ||||
| } | ||||
|  | ||||
| struct GetAudioContentCurationResponse: Decodable { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung