refactor(mp): 迁移商城+AI报告+预约列表+文章详情页 — 统一组件库
商城订单/积分兑换/积分明细、AI 报告列表、预约列表、 文章详情共 6 个页面迁移: - 最外层容器 → PageShell - SCSS 删除 min-height/background 通用样式
This commit is contained in:
@@ -7,6 +7,7 @@ import { trackEvent } from '@/services/analytics';
|
||||
import { sanitizeHtml } from '@/utils/sanitize-html';
|
||||
import { useElderClass } from '../../../hooks/useElderClass';
|
||||
import { useAuthStore } from '../../../stores/auth';
|
||||
import PageShell from '@/components/ui/PageShell';
|
||||
import './index.scss';
|
||||
|
||||
export default function ArticleDetail() {
|
||||
@@ -44,26 +45,26 @@ export default function ArticleDetail() {
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<View className={`article-detail-page ${modeClass}`}>
|
||||
<PageShell className={modeClass}>
|
||||
<View className='loading-state'>
|
||||
<Text className='loading-text'>加载中...</Text>
|
||||
</View>
|
||||
</View>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
|
||||
if (!article) {
|
||||
return (
|
||||
<View className={`article-detail-page ${modeClass}`}>
|
||||
<PageShell className={modeClass}>
|
||||
<View className='empty-state'>
|
||||
<Text className='empty-text'>文章不存在</Text>
|
||||
</View>
|
||||
</View>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={`article-detail-page ${modeClass}`}>
|
||||
<PageShell className={modeClass}>
|
||||
{/* 文章头部 */}
|
||||
<View className='article-header'>
|
||||
<Text className='article-title'>{article.title}</Text>
|
||||
@@ -93,6 +94,6 @@ export default function ArticleDetail() {
|
||||
nodes={sanitizeHtml(article.content || '')}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user