Browse Source

信息修改

1002884655 3 years ago
parent
commit
4e47b3dc75

+ 1
- 1
src/components/ProjectListItem/index.jsx View File

@@ -11,7 +11,7 @@ export default function ProjectListItem (props) {
11 11
 
12 12
   const LinkTo = () => {
13 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 15
     } else if(Data.eventType === 'activity') { // 活动
16 16
       Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${Data.targetId}` })
17 17
     } else { // 楼盘

+ 1
- 24
src/pages/index/activityDetail/index.jsx View File

@@ -28,29 +28,6 @@ import CountDown from './CountDown'
28 28
 
29 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 31
 export default withLayout((props) => {
55 32
   const { router, shareContent, trackData, person, page, showShareTimeline, setNavigationBarTitle } = props;
56 33
   const { id } = router.params;
@@ -231,7 +208,7 @@ export default withLayout((props) => {
231 208
         <view className='flex-item'>
232 209
           <text>{detail.enlisted || 0}人已报名</text>
233 210
         </view>
234
-        <button className='Btn' disabled={btnDisabled} onClick={handleSignup}>{btnText}</button>
211
+        <Button className='Btn' disabled={btnDisabled} onClick={handleSignup}>{btnText}</Button>
235 212
       </view>
236 213
 
237 214
     </view>

+ 1
- 1
src/pages/index/buildingDetail/components/DetailBottom/index.jsx View File

@@ -58,7 +58,7 @@ export default function DetailBottom (props) {
58 58
       const id = actList[0].dynamicId
59 59
 
60 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 63
     } else {
64 64
       Taro.showToast({ title: '该功能暂不能为您提供服务', icon: 'none', duration: 2000 })

+ 2
- 2
src/pages/index/buildingDetail/components/MarketingActivity/index.jsx View File

@@ -13,7 +13,7 @@ export default function MarketingActivity (props) {
13 13
   const [dataList, setDataList] = useState([])
14 14
 
15 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 18
   useEffect(() => {
19 19
     if (buildingId) {
@@ -43,7 +43,7 @@ export default function MarketingActivity (props) {
43 43
             {
44 44
               dataList.map((item, index) => (
45 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 47
                     <Image mode='aspectFill' className='centerLabel' src={getImgURL(item.bannerListImg || item.imgUrl || item.image || item.url || item.img || item.imgUrl || item.detailImg)} />
48 48
                   </view>
49 49
                 </SwiperItem>

+ 3
- 3
src/pages/index/components/ActivityListItem/index.jsx View File

@@ -1,9 +1,9 @@
1
-import React, { useState, useEffect } from 'react'
2
-import './index.scss'
1
+
3 2
 import { Image } from '@tarojs/components'
4 3
 import Taro from '@tarojs/taro'
5 4
 import { getImgURL } from '@/utils/image'
6 5
 import { formatDate } from '@/utils/chatDate'
6
+import './index.scss'
7 7
 
8 8
 const activityStatusDict={
9 9
   0:{
@@ -26,7 +26,7 @@ const activityStatusDict={
26 26
 export default function ActivityListItem (props) {
27 27
   const { data = {} } = props
28 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 30
       <view className='Img'>
31 31
         <Image mode='aspectFill' src={getImgURL(data.listImgUrl || data.imgUrl)} className='centerLabel'></Image>
32 32
       </view>

+ 0
- 40
src/pages/index/components/Banner/index.jsx View File

@@ -1,51 +1,11 @@
1 1
 
2 2
 import { Swiper, SwiperItem, Image } from '@tarojs/components'
3
-import Taro from '@tarojs/taro'
4 3
 import { getImgURL } from '@/utils/image'
5 4
 import nav2Target from '@/utils/nav2Target'
6 5
 import './index.scss'
7 6
 
8 7
 export default function Banner (props) {
9 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 10
   const handleBannerClick = (item) => {
51 11
     if (item.contentType && item.contentType != "nothing") {

+ 1
- 1
src/pages/index/components/HotRecommend/index.jsx View File

@@ -50,7 +50,7 @@ export default function HotRecommend (props) {
50 50
   const toDetail = (item) => {
51 51
     return () => {
52 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 View File

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

+ 2
- 2
src/utils/nav2Target.js View File

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

+ 2
- 2
src/utils/tracking/userSource.js View File

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