Your Name 3 lat temu
rodzic
commit
9e210ff974

+ 2
- 1
src/pages/index/buildingDetail/components/DetailBottom/index.jsx Wyświetl plik

@@ -57,7 +57,8 @@ export default function DetailBottom (props) {
57 57
   
58 58
   useEffect(() => {
59 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 62
         const { list } = res || {}
62 63
         
63 64
         // 只保留已发布的活动

+ 1
- 0
src/pages/index/buildingDetail/index.config.js Wyświetl plik

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

+ 6
- 0
src/pages/index/buildingDetail/index.jsx Wyświetl plik

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

+ 1
- 1
src/pages/mine/index.jsx Wyświetl plik

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

+ 32
- 0
src/utils/hooks/useShare.js Wyświetl plik

@@ -0,0 +1,32 @@
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
+}