blob: c33d153851c2c83f4fda7f74b5889e710bc15545 [file] [log] [blame]
22301009ecc1c1c2025-04-09 21:56:23 +08001import React from 'react';
2import './Recommend.css';
3
4// 假数据
5const recommendData = {
6 paidList: [
7 { title: '片单 1', image: 'https://via.placeholder.com/150' },
8 { title: '片单 2', image: 'https://via.placeholder.com/150' },
9 { title: '片单 3', image: 'https://via.placeholder.com/150' },
10 ],
11 nowPlaying: [
12 { title: '电影 1', image: 'https://via.placeholder.com/150' },
13 { title: '电影 2', image: 'https://via.placeholder.com/150' },
14 { title: '电影 3', image: 'https://via.placeholder.com/150' },
15 { title: '电影 4', image: 'https://via.placeholder.com/150' },
16 { title: '电影 5', image: 'https://via.placeholder.com/150' },
17 { title: '电影 6', image: 'https://via.placeholder.com/150' },
18 { title: '电影 7', image: 'https://via.placeholder.com/150' },
19 { title: '电影 8', image: 'https://via.placeholder.com/150' },
20 ],
21 movieRecommendations: [
22 { title: '电影 1', image: 'https://via.placeholder.com/150' },
23 { title: '电影 2', image: 'https://via.placeholder.com/150' },
24 { title: '电影 3', image: 'https://via.placeholder.com/150' },
25 { title: '电影 4', image: 'https://via.placeholder.com/150' },
26 ],
27 tvRecommendations: [
28 { title: '电视剧 1', image: 'https://via.placeholder.com/150' },
29 { title: '电视剧 2', image: 'https://via.placeholder.com/150' },
30 { title: '电视剧 3', image: 'https://via.placeholder.com/150' },
31 { title: '电视剧 4', image: 'https://via.placeholder.com/150' },
32 ]
33};
34
35const Recommend = () => {
36 return (
37 <div className="recommend-page">
38 <div className="recommend-section">
39 <h2>付费片单</h2>
40 <div className="recommend-row">
41 {recommendData.paidList.map((item, index) => (
42 <div key={index} className="recommend-card">
43 <img src={item.image} alt={item.title} className="recommend-image" />
44 <span className="recommend-title">{item.title}</span>
45 </div>
46 ))}
47 </div>
48 </div>
49
50 <div className="recommend-section">
51 <h2>正在热映</h2>
52 <div className="recommend-row">
53 {recommendData.nowPlaying.map((item, index) => (
54 <div key={index} className="recommend-card">
55 <img src={item.image} alt={item.title} className="recommend-image" />
56 <span className="recommend-title">{item.title}</span>
57 </div>
58 ))}
59 </div>
60 </div>
61
62 <div className="recommend-section">
63 <h2>电影推荐</h2>
64 <div className="recommend-row">
65 {recommendData.movieRecommendations.map((item, index) => (
66 <div key={index} className="recommend-card">
67 <img src={item.image} alt={item.title} className="recommend-image" />
68 <span className="recommend-title">{item.title}</span>
69 </div>
70 ))}
71 </div>
72 </div>
73
74 <div className="recommend-section">
75 <h2>电视剧推荐</h2>
76 <div className="recommend-row">
77 {recommendData.tvRecommendations.map((item, index) => (
78 <div key={index} className="recommend-card">
79 <img src={item.image} alt={item.title} className="recommend-image" />
80 <span className="recommend-title">{item.title}</span>
81 </div>
82 ))}
83 </div>
84 </div>
85 </div>
86 );
87};
88
89export default Recommend;