feat: 首页更新

This commit is contained in:
2025-11-13 16:47:10 +08:00
parent 9ef9233797
commit 54bf84b19b
1244 changed files with 3507 additions and 951 deletions

View File

@@ -21,7 +21,6 @@ import { useColorScheme } from '@/hooks';
import { styles } from './styles';
import useMsgStore from '@/stores/msgStore';
interface BannerSwiperProps {}
const { width } = Dimensions.get('window');
@@ -38,7 +37,6 @@ export default function BannerSwiper({}: BannerSwiperProps) {
const autoPlayTimerRef = useRef<any>(null);
const { homeBanner } = useMsgStore();
// 加载轮播图数据
useEffect(() => {
// 如果有传入的 banners 数据,直接使用
@@ -127,11 +125,7 @@ export default function BannerSwiper({}: BannerSwiperProps) {
onPress={() => onBannerPress(banner)}
activeOpacity={0.9}
>
<Image
source={{ uri: banner.subject }}
style={s.image}
resizeMode="cover"
/>
<Image source={{ uri: banner.subject }} style={s.image} resizeMode="cover" />
</TouchableOpacity>
))}
</ScrollView>
@@ -139,16 +133,9 @@ export default function BannerSwiper({}: BannerSwiperProps) {
{/* 指示器 */}
<View style={s.indicatorContainer}>
{homeBanner.map((_, index) => (
<View
key={index}
style={[
s.indicator,
index === currentIndex && s.indicatorActive,
]}
/>
<View key={index} style={[s.indicator, index === currentIndex && s.indicatorActive]} />
))}
</View>
</View>
);
}