This commit is contained in:
anlicheng 2025-02-25 12:08:54 +08:00
parent 1ef90a8972
commit 33eecfcfcb
2 changed files with 13 additions and 37 deletions

View File

@ -113,7 +113,7 @@ final class DetailModel {
struct DetailView: View {
@State var detailModel = DetailModel()
let id: Int32
let id: Int
var body: some View {
VStack(alignment: .center) {
@ -123,38 +123,18 @@ struct DetailView: View {
.font(.system(size: 28))
.fontWeight(.bold)
.foregroundColor(Color(hex: "#333333"))
/*
HStack(alignment: .center, spacing: 0) {
ForEach(Array(detailModel.voiceActors.enumerated()), id: \.offset) { index, actor in
if index > 0 {
Text("")
.font(.system(size: 13))
.foregroundColor(Color(hex: "#999999"))
}
Text(actor.name)
.font(.system(size: 13))
.foregroundColor(Color(hex: "#999999"))
}
Text("")
.font(.system(size: 13))
.foregroundColor(Color(hex: "#999999"))
Spacer()
}
*/
}
.padding([.top, .leading], 10)
.background(Color(hex: "#F2F2F2"), ignoresSafeAreaEdges: [.bottom])
HStack(alignment: .center, spacing: 10) {
Spacer()
ForEach(detailModel.statuses, id: \.status) { status in
FollowButtonView(title: status.config.name, bgColor: status.config.bgColor, fontColor: status.config.fontColor) {
print("call me follow button clicked")
}
}
}
// HStack(alignment: .center, spacing: 10) {
// Spacer()
// ForEach(detailModel.statuses, id: \.status) { status in
// FollowButtonView(title: status.config.name, bgColor: status.config.bgColor, fontColor: status.config.fontColor) {
// print("call me follow button clicked")
// }
// }
// }
//
HStack(alignment: .center, spacing: 15) {
@ -173,7 +153,7 @@ struct DetailView: View {
//
ScrollView(.horizontal, showsIndicators: false) {
HStack(alignment: .center) {
ForEach(detailModel.selectedEpisodes, id: \.id) { episode in
ForEach(detailModel.selectedEpisodes) { episode in
VStack(alignment: .center) {
AsyncImage(url: URL(string: episode.thumb)) { image in
image.resizable()
@ -184,7 +164,7 @@ struct DetailView: View {
.overlay {
VStack {
HStack {
Text(episode.numName)
Text(episode.num_name)
.font(.system(size: 12))
.foregroundColor(Color(hex: "#333333"))
Spacer()
@ -205,15 +185,11 @@ struct DetailView: View {
}
HStack(alignment: .center) {
NavigationLink(destination: ListView()) {
NavigationLink(destination: ListView(id: self.id)) {
Rectangle()
.frame(width: 200, height: 25)
.foregroundColor(Color(hex: "#F2F2F2"))
//.cornerRadius(5)
.overlay {
// RoundedRectangle(cornerRadius: 5)
// .stroke(Color.black, lineWidth: 1)
Text("展开全部剧集")
.font(.system(size: 13))
.foregroundColor(Color(hex: "#999999"))

View File

@ -25,7 +25,7 @@ final class IndexModel {
}
}
let id: Int32
let id: Int
let title: String
let episodes: [Episode]
}