Your Name 3 年前
父节点
当前提交
9e210ff974

+ 2
- 1
src/pages/index/buildingDetail/components/DetailBottom/index.jsx 查看文件

57
   
57
   
58
   useEffect(() => {
58
   useEffect(() => {
59
     if (Info.buildingId) {
59
     if (Info.buildingId) {
60
-      queryActivityList({ buildingId: Info.buildingId, pageSize: 1, type: 'house' }).then((res) => {
60
+      // 请求看房活动
61
+      queryActivityList({ buildingId: Info.buildingId, pageSize: 1, type: 'look' }).then((res) => {
61
         const { list } = res || {}
62
         const { list } = res || {}
62
         
63
         
63
         // 只保留已发布的活动
64
         // 只保留已发布的活动

+ 1
- 0
src/pages/index/buildingDetail/index.config.js 查看文件

1
 export default {
1
 export default {
2
   navigationBarTitleText: '楼盘详情',
2
   navigationBarTitleText: '楼盘详情',
3
+  enableShareAppMessage: true,
3
 }
4
 }

+ 6
- 0
src/pages/index/buildingDetail/index.jsx 查看文件

1
 import { useState, useEffect, useMemo } from 'react'
1
 import { useState, useEffect, useMemo } from 'react'
2
+import Taro, { useShareAppMessage } from '@tarojs/taro'
2
 import withLayout from '@/layout'
3
 import withLayout from '@/layout'
3
 import { ScrollView } from '@tarojs/components'
4
 import { ScrollView } from '@tarojs/components'
4
 import Disclaimer from '@/components/Disclaimer'
5
 import Disclaimer from '@/components/Disclaimer'
44
 
45
 
45
   }, [DetailInfo?.poster, person.avatarurl, person.name, person.nickname])
46
   }, [DetailInfo?.poster, person.avatarurl, person.name, person.nickname])
46
 
47
 
48
+  
49
+  useShareAppMessage((res) => {
50
+    return {}
51
+  })
52
+
47
   useEffect(() => {
53
   useEffect(() => {
48
     // 获取楼盘信息
54
     // 获取楼盘信息
49
     fetch({ url: `${API_ITEMS_DETAIL}/${id}`, spin: true }).then((res) => {
55
     fetch({ url: `${API_ITEMS_DETAIL}/${id}`, spin: true }).then((res) => {

+ 1
- 1
src/pages/mine/index.jsx 查看文件

5
 import Taro from '@tarojs/taro'
5
 import Taro from '@tarojs/taro'
6
 import './index.scss'
6
 import './index.scss'
7
 import NeedLogin from './components/NeedLogin'
7
 import NeedLogin from './components/NeedLogin'
8
-import '../../assets/css/iconfont.css'
8
+import '@/assets/css/iconfont.css'
9
 import MineMenuList from './tabData'
9
 import MineMenuList from './tabData'
10
 
10
 
11
 const defaultRuleImage = 'https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/index-icon18.jpg'
11
 const defaultRuleImage = 'https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/index-icon18.jpg'

+ 32
- 0
src/utils/hooks/useShare.js 查看文件

1
+import React, { useState } from 'react'
2
+import Taro, { useShareAppMessage } from '@tarojs/taro'
3
+
4
+export default function useShare(shareRef) {
5
+  useShareAppMessage((res) => {
6
+    const {
7
+      title = '',
8
+      path = '',
9
+      imageUrl = '',
10
+      eventType = '',
11
+      propertyName = '',
12
+      consultantId = '',
13
+      sharePersonId = '',
14
+      targetId = '',
15
+      buildingId = '',
16
+    } = shareRef.current || {}
17
+
18
+        // // 分享埋点
19
+        // shareSavePoint({
20
+        //   event: 'share',
21
+        //   eventType: 'building',
22
+        //   propertyName: '项目详情分享',
23
+        //   consultantId: consultantId,
24
+        //   sharePersonId: personId,
25
+        //   targetId: buildingId,
26
+        //   buildingId: buildingId || '',
27
+        //   data: '{}'
28
+        // }, 'project')
29
+    
30
+    return shareObject
31
+  })
32
+}