1002884655 преди 3 години
родител
ревизия
4e47b3dc75

+ 1
- 1
src/components/ProjectListItem/index.jsx Целия файл

11
 
11
 
12
   const LinkTo = () => {
12
   const LinkTo = () => {
13
     if(Data.eventType === 'news') { // 资讯
13
     if(Data.eventType === 'news') { // 资讯
14
-      Taro.navigateTo({ url: `/pages/index/newsDetail/index?id=${Data.targetId}` })
14
+      Taro.navigateTo({ url: `/pages/index/newsDetail/index?id=${Data.targetId}&eventType=${Data.type}` })
15
     } else if(Data.eventType === 'activity') { // 活动
15
     } else if(Data.eventType === 'activity') { // 活动
16
       Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${Data.targetId}` })
16
       Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${Data.targetId}` })
17
     } else { // 楼盘
17
     } else { // 楼盘

+ 1
- 24
src/pages/index/activityDetail/index.jsx Целия файл

28
 
28
 
29
 import "./index.scss";
29
 import "./index.scss";
30
 
30
 
31
-const activityStatusDict = {
32
-  0: {
33
-    text: '立即参与',
34
-    text1: '立即参团',
35
-    className: 'yellow',
36
-  },
37
-  1: {
38
-    text: '未开始',
39
-    text1: '未开始',
40
-    className: 'blue',
41
-  },
42
-  2: {
43
-    text: '已结束',
44
-    text1: '已结束',
45
-    className: 'grey',
46
-  },
47
-  3: {
48
-    text: '已参与',
49
-    text1: '已结束',
50
-    className: 'yellow',
51
-  },
52
-};
53
-
54
 export default withLayout((props) => {
31
 export default withLayout((props) => {
55
   const { router, shareContent, trackData, person, page, showShareTimeline, setNavigationBarTitle } = props;
32
   const { router, shareContent, trackData, person, page, showShareTimeline, setNavigationBarTitle } = props;
56
   const { id } = router.params;
33
   const { id } = router.params;
231
         <view className='flex-item'>
208
         <view className='flex-item'>
232
           <text>{detail.enlisted || 0}人已报名</text>
209
           <text>{detail.enlisted || 0}人已报名</text>
233
         </view>
210
         </view>
234
-        <button className='Btn' disabled={btnDisabled} onClick={handleSignup}>{btnText}</button>
211
+        <Button className='Btn' disabled={btnDisabled} onClick={handleSignup}>{btnText}</Button>
235
       </view>
212
       </view>
236
 
213
 
237
     </view>
214
     </view>

+ 1
- 1
src/pages/index/buildingDetail/components/DetailBottom/index.jsx Целия файл

58
       const id = actList[0].dynamicId
58
       const id = actList[0].dynamicId
59
 
59
 
60
       Taro.navigateTo({
60
       Taro.navigateTo({
61
-        url: `/pages/index/activityDetail/index?id=${id}`
61
+        url: `/pages/index/activityDetail/index?id=${id}&eventType=${actList[0].type || 'dymic'}`
62
       })
62
       })
63
     } else {
63
     } else {
64
       Taro.showToast({ title: '该功能暂不能为您提供服务', icon: 'none', duration: 2000 })
64
       Taro.showToast({ title: '该功能暂不能为您提供服务', icon: 'none', duration: 2000 })

+ 2
- 2
src/pages/index/buildingDetail/components/MarketingActivity/index.jsx Целия файл

13
   const [dataList, setDataList] = useState([])
13
   const [dataList, setDataList] = useState([])
14
 
14
 
15
   const goMore = () => Taro.navigateTo({ url: `/pages/index/activityList/index?type=house&buildingId=${buildingId}` })
15
   const goMore = () => Taro.navigateTo({ url: `/pages/index/activityList/index?type=house&buildingId=${buildingId}` })
16
-  const goDetail = (id) => Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${id}` })
16
+  const goDetail = (id, type) => Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${id}&eventType=${type || 'dymic'}` })
17
 
17
 
18
   useEffect(() => {
18
   useEffect(() => {
19
     if (buildingId) {
19
     if (buildingId) {
43
             {
43
             {
44
               dataList.map((item, index) => (
44
               dataList.map((item, index) => (
45
                 <SwiperItem key={`Banner-${index}`}>
45
                 <SwiperItem key={`Banner-${index}`}>
46
-                  <view className='swiper-item' onClick={() => goDetail(item.dynamicId)}>
46
+                  <view className='swiper-item' onClick={() => goDetail(item.dynamicId, item.type)}>
47
                     <Image mode='aspectFill' className='centerLabel' src={getImgURL(item.bannerListImg || item.imgUrl || item.image || item.url || item.img || item.imgUrl || item.detailImg)} />
47
                     <Image mode='aspectFill' className='centerLabel' src={getImgURL(item.bannerListImg || item.imgUrl || item.image || item.url || item.img || item.imgUrl || item.detailImg)} />
48
                   </view>
48
                   </view>
49
                 </SwiperItem>
49
                 </SwiperItem>

+ 3
- 3
src/pages/index/components/ActivityListItem/index.jsx Целия файл

1
-import React, { useState, useEffect } from 'react'
2
-import './index.scss'
1
+
3
 import { Image } from '@tarojs/components'
2
 import { Image } from '@tarojs/components'
4
 import Taro from '@tarojs/taro'
3
 import Taro from '@tarojs/taro'
5
 import { getImgURL } from '@/utils/image'
4
 import { getImgURL } from '@/utils/image'
6
 import { formatDate } from '@/utils/chatDate'
5
 import { formatDate } from '@/utils/chatDate'
6
+import './index.scss'
7
 
7
 
8
 const activityStatusDict={
8
 const activityStatusDict={
9
   0:{
9
   0:{
26
 export default function ActivityListItem (props) {
26
 export default function ActivityListItem (props) {
27
   const { data = {} } = props
27
   const { data = {} } = props
28
   return (
28
   return (
29
-    <view className='components ActivityListItem' onClick={() => { Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${data.dynamicId}` }) }}>
29
+    <view className='components ActivityListItem' onClick={() => { Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${data.dynamicId}&eventType=${data.type || 'dymic'}` }) }}>
30
       <view className='Img'>
30
       <view className='Img'>
31
         <Image mode='aspectFill' src={getImgURL(data.listImgUrl || data.imgUrl)} className='centerLabel'></Image>
31
         <Image mode='aspectFill' src={getImgURL(data.listImgUrl || data.imgUrl)} className='centerLabel'></Image>
32
       </view>
32
       </view>

+ 0
- 40
src/pages/index/components/Banner/index.jsx Целия файл

1
 
1
 
2
 import { Swiper, SwiperItem, Image } from '@tarojs/components'
2
 import { Swiper, SwiperItem, Image } from '@tarojs/components'
3
-import Taro from '@tarojs/taro'
4
 import { getImgURL } from '@/utils/image'
3
 import { getImgURL } from '@/utils/image'
5
 import nav2Target from '@/utils/nav2Target'
4
 import nav2Target from '@/utils/nav2Target'
6
 import './index.scss'
5
 import './index.scss'
7
 
6
 
8
 export default function Banner (props) {
7
 export default function Banner (props) {
9
   const { List = [] } = props
8
   const { List = [] } = props
10
-  
11
-  const redirectTo = ({ targetId, contentType, buildingId } = {})=> {
12
-    switch (contentType) {
13
-      // 项目
14
-      case 'project':
15
-        Taro.navigateTo({
16
-          url: '/pages/index/buildingDetail/index?id=' + buildingId
17
-        })
18
-        return;
19
-
20
-      // 活动
21
-      case 'activity':
22
-        Taro.navigateTo({
23
-          url: '/pages/index/activityDetail/index?id=' + targetId
24
-        })
25
-        return;
26
-
27
-      // 资讯
28
-      case 'news':
29
-        Taro.navigateTo({
30
-          url: '/pages/index/newsDetail/index?id=' + targetId
31
-        })
32
-        return;
33
-
34
-      // live
35
-      case 'live':
36
-        Taro.navigateTo({
37
-          url: '/pages/video/liveDetail/index?id=' + targetId
38
-        })
39
-        return;
40
-
41
-
42
-      // 其他
43
-      case 'others':
44
-      default:
45
-        
46
-        return;
47
-    }
48
-  }
49
 
9
 
50
   const handleBannerClick = (item) => {
10
   const handleBannerClick = (item) => {
51
     if (item.contentType && item.contentType != "nothing") {
11
     if (item.contentType && item.contentType != "nothing") {

+ 1
- 1
src/pages/index/components/HotRecommend/index.jsx Целия файл

50
   const toDetail = (item) => {
50
   const toDetail = (item) => {
51
     return () => {
51
     return () => {
52
       if (item.dynamicId) {
52
       if (item.dynamicId) {
53
-        Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${item.dynamicId}` })
53
+        Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${item.dynamicId}&eventType=${item.type || 'dymic'}` })
54
       }
54
       }
55
     }
55
     }
56
   }
56
   }

+ 2
- 2
src/pages/mine/components/MyActivityListItem/index.jsx Целия файл

1
-import React, { useState, useEffect } from 'react'
1
+
2
 import { getImgURL } from '@/utils/image'
2
 import { getImgURL } from '@/utils/image'
3
 import Taro from '@tarojs/taro'
3
 import Taro from '@tarojs/taro'
4
 import { Image } from '@tarojs/components'
4
 import { Image } from '@tarojs/components'
9
   const { Data = {} } = props
9
   const { Data = {} } = props
10
 
10
 
11
   return (
11
   return (
12
-    <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}&eventType=${Data.type || 'dymic'}` }) }}>
13
       <view className='Img'>
13
       <view className='Img'>
14
         <Image mode='aspectFill' className='centerLabel' src={getImgURL(Data.listImgUrl) || null} />
14
         <Image mode='aspectFill' className='centerLabel' src={getImgURL(Data.listImgUrl) || null} />
15
       </view>
15
       </view>

+ 2
- 2
src/utils/nav2Target.js Целия файл

1
 import Taro from '@tarojs/taro'
1
 import Taro from '@tarojs/taro'
2
 
2
 
3
-export default ({ targetId, contentType, buildingId } = {})=> {
3
+export default ({ targetId, contentType, buildingId, type = 'dymic' } = {})=> {
4
   if (!targetId && !buildingId) return;
4
   if (!targetId && !buildingId) return;
5
 
5
 
6
   switch (contentType) {
6
   switch (contentType) {
14
     // 活动
14
     // 活动
15
     case 'activity':
15
     case 'activity':
16
       Taro.navigateTo({
16
       Taro.navigateTo({
17
-        url: '/pages/index/activityDetail/index?id=' + targetId
17
+        url: '/pages/index/activityDetail/index?id=' + targetId + '&eventType=' + type
18
       })
18
       })
19
       return;
19
       return;
20
 
20
 

+ 2
- 2
src/utils/tracking/userSource.js Целия файл

3
 
3
 
4
 export default async (router) => {
4
 export default async (router) => {
5
   const { path, query, scene } = router || {}
5
   const { path, query, scene } = router || {}
6
-  const { id, buildingId, recommender } = query || {}
6
+  const { id, buildingId, recommender, eventType } = query || {}
7
 
7
 
8
   const pageInfo = routes.filter(x => path.indexOf(x.page) > -1)[0] || { type: 'other', name: '其他' }
8
   const pageInfo = routes.filter(x => path.indexOf(x.page) > -1)[0] || { type: 'other', name: '其他' }
9
 
9
 
10
   const trackPayload = {
10
   const trackPayload = {
11
     event: 'start',
11
     event: 'start',
12
-    eventType: pageInfo.type,
12
+    eventType: eventType || pageInfo.type,
13
     propertyName: pageInfo.name,
13
     propertyName: pageInfo.name,
14
     data: '{}',
14
     data: '{}',
15
     id,
15
     id,