|
@@ -238,42 +238,18 @@ const HomePage: React.FC = () => {
|
|
|
<Text className="error-text">广告加载失败</Text>
|
|
<Text className="error-text">广告加载失败</Text>
|
|
|
</View>
|
|
</View>
|
|
|
) : finalImgSrcs && finalImgSrcs.length > 0 ? (
|
|
) : finalImgSrcs && finalImgSrcs.length > 0 ? (
|
|
|
-
|
|
|
|
|
- <Swiper
|
|
|
|
|
- className="w-full"
|
|
|
|
|
- style={{ height: '800rpx', width: '100%' }}
|
|
|
|
|
- autoplay={true}
|
|
|
|
|
- circular={true}
|
|
|
|
|
- indicatorDots={true}
|
|
|
|
|
- indicatorColor="rgba(0, 0, 0, .3)"
|
|
|
|
|
- indicatorActiveColor="#000"
|
|
|
|
|
- >
|
|
|
|
|
- {finalImgSrcs.filter(item => item.imageFile?.fullUrl).map((item, index) => (
|
|
|
|
|
- <SwiperItem key={index} className="w-full h-full">
|
|
|
|
|
- <View className="w-full h-full flex items-center justify-center bg-gray-100">
|
|
|
|
|
- <Image
|
|
|
|
|
- src={item.imageFile!.fullUrl}
|
|
|
|
|
- mode="heightFix"
|
|
|
|
|
- style={{ height: '800rpx', width: 'auto' }}
|
|
|
|
|
- lazyLoad
|
|
|
|
|
- />
|
|
|
|
|
- </View>
|
|
|
|
|
- </SwiperItem>
|
|
|
|
|
- ))}
|
|
|
|
|
- </Swiper>
|
|
|
|
|
-
|
|
|
|
|
- // <Carousel
|
|
|
|
|
- // items={finalImgSrcs.filter(item => item.imageFile?.fullUrl).map(item => ({
|
|
|
|
|
- // src: item.imageFile!.fullUrl,
|
|
|
|
|
- // title: item.title || '',
|
|
|
|
|
- // description: item.description || ''
|
|
|
|
|
- // }))}
|
|
|
|
|
- // height={800}
|
|
|
|
|
- // autoplay={true}
|
|
|
|
|
- // interval={4000}
|
|
|
|
|
- // circular={true}
|
|
|
|
|
- // imageMode="heightFix"
|
|
|
|
|
- // />
|
|
|
|
|
|
|
+ <Carousel
|
|
|
|
|
+ items={finalImgSrcs.filter(item => item.imageFile?.fullUrl).map(item => ({
|
|
|
|
|
+ src: item.imageFile!.fullUrl,
|
|
|
|
|
+ title: item.title || '',
|
|
|
|
|
+ description: item.description || ''
|
|
|
|
|
+ }))}
|
|
|
|
|
+ height={800}
|
|
|
|
|
+ autoplay={true}
|
|
|
|
|
+ interval={4000}
|
|
|
|
|
+ circular={true}
|
|
|
|
|
+ imageMode="heightFix"
|
|
|
|
|
+ />
|
|
|
) : (
|
|
) : (
|
|
|
<View className="empty-container">
|
|
<View className="empty-container">
|
|
|
<Text className="empty-text">暂无广告</Text>
|
|
<Text className="empty-text">暂无广告</Text>
|