feat(knowledge): Web 病种图片上传 + 小程序症状图展示
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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}>
|
||||
|
||||
@@ -196,6 +196,7 @@ export interface Disease {
|
||||
recurrence?: string;
|
||||
detection?: string;
|
||||
prevention?: string;
|
||||
imageUrl?: string;
|
||||
sortOrder?: number;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user