1002884655 пре 3 година
родитељ
комит
952ad5e6d2

+ 8
- 8
src/pages/mine/components/MyActivityListItem/index.jsx Прегледај датотеку

@@ -1,6 +1,9 @@
1 1
 import React, { useState, useEffect } from 'react'
2
-import './index.scss'
2
+import { getImgURL } from '@/utils/image'
3 3
 import Taro from '@tarojs/taro'
4
+import { Image } from '@tarojs/components'
5
+import { formatDate } from '@/utils/chatDate'
6
+import './index.scss'
4 7
 
5 8
 export default function MyActivityListItem (props) {
6 9
   const { Data = {} } = props
@@ -8,15 +11,12 @@ export default function MyActivityListItem (props) {
8 11
   return (
9 12
     <view className='components MyActivityListItem' onClick={() => { Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${Data.id}` }) }}>
10 13
       <view className='Img'>
11
-        {
12
-          Data.img &&
13
-          <Image mode='aspectFill' className='centerLabel' src={Data.img || null} />
14
-        }
14
+        <Image mode='aspectFill' className='centerLabel' src={getImgURL(Data.listImgUrl) || null} />
15 15
       </view>
16 16
       <view className='Info'>
17
-        <text className='Name'>5D沉浸式剧场</text>
18
-        <text className='Address'>江宁禄口云熙99路号(诚信大道)</text>
19
-        <text className='Time'>活动时间:2019/10/20 10:00 - 2019/10/22 10:00</text>
17
+        <text className='Name'>{Data.title}</text>
18
+        <text className='Address'>{Data.address}</text>
19
+        <text className='Time'>活动时间:{formatDate(Data.startDate, 'yyyy-MM-dd hh:mm:ss')} - {formatDate(Data.endDate, 'yyyy-MM-dd hh:mm:ss')}</text>
20 20
       </view>
21 21
     </view>
22 22
   )

+ 5
- 7
src/pages/mine/myActivity/index.jsx Прегледај датотеку

@@ -4,7 +4,7 @@ import { ScrollView } from '@tarojs/components'
4 4
 import '@/assets/css/iconfont.css'
5 5
 import { useSelector } from 'react-redux'
6 6
 import { fetch } from '@/utils/request'
7
-import { API_ACTIVITY_LIST_CUSTOMER } from '@/constants/api'
7
+import { API_ACTIVITY_LIST } from '@/constants/api'
8 8
 import './index.scss'
9 9
 import MyActivityListItem from '../components/MyActivityListItem/index'
10 10
 
@@ -24,10 +24,8 @@ export default withLayout(() => {
24 24
   }, [user])
25 25
 
26 26
   useEffect(() => {
27
-    if(PersonId) {
28
-      GetPageList()
29
-    }
30
-  }, [pageNumber, PersonId])
27
+    GetPageList()
28
+  }, [pageNumber])
31 29
 
32 30
   const PageRefresh = () => { // 页面下拉刷新回调
33 31
     setPull(true)
@@ -35,7 +33,7 @@ export default withLayout(() => {
35 33
 
36 34
   const GetPageList = () => {
37 35
     setHasNextPage(false)
38
-    fetch({ url: API_ACTIVITY_LIST_CUSTOMER, method: 'get', payload: { customerId: PersonId, pageNumber, pageSize: 10 } }).then((res) => {
36
+    fetch({ url: API_ACTIVITY_LIST, method: 'get', payload: { mine: true, pageNumber, pageSize: 10 } }).then((res) => {
39 37
       setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
40 38
       setHasNextPage(res.current < res.pages)
41 39
       setPull(false)
@@ -67,7 +65,7 @@ export default withLayout(() => {
67 65
             {
68 66
               PageList.map((item, index) => (
69 67
                 <view>
70
-                  <text>2021-05-23 12:00</text>
68
+                  {/* <text>2021-05-23 12:00</text> */}
71 69
                   <MyActivityListItem Data={item} key={`MyActivityListItem-${index}`}></MyActivityListItem>
72 70
                 </view>
73 71
               ))

+ 2
- 2
src/subpackages/pages/marketing/residentManager/index.jsx Прегледај датотеку

@@ -113,7 +113,7 @@ export default withLayout((props) => {
113 113
       <view className='Search flex-h'>
114 114
         <view className='flex-item'>
115 115
           <text className='iconfont icon-sousuo'></text>
116
-          <Input confirm-type='search' placeholder='请输入关键字搜索' onConfirm={SearchConfirm} onscrolltolower={PageLoadMore}></Input>
116
+          <Input confirm-type='search' placeholder='请输入关键字搜索' onConfirm={SearchConfirm}></Input>
117 117
         </view>
118 118
         <text>{CurrentBuildingName}</text>
119 119
         <picker value={0} range-key='name' onChange={PickerChange} range={BuildingIds}>
@@ -123,7 +123,7 @@ export default withLayout((props) => {
123 123
 
124 124
       <view className='flex-item'>
125 125
         <view>
126
-          <ScrollView scroll-y refresher-enabled refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
126
+          <ScrollView scroll-y refresher-enabled refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} onscrolltolower={PageLoadMore} refresher-background='#fff'>
127 127
             <view className='PageContent'>
128 128
 
129 129
               {/* <view className='Filter'>