feat: 更新文章功能和相关依赖
- 新增文章详情页面,支持根据文章 ID 加载和展示文章内容 - 添加文章卡片组件,展示推荐文章的标题、封面和阅读量 - 更新文章服务,支持获取文章列表和根据 ID 获取文章详情 - 集成腾讯云 COS SDK,支持文件上传功能 - 优化打卡功能,支持按日期加载和展示打卡记录 - 更新相关依赖,确保项目兼容性和功能完整性 - 调整样式以适应新功能的展示和交互
This commit is contained in:
@@ -3,7 +3,7 @@ import { Colors } from '@/constants/Colors';
|
||||
import { useAppDispatch, useAppSelector } from '@/hooks/redux';
|
||||
import { useColorScheme } from '@/hooks/useColorScheme';
|
||||
import { DailyStatusItem, fetchDailyStatusRange } from '@/services/checkins';
|
||||
import { getDailyCheckins, loadMonthCheckins, setCurrentDate } from '@/store/checkinSlice';
|
||||
import { loadMonthCheckins } from '@/store/checkinSlice';
|
||||
import { getMonthDaysZh } from '@/utils/date';
|
||||
import dayjs from 'dayjs';
|
||||
import { useRouter } from 'expo-router';
|
||||
@@ -76,9 +76,8 @@ export default function CheckinCalendarScreen() {
|
||||
return (
|
||||
<TouchableOpacity
|
||||
onPress={async () => {
|
||||
dispatch(setCurrentDate(dateStr));
|
||||
await dispatch(getDailyCheckins(dateStr));
|
||||
router.push('/checkin');
|
||||
// 通过路由参数传入日期,便于目标页初始化
|
||||
router.push({ pathname: '/checkin', params: { date: dateStr } });
|
||||
}}
|
||||
activeOpacity={0.8}
|
||||
style={[styles.dayCell, { backgroundColor: colorTokens.card }, hasAny && styles.dayCellCompleted, isToday && styles.dayCellToday]}
|
||||
|
||||
Reference in New Issue
Block a user