diff --git a/dimensionhub/Views/DetailView.swift b/dimensionhub/Views/DetailView.swift index 00e90fc..23ce14c 100644 --- a/dimensionhub/Views/DetailView.swift +++ b/dimensionhub/Views/DetailView.swift @@ -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")) diff --git a/dimensionhub/Views/IndexView.swift b/dimensionhub/Views/IndexView.swift index 78567c0..b59732a 100644 --- a/dimensionhub/Views/IndexView.swift +++ b/dimensionhub/Views/IndexView.swift @@ -25,7 +25,7 @@ final class IndexModel { } } - let id: Int32 + let id: Int let title: String let episodes: [Episode] }