|
|
@@ -5,6 +5,7 @@ import styles from './index.module.scss'; |
|
|
|
import Avator from '@root/components/Avator'; |
|
|
|
import Welcome from './components/welcome'; |
|
|
|
import { fetchProjectList } from './service'; |
|
|
|
import Page from '@root/components/Page'; |
|
|
|
|
|
|
|
export default function ProjectListView() { |
|
|
|
const [projectList, setProjectList] = useState([]); |
|
|
@@ -20,31 +21,33 @@ export default function ProjectListView() { |
|
|
|
const dataList = await fetchProjectList(); |
|
|
|
setProjectList(dataList); |
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
fetchList(); |
|
|
|
}, [fetchList]) |
|
|
|
|
|
|
|
return ( |
|
|
|
<ScrollView className={styles.project} scrollY> |
|
|
|
<View className={styles.wrapPadding}> |
|
|
|
<Avator className={styles.avator} /> |
|
|
|
</View> |
|
|
|
<Welcome className={styles.wrapPadding} /> |
|
|
|
<View className={[styles.listTitle, styles.wrapPadding]}> |
|
|
|
<Text>我的项目</Text> |
|
|
|
</View> |
|
|
|
{ |
|
|
|
projectList.map(project => ( |
|
|
|
<View className={styles.projectItem} key={project.id}> |
|
|
|
<Image className={styles.img} src={project.showImgUrl} /> |
|
|
|
<View className={styles.label}> |
|
|
|
<Text>{project.projName}</Text> |
|
|
|
<Page wrapperClassName={styles.page}> |
|
|
|
<ScrollView className={styles.project} scrollY> |
|
|
|
<View className={styles.wrapPadding}> |
|
|
|
<Avator className={styles.avator} /> |
|
|
|
</View> |
|
|
|
<Welcome className={[styles.wrapPadding, styles.mt10]} /> |
|
|
|
<View className={[styles.listTitle, styles.wrapPadding]}> |
|
|
|
<Text>我的项目</Text> |
|
|
|
</View> |
|
|
|
{ |
|
|
|
projectList.map(project => ( |
|
|
|
<View className={styles.projectItem} key={project.id}> |
|
|
|
<Image className={styles.img} src={project.showImgUrl} /> |
|
|
|
<View className={styles.label}> |
|
|
|
<Text>{project.projName}</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
)) |
|
|
|
} |
|
|
|
</ScrollView> |
|
|
|
)) |
|
|
|
} |
|
|
|
</ScrollView> |
|
|
|
</Page> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|