Browse Source

静态页面

xcx 4 years ago
parent
commit
75968aad01

+ 5
- 2
src/assets/css/iconfont.css
File diff suppressed because it is too large
View File


+ 10
- 6
src/assets/css/iconfont.less
File diff suppressed because it is too large
View File


+ 9
- 0
src/pages.js View File

316
       eventType: 'other',
316
       eventType: 'other',
317
     }
317
     }
318
   },
318
   },
319
+  {
320
+    name: '我的-我的订单',
321
+    page: 'pages/WoDe/WoDeDingDan/index',
322
+    auth: ['avatar', 'phone'],
323
+    track: {
324
+      event: 'list',
325
+      eventType: 'other',
326
+    }
327
+  },
319
 ]
328
 ]
320
 
329
 
321
 module.exports = [
330
 module.exports = [

+ 3
- 0
src/pages/WoDe/WoDeDingDan/index.config.js View File

1
+export default {
2
+  navigationBarTitleText: '我的订单'
3
+}

+ 20
- 0
src/pages/WoDe/WoDeDingDan/index.css View File

1
+.WoDeDingDan {
2
+  width: 100%;
3
+  height: 100%;
4
+  position: relative;
5
+  background: #f8f8f8;
6
+  overflow: hidden;
7
+}
8
+.WoDeDingDan .Content {
9
+  padding: 0 30px;
10
+  position: relative;
11
+  overflow: hidden;
12
+}
13
+.WoDeDingDan .Content > .ListItem {
14
+  position: relative;
15
+  overflow: hidden;
16
+  margin-bottom: 30px;
17
+}
18
+.WoDeDingDan .Content > .ListItem:first-child {
19
+  margin-top: 30px;
20
+}

+ 45
- 0
src/pages/WoDe/WoDeDingDan/index.jsx View File

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
+}

+ 22
- 0
src/pages/WoDe/WoDeDingDan/index.less View File

1
+.WoDeDingDan {
2
+  width: 100%;
3
+  height: 100%;
4
+  position: relative;
5
+  background: #f8f8f8;
6
+  overflow: hidden;
7
+
8
+  .Content {
9
+    padding: 0 30px;
10
+    position: relative;
11
+    overflow: hidden;
12
+
13
+    >.ListItem {
14
+      position: relative;
15
+      overflow: hidden;
16
+      margin-bottom: 30px;
17
+      &:first-child {
18
+        margin-top: 30px;
19
+      }
20
+    }
21
+  }
22
+}

+ 2
- 1
src/pages/WoDe/index.jsx View File

20
   const [MoreUserTab] = useState([
20
   const [MoreUserTab] = useState([
21
     { icon: 'iconerweima', name: '推荐二维码', id: 5, router: '/pages/WoDe/TuiJianErWeiMa/index' },
21
     { icon: 'iconerweima', name: '推荐二维码', id: 5, router: '/pages/WoDe/TuiJianErWeiMa/index' },
22
     // { icon: 'iconfenxiang', name: '推荐分享', id: 6, router: '/pages/WoDe/TuiJianFenXiang/index' },
22
     // { icon: 'iconfenxiang', name: '推荐分享', id: 6, router: '/pages/WoDe/TuiJianFenXiang/index' },
23
-    { icon: 'iconhuodong', name: '参与活动', id: 7, router: '/pages/WoDe/WoDeHuoDong/index' }
23
+    { icon: 'iconhuodong', name: '参与活动', id: 7, router: '/pages/WoDe/WoDeHuoDong/index' },
24
+    { icon: 'icondingdan', name: '我的订单', id: 7, router: '/pages/WoDe/WoDeDingDan/index' }
24
   ])
25
   ])
25
   const [DataLock, setDataLock] = useState(false)
26
   const [DataLock, setDataLock] = useState(false)
26
 
27