feat(knowledge): Web 病种图片上传 + 小程序症状图展示

This commit is contained in:
weijuesen
2026-08-12 12:13:35 +08:00
parent c8aa213626
commit 3bb1efae57
6 changed files with 64 additions and 2 deletions
+1
View File
@@ -16,6 +16,7 @@ export interface Disease {
recurrence?: string;
detection?: string;
prevention?: string;
imageUrl?: string;
sortOrder?: number;
}
@@ -39,6 +39,19 @@
padding: $spacing-lg;
}
.imageCard {
margin: $spacing-lg $spacing-lg 0;
background: $color-bg-card;
border-radius: $radius-md;
padding: $spacing-md;
box-shadow: $shadow-card;
}
.symptomImage {
width: 100%;
border-radius: $radius-sm;
}
.sectionCard {
background: $color-bg-card;
border-radius: $radius-md;
+6 -1
View File
@@ -1,5 +1,5 @@
import React, { useCallback, useEffect, useState } from 'react';
import { ScrollView, Text, View } from '@tarojs/components';
import { Image, ScrollView, Text, View } from '@tarojs/components';
import Taro, { useRouter } from '@tarojs/taro';
import styles from './index.module.scss';
import {
@@ -86,6 +86,11 @@ const DetailPage: React.FC = () => {
<Text className={styles.heroName}>{disease.name}</Text>
<Text className={styles.heroTag}>{CATEGORY_LABELS[disease.category] || disease.category}</Text>
</View>
{disease.imageUrl ? (
<View className={styles.imageCard}>
<Image className={styles.symptomImage} src={disease.imageUrl} mode="widthFix" />
</View>
) : null}
<View className={styles.sectionList}>
{sections.map((s) => (
<View key={s.label} className={styles.sectionCard}>
+1
View File
@@ -196,6 +196,7 @@ export interface Disease {
recurrence?: string;
detection?: string;
prevention?: string;
imageUrl?: string;
sortOrder?: number;
}