소스 검색

Merge branch 'main' of http://git.ycjcjy.com/marketing/miniapp into main

Your Name 3 년 전
부모
커밋
ce5971fcb7

+ 8
- 8
src/pages/mine/components/MyActivityListItem/index.jsx 파일 보기

1
 import React, { useState, useEffect } from 'react'
1
 import React, { useState, useEffect } from 'react'
2
-import './index.scss'
2
+import { getImgURL } from '@/utils/image'
3
 import Taro from '@tarojs/taro'
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
 export default function MyActivityListItem (props) {
8
 export default function MyActivityListItem (props) {
6
   const { Data = {} } = props
9
   const { Data = {} } = props
8
   return (
11
   return (
9
     <view className='components MyActivityListItem' onClick={() => { Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${Data.id}` }) }}>
12
     <view className='components MyActivityListItem' onClick={() => { Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${Data.id}` }) }}>
10
       <view className='Img'>
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
       </view>
15
       </view>
16
       <view className='Info'>
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
       </view>
20
       </view>
21
     </view>
21
     </view>
22
   )
22
   )

+ 5
- 7
src/pages/mine/myActivity/index.jsx 파일 보기

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

+ 2
- 2
src/subpackages/pages/marketing/residentManager/index.jsx 파일 보기

113
       <view className='Search flex-h'>
113
       <view className='Search flex-h'>
114
         <view className='flex-item'>
114
         <view className='flex-item'>
115
           <text className='iconfont icon-sousuo'></text>
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
         </view>
117
         </view>
118
         <text>{CurrentBuildingName}</text>
118
         <text>{CurrentBuildingName}</text>
119
         <picker value={0} range-key='name' onChange={PickerChange} range={BuildingIds}>
119
         <picker value={0} range-key='name' onChange={PickerChange} range={BuildingIds}>
123
 
123
 
124
       <view className='flex-item'>
124
       <view className='flex-item'>
125
         <view>
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
             <view className='PageContent'>
127
             <view className='PageContent'>
128
 
128
 
129
               {/* <view className='Filter'>
129
               {/* <view className='Filter'>