|
@@ -0,0 +1,45 @@
|
|
1
|
+import React, { useState } from 'react'
|
|
2
|
+import ActivityListItem from '@/components/ActivityListItem'
|
|
3
|
+import ScrollPageRefresh from '@/components/ScrollPageRefresh'
|
|
4
|
+import Page from '@/layouts'
|
|
5
|
+import '@/assets/css/reset.less'
|
|
6
|
+import '@/assets/css/iconfont.less'
|
|
7
|
+import './index.less'
|
|
8
|
+
|
|
9
|
+export default function WoDeDingDan () {
|
|
10
|
+
|
|
11
|
+ const [PageList, setPageList] = useState([])
|
|
12
|
+ const [IsEmpty, setIsEmpty] = useState(false)
|
|
13
|
+
|
|
14
|
+ const Refresh = (e) => { // 下拉刷新
|
|
15
|
+ if (e.length > 0) {
|
|
16
|
+ setIsEmpty(false)
|
|
17
|
+ setPageList(e)
|
|
18
|
+ } else {
|
|
19
|
+ setIsEmpty(true)
|
|
20
|
+ }
|
|
21
|
+ }
|
|
22
|
+
|
|
23
|
+ const Push = (e) => { // 上拉加载
|
|
24
|
+ setPageList(PageList.concat(e))
|
|
25
|
+ }
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+ return (
|
|
29
|
+ <Page>
|
|
30
|
+ <view className='WoDeDingDan'>
|
|
31
|
+ <ScrollPageRefresh IsEmpty={IsEmpty} ApiName={`getActivityList`} RequestParams={{ mine: 1 }} Refresh={Refresh} Push={Push}>
|
|
32
|
+ <view className='Content Activity'>
|
|
33
|
+ {
|
|
34
|
+ PageList.map((item, index) => (
|
|
35
|
+ <view className='ListItem' key={`ActivityItem-${index}`}>
|
|
36
|
+ <ActivityListItem Data={item}></ActivityListItem>
|
|
37
|
+ </view>
|
|
38
|
+ ))
|
|
39
|
+ }
|
|
40
|
+ </view>
|
|
41
|
+ </ScrollPageRefresh>
|
|
42
|
+ </view>
|
|
43
|
+ </Page>
|
|
44
|
+ )
|
|
45
|
+}
|