diff --git a/apps/miniprogram/src/pages/appointment/detail/index.tsx b/apps/miniprogram/src/pages/appointment/detail/index.tsx index 3ce7780..ba12997 100644 --- a/apps/miniprogram/src/pages/appointment/detail/index.tsx +++ b/apps/miniprogram/src/pages/appointment/detail/index.tsx @@ -17,28 +17,9 @@ export default function AppointmentDetail() { const id = router.params.id || ''; const [cancelling, setCancelling] = useState(false); - // 从页面参数或全局缓存获取预约数据 - const encodedData = router.params.data || ''; - let appointment: Appointment | null = null; - try { - if (encodedData) { - appointment = JSON.parse(decodeURIComponent(encodedData)); - } - } catch { - // 解析失败则尝试从 Storage 获取 - const cached = Taro.getStorageSync('appointment_detail_cache'); - if (cached && cached.id === id) { - appointment = cached; - } - } - - // 如果没有传数据,尝试从缓存获取 - if (!appointment) { - const cached = Taro.getStorageSync('appointment_detail_cache'); - if (cached && cached.id === id) { - appointment = cached; - } - } + // 从缓存获取预约数据 + const cached = Taro.getStorageSync('appointment_detail_cache'); + const appointment: Appointment | null = (cached && cached.id === id) ? cached : null; const status = appointment ? (STATUS_MAP[appointment.status] || { label: appointment.status, className: 'tag-pending' }) : { label: '未知', className: 'tag-pending' }; const canCancel = appointment && (appointment.status === 'pending' || appointment.status === 'confirmed'); diff --git a/apps/miniprogram/src/pages/article/index.tsx b/apps/miniprogram/src/pages/article/index.tsx index c01020e..c4ad4c0 100644 --- a/apps/miniprogram/src/pages/article/index.tsx +++ b/apps/miniprogram/src/pages/article/index.tsx @@ -1,5 +1,5 @@ import React, { useState, useCallback } from 'react'; -import { View, Text } from '@tarojs/components'; +import { View, Text, Image } from '@tarojs/components'; import Taro, { useDidShow, usePullDownRefresh, useReachBottom } from '@tarojs/taro'; import { listArticles, Article } from '../../services/article'; import EmptyState from '../../components/EmptyState'; @@ -74,7 +74,7 @@ export default function ArticleList() { {a.cover_image && ( - + )} diff --git a/apps/miniprogram/src/pages/followup/detail/index.tsx b/apps/miniprogram/src/pages/followup/detail/index.tsx index e6bd428..05f9110 100644 --- a/apps/miniprogram/src/pages/followup/detail/index.tsx +++ b/apps/miniprogram/src/pages/followup/detail/index.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import { View, Text } from '@tarojs/components'; +import { View, Text, Textarea } from '@tarojs/components'; import Taro, { useRouter } from '@tarojs/taro'; import { listTasks, submitRecord, FollowUpTask } from '../../../services/followup'; import './index.scss'; @@ -97,7 +97,7 @@ export default function FollowUpDetail() { {!isCompleted && ( 填写随访记录 -