This commit is contained in:
anlicheng 2025-02-22 23:57:56 +08:00
parent 676885375c
commit d78b4c95bc

View File

@ -82,16 +82,16 @@ struct ListView: View {
var body: some View {
VStack(alignment: .center, spacing: 20) {
Color.clear.frame(height: 50)
HStack {
VStack(alignment: .leading, spacing: 20) {
Text(detailModel.name)
.font(.system(size: 30))
.fontWeight(.bold)
.font(.system(size: 28))
.foregroundColor(Color(hex: "#333333"))
.fontWeight(.medium)
Text("返回")
.font(.system(size: 14))
.font(.system(size: 13))
.foregroundColor(Color(hex: "#333333"))
.onTapGesture {
self.presentationMode.wrappedValue.dismiss()
}
@ -99,14 +99,14 @@ struct ListView: View {
Spacer()
}
.padding([.leading, .top, .bottom], 10)
.background(Color.yellow)
.background(Color(hex: "#F2F2F2"), ignoresSafeAreaEdges: [.bottom])
//
HStack(alignment: .center, spacing: 15) {
ForEach(Array(detailModel.channels.enumerated()), id: \.offset) { idx, channel in
Text(channel.name)
.font(.system(size: 16))
.foregroundColor(idx == detailModel.selectedChannelIdx ? .blue : .black)
.font(.system(size: 13))
.foregroundColor(idx == detailModel.selectedChannelIdx ? Color(hex: "#169BD5") : Color(hex: "#666666"))
.onTapGesture {
detailModel.toggleChannel(channelIdx: idx)
}
@ -116,7 +116,7 @@ struct ListView: View {
//
ScrollView(.vertical, showsIndicators: false) {
VStack(alignment: .center, spacing: 20) {
VStack(alignment: .center, spacing: 15) {
ForEach(detailModel.selectedEpisodes, id: \.id) { episode in
HStack(alignment: .center) {
AsyncImage(url: URL(string: episode.thumb)) { image in
@ -124,12 +124,16 @@ struct ListView: View {
} placeholder: {
ProgressView()
}
.frame(width: 90, height: 70)
.frame(width: 90, height: 60)
VStack(alignment: .leading, spacing: 20) {
Text(episode.numName)
.font(.system(size: 12))
.foregroundColor(Color(hex: "#333333"))
Text(episode.name)
.font(.system(size: 12))
.foregroundColor(Color(hex: "#333333"))
.lineLimit(1)
}
Spacer()
@ -143,13 +147,15 @@ struct ListView: View {
self.presentationMode.wrappedValue.dismiss()
} label: {
Rectangle()
.frame(width: 180, height: 50)
.foregroundColor(Color.yellow)
.frame(width: 200, height: 25)
.foregroundColor(Color(hex: "#F2F2F2"))
.cornerRadius(10)
.overlay {
RoundedRectangle(cornerRadius: 10)
.stroke(Color.black, lineWidth: 1)
Text("收起剧集")
.font(.system(size: 13))
.foregroundColor(Color(hex: "#999999"))
}
}
@ -158,10 +164,8 @@ struct ListView: View {
Spacer()
}
.frame(width: 370, alignment: .center)
.ignoresSafeArea(.all)
.task {
await detailModel.loadData(dramaId: 124)
print(UIScreen.main.bounds.width)
}
}