feat(miniprogram): 关怀模式全覆盖 — 58/58 页面 100% 接入
- 医生端 18 个页面全部接入(首页/待办/告警/咨询/透析/随访/ 患者/处方/报告及其详情和创建页) - 商城子包 3 页面(商品详情/积分兑换/订单) - 患者端剩余页面(AI报告/文章/活动/设备同步/登录/随访详情/ 报告详情/知情同意/诊断/透析处方/透析记录/家庭成员添加) - 页面覆盖率:22/59 (37%) → 58/58 (100%) - useElderClass hook 统一接入模式,零样板代码 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import type { PointsTransaction } from '../../../services/points';
|
||||
import { usePointsStore } from '../../../stores/points';
|
||||
import EmptyState from '../../../components/EmptyState';
|
||||
import Loading from '../../../components/Loading';
|
||||
import { useElderClass } from '../../../hooks/useElderClass';
|
||||
import './index.scss';
|
||||
|
||||
const TYPE_TABS = [
|
||||
@@ -15,6 +16,7 @@ const TYPE_TABS = [
|
||||
];
|
||||
|
||||
export default function PointsDetail() {
|
||||
const modeClass = useElderClass();
|
||||
const { account, refresh: refreshPoints } = usePointsStore();
|
||||
const [transactions, setTransactions] = useState<PointsTransaction[]>([]);
|
||||
const [activeTab, setActiveTab] = useState('');
|
||||
@@ -112,7 +114,7 @@ export default function PointsDetail() {
|
||||
const balance = account?.balance ?? 0;
|
||||
|
||||
return (
|
||||
<View className='detail-page'>
|
||||
<View className={`detail-page ${modeClass}`}>
|
||||
{/* 余额卡片 */}
|
||||
<View className='balance-card'>
|
||||
<Text className='balance-label'>当前积分</Text>
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
import type { PointsProduct } from '../../../services/points';
|
||||
import { usePointsStore } from '../../../stores/points';
|
||||
import Loading from '../../../components/Loading';
|
||||
import { useElderClass } from '../../../hooks/useElderClass';
|
||||
import './index.scss';
|
||||
|
||||
const TYPE_INITIAL: Record<string, string> = {
|
||||
@@ -29,6 +30,7 @@ const TYPE_COLOR: Record<string, string> = {
|
||||
};
|
||||
|
||||
export default function ExchangeConfirm() {
|
||||
const modeClass = useElderClass();
|
||||
const [product, setProduct] = useState<PointsProduct | null>(null);
|
||||
const { account, refresh: refreshPoints } = usePointsStore();
|
||||
const [loading, setLoading] = useState(true);
|
||||
@@ -119,7 +121,7 @@ export default function ExchangeConfirm() {
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<View className='exchange-page'>
|
||||
<View className={`exchange-page ${modeClass}`}>
|
||||
<Loading />
|
||||
</View>
|
||||
);
|
||||
@@ -131,7 +133,7 @@ export default function ExchangeConfirm() {
|
||||
const typeColor = TYPE_COLOR[productType] || '#C4623A';
|
||||
|
||||
return (
|
||||
<View className='exchange-page'>
|
||||
<View className={`exchange-page ${modeClass}`}>
|
||||
{/* 商品预览卡片 */}
|
||||
<View className='product-card'>
|
||||
<View
|
||||
|
||||
@@ -5,6 +5,7 @@ import { listMyOrders } from '../../../services/points';
|
||||
import type { PointsOrder } from '../../../services/points';
|
||||
import EmptyState from '../../../components/EmptyState';
|
||||
import Loading from '../../../components/Loading';
|
||||
import { useElderClass } from '../../../hooks/useElderClass';
|
||||
import './index.scss';
|
||||
|
||||
const STATUS_TABS = [
|
||||
@@ -22,6 +23,7 @@ const STATUS_CONFIG: Record<string, { label: string; tagBg: string; tagColor: st
|
||||
};
|
||||
|
||||
export default function MallOrders() {
|
||||
const modeClass = useElderClass();
|
||||
const [orders, setOrders] = useState<PointsOrder[]>([]);
|
||||
const [activeTab, setActiveTab] = useState('');
|
||||
const [page, setPage] = useState(1);
|
||||
@@ -110,7 +112,7 @@ export default function MallOrders() {
|
||||
};
|
||||
|
||||
return (
|
||||
<View className='orders-page'>
|
||||
<View className={`orders-page ${modeClass}`}>
|
||||
{/* 状态筛选标签 */}
|
||||
<View className='status-tabs'>
|
||||
{STATUS_TABS.map((tab) => (
|
||||
|
||||
Reference in New Issue
Block a user