| | |
| | | </view> |
| | | |
| | | <view class="trip-card-swiper"> |
| | | <swiper :current="currentPage" @change="onSwiperChange" circular style="min-height: 1450rpx;"> |
| | | <swiper :current="currentPage" @change="onSwiperChange" circular style="min-height: 1850rpx;"> |
| | | <swiper-item v-for="(group, pageIndex) in pagedTripCards" :key="pageIndex"> |
| | | <TripCard v-for="(item, index) in group" :key="index" :tag="item.tag" :title="item.coverTitle" |
| | | :subtitle="item.coverAlt" :score="item.collectCount" :imageUrl="item.coverUrl" |
| | |
| | | </swiper> |
| | | </view> |
| | | |
| | | <SectionTitle title="全球影视地标" optitle="查看全部" goUrl="/pages/home/home-more" /> |
| | | <GlobalGeo /> |
| | | <!-- <SectionTitle title="全球影视地标" optitle="查看全部" goUrl="/pages/home/home-more" />--> |
| | | <!-- <GlobalGeo />--> |
| | | |
| | | <SectionTitle title="场景博物馆" optitle="查看全部" goUrl="/sub-pages/hot-spot/index" /> |
| | | <SceneMuseumCard v-for="(item, index) in cardList" :key="index" :image="item.image" :title="item.title" |
| | | :subtitle="item.subtitle" :readTime="item.readTime" /> |
| | | |
| | | <SectionTitle title="光影社区" optitle="加入社区" goUrl="/pages/home/home-more" /> |
| | | <Community v-for="(item, index) in communitys" :key="index" :avatar="item.avatar" :nickname="item.nickname" |
| | | <SectionTitle title="光影天地" optitle="加入光影" goUrl="/sub-pages/community/index" /> |
| | | <Community v-for="(item, index) in communitys" :key="index" :detailUrl="`${detailUrl}?id=${item.id}`" :avatar="item.avatar" :nickname="item.nickname" |
| | | :time="formatRelativeTime(item.createTime)" :image="item.coverUrl" :content="item.coverAlt" |
| | | :likeCount="item.likeCount" :commentCount="item.commentCount" /> |
| | | <up-loadmore :status="communityStatus" :line="true" /> |
| | |
| | | }) |
| | | |
| | | // 场景博物馆卡片数据 |
| | | const cardList = ref([ |
| | | { |
| | | image: 'https://ai-public.mastergo.com/ai/img_res/6a226f9e9652c51cd535c3490535dfeb.jpg', |
| | | title: '《盗梦空间》巴黎咖啡馆', |
| | | subtitle: '拷素诺兰如何创造这个标志性场景', |
| | | readTime: '12分钟阅读', |
| | | }, |
| | | { |
| | | image: 'https://img.yzcdn.cn/vant/cat.jpeg', |
| | | title: '《星际穿越》玉米田', |
| | | subtitle: '诺兰如何还原地球末日场景', |
| | | readTime: '8分钟阅读', |
| | | }, |
| | | { |
| | | image: 'https://img.yzcdn.cn/vant/cat.jpeg', |
| | | title: '《星球大战》塔图因星球', |
| | | subtitle: '经典科幻电影中的沙漠设定', |
| | | readTime: '10分钟阅读', |
| | | }, |
| | | ]) |
| | | // 场景博物馆卡片数据 |
| | | const cardList = ref<Array<{ |
| | | image: string |
| | | title: string |
| | | subtitle: string |
| | | readTime: string |
| | | }>>([]) |
| | | |
| | | // 社区帖子数据 |
| | | // 数据 |
| | | const communitys = ref<FilmWorks[]>([]) |
| | | |
| | | |
| | |
| | | // 内容精选 |
| | | getContentSelected() |
| | | |
| | | // 光影社区 |
| | | // 光影 |
| | | getCommunitys() |
| | | |
| | | // 场景博物馆 |
| | | getSceneMuseumData() |
| | | }); |
| | | |
| | | |
| | |
| | | console.log('用户下拉刷新了') |
| | | // 内容精选 |
| | | getContentSelected() |
| | | // 光影社区 |
| | | // 光影 |
| | | communityPage.value = 1 |
| | | getCommunitys() |
| | | uni.stopPullDownRefresh() // 停止下拉刷新动画 |
| | |
| | | communityStatus.value = 'noMore' |
| | | } |
| | | } |
| | | |
| | | |
| | | // 获取场景博物馆数据 |
| | | const getSceneMuseumData = async () => { |
| | | try { |
| | | const { code, data } = await $http.request('get', '/api/filmLocation/getTop3') |
| | | if (code === 0 && data) { |
| | | cardList.value = data.map(item => ({ |
| | | image: item.locationUrl, |
| | | title: item.locationName, |
| | | subtitle: item.address, |
| | | readTime: `${item.locationWeight}热度` |
| | | })) |
| | | } |
| | | } catch (error) { |
| | | console.error('获取场景博物馆数据失败:', error) |
| | | $message.showToast('获取场景博物馆数据失败') |
| | | } |
| | | } |
| | | // 内容精选 |
| | | const getFilmWorks = async (type: String, pageSize: Number, currentPage: Number) => { |
| | | const { |
| | |
| | | params: { |
| | | classify: type, |
| | | size: pageSize, |
| | | status: 'published', |
| | | current: currentPage |
| | | } |
| | | }) |